context-rot-management
Skill0 starsChanged 57 days agoApache-2.0View on GitHub
Use during Standard-tier tasks with more than 5 implementation units, or when the context window is approaching compaction, or when resuming after /clear or an auto-compaction. A 3-layer durable-redundancy protocol (BACKLOG snapshot + task cursor + git log) that makes context loss a non-event with zero single point of failure. NOT auto-activated for small Standard tasks — a 1M-context model handles those natively.
- Commits and pushes
In this repository23 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .claude/CLAUDE.mdCLAUDE.md
- llms.txtllms.txt
- architect-reviewSkill
- brainstormingSkill
- clean-codeSkill
- close-gold-gapSkill
- codebase-auditSkill
- configureSkill
- epic-decomposeSkill
- gold-auditSkill
- impactSkill
- levelupSkill
- product-acceptanceSkill
- refutationSkill
- senior-surveySkill
- ssot-navigationSkill
- tabletopSkill
- tddSkill
- understand-codeSkill
- verificationSkill
- visual-verificationSkill
- wave-drainSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 5 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 61
When the activation condition is met, immediately after GO (before the first implementation unit):
- Very specific: line 63
Create .arbiter/evidence/<task-id>/BACKLOG.md from the template below.
- Distinctive: line 65
Add the first phase section (files listed, not yet started).
- Distinctive: line 109
Run all three at every phase boundary (finishing phase N, starting N+1):
- Very specific: line 130
No manual cleanup. The BACKLOG stays under .arbiter/evidence/<task-id>/ (retained per the evidence-class policy).
- Distinctive: line 139
Write decisions only in commit messages — not recoverable from task state.
- Distinctive: line 140
Use the BACKLOG as a to-do list — it is a state snapshot, not a backlog.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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
Context-Rot Management (3-layer durable redundancy)
Authority: Proven on a long multi-phase task (100+ specs, 5 phases, one mid-task compaction, zero re-work). Trigger: Deterministic heuristic (see When this applies). Enforcement: MANDATORY once activated — skipping a checkpoint requires an explicit human override.
Context compaction destroys in-memory state. This skill keeps three independent durable records of the task, any one of which can fully recover it. CLI-first by design (ADR-020): the checkpoint layer is arbiter lifecycle checkpoint, not an MCP call, so it works in any governed project with no MCP dependency.
When this applies
Activation condition:
Tier = Standard AND (implementation_units > 5 OR user requests explicitly)A 1M-context model handles compaction for most Standard tasks natively, so auto-activating every task only adds BACKLOG overhead with no benefit when units are few.
Evaluated at: end of the /ship plan phase, after GO, once the implementation-unit count is known.
| Scenario | Tier | Units | Result |
| A | Standard | > 5 | ACTIVATE |
| B | Standard | ≤ 5 | SKIP — small task, handled natively |
| C | Standard | any | ACTIVATE on explicit user request |
| D | S | any | SKIP — tier below Standard |
| E | XS | any | SKIP — tier below Standard |
The 3 layers
| Layer | Artifact | Survives | How to access |
| 1. BACKLOG | .arbiter/evidence/<task-id>/BACKLOG.md | git push | Read tool |
| 2. Task cursor | arbiter lifecycle checkpoint (last / next / digest in task state) | /clear, recompute | arbiter lifecycle get |
| 3. Git log | phase-boundary commits | git history | git log --oneline |
Any single layer failing → the other two still recover the task. Zero single point of failure. (pre-compact.mjs additionally re-grounds the model immediately after a compaction by printing branch / task / phase to stdout.)
Initialization
When the activation condition is met, immediately after GO (before the first implementation unit):
- Create
.arbiter/evidence/<task-id>/BACKLOG.mdfrom the template below. - Populate the header from the plan's Context Block.
- Add the first phase section (files listed, not yet started).
<task-id> is the sanitized issue id (e.g. 1440), matching the arbiter evidence convention.
BACKLOG.md template
# Task BACKLOG — #<ISSUE> <title>
**Branch:** task/#<ISSUE>-<slug>
**Tier:** Standard
**Activated:** context-rot-management (units > 5)
**Last updated:** <date>
---
## Phase <N>/<M> — <phase-name>
**Status:** [IN PROGRESS | DONE | BLOCKED]
### Files done (<count>/<total>)
- `path/to/file.ext` — <one-line summary>
### Files remaining (<count>)
- `path/to/file.ext` — <what remains>
### Decisions
- **<decision>:** <what> — Why: <rationale> — Ref: <INV-NN / ADR-NNN / file:line>
### Issues
- [OPEN] <blocker or risk>
- [RESOLVED] <past blocker — kept for recovery context>Append a new section per phase. Never delete old phase sections — they are the recovery context.
Phase-transition checklist
Run all three at every phase boundary (finishing phase N, starting N+1):
- Update BACKLOG — add the new phase section (status of the completed phase, files done/remaining, decisions, issues).
- Pin the cursor —
arbiter lifecycle checkpoint --last "<what was just done>" --next "<exact next action>" --digest "<one line>". This is the searchable, CLI-native checkpoint; it survives/clear. - Commit — one logical unit per the exec-protocol commit strategy; the message names the phase completed and what's next.
Recovery after compaction
Execute in order; stop once state is fully recovered.
- Read
.arbiter/evidence/<task-id>/BACKLOG.md— current phase, files done/remaining, open decisions, open issues. - Read the cursor —
arbiter lifecycle get(last / next / digest pinned byarbiter lifecycle checkpoint); recovers any decision not yet written to BACKLOG. - Verify against git —
git log --oneline; confirm phase commits are present and resolve any discrepancy with the BACKLOG. - Resume — continue from the last checkpoint. Re-read only the files listed under "remaining". Do NOT re-read the generic SSOT docs (AGENTS.md, ADRs) unless a specific invariant is in question — that is context bloat, not recovery.
Cleanup
No manual cleanup. The BACKLOG stays under .arbiter/evidence/<task-id>/ (retained per the evidence-class policy); the cursor lives in task state; commits are permanent.
Anti-patterns
Never:
- Skip a phase checkpoint ("I'll do it at the end") — defeats the purpose; checkpoints must survive a mid-task compaction.
- Write decisions only in commit messages — not recoverable from task state.
- Use the BACKLOG as a to-do list — it is a state snapshot, not a backlog.
- Overwrite an old phase section — append only; old sections are recovery context.
- Re-read the full SSOT set on resume — re-read only "remaining" files.
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.

