One-Way Doors
Part III: Your Own Hand
You are here if
You enter the other chapters of this manual on a symptom. You enter this one on a plan. Your hand is on an operation with force in its name, or with drop, abort, restore, or remove in its body: a worktree that is finished with its agent, a stash you are nearly sure is the right one, a merge gone wrong in one file, a directory that only probably holds nothing. Or the door swings outward: a repo about to go public for the first time, a history about to be pushed somewhere with its own memory, a report about to ship with error fields you did not write. Nothing is red. For every other failure class the signal arrives while there is still something to do; for this one it arrives only after the fix is impossible.
You are here if the next command destroys state or releases state. Deletion destroys what you have. Publication releases what you have. Neither can be walked back, and they feel nothing alike at the keyboard, which is why the second is more dangerous: deleting feels like risk, publishing feels like finishing.
You are in the wrong chapter if the operation is undoable and what worries you is how many places it touches: that is chapter 9. If a worker you dispatched is about to cross a door on your behalf, start at chapter 6; a delegate crosses with your authority and none of your dread. And if the door already closed and you are reading this in the wreckage, check the reflog and the object database before you despair; nearly everything in this manual's dossier was caught on the near side, so it teaches the approach far better than the recovery.
The mechanism
The operator's environment is built to make lateness cheap. Version control keeps every committed state, deploys roll back, configs revert, and the substrate trains one reflex: act, then check, because checking afterward is almost always possible and cheaper. The reflex is right in ten chapters out of eleven. This chapter is the list of places where it is wrong, and what they share is exact: a one-way door is an operation that destroys the conditions for its own verification. Deletion destroys the evidence: the thing you would inspect to confirm the loss was acceptable is the thing the command removes. Publication destroys the authority: nothing disappears, but the artifact now exists on machines you do not administer, in front of readers you cannot unshow it to. In both directions the check has exactly one chance to run, and it is before. Book One builds the verification loop on the premise that a finding can be reproduced against live state; these are the operations where that premise fails.
The type specimen. An isolated worktree held a finished agent's output: files written, nothing committed, the completion report already filed. Cleanup met a refusal: the tool declines to remove a worktree holding uncommitted changes. That refusal was the enumeration this chapter is about: a free list of exactly what stood on the other side of the door. Force is the flag that certifies the list was read. It was not read. The removal succeeded, and work that existed in one place stopped existing anywhere: no commit, no stash, no copy; the only inventory of those files was the tree the command deleted. The operation erased the work and the evidence of the work in the same motion, which is the signature of the whole class.
The outward-swinging door has the same structure with the sign flipped, and a wider far side. What becomes visible in a publish is not the working tree you just cleaned; it is every surface the artifact drags with it: commit history and its author metadata, PR bodies, the diff of a merged PR that the platform pins independently of your refs, so a force-push that launders the clone leaves the pinned diff untouched. Encodings can hide a path literal from the plain text search you ran to feel safe. Even a report's error fields are a surface when a parser builds exception messages from snippets of what it parsed. Reading the tree is not reading what will be visible.
One ledger entry appears to argue with the chapter that holds it. A wrongly dropped stash is, for a while, recoverable: the object database keeps the dropped commit until garbage collection takes it. But that recovery belongs only to the operator who already knew it existed and reached for it in time. A door that reopens only for someone who mapped the far side in advance is not a two-way door; it is a one-way door with a hidden hinge, and a hinge discovered after the fact is luck, not a plan. The exception sharpens the rule: enumeration before the act is the only version of safety that does not depend on already having been careful.
The discipline
Before any one-way door, enumerate what is on the other side: list what will be lost before deleting, and read what will be visible before publishing.
The ritual:
- Name the door and its direction. Loss, exposure, or both; a force-push to a shared remote is both. Pass: you can state the operation, the direction, and what the other side holds, without the word probably.
- For loss, enumerate by command, never by recall. Status including untracked files, the stash list with messages, the diff of everything unstaged. When a tool refuses and demands force, the refusal is a free enumeration: read what it refused over. Pass: the list came from output read this session, and no force flag predates the list.
- For loss, preserve first and verify the copy on bytes. Copy out, commit, or stash with a recognizable message, then read the copy back from where it landed. Pass: you opened the preserved artifact; a clean exit is not the check.
- For exposure, read what a stranger will read. Scan every tracked file for local paths, personal identifiers, and secrets with an escaping-tolerant search, confirm a license exists and matches the manifest, and read the commit messages and authorship that ship with the push. Pass: what you reviewed is the content that will be served, in its served encoding.
- For exposure, enumerate the surfaces that outlive your control. Pinned PR diffs, platform copies, caches, report fields built from exceptions. For a private-to-public flip, start a fresh repo from the clean tree rather than rewriting in place. Pass: every surface either answers to you or is already clean.
- Scope the command to the enumerated list. The restore names exact paths, the drop names the confirmed stash, the removal follows a verified copy; no wildcard decides what the operation touches. Pass: everything the command will touch is on your list, and nothing on the far side is a surprise.
The case ledger
[E045] Commit-metadata gate rejects a real personal email (undated) Receipt: a CI gate hard-rejected a real personal email as the commit author, and with force-push blocked, the fix required recreating the branch and PR. Rule: set a noreply identity before committing on any metadata-gated repo; recover bad authorship by recreating the branch and PR, not rewriting in place.
[E049] Merge abort reverts clean auto-merges too (undated) Receipt: aborting a merge to escape one conflicted file also reverted an unrelated file that had auto-merged cleanly, discarding good work. Rule: before aborting, save the cleanly auto-merged files first, or resolve the single conflict instead.
[E054] Stash is shared mutable state, not private scratch (undated) Receipt: the stash stack is shared mutable state across a repo's branches and worktrees, so dropping the wrong entry was a live risk. Rule: before any drop, list the stashes and confirm the target's message and commit match what was just created; the object-database recovery exists only for the operator who knew it before the drop.
[E058] Broad tree-restores discard deliberately unstaged work (undated) Receipt: a broad tree-restore discarded an uncommitted file deliberately excluded from staging, unrecoverable because it was never staged or stashed. Rule: list the paths actually modified and scope the restore to exactly those; prefer stash-and-pop over a broad checkout when unsure.
[E061] Force-removing a worktree destroys uncopied work (2026-06-13) Receipt: force-removing a finished agent's isolated workspace without first copying or merging its uncommitted files destroyed work that was never committed. Rule: copy or merge the agent's files into the main tree and verify they landed before force-removing the workspace.
[E096] Measure real consumers before deleting shared machinery (2026-07-03) Receipt: a proposed cut to shared coordination machinery targeted something load-bearing for a live cross-system sync, and a second was already de facto in place; both premises were wrong. Rule: before deleting shared machinery, measure real consumers with a live audit of writes and queries plus a code grep across every consuming system, distinguishing a reader from a mere producer.
[E124] A deploy helper ships the live working tree, not the committed ref (2026-06-28) Receipt: a deploy helper copies the live working tree, so a dirty or sibling-occupied tree shipped untracked in-progress work to production. Rule: export the committed files into a fresh temp directory and run the helper there, never against the live repo.
[E130] First public push needs a PII and license scan (undated) Receipt: a repo was about to go public with hardcoded local paths in a test fixture, a personal handle in a README link, and no license file at all. Rule: before any first public push, grep all tracked files for local paths and personal identifiers, and confirm a license file exists and matches the package manifest.
[E131] Public releases have two non-obvious scrub traps (2026-06-13) Receipt: force-pushing cleans local clone history but not a merged PR's diff, which the platform pins separately, and plain text search misses escaped path literals a file's own encoding hides. Rule: before any private-to-public flip, start a fresh repo from the clean tree rather than force-pushing an existing one, and run an escaping-tolerant PII audit, not a plain text search.
[E140] No personal identifiers in commits or PRs (undated) Receipt: personal identifiers in git history and PR text are effectively public and permanent, even from a private repo later exported or flipped public. Rule: write every commit message and PR body as if already public documentation, with generic placeholders for paths, names, and amounts.
[E141] Suppress the default co-author trailer (2026-05-17; preference line) Receipt: the harness's default commit template appends a co-author trailer the operator does not want in any commit. Rule: end every commit message at the last meaningful line, and never append the co-author trailer the template example shows.
[E142] No em dashes in prose (undated; preference line) Receipt: a standing style preference against em dashes in prose, which are also a known tell of machine-written text. Rule: draft without them from the start and scan for the character before presenting any deliverable.
[E145] Skill-pack installs can silently overwrite custom skills (2026-05-10) Receipt: installing a third-party skill pack via symlink silently overwrote same-named custom skill files, with no warning and no backup. Rule: back up the whole skills directory before any third-party install and diff against that backup afterward.
[E152] Parser exceptions can leak parsed content into reports (undated) Receipt: a parsing library builds exception messages from snippets of the content being parsed, so interpolating a raw exception into a report or API field can leak secrets from the scanned file. Rule: report-bound error fields carry only the exception's class and structural position, never its raw text, unless the output is operator-local only.
Adjacent doors
If every individual touch is undoable and what frightens you is the count, sixty repos, one script, one wrong assumption, you are holding a multiplied mistake, chapter 9's class, not a one-way door. The dividing question: could you walk back one instance? Yes is chapter 9; no is here. A batch of one-way doors takes both rituals, and the order is not free: build the full list first, run this chapter's enumeration on every item, and pilot only on what survives. A pilot is chapter 9's cheap-to-fail check, and a one-way door is where it stops being cheap, since piloting a publish on one item publishes one item; where the two meet, this enumeration outranks the count.
If the enumeration turned up something you did not put there, an untracked file that might be a peer's live output, a stash message you do not recognize, then you are not the tree's only writer, and nothing in it is only yours to drop. That is chapter 5, and its first move, yield, comes before any step printed above.
If a guard just refused the door, the deny rule on the force flag, the gate that rejected your commit author, then step 2 of the ritual has already run, performed by the one actor that read the far side when you did not. Arguing the guard down until the command goes through is chapter 8's failure class, and its rule holds doubly here: force is a certification that the list was read, and the guard exists because it usually was not.