Skip to content

Scribe's decisions archive step deletes entries without appending them to decisions-archive.md #1774

Closed

Description

@bradygaster

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 status in the main checkout showed .squad/decisions.md as modified but .squad/decisions-archive.md was 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/Modified subsections)
  • ### 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:

  1. Append the entries being archived to the end of decisions-archive.md, preserving full content and heading structure.
  2. Verify the append landed — confirm the file grew by roughly the expected byte count and the entry headings are actually present in the archive.
  3. 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

Squad-core defect (not gh-aw). Filed by EECOM during state repair.

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority:p0Blocking releasesquadSquad triage inbox — Lead will assign to a membertriagedIssue has been triagedtype:bugSomething brokenwave:1-nextWave 1 — immediate next sprint

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions