trim-cot-leakage
Skill2 starsChanged 29 days agoMITView on GitHub
Use when auditing or fixing prose that reads like a leaked reasoning transcript, such as dead design-session citations ("decision 7", audit item codes, section numbers of uncommitted drafts), change narration ("used to", "no longer", "this cut"), pull-request or review vantage ("a later PR in this stack", "rejected in review"), reviewer-addressed justifications, control-flow narration, or hedged planning residue in comments, API docs, documentation, or Agent Notes.
In this repository17 other files it gives its agents.
- agent-experienceSkill
- agent-notesSkill
- code-reviewSkill
- docs-standardSkill
- error-handlingSkill
- find-simplificationsSkill
- lifecycle-reviewSkill
- perf-evidenceSkill
- pre-push-checksSkill
- prose-standardSkill
- record-browser-gifSkill
- responsive-uiSkill
- stacked-prsSkill
- test-reliabilitySkill
- ui-ux-reviewSkill
- upgrade-guideSkill
- vibe-harness-bootstrapSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 44
Before deleting anything, enumerate the passage's propositions and check the overcorrection traps: trims that flip an obligation into an …
- Very specific: line 45
Verify: re-run the batteries expecting only sanctioned keeps and this skill's own directory.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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 no facts (an audit code, control-flow narration) is deleted outright. prose-standard owns the complete-proposition rule this skill applies. This 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, pull request thread, or uncommitted draft, resolve every reference and verify every claim? If not, restate the surviving facts from the repository's vantage and delete the rest. If yes, it is not leakage, however historical it sounds; but on current-state surfaces (READMEs, docs, API docs) 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), "the design ledger". 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 pull-request 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 repository history.
- Review choreography: "Rejected in review:", "the reviewer confirmed", draft ordinals ("v5 of this note"). 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…". 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: fragments of the author's working language in prose whose language is otherwise different, or session separators. Translate or delete.
What is not leakage
Unaided passes fail in both directions, deleting durable references and keeping dead ones. Apply these keep rules; the examples calibrate each.
- Issue references (
#1470,TODO(name):, "issue #N owns the follow-up") resolve at HEAD; keep them on any surface, including READMEs. Do not delete them or relocate them to Agent Notes; what Agent Notes and postmortems additionally sanction is citing merged pull requests. - Merged pull request and issue citations inside Agent Notes and postmortems are sanctioned evidence.
- Suppression justifications (lint-disable reasons, coverage-ignore reasons, empty-catch explanations) are required prose; fix a false reason, never delete it.
- Counterfactual-present regression pins: "without X, Y happens", "a naive X would…".
- Measured bounds: "(measured: 512 nests ≈ 0.15 s)"; the word "measured" is load-bearing.
- Runtime old/new states: "the old connection drains before the new one accepts" is lifecycle, not change history.
- Historical stage names inside an Agent Note's change-story sections: "the first cut shipped X" is safe there; indexical stamps ("this cut") are banned everywhere.
- External references that resolve outside the repository by design: standards sections (RFC 9110 §10.1.5), design-tool frame names.
- Project voice and genre forms: "we" as project voice; an Agent Note's Alternatives considered section.
Workflow
- Scope and exclusions follow prose-standard: require an explicit scope; never touch vendored code or
.agents/notes/archived/. Recorded fixtures and snapshots are derivatives: change the owning source and regenerate them only when an authorized behavior change requires it. - Audit read-only first. Run the recall batteries, calibrating each probe against a known positive and a near-miss negative before trusting its output, then judge every hit semantically. The batteries are probes, not the definition: also read the densest prose in scope (module docs, READMEs, Agent Notes) without a pattern in hand.
- Fix owner-first per surface: generated catalogs trace every consumer and fix the source or generator, then regenerate; translated prose updates the counterpart minimally; model- or user-visible strings change only with owning behavior evidence, otherwise leave them unchanged and report the deferral.
- Before deleting anything, enumerate the passage's propositions and check the overcorrection traps: trims that flip an obligation into an endorsement, promote a hypothetical to a shipped feature, delete a true fact, or drop the evidence source.
- Verify: re-run the batteries expecting only sanctioned keeps and this skill's own directory; confirm every remaining citation resolves at HEAD; run the profile's
commands.docs-checkfor touched documentation.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

