feat(docs): size bands with a docs-count cap, and the migration that lets it land #1108
No reviewers
Labels
No labels
burndown-2026-06
autonomy
async-consult
autonomy
epic
autonomy
headless
autonomy
live-collab
coherence-core
priority
P0
priority
P1
priority
P2
priority
P3
priority
P4
qa-fixture
role/ai
role/creator
role/design
role/director
role/engineer
role/exec
role/human
role/ops
role/qa
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
coilyco-flight-deck/agentic-os!1108
Loading…
Reference in a new issue
No description provided.
Delete branch "aos/claude/aw85-docs-prune"
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?
Supersedes #1090, which is the first two commits here. That PR could not land on its own: it adds a cap this repository failed, and
documentation-layoutruns on every commit with--no-verifybanned, so wiring the check would have bricked commits to the repo that owns the hook. This is the check plus the migration that lets it land.The count cap is the point
A per-doc size cap does not bound a docs folder, it reshapes it. A repo that caps length and not count answers every over-long doc by splitting it.
sirens-echowas the proof: 156 docs, median 2,935 chars, largest 3,989 against a 4,000 cap. Not one file over the limit, and a folder nobody can read.This repository had the same disease in miniature, and its own
skill-disciplinehandbook said so out loud:Ten files. The count cap is that sentence, enforced.
The migration: 100 docs to 40
docs/goes from 100 files to 40, 5,089 lines to 4,120, every one inside the band caps.check_docs_countis now inmain()'s violation list.Two docs were deleted because their content had stopped being true.
issue-corpus.mdsaid in full that the corpus it documents is retired, whileFEATURES.mdadvertised it as a shipped capability.security-boundaries.mdwas two dated audits that closed their issues, referenced by nothing.Nothing else was dead. No doc referenced a renamed thing or a deleted repo. The quiet docs were quiet because their subject is stable, and deleting those to reach a number would have destroyed the reference material the cap exists to make readable.
So the rest is merging and trimming, and what the trimming cut was restatement rather than explanation:
See alsosections. FEATURES.md is the index and each was a second copy of a slice of it.roles.kdl, which the page itself calls authoritative.Three findings worth keeping
Merging costs lines rather than saving them, measured at 3.7 per fold: the heading and its spacing. I assumed the opposite going in, and that measurement is why the migration needed a trimming pass rather than more folding.
Rephrasing prose to be tighter does not reduce line count. Reflowed text occupies the same rows. The last dozen lines came from folding small trailing sections into the paragraph above them, which removes a heading and a blank line without touching a word.
A generated doc cannot be merged at all. Folding
catalog-caps-reference.mdinto another page turnedtest_committed_render_is_in_syncred, because the generator writes that exact path. It is back out and regenerated.No per-file escape
excludesno longer reaches either size cap or the count. It still governs placement and flatness, where it does real work for vendored trees and generated output. The old escape had accumulated exactly where the pressure was highest:agentic-os-kaiexcluded nine individualSKILL.mdfiles, and two repos excludeddocs/FEATURES.mdfrom the cap that exists to keep it an inventory.Verification
pre-commit run --all-filesclean, 539 tests green. 23 files of validator and test changes, the rest documentation.What this does not do
Every other repo goes red on its own schedule after this lands. The measured cost at the time of writing:
infrastructure127 docs,lore69,agent-proxy67,agent-compose63,sirens-echo156.agent-compose,agent-proxy, andloreare the hard ones, carrying 3,000 to 4,000 lines of docs against an 800-line small-band budget.Two bands, declared per repo, each carrying three caps: small (default) 40 lines 3,000 chars 20 docs large 120 lines 8,000 chars 40 docs The count cap is the new part and the reason for the change. A per-doc size cap does not bound a docs folder, it reshapes it: a repo that caps length and not count answers every over-long doc by splitting it. sirens-echo is the proof, at 156 docs with a 3,989-char maximum against a 4,000 cap. Not one file over the limit, and a folder nobody can read. The pairs are set from measurement rather than taste. Markdown here runs about 49 chars per line fleet-wide, so lines bind first and the char cap sits above as the backstop for tables and code. The two caps multiply into a budget - 800 lines for small, 4,800 for large - which is the number worth arguing about rather than either cap alone. Excludes no longer reach either size cap or the count. They still govern placement and flatness, where they are doing real work for vendored trees and generated output. The old per-file escape accumulated exactly where pressure was highest: one repo excluded nine individual SKILL.md files, and two excluded docs/FEATURES.md from the cap that keeps it an inventory. docs/FEATURES.md loses its own constants and takes the band. They were equal to the ordinary cap, so it was a special case in name only. check_docs_count is implemented and tested but deliberately not in main()'s violation list. A strict fleet cap cannot land from inside a repo that violates it, and this one carries 100 docs against its own 40. Wiring it is one line, in the commit that lands this repo's own migration. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Co-authored-by: Kai Siren <coilysiren@gmail.com> Co-authored-by: Claude <noreply@anthropic.com>3fe68ed7' into aos/claude/aw85-docs-migrateaos/claude/aw85-docs-pruneto feat(docs): size bands with a docs-count cap, and the migration that lets it land