Coding guidelines verifier
Goal
Validate that changes follow the nearest nested AGENTS.md:
- •default: changed files only
- •default: auto-fix formatting before lint/tests
- •monorepo-aware: each module’s
AGENTS.mdis the source of truth for that scope
Workflow (checklist)
- •Collect changed files (staged + unstaged + untracked).
- •For each changed file, find the nearest parent
AGENTS.md.- •If a file has no scoped
AGENTS.md, report it (suggest runningcoding-guidelines-gen).
- •If a file has no scoped
- •Parse the
codex-guidelinesblock (schema:references/verifiable-block.md). - •Run, per scope:
- •format (auto-fix) -> lint -> tests
- •apply simple forbid rules (globs/regex) from the block
- •Produce a short compliance report (template:
references/report-template.md).
Automation
Use scripts/verify_guidelines.py to group scopes, run commands, and report results.