context · diff
git:20260625.1c5e807 to git:20260831.ed1879c
14 added, 49 removed. Audit A to A.
What this update changes in the checks
No check changed: every fixed check gives the same answer before and after this update.
A tripped check is a label, not a verdict: read the matched text and the lines below. This week's updates that newly trip a check.
---
name: context
- description: "Context window manager. Snapshots session state, compacts conversation, and resumes via hook. Use when context exceeds 70% or a large new task begins."
+ description: "Working-state snapshot guidance. Restates task/files/decisions in one block so state survives context compaction. Compaction timing is the host's job."
---
- # Context — Context Window Management
+ # Context — Working-State Snapshot
- ## When to Trigger
- - Context window > 70% capacity
- - Long conversation with many tool calls
- - Before starting a large new task in an existing session
- - User asks to "clean up" or "start fresh"
+ Compaction timing belongs to the host (native auto-compaction; the harness
+ already snapshots state on the PreCompact hook). This skill is about WHAT
+ survives, not WHEN to compact.
## Process
- ### 1. Assess
- - Estimate current context usage
- - Identify what's consuming the most context (large file reads, verbose outputs)
-
- ### 2. Preserve
- Before compacting, ensure critical state is saved:
- - Current task and progress → `$HARNESS_DIR/sessions/`
- - Key decisions made → note in conversation
- - Files being worked on → list explicitly
+ Before or during compaction, restate the working state in one block:
- ### 3. Compact
- Suggest or trigger compaction with a clear summary:
```
- Summary for compaction:
- Working on: [task description]
- - Files modified: [list]
- - Current status: [what's done, what remains]
- - Key decisions: [important choices made]
+ - Files modified: [explicit list]
+ - Status: [what's done, what remains]
+ - Key decisions: [important choices made, with why]
- Next step: [what to do after compaction]
```
- ### 4. Resume
- After compaction, the `resume` hook will reload:
- - Session snapshot from `$HARNESS_DIR/sessions/`
- - Project memory from `$HARNESS_DIR/memory/`
- - Evolved skills from `$HARNESS_DIR/evolved/`
-
- ## Anti-Rationalization
-
- | Excuse | Rebuttal | What to do instead |
- |--------|----------|-------------------|
- | "I still have context left" | Quality degrades well before the hard limit. 70% is the trigger. | Compact proactively. Better to lose 5 min than lose coherence. |
- | "Compacting will lose important context" | That's why you preserve first. The resume hook restores it. | Save state → compact → resume loads snapshot + memory + skills. |
- | "I'll just re-read the files" | Re-reading 5 large files wastes 30%+ of your fresh context. | Summarize key facts before compacting. Read only what you need after. |
+ Keep it terse — this block is what you (and the `resume` hook) reload after
+ compaction. Re-reading large files afterwards costs more than summarizing the
+ key facts beforehand.
## Evidence Required
- Before compacting, confirm ALL of these:
-
- - [ ] Current task and progress noted in summary
- - [ ] Files being worked on listed explicitly
- - [ ] Key decisions recorded (not just "some decisions were made")
- - [ ] Next step specified clearly
- - [ ] Snapshot written to `$HARNESS_DIR/sessions/` (show file name)
-
- **Compacting without a summary = guaranteed context loss.**
-
- ## Red Flags
- - Continuing with 90%+ context without compacting (quality degrades)
- - Compacting without saving state (lose track of progress)
- - Re-reading large files after compaction (defeats the purpose)
+ - [ ] Task, files, decisions, and next step all present in the summary block
+ - [ ] Snapshot written by the PreCompact hook (show file name if asked)