Repository navigation
Description
Summary
Scribe's decisions.md archiving step performs the delete half of an archive operation without performing the append half. Entries are trimmed out of .squad/decisions.md but never written to .squad/decisions-archive.md, silently destroying team decision history.
This was caught during a state-repair after a Scribe spawn was given a TEAM_ROOT in the main checkout (C:\src\squad\.squad) while its working directory was in a worktree. Scribe wrote state to the main checkout and ran its archive step there.
Observed evidence
.squad/decisions.md: 51,819 → 44,451 bytes (−7,368 bytes) — three entries removed..squad/decisions-archive.md: unchanged at 373,823 bytes — byte-identical in both the main checkout and the worktree.git statusin the main checkout showed.squad/decisions.mdas modified but.squad/decisions-archive.mdwas NOT modified, proving the append never happened.- Scribe self-reported archiving "3 entries, 7.4KB archive" — matching the ~7.4KB deleted from
decisions.md— but only the delete was actually performed. The self-report describes the intended append that never landed.
Entries lost (from decisions.md, no archive copy existed)
### 2026-07-29: Workflow templates linted via explicit actionlint file paths### 2026-07-27: Dispatch Enforcement — Stop Coordinator From Doing Domain Work Inline(with its## Decision,### Layer A/B/C v2,## Empirical Evidence,## Known Limitations,## Override Path,## Files Added/Modifiedsubsections)### 2026-03-26: Copilot git safety rules
The intact worktree copy was used as the recovery source; the damaged main-checkout decisions.md was git restored back to 51,819 bytes with all three entries present.
This is recurring, not a one-off
### 2026-03-26: Copilot git safety rules is the same record that PR #1773 recently rescued. It has now been endangered a second time by the same archive-without-append defect. This is a recurring data-loss pattern in the archive path, not an isolated incident.
Recommended fix
Make the archive step append-then-verify-then-trim, in this strict order:
- Append the entries being archived to the end of
decisions-archive.md, preserving full content and heading structure. - Verify the append landed — confirm the file grew by roughly the expected byte count and the entry headings are actually present in the archive.
- Only then trim those entries from
decisions.md.
If the append cannot be verified, skip the trim entirely and leave decisions.md intact. Never delete a decision entry that is not provably present in the archive first — losing decision history is far worse than leaving decisions.md over the size gate.
Related
- Scribe splices inbox H2 headings under H3 entries, breaking hierarchy #1760 — Scribe splices inbox H2 headings under H3 entries (separate Scribe/decisions-merge defect, also Squad-core).
- docs(decisions): rescue two orphaned decision records and drain the inbox #1773 — previously rescued the
2026-03-26: Copilot git safety rulesrecord that this defect re-endangered.
Squad-core defect (not gh-aw). Filed by EECOM during state repair.
Activity
test(squad): reword archival fixture to clear the unsafe-git gate
fix(squad): stop `squad nap` from destroying decision history
fix(squad): make archival incapable of destroying state
fix(squad): make archival CRLF-safe and its entry split lossless
test(squad): reword archival fixture to clear the unsafe-git gate
fix(squad): stop `squad nap` from destroying decision history
fix(squad): make Scribe archival incapable of destroying state (githu…