arrow_back Back to Rules
rules Rule

Hybrid 3-File Integrity

Governs the 3-file task management system — backlog.md, sprint-current.md (Hot Lane), and done.md — with six constraints (C1–C6) ensuring safe task workflows.

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

ActionPermission
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.mddone.mdplans/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 /endNOT during coding. The sync process:

  1. Hot Lane Sync: [x] items → append to done.md
  2. [ ] items → ask user what to do
  3. Smart suggest from session log
  4. 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


→ Back to Rules Catalog