KB Lint
Use for knowledge-base health checks.
AgentKB keeps Markdown as the canonical storage format. Load the smallest sufficient context first, and make every write reviewable with Git diff.
Checks
- Missing frontmatter on formal notes
- Missing required frontmatter fields
- Missing core project files
- Missing
_system/protocol files - Oversized or stale
context-pack.md - Raw sources that have not been processed
- Unprocessed captures in
inbox/codex-captures/ - Stale candidates in
promotion/candidates/ - Notes marked
needs_review: true - Active notes referencing
archive/ - Index or logs that need review
Procedure
- Run
python3 scripts/kb_lint.py --vault <vault> --project <project> --write-report --jsonwhen available. - Treat the generated report as review guidance, not an automatic repair.
- Put risky changes in
proposed-changes/. - Apply only scoped, source-grounded fixes.
- Review the Git diff before completion.
Safety
Do not auto-delete, rename, move, or rewrite canonical notes.