You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(adf): add charter adf tidy command to sweep vendor file bloat back into ADF modules #23
After charter adf migrate converts vendor config files (CLAUDE.md, .cursorrules, agents.md, GEMINI.md, copilot-instructions.md) into thin pointers, AI agents continue writing rules and context directly into those files. Over time, vendor files accumulate content that belongs in .ai/*.adf modules, defeating the purpose of ADF's modular context system.
Proposed Solution
New charter adf tidy command that:
Scans known vendor config files for content beyond the thin pointer
Extracts new content (diff against the pointer-only baseline)
Classifies extracted content using the existing classifyElement pipeline (imperative/advisory/neutral, heading-based and trigger-based module routing)
Routes classified content to the appropriate .adf modules
Restores the thin pointer in the vendor file
Reports what was moved and where
CLI Interface
# Dry run — show what would be tidied
charter adf tidy --dry-run
# Tidy all detected vendor files
charter adf tidy
# Tidy a specific file
charter adf tidy --source CLAUDE.md
# JSON output for agent consumption
charter adf tidy --format json
Reuses parseMarkdownSections, classifyElement, buildMigrationPlan from @stackbilt/adf
Reuses thin pointer detection from doctor command (POINTER_MARKERS constant)
Notes
This is the primitive that the pre-commit hook integration (#14 TBD) will call. Design the command to be composable — exit code 0 when clean, 1 when content was found (in --dry-run --ci mode).
Shipped in 88ea5e4. charter adf tidy is now available with --dry-run, --ci, --source, and JSON output support. Next: #24 (pre-commit hook integration).
Activity
feat(adf): add `charter adf tidy` command for vendor file bloat extra…
SmartBrandStrategies commentedon Mar 4, 2026
Shipped in 88ea5e4.
charter adf tidyis now available with --dry-run, --ci, --source, and JSON output support. Next: #24 (pre-commit hook integration).