Status: ACCEPTED — PM-approved 2026-06-27. The operational rule has been in force via the CLAUDE.md ⚠️ HARD RULE callout since 2026-06-21 (6d1292d09); this ADR is the formal decision record + rationale for the archive.
Date: 2026-06-27
Author: CIO (Chief Innovation Officer)
Deciders: PM (xian) — flagged the incident, named the rule, approved formalizing as ADR; Comms — raised the incident + drafted the proposed rules; CIO — codified in CLAUDE.md + authored this ADR. Architect — cc (ADR-surface owner).
Supersedes / superseded by: none
Related: CLAUDE.md “HARD RULE (data-loss prevention)” callout (6d1292d09); docs/internal/operations/branch-worktree-mailbox-discipline.md; #1259 push-to-ref (mailbox writes never touch the shared checkout); methodology-41 (mechanism-displaces-unreferenced-discipline)
The main checkout (/Users/xian/Development/piper-morgan/piper-morgan-product/) is PM’s live workspace. PM edits prose there (blog drafts, docs) and saves without committing in real time — so at any moment the working tree may hold unstaged work that exists nowhere else.
Twice on 2026-06-21, a Comms duty-cycle commit ran git checkout -- . in the main checkout to clear MANIFEST noise before a rebase. The pattern: push a log entry → rebase fails (“unstaged changes”) → git checkout -- . to clear → rebase succeeds → PM’s voice-pass edits silently gone, no recovery path. git checkout -- . (and reset --hard, stash) discard unstaged working-tree changes irreversibly.
PM’s principle, verbatim: “You fix your mistakes directly and not with sweeping careless irreversible steps.” The working model: the main checkout is PM’s; agents work in their own worktrees; the two must not collide.
This is a methodology-41 case — the discipline (“be careful in the main checkout”) was failing as a per-agent reminder; it had to become a structural mechanism.
Four hard rules for all agents (a standing constraint, not a per-agent reminder):
git checkout -- . / git checkout -- <broad-path> / git reset --hard / git stash(/-u) / any command that discards working-tree changes in the main checkout. The main checkout working tree is PM’s workspace, not an agent’s scratch space.git push origin HEAD:main), never from the main checkout.git checkout -- mailboxes/{role}/inbox/MANIFEST.md), never git checkout -- mailboxes/ or broader.origin/main via commit-tree→push with no working-tree operation on the shared checkout at all — structurally removing the situation that triggered the incident;check-branch.sh PreToolUse hook blocks interactive mailbox commits from non-main branches.cp into the main checkout — e.g. deploying a launchd-run script (scripts/duty-cycle-freeze-check.sh) so the watcher picks it up — is allowed: it’s a file copy of a non-PM-authored file, not a destructive git op, and it touches no prose. Verify the target file is clean (no uncommitted changes) before copying. The rule governs destructive git, not all main-checkout file access.The rule is already load-bearing via CLAUDE.md; this ADR adds the formal decision record — the incident, the principle, the deciders, and the structural-enforcement rationale — so the why survives in the architecture archive rather than only as an operational callout. (Comms + CIO both assessed CLAUDE.md as the compliance-load-bearing copy; PM approved capturing the provenance here.)