← All needs

[Feature] New skill /doc-condense: cleanup pass for an approved design document

## Summary A skill that runs one cleanup pass on one approved design document: superseded blocks move to an archive, narrative and copied decisions move to the review log, rules, values and acceptance criteria stay untouched, and the PR proves nothing that the game does has changed. ## Type - [ ] New agent - [x] New skill (slash command) - [ ] New hook - [ ] New rule - [ ] New template - [ ] Improvement to existing component - [ ] Other: ## Problem / Motivation Design documents grow with every review and never shrink. Review narrative, copied decisions, dated measurements and superseded rules stay in the current body. On the measuring project (v1.1.2, design phase): | Document | 2026-09-24 | 2026-10-02 | |---|---|---| | `combat.md` | 11 989 lines | **13 029 lines, 1.7 MB (~450 K tokens)** | The project had *decided* a cleanup pass at approval on 2026-09-24; none ran, because no skill carries it. Cost: every agent and every review that touches the document pays for the history in it, and the document no longer fits in one context window. ## Proposed Solution ### What the skill does `/doc-condense ` — one design document (GDD, ADR, art bible), in a **fresh session**, on **its own branch**, in a lot **separate from the review that approved it**. Two gestures; everything removed is **moved, never deleted**. #### Gesture 1 — retire superseded blocks A block marked superseded/abrogated moves to an archive file next to the document (` -archive.md`, or the project's convention), with its date of supersession, what superseded it, and the date it left the body. The body keeps **one pointer line per family** of retired blocks. A block is retired only if **all three** hold: 1. the superseded statement no longer circulates anywhere — case- and accent-insensitive search over design docs, ADRs, art bible, registry and review logs; **the command, its scope and its result are quoted in the PR**; 2. the document is `Approved`; 3. the block has survived at least one full review since it was superseded (a block superseded *by* the approving review stays). Never retired: a block whose reasoning is reusable (the reasoning migrates into the current text first), a dated record (bench result, decision register, review log). #### Gesture 2 — condense | Removable from the body | Destination | |---|---| | Method, review or batch narrative (who found what, how) | the document's review log | | A decision copied in full (text, options, rationale) | one line citing its decision ID and register | | A dated measurement that is stale, or whose conclusion the rule already carries | archive or review log, verbatim | | Repetition across sections | one occurrence; the others become a pointer by section name | #### Untouchable — neither removed nor reworded - rules, formulas, values and tuning-knob ranges; acceptance criteria and their labels; - source/citation statuses; - the validity domain of a derived rule (condensing a sentence never drops its condition); - the document's incoming-debt header; - the `## Summary` section and its physical form (skills grep its first lines). #### The boundary **If an acceptance criterion would have to change, it is not a condensation.** Stop, report it, and leave the change to a review: condensing is a retouch, the document stays `Approved`. ### Proof the skill produces (in the PR body) - each moved passage with its named destination; - for each retired block: the gesture-1 search command, scope, result; - before/after: `wc -l`, the count of supersession markers; - the list of acceptance-criterion IDs (`grep -oE "AC-[A-Za-z0-9-]+" | sort -u`) — **identical before and after**, any difference explained by a block that went to the archive; - any repository reference to a moved passage updated in the same lot. ### Design notes - **One document per run; no batch mode.** A bulk end-of-phase cleanup removes what still protected something, and nobody notices. - **`model: opus`** in the skill frontmatter. Telling narrative from rule, and a reusable rationale from a dead one, is judgment; a wrong call silently drops a rule. - **Work by section.** Locate sections with `grep -n "^## "`, process one at a time, write after each — never load the whole document (on large documents it does not fit). - **Trigger**: suggested by `/design-review` (and the director gate) when a document reaches `Approved`; by `/help` when an `Approved` document exceeds a size threshold. - **No tool promises the check.** Deciding whether a sentence is narrative or rule requires reading it; the skill's guarantee is the proof list above, reviewed in the PR. ## Alternatives Considered - **Clean up during the approving review.** Rejected: mixes substance and form in one lot, and blocks superseded by that review have survived no review. - **One bulk pass over all documents at the end of a phase.** Rejected: that is how protective blocks get removed unnoticed. - **Retire superseded blocks only.** Rejected: on the measuring project, a document with 9 supersession marks was still 3 600 lines; the weight is narrative and copied decisions. - **Rewrite the document "clean".** Rejected: nothing then guarantees that no rule changed. ## Additional Context ### Prior art in the measuring project The rule this skill implements is the project's `DV-479` (2026-09-24), written into its `coding-standards.md` § *La passe de nettoyage d'un GDD à son approbation*. The three retirement conditions come from its retraction clause, adopted 2026-09-16 after one day of rework left 168 supersession marks in the art bible and 147 in the camera GDD.