create-claude-cabinet 0.51.0 → 0.52.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/README.md +35 -28
  2. package/lib/modules.js +5 -4
  3. package/package.json +1 -1
  4. package/templates/CLAUDE.md +32 -11
  5. package/templates/EXTENSIONS.md +7 -0
  6. package/templates/README.md +3 -3
  7. package/templates/briefing/_briefing-template.md +1 -1
  8. package/templates/briefing/_briefing-work-tracking-template.md +3 -3
  9. package/templates/cabinet/_cabinet-member-template.md +10 -7
  10. package/templates/cabinet/memory-lifecycle-contract.md +16 -0
  11. package/templates/cabinet/pib-db-access.md +1 -1
  12. package/templates/cabinet/pib-db-triggers.md +20 -16
  13. package/templates/cabinet/watchtower-contracts.md +119 -0
  14. package/templates/engagement/pib-db-patches/pib-db-mcp-server.mjs +2 -2
  15. package/templates/memory/patterns/_pattern-template.md +1 -1
  16. package/templates/rules/enforcement-pipeline.md +2 -2
  17. package/templates/rules/memory-capture.md +2 -2
  18. package/templates/scripts/__tests__/absorption-no-prune.test.mjs +89 -0
  19. package/templates/scripts/__tests__/assessment-recalibration.test.mjs +0 -2
  20. package/templates/scripts/__tests__/batch-disposition.test.mjs +7 -9
  21. package/templates/scripts/__tests__/draft-surfacing.test.mjs +46 -162
  22. package/templates/scripts/__tests__/extraction-classification.test.mjs +219 -0
  23. package/templates/scripts/__tests__/fixtures/read-pass-2026-07-14.json +325 -0
  24. package/templates/scripts/__tests__/fold-similarity.test.mjs +290 -0
  25. package/templates/scripts/__tests__/hold-verb.test.mjs +149 -0
  26. package/templates/scripts/__tests__/reach1-inbox-relations.test.mjs +274 -0
  27. package/templates/scripts/__tests__/reach2-significance.test.mjs +300 -0
  28. package/templates/scripts/__tests__/read-pass-fixture.test.mjs +71 -0
  29. package/templates/scripts/__tests__/ring3-outage-backfill.test.mjs +156 -0
  30. package/templates/scripts/memory-consolidation-scan.mjs +149 -0
  31. package/templates/scripts/pib-db-mcp-server.mjs +2 -2
  32. package/templates/scripts/watchtower-build-context.mjs +33 -1
  33. package/templates/scripts/watchtower-lib.mjs +167 -1
  34. package/templates/scripts/watchtower-queue.mjs +192 -53
  35. package/templates/scripts/watchtower-ring1.mjs +120 -2
  36. package/templates/scripts/watchtower-ring2.mjs +49 -112
  37. package/templates/scripts/watchtower-ring3-close.mjs +728 -38
  38. package/templates/skills/audit/SKILL.md +5 -5
  39. package/templates/skills/cabinet-system-advocate/SKILL.md +2 -2
  40. package/templates/skills/cabinet-workflow-cop/SKILL.md +5 -3
  41. package/templates/skills/cc-feedback/SKILL.md +4 -4
  42. package/templates/skills/cc-remember/SKILL.md +4 -4
  43. package/templates/skills/close/SKILL.md +63 -9
  44. package/templates/skills/debrief/SKILL.md +14 -8
  45. package/templates/skills/debrief/phases/qa-handoff-sweep.md +12 -9
  46. package/templates/skills/dx-feedback/SKILL.md +1 -1
  47. package/templates/skills/inbox/SKILL.md +85 -16
  48. package/templates/skills/memory/SKILL.md +1 -1
  49. package/templates/skills/onboard/SKILL.md +42 -33
  50. package/templates/skills/onboard/phases/detect-state.md +3 -2
  51. package/templates/skills/onboard/phases/generate-briefing.md +3 -2
  52. package/templates/skills/onboard/phases/generate-session-loop.md +70 -37
  53. package/templates/skills/onboard/phases/interview.md +17 -12
  54. package/templates/skills/onboard/phases/modularity-menu.md +33 -19
  55. package/templates/skills/onboard/phases/options.md +3 -1
  56. package/templates/skills/onboard/phases/post-onboard-audit.md +17 -11
  57. package/templates/skills/onboard/phases/summary.md +15 -12
  58. package/templates/skills/onboard/phases/work-tracking.md +14 -8
  59. package/templates/skills/orient/SKILL.md +7 -5
  60. package/templates/skills/pulse/SKILL.md +23 -18
  61. package/templates/skills/seed/phases/build-member.md +5 -3
  62. package/templates/skills/session-handoff/SKILL.md +72 -45
  63. package/templates/skills/spring-clean/SKILL.md +15 -13
  64. package/templates/skills/triage-audit/SKILL.md +3 -3
package/README.md CHANGED
@@ -18,8 +18,9 @@ and weigh in when their expertise matters:
18
18
  - **Briefings** — project context members read before weighing in
19
19
  - **Committees** — members grouped by concern so you convene the right
20
20
  experts for the right question
21
- - **The session loop** — `/orient` briefs you at the start, `/debrief`
22
- closes the loop for next time
21
+ - **The session loop** — watchtower keeps your project's state current in
22
+ the background and hands it to you when a session opens; `/close` ends a
23
+ session (legacy: `/orient` + `/debrief` by hand)
23
24
 
24
25
  ## Install
25
26
 
@@ -56,25 +57,28 @@ it's done, open Claude Code and run `/onboard`.
56
57
 
57
58
  ## What You Get
58
59
 
59
- ### The Session Loop (always installed)
60
+ ### The Session Loop (installed by default)
60
61
 
61
- This is the foundation. You run these commands they don't happen
62
- automatically.
62
+ Continuity between sessions, so Claude never starts blind. By default this
63
+ is **watchtower** — a background system that keeps your project's state
64
+ current and hands it to Claude when a session opens.
63
65
 
64
- - **`/orient`** open every session with this. Claude reads project
65
- state, checks health, surfaces what needs attention, and briefs you
66
- so you never start blind. Think of it as the briefing before the
67
- cabinet gets to work.
68
- - **`/debrief`** — close every session with this. Claude marks work
69
- done, records lessons, updates state, and prepares the briefing for
70
- next time. Without debrief, the next orient starts with stale
71
- information. The loop is what gives Claude memory across sessions.
66
+ - **Sessions start informed** watchtower's SessionStart hook injects the
67
+ current state (what you were working on, what's due, what broke). No
68
+ start-of-session command to run.
69
+ - **`/briefing`** review what needs attention across the project.
70
+ - **`/close`** (or **`/session-handoff`**) end a session; the background
71
+ rings handle inventory, lesson capture, and routing after you walk away.
72
72
 
73
- **The habit matters.** Orient and debrief take 30 seconds each. Skip
74
- them and sessions start from zero Claude forgets what happened,
75
- repeats mistakes, and you spend the first 10 minutes re-explaining
76
- context. Keep the loop and each session picks up where the last one
77
- left off.
73
+ Watchtower is installed by default; its background rings start when you run
74
+ **`/watchtower install`**. Until then it ships the skills and a dormant
75
+ SessionStart hook nothing runs in the background and no API cost is
76
+ incurred.
77
+
78
+ **Prefer to run it by hand?** Opt out of watchtower and use the legacy
79
+ loop instead — **`/orient`** at the start (reads state and briefs you) and
80
+ **`/debrief`** at the end (marks work done, records lessons). Both still
81
+ ship, but watchtower replaces them.
78
82
 
79
83
  ### The Cabinet (included in lean)
80
84
 
@@ -129,7 +133,7 @@ you already use GitHub Issues, Linear, or something else.
129
133
  Claude Code has built-in file memory, but no guardrails around it.
130
134
  The memory module adds structure:
131
135
 
132
- - **`/cc-remember`** — write a new memory with automatic indexing. Every memory gets its own file and is made reachable from `MEMORY.md` — by a direct entry or a region pointer — so `/orient` can find it next session.
136
+ - **`/cc-remember`** — write a new memory with automatic indexing. Every memory gets its own file and is made reachable from `MEMORY.md` — by a direct entry or a region pointer — so the session loop can surface it next session.
133
137
  - **`/memory`** — browse and search what Claude remembers.
134
138
  - **Validation** — `validate-memory.mjs` checks that the index stays within Claude Code's session-start budget and that every memory file is reachable from `MEMORY.md`. A PostToolUse hook flags unreachable writes in real time.
135
139
 
@@ -181,14 +185,17 @@ e2e harness.
181
185
 
182
186
  The rhythm of each session:
183
187
 
184
- 1. **Start a session** → `/orient` (get briefed)
188
+ 1. **Start a session** → watchtower briefs you automatically; `/briefing`
189
+ for the full picture (legacy loop: `/orient`)
185
190
  2. **Do your work** → talk to Claude, use `/plan` for anything non-trivial
186
191
  3. **Build it** → `/execute` to implement approved plans with cabinet oversight
187
192
  4. **Check quality** → `/audit` occasionally for a full cabinet review
188
- 5. **Close the session** → `/debrief` (close the loop)
193
+ 5. **Close the session** → `/close` (the rings capture the rest after you
194
+ walk away; legacy loop: `/debrief`)
189
195
 
190
- Steps 1 and 5 are the minimum. Everything in between is yours to use as
191
- needed. The more you use, the more the cabinet learns about your project.
196
+ Step 5 is the minimum start is automatic under watchtower. Everything in
197
+ between is yours to use as needed. The more you use, the more the cabinet
198
+ learns about your project.
192
199
 
193
200
  ## How It Works
194
201
 
@@ -243,7 +250,7 @@ npx create-claude-cabinet --frontier-model claude-fable-5 # Designate your fron
243
250
 
244
251
  ### Frontier-model watchdog
245
252
 
246
- `--frontier-model <model>` records, once, which model your heavy thinking is supposed to run on. The designation is per-operator (stored in `~/.claude/cc-registry.json` under `frontierModel`, not per-project), and the installer prints the effective value on every run. From then on, `/orient` and, on watchtower installs, the SessionStart hook — compares the session's actual model against it and leads the briefing with a loud warning on mismatch. The key can be an exact model ID (`claude-fable-5`, exact match required) or a family alias (`fable`, matches any model ID containing it). This is **visibility only**: nothing is pinned, blocked, or rerouted — it just makes "you're accidentally on the wrong model" impossible to miss. A stale key after a model-family transition nags loudly by design; update it with the same flag.
253
+ `--frontier-model <model>` records, once, which model your heavy thinking is supposed to run on. The designation is per-operator (stored in `~/.claude/cc-registry.json` under `frontierModel`, not per-project), and the installer prints the effective value on every run. From then on, the SessionStart hook (on watchtower installs, the default) and `/orient` on the legacy loop — compares the session's actual model against it and leads the briefing with a loud warning on mismatch. The key can be an exact model ID (`claude-fable-5`, exact match required) or a family alias (`fable`, matches any model ID containing it). This is **visibility only**: nothing is pinned, blocked, or rerouted — it just makes "you're accidentally on the wrong model" impossible to miss. A stale key after a model-family transition nags loudly by design; update it with the same flag.
247
254
 
248
255
  ## What Gets Installed
249
256
 
@@ -252,7 +259,7 @@ source code.
252
259
 
253
260
  ```
254
261
  .claude/
255
- ├── skills/ # orient, debrief, plan, execute, audit, etc.
262
+ ├── skills/ # watchtower, plan, execute, audit, orient, debrief, etc.
256
263
  │ └── cabinet-*/ # 34 cabinet member definitions
257
264
  ├── cabinet/ # committees, lifecycle, composition patterns
258
265
  │ # (incl. pib-db-access.md, pib-db-triggers.md)
@@ -294,10 +301,10 @@ with Claude everywhere.
294
301
  - **Your identity** (`~/.claude/CLAUDE.md`) — set up once, carries to
295
302
  every project. Claude always knows who you are and what you do.
296
303
  - **Project registry** (`~/.claude/cc-registry.json`) — tracks all
297
- your projects. `/onboard` asks how they relate; `/orient` flags
304
+ your projects. `/onboard` asks how they relate; the session loop flags
298
305
  when work in one might affect another.
299
- - **Debrief maintenance** — if you mention something new about yourself
300
- or your project evolves, `/debrief` proposes updating your profile
306
+ - **Profile maintenance** — if you mention something new about yourself
307
+ or your project evolves, session close proposes updating your profile
301
308
  and registry so the next session starts current.
302
309
 
303
310
  Install in each project folder. They're independent but aware of each
package/lib/modules.js CHANGED
@@ -15,8 +15,8 @@
15
15
  // unchanged.
16
16
  const MODULES = {
17
17
  'session-loop': {
18
- name: 'Session Loop (orient + debrief)',
19
- description: 'The briefing cycle. Claude starts each session informed, ends by preparing the next briefing.',
18
+ name: 'Session Loop (shared verbs + legacy orient/debrief)',
19
+ description: 'The mandatory session verbs (/menu, /session-handoff) plus the legacy orient/debrief skeletons and their -classic reversibility copies. Watchtower (installed by default) is the live session loop; orient/debrief are the opt-out fallback.',
20
20
  mandatory: true,
21
21
  templates: [
22
22
  'skills/orient',
@@ -209,9 +209,9 @@ const MODULES = {
209
209
  },
210
210
  watchtower: {
211
211
  name: 'Watchtower (continuous background state)',
212
- description: 'Replaces orient/debrief with continuous background processing. Three rings (mechanical cron, Claude intelligence, session-aware), ambient state injection via SessionStart hook, and an inbox for extracted knowledge and signals. Sessions start informed with minimal context cost.',
212
+ description: 'The default session loop. Continuous background processing replaces the legacy orient/debrief skeletons: four rings (mechanical cron, Claude intelligence, session-aware, truth reconciliation), ambient state injection via SessionStart hook, and an inbox for extracted knowledge and signals. Sessions start informed with minimal context cost. Installing the module ships the skills + dormant SessionStart hook; the background rings start only when you run /watchtower install. Opt out to fall back to the legacy orient/debrief loop.',
213
213
  mandatory: false,
214
- default: false,
214
+ default: true,
215
215
  lean: false,
216
216
  templates: [
217
217
  'scripts/watchtower-validate.mjs',
@@ -251,6 +251,7 @@ const MODULES = {
251
251
  'scripts/watchtower-ring4.mjs',
252
252
  'scripts/watchtower-ring4-runner.sh',
253
253
  'scripts/watchtower-status.sh',
254
+ 'scripts/memory-consolidation-scan.mjs',
254
255
  'skills/briefing',
255
256
  'skills/threads',
256
257
  'skills/catch-up',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-claude-cabinet",
3
- "version": "0.51.0",
3
+ "version": "0.52.0",
4
4
  "description": "Claude Cabinet — opinionated process scaffolding for Claude Code projects",
5
5
  "bin": {
6
6
  "create-claude-cabinet": "bin/create-claude-cabinet.js"
@@ -745,7 +745,9 @@ modules total.
745
745
 
746
746
  ## session-loop (mandatory)
747
747
 
748
- orient + debrief skeleton skills.
748
+ The LEGACY orient + debrief skeleton skills plus shared session verbs.
749
+ Watchtower (default-installed) is now the live session loop; orient/debrief
750
+ are the opt-out fallback, kept shipping via this mandatory module.
749
751
  `/orient` leads with the frontier-model watchdog (core phase #0): compares
750
752
  the session model against the per-operator `frontierModel` key in
751
753
  `~/.claude/cc-registry.json` (set via the `--frontier-model` installer flag;
@@ -776,9 +778,17 @@ dedup-vs-pending discipline as Ring 3 Phase 2m; see "Session Advisor Pass" in
776
778
  UNTRACKED marker with neither — and the rendered line cites the filed id;
777
779
  debrief's 16b also verifies persistence.
778
780
  Ships `/session-handoff`, the **default session-close verb**: a thin wrapper
779
- over `/debrief` that runs three phases (1) debrief, whose
780
- `qa-handoff-sweep.md` instruction phase performs a `/qa-handoff` for every
781
- worktree→main merge this session still needs one for; (2) propose a
781
+ over `/close` plus the handoff extras the rings can't own after walk-away
782
+ (act:9ce4dfde repointed off full `/debrief`, whose ring-redundant capture
783
+ was the defect). It runs three phases (1) `/close` (commit + push, and on
784
+ a worktree its conditional gated-merge offer), then debrief's
785
+ `qa-handoff-sweep.md` phase (a `/qa-handoff` for every worktree→main merge
786
+ this session still needs one for) and `methodology-capture.md` (the one
787
+ capture phase with no ring twin — Ring 3 only DETECTS an already-written
788
+ `.claude/methodology/` record, it can't author one or ask the four-choice
789
+ question, so it stays on the default path); the heavy debrief capture
790
+ (lessons/knowledge/upstream-friction/session-advisors) is NOT run — the
791
+ rings own it after close; (2) propose a
782
792
  next-session seed prompt (non-QA work thread only — QA drains belong to
783
793
  window 1's standing station), operator approves/rejects, and ONLY on approve
784
794
  launch the next session in a **fresh worktree** (via the `mux handoff
@@ -792,7 +802,9 @@ window is already up): it surfaces this project's watchtower threads/cursors
792
802
  in plain English (read-only, temporal-labeled, cap 3) and offers at most one
793
803
  well-explained inbox decision (drained via `applyBatch`, gated/dispatched
794
804
  categories excluded) — strictly skippable, two frozen sections, growth routes
795
- to `/briefing`. Plain `/debrief` stays the "nothing queued" close. The sweep
805
+ to `/briefing`. Plain `/close` is the "nothing queued" close; plain
806
+ `/debrief` is the opt-in heavy synchronous capture (kept, off the default
807
+ path — act:9ce4dfde). The sweep
796
808
  self-skips without watchtower; the launch degrades to a saved seed path
797
809
  without mux; the epilogue self-skips without watchtower.
798
810
  Also ships `/orient-classic` and `/debrief-classic` (act:6fa60c7d):
@@ -855,11 +867,16 @@ provider-agnostic email/MCP/file/API transport). 3 primary skills
855
867
  for old skill names. `requires: ['work-tracking']` (the pib-db adapter is the
856
868
  engine's data source). Evolved from the former handoff module.
857
869
 
858
- ## watchtower (opt-in, off by default)
870
+ ## watchtower (default-installed, opt-out)
859
871
 
860
- Continuous background state management replacing orient/debrief with four
872
+ THE default session loop. Continuous background state management replacing
873
+ the legacy orient/debrief with four
861
874
  processing rings (mechanical cron, Claude intelligence, session-aware,
862
- periodic truth reconciliation). All four rings implemented: Ring 1
875
+ periodic truth reconciliation). Installing the module ships the skills + a
876
+ dormant SessionStart hook; the metered background rings start only on
877
+ `/watchtower install`, so a fresh default install incurs no API cost until
878
+ the operator activates them. Opt out to fall back to the legacy
879
+ orient/debrief loop. All four rings implemented: Ring 1
863
880
  (mechanical heartbeat, 5-min cron; also delivers the global CC feedback
864
881
  outbox every tick via `flushFeedbackOutbox()`, ticks declared-routine
865
882
  triggers via `runRoutinePass()`, surfaces a READ-ONLY
@@ -1015,9 +1032,13 @@ mid-session awareness refresh — diffs current watchtower state against a
1015
1032
  per-session baseline captured at session start and shows only what CHANGED
1016
1033
  since; new inbox items, advanced/new threads, new/cleared git attention,
1017
1034
  freshly-due deferrals; thin orchestrator over `watchtower-snapshot.mjs`;
1018
- act:a8057f87), `/close` (fast session-end verb — commit + push only; the
1019
- background rings handle inventory/capture/routing after you walk away;
1020
- targets 15–30s, never `--no-verify`; act:8bf86966), and `/qa-handoff`
1035
+ act:a8057f87), `/close` (fast session-end verb — commit + push, plus on an
1036
+ ORPHANED worktree only (unmerged content AND no qa-handoff filed) a
1037
+ conditional offer to land the branch via the existing `/execute` Step 8 /
1038
+ qa-handoff merge-now recipe, so the rings don't file `worktree-unmerged`
1039
+ (act:9ce4dfde) — `/qa-handoff` stays the primary merge path; the background
1040
+ rings handle inventory/capture/routing after you walk away; targets 15–30s,
1041
+ never `--no-verify`; act:8bf86966), and `/qa-handoff`
1021
1042
  (package a worktree branch into a surfaced `qa-handoff` inbox item — what
1022
1043
  merged, what the worktree could NOT runtime-verify, what hangs on the next
1023
1044
  step — then push it to the desk's main window via `mux qa dispatch`; usually
@@ -15,6 +15,13 @@ You and Claude will make different choices for your project. These
15
15
  examples show what choices Flow made and why — not what you should do,
16
16
  but what's possible.
17
17
 
18
+ > **Note — orient/debrief are legacy.** Watchtower is CC's default session
19
+ > loop now; the orient/debrief skeletons used as examples below are the
20
+ > opt-out fallback, and Flow itself has since moved to watchtower. These
21
+ > tables are preserved as a worked example of the **phase-file extension
22
+ > mechanism**, which applies to any skeleton skill — not as a
23
+ > recommendation to build new work on orient/debrief.
24
+
18
25
 
19
26
  ## Flow's Phase File Overrides by Skill
20
27
 
@@ -47,8 +47,8 @@ templates, see [EXTENSIONS.md](EXTENSIONS.md).
47
47
  | `skills/memory/` | Browse, search, validate, and manage built-in memory at `~/.claude/projects/<slug>/memory/`. Writing happens via /cc-remember. |
48
48
  | `skills/menu/` | Dynamically discover and display all available skills. Reads from `_index.json`. |
49
49
  | `skills/onboard/` | Conversational onboarding. Interviews you, generates briefings, wires the session loop. Re-runnable. 8 phase files. |
50
- | `skills/orient/` | Session start. Load context, sync data, scan work, run health checks, spawn cabinet consultations, show skills menu. 7 phase files. |
51
- | `skills/orient-quick/` | Quick orient variant — core phases only, skip presentation. |
50
+ | `skills/orient/` | Session start (legacy loop — watchtower is the default). Load context, sync data, scan work, run health checks, spawn cabinet consultations, show skills menu. 7 phase files. |
51
+ | `skills/orient-quick/` | Quick orient variant (legacy) — core phases only, skip presentation. |
52
52
  | `skills/plan/` | Structured planning with cabinet critique. Research, overlap check, draft, critique, completeness, present, file. 9 phase files. |
53
53
  | `skills/cc-publish/` | Publish workflow (CC source repo only, not shipped to consumers). |
54
54
  | `skills/pulse/` | Self-description accuracy check. Count freshness, dead references, staleness. 3 phase files. |
@@ -173,7 +173,7 @@ into your project's `.claude/` directory. The minimum viable adoption:
173
173
 
174
174
  You now have git safety and skill discovery. Add more modules as needed:
175
175
 
176
- - **Session loop:** `skills/orient/`, `skills/debrief/`
176
+ - **Session loop (default):** `skills/watchtower/` + the SessionStart hook. Legacy fallback: `skills/orient/`, `skills/debrief/`
177
177
  - **Planning:** `skills/plan/`, `skills/execute/`
178
178
  - **Audit:** `skills/audit/`, `skills/pulse/`, `skills/triage-audit/`, plus `cabinet/` infrastructure and `scripts/`
179
179
  - **Cabinet members:** Copy individual `skills/cabinet-*/` directories for the experts you want
@@ -54,7 +54,7 @@ Template: `_briefing-cabinet-template.md`.
54
54
 
55
55
  ### `_briefing-work-tracking.md` — Work Tracking
56
56
  How the project tracks planned work — storage, query interface,
57
- mutation interface. Referenced by /plan, /execute, /orient, /debrief.
57
+ mutation interface. Referenced by /plan, /execute, and the session loop.
58
58
  Template: `_briefing-work-tracking-template.md`.
59
59
 
60
60
  ### `_briefing-api.md` — API Configuration
@@ -1,7 +1,7 @@
1
1
  # Work Tracking — [Your Project Name]
2
2
 
3
3
  How this project tracks planned work. Skills that manage work items
4
- (/plan, /execute, /orient, /debrief) reference this file.
4
+ (/plan, /execute, and the session loop) reference this file.
5
5
 
6
6
  ## Work Item Storage
7
7
  *Where work items live.*
@@ -27,8 +27,8 @@ already tracking. It sits quietly until you unblock it yourself.
27
27
 
28
28
  **Trigger-gated deferral** is for work waiting on an identifiable
29
29
  external condition — a dependency landing, a stack decision
30
- finalizing, a referenced file appearing. Every session, orient
31
- re-evaluates each trigger against the current session's context
30
+ finalizing, a referenced file appearing. Every session, the session
31
+ loop re-evaluates each trigger against the current session's context
32
32
  and surfaces items whose conditions have fired. Use
33
33
  `pib_defer_with_trigger` (or `defer-with-trigger` CLI). See
34
34
  `cabinet/pib-db-triggers.md` for the full convention.
@@ -26,11 +26,13 @@ briefing:
26
26
  # Add other briefing files relevant to this member's domain
27
27
  # Common: .claude/cabinet/_briefing-architecture.md, _briefing-jurisdictions.md, _briefing-api.md
28
28
  standing-mandate: audit
29
- # Add plan, execute, orient, debrief if this member should activate
30
- # in those contexts. Most members are audit-only. Two session-boundary
31
- # contexts exist for standing advisors (watchtower installs):
32
- # session-close (Ring 3's automatic transcript-fed advisor pass) and
33
- # briefing (/briefing's live advisor panel).
29
+ # Add plan or execute if this member should activate in those contexts.
30
+ # Most members are audit-only. Two session-boundary contexts exist for
31
+ # standing advisors (watchtower is the default loop): session-close
32
+ # (Ring 3's automatic transcript-fed advisor pass) and briefing
33
+ # (/briefing's live advisor panel). The legacy orient/debrief contexts
34
+ # still work on projects that opted out of watchtower, but new advisors
35
+ # should use session-close/briefing.
34
36
  tools:
35
37
  # List every external tool/command this member uses.
36
38
  # Format: "tool-name (scope -- what it does)"
@@ -40,8 +42,9 @@ tools:
40
42
  # - grep patterns (all projects -- dead code detection)
41
43
  # Use "tools: []" for pure-reasoning members with no tool stage.
42
44
  directives:
43
- # Only if standing-mandate includes plan, execute, orient, debrief,
44
- # session-close, or briefing. Each directive is a one-sentence focused
45
+ # Only if standing-mandate includes plan, execute, session-close,
46
+ # briefing, or (legacy loop) orient, debrief. Each directive is a
47
+ # one-sentence focused
45
48
  # task for that context. A mandate without a matching directive is a
46
49
  # data error — consumers skip the member and say so.
47
50
  # plan: >
@@ -115,6 +115,22 @@ into a corner):
115
115
  pinned/load-bearing entry files to the inbox; it never auto-applies,
116
116
  because the *gist* becomes the retrieved truth and a wrong gist erases
117
117
  a load-bearing detail.
118
+
119
+ **Evidence this verb has real work (act:421a8ab2, N5 of
120
+ grp:retro-remeaning):** two blind reads of the maginnis durable-memory
121
+ corpus (2026-07-19) found ~47-60% of sampled files involved in a hard
122
+ duplicate — overwhelmingly outage-recovery extractions and the
123
+ 2026-07-14 read-pass, both bulk-written without a MEMORY.md index line
124
+ (region-pointer-covered instead), which made the dedup structurally
125
+ blind to them. `templates/scripts/memory-consolidation-scan.mjs` is the
126
+ dry-run PROPOSAL half of this verb, built ahead of the full Stage 2 gate:
127
+ it reuses the (now overlap-coefficient, dual-scored — see
128
+ `proposeFolds` in `watchtower-queue.mjs`) fold detector over an actual
129
+ memory directory's files instead of the pending inbox queue, and reports
130
+ candidate pairs with a `consolidated_from` pointer. It never merges or
131
+ writes — the human decides. Running the full MERGE half (rewriting
132
+ files, folding gists) is still gated on the spill-rate data per this
133
+ contract; the scan only proposes what the merge would act on.
118
134
  - **supersede** — mark an entry false/obsolete so retrieval stops
119
135
  surfacing it as live truth (kept on disk for audit, with a reverse
120
136
  breadcrumb in its successor). Deferred until the frontmatter-parsing
@@ -62,7 +62,7 @@ every session:
62
62
  When deferring an item that waits on a specific identifiable
63
63
  condition — a dependency landing, a stack decision finalizing, a
64
64
  referenced file appearing — use `pib_defer_with_trigger` instead of
65
- plain `status='deferred'`. Orient re-evaluates each trigger every
65
+ plain `status='deferred'`. The session loop re-evaluates each trigger every
66
66
  session and surfaces items whose conditions have become true. See
67
67
  [pib-db-triggers.md](pib-db-triggers.md) for the full convention:
68
68
  result vocabulary, cascade semantics for projects, migration
@@ -1,7 +1,7 @@
1
1
  # pib-db Deferred Triggers
2
2
 
3
3
  How to defer work items with structured return conditions and how
4
- orient re-evaluates them each session.
4
+ the session loop re-evaluates them each session.
5
5
 
6
6
  ## Purpose
7
7
 
@@ -13,8 +13,8 @@ or a `status='deferred'` row and sits there forever. Nobody re-reads
13
13
 
14
14
  Deferred triggers turn those items into structurally-encoded work:
15
15
  each one carries a natural-language condition describing what would
16
- have to change to reactivate it. Orient surfaces them every session
17
- and evaluates the condition against the current session's context.
16
+ have to change to reactivate it. The session loop surfaces them every
17
+ session and evaluates the condition against the current session's context.
18
18
  The item sits in the queue, not on a reminder list.
19
19
 
20
20
  ## Schema
@@ -110,29 +110,33 @@ The cascade:
110
110
  trigger is the single source of truth.
111
111
 
112
112
  When the parent reopens (user flips status back to `active`, or
113
- orient surfaces it as `triggered` and the user accepts):
113
+ the session loop surfaces it as `triggered` and the user accepts):
114
114
 
115
115
  - Children remain `deferred`.
116
116
  - The user decides which children to reopen. Reopening everything
117
117
  automatically often resurrects stale subgoals that the deferral
118
118
  period should have retired.
119
119
 
120
- ## Orient integration
120
+ ## Session-loop integration
121
121
 
122
- The `deferred-check.md` phase fires after `work-scan.md`, before
123
- `auto-maintenance.md`. Every session:
122
+ Under watchtower (the default loop), Ring 1 surfaces deferred/triggered
123
+ items in the project state file's Standing Issues, and the session — or
124
+ `/briefing` — re-evaluates each trigger against current context. On the
125
+ legacy loop, the `deferred-check.md` orient phase does this, firing after
126
+ `work-scan.md`, before `auto-maintenance.md`.
124
127
 
125
- 1. Orient calls `pib_list_triggered` (or CLI fallback).
126
- 2. For each item, evaluates the trigger text against the current
127
- session's context (new dependencies installed? a referenced file
128
- now exists? a stack decision was finalized?).
129
- 3. Records each evaluation via `pib_mark_trigger_checked`. Prefer
128
+ Either way, every session:
129
+
130
+ 1. Call `pib_list_triggered` (or CLI fallback).
131
+ 2. For each item, evaluate the trigger text against the current session's
132
+ context (new dependencies installed? a referenced file now exists? a
133
+ stack decision was finalized?).
134
+ 3. Record each evaluation via `pib_mark_trigger_checked`. Prefer
130
135
  `needs-info` over guessing `triggered`.
131
- 4. Items that evaluate to `triggered` appear in the briefing's
132
- **Attention Items** section. Orient does not auto-reopen — the
133
- user decides.
136
+ 4. Items that evaluate to `triggered` surface as **Attention Items**. The
137
+ session loop does not auto-reopen — the user decides.
134
138
 
135
- Cost control: cap the phase at 30 seconds. If more than 10 items are
139
+ Cost control: cap the evaluation at 30 seconds. If more than 10 items are
136
140
  triggered, evaluate only the 5 least-recently-checked.
137
141
 
138
142
  ## Migration guarantees
@@ -336,6 +336,125 @@ each owning its tier. Flag: `defaults.recall_canary` (opt-out).
336
336
  extraction never proposed (M2 under-extraction). The canary states
337
337
  this blindness in its own output.
338
338
 
339
+ ## Reach 1 — Pending-Relation Proposals (act:5182beda, N3 of grp:retro-remeaning)
340
+
341
+ The first shippable instance of **retrospective temporality** (`act:ef5a3842`,
342
+ MANIFESTO principle 4): new understanding reaching BACK to recolor what came
343
+ before, at the earliest and safest reach — the still-pending inbox, where
344
+ nothing is believed yet. Every specimen that motivated the program had its
345
+ counterpart sitting pending at the moment the second one was written; Phase
346
+ 2d's extraction call now sees that pending pile and can propose a relation.
347
+
348
+ **Mechanism.** `selectNearbyPendingItems` (ring3-close.mjs) shortlists the
349
+ pending inbox drafts most relevant to THIS session's transcript (same
350
+ relevance-scoring recipe as `selectNearbyMemoryTitles`, a SEPARATE corpus
351
+ with its OWN cap, `PENDING_RELATION_CAP` — never a shared budget with
352
+ memory's, or a large pending pile would evict memory titles and degrade the
353
+ M1b novelty gate). The extraction prompt's `PENDING IN INBOX` block is
354
+ injected as its OWN section, distinct from `ALREADY SAVED TO MEMORY`. For
355
+ each item, the model may set `relates_to` (the exact pending title) and
356
+ `relation` (`pairs_with` | `answers` | `contradicts`) — fields the model
357
+ outputs ALONGSIDE, never IN, `covered_by`. This separation is load-bearing:
358
+ `covered_by` stays scoped to memory titles and feeds `modelRescues`/
359
+ `isDuplicate` exactly as before; `relates_to`/`relation` are never read by
360
+ either — naming a pending title in `covered_by` instead would flip the
361
+ rescue gate into a suppressor (a filed-today item wrongly read as "covered
362
+ by," and suppressed, because it topically resembles a merely-PENDING draft
363
+ that isn't believed yet — the exact failure the Meta question/answer
364
+ specimen would have suffered).
365
+
366
+ **Filing.** A relation proposal is its own inbox item, category
367
+ `pending-relation`, filed via `fileRelationProposal` AFTER the newly-
368
+ extracted item's own `createItem` call succeeds (its id isn't known until
369
+ then). Deduped by `evidence.relation_key` (sorted ids + the relation verb) —
370
+ one pending item per (pair, verb), so the same relation proposed from either
371
+ side, or in a later session, never refiles. The proposal never changes
372
+ anything about the item that prompted it: no suppression, no home change, no
373
+ urgency change — it is strictly additive.
374
+
375
+ **The M5 suppression ledger is blind to this channel.** `recordSuppression`
376
+ (the Suppression Ledger above) only sees LEXICAL suppressions — the
377
+ deterministic `isDuplicate` corpus matches. The model's real per-item
378
+ inclusion/omission decision happens INSIDE the extraction call, in a channel
379
+ the ledger cannot observe at all: if the model chose to silently omit an
380
+ item from its output array (rather than including it with `relation: none`),
381
+ no suppression record is ever written, because nothing was suppressed BY A
382
+ CORPUS — it was never proposed. This is why the prompt carries an explicit,
383
+ load-bearing instruction that a pending item is grounds for a RELATION only,
384
+ never grounds to omit or demote anything — the instruction is the entire
385
+ defense, because the suppression ledger cannot audit it.
386
+
387
+ **Retraction.** Registered in `INBOX_DETECTOR_REGISTRY` with a reconciler:
388
+ `autoReconcilePendingRelations` (ring1.mjs, one global pass per tick — purely
389
+ queue-internal, no per-project pib-db access, unlike `completion-review`'s).
390
+ Retracts via `autoReconcileItem` when EITHER cited side (`evidence.from_id`
391
+ / `evidence.to_id`) leaves pending — a relation between two open questions
392
+ no longer applies once one resolves. Fails toward KEEPING: an id that no
393
+ longer resolves via `getItem` (deleted/migrated) is ambiguous, not evidence
394
+ the relation resolved.
395
+
396
+ ## Reach 2 — Significance-Change Proposals (act:bcb7edd4, L1 of grp:retro-remeaning)
397
+
398
+ The second reach of the retrospective-temporality motion (`act:ef5a3842`,
399
+ MANIFESTO principle 4), extending Reach 1's inbox-range reach-back to the
400
+ recently-absorbed thread trail. When Ring 3 closes a session, the new
401
+ understanding it captured reaches BACK into the prior cursor history of the
402
+ threads THIS session touched, and may PROPOSE that an earlier entry now
403
+ means something different: `reframes` (significance change — what looked
404
+ like friction was the seed of the architecture; the class a contradiction
405
+ scan is structurally blind to), `answers` (a real earlier uncertainty is
406
+ settled), or `contradicts`. Category: `significance-change`.
407
+
408
+ **Mechanism.** Inside Phase 2b2, AFTER the cursor appends land: the prior
409
+ trail of each earned thread is snapshotted from disk BEFORE this session's
410
+ entry is appended (last `PRIOR_HISTORY_CAP` entries), and one focused
411
+ follow-up model call (`significanceReachBack`) sees the new understanding
412
+ beside each prior trail. It fires only when at least one earned thread has
413
+ prior history — a routine or first-touch session costs nothing. It cannot
414
+ ride the capture call the way Reach 1 rode extraction: the reach-back
415
+ corpus (which threads matter) IS that call's output. EVENT-DRIVEN by
416
+ construction — never a periodic sweep (the shape the cabinet killed).
417
+
418
+ **Proposals are validated, then durably deduped.** A proposal must cite an
419
+ ACTUAL prior entry — session_id + date checked against the on-disk snapshot
420
+ (`validateRecolorProposals`); a hallucinated anchor drops, logged, never
421
+ filed. Filing (`fileSignificanceProposal`) dedups by
422
+ `evidence.relation_key` (`thread|prior_session|new_session|verb`) across
423
+ ALL queue statuses with NO time window: a dismissed or expired judgment
424
+ about a static corpus never re-nags — not after `RESOLUTION_CORPUS_DAYS`,
425
+ not ever — and a reprocess replay of the same session produces the same key
426
+ and files nothing. (The same unwindowed-exclusion discipline was backported
427
+ to Reach 1's `fileRelationProposal`, whose original pending-only dedup
428
+ left a post-dismissal refile hole.)
429
+
430
+ **The gate is real, not ceremonial.** Both relational categories
431
+ (`significance-change`, `pending-relation`) are in `GATED_CATEGORIES`:
432
+ `applyBatch` structurally refuses them, so each reinterpretation is
433
+ confirmed or dismissed individually — a rubber-stamped batch of re-meanings
434
+ is how a system gaslights its operator. On CONFIRM, /inbox applies the
435
+ recolor via `appendThreadRecolor` (watchtower-lib): an entry in the
436
+ thread's additive `recolor_log` array. The recolor ANNOTATES history — it
437
+ never rewrites `cursor_history`, and no ring ever writes `recolor_log`;
438
+ the rings propose, only the operator's confirmation applies.
439
+
440
+ **Retraction.** `autoReconcileSignificanceItems` (ring1, per tick):
441
+ retracts when the cited thread file is POSITIVELY gone from
442
+ `state/threads/` (dir readable, file absent — a recolor of deleted history
443
+ is moot); keeps on any read error, and keeps EVERYTHING when the dir is
444
+ unreadable (a mount hiccup must not mass-retract).
445
+
446
+ **The honest metric that gates Reach 3.** Every real-work close appends one
447
+ line to `state/significance-ledger.jsonl` (`recordSignificanceEvent`,
448
+ fail-open, same discipline as the suppression ledger): session, threads
449
+ touched, threads with history, entries shown, proposals filed.
450
+ `readSignificanceRate` (watchtower-lib) combines the ledger (denominator,
451
+ replay-deduped by session_id) with the queue's per-category dispositions
452
+ (numerator) into `{sessions, proposals_per_session, keep_ratio, …}` — with
453
+ null ratios when a denominator is zero, never fabricated 0s. This is the
454
+ L2 gate's named reader: Reach 3 (`act:a8b372a7`) is built only when an
455
+ observed significance-change rate on real data warrants it — replacing the
456
+ contradiction-density measurement the plan retired as the wrong instrument.
457
+
339
458
  ## Detector Symmetry (no detector without a retraction path)
340
459
 
341
460
  The 2026-07-12 inbox drain (893→194 pending) hit the same disease four
@@ -176,7 +176,7 @@ const TOOLS = [
176
176
  },
177
177
  {
178
178
  name: 'pib_defer_with_trigger',
179
- description: 'Defer an action or project with a free-text trigger condition describing what would reactivate it. Orient re-evaluates triggers each session. Use this INSTEAD of pib_update_action with status=deferred when the deferral is waiting for a specific condition.',
179
+ description: 'Defer an action or project with a free-text trigger condition describing what would reactivate it. Each session re-evaluates triggers and surfaces those whose condition has fired. Use this INSTEAD of pib_update_action with status=deferred when the deferral is waiting for a specific condition.',
180
180
  inputSchema: {
181
181
  type: 'object',
182
182
  properties: {
@@ -199,7 +199,7 @@ const TOOLS = [
199
199
  },
200
200
  {
201
201
  name: 'pib_mark_trigger_checked',
202
- description: 'Record that a trigger was evaluated. Use after orient\'s deferred-check phase evaluates triggers against session context. Result must be one of: triggered | still-waiting | needs-info | condition-obsolete.',
202
+ description: 'Record that a trigger was evaluated. Use after a session evaluates triggers against session context. Result must be one of: triggered | still-waiting | needs-info | condition-obsolete.',
203
203
  inputSchema: {
204
204
  type: 'object',
205
205
  properties: {
@@ -35,7 +35,7 @@ Descriptive slug. Convention: `pattern-{domain}-{topic}` or just
35
35
  `pattern-{topic}`.
36
36
 
37
37
  ### `description`
38
- One-line summary. Used by orient/debrief to decide whether to load
38
+ One-line summary. Used by the session loop to decide whether to load
39
39
  the full pattern. Be specific — "deployment issues" is too vague;
40
40
  "silent deployment failures and stale build log output" is useful.
41
41
 
@@ -107,10 +107,10 @@ promotion candidates (specific rules ready for promotion).
107
107
 
108
108
  | Step | Owner | When |
109
109
  |------|-------|------|
110
- | Capture + Classify | /debrief | Every session |
110
+ | Capture + Classify | watchtower Ring 3 (or /debrief) | Every session |
111
111
  | Pattern analysis | Periodic review | As feedback accumulates |
112
112
  | Promotion checkpoint | Review cadence | When patterns mature |
113
- | Enforcement health | /orient or /pulse | Regular check |
113
+ | Enforcement health | /briefing or /pulse | Regular check |
114
114
 
115
115
  ## Audit Findings as Promotion Input
116
116