dsh-trim-cot-leakage
Trimming Chain-of-Thought Leakage
Chain-of-thought leakage is prose whose vantage is the authoring session rather than the repository: it cites artifacts only that session could see, narrates the change instead of the state, or argues with a reviewer who has left. The fix is never deletion alone when a passage carries factual clauses — restate each so it stands at HEAD, then delete the transcript around it; a passage carrying none (an audit code, control-flow narration) is deleted outright. REQUIRED BACKGROUND: dsh-prose-standard owns the complete-proposition rule this skill applies; the committed-artifact-citations note owns the citation rule's rationale. It is guidance, not a script.
The one test
For every suspect passage ask: could a reader at HEAD, with no access to any session transcript, PR thread, or uncommitted draft, resolve every reference and verify every claim? If no, restate the surviving facts from the repository's vantage and delete the rest. If yes, it is not leakage, however historical it sounds — but resolvability only clears this skill's bar: on current-state surfaces (READMEs, docs, JSDoc) a resolvable change story is still change narration, and class 3 routes it to its sanctioned home.
Taxonomy
- Dead design-session citations —
(decision 7),(audit C2),design §4.7,plan §1.4, phase labels (T4,W3,P-I), "the design ledger", "(B ruling)". If the decision has a committed owner, cite it by name and path; otherwise delete the citation and restate its factual clause to stand alone. - Stack and PR vantage — "a later PR in this stack", "this PR adds", "the previous commit". State the shipped mechanism or the extension point; deferred work moves to a
TODOmarker or an issue reference. - Change narration and version stamps — "used to", "no longer", "the old X", and indexical stamps ("v1", "this cut", "today", "now" contrasting with a past state). State the present behavior; a fixed regression becomes a present-tense counterfactual ("without X, Y happens"), never repo history ("used to Y").
- Review choreography — "Rejected in review:", "the reviewer confirmed", draft ordinals ("v5 of this note"), round attributions. Keep the surviving decision and rationale as plain fact; delete who said it when.
- Reviewer-addressed justification — "the cast is safe — it simply…", "this is correct because…". A comment arguing its own correctness addresses a reviewer, not a maintainer. State the invariant that makes the code safe, or delete the comment if the code shows it.
- Restatement and derivation transcripts — control-flow narration ("first we X, then we Y"), test walkthroughs, proofs of obvious branches. Delete; keep only a non-obvious contract or invariant.
- Hedges and planning residue — "probably fine for now", "should be enough", deferrals with no marker. Promote to
TODO/FIXMEor restate as the actual bound; delete the hedge. - Authoring-language slips — untranslated working-language fragments (端, 设计稿,
---- 私有 ----separators) in prose whose language is otherwise English, or the reverse in a zh counterpart. Translate or delete.