feat: validate-docmap subcommand — CI hard-fail if source directories lack docmap coverage #141
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
CI needs a way to verify that a
doc-map.ymlis correctly configured: every changed file is covered by at least one docmappaths:glob, and everydocs:entry actually exists on disk.This is a pure static check — no AI, no external API calls.
Feature Request
Add a
review-bot validate-docmapsubcommand that CI jobs call with the list of changed files.Invocation
Changed files are read from stdin (one per line). Returns exit 0 on clean, non-zero on any failure.
Checks
1. Coverage check (hard fail)
For each changed file read from stdin, verify at least one
paths:glob in the docmap matches it.2. Stale-docs check (hard fail)
For each
docs:entry in the docmap, verify the referenced path exists on disk relative to--repo-root.Flags
--docmap--repo-root.(cwd)docs:pathsContext
review/docmap.go—ParseDocMapConfig,MatchDocs,DocMapConfig,globMatchglobMatch/mappingMatchesare unexported — need to either export them or add a thin exported helpervalidate-urlsubcommand (cmd/review-bot/validateurl.go) is the pattern for standalone subcommandsmain.goviaos.Args[1]switch before flag parsingAcceptance Criteria
review-bot validate-docmapsubcommand dispatched frommain.go--docmapflag (required)--repo-rootflag (optional, default cwd)paths:globdocs:entry does not exist on disk under--repo-rootrodin referenced this issue2026-05-15 09:04:39 +00:00