Tighten root/core control flow, add dedicated post-mortem, web, and context-hygiene capabilities, and reduce instruction drift through clearer ownership, conflict-priority handling, and README/docs workflow alignment. This makes long-session AI behavior more deterministic while keeping the instruction system compact and maintainable.
49 lines
1.6 KiB
Markdown
49 lines
1.6 KiB
Markdown
---
|
|
name: context-hygiene
|
|
description: Keep long sessions focused by summarizing stale branches and preserving the active objective path. Use when conversation context gets noisy, branches pile up, or user asks to refocus.
|
|
category: workflow
|
|
impact: medium
|
|
---
|
|
|
|
# Context Hygiene Instructions
|
|
|
|
## 🎯 Purpose
|
|
Reduce context drift and cognitive noise in long sessions without weakening mandatory safety and refresh constraints.
|
|
|
|
## 🚨 Prohibitions (Thou Shalt Not)
|
|
- **NEVER skip mandatory preflight refresh** (`root-skill`, `core-principles`, `skill-list`).
|
|
- **NEVER drop the active main task or return point.**
|
|
- **NEVER prune context by hiding unresolved decisions.**
|
|
- **NEVER use context cleanup as a shortcut to ignore required skills.**
|
|
|
|
## Workflows
|
|
|
|
1. **Detect Context Noise**
|
|
- Trigger when `>= 3` parked branches exist or user requests refocus.
|
|
- Identify which branches are active vs stale.
|
|
|
|
2. **Create Compact Continuity Snapshot**
|
|
- Keep four items visible:
|
|
- Main task
|
|
- Current sub-task
|
|
- Prerequisite reason
|
|
- Return point
|
|
|
|
3. **Park Stale Branches**
|
|
- Summarize stale branches in 1-2 lines each under a backlog/parking note.
|
|
- Keep unresolved decisions explicit.
|
|
|
|
4. **Resume Active Path**
|
|
- Continue only with skills relevant to the active path.
|
|
- If branch relevance is unclear, ask one clarifying question (`grill-me` protocol).
|
|
|
|
## ✅ / ❌ Examples
|
|
|
|
```text
|
|
// ❌ FORBIDDEN
|
|
Dropping older branches silently and continuing with a new direction.
|
|
|
|
// ✅ REQUIRED
|
|
Main task and return point preserved; side branches summarized in parking lot; active path resumed.
|
|
```
|