# Watchtower Contracts

Shared contracts for all watchtower components. Every ring, hook, and
skill that reads or writes watchtower state files must follow these.

## Atomic Writes

All shared files use temp+rename. No exceptions. Write to a `.tmp`
sibling, then `fs.renameSync()`. This prevents partial reads when a
ring is writing while a SessionStart hook is reading.

```javascript
const tmp = filePath + '.tmp';
fs.writeFileSync(tmp, content);
fs.renameSync(tmp, filePath);
```

## No-Index Convention

The inbox queue uses directory listing, not an index file. To list
pending items, read `queue/items/`, open each `.json`, filter by
status. No manifest, no index.json.

Rationale: one fewer file to keep consistent. Directory listing is
O(n) but n is small (inbox items rarely exceed 50 items). If
listing exceeds 2 seconds or 500 items, revisit via `act:2b638b02`.

## Schema Versioning

Every JSON file carries `schema_version`. Readers guard on version
and emit clear errors on unrecognized versions. Never silent wrong
behavior — if a reader sees `schema_version: 2` and only understands
`1`, it must fail loudly, not silently misparse.

```javascript
if (item.schema_version !== 1) {
  throw new Error(`Unsupported schema version ${item.schema_version} in ${filePath}`);
}
```

## Session-ID Join Key

Session IDs are the join key across queue items (via `transcript_ref`),
messages (Plan 8), and Ring 3 cursors (Plan 7). This is a load-bearing
assumption documented here so that if session IDs prove to be the wrong
unit (e.g., Claude Code changes ID semantics), the migration scope is
known: queue items, messages, and cursors all need updating.

Validate when Ring 3 first writes real data.

## Summary Hard Cap

`state/summary.md` must not exceed 30 lines. This is the SessionStart
injection payload — it competes with other context for the model's
attention window. If content exceeds 30 lines, truncation order:

1. Drop Health section detail (keep one-line summary)
2. Drop Portfolio Pulse detail for quiet projects
3. Never truncate "What Needs Attention" or "Where You Left Off"

## Project State Section Ownership

`state/projects/<slug>.md` is written by two rings. Every section has
exactly ONE owner; a ring must never rebuild a section the other ring
owns. The merge that enforces this is `preserveRing3LastSession()` in
`watchtower-lib.mjs`, applied by Ring 1 before each per-project write.

| Section              | Owner  | Notes                                  |
|----------------------|--------|----------------------------------------|
| `# <name>` header    | Ring 1 | Timestamp refreshed every run          |
| `## Active Plans`    | Ring 1 | Rebuilt from pib-db every run          |
| `## Last Session`    | Ring 3 | Once authored — see below              |
| `## Standing Issues` | Ring 1 | Rebuilt every run                      |
| `## Tech Stack`      | Ring 1 | Rebuilt every run                      |

Ring 3's sessionSummary writes the rich Last Session summary with an
`_<date> (<session-id>)_` attribution line directly under the header.
That attribution line IS the ownership marker: until Ring 3 has authored
the section, Ring 1 writes its own ephemeral fallback ("Active: …" /
last-commit line) and rebuilds it freely; once the marker is present,
Ring 1 must carry the existing section forward verbatim. Without this,
Ring 1's full-file rebuild deterministically clobbers Ring 3's summary
within one cron tick (~5 minutes). Rebuild writes must go through
`writeProjectStatePreservingRing3()` in `watchtower-lib.mjs` (re-read
verify with retry), never a raw read→merge→write — the raw form has a
read-then-write race that drops a Last Session Ring 3 authors mid-merge.

The inline `## Last Session` block holds the COMPLETE session bullet set
— byte-identical to the bullets in the per-session record at
`state/projects/<slug>/sessions/<date>-<session-id>.md`. It is NOT a
pointer, a digest, or a truncated subset. Both bodies derive from the
ONE model bullet string via `buildLastSessionBlock()`, and Ring 3 writes
the inline block UNCONDITIONALLY — creating `<slug>.md` if it does not
yet exist — so the inline section is never silently skipped (the prior
`existsSync` gate dropped it on fresh projects, leaving readers to render
Ring 1's truncated one-line fallback while the per-session file held the
full set; act:ac119994). `upsertLastSessionSection()` performs the
in-place splice/append with the same line-anchored header search
`preserveRing3LastSession()` reads with — one splice convention, not two.

### Thread File Durability (disk wins over model)

`state/threads/<slug>.json` carries the sibling rule: **disk wins over
model**. If the thread file exists, Ring 3 ALWAYS appends to
`cursor_history` — the LLM's `is_new` field is advisory naming metadata
only, never an authorization to fresh-write over an existing file. One
hallucinated `is_new: true` must not wipe an append-only history. The
canonical implementation is `updateThreadFile()` in `watchtower-lib.mjs`.

Corrupt thread files are never silently replaced: the corrupt file is
backed up aside as `<slug>.json.corrupt-<ts>`, a fresh file is written,
and the recovery is logged loudly. Per-thread writes are isolated — one
bad thread file must not abort writes for the remaining threads.

**Earned, bounded membership (act:e8793574).** A single session close writes
at most `MAX_THREADS_PER_SESSION` (5) threads, and each membership must carry
a DISTINCT contribution. `selectEarnedThreads()` (in `watchtower-ring3-close.mjs`)
enforces this in code, not just in the prompt: a blank/one-word contribution
is dropped, a contribution that restates an already-accepted one (spray) is
dropped, and the accepted set is capped. Overlap is healthy — a session
genuinely advancing several zoom levels earns each — but a focused session
can no longer be sprayed across 6-9 threads on loose topical match.

**Relationship fields (act:e8793574, additive at `schema_version: 2`).** Two
optional union-deduped arrays let a cold session trace a thread:

- `related_fids` — pib-db work-item fids (`act:<8hex>`) the sessions that
  advanced this thread referenced. Populated DETERMINISTICALLY by
  `extractRelatedFids()` scanning the transcript — never model-authored, so no
  hallucinated fid can enter. Unioned across sessions on disk.
- `lineage` — sibling threads CO-ADVANCED in the same session (the only thread
  relation cheap enough to assert as ground truth: co-occurrence in one
  capture). Entry shape `{ slug, relation: "co-occurrence", session_id, date }`,
  deduped by `slug`. Empty when the session earned only one thread.

Both default to `[]` when the 7th `updateThreadFile()` argument is omitted, so
older callers and the corrupt/create paths are unchanged.

**No silent success on systemic API failure (act:e8793574).** When the
Anthropic API rejects every call for an account-level reason (billing
exhausted, bad key, quota), every knowledge-extraction phase produces nothing.
`ring3-health.json` then reports `status: "degraded"` with an `api_error`
`{ type, message }` instead of `"success"` (`classifyApiError()` /
`buildHealth()`), and the run logs a loud `SYSTEMIC API FAILURE` line. This
exists because a credit-balance outage silently froze thread capture for a
week (2026-07-05 → 2026-07-12) while health kept reporting success.

## Enrichment Directory

Per-item enrichment lives in `queue/items/<id>/enrichment/`. Four
standard files:

| File | Written by | Content |
|------|-----------|---------|
| `code-context.md` | Ring 2 fast | Actual code being discussed |
| `related-decisions.md` | Ring 2 fast | Prior decisions bearing on this |
| `memory-refs.md` | Ring 2 fast | Relevant memory entries |
| `options-analysis.md` | Ring 2 fast | Pros/cons with evidence |

`/inbox` reads these when `enrichment_status` is `"complete"`.
Missing files degrade gracefully (null in the read result).

## Routine Dispatch (declared interactive routines)

Projects declare interactive customs as **routines** in `config.json`,
under their project entry:

```json
"projects": {
  "flow": {
    "path": "/Users/x/flow",
    "routines": [
      {
        "name": "morning-briefing",
        "description": "Walk the operator through the day's landscape",
        "trigger": { "type": "time-of-day", "at": "08:30" },
        "script": ".claude/routines/morning-briefing.md",
        "urgency": "normal",
        "stale_after_hours": 24
      }
    ]
  }
}
```

- `name` — kebab-case slug, unique within the project.
- `trigger.type` — `time-of-day` (`at: "HH:MM"`, local, fires once per
  day), `interval` (`minutes`, >= 5), `path-nonempty` (`path` relative
  to the project root or absolute; `cooldown_minutes` default 60), or
  `session-close` (fires when Ring 3 closes a session for the project;
  worktree sessions resolve to the main project; `cooldown_minutes`
  default 0).
- `script` — project-authored phase file (the established CC phase
  convention) holding the routine's conversation script. The receiving
  session reads it and runs it; watchtower never parses it.
- `stale_after_hours` (default 24) — how long a pending dispatch stays
  blocking before a fresh firing supersedes it.

Ownership: `watchtower-routines.mjs` owns trigger evaluation, firing
state (`state/routine-state.json`), and dispatch. Ring 1 ticks the
mechanical triggers; Ring 3 raises session-close events. Both are
feature-flagged by `defaults.routine_dispatch`. A firing files an inbox
item (category `routine` — the durable record) and pushes a descriptor
through `mux qa dispatch`, the SAME hardened desk-dispatch path as
qa-handoffs (act:796fe6dc) — never a parallel one. Terminal exits on
any dispatched-category item (qa-handoff, routine) clear the matching
mux descriptor; routine items resolve normally (no QA gate; nothing
expires — a stale routine is superseded by the engine, which also
clears the descriptor). A pending routine item
blocks refiring of the same routine until resolved or stale.

**Moment expiry for `time-of-day` routines (act:ea23b3a5).** A daily
routine's value is bound to its day: a morning briefing delivered
tomorrow is not a briefing. `stale_after_hours` only supersedes at the
NEXT due firing, which for a daily routine is 24 hours later, so a
missed firing held a queue slot and a lit desk badge all day. Ring 1's
tick now supersedes a pending `time-of-day` item once the calendar day
it was FILED on has ended.

End of day, not a fixed number of hours, and the difference is
measured rather than tasteful: across six weeks the portfolio's one
time-of-day routine had ten real pickups — eight within four hours and
two after, at 4.4h and 8.6h. A four-hour window would have destroyed two
genuine pickups to clear one stale item. End-of-day preserves all ten,
needs no tuning constant, and matches what a daily routine means to a
person: you can still want your morning briefing at 4pm; you do not want
it tomorrow.

Three scoping rules, each load-bearing:

- **Ring 1's portfolio tick only.** Ring 3 also calls `runRoutinePass`,
  with a single-project `session-close` event. An unscoped sweep there
  would have every session close in any project superseding every OTHER
  project's routine items — and one portfolio sweep per replayed session
  during a `--reprocess-failed` drain.
- **Classify from the ITEM, not from config.** `dispatchRoutine`
  persists `evidence.trigger` at filing, so a routine whose declaration
  was later removed still classifies. A config lookup would find nothing
  and leave it pending forever.
- **An unparseable `filed_at` abstains, loudly.** The `stale_after_hours`
  path treats the same input as stale (NaN comparisons fall through to
  supersede); this one refuses and logs. Two mechanisms disagreeing
  silently is worse than one abstaining out loud.

Consequences, named rather than discovered later: for a `time-of-day`
trigger the moment sweep pre-empts the `stale_after_hours` supersede
(same outcome, more honest reason), a missed briefing is no longer
re-delivered by the SessionStart missed-routine section on a LATER day,
and the sweep has no in-flight awareness — a routine picked up by `mux
qa drain` very close to midnight could be superseded mid-run, which
end-of-day narrows to minutes where a fixed-hour window would have
opened it to hours. `interval`, `path-nonempty`, and `session-close`
routines have no moment and are untouched.

## Upstream-Friction Actionability (Phase 2g)

A friction report with no party who could act on it is not a report.
Five of the 2026-07-26 dismissals were observations like "Claude made
iterative browser tweaks without writing to file" — true, and addressed
to nobody, aging in the queue for weeks.

Phase 2g classifies each finding into three arms (act:ea23b3a5), in the
shape of the verification gate Phase 2f used before Simplification
Project 2 deleted it (2f filed a methodology capture only when the
claimed artifact verifiably existed on disk, after 11 of 11 unverified
captures were dismissed over three weeks):

1. **A named route** — `evidence.route.type` from the CLOSED vocabulary
   `cc-feedback | project-tracker | config-change` (`FRICTION_ROUTES`),
   plus a non-empty `detail` naming who acts and how
   (`frictionRouteIsActionable`) ⇒ DELIVERED by its route (below).
2. **Durable, no route** — a platform constraint or environment quirk
   nobody can fix, whose WORKAROUND is worth remembering ⇒ COUNTED and
   logged by title, never filed (Simplification Project 1, plan A2 /
   decision default 2, 2026-09-29). It used to file `knowledge-extraction`
   with a composed draft — this arm was not theory: of the five friction
   items the operator KEPT, four exited as `captured-to-memory` — but a
   durable platform constraint is a standing fact the session writes to
   its own memory at the moment it learns it (layer 1 of the three-layer
   model), and a draft proposed after the fact was measured as written and
   never read. A constraint that reaches this arm without a native memory
   write is an accepted loss, named in the plan's edge cases.
3. **Neither** — a transient incident or a general observation about
   Claude's behavior ⇒ files nothing, and is COUNTED. All three counts
   are logged every run; silence would be indistinguishable from a lens
   that never ran, and the drop count is the number this change exists to
   move.

An invented route type or an empty `detail` falls to arm 3. The
vocabulary is closed precisely so "someone should fix this" cannot
become an escape hatch.

**Delivery by route (Simplification Project 2, plan B4 + A5, Decision 2 /
Q1 / EP2; act:ee9fbbc9).** Arm 1 no longer files every route into the
inbox. `routeFriction(finding, ctx, deps)` (exported) delivers ONE report
at a time, as it happens — per report, never a digest:

- **`cc-feedback` → the feedback outbox.** One entry in
  `~/.claude/cc-feedback-outbox.json`, in the shape `/cc-feedback` writes
  (`frictionOutboxEntry` → `appendFeedbackOutboxEntry`, both in
  watchtower-queue: `source` = project, `date`, `component`, `title`,
  `body` = summary + route detail + session id, `status: "pending"`,
  `delivered: false`; read-modify-atomicWrite with one retry on a changed
  mtime, because the skill shares the file). Ring 1's
  `flushFeedbackOutbox` delivers it to the CC source repo's `feedback/`
  root unchanged, where triage-at-arrival makes it BLOCKING for the next
  cabinet session. The same path serves a session in the CC source repo
  itself. **Duplicates are JUDGED, never guessed (act:08aca7a9).** The
  plan specified a lexical suppressor (`overlapCoefficient` at the fold
  threshold); as shipped by lane 5 it held back 4 of 4 real reports on
  its first live run as "duplicates" of unrelated files. Now
  `findFeedbackDuplicateCandidates` builds a TITLE-only shortlist
  (symmetric Jaccard over `foldTokens`, ≥ 0.2 with ≥ 2 shared tokens)
  over pending outbox entries and the CC repo's `feedback/` +
  `feedback/resolved/`, and ONE batched model call
  (`judgeFeedbackDuplicates`, Ring 3's own model) decides whether each
  report is the same problem as a candidate it was shown; an API failure
  means deliver. The writer itself suppresses only an IDENTICAL pending
  title (reprocess idempotence) or a model-judged duplicate. A held-back
  duplicate appends nothing to the outbox and writes one
  `- duplicate-of: <ref> …` line under the session record's
  `## Friction` section.
- **`project-tracker` → carried to that project's next session (EP2).**
  One line under `## Friction` in the session record AND one `friction`
  entry in the project's carry ledger (see "Session Residue" below). The
  start block shows it in every following session of that project until
  a `/close` settles it — fixed, filed as an ordinary action, or dropped
  with a reason. **No ring writes any tracker**: `routeFriction` never
  calls `createAction`, and a static census in
  `friction-actionability.test.mjs` pins the absence. A session whose
  project slug is unresolved has no ledger key: the report is appended
  to `state/residue/unresolved-friction.jsonl` and Ring 1 renders a count
  line in `summary.md`'s `## Inbox` (never silent).
- **`config-change` → the inbox.** `createItem({category:
  'upstream-friction'})` — the one route that stays queued, and the ONLY
  `createItem` in this lens.

A failed write never drops a report: it is written to the record's
`## Friction` section with the error, and logged. `routeFriction` returns
`{ route, outcome }` with outcome `outbox | duplicate | carry |
unresolved | inbox | failed`.

## Session Advisor Pass (re-homed standing advisors)

The standing session advisors (historian, system-advocate,
user-advocate, anthropic-insider) hold two session-boundary seats, both
index-driven via `.claude/skills/_index.json` — the roster is whoever
declares the mandate, never a hardcoded list (act:aded4fc9):

- **Close side (automatic):** Ring 3's Phase 2m runs every member whose
  `standingMandate` includes `session-close` against the compressed
  session transcript, scoped by `directives.session-close`. Findings
  (max 2 per member per session, `ADVISOR_MAX_FINDINGS`, deduped against
  the pending + resolved/dismissed corpora) are written by ONE writer,
  watchtower-lib's `recordAdvisorFindings`: a line under the session
  record's `## Advisor findings` section (`- <member> (<directive>):
  <finding>`) AND one `advisor` entry in the project's carry ledger,
  which the next start block in that project shows ONCE (at most 3,
  then `…and N more in <record path>`). Never the inbox (Simplification
  Project 2, plan A4 / Decision 4, 2026-10-31). Feature-flagged by
  `defaults.session_advisors`. Cost: reuses Ring 3's pinned-sonnet run —
  no Claude Code spawn.
- **Start side (pull, intent-aware):** `/briefing` full mode spawns
  every member whose `standingMandate` includes `briefing`, scoped by
  `directives.briefing`, with the briefing's gathered portfolio context.
  Observations route through the curator's Step 3b selection and Step 4
  close — never a permanent section (anti-accretion invariant).
  `/briefing` also re-surfaces the close side: it reads the
  `## Advisor findings` sections of the project's session records dated
  since the last briefing (not pending items), and the repo-local weekly
  roundup collector reads the same sections over its week window.
- **Consultation side (skill-level):** the /orient and /debrief
  cabinet-consultations phases persist their members' ACTIONABLE
  findings through this same channel before the briefing/report
  renders (act:84daa7bc), capped at 2 per member per session like
  Phase 2m. With watchtower installed they write them into the
  session's residue receipt under `advisor_findings`
  (`watchtower-commitments.mjs --record --session-id <id> --json …`);
  `--record` MERGES — advisor findings accumulate across writes, and a
  write carrying only `advisor_findings` leaves the residue fields
  untouched (on a fresh receipt it writes no `findings` array at all, so
  Ring 3 does not mistake it for "/close asked"). Ring 3 then writes them
  through `recordAdvisorFindings` like its own. Projects without
  watchtower fall back to a pib-db action; with neither available, the
  finding is marked UNTRACKED in the rendered output so the
  non-persistence is loud.

**What stays queued.** `advisor-finding` is now a NARROWED live
category: its only inbox meaning is a proposed cabinet seat — Ring 2's
roster review (`fileRosterFinding`, `evidence.roster_kind`) — which is a
decision. Any other `advisor-finding` filing (a consumer hook, an
un-upgraded skill) is REDIRECTED by `createItem` to the project's carry
ledger as an `advisor` entry (see Detector Symmetry). A
`session-close`/`briefing` mandate without the matching directive key is
a data error: consumers skip the member and log it.

## Session Residue — /close Asks, Ring 3 Is the Fallback (Phase 2n/2o/2p/2q; act:4ff2cfb3, act:73dd31d4)

Simplification Project 2 (plan B3 + A3, Decision 3 / Q4 / EP2, lane
2026-10-31) moved the low-yield session-close lenses out of the inbox.
They were low-yield because a background model reading a transcript
after the session cannot tell a deliberate silence from a dropped
commitment; the session at close can. So the question is asked
IN-SESSION, and Ring 3 keeps the lenses only for a session that never
reached `/close` — writing to the session record, never the queue.

**The question — `/close` Step 6c.** After commit + push (Step 5) and
Step 6 — and also when Step 2 found a clean tree — the session runs
`watchtower-commitments.mjs --residue --session-id <id> --cwd <dir>`,
the mechanical half, which prints EVERY finding (the skill caps at
render time): `commitment` (the prospective-commitment detector over the
transcript prose), `verify-plan` (an action the session created or
completed — read from the transcript's own `pib_*` tool calls, never
the tracker's timestamps — whose notes lack `## Verify Plan`, only in a
project with `e2e/features/`), `coverage` (UI paths changed in the
session's commits with no `.feature` edit, same gate), and every
unresolved `friction` and `loose-end` entry in the project's carry
ledger, each with its `carry_id`. The session adds what only it can
judge (loose ends it raised and neither did nor filed — never one the
operator deliberately declined — a repeated procedure worth a skill,
reasoning worth a methodology record) and asks ONE plain-text message,
never a dialog: every finding numbered on one line with a pre-chosen
disposition, at most 5 lines (the rest `+N more → session record`),
"ok" accepts all, terse edits correct by number. No findings → no
question. Q4's six constraints are binding; the skill states them.

**The receipt** — `state/residue/<session-id>.json`, keyed globally by
SESSION ID, never by project slug (a worktree session's resolver and
Ring 3's can disagree): `{ session_id, project_path, asked_at,
findings: [{ n, kind, text, proposed, carry_id? }], advisor_findings,
answered, dispositions }`. Step 6c writes it with `--record` BEFORE
asking (`answered: false`), so walking away leaves the proposals for
Ring 3; `--record-answer` stamps `answered: true`, records the
dispositions, and resolves every carry entry a friction or loose-end
line settled. Both take JSON on stdin or `--json`, never a file (the
close-scope guard blocks Write and `cat`). A receipt with
`findings: []` counts as answered.

**The carry ledger** — `state/projects/<slug>/carry.json`, the ONE
per-project carrier for what rides from a session to the next session
of the same project (writers in watchtower-queue, fs-only, re-exported
by lib: `appendCarryEntry`, `readCarry`, `markCarryShown`,
`resolveCarryEntry`). Entries: `{ id, kind, title, detail,
source_session, created_at, shown: [{ session_id, at }], resolved: null
| { outcome: 'fixed' | 'filed' | 'dropped', ref, reason, session_id, at }
}`. Four kinds (`CARRY_KINDS`):

- `friction` — project-tracker friction (Phase 2g, EP2), or a stray
  `upstream-friction` filing redirected here;
- `loose-end` — a residue finding filed the OLD way (a stray filing into
  one of the five retired residue categories, redirected by
  `createItem`): unfinished work, not a tool complaint, so it gets its
  own start-block label (operator ruling 2026-10-31, act:dafa9afa);
- `advisor` — an advisor finding (Phase 2m, the by-hand filers, or a
  stray non-seat `advisor-finding`);
- `recolor` — a thread re-reading proposal (Reach 2, below).

`friction` and `loose-end` are PERSISTENT (`CARRY_PERSISTENT_KINDS`):
the start block shows them every session — one shared budget of 5
lines, oldest first, then `…and N more unresolved` — until a `/close`
resolves them as `fixed`, `filed` (an ordinary tracker action through
the normal write path, whose notes carry a container, ≥100 characters,
`## Acceptance Criteria` and `## Surface Area`) or `dropped` with a
reason. Not now is never lost: unanswered, they carry forward.
`advisor` (≤3) and `recolor` (≤3) show ONCE: after rendering, the start
block stamps them `shown` through `markCarryShown` — its only write,
fail-open (a failed stamp shows the entry again: duplication, never
loss). Resolving an already-resolved entry is a reported no-op.

**Ring 3's fallback (`runResidueFallback`, receipt-driven).** Before the
lenses would run, Ring 3 reads the receipt:

- **answered** (incl. `findings: []`) → skip 2n/2o/2q; write the accepted
  `note as skill candidate` lines under `## Skill candidates` and the
  receipt's `advisor_findings` through `recordAdvisorFindings`;
- **present, not answered** → write the proposals VERBATIM under
  `## Loose ends (proposed at /close, not answered)`, write its advisor
  findings, skip the lenses — no reply is not consent, and carried
  friction stays unresolved;
- **advisor-only** (no `findings` array — an /orient or /debrief
  consultation wrote advisor findings but `/close` never asked) → write
  the advisor findings, then take the no-receipt branch;
- **no receipt** (the session never reached `/close`) → run the lenses
  into the record:
  - **Phase 2n — Raised-but-unhandled.** Loose ends the session RAISED
    (promises, side-issues, open questions) but neither completed nor
    filed → lines under `## Loose ends`. Capped at
    `RAISED_UNHANDLED_MAX = 5` per session.
  - **Phase 2o — Skill-candidate.** A manual procedure repeated by hand
    that a skill could absorb → lines under `## Skill candidates`.
    Capped at `SKILL_CANDIDATE_MAX = 3` per session.
  - **Phase 2q — Verify coverage.** UI paths changed with no `.feature`
    edit → ONE `## Loose ends` line (gated by `defaults.verify_coverage`
    and `e2e/features/`). This replaces the `coverage-warning` standing
    debt item (see Detector Symmetry).

2n and 2o keep their shared dedup calls, so a loose end already filed as
an action is not re-listed (the dedup stack is Project 4's to remove).
Never the inbox in any branch. Every close appends one line to
`state/residue/fallback-ledger.jsonl` — `{ session_id, project, branch:
'answered' | 'unanswered' | 'no-receipt', lines_written }` — the D5
kill-trigger measurement: if no-receipt fallback lines get no `/recall`
hit and no start-block resolution in 60 days, Project 4 deletes the
lenses.

**Where the record lives.** `sessionRecordPath(slug, date, sessionId)`
(lib) is the one spelling of `state/projects/<slug>/sessions/<date>-<sessionId>.md`;
`main()` computes it once and passes it to every writer.
`appendSessionRecordSection(recordPath, heading, lines)` re-reads,
appends or extends the named `## ` section, atomic-writes, never throws.
A record that does not exist yet (Phase 2b failed) gets a stub first so
the section is still `/recall`-indexed; an unresolved project slug
writes `state/residue/<session-id>.record.md` instead (not indexed;
logged as an error). The section names are fixed: `## Loose ends`,
`## Loose ends (proposed at /close, not answered)`, `## Skill
candidates`, `## Advisor findings`, `## Friction`.

**Phase 2p — Checklist-catch** is unchanged: a surfaced change-impact
check that caught a real bug → recorded to `checklist-stats.json` (the
catch-recording side; consumed by `/debrief`'s checklist-feedback and
the audit `checklist-pruning` phase). Not an inbox item — a stats write.

**Phase 2f, the methodology detector, is DELETED** (plan A3): the
methodology question is one line of Step 6c, and an accepted line runs
`.claude/skills/debrief/phases/methodology-capture.md`'s write path,
committed separately. Ring 3 neither detects nor proposes methodology.
Ring 2's verify-backfill scan is deleted for the same reason — the
session that touched an action is asked about its Verify Plan.

## Suppression Ledger (Ring 3 dedup observability)

The recall-fix program (audit act:7d6a4b3b) makes Ring 3's
knowledge-capture dedup **auditable**. Every time `isDuplicate`
suppresses an extraction, the suppression site appends one structured
record to a shared sidecar so over-suppression is visible instead of
vanishing into a write-only cron.

**File:** `state/suppression-ledger.jsonl` (under `WATCHTOWER_DIR`).
Append-only JSON-lines. NOT shipped as a template — generated at
runtime, like `checklist-stats.json` and `.memory-pressure.jsonl`.

**Producer:** `recordSuppression(record, opts)` in `watchtower-lib.mjs`
(shared home; reachable by every ring). Called from every Ring 3
suppression site — Phase 2d (extraction; RETIRED 2026-09-29), Phase 2m (advisor close
pass), Phase 2n (raised-unhandled lens), Phase 2o (skill-candidate
lens). The human `log()` line stays beside it; the ledger is the
machine-readable twin, never a parse of the prose.

**Consumer:** the Ring 2 slow over-suppression canary (M5) — the ONLY
reader. It windows records by `ts`, computes a per-project
suppression-rate (suppressed / (suppressed + filed)) against a captured
post-M1a baseline, samples actual suppressed titles + what they matched
for human eyeball, tracks net-durably-saved (filed × approval-rate), and
writes `state/recall-canary.json`. The canary also prunes the ledger to
a retention window on each run (growth is bounded at canary cadence, not
on the suppression hot path). It is over-suppression-only and states so
in its own `note` field. Guards: `total===0 ⇒ no alert`; a minimum
denominator before a rate can fire; baseline captured on first run (else
it would alert on its own improvement).

**The surfacing path** (no write-only telemetry): the canary writes
`state/recall-canary.json` (per-project `{suppressed, filed, rate,
baseline, by_corpus, approval_rate, net_durably_saved, sample, alert}`);
**Ring 1** reads it and renders an alerting project's entry into that
project's **Standing Issues** (Ring 1 owns the per-project state file);
**/briefing**'s State-file-flags reader surfaces it. Three named hops,
each owning its tier. Flag: `defaults.recall_canary` (opt-out).

**Record shape (the contract):**

```json
{
  "ts": "ISO-8601 timestamp of the suppression",
  "project": "resolved project name (or null)",
  "corpus": "memory | thread-cursor | pending | resolved | dismissed | session-actions | rules",
  "suppressed_title": "the extraction title that was killed",
  "matched_against": "the corpus entry it collided with",
  "session_id": "the closing session's id (or null)"
}
```

**Invariants:**

- **Fail-open.** `recordSuppression` never throws. A failed append logs
  one line and continues — a dropped ledger record must NEVER block an
  extraction from filing. The ledger is observability, not the decision.
- **Additive.** New fields ride alongside; readers default missing
  fields. The `corpus` enum grows when a new dedup corpus lands (M1a
  added `thread-cursor` as a first-class corpus split off from
  `memory`).
- **Baseline before behavior.** The ledger lands BEFORE any matcher
  change so it records the OLD (pre-M1a) suppression behavior as the
  before-baseline the canary compares against.
- **Over-suppression only.** The ledger sees what dedup KILLED, not what
  extraction never proposed (M2 under-extraction). The canary states
  this blindness in its own output.

## New Dedup Corpora Ship OFF (act:a6bb5603, act:02e21a69)

`isDuplicate`'s trailing options object is the designated growth point
for new corpora. Two landed together as the sixth and seventh:

- **`session-actions`** — the `text` of actions the project filed inside
  the closing session's own day window. Kills the class where the
  session filed the bug as an action hours ago and Ring 3 then read the
  same transcript and drafted a lesson describing it.
- **`rules`** — HEADINGS plus the filename slug of `.claude/rules/*.md`,
  in BOTH the project's and the operator's global scope. Rule BODIES are
  never matched.

**Every new corpus ships behind a config flag that defaults to OFF.**
This is the standing rule, not a one-time caution. Adding a corpus can
only ever suppress MORE, and a wrong suppression destroys novel
knowledge silently and invisibly — the failure the whole M1/M2
recall-fix program exists to prevent. The flags are `=== true` opt-INs,
deliberately inverted from the `!== false` opt-out convention every
other `defaults.*` flag in the rings uses. Read the recall canary
against the new corpus's own ledger lines before proposing a flip.

**Four invariants a new corpus must satisfy:**

1. **A distinct ledger label.** The `corpus` value is the unit the
   canary measures precision by. A corpus folded into an existing label
   is unmeasurable.
2. **The short-title floor stays absolute.** An item that cannot muster
   `OVERLAP_THRESHOLD` meaningful tokens is never suppressed, by any
   corpus. Terseness must not lower the bar.
3. **A bounded scope, bounded at BOTH ends.** `session-actions` is
   scoped to `[session-start day, session-end day]`, the tightest window
   `actions.created` (a DATE, no time component) supports. The late
   bound is load-bearing: without it, reprocessing a three-week-old
   transcript would sweep every action filed since into the corpus.
   Cross-session duplication stays deliberately UNCOVERED, and an action
   filed by a different session on the same calendar day is the known,
   accepted residual imprecision.
4. **Fail OPEN at every step.** An unreadable db or rules dir yields an
   empty corpus, so the item files as a possible duplicate (one
   dismissal click) rather than being dropped (silent loss).

**Ordering.** New corpora are appended LAST in the match order, so
first-match attribution — and every historical ledger label — is
unchanged for the corpora that predate them.

**A measurement recorded against the rules corpus, because it did not
land as predicted.** Against every item this portfolio has ever filed
(2132 knowledge-extraction, 906 pattern-promotion, 23 raised-unhandled,
35 advisor-finding), 115 rule entries suppress THREE. All three are true
positives, so the corpus is precise — it is simply almost inert. The
reason is structural: an item that RESTATES a rule restates its CONTENT
in its own words and shares almost no long tokens with the rule's
HEADING. The 41-of-78 "restating an already-loaded rule" class is real,
but heading-and-slug matching is not the mechanism that catches it, and
matching rule bodies — the only thing that would — is the
over-suppression this contract forbids.

## The Pattern Shape Gate Must Check the Gap ASSERTS a Gap (act:02e21a69)

`patternHasRequiredShape` rejects document echoes by requiring the
`**Evidence:**` + `**Gap:**` blocks Phase 2e's prompt mandates. It
checked those blocks were PRESENT, not that the Gap block **asserts a
gap** — so a well-formed positive observation passed cleanly and shipped
as a promotion. The live specimen says so in its own body:
`**Gap:** No gap — this is positive practice worth reinforcing.`

The generation-side exclusions in `QUALITY_PATTERN_SYSTEM_PROMPT`
already name no-gap positives as never-patterns. This was never a prompt
problem: the prompt said the right thing and the mechanical gate did not
enforce it, and per `maintainability.md` §Prefer Structural Prevention
Over Detection, the gate is the correct layer.

`gapBlockAssertsGap` rejects a Gap block that is empty or whose OPENING
negates a gap (`no gap`, `none`, `n/a`, `not a gap`, `positive
practice`). Rejections fold into the existing
`rejected_malformed_total` / `last_scan_rejected` counters in
`state/pattern-detection.json` AND into their own
`rejected_gap_negating_total` / `last_scan_rejected_gap_negating` pair,
so the new arm's rate is measurable separately from the arm it extends.

Calibrated against the live 2432-section `audit-patterns.md` corpus
(2275 of which pass the older shape gate): 12 rejections, every one
reading "No gap …" / "Not a gap …" in its own words. `nothing` was
measured OUT of the negation list — it rejected a REAL gap whose block
opened on a quotation ("Nothing is actively running on my side"). Three
of the 12 read "No gap in this instance, but the pattern worth noting is
…" and are rejected deliberately: the promotion question is whether
there is a behavioral gap worth writing into a cabinet member, and a
body that opens by saying there isn't one has answered it.

Unlike the two dedup corpora it shipped beside, this arm is an
**opt-OUT** (`defaults.pattern_gap_assertion !== false`). It is a defect
fix to a gate that already rejects on shape; the flag exists so it can
be turned off if it over-rejects, not so it has to be turned on.

## The Pattern Scanner Remembers What Is Already a Rule (act:a49b9191)

Measured twice — 99 of 178 items on 2026-08-10, 154 of 220 on 2026-08-27
— about 70% of the `pattern-promotion` stream is observed INSTANCES of
rules that already load eagerly in every session (`verify-before-
asserting` alone: 50 in ten days). The scanner routed each to a member
and filed it as new because it checked the pattern against nothing
encoded. This implements act:78db81d9's aggregation contract on that
stream, and its invariant comes first: **nothing is dropped at the
lens.** Every instance is retained with its Evidence block; Phase 2e's
prompt is untouched; "file no item" is aggregation, never suppression.

**Classify before routing.** Every pattern that passes the shape gates
is classified in ONE Claude call against the **encoded set**, returning
`{instance_of: <entry number>|null, theme: <label>}`. Mechanical token
overlap is deliberately not the mechanism (act:421a8ab2: a lexical
matcher may propose, never suppress; ring3's headings-only `rules`
corpus measured nearly inert because an instance restates a rule's
CONTENT and shares almost no tokens with its HEADING). The model
decides; the counter records. Anything unparseable, out of range, or
thrown reads as NOVEL — fail toward filing, never toward suppression.

**The encoded set** = the title heading of every `.claude/rules/*.md`
in the project AND global scope (read through ring3's
`loadRulesCorpus` — one reader, not a third; sub-headings ride along as
context, never as targets), pinned memory titles (`pinned: true`
frontmatter — a legacy marker of the retired lifecycle contract; under
`memory-contract.md` the standing facts are the `MEMORY.md` lines, and
Project 2 decides whether the classifier reads those instead), and the
titles of patterns already resolved `promoted`. Deduped by the heading's hash:
the project-scoped copy of a rule beats the global one for attribution.

**Scoped by the stamped project (act:7c03b6a0, folded into
Simplification Project 2 B5).** Phase 2e stamps each `audit-patterns.md`
section header with the session's project and session id (`### <date> ·
project: <name> · session: <id>`, ring3's `appendAuditPatternsSection`;
ring2's `parseAuditPatternsHeaderStamp` reads it). A stamped section is
classified against THAT project's encoded set — its rules + global
rules, its pinned memory, the patterns promoted in it — built once per
project per scan, and every instance it yields is attributed to that
project with the stamped `session_id`. A section with NO stamp (written
before the stamp existed), or naming a project not in config, is not
classified at all: it files as a novel pattern and is counted in
`last_scan_unstamped_patterns` (operator ruling 2026-11-01, option b — a
one-time burst of novel filings is accepted over ever crediting an
instance to a project it did not come from). The portfolio-wide set
(`buildEncodedRuleSet` with no project) is still built, only to judge
orphaned rules in the summary; within it a GLOBAL-only rule belongs to
the first config project.

**The counter** is `state/rule-instances/<project>.jsonl`, append-only,
one line per instance: `{rule, rule_hash, rule_kind, rule_file, rule_scope,
project, session_id, pattern_hash, pattern_title, source_date, evidence,
theme, filed_at, classifier_on, filed_item}` (`classifier_on` is always
`true` and `filed_item` always `false` since the flag was deleted; the
fields stay so older lines and newer lines read alike) (`rule_kind` is the encoded
entry's kind — rule / pinned-memory / promoted-pattern — and is what the
proposal object reads back). Keyed on the heading's hash, so a
reworded or deleted rule starts a fresh series (the calibration fence):
`state/rule-instances/summary.json` is recomputed every scan (ambient
state, never a queue item) with per-rule 7/14-day counts and an
**orphaned** flag for instances whose rule is no longer in the set —
reported as its own line, never folded into a live rule. An EMPTY set
cannot judge orphans and says `null`.

**The threshold.** `PROMOTION_THRESHOLD = 5` instances of one rule inside
`PROMOTION_WINDOW_DAYS = 14` files ONE `pattern-promotion` item titled
`Promotion proposal: <rule> — N instances in 14 days`, evidence = the N
lines, dedup key = `rule_hash + window start`. The window counts
instances AFTER the last proposal's `window_end`, so a sixth instance is
one toward the next threshold, not a re-fire. Neither number is
configurable. This is the Promote stage (`enforcement-pipeline.md` §3)
finally having a producer.

**Theme collapse before member fan-out.** Surviving (novel) patterns are
grouped by the fold recipe run over the batch (`proposeFolds` →
`buildFoldClusters`, block labels stripped first), else by the model's
own theme label, else alone. Routing asks for one to THREE members;
one item per theme carries `target_member` (the first — what the write
path and the fold sweep key on) plus `target_members`, `theme_hashes`,
and every sibling's full text in `theme_patterns`. One item per theme
naming the members, never one per member.

**No flag — the counter is the only per-rule path (Simplification
Project 2, plan A2 / Decision 1, act:2ecf4b66).** This shipped behind an
opt-IN flag, OFF by default per "New Dedup Corpora Ship OFF" above, so
the canary could read the counter before the flip. The console turned it
on for one live slow tick, read `state/rule-instances/summary.json`
back, and A2 then deleted the flag and its OFF path (the ledger entry
"Per-pattern promotion filing removed" records the check, including the
one-time burst of threshold proposals the flip filed for rules already
at ≥5 instances). Unconditionally now: an instance files no item and
appends one counter line; a rule crossing the threshold files ONE
proposal; novel patterns collapse by theme. A classifier failure still
fails open (the pattern files as novel). Scan state carries
`rule_instances_total`, `suppressed_instances_total`,
`classifier_errors_total`, `promotion_proposals_total`,
`last_scan_themes`, `last_scan_unstamped_patterns` and
`encoded_set_size` (the portfolio-wide set's size).
`emitPatternPromotion` (watchtower-queue — the QA-gate failure-class
producer) is the second threshold producer that files
`pattern-promotion`; the registry records both.

**The acceptance instrument** is `watchtower-ring2.mjs
--replay-rule-classifier [--project P] [--since D] [--resolved-on D]
[--limit N] [--out FILE]`: the resolved items are run back through the
real classifier and tallied per disposition; entries minted from the
replayed items' own promotions are excluded from the set first. Target
for the 2026-08-27 corpus (220 items): ≤ 40 would file, ≥ 140 count as
instances, the promoted 22 among the filed.

## Extraction Noise Immunity (act:471941c9) — RETIRED 2026-09-29

Retired by Simplification Project 1 (prj:a4c6052b, plan A1/A7;
`.claude/plans/simplification-1-memory-retrieval.md`). The five rules here
governed Ring 3 Phase 2d, the transcript-to-draft knowledge extractor, which
is deleted: bookkeeping suppression (`bookkeepingRule`), authority-path
routing (`resolveAuthorityPath` + the `authority_paths` config default),
the M1b novelty prompt fed by `loadMemoryCorpus`'s expanded titles, and the
lexical near-identity split are gone with it. Two pieces named here are
still in code but DEAD, left for Project 4 (plan A8): the pairwise
`buildFoldClusters` group view (watchtower-queue) and `/inbox`'s
classification pass (`groupItemsByShape`). The one standing rule survives
in the dedup contract above — **a lexical matcher over a large corpus may
propose, never silently suppress** — because Phases 2m/2n/2o still run the
shared `isDuplicate` corpora.

## Worktree Coverage Is Reported, and a Dismissal Is Suppression Input (act:6dcb8015)

Two field reports, one detector, two distinct root causes — both named from
the live queue and live git rather than inferred.

- **The re-fire was a PENDING-ONLY dedup, not an ancestry failure.**
  `hasUnmergedContent` already tests ancestry first and got the reported five
  RIGHT: every item carries `evidence.unmerged === false`, `ahead === 0`, and
  was filed for ONE uncommitted file. The dedup consulted `listPending()` only,
  so a dismissal left the corpus and the next tick refiled a byte-identical
  item (dec-1d7706dd dismissed 2026-07-29T23:05:39 → dec-59afb639 filed
  2026-07-30T13:16:46). That is Detector Symmetry §2's named failure.
  `fileOrphanedWorktreeItem` now also consults recently
  resolved/dismissed/expired/superseded items (`WORKTREE_DEDUP_DAYS = 14`;
  historically shorter than the then-30-day expiry so an item could never
  leave every corpus at the moment it expired — expiry is gone since
  2026-10-30, the window stands). **Suppression is conditional on UNCHANGED
  STATE**: a register escalation — a merged-but-dirty worktree that later gains
  real unmerged commits — files regardless of any dismissal, because a
  dismissal answers the question it was asked, not every future question about
  the same branch.
- **The coverage hole was the ACTIVE-WINDOW filter, and it was silent.** Every
  per-worktree skip was an uncounted `continue`, so an unscanned worktree and a
  clean one rendered identically. `scanWorktrees` now returns
  `{orphaned, coverage}`; the coverage counts what was listed, scanned, filed,
  and skipped by reason, and `renderWorktreeCoverage` puts "checked N of M
  worktrees" in Standing Issues — plus a loud "the scan did NOT run" line when
  it did not. Ambient state, so it lives in the state file, not the queue.
- **Real unmerged commits behind an open window are surfaced, never filed.** An
  active worktree is not orphaned and must not become an inbox item — nagging
  about work in progress is the noise the filter exists to prevent — but a
  six-commit branch sitting behind a window for days is exactly the reported
  miss. It now renders on its own Standing Issues line saying plainly that the
  branch is NOT merged.
- **Activity is detected by pane path first.** A tmux pane whose cwd is inside
  the worktree is unambiguous. The legacy window-name match is kept as a
  fallback but is global and prefix-stripped (`reflow-internal-notes` and
  `maginnis-internal-notes` both yield `internal-notes`), so a window open in
  ANY desk suppresses a same-named worktree in EVERY project — which is why the
  suppression must be counted rather than trusted.

## Completion Review Answers "Is It Finished", Not "Did It Change" (act:86226720)

Phase 2c sent the model `fid: text (status)` and nothing else — it had never
been shown an action's NOTES, so it had never been shown the action's own
definition of done. It could only answer "did something change here". Ten
items in one 2026-07-30 drain proved the cost: all ten open/in-progress with
`completed=0`, all ten blocked on the same external event, none closeable.

- **The action's notes are now in the prompt.** Each open action is presented
  with an `acceptanceCriteriaExcerpt` — the AC section when the notes have one,
  otherwise the head of the notes, bounded because every open action is sent.
- **The gate has two arms.** Mechanical: unchecked `- [ ]` boxes suppress.
  Model: `ac_status: met|unmet|unstated` suppresses on `unmet` **only with a
  VERBATIM cited criterion** (`ac_unmet`) — an uncited "unmet" is an assertion,
  not an answer, and is counted separately rather than silently downgraded.
- **"No acceptance criteria" is NEVER "unmet."** 150 of the 171 noise items in
  the measured corpus cite an action with no checklist at all; reading absence
  as failure would suppress the whole category.
- **Gating is safe here specifically** because "a missed completion is
  recoverable next session, a missed lesson is not" (this file's own
  transcript-budget rationale). Phase 2c re-runs against still-open actions, so
  an over-suppressed candidate comes back. That asymmetry is why quote
  verification ships as instrumentation and this ships as a gate.
- **Observability is the contract**, not a nicety: one log line per suppressed
  candidate naming WHICH arm fired, a per-session verdict tally
  (`met/unmet/unstated/unknown/unmet-uncited`) so "no suppressions" is
  distinguishable from "the model never answered", and `evidence.ac_status` +
  `ac_unmet` + `ac_boxes_present` stamped on every EMITTED item — the join key
  the next precision measurement needs.
- **The act:ea23b3a5 calibration fence is intact.** That measurement is fenced
  to "the Phase 2c confidence rubric AS WRITTEN". `ac_status` is an ADDITIONAL
  field; the four confidence lines are byte-identical and a test asserts it.

**Measured before shipping (the discipline this category already learned the
hard way), and the measurement REFUTED the proposed fix.** The report asked to
suppress on unchecked `- [ ]` boxes. Against the live queue: **zero** of the
reporting ten cite an action with an unchecked box — that project writes its
criteria as prose — and portfolio-wide only **8 of 247** completion-review
items ever filed cite one at all, of which 5 were noise and **3 were real
completions** (62% noise against a 73% baseline, i.e. mildly ANTI-predictive,
the same shape found for `confidence: high`). Every other mechanical signal
measured flat: confidence (20/32/26% against a 26% baseline), an explicit
`blocked` status (zero actions in the entire corpus use it), an
external-blocker phrase in the notes (23% vs 27%). The checkbox arm ships
because it is the literal acceptance criterion and costs ~1 blocked true
completion a month; the model arm is what actually addresses the reported
failure, and it ships instrumented precisely because it is unmeasured — the
model had never been asked this question, so no prior corpus could exist.

## Prospective Commitments (act:aa554774)

**The rule: can this wait in a queue for a week without cost?** Everything
`/close` delegates to the rings is retrospective — lessons, decisions,
knowledge — and losing a day costs nothing. A **prospective, time-bound
commitment made during the session** has a clock, and the inbox it would
land in has been 275 deep with a 26-day tail. Technically captured,
practically lost.

- **`/close` Step 6b files them forward.** Bounded to prospective, dated
  obligations ONLY — never an inventory, never a lesson sweep — and ONE
  AskUserQuestion naming each commitment concretely, so approval is of
  specific obligations rather than a count. `due` for a calendar deadline,
  `trigger_condition` for an event ("when the device arrives"). **Nothing
  qualifying means nothing is said**: the common path adds zero seconds.
- **Ring 3 no longer has anything to duplicate.** Phase 2d used to load
  the actions this project created on the session's date and suppress a
  COMMITMENT-SHAPED extraction one of them already covered (ledger label
  `commitment-already-filed`). Phase 2d was DELETED by Simplification
  Project 1 (plan A1, 2026-09-29), so that half of the seam is retired; the
  session-window reader (`sessionActionWindow` / `loadSessionFiledActions`)
  survives only as the shared session-actions dedup corpus for Phases
  2m/2n/2o.
- **One definition.** `watchtower-commitments.mjs` owns the screen (a
  temporal cue AND an obligation shape AND no settled marker) and the match
  (`findFiledCommitment`, overlap coefficient at 0.6 over the queue's fold
  tokenizer). `/close` is its only caller now; nothing may fork it.
- **Anti-pattern, stated in `/close` and `/session-handoff`:** never write
  a commitment into the notes of an action being marked completed. Closed
  items don't surface, so it reads as filing and functions as deletion. A
  commitment gets its own open action, or it does not exist.

## Reach 1 — Pending-Relation Proposals (act:5182beda) — RETIRED 2026-09-29

Retired by Simplification Project 1 (prj:a4c6052b, plan A1/A7). Reach 1 —
the extraction call proposing `pairs_with` / `answers` / `contradicts`
relations between a freshly extracted item and a still-pending inbox draft,
filed as `pending-relation` items via `fileRelationProposal` — lived inside
Ring 3 Phase 2d and was deleted with it (`selectNearbyPendingItems`,
`relationKey`, `PENDING_RELATION_CAP`, the `relates_to`/`relation` prompt
fields). The `pending-relation` category is marked `retired` in
`INBOX_DETECTOR_REGISTRY`; Ring 1's `autoReconcilePendingRelations` keeps
retracting the HISTORICAL items when either cited side leaves pending. The
retrospective-temporality motion (act:ef5a3842, MANIFESTO principle 4) is
untouched at its second reach — Reach 2 below still ships.

## Reach 2 — Significance-Change Proposals (act:bcb7edd4, L1 of grp:retro-remeaning)

The second reach of the retrospective-temporality motion (`act:ef5a3842`,
MANIFESTO principle 4), extending Reach 1's inbox-range reach-back to the
recently-absorbed thread trail. When Ring 3 closes a session, the new
understanding it captured reaches BACK into the prior cursor history of the
threads THIS session touched, and may PROPOSE that an earlier entry now
means something different: `reframes` (significance change — what looked
like friction was the seed of the architecture; the class a contradiction
scan is structurally blind to), `answers` (a real earlier uncertainty is
settled), or `contradicts`.

**Mechanism.** Inside Phase 2b2, AFTER the cursor appends land: the prior
trail of each earned thread is snapshotted from disk BEFORE this session's
entry is appended (last `PRIOR_HISTORY_CAP` entries), and one focused
follow-up model call (`significanceReachBack`) sees the new understanding
beside each prior trail. It fires only when at least one earned thread has
prior history — a routine or first-touch session costs nothing. It cannot
ride the capture call the way Reach 1 rode extraction: the reach-back
corpus (which threads matter) IS that call's output. EVENT-DRIVEN by
construction — never a periodic sweep (the shape the cabinet killed).

**Proposals live on the thread, not in the inbox (Simplification Project
2, plan A8 / EP1, act:b57df8e4).** Until 2026-10-31 each proposal filed a
`significance-change` inbox item; none was ever closed by anyone or by its
reconciler, so the category is RETIRED (its stray filings redirect to
the thread — see Detector Symmetry). A proposal must still cite an ACTUAL
prior entry — session_id + date checked against the on-disk snapshot
(`validateRecolorProposals`); a hallucinated anchor drops, logged, never
written. `fileSignificanceProposal` then writes it ONTO the thread it
reinterprets through ONE writer, `appendThreadProposal(threadsDir, slug,
proposal)` (watchtower-queue, fs-only, re-exported by lib, atomic): an
entry in the thread file's additive `proposed_recolors` array —
`{ relation_key, verb, prior_session_id, prior_date, prior_excerpt,
new_session_id, explanation, proposed_at, also_noticed_by }`. Old thread
readers are unaffected; `cursor_history` and `recolor_log` are never
touched. A missing or unreadable thread file returns null — logged,
never thrown, never filed.

**The durable exclusion moved with it.** The key is
`thread|prior_session|verb` — the ANCHOR being reinterpreted and how,
never the noticing session (including the session made the key dedup
only within one session; 12 of 120 pending items were true duplicates,
act:1be47d42). The writer refuses a key already APPLIED (in
`recolor_log`) or already a historical `significance-change` queue item
in ANY status whose `evidence.relation_key` equals it, with no time window
— a decided or walked judgment about a static corpus never re-nags. Caveat:
items filed before 2026-08-19 (7075014) carry the old four-part key that
included the noticing session, so they never match and do NOT exclude
anything — only post-2026-08-19 items do. A reprocess replay writes
nothing. A
key already PROPOSED by a different session is corroboration: that
session is appended to `also_noticed_by` (act:de0b090a), never a second
entry.

**Where the operator sees it.** `/threads` lists `proposed_recolors`
among the thread's fields; arc mode ends with "Proposed re-readings (not
yet decided)", one plain-English line each, and map mode shows a count
per thread when non-zero. A NEW proposal also writes one `recolor` entry
to the carry ledger of the project the closing session ran in (not
carried when that project is unresolved — the proposal is still on the
thread), so the next start block in that project shows it once
(`- thread "<name>": this session <verb> the <date> entry —
<explanation>`, at most 3, then a `/threads arc <slug>` pointer). **No
confirm or dismiss verb exists before Project 3** (plan R2): proposals
accumulate on the thread, and Project 3's contradiction gate decides
which kind returns to the inbox. `appendThreadRecolor` (watchtower-lib)
still applies a confirmed recolor as an entry in the thread's additive
`recolor_log` — it ANNOTATES history, never rewrites `cursor_history`,
and no ring ever writes `recolor_log`. `/inbox`'s confirm follow-up and
the gate below now act only on the historical queue items.

**The historical queue items.** `significance-change` stays in
`GATED_CATEGORIES` beside `pending-relation`: `applyBatch` structurally
refuses both, so each reinterpretation still pending in the queue is
confirmed or dismissed individually (a rubber-stamped batch of
re-meanings is how a system gaslights its operator), and the backlog
walk (plan C1, not yet run) will close them one at a time. `autoReconcileSignificanceItems` (ring1,
per tick) still retracts a queued item when the cited thread file is
POSITIVELY gone from `state/threads/` (dir readable, file absent); it
keeps on any read error and keeps EVERYTHING when the dir is unreadable.
The same condition governs the on-thread proposals — they vanish with
their thread. Project 4 removes the reconciler once nothing is queued.

**The honest metric that gates Reach 3.** Every real-work close appends one
line to `state/significance-ledger.jsonl` (`recordSignificanceEvent`,
fail-open, same discipline as the suppression ledger): session, threads
touched, threads with history, entries shown, proposals filed.
`readSignificanceRate` (watchtower-lib) reads the ledger (sessions,
replay-deduped by session_id; `proposals_per_session` = the ledger's
proposals filed over sessions with thread history), the queue's
historical dispositions (`keep_ratio` = kept over kept + dismissed), and,
since the move onto the thread, the thread files' `proposed_recolors`
(`thread_proposals`, and `proposals_total` = distinct relation_keys
across the thread files and the historical queue items) — null ratios
when a denominator is zero, never fabricated 0s. This is the
L2 gate's named reader: Reach 3 (`act:a8b372a7`) is built only when an
observed significance-change rate on real data warrants it — replacing the
contradiction-density measurement the plan retired as the wrong instrument.

## Detector Symmetry (no detector without a retraction path)

The 2026-07-12 inbox drain (893→194 pending) hit the same disease four
times in four detectors: branch-diverged never retracted (35/39 stale),
completion-review never reconciled (28/66 moot), worktree-unmerged
retracted only on branch deletion, and dismissed items refiled on the
next tick because dedup checks only PENDING items (the `backup/*` loop
refiled within hours, twice in one day). `autoResolveWorktreeItems`'
own comment states the principle: dedup suppresses refiling but nothing
retracts the original — **stale alarms train the operator to ignore
real ones**. This contract encodes the rule so detector #5 cannot ship
with the same bug (grp:wt-noise-immunity, act:4d11fd53).

**Every detector that FILES an inbox item must declare, at ship time:**

1. **Its retraction condition** — the mechanical, per-tick check that
   the filed condition no longer holds (branch merged/gone, action
   closed, …). Retraction is truth-checking, not judgment: it runs in
   Ring 1's tick beside the other reconcilers.
2. **Its filing exclusions** — states that must never file, checked at
   the FILING site (not just retraction) so a human dismissal cannot
   reopen the loop: dedup consults only pending items, so an excluded
   state that files at all refiles after every dismissal, forever.
3. **Or an explicit exemption** — a detector with no possible
   mechanical retraction (pure knowledge extraction, advisory
   observations, session-historical facts) declares that explicitly in
   the registry, with the rationale.

**The registry and its enforcement:** `INBOX_DETECTOR_REGISTRY` in
`watchtower-lib.mjs` maps every ring-filed category to
`{ reconciler }` or `{ exempt }` (exactly one) — or, once a category's
producers are deleted, `{ retired: { date, reason } }` (Simplification
Project 1, plan A4): the entry stays so the historical items remain
readable, and the structural test asserts a retired category has NO live
filing site (`knowledge-extraction` and `pending-relation`, 2026-09-29).
A structural test
(`templates/scripts/__tests__/detector-registry.test.mjs`) parses the
`category:` literals at `createItem` filing sites across ring1, ring2,
and ring3-close (read-only source scan, house precedent:
suppression-ledger's wiring assertion) and fails the suite when a
filing site's category is missing from the registry — a new category
without a declared reconciler or exemption breaks the build, not the
operator's trust.

**Reader and exit — every live category says who acts on it and how it
leaves (Simplification Project 2, plan B1 / Decision 5, act:fcb42cdd).**
Expiry is deleted (see "Category Expiry — RETIRED"), so nothing leaves the
inbox by age, and each entry now carries, BESIDE the reconciler | exempt
trichotomy (which is unchanged):

- `label` — the plain-English name operator-facing surfaces use (the
  start block's "oldest here: <label>, <N> days", the inbox alarms);
  every entry, live or retired (plan B2).
- `reader` (live entries) — who acts and where they see it. After
  Project 2 every live category's reader is the operator, on `/inbox`,
  `/briefing` and the start block's oldest line.
- `exit` (live entries) — `{ mechanical: '<function> (<ring>):
  <condition>' }` and/or `{ operator: '<verbs>' }`, never an age.
  Mechanical exits today: `branch-diverged`
  (`autoResolveBranchDivergedItems`), `worktree-unmerged`
  (`autoResolveWorktreeItems`), `completion-review`
  (`autoReconcileCompletionReviews`), `routine` (`sweepExpiredMoments` —
  an event, the firing's day ended or a later firing superseded it, not
  an age; the one name the no-age test whitelists). Every other live
  category exits by the operator only.
- `retired.moved_to` (retired entries with a live home) — where that
  kind of finding goes now. A category with no live home carries none.
- `filed_outside_rings: true` — a live category a skill files rather
  than a ring (`qa-handoff`, filed by `/qa-handoff` and closed only
  through the structural QA verdict gate or a typed dismissal), so the
  "no live entry is stale" census does not demand a ring filing site.

`detector-registry.test.mjs` enforces it: every live entry declares a
non-empty `reader` and an `exit`; no exit's CONDITION text names an age
or expiry; every `exit.mechanical` names a function defined in a ring
script; every entry Project 2 retired to a live home carries
`moved_to` (and `routing-decision`, which has none, carries none); and the
live set is PINNED — `branch-diverged, worktree-unmerged,
completion-review, routine, qa-handoff, deferred-trigger,
project-completion, stale-project, pattern-promotion, advisor-finding,
upstream-friction` — so a new category cannot join the inbox without
editing the test. `liveInboxCategories()` (lib) is the one reader of
that set. A declared exit is not a working one; Ring 1's inbox alarms
(below) check that a mechanical exit actually closes anything.

**Retired 2026-10-31 by Simplification Project 2:** `raised-unhandled`, `skill-candidate`, `coverage-warning`,
`methodology-capture`, `verify-backfill` (the session-residue question
and Ring 3's record fallback), `doc-drift` (the project's
`doc-drift.json`), `significance-change` (the thread's
`proposed_recolors`), and `routing-decision` (no producer since
2026-06-10). Two live categories are NARROWED: `advisor-finding` now
means only a proposed cabinet seat, `upstream-friction` only a
config-change report.

**Stray filings are redirected, never lost (plan A9 as narrowed by EP4,
act:73dd31d4).** The operator's ruling: no feedback line closes. A
producer that still files a category the inbox no longer carries — a
consumer's own watchtower hook, an un-upgraded skill, a runtime that has
not been refreshed — must neither lose its finding nor refill a queue
nobody reads. So `createItem` checks two maps in watchtower-queue
before any other boundary check:

- `RETIRED_CATEGORIES` — category → live home: `'carry'` for the five
  residue categories (a `loose-end` carry entry for that project),
  `'doc-drift-state'` for `doc-drift`, `'thread'` for
  `significance-change`, and `null` — no live home — for
  `knowledge-extraction`, `pending-relation`, `watchtower-health` and
  `routing-decision`. Its keys are pinned to the registry's retired
  entries by `queue-retired-categories.test.mjs`.
- `NARROWED_CATEGORIES` — a predicate per narrowed live category: a
  non-seat `advisor-finding` (no `evidence.roster_kind`) → `'carry'` (an
  `advisor` entry); an `upstream-friction` whose `evidence.route.type` is
  `project-tracker` → `'carry'` (a `friction` entry), `cc-feedback` →
  `'outbox'`; anything else files as usual.

A filing with a home is written THERE and `createItem` returns
`{ redirected: true, to, path, … }` — never an id, never a throw, never
a pretended inbox item. A retired category with no home THROWS
(`RETIRED_NO_HOME`), loudly. Every redirect and refusal appends `{ ts,
category, project, filed_by, title, to | refused }` to
`state/inbox-redirects.jsonl` (the title rides on every line because a
held-back duplicate leaves no other trace), and Ring 1 counts them per
producer so the producer gets fixed. **Fail toward visibility:** if the
redirect write itself fails, the item is filed into the queue as before
with `evidence.redirect_failed`. The three writers the redirect needs —
the carry append, the outbox append, the thread-proposal append — live
in watchtower-queue as fs-only writers (lib imports the queue, never the
reverse) and are re-exported by lib, so Ring 3 and every other caller
use the same definitions.

**Machine resolutions are machine acts, not engagement.** Every
auto-retraction resolves through `autoReconcileItem` (watchtower-lib):
`resolution_type: 'auto-reconciled'` + `evidence.actor: 'ring1'` + a
note naming the evidence (action fid / branch). The cross-ring reader's
engagement bucketing and the inbox assessment's `worked_recent` EXCLUDE
this type — cron sweeps must never read as operator engagement or
suppress the not-consumed verdict. A semantically-wrong close (e.g. an
action closed via the ungated `pib_update_action --status done` path)
stays traceable to its mechanical trigger through the stamp.

**Fail-toward-keeping.** A reconciler retracts only on POSITIVE
evidence that the condition cleared: branch absence is concluded only
from membership in a successful branch listing (a failed git call
retracts nothing); an action-fid lookup retracts only on a FOUND,
non-deleted, closed row — fid-not-found keeps the item, which is
load-bearing for flow (a readable-but-vestigial pib.db; the real
tracker is flow.db) and for misattributed items whose fid lives in a
different project's db. Foreign pib.dbs are opened READ-ONLY behind an
existsSync guard; reconciler writes land only in the watchtower queue.

**Branch exclusion list:** `defaults.long_lived_branches` (watchtower
config), default `["staging", "production", "backup/*"]`. Entries
without `*` are EXACT names (`staging-fix` files normally); `*` is a
glob. **Consumer-default risk, documented:** a consumer whose real work
branch is literally named `staging` or `production` will never get a
branch-diverged item for it — the branch stays visible on the attention
line / git-attention sidecar / summary / Standing Issues (the exclusion
gates filing ONLY), and the consumer overrides the list in config.

**Standing-debt aggregation (historical: coverage-warning,
memory-budget).** Neither adopter files any more — memory-budget was
deleted with the curated memory write path (Simplification Project 1,
plan A5) and coverage-warning was retired by Simplification Project 2
(plan A3, 2026-10-31): the coverage debt is now a residue line, asked at
`/close` Step 6c as a `coverage` finding or written by Ring 3's Phase 2q
fallback as one `## Loose ends` line in the session record. The rules
below stay as the contract for the next standing-debt detector. A
detector whose finding is a STANDING condition (recurs while a debt
persists) files ONE item per (project, debt-class) and APPENDS evidence
to the pending item, carrying `evidence.first_seen` (oldest evidence
date) so aging reads the debt's true age. Resolving the item closes the
accumulated view; if the debt persists, the next tick files FRESH —
post-disposition recurrence is a new signal, not a refile loop
(act:e888dd63; 49 identical coverage-warning items for one month-old
debt was the live specimen).

Three rules the second adopter (memory-budget, act:ea23b3a5) added, each
learned from a live failure mode:

1. **The occurrence key must be the operator's unit of time, not the
   ring's.** coverage-warning keys on the session; memory-budget keys on
   the CALENDAR DAY, because Ring 2 slow runs ~48 times a day. A per-run
   key makes the replay guard dead code, grows the key list by ~17,500
   entries a year inside one JSON file, renders a count no human can
   read, and — because the backlog-rot reader weighs standing debt by
   that count — poisons the `keeping` / `losing` / `not-consumed` verdict
   `/inbox` and `/briefing` lead with.
2. **Reuse an evidence spelling the readers already know.** The rot
   weigher (`itemSessionWeight`, watchtower-inbox-assessment) accepts
   `session_count` / `session_ids` / `sessions` and silently weighs
   everything else as 1. A new adopter that invents a fifth spelling
   reintroduces the blind spot the fourth was added to fix. memory-budget
   writes `session_count`.
3. **Prefer `annotateItemEvidence` over a direct item write, and do not
   bump `filed_at` without a reason.** The append gets a fresh read, a
   pending fence checked at write time, and a deep-equal skip for free.
   Bumping `filed_at` has three side effects worth choosing
   deliberately: it strips an `[AGING]` prefix the escalation pass added
   (and prevents its return), it re-escalates urgency the decay pass
   de-escalated, and — since `listPending` sorts by `filed_at` — it pins
   the item to the top of every pending list permanently. coverage-warning
   bumps on purpose (its `[AGING]` age should measure the last
   recurrence, now that nothing expires); memory-budget does not.

**What does NOT aggregate.** (Both examples below left the inbox in
Simplification Project 2 — `doc-drift` to the project's
`doc-drift.json`, one entry per claim, and `raised-unhandled` to the
session record — but the reasoning still governs any future detector.)
`doc-drift` carries a per-claim,
mutually-exclusive fix-doc / fix-code decision, so N claims folded into
one item pose a question the operator cannot answer, and any reconciler
over the aggregate could only fire when every claim cleared.
`raised-unhandled` is free text: recognizing "this loose end restates
that one" needs a similarity matcher, and `proposeFolds`'
`overlapCoefficient` at `FOLD_SIMILARITY_THRESHOLD = 0.22` folds two
three-token titles that share ONE word — calibrated for advisory
retrieval, not for a destructive merge. Both instead route through Ring
2's `runDraftAnnotationSweep`, which annotates both sides with
`possible_duplicate_of` and demotes them out of batch sign-off. **A
lexical matcher may propose; it may never silently suppress.**

## Category Expiry — RETIRED 2026-10-30

**Nothing in the inbox expires.** Simplification Project 2 (plan
`.claude/plans/simplification-2-inbox.md`, Decision 5, step A1,
act:15aeeafb) deleted expiry outright rather than reforming it. An item
leaves the queue in exactly two ways: a mechanical check confirms the
thing it reports is no longer true (its registry entry's reconciler), or
the operator closes it. Age is shown — Ring 2's `[AGING]` title prefix at
14 days and the urgent→normal decay — and never acted on.

What stood here until then: a per-category age table in
`watchtower-queue.mjs` (30 days by default, 14 for completion-review,
never for qa-handoff), two engines that read it — Ring 2's escalation
loop on the 5-minute cron and a sweep called by `/inbox` and `/briefing`
— and the rule that both must delegate to the one table (act:ea23b3a5).
Measured on the live queue when it was deleted: 1,193 items had been
relabelled `expired` since 2026-09-16, none dated, none read; expiry was
the inbox's largest consumer.

Two consequences survive the deletion and are still binding:

- **The `expired` status is a legal value, forever.** Historical items
  carry it. `VALID_STATUSES`, the item schema, the cross-ring reader's
  `expired_by_filed_date`, the significance tally, `archiveItem` and
  every dedup window that lists `expired` keep reading it — they simply
  see no new ones. Do not rewrite a stored `expired` status.
- **The Phase 2c dedup corpus keeps `expired` and `superseded`.** The
  refile loop they closed (completion-review's 14-day expiry equalled
  `COMPLETION_REVIEW_DEDUP_DAYS`, so a fid left every corpus at the
  moment its item expired) can no longer start, but the items it
  produced still exist; `ring3-dedup.test.mjs` pins the corpus.

The routine engine's end-of-day sweep (`sweepExpiredMoments` in
`watchtower-routines.mjs`) is NOT expiry: it supersedes a time-of-day
firing once its day has ended — a mechanical retraction of a time-bound
event — and is that category's declared exit. The replacement for the
30-day bound, all built: every category declares its reader and its
exit (Detector Symmetry), the session-start block names this project's
oldest pending items with their age ("oldest here: <label>, <N> days",
then one "rest of portfolio" count line), and Ring 1 raises a line when
a category only grows, when a declared automatic exit closes nothing, or
when the inbox stays large (see "Queue Items Require a Decision" below).

## Queue Items Require a Decision; Ambient State Describes Conditions

A queue item asks the operator to decide something. A per-project state
file describes a condition. Filing a condition as an item spends the
operator's scarcest resource — a triage slot — on something they can
only acknowledge.

**The axis is who is judging, not whether the value is recomputable.**
Recomputability is the wrong test and would contradict a rule this
system already ships: derivable and perishable facts (act:471dd701,
act:a69c21f8) are recomputable *by definition*, and they are **always
filed** — routed to their derivation or the session record, never
dropped — because that routing is a per-item MODEL judgment, and
dropping one would be silent model auto-suppression. A deterministic
ring measurement is different in kind: the operator routes it once, by
category, and the routing holds.

**The functional test: does waiting cost something irreversible?**
`worktree-unmerged` is the calibrating counter-example. Ring 1
recomputes it from git every five minutes, so by a recomputability rule
it would be pure ambient state — and it must stay in the queue, because
the worktree gets cleaned up and the work is gone. A recomputable
condition with decay belongs in the queue; a recomputable condition that
is stable belongs in ambient state.

**The calibrating pair (act:ea23b3a5).** The cabinet-roster review
produces three signals. `uncovered-tech` names a specific per-project
gap and proposes adding a cabinet seat — a decision, so it stays a queue
item. `dormant-skill` and `stale-briefing` are measurements, so they
moved to `state/roster-review.json` and render in Ring 1's Standing
Issues.

Three obligations come with moving something to ambient state:

- **Fix the measurement first.** The dormant-skill count was a saturated
  display cap: every project ever measured reported exactly "12 dead",
  because the title was built from an array already sliced to
  `ROSTER_DORMANT_LIST_CAP`. Moving that into seven state files would
  have given a constant the authority of a fact.
- **Render on change, or give it a firing threshold.** Ambient state has
  no dismiss verb — the queue item at least had one. A number that never
  moves in a file read at every briefing is furniture by the third read.
  The precedent is the recall canary, which Ring 1 renders only on alert.
- **Retire what is already filed.** The filing site was usually the only
  code that ever touched those items. Removing it without a one-shot
  supersede leaves them displaying a stale count for weeks beside a live
  ambient line saying something different — dual existence.

**The newest examples (Simplification Project 2, 2026-10-31).**

- **Documentation drift moved to ambient state.** A Ring 4 drift claim
  is a mechanical measurement of a project fact, filed into the inbox as
  `doc-drift` until plan A4. It now lives in
  `state/projects/<slug>/doc-drift.json` and renders as ONE Standing
  Issues line with the count — only when non-zero — and its exit is a
  later pass that re-checked the claim (see Ring 4's state contract).
  The obligations held: the one filing site was the only code touching
  those items, and the queued ones are retired by the backlog walk (plan
  C1, not yet run).
- **The inbox's own growth is ambient state, not an item.** With expiry
  gone (A1), a growing pile is a condition, so Ring 1 MEASURES it and
  renders lines into `state/summary.md`'s `## Inbox` section (every
  start block injects it; the queue is portfolio-wide, so these are
  portfolio lines). Once per UTC day Ring 1 appends
  `{ date, pending_by_category }` for every live category to
  `state/inbox-history.jsonl` (`appendInboxHistory` / `readInboxHistory`,
  lib; a day already present is not re-appended). `computeInboxAlarms`
  (ring1, pure) then raises, in this order: the **revisit trigger**
  (EP3) — live-category pending above 100 on each of the last 14
  calendar days, today included, a gap resets it — `⚠ inbox: above 100
  waiting for 14 days (<n> now) — reopen the start-block question (Q2,
  simplification-2-inbox.md)`; the **growth alarm** (EP1), first arm —
  a live category's pending count strictly rising across five weekly
  samples (today, −7, −14, −21, −28 days, each the nearest recorded day
  within 3 days; silent when any sample is missing) — `⚠ inbox: <label>
  has only grown for 4 weeks (<a> → <b>)`; its second arm — a category
  whose registry entry declares `exit.mechanical`, with filings in the
  last 28 days and zero mechanical closures (`resolved` +
  `resolution_type: 'auto-reconciled'`, or a `routine` superseded by the
  routine engine) — `⚠ inbox: <label>'s automatic exit closed nothing in
  28 days (<n> filed)`; and one **stray-filing** line per producer, most
  frequent first, counting BOTH redirected and refused filings from
  `state/inbox-redirects.jsonl` over 28 days — `⚠ inbox: <producer>
  filed <n> stray item(s) the old way in 28 days (<r> redirected, <f>
  refused) — fix the producer; see state/inbox-redirects.jsonl` (refusals
  count because a refused filing is the larger loss; operator ruling
  2026-11-01). At most 3 alarm lines render, then `…and N more inbox
  alarms`, so `summary.md`'s 30-line cap holds. A count of
  project-tracker friction from sessions whose project could not be
  resolved (`state/residue/unresolved-friction.jsonl`) renders in the
  same section. These are renders of measurements, filed nowhere —
  Ring 1's role is unchanged (plan D3). The revisit trigger is expected
  to fire about two weeks after the backlog walk on today's numbers:
  that is a scheduled reopening of the start-block question with real
  numbers, not an alarm to be silenced.

**Known limitation (named, not hidden):** reconcilers run per
configured project — items whose project was deleted or de-registered
are never visited and age pending until a human disposes them (the
inbox's aging surfaces them). Auto-resolving on "project gone" would
guess; the honest state is pending.

## Deferred Schemas

The following are specified in project notes but NOT formalized until
their owning plan ships:

| Schema | Owner | Ships with |
|--------|-------|-----------|
| `messages/<session-id>.json` | Plan 8 | Session-directed messages |
| `ring3/cursors/<session-id>.json` | Plan 7 | Ring 3 live mode |
| `hooks/<ring>-<phase>.d/` | Plan 9 | Lifecycle hooks |
| `logs/<ring>.log` | Plan 4 | Ring 1 runner |
| `lock/<ring>.pid` | Plan 4 | Ring 1 runner |

## Ring 4 — Periodic Truth Reconciliation (design phase)

> **Superseded — stage 1 BUILT (act:36dae795).** This is the original design
> note, kept for its problem framing. The shipped implementation is documented
> below under "Ring 4 — Truth Reconciliation (built, stage 1)"; read that
> section for current behavior. The "concept" status line below describes the
> pre-build state only.

**Status: concept. Needs design session before implementation.**

Rings 1–3 operate on individual signals: individual files (R1),
individual patterns (R2), individual sessions (R3). Nothing catches
**cumulative drift** — the slow rot where twenty sessions each move
reality a little further from what documents claim, but no single
session is the tipping point.

Ring 4 is the answer to: "Is what we wrote still true?"

### The problem it solves

The maginnis project's architecture briefing said "Layer 4 Not built"
and "tech stack TBD" for three weeks after the platform shipped with
a Rails 8 app, Mantine frontend, 421 RSpec specs, and staging on
Railway. No individual session caused the staleness. No individual
session's debrief would flag it. The drift was invisible until
someone tried to use the briefing for a real audit and found it
described a project that no longer existed.

This class of problem includes:
- **Briefing-to-codebase drift** — claims about architecture, tech
  stack, file layout, or project state that no longer match reality
- **Memory-to-codebase drift** — memory files that reference
  functions, files, or flags that have been renamed or removed
- **CLAUDE.md drift** — sections describing architecture or
  conventions that have been refactored past
- **Plan-to-reality drift** — plan files describing work that's been
  done but never marked complete, or describing approaches that were
  abandoned

### Cadence and weight

Less frequent than R1–R3. Daily or weekly, not per-session or
per-minute. Heavier per run — reads real code, cross-references
document claims against codebase state, may invoke Claude for
semantic comparison. Acceptable cost because it runs rarely and
catches problems that compound silently.

### Relationship to other rings

Following the nervous system principle (not a stack): R4 consumes
signals from R1–R3 (what changed recently, what sessions touched,
what patterns emerged) to prioritize what to reconcile. R4 produces
inbox items when drift is detected. R4 does not mutate documents —
it flags, the user triages and routes.

R3 catches "this session broke the briefing." R4 catches "the
briefing has been slowly wrong for three weeks and nobody noticed."
They're complementary, not redundant.

### Open design questions

- **Scope per run:** Reconcile everything every time, or rotate
  through documents on a schedule? Full sweep is thorough but
  expensive; rotation risks missing urgent drift on off-cycle docs.
- **Drift threshold:** How wrong does a document need to be before
  it's worth flagging? A missing model in the architecture briefing
  is clear; a slightly outdated line count is noise.
- **Trigger vs schedule:** Pure schedule (weekly), or also triggered
  when R1/R2 detect significant codebase changes (new migration,
  major refactor, new dependency)?
- **Cross-project scope:** Per-project reconciliation, or also
  cross-project (e.g., a CC template claiming something about
  consumer behavior that's no longer true)?
- **Relationship to Ring 2 slow tier:** R2 slow already does some
  staleness detection (stale work, memory hygiene). Where's the line
  between R2's "is this work item stale?" and R4's "is this document
  still true?" Is R4 an extension of R2 slow, or genuinely distinct?

## Ring 4 — Truth Reconciliation (built, stage 1)

**Status: BUILT (act:36dae795). Supersedes the design-phase section
above** — the open design questions there are now resolved here.
Implemented in `templates/scripts/watchtower-ring4.mjs` (the ring) +
`templates/scripts/watchtower-ring4-runner.sh` (PID-locked runner,
modeled on the Ring 2 runner). Hermetic suite:
`templates/scripts/__tests__/ring4-reconcile.test.mjs`. Cron/launchd
registration is a `/watchtower install` follow-up, not part of this
build.

### What it does

Periodically compares documentary CLAIMS against codebase REALITY and
records drift in the project's state (`state/projects/<slug>/doc-drift.json`
— never the inbox since Simplification Project 2, plan A4). Reconciliation
is COMPARISON, NOT generation — Ring 4 never rewrites a document; it
records drift with enough context to fix, and the start block shows it. Stage 1 is PURELY
MECHANICAL (no Claude API call), which keeps the cron cheap and the
ring hermetically testable.

It owns two ledger duties at orient/debrief retirement
(`orient-debrief-coverage-ledger.md` §C/§D): documentation staleness
(CLAUDE.md key-file claims, briefing files, system-status) and the
dropped embedded-pulse description-accuracy spot checks (counts). The
standalone `/pulse` stays invocable on demand.

### Resolved design questions

- **Scope per run → rotation, not full sweep.** Each run reconciles at
  most `RING4_PROJECT_CAP` (3) projects, least-recently-reconciled
  first, BUT a project with commits since its last reconcile jumps the
  queue. This is the nervous-system principle in mechanical form: R4
  consumes R1's signal (git recency) to prioritize, rather than
  blind-sweeping the portfolio. State in `state/ring4-reconcile.json`
  (`last_run`, `projects_checked`).
- **Drift threshold → mechanical existence/counts, high precision.**
  Stage 1 flags only (a) a backtick-fenced repo-relative path that is
  missing on disk, gated so the path's TOP-LEVEL directory still
  exists (kills illustrative/foreign-path noise — `webapp/...` in a
  CC memory file is skipped because `webapp/` isn't a repo dir) and
  not gitignored (a gitignored absent path is a generated/local
  artifact — its absence is expected, not drift); and (b) a count
  claim that disagrees with a mechanical file count, but ONLY for
  config-declared count rules (zero-noise default). A "slightly
  outdated line count" is deliberately NOT flagged.
- **Trigger vs schedule → weekly cadence + git-recency priority.** A
  weekly gate (`RECONCILE_INTERVAL_DAYS`, mirrors Ring 2's roster
  review) plus git-recency-driven project order, rather than coupling
  to R1/R2 internal trigger files.
- **Relationship to Ring 2 → genuinely distinct ring.** R2 slow asks
  "is this WORK ITEM stale?" (pib-db state); R4 asks "is this DOCUMENT
  still true?" (doc claims vs codebase). Distinct cadence (weekly vs
  30-min), distinct runner/cron, distinct produced category.
- **Cross-project → per-project only, stage 1.** A CC template
  claiming something about consumer behavior is a documented future
  extension, not built.

### The document set (current-reality docs only)

`collectDocuments()` scans docs consumed AS TRUTH, capped at
`RING4_DOC_CAP` (40): root `CLAUDE.md`, `system-status.md` (root and
`.claude/`), `.claude/cabinet/_briefing*.md`, and the project's
built-in memory entries (`MEMORY.md` + curated `*.md`). It
deliberately EXCLUDES `.claude/plans/` and `.claude/methodology/`:
those are HISTORICAL records — a plan for retired work SHOULD
reference now-deleted files, so path-existence over them is mostly
noise (the CC dogfood produced ~90 false claims from historical plans;
filtering to current-reality docs + gitignore-awareness cut it to 2
real findings). Whether a plan is actually DONE — plan-to-reality
drift — is a distinct SEMANTIC check, deferred.

### Memory is DRIFT-SUPERSEDE only

The memory pass is the missing-path reconciler applied to memory files
("is what we wrote still true?" — entries referencing renamed/removed
files). Paths in a memory file resolve against the PROJECT root, not
the memory dir. Memory HYGIENE (budget / decay / consolidate) is NOBODY's
now: Ring 2 slow's `runMemoryHygiene` / `surfacePersistentViolations`
were deleted with the curated write path on 2026-09-29 (Simplification
Project 1, plan A5) and the platform enforces its own index cap —
Ring 4 does NOT pick that role up (the act:36dae795 2026-06-16 scope
note forbade a second memory-health producer; there is now no first).

### State contract (formerly "Inbox contract")

Until 2026-10-31 findings filed `doc-drift` inbox items (measured
2026-10-30: 17 filed in 28 days, none closed by the operator). Ring 4 has no
session, so a drift claim is a PROJECT fact, not a decision to queue
(Simplification Project 2, plan A4 / Decision 4 / decision default 18,
act:dafa9afa). Now each finding is UPSERTED into
`state/projects/<slug>/doc-drift.json` (`upsertDocDriftEntry`, watchtower-
queue, fs-only, re-exported by lib) — `{ entries: [{ drift_key, kind,
doc, title, summary, filed_by: 'ring4', project_path, first_seen,
last_seen, …finding fields }] }`, ONE entry per `drift_key` (`path:<doc>`
for missing-path, `count:<doc>:<label>` for count-mismatch); a known key
keeps `first_seen` and refreshes the rest. At most `RING4_ITEM_CAP` (8)
NEW claims are recorded per run; the rest wait for the next run.

**The exit is the next pass that actually re-checked the claim.**
`scanProject` returns `checkedKeys` beside its findings, and
`retractDocDriftEntries` removes every entry whose key was checked this
pass and NOT found — computed over every finding, recorded or over the
cap, so a capped claim is never cleared for being unrecorded. An entry
the pass never checked (its document was not collected, its project was
not selected, or a consumer hook wrote it under a key Ring 4 does not
mint) stays: absence of evidence is not evidence a claim cleared.

**The reader is Ring 1.** `assembleProjectState` adds ONE Standing Issues
line when the file has entries — "N documentation claim(s) no longer
match the tree — <path>" — and nothing when it is empty; the start block
injects the project state. A stray `doc-drift` filing (flow's
`ring2-slow-post/10-pulse-mechanical.mjs` hook) is redirected by
`createItem` into the same file under a `filed:<title>` key, which can
never collide with Ring 4's keys, so Ring 4's retraction never removes
an entry it did not write. The weekly cadence bounds re-checking.
Project 4 moves the check itself into `/close`.

### Config

Feature flag `defaults.truth_reconciliation` (default true) gates the
whole ring; `ring_frequencies.ring4` (604800 = weekly) carries the
intended cron interval. Count rules are per-project and opt-in:
`projects[<name>].reconcile.count_rules = [{ label, doc, pattern,
glob }]` where `pattern` is a regex source with one capture group
around the number and `glob` uses the small dependency-free grammar in
`countGlob` (`dir/*`, `dir/prefix-*/`, `dir/*.ext`, `dir/**/*.ext`).
Default empty → the count pass no-ops (no false drift).

### Deferred (future stages)

Semantic comparison (does this prose paragraph still describe the
code?), plan-to-reality / plan-status reconciliation, dependency-
version drift beyond the count-rule mechanism, gitignored-directory
patterns that don't match a non-existent path, and cross-project
template-vs-consumer reconciliation.

## Consumer Hook Contract (Plan 9)

The formalized extension model for **non-interactive** consumer customs at
the ring lifecycle seams (act:4a6e907c). Supersedes the deferred-schema
placeholder `hooks/<ring>-<phase>.d/` above — the real location is
per-project, not a global runtime dir. Interactive customs are owned by
routine dispatch (act:c2a55c08, "Routine Dispatch" above), never by hooks.

### Seams and invocation

The rings already invoke consumer hooks by running each command string in
`config.hooks[<seam>]` with the ring's state JSON on stdin. Three seams:

| Seam | Ring / scope | Outer timeout |
|------|--------------|---------------|
| `ring1-post-collect` | Ring 1, per project, post state-collect | 30s |
| `ring2-slow-post` | Ring 2 slow tier, portfolio-wide | 60s |
| `ring3-close-post` | Ring 3, per session close | 120s |

`watchtower-hook-runner.mjs --seam <seam>` is registered ONCE per seam (via
`--register`, called by `/watchtower install`). The rings invoke it like any
hook command — the rings are NOT modified. The runner then resolves the
target project(s) and runs that project's hook scripts.

### Registration (drop-a-file)

A consumer registers a hook per-project by placing an executable script in
`<project-root>/.claude/watchtower/hooks/<seam>/`. Presence is registration —
no config editing. Discovery is name-sorted (numeric-prefix convention:
`10-foo.sh` before `20-bar.sh`). A file is runnable if it has the executable
bit (run directly, shebang decides the interpreter) or a known extension
(`.sh`/`.bash` → bash, `.mjs`/`.js`/`.cjs` → node, `.py` → python3); other
files (`.json`, `.md`, …) are ignored. Files prefixed `_` or `.` are skipped
(disable convention).

### Project resolution

- Single-project seams (`ring1-post-collect`, `ring3-close-post`): the project
  is taken from the ring's stdin state (`.path`/`.name`, or `.project_path`/
  `.project`).
- Portfolio seam (`ring2-slow-post`): the slow state carries no project, so the
  runner enumerates `config.projects` and runs each project's seam dir.

### Hook I/O contract

A hook script receives:
- **stdin:** the ring's state JSON, verbatim (see the seam table for shape).
- **cwd:** the project root.
- **env:** `WATCHTOWER_SEAM`, `WATCHTOWER_PROJECT`, `WATCHTOWER_PROJECT_PATH`,
  `WATCHTOWER_SESSION_ID` (ring3), `WATCHTOWER_HOOK_DIR`.

A hook script returns:
- **exit 0** = success; non-zero = failure (isolated, recorded, never fatal).
- **stdout:** optional JSON. `{"additional_checks":[…]}` is the Ring 1
  passthrough — the runner surfaces those at the envelope top level so Ring
  1's existing `parsed.additional_checks` consumption works. Other JSON is
  captured as structured `output`; non-JSON is captured verbatim (truncated).
- **stderr:** captured for diagnostics; non-fatal.

### Isolation and budget

The runner is bulletproof: any single hook's failure (non-zero exit, timeout,
spawn error) becomes a typed status (`failed` / `timeout`) and never aborts
the loop, and the runner always prints a valid envelope and exits 0 — one bad
consumer hook can never break a ring tick. Because the runner is a single
command sharing the ring's one timeout envelope, it runs hooks sequentially
against a deadline (the seam timeout minus headroom) and marks any hook it
can't reach in time `skipped` (reason `budget-exhausted`) — no silent
truncation. `WATCHTOWER_HOOK_BUDGET_MS` overrides the per-seam budget.

### Output envelope

```json
{ "schema_version": 1, "seam": "<seam>",
  "targets": [{ "name": "...", "path": "..." }],
  "hooks": [{ "hook": "<path>", "project": "...", "status": "success|failed|timeout|skipped", "output"?: ..., "exit"?: N, "stderr"?: "...", "reason"?: "budget-exhausted" }],
  "additional_checks"?: [ ... ] }
```

### Migration shim

`watchtower-phase-shim.mjs --phase <path> [--cwd <dir>] [--seam <seam>]` is the
adapter for an EXISTING repo script (a former orient/debrief phase) that
expects the project root as cwd rather than reading stdin. Registered as a one
-line `config.hooks[<seam>]` entry, it runs the target with the same cwd/env/
stdin normalization and passes JSON stdout through transparently (preserving
`additional_checks`), propagating the target's exit code. New hooks prefer the
drop-in directory; the shim is for scripts that already exist.

## Decision Lineage (read-only projection — Plan 12, act:a2efc0ce)

The `/briefing lineage` drill-down answers "what past decisions still
constrain THIS project, and what's reversible?" It is a **projection** over
existing stores, never a new store, and it **writes nothing** — no state file,
no inbox item, no memory write. This is the structural invariant: the engine
holds no persisted copy, so it cannot drift from its sources.

`watchtower-narrative-corpus.mjs` is the read-only substrate helper. It covers
the two watchtower-NATIVE stores so it needs no auto-memory-dir resolver:

- `assembleNarrativeCorpus({cwd})` — current project ONLY (resolved
  worktree-aware via `resolveProjectIdentity`; no free `project` arg, so the
  five-namespace keying footgun can't arise). Returns `inbox_decisions`
  (knowledge-extraction items; `resolution_type: 'captured-to-memory'`
  duplicates dropped so a decision that became a memory file isn't
  double-counted; `superseded` status KEPT — it is the supersession view's
  own subject), `thread_cursors` (full `cursor_history` timelines),
  `per_store_counts`, `skipped_unresolved` (phantom-key items repo-wide that
  the resolver couldn't attribute — surfaced, never silently dropped),
  `time_span`. CLI: `--corpus --project-path <cwd>`.
- `parseDecisionEdges(markdown)` (pure) + `readMemoryDecisions(dir)` — the
  memory/methodology/pib stores are read by the `/briefing` CONSUMER (which
  resolves their paths), but the EDGE RULE lives here, tested: a
  `**Supersedes:**` block is a RECORDED directional edge; a `[[wikilink]]` is
  an undirected see-also and is **never** rendered as a supersession. CLI:
  `--memory <consumer-resolved-dir>`.

Provenance is load-bearing because a narrative is a trust surface: the render
labels *recorded* edges (parsed `Supersedes:` / pib `absorbs act:`) distinctly
from *inferred* ones (model-read from prose), and never presents an inferred
link as recorded history. Deliberately a SIBLING of `watchtower-snapshot.mjs`
(same reader family, same hermetic-test shape), touching zero ring code. Tests:
`__tests__/narrative-corpus.test.mjs`. Staged: the machine-readable
supersede-edge discipline (making edges consistent + live) is deferred and
MERGES INTO the cross-store `supersede` verb
(`.claude/plans/cross-store-memory-redesign.md`, Ring 2-slow), not a fork.

## Cross-Ring Reader (read-only projection — Stage 1, act:f5814d6c)

`watchtower-cross-ring-reader.mjs` is the synthesis SUBSTRATE for `/briefing`:
one call assembles, per configured project, what every ring produced —
Ring 1's parsed state-file sections + git-attention facts, Ring 3's recent
session summaries + thread cursor timelines, and the inbox's pending counts +
resolution history (`resolution_mix`: what the operator's dispositions
actually engaged vs discarded). The script GATHERS; the consumer SYNTHESIZES —
no convergence scoring or cross-store "insight" is computed here (a
mechanical projection on a trust surface must not fabricate synthesis). Like
its siblings it is a **projection** over existing stores, never a new store,
and it **writes nothing** — no write path exists in the module; the hermetic
test asserts the filesystem is untouched.

**Per-store join keys** (name = `config.projects` key, slug = `slugify(name)`;
the reader derives both exactly as `resolveProjectIdentity` does, parity-tested):

| Store | Located by | Key |
|-------|-----------|-----|
| Ring 1 state file | `state/projects/<slug>.md` | slug |
| Ring 3 sessions | `state/projects/<slug>/sessions/*.md` | slug |
| Threads | `sessions[].project` via `threadMatchesProject` | slug |
| git-attention facts | `fact.project` | name |
| Inbox items | `item.project` via `listItems` | name |

**Ring 2 has no dedicated block by design.** Its durable outputs already
arrive through two covered channels — pattern-promotion items ride the inbox,
and the recall canary is projected into Ring 1's Standing Issues — so a
dedicated block would double-report inside one output. Enrichment BODIES stay
behind the Enrichment Directory contract (`/inbox` reads them per-item).

**Honesty fields** (the complement of the config-driven walk — nothing falls
silently between views): `unattributed_items` (partitioned on config-key
MEMBERSHIP, not the `project_unresolved` flag), `orphan_threads`,
`orphaned_state_files`, `duplicate_path_warning` (realpath-compared),
per-view `path_exists` + `attributed_but_flagged`, and windowing counts
(`sessions_total` / `sessions_in_window` / `sessions_included`). Sessions
order by each file's content `Date:` line (same-day filenames sort randomly
by uuid). `superseded`/`expired` items never stamp `resolved_at`, so they are
reported as filed-date-window counts, never blended into the disposition-time
`resolution_mix`; untyped `resolution_type` lands in `untyped_or_other`,
counted, never dropped.

**Output-size caps, always with totals** (CP3: an uncapped live portfolio
measured 1.37 MB — no consumer channel carries that): thread histories keep
the newest `THREAD_HISTORY_CAP` (3) snapshots with per-thread `history_total`
(the full evolution is lineage mode's job — `projectCursorTimeline` itself is
uncapped); the resolution-event list keeps the newest `RESOLUTION_EVENTS_CAP`
(20) with `resolution_events_total` while `resolution_mix` counts ALL events.
The consumer sees "3 of 85", never a silently complete-looking 3. The
briefing consumes by writing `--portfolio` to a temp file and Reading slices —
never by echoing JSON through a truncating shell channel. `--project` accepts
the config-key name or a UNIQUE slug match (the /briefing scope filter is
slug-shaped).

**Consumer:** `/briefing` Step 1d — the reader is the REPLACEMENT gather path
for the old per-store state/thread reads (with a raw-read fallback for
consumers that haven't reinstalled), and its output feeds Step 3a chunk
synthesis and Step 4 cross-cutting synthesis. Pending counts are a narration
snapshot; the briefing's live `listPending()` load remains the disposition
source of truth. The 4-field cursor projection (`projectCursorTimeline`) has
its ONE definition here; `watchtower-narrative-corpus.mjs` imports it
(watchtower-lib is ring-loaded and soak-frozen, so the shared helper lives in
the non-ring reader). CLI: `--portfolio | --project <name> | --project-path
<cwd>`, `--since <ISO|Ndays>` (default 14d, UTC). Tests:
`__tests__/cross-ring-reader.test.mjs`.

**Staged:** precompute-and-cache (a Ring 2 slow-tier phase persisting the
view) is Stage 2, deferred until the recall-canary soak lifts; consolidating
the cursor projection into watchtower-lib waits for the same gate.

## Recall Index and Recall Log (Simplification Project 1, plan B2, act:79be8765)

`watchtower-recall.mjs` keeps ONE SQLite FTS5 index per registered project at
`state/recall/<slug>.sqlite` (runtime tier) over four sources, tagged in a
`source` column: `sessions` (`state/projects/<slug>/sessions/*.md`), `memory`
(every `*.md` under the project's memory dir EXCEPT the ONE exported exclusion
list `MEMORY_INDEX_EXCLUSIONS` — `MEMORY.md`, `MEMORY-archive.md`,
`MEMORY-pre-trim-*.md`; the index-trim script references it, never a second
list), `archive` (`state/recall/<slug>/archive/extraction-drafts/*.md`) and
`transcripts` (`state/projects/<slug>/transcripts/*.txt`). A source dir that
does not exist is zero docs, never an error. The index is refreshed
incrementally by `(mtime, size)` at the start of every `search` and on Ring
1's tick (`refreshRecallIndexes`, continue-on-failure per project); a missing
index is built. Writers: the script (on `search`/`build`) and Ring 1 (tick).
Readers: `/recall`, `/memory`, the probe, and plan C2's trim gate (`status`
must report docs before `--apply`).

**The recall log** — `state/recall-log.jsonl`, append-only, ONE line per
`search`, written by the verb itself (never transcript parsing), the
retrieval instrument's invocation/hit source:

```
{ ts, project, query, k, hits, hits_by_source, top_paths, session_id, caller }
```

`project` is the REGISTERED project name (the instrument accepts the slug
too); `hits` is the number of results returned — `hits: 0` is the empty
outcome the instrument counts; `hits_by_source` counts the returned rows per
source; `top_paths` are the returned paths in rank order (the instrument's
secondary `recall_results_read` joins them to the session's transcript);
`session_id` is whatever `--session-id` carried (the `/recall` skill passes
the id from the session-start acknowledgment line — `CLAUDE_SESSION_ID` is not
set in Bash) or `null`, in which case the instrument falls back to a
`ts`-window join and reports `unjoined`; `caller` is `skill` | `probe` |
`cli`. The shape is additive: new fields ride alongside; readers default
missing fields. A failed append logs and never fails the recall.

**Session-start acknowledgment carries the session id.** The session-start
hook passes its stdin `session_id` to `watchtower-build-context.mjs
--session-id`, which appends `Session id: <id> — pass it to /recall as
--session-id` to the acknowledgment block. The id is for the recall log's
join key only; the session never prints it to the operator.

## The Draft Archive and the `archived` Closure (Simplification Project 1, plan C1, act:93a52285)

The knowledge-extraction category has no producer (retired in the detector
registry). What it left in the queue — every `pending` AND `expired` item — is
archived once, by `watchtower-archive-drafts.mjs`, into runtime state OUTSIDE
the platform's memory folder (so the platform's background consolidation never
reads the drafts as input):

```
state/recall/<slug>/archive/extraction-drafts/<item id>.md   (a registered project)
state/recall/unresolved-drafts/<item id>.md                  (no registered project)
```

`<slug>` is the registered project slug `resolveProjectIdentity` returns — the
key the session records use under `state/projects/<slug>/` and the directory
the recall index reads as its `archive` source. An item is attributed by its
recorded project when that is a config key Ring 3 did not flag
`project_unresolved`, else by decoding its transcript directory slug
(`resolveProjectFromTranscriptSlug`, cleaned-up worktrees); anything else is
UNRESOLVED — filed under `unresolved-drafts/` and listed in the run report,
never guessed into a project and never dropped. `unresolved-drafts/` is not a
recall source.

**File shape.** YAML frontmatter — `source: extraction-draft`, `queue_item`,
`session_id`, `project`, `filed_at`, `home`, `type`, `prior_status`
(`pending` | `expired`), `archived_at` (plus `project_unresolved: true` on an
unresolved file; a field the item never carried is `null`) — then `# <title>`
and the item's `draft_artifact` VERBATIM, or, for an item with no draft, its
summary and its evidence fields. An item with neither still archives.

**The closure.** `archiveItem(id, { archive_path })` in `watchtower-queue.mjs`
— the ONLY door that closes an `expired` item: `status: 'resolved'`,
`resolution_type: 'archived'`, `resolution: <archive path>`, `resolved_at`
stamped, and the prior status and prior `resolution_notes` PREPENDED to the new
note (`[was expired: Auto-expired by age policy] …`). No new status value, so
the title-dedup corpus already covers these items. `archived` is a MACHINE type
in the inbox assessment (`MACHINE_TYPES`). The door is fenced: any category
other than knowledge-extraction throws (it is not a way around a recipient
gate); an already resolved/dismissed/superseded item is a no-op; the archive
file must exist before the item closes.

**The run.** `--dry-run` prints the disposition map (per project and per
status, with and without a draft; the unresolved items listed with their
recorded project strings; every item attributed by transcript slug rather than
by its recorded name listed too) and writes nothing. `--apply` first copies the
top-level item files to `queue/items-backup-<date>-draft-archive/` and refuses
to proceed unless the backup holds what was listed (an existing same-day
backup is kept, and must hold every item the run would change); it then
re-reads each item, writes the archive file unless one exists, and closes the
item. A `<id>.json.tmp` residue file and an unparseable item are skipped and
reported by path. Nothing is deleted — no queue item file, memory file,
session record or transcript. `--report` counts the category by status and
resolution type and checks every archived item's `resolution` path exists
(exit 0 only when none is pending or expired and no path is missing).
Mutation-tested in `__tests__/archive-drafts.test.mjs`.
