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,122 @@
|
|
|
1
|
+
# Summary — Present What Was Generated or Changed
|
|
2
|
+
|
|
3
|
+
Close the onboard session with a clear accounting of what happened,
|
|
4
|
+
what was deferred, and what comes next. The user should leave knowing
|
|
5
|
+
exactly what files exist, what they do, and what the next step is.
|
|
6
|
+
|
|
7
|
+
When this file is absent or empty, the default behavior is: present a
|
|
8
|
+
structured summary as described below. To explicitly skip the summary,
|
|
9
|
+
write only `skip: true`.
|
|
10
|
+
|
|
11
|
+
## First-Run Summary
|
|
12
|
+
|
|
13
|
+
Present three sections:
|
|
14
|
+
|
|
15
|
+
### Files Generated
|
|
16
|
+
|
|
17
|
+
List every file that was created, with a one-line description of what
|
|
18
|
+
it does and where it's read:
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
Created:
|
|
22
|
+
cabinet/_briefing.md
|
|
23
|
+
Project identity and configuration. Read by all cabinet members.
|
|
24
|
+
|
|
25
|
+
system-status.md
|
|
26
|
+
Current state tracking. Read by orient, updated by debrief.
|
|
27
|
+
|
|
28
|
+
.claude/skills/orient/phases/context.md
|
|
29
|
+
What orient reads at session start. Points at _briefing.md and
|
|
30
|
+
system-status.md.
|
|
31
|
+
|
|
32
|
+
.claude/skills/orient/phases/data-sync.md
|
|
33
|
+
How to pull fresh data from [remote store]. Runs at session start.
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Modules Adopted
|
|
37
|
+
|
|
38
|
+
List which modules were selected and what they provide:
|
|
39
|
+
```
|
|
40
|
+
Adopted:
|
|
41
|
+
Session loop (orient + debrief) — MANDATORY
|
|
42
|
+
Work tracking (pib-db) — set up with initial backlog
|
|
43
|
+
|
|
44
|
+
Deferred:
|
|
45
|
+
Planning — will revisit when task complexity increases
|
|
46
|
+
Compliance stack — no recurring patterns to encode yet
|
|
47
|
+
Audit loop — codebase too small for systematic review
|
|
48
|
+
Capability seeding — not needed yet
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### What to Do Next
|
|
52
|
+
|
|
53
|
+
Concrete next steps, not abstract advice:
|
|
54
|
+
- "Run `/orient` to start your first CoR session. It will read the
|
|
55
|
+
briefing files we just generated."
|
|
56
|
+
- "After your first working session, run `/debrief` to close the loop."
|
|
57
|
+
- "The briefing files are rough. After 3-5 sessions, run `/onboard` again
|
|
58
|
+
to refine based on what you've learned."
|
|
59
|
+
|
|
60
|
+
Emphasize progressive refinement: these files are a starting point. The
|
|
61
|
+
session loop will reveal what's missing, and re-running onboard captures
|
|
62
|
+
those discoveries.
|
|
63
|
+
|
|
64
|
+
## Re-Run Summary
|
|
65
|
+
|
|
66
|
+
For re-runs, present a before/after view:
|
|
67
|
+
|
|
68
|
+
### Changes Made
|
|
69
|
+
|
|
70
|
+
Show each file that was modified with a summary of what changed and why:
|
|
71
|
+
```
|
|
72
|
+
Updated:
|
|
73
|
+
_briefing.md
|
|
74
|
+
Added scan scope for tests/ directory (orient wasn't checking tests).
|
|
75
|
+
Updated architecture section to reflect new API layer.
|
|
76
|
+
|
|
77
|
+
orient/phases/health-checks.md
|
|
78
|
+
Added deploy pipeline check (user reported stale deploys going unnoticed).
|
|
79
|
+
|
|
80
|
+
Removed:
|
|
81
|
+
orient/phases/auto-maintenance.md
|
|
82
|
+
Symlink check was running every session but symlinks haven't changed
|
|
83
|
+
in 6 weeks. Retired.
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Unchanged
|
|
87
|
+
|
|
88
|
+
Note what was reviewed but left as-is, so the user knows it was
|
|
89
|
+
considered:
|
|
90
|
+
```
|
|
91
|
+
Reviewed, no changes:
|
|
92
|
+
system-status.md — still accurate
|
|
93
|
+
debrief/phases/update-state.md — working as intended
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Module Status Changes
|
|
97
|
+
|
|
98
|
+
If any modules were adopted or retired during this re-run:
|
|
99
|
+
```
|
|
100
|
+
Newly adopted:
|
|
101
|
+
Compliance stack — added first .claude/rules/ file for API conventions
|
|
102
|
+
|
|
103
|
+
Retired:
|
|
104
|
+
(none this run)
|
|
105
|
+
|
|
106
|
+
Still deferred:
|
|
107
|
+
Audit loop — revisit when codebase grows
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Next Steps
|
|
111
|
+
|
|
112
|
+
Same as first-run but adapted to the project's maturity:
|
|
113
|
+
- What to watch for in the next few sessions
|
|
114
|
+
- When to consider the next re-run
|
|
115
|
+
- Any manual steps that onboard couldn't automate
|
|
116
|
+
|
|
117
|
+
## Tone
|
|
118
|
+
|
|
119
|
+
Keep it factual and brief. The user just had a conversation — they don't
|
|
120
|
+
need the conversation summarized back to them. They need to know what
|
|
121
|
+
files exist, what changed, and what to do next. Every line in the summary
|
|
122
|
+
should be actionable or informational, not decorative.
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
# Work Tracking — Choose How to Track Work
|
|
2
|
+
|
|
3
|
+
After the interview and before generating context, surface how the project
|
|
4
|
+
tracks work — or start tracking if nothing exists yet. This phase presents
|
|
5
|
+
two built-in options plus bring-your-own. The user chooses one, the other,
|
|
6
|
+
or neither.
|
|
7
|
+
|
|
8
|
+
When this file is absent or empty, the default behavior is: detect existing
|
|
9
|
+
work tracking, present options, record the choice in `.corrc.json`. To skip
|
|
10
|
+
work-tracking decisions entirely, write only `skip: true`.
|
|
11
|
+
|
|
12
|
+
## When This Phase Activates
|
|
13
|
+
|
|
14
|
+
This phase runs in all onboard modes (first-run, early re-run, mature re-run).
|
|
15
|
+
|
|
16
|
+
- **First-run:** Present the two default options, ask user to choose
|
|
17
|
+
- **Early re-run:** Show what's currently set up, ask if it's working well
|
|
18
|
+
- **Mature re-run:** Review what's being used, surface if it's time to switch
|
|
19
|
+
|
|
20
|
+
## Detection: What Already Exists
|
|
21
|
+
|
|
22
|
+
Before presenting options, scan for signs of existing work tracking:
|
|
23
|
+
|
|
24
|
+
1. **pib.db** — SQLite database from a previous CoR install or work-tracking
|
|
25
|
+
module selection
|
|
26
|
+
2. **Markdown task files** — `tasks.md`, `TODO.md`, `backlog.md`, `work.md`
|
|
27
|
+
in the project root or `docs/`
|
|
28
|
+
3. **GitHub Issues** — `gh issue list` returns results (if `gh` CLI is available)
|
|
29
|
+
4. **Custom work-scan phase** — `.claude/skills/orient/phases/work-scan.md`
|
|
30
|
+
with non-default content
|
|
31
|
+
5. **`.corrc.json` workTracking field** — Previous choice already recorded
|
|
32
|
+
|
|
33
|
+
If something is already set up and working, acknowledge it: "I see you're
|
|
34
|
+
using [X]. Is that working well, or would you like to try something
|
|
35
|
+
different?" Don't re-present the full menu unless the user wants to switch.
|
|
36
|
+
|
|
37
|
+
## Detecting Prior Interview Context
|
|
38
|
+
|
|
39
|
+
If the interview already revealed how work is tracked ("I use GitHub Issues",
|
|
40
|
+
"I keep a list in Notion"), reference that answer here. Don't re-ask.
|
|
41
|
+
Instead: "You mentioned using [system]. Should we wire the session loop to
|
|
42
|
+
that, or would you like to try one of these built-in options?"
|
|
43
|
+
|
|
44
|
+
## The Two Built-In Options
|
|
45
|
+
|
|
46
|
+
### Option A: SQLite Database (pib-db)
|
|
47
|
+
|
|
48
|
+
**What it is:** A lightweight, local SQLite database with semantic IDs,
|
|
49
|
+
status tracking, project containers, and tagging. The reference data layer
|
|
50
|
+
that CoR skills (orient, debrief, plan) use by default.
|
|
51
|
+
|
|
52
|
+
**Good for:**
|
|
53
|
+
- Projects that want zero external dependencies (no API keys, no service)
|
|
54
|
+
- Projects where work is created from plans (plan → action in pib-db)
|
|
55
|
+
- Projects with multiple active workstreams that need querying
|
|
56
|
+
- Projects that also use the audit loop (findings can link to actions)
|
|
57
|
+
|
|
58
|
+
**What gets set up:**
|
|
59
|
+
- `pib.db` — SQLite database (created by `node scripts/pib-db.js init`)
|
|
60
|
+
- `scripts/pib-db.js` — CLI for create/query/close operations
|
|
61
|
+
- `scripts/pib-db-schema.sql` — Schema definition
|
|
62
|
+
- Orient `work-scan.md` phase — queries pib-db for open items
|
|
63
|
+
- Plan `work-tracker.md` phase — creates actions from plans
|
|
64
|
+
- Debrief `close-work.md` phase — marks items done
|
|
65
|
+
|
|
66
|
+
**Trade-offs:**
|
|
67
|
+
- Requires `better-sqlite3` npm dependency
|
|
68
|
+
- Work must be created via CoR skills or the CLI
|
|
69
|
+
- No native web UI (though custom dashboards are possible)
|
|
70
|
+
|
|
71
|
+
**Cost:** 2-3 minutes to `npm install better-sqlite3` and initialize.
|
|
72
|
+
|
|
73
|
+
### Option B: Markdown File (tasks.md)
|
|
74
|
+
|
|
75
|
+
**What it is:** A single markdown file with checkbox task items and optional
|
|
76
|
+
metadata tags. No database, no schema, no dependencies. Work items are
|
|
77
|
+
lines in a file, checked off when done:
|
|
78
|
+
|
|
79
|
+
```markdown
|
|
80
|
+
## Active
|
|
81
|
+
|
|
82
|
+
- [ ] Build auth API <!-- area: backend -->
|
|
83
|
+
- [ ] Write docs for onboarding <!-- area: docs -->
|
|
84
|
+
|
|
85
|
+
## Done
|
|
86
|
+
|
|
87
|
+
- [x] Set up CI pipeline <!-- area: infra, completed: 2025-04-01 -->
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Orient and debrief read and write by parsing the markdown file. Plans
|
|
91
|
+
append new items. Everything lives in git.
|
|
92
|
+
|
|
93
|
+
**Good for:**
|
|
94
|
+
- Projects that want all work in git (history, blame, review)
|
|
95
|
+
- Solo projects that want minimal tooling
|
|
96
|
+
- Projects that prefer reading work as a flat file
|
|
97
|
+
- Quick-start projects that might upgrade to pib-db later
|
|
98
|
+
|
|
99
|
+
**What gets set up:**
|
|
100
|
+
- `tasks.md` (or user-chosen name) — The task file
|
|
101
|
+
- Orient `work-scan.md` phase — parses tasks.md for open items
|
|
102
|
+
- Plan `work-tracker.md` phase — appends to tasks.md
|
|
103
|
+
- Debrief `close-work.md` phase — checks off completed items
|
|
104
|
+
|
|
105
|
+
**Trade-offs:**
|
|
106
|
+
- No semantic queries (orient must parse and sort in markdown)
|
|
107
|
+
- Concurrency issues if multiple agents write simultaneously
|
|
108
|
+
- Manual cleanup of old items (no soft-delete)
|
|
109
|
+
- Can't correlate work items with audit findings
|
|
110
|
+
|
|
111
|
+
**Cost:** Zero dependencies, instant setup.
|
|
112
|
+
|
|
113
|
+
### Option C: Bring Your Own
|
|
114
|
+
|
|
115
|
+
**What it is:** You already have a work tracker (GitHub Issues, Linear,
|
|
116
|
+
Jira, Notion, a spreadsheet). This phase doesn't create anything — it
|
|
117
|
+
records what system you use and wires orient/debrief/plan to reference it.
|
|
118
|
+
|
|
119
|
+
**Good for:**
|
|
120
|
+
- Teams with established tracking workflows
|
|
121
|
+
- Projects with complex workflows needing tool-specific integrations
|
|
122
|
+
- Systems that already have API access set up
|
|
123
|
+
|
|
124
|
+
**What gets set up:**
|
|
125
|
+
- Interview notes about the external system
|
|
126
|
+
- Placeholder phase files that reference your system:
|
|
127
|
+
- Orient `work-scan.md` — example queries for your tracker
|
|
128
|
+
- Plan `work-tracker.md` — example creation commands
|
|
129
|
+
- Debrief `close-work.md` — example completion commands
|
|
130
|
+
- You customize the phase files to fit your specific system
|
|
131
|
+
|
|
132
|
+
## Presentation Format
|
|
133
|
+
|
|
134
|
+
Present options concisely, grounded in what the interview revealed:
|
|
135
|
+
|
|
136
|
+
```
|
|
137
|
+
## Work Tracking
|
|
138
|
+
|
|
139
|
+
Based on our conversation: [quote or reference from interview, or "you
|
|
140
|
+
haven't mentioned how you track work yet"]
|
|
141
|
+
|
|
142
|
+
I can set up one of three approaches:
|
|
143
|
+
|
|
144
|
+
**Option A: SQLite Database (pib-db)**
|
|
145
|
+
- Structured, queryable, local-only, no external services
|
|
146
|
+
- Best for: Multiple workstreams, plan→action pipeline, audit integration
|
|
147
|
+
- Cost: npm install + init (~2 min)
|
|
148
|
+
|
|
149
|
+
**Option B: Markdown File (tasks.md)**
|
|
150
|
+
- Simple, git-friendly, zero dependencies
|
|
151
|
+
- Best for: Solo projects, quick start, everything-in-git preference
|
|
152
|
+
- Cost: Zero, instant
|
|
153
|
+
|
|
154
|
+
**Option C: Your Existing System**
|
|
155
|
+
- Wire orient/debrief to GitHub Issues, Linear, Jira, etc.
|
|
156
|
+
- Best for: Teams with established workflows
|
|
157
|
+
- Cost: Customize phase files after onboard
|
|
158
|
+
|
|
159
|
+
Which approach fits your project? You can also skip work tracking for now.
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
## Recording the Choice
|
|
163
|
+
|
|
164
|
+
Record the choice in `.corrc.json` under a `workTracking` field:
|
|
165
|
+
|
|
166
|
+
```json
|
|
167
|
+
{
|
|
168
|
+
"workTracking": {
|
|
169
|
+
"choice": "pib-db"
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
Or for markdown:
|
|
175
|
+
```json
|
|
176
|
+
{
|
|
177
|
+
"workTracking": {
|
|
178
|
+
"choice": "markdown",
|
|
179
|
+
"file": "tasks.md"
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
Or for external:
|
|
185
|
+
```json
|
|
186
|
+
{
|
|
187
|
+
"workTracking": {
|
|
188
|
+
"choice": "external",
|
|
189
|
+
"system": "github-issues"
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
Or if skipped:
|
|
195
|
+
```json
|
|
196
|
+
{
|
|
197
|
+
"workTracking": {
|
|
198
|
+
"choice": "none"
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
## What Downstream Phases Do With This
|
|
204
|
+
|
|
205
|
+
### generate-briefing.md
|
|
206
|
+
Uses the choice to populate `_briefing.md`:
|
|
207
|
+
- pib-db: Documents CLI commands, DB location, query patterns
|
|
208
|
+
- markdown: Documents file location, format conventions
|
|
209
|
+
- external: Documents system name, access patterns
|
|
210
|
+
- none: Notes that work tracking is not configured
|
|
211
|
+
|
|
212
|
+
### generate-session-loop.md
|
|
213
|
+
Creates phase files appropriate to the choice:
|
|
214
|
+
- pib-db: work-scan queries the DB, close-work marks actions done
|
|
215
|
+
- markdown: work-scan parses the file, close-work checks off items
|
|
216
|
+
- external: scaffolds placeholder phases the user customizes
|
|
217
|
+
- none: no work-related phase files created
|
|
218
|
+
|
|
219
|
+
### modularity-menu.md
|
|
220
|
+
Reflects the choice in the module status table. If the user chose markdown,
|
|
221
|
+
the "Work Tracking" module shows as "ACTIVE (markdown)" not "NOT ADOPTED."
|
|
222
|
+
|
|
223
|
+
## Migration Path
|
|
224
|
+
|
|
225
|
+
If a user chose markdown initially and later wants to switch to pib-db:
|
|
226
|
+
|
|
227
|
+
1. Run `/onboard` again
|
|
228
|
+
2. Early re-run detects markdown tracking
|
|
229
|
+
3. Work-tracking phase asks: "Still using tasks.md? Anything missing?"
|
|
230
|
+
4. If user wants to upgrade: offer to import from markdown into pib-db
|
|
231
|
+
5. Update `.corrc.json` and regenerate phase files
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: orient
|
|
3
|
+
description: |
|
|
4
|
+
Session briefing. Reads project state, syncs data, scans work items,
|
|
5
|
+
runs health checks, then briefs you so the session starts informed.
|
|
6
|
+
This is a skeleton skill using the phases/ directory pattern. Use when:
|
|
7
|
+
session start, "orient", "what's the state", "/orient", "quick orient",
|
|
8
|
+
"orient-quick", "/orient-quick". If "quick" is mentioned, use the Quick
|
|
9
|
+
Mode section — run core phases only, skip presentation phases.
|
|
10
|
+
related:
|
|
11
|
+
- type: file
|
|
12
|
+
path: .claude/skills/orient/phases/context.md
|
|
13
|
+
role: "Project-specific: what to read at session start"
|
|
14
|
+
- type: file
|
|
15
|
+
path: .claude/skills/orient/phases/data-sync.md
|
|
16
|
+
role: "Project-specific: how to sync fresh data"
|
|
17
|
+
- type: file
|
|
18
|
+
path: .claude/skills/orient/phases/work-scan.md
|
|
19
|
+
role: "Project-specific: what work items to check"
|
|
20
|
+
- type: file
|
|
21
|
+
path: .claude/skills/orient/phases/health-checks.md
|
|
22
|
+
role: "Project-specific: system health checks"
|
|
23
|
+
- type: file
|
|
24
|
+
path: .claude/skills/orient/phases/auto-maintenance.md
|
|
25
|
+
role: "Project-specific: recurring session-start tasks"
|
|
26
|
+
- type: file
|
|
27
|
+
path: .claude/skills/orient/phases/briefing.md
|
|
28
|
+
role: "Project-specific: how to present the orientation"
|
|
29
|
+
- type: file
|
|
30
|
+
path: .claude/skills/orient/phases/cabinet.md
|
|
31
|
+
role: "Project-specific: which cabinet members to activate"
|
|
32
|
+
- type: file
|
|
33
|
+
path: cabinet/_briefing.md
|
|
34
|
+
role: "Project identity and configuration"
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
# /orient — Session Briefing
|
|
38
|
+
|
|
39
|
+
## Purpose
|
|
40
|
+
|
|
41
|
+
Start every session with a briefing. Before anyone makes a decision,
|
|
42
|
+
assemble what happened since last time, what needs attention, and what's
|
|
43
|
+
on the agenda. Without this, Claude starts every session blind — same
|
|
44
|
+
mistakes, same questions, same missed context. Orient reads the past so
|
|
45
|
+
debrief can write the future. That's the loop that gives your cabinet
|
|
46
|
+
continuity.
|
|
47
|
+
|
|
48
|
+
This is a **skeleton skill** using the `phases/` directory pattern. The
|
|
49
|
+
orchestration (what to do and in what order) is generic. Your project
|
|
50
|
+
defines the specifics — what files to read, what data to sync, what work
|
|
51
|
+
items to check — in phase files under `phases/`.
|
|
52
|
+
|
|
53
|
+
### Phase File Protocol
|
|
54
|
+
|
|
55
|
+
Phase files have three states:
|
|
56
|
+
|
|
57
|
+
| State | Meaning |
|
|
58
|
+
|-------|---------|
|
|
59
|
+
| Absent or empty | Use this skeleton's **default behavior** for the phase |
|
|
60
|
+
| Contains only `skip: true` | **Explicitly opted out** — skip this phase entirely |
|
|
61
|
+
| Contains content | **Custom behavior** — use the file's content instead |
|
|
62
|
+
|
|
63
|
+
The skeleton always does something reasonable when a phase file is absent.
|
|
64
|
+
Phase files customize, not enable. Use `skip: true` when you actively
|
|
65
|
+
don't want a phase to run — not even the default.
|
|
66
|
+
|
|
67
|
+
## Why This Matters
|
|
68
|
+
|
|
69
|
+
If Claude Code starts a session without reading what happened last time,
|
|
70
|
+
it has no memory. If it ends a session without recording what happened,
|
|
71
|
+
the next session starts blind. Orient doesn't need to be complex — a
|
|
72
|
+
minimal orient reads a project description and a status file. A mature
|
|
73
|
+
orient pulls fresh data, checks queues, evaluates health, and surfaces
|
|
74
|
+
what needs attention. The complexity grows from use: each check gets
|
|
75
|
+
added because its absence caused a problem. But the loop itself must
|
|
76
|
+
exist from day one, or nothing that follows has a foundation.
|
|
77
|
+
|
|
78
|
+
## Workflow
|
|
79
|
+
|
|
80
|
+
### 1. Load Context (core)
|
|
81
|
+
|
|
82
|
+
Read `phases/context.md` for the list of files and state to load at
|
|
83
|
+
session start. This typically includes status files, memory from prior
|
|
84
|
+
sessions, and project-specific context.
|
|
85
|
+
|
|
86
|
+
**Default (absent/empty):** Read at minimum:
|
|
87
|
+
- The project's root `CLAUDE.md` (already loaded by Claude Code)
|
|
88
|
+
- `system-status.md` or equivalent state file if one exists
|
|
89
|
+
- `.claude/memory/patterns/` — enforcement patterns from prior sessions.
|
|
90
|
+
Scan the directory, read each pattern file. These are project-level
|
|
91
|
+
feedback that guides behavior (what to avoid, what to keep doing).
|
|
92
|
+
|
|
93
|
+
The goal: build a mental model of where things stand before doing
|
|
94
|
+
anything else.
|
|
95
|
+
|
|
96
|
+
### 2. Sync Data (core)
|
|
97
|
+
|
|
98
|
+
Read `phases/data-sync.md` for how to pull fresh canonical data from
|
|
99
|
+
remote sources (databases, APIs, shared storage).
|
|
100
|
+
|
|
101
|
+
**Skip (absent/empty).** Purely local projects don't need it. Projects
|
|
102
|
+
with remote canonical data stores define their sync commands here.
|
|
103
|
+
|
|
104
|
+
Report if sync fails — a stale local cache is better than no data, but
|
|
105
|
+
the user should know it's stale.
|
|
106
|
+
|
|
107
|
+
### 3. Scan Work Items (core)
|
|
108
|
+
|
|
109
|
+
Read `phases/work-scan.md` for what work items to check. This includes
|
|
110
|
+
whatever the project uses to track work: a backlog, task list, inbox,
|
|
111
|
+
queue, or issue tracker.
|
|
112
|
+
|
|
113
|
+
**Skip (absent/empty).** But note: without work scanning, orient can
|
|
114
|
+
only report on project state, not on what needs doing. This phase is
|
|
115
|
+
what connects orientation to action.
|
|
116
|
+
|
|
117
|
+
### 4. Health Checks (core)
|
|
118
|
+
|
|
119
|
+
Read `phases/health-checks.md` for system health and validation checks
|
|
120
|
+
to run at session start. These catch problems early — stale data, broken
|
|
121
|
+
references, failed background processes, configuration drift.
|
|
122
|
+
|
|
123
|
+
**Skip (absent/empty).** Projects add health checks as they discover
|
|
124
|
+
failure modes worth detecting early.
|
|
125
|
+
|
|
126
|
+
**Built-in check (always runs):** If `~/.claude/cor-registry.json`
|
|
127
|
+
exists, verify this project is in it and the entry is current. If
|
|
128
|
+
other registry entries point to paths that no longer exist, silently
|
|
129
|
+
note it — mention during briefing only if the user might care (e.g.,
|
|
130
|
+
"Your old project 'deal-v1' seems to have been deleted — want me to
|
|
131
|
+
remove it from the registry?").
|
|
132
|
+
|
|
133
|
+
> **Orient vs Pulse vs Audit:** Orient health checks verify *operational*
|
|
134
|
+
> state — is the system running, is data fresh, are processes alive?
|
|
135
|
+
> Pulse (embedded in orient) verifies *descriptive* accuracy — do counts
|
|
136
|
+
> match, do documented states match reality? Audit verifies *quality*
|
|
137
|
+
> through expert cabinet members — is the code sound, are conventions
|
|
138
|
+
> holding? Orient runs every session; pulse runs inside it; audit runs
|
|
139
|
+
> periodically. Each asks a different question about the same system.
|
|
140
|
+
|
|
141
|
+
### 5. Auto-Maintenance (core)
|
|
142
|
+
|
|
143
|
+
Read `phases/auto-maintenance.md` for recurring automated tasks that
|
|
144
|
+
should run every session. These are operations that would decay if left
|
|
145
|
+
to human memory — the anti-entropy principle in action.
|
|
146
|
+
|
|
147
|
+
**Skip (absent/empty).** Projects add maintenance tasks as they discover
|
|
148
|
+
operations that need regular execution but aren't worth remembering to
|
|
149
|
+
invoke manually.
|
|
150
|
+
|
|
151
|
+
### 6. Activate Cabinet Members (core)
|
|
152
|
+
|
|
153
|
+
Read `phases/cabinet.md` for which expert cabinet members or lenses
|
|
154
|
+
should be active during this session. Cabinet members watch for specific
|
|
155
|
+
concerns (quality, security, process adherence, non-project items)
|
|
156
|
+
without being explicitly invoked for each decision.
|
|
157
|
+
|
|
158
|
+
**Skip (absent/empty).**
|
|
159
|
+
|
|
160
|
+
### 7. Present Briefing (presentation)
|
|
161
|
+
|
|
162
|
+
Read `phases/briefing.md` for how to present the orientation results.
|
|
163
|
+
This phase controls format, sections, tone, and any time-aware or
|
|
164
|
+
context-aware presentation modes.
|
|
165
|
+
|
|
166
|
+
**Default (absent/empty):** Present a simple summary of what was gathered
|
|
167
|
+
in steps 1-6: project state, work items needing attention, any health
|
|
168
|
+
issues found, maintenance results.
|
|
169
|
+
|
|
170
|
+
### 8. Discover Custom Phases
|
|
171
|
+
|
|
172
|
+
After running the core phases above, check for any additional phase
|
|
173
|
+
files in `phases/` that the skeleton doesn't define. These are project-
|
|
174
|
+
specific extensions. Each custom phase file declares its position in the
|
|
175
|
+
workflow (e.g., "runs after work scan, before briefing"). Execute them
|
|
176
|
+
at their declared position.
|
|
177
|
+
|
|
178
|
+
### 9. Name the Session
|
|
179
|
+
|
|
180
|
+
Rename the session so the sidebar is scannable. Every session that starts
|
|
181
|
+
with `/orient` looks identical in the history — naming fixes this.
|
|
182
|
+
|
|
183
|
+
After the briefing and the user's response, derive a short name (3-6
|
|
184
|
+
words) from what the user says they're working on. If the user hasn't
|
|
185
|
+
stated a focus, ask.
|
|
186
|
+
|
|
187
|
+
## Phase Summary
|
|
188
|
+
|
|
189
|
+
| Phase | Absent = | What it customizes |
|
|
190
|
+
|-------|----------|-------------------|
|
|
191
|
+
| `context.md` | Default: read CLAUDE.md, status, memory | What files and state to load |
|
|
192
|
+
| `data-sync.md` | Skip | How to sync remote data |
|
|
193
|
+
| `work-scan.md` | Skip | What work items to check |
|
|
194
|
+
| `health-checks.md` | Skip | System health checks |
|
|
195
|
+
| `auto-maintenance.md` | Skip | Recurring session-start tasks |
|
|
196
|
+
| `cabinet.md` | Skip | Which cabinet members to activate |
|
|
197
|
+
| `briefing.md` | Default: simple summary | How to present orientation |
|
|
198
|
+
|
|
199
|
+
## Quick Mode
|
|
200
|
+
|
|
201
|
+
Phases are either **core** (maintain system state) or **presentation**
|
|
202
|
+
(surface information for the user). For lightweight sessions where the
|
|
203
|
+
user already knows what they're doing, skip presentation phases. Core
|
|
204
|
+
phases always run because they keep the system healthy.
|
|
205
|
+
|
|
206
|
+
- **Core phases** (always run): context, data-sync, work-scan,
|
|
207
|
+
health-checks, auto-maintenance, cabinet
|
|
208
|
+
- **Presentation phases** (skippable): briefing
|
|
209
|
+
|
|
210
|
+
A project that wants a quick orient variant skips the briefing phase
|
|
211
|
+
and outputs a one-line confirmation instead.
|
|
212
|
+
|
|
213
|
+
## Extending
|
|
214
|
+
|
|
215
|
+
To customize a phase: write content in the corresponding `phases/` file.
|
|
216
|
+
To skip a phase: leave the file empty or don't create it.
|
|
217
|
+
To add a phase the skeleton doesn't define: create a new file in
|
|
218
|
+
`phases/` with a description of when it runs relative to the core
|
|
219
|
+
phases. Claude reads whatever phase files exist at runtime.
|
|
220
|
+
|
|
221
|
+
Examples of phases mature projects add:
|
|
222
|
+
- Command queue processing (check for instructions from external UIs)
|
|
223
|
+
- Deferred item evaluation (re-check trigger conditions on paused work)
|
|
224
|
+
- Time-aware briefing modes (first session of day vs. returning session)
|
|
225
|
+
- Proactive skill suggestions (surface tools relevant to current state)
|
|
226
|
+
- Calendar integration (upcoming events that need preparation)
|
|
227
|
+
|
|
228
|
+
## Calibration
|
|
229
|
+
|
|
230
|
+
**Core failure this targets:** Starting a session without context, forcing
|
|
231
|
+
the user to reconstruct state from memory or ask for information the
|
|
232
|
+
system already has.
|
|
233
|
+
|
|
234
|
+
### Without Skill (Bad)
|
|
235
|
+
|
|
236
|
+
New session starts. Claude says "How can I help?" The user asks about
|
|
237
|
+
their project status — Claude searches files, reads logs, gives a partial
|
|
238
|
+
picture. The user asks about pending tasks — Claude queries again. The
|
|
239
|
+
user mentions something from last session — Claude has no memory of it.
|
|
240
|
+
|
|
241
|
+
Three round trips to assemble context that one orientation would have
|
|
242
|
+
surfaced. Meanwhile, an overdue deadline sits unmentioned because nobody
|
|
243
|
+
asked about it.
|
|
244
|
+
|
|
245
|
+
### With Skill (Good)
|
|
246
|
+
|
|
247
|
+
New session starts. Claude loads project state, syncs fresh data, scans
|
|
248
|
+
the work backlog, and presents: here's where things stand, here's what
|
|
249
|
+
needs attention, here's what changed since last time. The overdue item
|
|
250
|
+
is surfaced before the user has to remember it. One message, full
|
|
251
|
+
picture. The user decides what to work on from an informed position.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Auto-Maintenance — Recurring Session-Start Tasks
|
|
2
|
+
|
|
3
|
+
Define automated tasks that should run every session. These are operations
|
|
4
|
+
that would decay if left to human memory — the anti-entropy principle
|
|
5
|
+
applied to session management.
|
|
6
|
+
|
|
7
|
+
The distinction from health checks: health checks DETECT problems;
|
|
8
|
+
auto-maintenance DOES work. A health check reports "data is stale."
|
|
9
|
+
|
|
10
|
+
When this file is absent or empty, this step is skipped. (`skip: true`
|
|
11
|
+
is equivalent to absent here.)
|
|
12
|
+
An auto-maintenance task runs the sync to fix it.
|
|
13
|
+
|
|
14
|
+
## What to Include
|
|
15
|
+
|
|
16
|
+
For each task, provide:
|
|
17
|
+
- **What** — the operation to perform
|
|
18
|
+
- **Why every session** — what decays if this is skipped
|
|
19
|
+
- **Command** — how to run it
|
|
20
|
+
- **Auto-execute?** — yes (run silently) or surface (ask user first)
|
|
21
|
+
|
|
22
|
+
## Example Maintenance Tasks
|
|
23
|
+
|
|
24
|
+
Uncomment and adapt these for your project:
|
|
25
|
+
|
|
26
|
+
<!--
|
|
27
|
+
### Process Pending Queue Items
|
|
28
|
+
```bash
|
|
29
|
+
# Check for items queued by external systems
|
|
30
|
+
curl -s https://your-api.example.com/api/queue/pending
|
|
31
|
+
```
|
|
32
|
+
Items queued from a UI or external integration since last session.
|
|
33
|
+
Auto-execute routine items; surface unusual ones for confirmation.
|
|
34
|
+
|
|
35
|
+
### Rotate Logs
|
|
36
|
+
```bash
|
|
37
|
+
# Truncate logs that grow unbounded
|
|
38
|
+
tail -1000 sync/app.log > sync/app.log.tmp && mv sync/app.log.tmp sync/app.log
|
|
39
|
+
```
|
|
40
|
+
Prevents log files from consuming disk. Silent, no user interaction.
|
|
41
|
+
|
|
42
|
+
### Refresh Cached Computations
|
|
43
|
+
```bash
|
|
44
|
+
./scripts/rebuild-index.sh
|
|
45
|
+
```
|
|
46
|
+
Regenerates derived data that may have drifted from source files.
|
|
47
|
+
Run if source files changed since last session.
|
|
48
|
+
-->
|