# Validation: Article Creation Gates ## Source case The implementation targets the behavior observed in `brain-analysis (4).json`: - research evidence was learned successfully; - article cycles repeatedly ended with `articles_created: 0` and `articles_skipped: 1`; - generated queries included invalid restrictions such as `site:digital-forensics`, `site:assetmanagement` and `site:cleanroomrecovery`; - editorial definition and differentiation requests remained critical; - at least one run reached `article.draft.started` without a visible rejection reason. ## Automated checks The following focused engine tests pass: - valid FQDN restrictions are retained; - topic labels are rejected as domains; - invalid query-level `site:` filters are removed; - editorial critical gaps are downgraded only with a grounded core; - rollback/data-loss gaps remain critical; - legacy editorial missing information becomes optional; - concept drafts pass the type-aware minimum with grounded key points; - the same short content fails the operational how-to minimum; - deterministic rejection metadata includes reason, field, actual and required values; - existing research-gate and knowledge-brief tests continue to pass. Commands used in the isolated validation copy: ```bash go test ./internal/engine -run 'Test(NormalizeKnowledgeBrief|HeuristicResearchAssessment|FilterUsableResearchEvidence|AppendResearchEvidence|GapExpectsActionable|NormalizeResearchPlan|SelectResearchCandidates|CanonicalResearchURL|FilterKnowledgeBriefReferences|ArticleContentToDraft|NormalizeArticleContent|ArticleQualityContext|ArticleDraftContext|ValidateArticleDraft|ArticleDraftValidationMetadata|CleanDomains|SanitizeSearchQuery)' -count=1 go test ./... -run '^$' -count=1 node --check internal/web/static/app.js ``` ## Environment limitation The project declares Go 1.26 and depends on `modernc.org/sqlite`. The available validation environment provides Go 1.23.2 and no internet access. Compilation validation therefore used a temporary Go 1.23 copy and a compile-only local SQLite package stub. The original `go.mod` and production source remain unchanged. Focused pure-logic tests were executed normally. Full runtime tests that open a real SQLite database must be rerun in the regular project build environment: ```bash go test ./... make build ``` The existing precompiled `neural-brain` file was not rebuilt in this environment.