v1.10.0: Architecture check for over-budget files
New: a third over-budget mode
Some AI_READMEs are over budget with no dominant section and nothing left to compress — just many mid-sized sections, each one real signal. Rewriting such a file only deletes useful conventions, because the doc shape is a symptom: the directory itself hosts too many parallel features in one flat level.
update_ai_readme and compress_ai_readme now emit an ARCHITECTURE CHECK when a file is over budget with no dominant section and 6+ sections. It deliberately frames the problem as an architecture question rather than a formatting one:
- The question is "should this directory be regrouped into feature subdirectories?" — the AI_README shrinking is a consequence, not the goal.
- The agent must inspect the actual files and judge from the code, not from the AI_README's headings.
- Explicit false-positive exit: if the files really are cohesive (shared logic, one domain), it's told to just rewrite the doc and not touch the directory.
- Moving files requires user confirmation first, and
git mvto preserve history.
Existing behavior is unchanged: a file with one dominant section (>= 40%) still gets the targeted SPLIT, which always takes priority over the architecture check.
Fixed: validate no longer mislabels the fix
validate_ai_readmes used to tell you "these files need rewriting, not patching" for every severely over-budget file — wrong advice for a file that actually needs a split, and it pushed agents into deleting real signal. It now labels each file with its likely fix:
🚨 These files are severely over budget — patching won't fix them:
- AI_README.md (score: 48, tokens: 399) — likely fix: ARCHITECTURE CHECK — 8 sections, none dominant
The split/restructure/rewrite decision is now shared through a single diagnoseOverBudget(), so validate, compress and update can never disagree about the same file.