create-claude-cabinet 0.6.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.
- package/LICENSE +21 -0
- package/README.md +196 -0
- package/bin/create-claude-cabinet.js +8 -0
- package/lib/cli.js +624 -0
- package/lib/copy.js +152 -0
- package/lib/db-setup.js +51 -0
- package/lib/metadata.js +42 -0
- package/lib/reset.js +193 -0
- package/lib/settings-merge.js +93 -0
- package/package.json +29 -0
- package/templates/EXTENSIONS.md +311 -0
- package/templates/README.md +485 -0
- package/templates/briefing/_briefing-api-template.md +21 -0
- package/templates/briefing/_briefing-architecture-template.md +16 -0
- package/templates/briefing/_briefing-cabinet-template.md +20 -0
- package/templates/briefing/_briefing-identity-template.md +18 -0
- package/templates/briefing/_briefing-scopes-template.md +39 -0
- package/templates/briefing/_briefing-template.md +148 -0
- package/templates/briefing/_briefing-work-tracking-template.md +18 -0
- package/templates/cabinet/committees-template.yaml +49 -0
- package/templates/cabinet/composition-patterns.md +240 -0
- package/templates/cabinet/eval-protocol.md +208 -0
- package/templates/cabinet/lifecycle.md +93 -0
- package/templates/cabinet/output-contract.md +148 -0
- package/templates/cabinet/prompt-guide.md +266 -0
- package/templates/hooks/cor-upstream-guard.sh +79 -0
- package/templates/hooks/git-guardrails.sh +67 -0
- package/templates/hooks/skill-telemetry.sh +66 -0
- package/templates/hooks/skill-tool-telemetry.sh +54 -0
- package/templates/hooks/stop-hook.md +56 -0
- package/templates/memory/patterns/_pattern-template.md +119 -0
- package/templates/memory/patterns/pattern-intelligence-first.md +41 -0
- package/templates/rules/enforcement-pipeline.md +151 -0
- package/templates/scripts/cor-drift-check.cjs +84 -0
- package/templates/scripts/finding-schema.json +94 -0
- package/templates/scripts/load-triage-history.js +151 -0
- package/templates/scripts/merge-findings.js +126 -0
- package/templates/scripts/pib-db-schema.sql +68 -0
- package/templates/scripts/pib-db.js +365 -0
- package/templates/scripts/triage-server.mjs +98 -0
- package/templates/scripts/triage-ui.html +536 -0
- package/templates/skills/audit/SKILL.md +273 -0
- package/templates/skills/audit/phases/finding-output.md +56 -0
- package/templates/skills/audit/phases/member-execution.md +83 -0
- package/templates/skills/audit/phases/member-selection.md +44 -0
- package/templates/skills/audit/phases/structural-checks.md +54 -0
- package/templates/skills/audit/phases/triage-history.md +45 -0
- package/templates/skills/cabinet-accessibility/SKILL.md +180 -0
- package/templates/skills/cabinet-anti-confirmation/SKILL.md +172 -0
- package/templates/skills/cabinet-architecture/SKILL.md +279 -0
- package/templates/skills/cabinet-boundary-man/SKILL.md +265 -0
- package/templates/skills/cabinet-cor-health/SKILL.md +342 -0
- package/templates/skills/cabinet-data-integrity/SKILL.md +157 -0
- package/templates/skills/cabinet-debugger/SKILL.md +221 -0
- package/templates/skills/cabinet-historian/SKILL.md +253 -0
- package/templates/skills/cabinet-organized-mind/SKILL.md +338 -0
- package/templates/skills/cabinet-process-therapist/SKILL.md +261 -0
- package/templates/skills/cabinet-qa/SKILL.md +205 -0
- package/templates/skills/cabinet-record-keeper/SKILL.md +168 -0
- package/templates/skills/cabinet-roster-check/SKILL.md +297 -0
- package/templates/skills/cabinet-security/SKILL.md +181 -0
- package/templates/skills/cabinet-small-screen/SKILL.md +154 -0
- package/templates/skills/cabinet-speed-freak/SKILL.md +169 -0
- package/templates/skills/cabinet-system-advocate/SKILL.md +194 -0
- package/templates/skills/cabinet-technical-debt/SKILL.md +115 -0
- package/templates/skills/cabinet-usability/SKILL.md +189 -0
- package/templates/skills/cabinet-workflow-cop/SKILL.md +238 -0
- package/templates/skills/cor-upgrade/SKILL.md +302 -0
- package/templates/skills/debrief/SKILL.md +409 -0
- package/templates/skills/debrief/phases/auto-maintenance.md +48 -0
- package/templates/skills/debrief/phases/close-work.md +88 -0
- package/templates/skills/debrief/phases/health-checks.md +54 -0
- package/templates/skills/debrief/phases/inventory.md +40 -0
- package/templates/skills/debrief/phases/loose-ends.md +52 -0
- package/templates/skills/debrief/phases/record-lessons.md +67 -0
- package/templates/skills/debrief/phases/report.md +59 -0
- package/templates/skills/debrief/phases/update-state.md +48 -0
- package/templates/skills/debrief/phases/upstream-feedback.md +129 -0
- package/templates/skills/debrief-quick/SKILL.md +12 -0
- package/templates/skills/execute/SKILL.md +293 -0
- package/templates/skills/execute/phases/cabinet.md +49 -0
- package/templates/skills/execute/phases/commit-and-deploy.md +66 -0
- package/templates/skills/execute/phases/load-plan.md +49 -0
- package/templates/skills/execute/phases/validators.md +50 -0
- package/templates/skills/execute/phases/verification-tools.md +67 -0
- package/templates/skills/extract/SKILL.md +168 -0
- package/templates/skills/investigate/SKILL.md +160 -0
- package/templates/skills/link/SKILL.md +52 -0
- package/templates/skills/menu/SKILL.md +61 -0
- package/templates/skills/onboard/SKILL.md +356 -0
- package/templates/skills/onboard/phases/detect-state.md +79 -0
- package/templates/skills/onboard/phases/generate-briefing.md +127 -0
- package/templates/skills/onboard/phases/generate-session-loop.md +87 -0
- package/templates/skills/onboard/phases/interview.md +233 -0
- package/templates/skills/onboard/phases/modularity-menu.md +162 -0
- package/templates/skills/onboard/phases/options.md +98 -0
- package/templates/skills/onboard/phases/post-onboard-audit.md +121 -0
- package/templates/skills/onboard/phases/summary.md +122 -0
- package/templates/skills/onboard/phases/work-tracking.md +231 -0
- package/templates/skills/orient/SKILL.md +251 -0
- package/templates/skills/orient/phases/auto-maintenance.md +48 -0
- package/templates/skills/orient/phases/briefing.md +53 -0
- package/templates/skills/orient/phases/cabinet.md +46 -0
- package/templates/skills/orient/phases/context.md +63 -0
- package/templates/skills/orient/phases/data-sync.md +35 -0
- package/templates/skills/orient/phases/health-checks.md +50 -0
- package/templates/skills/orient/phases/work-scan.md +69 -0
- package/templates/skills/orient-quick/SKILL.md +12 -0
- package/templates/skills/plan/SKILL.md +358 -0
- package/templates/skills/plan/phases/cabinet-critique.md +47 -0
- package/templates/skills/plan/phases/calibration-examples.md +75 -0
- package/templates/skills/plan/phases/completeness-check.md +44 -0
- package/templates/skills/plan/phases/composition-check.md +36 -0
- package/templates/skills/plan/phases/overlap-check.md +62 -0
- package/templates/skills/plan/phases/plan-template.md +69 -0
- package/templates/skills/plan/phases/present.md +60 -0
- package/templates/skills/plan/phases/research.md +43 -0
- package/templates/skills/plan/phases/work-tracker.md +95 -0
- package/templates/skills/publish/SKILL.md +74 -0
- package/templates/skills/pulse/SKILL.md +242 -0
- package/templates/skills/pulse/phases/auto-fix-scope.md +40 -0
- package/templates/skills/pulse/phases/checks.md +58 -0
- package/templates/skills/pulse/phases/output.md +54 -0
- package/templates/skills/seed/SKILL.md +257 -0
- package/templates/skills/seed/phases/build-member.md +93 -0
- package/templates/skills/seed/phases/evaluate-existing.md +61 -0
- package/templates/skills/seed/phases/maintain.md +92 -0
- package/templates/skills/seed/phases/scan-signals.md +86 -0
- package/templates/skills/triage-audit/SKILL.md +251 -0
- package/templates/skills/triage-audit/phases/apply-verdicts.md +90 -0
- package/templates/skills/triage-audit/phases/load-findings.md +38 -0
- package/templates/skills/triage-audit/phases/triage-ui.md +66 -0
- package/templates/skills/unlink/SKILL.md +35 -0
- package/templates/skills/validate/SKILL.md +116 -0
- package/templates/skills/validate/phases/validators.md +53 -0
|
@@ -0,0 +1,409 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: debrief
|
|
3
|
+
description: |
|
|
4
|
+
Session close. Inventories what was done, closes work items, updates
|
|
5
|
+
state, captures lessons, and prepares the briefing for next time. This
|
|
6
|
+
is a skeleton skill using the phases/ directory pattern. Use when:
|
|
7
|
+
session end, "debrief", "wrap up", "/debrief", "quick debrief",
|
|
8
|
+
"debrief-quick", "/debrief-quick", or after completing significant work.
|
|
9
|
+
If "quick" is mentioned, use the Quick Mode section — run core phases
|
|
10
|
+
only, skip presentation phases.
|
|
11
|
+
related:
|
|
12
|
+
- type: file
|
|
13
|
+
path: .claude/skills/debrief/phases/inventory.md
|
|
14
|
+
role: "Project-specific: how to identify what was done"
|
|
15
|
+
- type: file
|
|
16
|
+
path: .claude/skills/debrief/phases/close-work.md
|
|
17
|
+
role: "Project-specific: how to close work items and resolve feedback"
|
|
18
|
+
- type: file
|
|
19
|
+
path: .claude/skills/debrief/phases/auto-maintenance.md
|
|
20
|
+
role: "Project-specific: recurring session-end tasks"
|
|
21
|
+
- type: file
|
|
22
|
+
path: .claude/skills/debrief/phases/update-state.md
|
|
23
|
+
role: "Project-specific: what state to update"
|
|
24
|
+
- type: file
|
|
25
|
+
path: .claude/skills/debrief/phases/health-checks.md
|
|
26
|
+
role: "Project-specific: session-end health checks"
|
|
27
|
+
- type: file
|
|
28
|
+
path: .claude/skills/debrief/phases/record-lessons.md
|
|
29
|
+
role: "Project-specific: how to capture learnings"
|
|
30
|
+
- type: file
|
|
31
|
+
path: .claude/skills/debrief/phases/loose-ends.md
|
|
32
|
+
role: "Project-specific: non-project items to capture"
|
|
33
|
+
- type: file
|
|
34
|
+
path: .claude/skills/debrief/phases/upstream-feedback.md
|
|
35
|
+
role: "Instruction: surface CoR friction back to source repo"
|
|
36
|
+
- type: file
|
|
37
|
+
path: .claude/skills/debrief/phases/report.md
|
|
38
|
+
role: "Project-specific: how to present the summary"
|
|
39
|
+
- type: file
|
|
40
|
+
path: cabinet/_briefing.md
|
|
41
|
+
role: "Project identity and configuration"
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
# /debrief — Session Close
|
|
45
|
+
|
|
46
|
+
## Purpose
|
|
47
|
+
|
|
48
|
+
Close every session properly so the next one starts informed. Without
|
|
49
|
+
debrief, completed work stays marked as open, feedback stays unresolved,
|
|
50
|
+
lessons evaporate, and the system gradually disconnects from reality.
|
|
51
|
+
Orient reads the past, debrief writes the future. That's the loop that
|
|
52
|
+
gives your cabinet continuity.
|
|
53
|
+
|
|
54
|
+
This is a **skeleton skill** using the `phases/` directory pattern. The
|
|
55
|
+
orchestration (what to do and in what order) is generic. Your project
|
|
56
|
+
defines the specifics in phase files under `phases/`.
|
|
57
|
+
|
|
58
|
+
### Phase File Protocol
|
|
59
|
+
|
|
60
|
+
Phase files have three states:
|
|
61
|
+
|
|
62
|
+
| State | Meaning |
|
|
63
|
+
|-------|---------|
|
|
64
|
+
| Absent or empty | Use this skeleton's **default behavior** for the phase |
|
|
65
|
+
| Contains only `skip: true` | **Explicitly opted out** — skip this phase entirely |
|
|
66
|
+
| Contains content | **Custom behavior** — use the file's content instead |
|
|
67
|
+
|
|
68
|
+
The skeleton always does something reasonable when a phase file is absent.
|
|
69
|
+
Phase files customize, not enable. Use `skip: true` when you actively
|
|
70
|
+
don't want a phase to run — not even the default.
|
|
71
|
+
|
|
72
|
+
## Identity
|
|
73
|
+
|
|
74
|
+
You are the closer. You care about finishing — not the building, but the
|
|
75
|
+
part where the dust settles and you walk through making sure every loop
|
|
76
|
+
is closed, every lesson is written down, every state file reflects
|
|
77
|
+
reality. You take this seriously because you've seen what happens when
|
|
78
|
+
debriefs are skipped: stale actions pile up, feedback rots, hard-won
|
|
79
|
+
lessons evaporate, and three sessions later someone re-derives a solution
|
|
80
|
+
that was already found.
|
|
81
|
+
|
|
82
|
+
You are not a checklist executor. You are the person who owns the close.
|
|
83
|
+
When a session ends, you ensure the system's state reflects what actually
|
|
84
|
+
happened. If work was completed, it gets marked done — not "probably
|
|
85
|
+
done, we'll check later." If a lesson was learned, it gets recorded
|
|
86
|
+
before the context window closes.
|
|
87
|
+
|
|
88
|
+
## When to Run
|
|
89
|
+
|
|
90
|
+
- After completing significant work
|
|
91
|
+
- When the user says "debrief", "wrap up", "we're done"
|
|
92
|
+
- At the end of any productive session
|
|
93
|
+
- **Should never be skipped.** A session that produced real work and
|
|
94
|
+
ends without debrief is a process failure — the next session starts
|
|
95
|
+
with stale state.
|
|
96
|
+
|
|
97
|
+
## Workflow
|
|
98
|
+
|
|
99
|
+
### 1. Inventory What Was Done (core)
|
|
100
|
+
|
|
101
|
+
Read `phases/inventory.md` for how to identify what the session
|
|
102
|
+
accomplished. This typically involves examining git history,
|
|
103
|
+
conversation context, and files changed.
|
|
104
|
+
|
|
105
|
+
**Default (absent/empty):** Review at minimum:
|
|
106
|
+
- Recent git commits (`git log --oneline -20`)
|
|
107
|
+
- Files changed (`git diff --stat HEAD~5`)
|
|
108
|
+
- What was discussed and built during the session
|
|
109
|
+
|
|
110
|
+
The goal: a clear list of what was accomplished, so subsequent steps
|
|
111
|
+
can match it against open work.
|
|
112
|
+
|
|
113
|
+
### 2. Close Work Items (core)
|
|
114
|
+
|
|
115
|
+
Read `phases/close-work.md` for how to match session work against open
|
|
116
|
+
items and close them. This includes marking tasks as done, resolving
|
|
117
|
+
feedback, and updating any tracking system.
|
|
118
|
+
|
|
119
|
+
**Skip (absent/empty).** The debrief can still inventory and record
|
|
120
|
+
lessons, but work items won't be closed — they'll appear as open in
|
|
121
|
+
the next orient, creating stale state.
|
|
122
|
+
|
|
123
|
+
For each open item, determine:
|
|
124
|
+
- **Clearly complete** — mark it done with a reference to what was built
|
|
125
|
+
- **Partially complete** — note progress, don't mark done
|
|
126
|
+
- **Should be deferred** — move to a deferred state with a reason and
|
|
127
|
+
trigger condition for when to revisit
|
|
128
|
+
- **Uncertain** — ask the user, but only for genuine ambiguity
|
|
129
|
+
|
|
130
|
+
When closing an item that has documented follow-on work (sub-phases,
|
|
131
|
+
next steps, future enhancements), create new items for each NOW. Known
|
|
132
|
+
work that lives only in completed items' notes will be forgotten.
|
|
133
|
+
|
|
134
|
+
### 3. Auto-Maintenance (core)
|
|
135
|
+
|
|
136
|
+
Read `phases/auto-maintenance.md` for recurring automated tasks that
|
|
137
|
+
should run at session end. Same principle as orient's auto-maintenance:
|
|
138
|
+
operations that decay if left to human memory.
|
|
139
|
+
|
|
140
|
+
**Skip (absent/empty).**
|
|
141
|
+
|
|
142
|
+
### 4. Update State (core)
|
|
143
|
+
|
|
144
|
+
Read `phases/update-state.md` for what state files and documentation
|
|
145
|
+
to update. This keeps the system's persistent state aligned with
|
|
146
|
+
reality so the next orient reads accurate information.
|
|
147
|
+
|
|
148
|
+
**Default (absent/empty):** At minimum check whether `system-status.md`
|
|
149
|
+
(or equivalent) needs updating to reflect what was built, fixed, or
|
|
150
|
+
changed.
|
|
151
|
+
|
|
152
|
+
Also check the **user-level state** (silently — don't make this a
|
|
153
|
+
conversation unless something needs updating):
|
|
154
|
+
|
|
155
|
+
- **`~/.claude/CLAUDE.md`** — did the user reveal something about
|
|
156
|
+
themselves this session that isn't in their profile? A new role,
|
|
157
|
+
a new tool they use, a preference about how they work? If so,
|
|
158
|
+
propose adding it. Keep it brief — this isn't an interview.
|
|
159
|
+
- **`~/.claude/cor-registry.json`** — does this project's name or
|
|
160
|
+
description still match reality? If the project has evolved
|
|
161
|
+
significantly, propose updating the registry entry.
|
|
162
|
+
|
|
163
|
+
### 5. Health Checks (core)
|
|
164
|
+
|
|
165
|
+
Read `phases/health-checks.md` for end-of-session health checks. These
|
|
166
|
+
verify that the session's work didn't break anything and that the system
|
|
167
|
+
is in a good state for next time.
|
|
168
|
+
|
|
169
|
+
**Skip (absent/empty).**
|
|
170
|
+
|
|
171
|
+
### 6. Persist Work
|
|
172
|
+
|
|
173
|
+
Commit and push the session's changes. Work that's done but not
|
|
174
|
+
committed is half-closed — it lives locally but isn't durable. Persist
|
|
175
|
+
before recording lessons, so the commit captures code and doc changes
|
|
176
|
+
while lessons go to memory (which may live outside the repo).
|
|
177
|
+
|
|
178
|
+
Separate this session's changes from any pre-existing uncommitted work.
|
|
179
|
+
Don't silently bundle unrelated changes.
|
|
180
|
+
|
|
181
|
+
### 7. Record Lessons (core)
|
|
182
|
+
|
|
183
|
+
Read `phases/record-lessons.md` for how to capture what was learned.
|
|
184
|
+
This is the second irreducible purpose of debrief — the first is
|
|
185
|
+
closing work, this is ensuring the next session is smarter than this
|
|
186
|
+
one.
|
|
187
|
+
|
|
188
|
+
**Default (absent/empty):** At minimum ask: did this session reveal
|
|
189
|
+
anything that future sessions need to know? A new pattern, a gotcha,
|
|
190
|
+
a process gap, a user preference? Lessons are perishable — capture
|
|
191
|
+
them now while context is fresh.
|
|
192
|
+
|
|
193
|
+
> **Debrief lessons vs audit findings:** Debrief captures session-specific
|
|
194
|
+
> learnings — what was discovered while doing this work, what surprised
|
|
195
|
+
> you, what should change. Audit captures systematic observations from
|
|
196
|
+
> cabinet members — what would a specialist notice looking at the
|
|
197
|
+
> whole codebase? Different inputs (one session vs the whole system),
|
|
198
|
+
> different destinations (memory/feedback vs finding database). Both
|
|
199
|
+
> feed the enforcement pipeline, but through different channels.
|
|
200
|
+
|
|
201
|
+
### 8. Upstream Feedback (core)
|
|
202
|
+
|
|
203
|
+
Read `phases/upstream-feedback.md`. This is an **instruction phase**
|
|
204
|
+
shipped with CoR — it tells Claude to reflect on whether the session
|
|
205
|
+
revealed friction with any CoR-provided skill, phase, or convention.
|
|
206
|
+
|
|
207
|
+
If friction is found, Claude drafts a short feedback item and surfaces
|
|
208
|
+
it in the report for the user to confirm, edit, or dismiss. If
|
|
209
|
+
confirmed, the feedback is delivered to the CoR repo (via local link
|
|
210
|
+
or GitHub issue). If nothing — the phase is silent.
|
|
211
|
+
|
|
212
|
+
This is different from `/extract` (which proposes generalizable
|
|
213
|
+
artifacts for upstreaming). This captures field friction: what hurt,
|
|
214
|
+
what was confusing, what needed a workaround.
|
|
215
|
+
|
|
216
|
+
**This phase should not be skipped.** It's how CoR learns from use.
|
|
217
|
+
|
|
218
|
+
### 9. Skill Discovery (core)
|
|
219
|
+
|
|
220
|
+
Silently reflect: did this session involve a workflow the user is
|
|
221
|
+
likely to repeat? Not every session produces one — most don't. But
|
|
222
|
+
when a session walks through a multi-step process that has a clear
|
|
223
|
+
trigger and structure, that's a candidate for a project skill.
|
|
224
|
+
|
|
225
|
+
**Most sessions: nothing.** This check should be silent when there's
|
|
226
|
+
nothing to surface. Don't force it.
|
|
227
|
+
|
|
228
|
+
**When there's a candidate:** Describe the pattern and ask:
|
|
229
|
+
|
|
230
|
+
> "We walked through [analyzing that deal / onboarding that client /
|
|
231
|
+
> writing that report] step by step. If that's something you'll do
|
|
232
|
+
> again, I could turn it into a `/analyze-deal` command so next time
|
|
233
|
+
> you just invoke it and I follow the same process. Want me to?"
|
|
234
|
+
|
|
235
|
+
If the user says yes, create the skill: a SKILL.md in
|
|
236
|
+
`.claude/skills/[name]/` with the workflow captured as steps. Use
|
|
237
|
+
the skeleton/phase pattern if it makes sense, or keep it simple for
|
|
238
|
+
straightforward workflows. The skill should encode the *process*,
|
|
239
|
+
not the specific content from this session.
|
|
240
|
+
|
|
241
|
+
If the user says no, move on.
|
|
242
|
+
|
|
243
|
+
**Separately and less commonly:** did this session produce something
|
|
244
|
+
that could be useful *beyond* this project — in any project? A
|
|
245
|
+
generalizable pattern, cabinet member, or convention? If so, mention
|
|
246
|
+
`/extract` as an option for proposing it upstream to CoR. This is
|
|
247
|
+
rarer than project-specific skills.
|
|
248
|
+
|
|
249
|
+
### 10. Cabinet Check (core)
|
|
250
|
+
|
|
251
|
+
Silently reflect: is this project's expertise coverage still right
|
|
252
|
+
for what it's actually doing?
|
|
253
|
+
|
|
254
|
+
This is the anti-entropy mechanism for the cabinet. Without
|
|
255
|
+
it, a project can adopt a framework, start handling sensitive data, or
|
|
256
|
+
grow complex enough to need architectural review — and none of the
|
|
257
|
+
relevant expertise ever activates because nobody ran `/seed`.
|
|
258
|
+
|
|
259
|
+
**Two checks, both silent unless they find something:**
|
|
260
|
+
|
|
261
|
+
**Check A — Uncovered technology.** Quickly scan what this session
|
|
262
|
+
touched. Did the work involve a framework, library, data store, or
|
|
263
|
+
infrastructure that isn't covered by any existing cabinet member? Compare
|
|
264
|
+
against the cabinet members in `.claude/skills/cabinet-*/` and the
|
|
265
|
+
committees in `committees.yaml`.
|
|
266
|
+
|
|
267
|
+
Examples of what to catch:
|
|
268
|
+
- Session used Mantine components but there's no framework-quality
|
|
269
|
+
cabinet member
|
|
270
|
+
- Session wrote database queries but there's no data-integrity
|
|
271
|
+
cabinet member
|
|
272
|
+
- Session built UI but accessibility isn't in any active committee
|
|
273
|
+
|
|
274
|
+
**Check B — Dormant cabinet member that should be active.** Are there
|
|
275
|
+
cabinet members installed in the project that aren't in any `committees.yaml`
|
|
276
|
+
committee, but based on the last few sessions, probably should be? A
|
|
277
|
+
cabinet member sitting dormant while the project does exactly the kind of
|
|
278
|
+
work it's designed to review is a waste.
|
|
279
|
+
|
|
280
|
+
**Most sessions: nothing.** These checks should be completely silent
|
|
281
|
+
when nothing is off. Don't mention cabinet members if everything is fine.
|
|
282
|
+
|
|
283
|
+
**When there's a gap:** Explain it plainly — no jargon about
|
|
284
|
+
"cabinet members" or "committees." Talk about what the project is missing
|
|
285
|
+
in terms of what it would DO for them:
|
|
286
|
+
|
|
287
|
+
> "You've been building UI for the last few sessions, but nothing is
|
|
288
|
+
> checking whether it works well on phones or is usable for people
|
|
289
|
+
> with accessibility needs. I can set that up so it gets checked
|
|
290
|
+
> automatically when you run quality reviews. Want me to?"
|
|
291
|
+
|
|
292
|
+
or:
|
|
293
|
+
|
|
294
|
+
> "You're using Mantine a lot now. There's a specialist review that
|
|
295
|
+
> checks whether you're getting the full value from it — catching
|
|
296
|
+
> things like hand-rolling components that Mantine already provides.
|
|
297
|
+
> Want me to turn that on?"
|
|
298
|
+
|
|
299
|
+
or:
|
|
300
|
+
|
|
301
|
+
> "This project has gotten complex enough that it might help to have
|
|
302
|
+
> something watching whether the overall architecture still makes
|
|
303
|
+
> sense as it grows. Want me to set that up?"
|
|
304
|
+
|
|
305
|
+
If the user says yes, either:
|
|
306
|
+
- Activate a dormant cabinet member (add it to `committees.yaml`)
|
|
307
|
+
- Run `/seed` to build a new one
|
|
308
|
+
- Install a Tier 3 cabinet member that isn't in the project yet
|
|
309
|
+
|
|
310
|
+
If the user says no, move on. Don't re-suggest the same gap next
|
|
311
|
+
session. Track declined suggestions in system-status.md or equivalent
|
|
312
|
+
so you don't nag.
|
|
313
|
+
|
|
314
|
+
### 11. Capture Loose Ends (core)
|
|
315
|
+
|
|
316
|
+
Read `phases/loose-ends.md` for non-project items and environmental
|
|
317
|
+
concerns to capture before closing. Sessions generate non-project
|
|
318
|
+
work — manual tasks, purchases, emails, configuration changes. If
|
|
319
|
+
these aren't captured somewhere, they rely on human memory.
|
|
320
|
+
|
|
321
|
+
**Skip (absent/empty).**
|
|
322
|
+
|
|
323
|
+
### 12. Discover Custom Phases
|
|
324
|
+
|
|
325
|
+
After running the core phases above, check for any additional phase
|
|
326
|
+
files in `phases/` that the skeleton doesn't define. These are project-
|
|
327
|
+
specific extensions. Each custom phase file declares its position in
|
|
328
|
+
the workflow. Execute them at their declared position.
|
|
329
|
+
|
|
330
|
+
### 13. Present Report (presentation)
|
|
331
|
+
|
|
332
|
+
Read `phases/report.md` for how to present the debrief summary.
|
|
333
|
+
|
|
334
|
+
**Default (absent/empty):** Present a brief summary:
|
|
335
|
+
- Work items closed (with references)
|
|
336
|
+
- State files updated
|
|
337
|
+
- Lessons recorded
|
|
338
|
+
- Anything needing the user's input
|
|
339
|
+
|
|
340
|
+
## Phase Summary
|
|
341
|
+
|
|
342
|
+
| Phase | Absent = | What it customizes |
|
|
343
|
+
|-------|----------|-------------------|
|
|
344
|
+
| `inventory.md` | Default: review git log + session | How to identify what was done |
|
|
345
|
+
| `close-work.md` | Skip | How to close work items |
|
|
346
|
+
| `auto-maintenance.md` | Skip | Recurring session-end tasks |
|
|
347
|
+
| `update-state.md` | Default: check system-status.md | What state files to update |
|
|
348
|
+
| `health-checks.md` | Skip | Session-end health checks |
|
|
349
|
+
| `record-lessons.md` | Default: ask what was learned | How to capture learnings |
|
|
350
|
+
| `upstream-feedback.md` | **Instruction: always runs** | Surface CoR friction to source repo |
|
|
351
|
+
| `loose-ends.md` | Skip | Non-project items to capture |
|
|
352
|
+
| `report.md` | Default: brief summary | How to present the report |
|
|
353
|
+
|
|
354
|
+
## Quick Mode
|
|
355
|
+
|
|
356
|
+
Phases are either **core** (maintain system state) or **presentation**
|
|
357
|
+
(surface information for the user). For lightweight session closes,
|
|
358
|
+
skip presentation phases. Core phases always run.
|
|
359
|
+
|
|
360
|
+
- **Core phases** (always run): inventory, close-work, auto-maintenance,
|
|
361
|
+
update-state, health-checks, record-lessons, upstream-feedback,
|
|
362
|
+
skill-discovery, cabinet-check, loose-ends, persist work
|
|
363
|
+
- **Presentation phases** (skippable): report
|
|
364
|
+
|
|
365
|
+
A project that wants a quick debrief variant skips the report and
|
|
366
|
+
outputs a minimal summary instead.
|
|
367
|
+
|
|
368
|
+
## Extending
|
|
369
|
+
|
|
370
|
+
To customize a phase: write content in the corresponding `phases/` file.
|
|
371
|
+
To skip a phase: leave the file empty or don't create it.
|
|
372
|
+
To add a phase the skeleton doesn't define: create a new file in
|
|
373
|
+
`phases/` with a description of when it runs relative to the core
|
|
374
|
+
phases. Claude reads whatever phase files exist at runtime.
|
|
375
|
+
|
|
376
|
+
Examples of phases mature projects add:
|
|
377
|
+
- Project completion scanning (auto-close projects with zero open items)
|
|
378
|
+
- Prep/research passes on open work items
|
|
379
|
+
- Evening preview (tomorrow's calendar, due items, prep needed)
|
|
380
|
+
- Compliance checks (verify required skills were invoked)
|
|
381
|
+
- Machine/environment drift detection
|
|
382
|
+
|
|
383
|
+
## Calibration
|
|
384
|
+
|
|
385
|
+
**Core failure this targets:** Ending a session without closing loops,
|
|
386
|
+
leaving completed work marked as open, unrecorded lessons, and stale
|
|
387
|
+
state that degrades the next session's orient.
|
|
388
|
+
|
|
389
|
+
### Without Skill (Bad)
|
|
390
|
+
|
|
391
|
+
Session ends. Work was done — a feature built, a bug fixed — but the
|
|
392
|
+
task tracker still shows it as open. Feedback that was addressed stays
|
|
393
|
+
unresolved. A lesson learned about a tricky API behavior isn't written
|
|
394
|
+
down. Next session, orient shows stale tasks, feedback, and the same
|
|
395
|
+
gotcha is rediscovered from scratch.
|
|
396
|
+
|
|
397
|
+
The system is doing work but not learning from it. Each session starts
|
|
398
|
+
from the same baseline instead of building on the last.
|
|
399
|
+
|
|
400
|
+
### With Skill (Good)
|
|
401
|
+
|
|
402
|
+
Session ends. The debrief inventories what was done, marks the feature
|
|
403
|
+
as complete with a commit reference, resolves the feedback comment,
|
|
404
|
+
updates the status file, and records the API gotcha in memory. Next
|
|
405
|
+
session, orient shows accurate state, the feedback queue is clean, and
|
|
406
|
+
when the API comes up again, the lesson is already there.
|
|
407
|
+
|
|
408
|
+
The system gets smarter with each session because debrief closes the
|
|
409
|
+
loop that orient opens.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Auto-Maintenance — Recurring Session-End Tasks
|
|
2
|
+
|
|
3
|
+
Define automated tasks that should run at the end of every session.
|
|
4
|
+
Same principle as orient's auto-maintenance: operations that decay if
|
|
5
|
+
left to human memory.
|
|
6
|
+
|
|
7
|
+
Session-end maintenance differs from session-start: orient's maintenance
|
|
8
|
+
prepares for work, debrief's maintenance cleans up after it.
|
|
9
|
+
|
|
10
|
+
When this file is absent or empty, this step is skipped. (`skip: true`
|
|
11
|
+
is equivalent to absent here.)
|
|
12
|
+
|
|
13
|
+
## What to Include
|
|
14
|
+
|
|
15
|
+
For each task, provide:
|
|
16
|
+
- **What** — the operation to perform
|
|
17
|
+
- **Why every session** — what decays if this is skipped
|
|
18
|
+
- **Command** — how to run it
|
|
19
|
+
- **Auto-execute?** — yes (run silently) or surface (ask user first)
|
|
20
|
+
|
|
21
|
+
## Example Maintenance Tasks
|
|
22
|
+
|
|
23
|
+
Uncomment and adapt these for your project:
|
|
24
|
+
|
|
25
|
+
<!--
|
|
26
|
+
### Scan for Stale Work Items
|
|
27
|
+
```bash
|
|
28
|
+
# Find items that should have been closed but weren't
|
|
29
|
+
sqlite3 project.db "SELECT id, text FROM tasks WHERE status = 'active' AND updated_at < date('now', '-14 days')"
|
|
30
|
+
```
|
|
31
|
+
Items that haven't been touched in two weeks may be stale. Surface for
|
|
32
|
+
user decision: still active, defer, or close.
|
|
33
|
+
|
|
34
|
+
### Clean Build Artifacts
|
|
35
|
+
```bash
|
|
36
|
+
rm -rf .build-cache/tmp/*
|
|
37
|
+
```
|
|
38
|
+
Temporary build artifacts that accumulate. Silent cleanup.
|
|
39
|
+
|
|
40
|
+
### Refresh Research / Prep
|
|
41
|
+
```bash
|
|
42
|
+
# Scan open items for ones that could benefit from background research
|
|
43
|
+
sqlite3 project.db "SELECT id, text FROM tasks WHERE status = 'active' AND prep_status IS NULL"
|
|
44
|
+
```
|
|
45
|
+
Identify work items where doing a quick research pass now would save
|
|
46
|
+
time in a future session. Auto-execute for quick items; surface complex
|
|
47
|
+
ones.
|
|
48
|
+
-->
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# Close Work — Match, Close, and Resolve
|
|
2
|
+
|
|
3
|
+
Define how to match the session's work against open items and close them.
|
|
4
|
+
This includes marking tasks done, resolving feedback, and updating any
|
|
5
|
+
tracking system. The /debrief skill reads this file after inventorying
|
|
6
|
+
what was done.
|
|
7
|
+
|
|
8
|
+
When this file is absent or empty, the default behavior is: query the
|
|
9
|
+
reference data layer (pib-db) for open actions, match against the
|
|
10
|
+
session's git log, and propose marking matched actions as done. If
|
|
11
|
+
pib-db is not initialized, skip gracefully.
|
|
12
|
+
|
|
13
|
+
## Default Behavior (pib-db)
|
|
14
|
+
|
|
15
|
+
When no custom close-work is configured:
|
|
16
|
+
|
|
17
|
+
1. **Get session work:** Review `git log --oneline` for this session's
|
|
18
|
+
commits (since session start or last 2 hours)
|
|
19
|
+
2. **Get open actions:** `node scripts/pib-db.js list-actions`
|
|
20
|
+
3. **Match:** For each open action, check if this session's work
|
|
21
|
+
addresses it (compare action text/notes against commit messages
|
|
22
|
+
and changed files)
|
|
23
|
+
4. **Propose:** Present matched actions and ask the user to confirm
|
|
24
|
+
which to close
|
|
25
|
+
5. **Close confirmed:** `node scripts/pib-db.js complete-action <fid>`
|
|
26
|
+
|
|
27
|
+
If pib-db doesn't exist, skip with a note.
|
|
28
|
+
|
|
29
|
+
## What to Include
|
|
30
|
+
|
|
31
|
+
- **How to query open items** — where your work tracker lives, how to
|
|
32
|
+
read it
|
|
33
|
+
- **How to mark items done** — the command or API to update status
|
|
34
|
+
- **How to resolve feedback** — if your project tracks feedback or
|
|
35
|
+
comments, how to mark them addressed
|
|
36
|
+
- **What to include in completion notes** — commit references, summary
|
|
37
|
+
of what was built
|
|
38
|
+
|
|
39
|
+
## Example Close-Work Patterns
|
|
40
|
+
|
|
41
|
+
Uncomment and adapt these for your project:
|
|
42
|
+
|
|
43
|
+
<!--
|
|
44
|
+
### Task Tracker (Database)
|
|
45
|
+
```bash
|
|
46
|
+
# Query open tasks
|
|
47
|
+
sqlite3 project.db "SELECT id, text, status FROM tasks WHERE status != 'done'"
|
|
48
|
+
|
|
49
|
+
# Mark a task done with commit reference
|
|
50
|
+
COMMIT=$(git log -1 --format=%h)
|
|
51
|
+
sqlite3 project.db "UPDATE tasks SET status = 'done', notes = notes || '\n\nCompleted in $COMMIT' WHERE id = 'TASK_ID'"
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Task Tracker (API)
|
|
55
|
+
```bash
|
|
56
|
+
# Query open tasks
|
|
57
|
+
curl -s https://your-api.example.com/api/tasks?status=open
|
|
58
|
+
|
|
59
|
+
# Mark done
|
|
60
|
+
curl -X PATCH https://your-api.example.com/api/tasks/TASK_ID \
|
|
61
|
+
-H "Content-Type: application/json" \
|
|
62
|
+
-d '{"status": "done", "completedRef": "COMMIT_HASH"}'
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Task Tracker (Markdown)
|
|
66
|
+
```bash
|
|
67
|
+
# Find open tasks
|
|
68
|
+
grep -n '- \[ \]' tasks.md
|
|
69
|
+
|
|
70
|
+
# Mark done (replace checkbox)
|
|
71
|
+
# Edit the file to change `- [ ]` to `- [x]` for completed items
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Feedback / Comments
|
|
75
|
+
```bash
|
|
76
|
+
# Query unresolved feedback
|
|
77
|
+
sqlite3 project.db "SELECT id, text FROM feedback WHERE resolved = 0"
|
|
78
|
+
|
|
79
|
+
# Cross-reference against session work — if the feedback was addressed,
|
|
80
|
+
# resolve it with a note about what fixed it
|
|
81
|
+
sqlite3 project.db "UPDATE feedback SET resolved = 1, resolution = 'Fixed in COMMIT' WHERE id = FEEDBACK_ID"
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Follow-On Work
|
|
85
|
+
When closing an item that has documented sub-phases or next steps in its
|
|
86
|
+
notes, create new items for each. Known work that lives only in completed
|
|
87
|
+
items' notes will be forgotten. There is no "later" — create it now.
|
|
88
|
+
-->
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Health Checks — Session-End Verification
|
|
2
|
+
|
|
3
|
+
Define health checks to run at the end of the session. These verify that
|
|
4
|
+
the session's work didn't break anything and that the system is in a
|
|
5
|
+
good state for the next session.
|
|
6
|
+
|
|
7
|
+
When this file is absent or empty, this step is skipped. (`skip: true`
|
|
8
|
+
is equivalent to absent here.)
|
|
9
|
+
|
|
10
|
+
End-of-session health checks differ from start-of-session: orient checks
|
|
11
|
+
catch pre-existing problems; debrief checks catch problems the session
|
|
12
|
+
may have introduced.
|
|
13
|
+
|
|
14
|
+
## What to Include
|
|
15
|
+
|
|
16
|
+
For each check, provide:
|
|
17
|
+
- **Name** — short label for reporting
|
|
18
|
+
- **Command** — how to run the check
|
|
19
|
+
- **What it catches** — what could have gone wrong during the session
|
|
20
|
+
- **If it fails** — fix now, or note for next session?
|
|
21
|
+
|
|
22
|
+
## Example Health Checks
|
|
23
|
+
|
|
24
|
+
Uncomment and adapt these for your project:
|
|
25
|
+
|
|
26
|
+
<!--
|
|
27
|
+
### Memory Index Freshness
|
|
28
|
+
```bash
|
|
29
|
+
# Verify all memory files are listed in the index
|
|
30
|
+
ls memory/*.md | while read f; do
|
|
31
|
+
basename="$(basename $f)"
|
|
32
|
+
grep -q "$basename" memory/MEMORY.md || echo "MISSING: $basename"
|
|
33
|
+
done
|
|
34
|
+
```
|
|
35
|
+
Catches memory files created during the session that weren't added to
|
|
36
|
+
the index. Fix immediately — an unlisted memory file is invisible.
|
|
37
|
+
|
|
38
|
+
### State File Consistency
|
|
39
|
+
```bash
|
|
40
|
+
# Verify system-status.md was updated if code changed
|
|
41
|
+
CHANGED=$(git diff --name-only HEAD~5 | grep -v '.md$' | wc -l)
|
|
42
|
+
STATUS_CHANGED=$(git diff --name-only HEAD~5 | grep 'system-status.md' | wc -l)
|
|
43
|
+
[ "$CHANGED" -gt 0 ] && [ "$STATUS_CHANGED" -eq 0 ] && echo "WARN: code changed but status not updated"
|
|
44
|
+
```
|
|
45
|
+
If code was changed but the status file wasn't updated, the next
|
|
46
|
+
orient will read stale state. Fix before closing.
|
|
47
|
+
|
|
48
|
+
### Build Verification
|
|
49
|
+
```bash
|
|
50
|
+
npm run build 2>&1 | tail -5
|
|
51
|
+
```
|
|
52
|
+
Verify the project still builds after changes. If broken, fix before
|
|
53
|
+
committing or note the failure clearly.
|
|
54
|
+
-->
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Inventory — How to Identify What Was Done
|
|
2
|
+
|
|
3
|
+
Define how to determine what the session accomplished. The /debrief skill
|
|
4
|
+
reads this file to build a list of completed work before matching it
|
|
5
|
+
against open items.
|
|
6
|
+
|
|
7
|
+
When this file is absent or empty, the default behavior is: review git
|
|
8
|
+
log, files changed, and session context. To explicitly skip inventory,
|
|
9
|
+
write only `skip: true`.
|
|
10
|
+
|
|
11
|
+
## What to Include
|
|
12
|
+
|
|
13
|
+
For each evidence source, provide:
|
|
14
|
+
- **Source** — where to look for what changed
|
|
15
|
+
- **Command** — how to query it
|
|
16
|
+
- **What it reveals** — commits, file changes, conversation actions
|
|
17
|
+
|
|
18
|
+
## Example Inventory Methods
|
|
19
|
+
|
|
20
|
+
Uncomment and adapt these for your project:
|
|
21
|
+
|
|
22
|
+
<!--
|
|
23
|
+
### Git History
|
|
24
|
+
```bash
|
|
25
|
+
git log --oneline -20 # recent commits
|
|
26
|
+
git diff --stat HEAD~5 # files changed
|
|
27
|
+
```
|
|
28
|
+
The primary evidence of what was built, fixed, or modified.
|
|
29
|
+
|
|
30
|
+
### Conversation Context
|
|
31
|
+
Review what was discussed, what plans were executed, what features were
|
|
32
|
+
built, what bugs were fixed. This catches work that isn't yet committed.
|
|
33
|
+
|
|
34
|
+
### Deployment Log
|
|
35
|
+
```bash
|
|
36
|
+
cat deploy/latest.log
|
|
37
|
+
```
|
|
38
|
+
If the session included a deployment, note what was deployed and whether
|
|
39
|
+
it succeeded.
|
|
40
|
+
-->
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Loose Ends — Non-Project Items to Capture
|
|
2
|
+
|
|
3
|
+
Define how to sweep for non-project items and environmental concerns
|
|
4
|
+
before closing the session. Sessions generate work that isn't part of
|
|
5
|
+
the main project — manual tasks, purchases, emails, configuration
|
|
6
|
+
changes, appointments. If these aren't captured, they rely on human
|
|
7
|
+
memory, which violates the anti-entropy principle.
|
|
8
|
+
|
|
9
|
+
When this file is absent or empty, this step is skipped. (`skip: true`
|
|
10
|
+
is equivalent to absent here.)
|
|
11
|
+
|
|
12
|
+
## What to Include
|
|
13
|
+
|
|
14
|
+
- **What to scan for** — categories of non-project items
|
|
15
|
+
- **Where to route them** — inbox, task tracker, notes, specific lists
|
|
16
|
+
- **How to capture** — API calls, file edits, commands
|
|
17
|
+
|
|
18
|
+
## Example Loose Ends Patterns
|
|
19
|
+
|
|
20
|
+
Uncomment and adapt these for your project:
|
|
21
|
+
|
|
22
|
+
<!--
|
|
23
|
+
### Non-Project Tasks
|
|
24
|
+
Scan the session for anything that came up which isn't a project task
|
|
25
|
+
but should be tracked:
|
|
26
|
+
- Manual steps the user needs to take outside the terminal
|
|
27
|
+
- Purchases or orders to place
|
|
28
|
+
- Emails or messages to send
|
|
29
|
+
- License acceptances or account actions
|
|
30
|
+
- Appointments or scheduling tasks
|
|
31
|
+
|
|
32
|
+
Route each to its proper home — don't dump everything in a generic
|
|
33
|
+
inbox if you know the category. An item that's already classified
|
|
34
|
+
should go directly to the right place.
|
|
35
|
+
|
|
36
|
+
### Environment Changes
|
|
37
|
+
If the session changed anything that lives outside of git:
|
|
38
|
+
- New background processes or services started
|
|
39
|
+
- System permissions granted
|
|
40
|
+
- New tools or dependencies installed globally
|
|
41
|
+
- Environment variables added or changed
|
|
42
|
+
- Configuration files outside the project directory
|
|
43
|
+
|
|
44
|
+
Record these in a setup or environment file so the configuration can
|
|
45
|
+
be reproduced. An environment change that isn't documented is a change
|
|
46
|
+
that gets lost on the next machine.
|
|
47
|
+
|
|
48
|
+
### If Nothing Surfaced
|
|
49
|
+
This is the most common outcome. If no non-project items came up during
|
|
50
|
+
the session, skip this phase silently — don't report "no loose ends
|
|
51
|
+
found."
|
|
52
|
+
-->
|