Hybrid 3-File Integrity
This rule governs the 3-file task management system: backlog.md (source of truth), sprint-current.md (Hot Lane buffer), and done.md (append-only archive). Six constraints (C1–C6) ensure the agent cannot accidentally break task workflows.
C1: sprint-current.md — Hot Lane
| Action | Permission |
|---|---|
Add quick task (- [ ] description) | ✅ Allowed |
Add - [ ] BEFORE starting code | ✅ Required (log-first) |
Mark [x] when done | ✅ Allowed |
Add notes to ## Notes | ✅ Allowed |
| Copy strategic tasks from backlog | ❌ Forbidden |
| Edit descriptions/priorities of existing items | ❌ Forbidden |
C2: done.md — APPEND-ONLY
New entries added ONLY through /end (Hot Lane Sync) or /backlog clean. Entries are grouped by plan with origin tags: #backlog (strategic) or #session (hot lane).
Existing entries MUST NOT be modified or deleted.
C3: backlog.md — OPERATIONAL AUTHORITY
The single source of truth for all tasks. All structural mutations (add, remove, re-prioritize) MUST go through /backlog.
Lookup chain: backlog.md → done.md → plans/done/
C4: Plan-Backlog Sync
MANDATORY after /plan create. Agent MUST suggest /backlog sync to map plan phases to backlog items. Without this step, /plan review cannot measure progress by phase.
C5: /end — SOLE Sync Point
All task reconciliation happens at /end — NOT during coding. The sync process:
- Hot Lane Sync:
[x]items → append todone.md [ ]items → ask user what to do- Smart suggest from session log
- Clean
sprint-current.md
C6: File Guard Headers
Task files SHOULD include inline guard comments. Agent MUST read and obey these before editing:
<!-- ⚠️ APPEND-ONLY: Write via /end or /backlog clean only (C2) -->
<!-- ⚠️ HOT LANE ONLY: No strategic tasks from backlog (C1) -->
Guards act as a last-resort defense when agent has lost rule context post-truncation. This is Layer 4 of the Defense-in-Depth architecture.
References
- Hybrid 3-File Architecture — Full architecture guide
- Defense-in-Depth — File Guard Headers (Layer 4)
- Artifact Standard — Artifact directory conventions