---
name: ignoring-a-directory-buries-what-the-repo-cites-in-it
description: "Before adding a .gitignore line for a scratch directory, census what the REPO CITES inside it — a blanket ignore does not untrack tracked files, and an ACTIONABLE line naming a path is worse than a citation when the path moves"
metadata: 
  node_type: memory
  type: feedback
  originSessionId: 9a42c7a1-71f1-47b6-8341-adf7b3dbae7d
  modified: 2026-09-09T14:47:19.560Z
---

**Built 2026-09-09 as the `.spt/` ignore lane (PR #212, doyle ruling and reading).** `.spt/` was
agent scratch — 152 entries, 277 MiB — that nothing ignored, so `git add -A` at the root staged all
of it. Adding `.spt/` to `.gitignore` looks like a one-line change. It is not. Four things the
one-line reading misses, each measured:

1. **A blanket directory ignore does NOT untrack a tracked file.** Two files under `.spt/` were
   tracked (added deliberately as a lane's record). The ignore line leaves them tracked and still
   reporting edits in `git status`, so the lane ships believing the directory is sealed. Find them
   with `git ls-files <dir>` — **not** with `git check-ignore` on the directory, which answers a
   different question. Fix by RELOCATING (`git mv`) to a real home, not `git rm --cached` (that
   deletes them from the repo for everyone) and not negation patterns (a multi-line
   `!`-after-directory-ignore set reads as working while quietly not).

2. **Census what the repo CITES in the directory before burying it.** `grep -roh '\.spt/[^ ]*' docs/`
   found the register and ledger pointing INTO the scratch dir. One of them was
   `.spt/launch-battery.py`, whose own docstring read *"Rebuilt … after the original was lost with a
   `.spt/` sweep"* — a file the register cites that had ALREADY been destroyed once by exactly the
   condition an ignore line institutionalizes, and rebuilt at cost. **The ignore line is the
   mechanism of the next loss.** Move out everything the repo names, then add the line.

3. **A path can be cited by CATEGORY, where a path grep cannot see it.** The register said *"the ENV
   face's fix is a tool in `.spt/`, not product code"* — naming the DIRECTORY, with no file path for
   a grep to match, and the move made the sentence false. After relocating anything, grep for the
   bare DIRECTORY name too, not just full paths.

4. **An ACTIONABLE line that names a path is worse than a citation when it goes stale** (doyle's
   phrasing, and the class this lane exists to end). The relocated patch carried
   `# Restore with: git apply .spt/preserved/pump-on-one-box-rig.patch` — an instruction naming its
   own former location, wrong the instant it moved. A stale citation misleads a reader; a stale
   instruction gets RUN. Grep moved files for self-references (usage blocks, restore lines,
   `python <path>`) — the file's own body is the last place anyone looks.

**Also ruled, and general:** an ignore comment must carry a **RULE AND A COUNT, never a list**. The
first draft enumerated the four remaining machine-bound evidence paths; that list was already stale,
because a PR landing the same day added two more. Enumerations in an ignore comment decay every time
the register gains a finding.

**How to apply — the lane's own proof obligations, worth reusing:** hash every moved file before and
after and assert identity; for tracked files verify a PURE RENAME at the BLOB layer
(`git rev-parse HEAD:<old>` == `git rev-parse :<new>`), because a working-copy hash is not a blob
hash and CRLF-normalized files read wc≠blob for reasons that are not a defect
([[compare-at-one-layer-crlf-meter-class]]); then `git status --short` showing zero `?? <dir>/` rows
with the moved files tracked. **And check what auto-recruits at the DESTINATION**: `.github/bench/`
holds a test that discovers ledger writers by `read_dir` — "a new one joins the gate by existing" —
so a file moved there can join a gate by location alone. Both of mine were clear, but by
measurement, not by assumption.

Kin: [[check-ignore-on-a-bare-directory-is-not-a-probe]] (the ignore-STATE trap; this is the
ignore-CONSEQUENCE trap), [[git-status-cannot-see-gitignored-records]],
[[preservation-is-its-own-step-before-any-reap-broadcast]],
[[a-launch-time-spot-read-is-not-the-instruments-first-sample]].
