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,53 @@
|
|
|
1
|
+
# Briefing — How to Present the Orientation
|
|
2
|
+
|
|
3
|
+
Define how to present the results of orientation to the user. This is
|
|
4
|
+
the presentation phase — it can be skipped in quick mode without losing
|
|
5
|
+
any system maintenance value.
|
|
6
|
+
|
|
7
|
+
When this file is absent or empty, the default behavior is: present a
|
|
8
|
+
simple summary of project state, work items, and any health issues.
|
|
9
|
+
To explicitly skip the briefing, write only `skip: true`.
|
|
10
|
+
|
|
11
|
+
## What to Include
|
|
12
|
+
|
|
13
|
+
- **Format** — how to structure the briefing (sections, order, grouping)
|
|
14
|
+
- **Tone** — how to communicate (practical, warm, terse, etc.)
|
|
15
|
+
- **Modes** — if your project uses different presentation modes (e.g.,
|
|
16
|
+
morning vs. standard, verbose vs. compact), define them here
|
|
17
|
+
- **Suggestions** — contextual recommendations based on gathered data
|
|
18
|
+
|
|
19
|
+
## Example Briefing Formats
|
|
20
|
+
|
|
21
|
+
Uncomment and adapt these for your project:
|
|
22
|
+
|
|
23
|
+
<!--
|
|
24
|
+
### Standard Briefing
|
|
25
|
+
|
|
26
|
+
Present in this order:
|
|
27
|
+
1. **Items needing attention** — overdue, flagged, or blocked work
|
|
28
|
+
2. **Inbox** — counts of unprocessed items
|
|
29
|
+
3. **Recent activity** — what changed since last session
|
|
30
|
+
4. **Suggested focus** — 1-3 items grounded in data, not generic
|
|
31
|
+
|
|
32
|
+
Tone: direct, practical. Lead with what matters most.
|
|
33
|
+
Close with: "What are we working on?"
|
|
34
|
+
|
|
35
|
+
### Compact Briefing (quick mode fallback)
|
|
36
|
+
|
|
37
|
+
One line per category, counts only:
|
|
38
|
+
```
|
|
39
|
+
Overdue: 2 | Due today: 1 | Inbox: 5 | Health: OK
|
|
40
|
+
```
|
|
41
|
+
No suggestions, no narrative. Just the numbers.
|
|
42
|
+
|
|
43
|
+
### Time-Aware Modes
|
|
44
|
+
|
|
45
|
+
If the session time matters for your project:
|
|
46
|
+
- **Morning** (first session of day): include calendar, completions
|
|
47
|
+
since yesterday, day-ahead view
|
|
48
|
+
- **Evening** (after 5pm): include tomorrow preview, prep needed
|
|
49
|
+
- **Standard** (all other): focus on work surface and system state
|
|
50
|
+
|
|
51
|
+
Track which mode ran today with a datestamp file to avoid repeating
|
|
52
|
+
the extended briefing on subsequent sessions.
|
|
53
|
+
-->
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Cabinet Members — Which Expert Lenses to Activate
|
|
2
|
+
|
|
3
|
+
Define which cabinet members (expert evaluation lenses) should be active
|
|
4
|
+
during this session. Active cabinet members watch for specific concerns
|
|
5
|
+
throughout the session without being explicitly invoked for each decision.
|
|
6
|
+
|
|
7
|
+
When this file is absent or empty, this step is skipped. (`skip: true`
|
|
8
|
+
is equivalent to absent here.)
|
|
9
|
+
|
|
10
|
+
## What to Include
|
|
11
|
+
|
|
12
|
+
For each cabinet member, provide:
|
|
13
|
+
- **Name** — the cabinet member to activate
|
|
14
|
+
- **Path** — where the cabinet member's SKILL.md lives
|
|
15
|
+
- **When active** — always, or only under certain conditions
|
|
16
|
+
- **What it watches for** — the concern this lens monitors
|
|
17
|
+
|
|
18
|
+
## Example Cabinet Member Configurations
|
|
19
|
+
|
|
20
|
+
Uncomment and adapt these for your project:
|
|
21
|
+
|
|
22
|
+
<!--
|
|
23
|
+
### Always-On Cabinet Members
|
|
24
|
+
|
|
25
|
+
These activate every session regardless of focus:
|
|
26
|
+
|
|
27
|
+
**QA** (`.claude/skills/cabinet-qa/SKILL.md`):
|
|
28
|
+
Watches for untested changes, missing edge cases, and quality gaps.
|
|
29
|
+
Active whenever code is being written or modified.
|
|
30
|
+
|
|
31
|
+
**Workflow Cop** (`.claude/skills/cabinet-workflow-cop/SKILL.md`):
|
|
32
|
+
Watches for process deviations — skipped steps, missing validation,
|
|
33
|
+
undocumented decisions. Active every session.
|
|
34
|
+
|
|
35
|
+
### Conditional Cabinet Members
|
|
36
|
+
|
|
37
|
+
These activate based on session context:
|
|
38
|
+
|
|
39
|
+
**Security** (`.claude/skills/cabinet-security/SKILL.md`):
|
|
40
|
+
Activate when the session involves authentication, data handling,
|
|
41
|
+
external APIs, or user input processing.
|
|
42
|
+
|
|
43
|
+
**Speed Freak** (`.claude/skills/cabinet-speed-freak/SKILL.md`):
|
|
44
|
+
Activate when the session involves database queries, rendering logic,
|
|
45
|
+
or data processing at scale.
|
|
46
|
+
-->
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Context — What to Read at Session Start
|
|
2
|
+
|
|
3
|
+
Define what files and state to load so the session starts with a model
|
|
4
|
+
of where things stand. The /orient skill reads this file and loads each
|
|
5
|
+
item before proceeding.
|
|
6
|
+
|
|
7
|
+
When this file is absent or empty, the default behavior is: read the
|
|
8
|
+
project's root CLAUDE.md, system-status.md, and enforcement patterns
|
|
9
|
+
from `.claude/memory/patterns/`. To explicitly skip context loading,
|
|
10
|
+
write only `skip: true`.
|
|
11
|
+
|
|
12
|
+
## Default Context Sources
|
|
13
|
+
|
|
14
|
+
### System Status
|
|
15
|
+
```
|
|
16
|
+
Read system-status.md
|
|
17
|
+
```
|
|
18
|
+
The single-source-of-truth for what's built, what's broken, and what's
|
|
19
|
+
next. Read every session — it's the fastest way to know where things
|
|
20
|
+
stand.
|
|
21
|
+
|
|
22
|
+
### Enforcement Patterns
|
|
23
|
+
```
|
|
24
|
+
Scan .claude/memory/patterns/ — read each pattern file.
|
|
25
|
+
```
|
|
26
|
+
Project-level feedback from prior sessions. These are consolidated
|
|
27
|
+
observations about what works and what doesn't — they guide behavior
|
|
28
|
+
so the same mistakes aren't repeated. Patterns with `enforcement: guide`
|
|
29
|
+
are behavioral rules. Patterns with `enforcement: prevent` or `detect`
|
|
30
|
+
should already be encoded as hooks or rules, but reading them provides
|
|
31
|
+
context for why those guardrails exist.
|
|
32
|
+
|
|
33
|
+
### Sibling Projects
|
|
34
|
+
```
|
|
35
|
+
Read ~/.claude/cor-registry.json if it exists.
|
|
36
|
+
```
|
|
37
|
+
If the user has other CoR projects, note them. Don't deep-read them,
|
|
38
|
+
but know they exist — if work in this session touches something that
|
|
39
|
+
relates to another project, mention it. "This API change might affect
|
|
40
|
+
your investor-reports project too."
|
|
41
|
+
|
|
42
|
+
## Additional Context Sources
|
|
43
|
+
|
|
44
|
+
Uncomment and adapt these for your project:
|
|
45
|
+
|
|
46
|
+
<!--
|
|
47
|
+
### Memory Index
|
|
48
|
+
```
|
|
49
|
+
Read .claude/memory/MEMORY.md for the index, then load files relevant
|
|
50
|
+
to the session's likely focus.
|
|
51
|
+
```
|
|
52
|
+
If your project uses a memory index beyond patterns (user context,
|
|
53
|
+
project state, references), scan the index and load what's relevant.
|
|
54
|
+
Don't read everything — selective loading based on session focus.
|
|
55
|
+
|
|
56
|
+
### Project-Specific State
|
|
57
|
+
```
|
|
58
|
+
Read config/project-state.yaml
|
|
59
|
+
```
|
|
60
|
+
Whatever your project uses to track configuration, feature flags,
|
|
61
|
+
environment state, or deployment status. Anything that changes between
|
|
62
|
+
sessions and affects how you work.
|
|
63
|
+
-->
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Data Sync — How to Pull Fresh Canonical Data
|
|
2
|
+
|
|
3
|
+
Define how to sync data from remote canonical sources so the local
|
|
4
|
+
environment has current information. The /orient skill reads this file
|
|
5
|
+
and runs each sync step before scanning work items.
|
|
6
|
+
|
|
7
|
+
When this file is absent or empty, this step is skipped — purely local
|
|
8
|
+
projects don't need it. (`skip: true` is equivalent to absent here.)
|
|
9
|
+
|
|
10
|
+
## What to Include
|
|
11
|
+
|
|
12
|
+
For each sync source, provide:
|
|
13
|
+
- **Source** — where the canonical data lives
|
|
14
|
+
- **Command** — how to pull it locally
|
|
15
|
+
- **Failure handling** — what to do if sync fails (use stale data? report?)
|
|
16
|
+
|
|
17
|
+
## Example Sync Sources
|
|
18
|
+
|
|
19
|
+
Uncomment and adapt these for your project:
|
|
20
|
+
|
|
21
|
+
<!--
|
|
22
|
+
### Database Sync
|
|
23
|
+
```bash
|
|
24
|
+
./scripts/sync-db.sh --pull
|
|
25
|
+
```
|
|
26
|
+
Pulls the production database to a local cache. If this fails, note
|
|
27
|
+
staleness and continue — stale data is better than no data.
|
|
28
|
+
|
|
29
|
+
### API State Refresh
|
|
30
|
+
```bash
|
|
31
|
+
curl -s https://your-api.example.com/api/status > .cache/api-status.json
|
|
32
|
+
```
|
|
33
|
+
Fetches current state from a remote API. Cache locally so subsequent
|
|
34
|
+
queries during the session don't require network calls.
|
|
35
|
+
-->
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Health Checks — System Health at Session Start
|
|
2
|
+
|
|
3
|
+
Define health and validation checks to run early in the session. These
|
|
4
|
+
catch problems before they waste time — stale data, broken references,
|
|
5
|
+
failed background processes, configuration drift.
|
|
6
|
+
|
|
7
|
+
Projects add health checks as they discover failure modes worth detecting
|
|
8
|
+
early. A new project may have none; a mature project may have many.
|
|
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 check, provide:
|
|
16
|
+
- **Name** — short label for reporting
|
|
17
|
+
- **Command** — how to run the check
|
|
18
|
+
- **What it catches** — what failure looks like
|
|
19
|
+
- **Severity** — blocking (stop and fix) vs. warning (note and continue)
|
|
20
|
+
|
|
21
|
+
## Example Health Checks
|
|
22
|
+
|
|
23
|
+
Uncomment and adapt these for your project:
|
|
24
|
+
|
|
25
|
+
<!--
|
|
26
|
+
### Data Freshness
|
|
27
|
+
```bash
|
|
28
|
+
# Check if local data cache is recent enough to trust
|
|
29
|
+
LAST_SYNC=$(stat -f %m .cache/db.sqlite 2>/dev/null || echo 0)
|
|
30
|
+
NOW=$(date +%s)
|
|
31
|
+
AGE=$(( (NOW - LAST_SYNC) / 3600 ))
|
|
32
|
+
[ "$AGE" -lt 24 ] && echo "fresh" || echo "STALE: ${AGE}h old"
|
|
33
|
+
```
|
|
34
|
+
Warns if local data hasn't been synced in over 24 hours. Not blocking —
|
|
35
|
+
stale data is usable but may be wrong.
|
|
36
|
+
|
|
37
|
+
### Background Process Health
|
|
38
|
+
```bash
|
|
39
|
+
# Check if a background process is still running
|
|
40
|
+
pgrep -f "your-daemon" > /dev/null && echo "running" || echo "NOT RUNNING"
|
|
41
|
+
```
|
|
42
|
+
Warns if a background process that should be running has stopped.
|
|
43
|
+
|
|
44
|
+
### Reference Integrity
|
|
45
|
+
```bash
|
|
46
|
+
./scripts/validate-refs.sh
|
|
47
|
+
```
|
|
48
|
+
Checks that cross-references between files are still valid. Catches
|
|
49
|
+
renames and deletions that break links.
|
|
50
|
+
-->
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Work Scan — What Work Items to Check
|
|
2
|
+
|
|
3
|
+
Define what work items to scan so orient can surface what needs attention.
|
|
4
|
+
This is what connects orientation to action — without it, orient can
|
|
5
|
+
only report on project state, not on what needs doing.
|
|
6
|
+
|
|
7
|
+
When this file is absent or empty, the default behavior is: query the
|
|
8
|
+
reference data layer (pib-db) for open actions and projects. If pib-db
|
|
9
|
+
is not initialized, skip gracefully with a note that work tracking is
|
|
10
|
+
available via `node scripts/pib-db.js init`.
|
|
11
|
+
|
|
12
|
+
## Default Behavior (pib-db)
|
|
13
|
+
|
|
14
|
+
When no custom work-scan is configured, query pib-db:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
# Open actions (overdue first, then due today, then flagged, then recent)
|
|
18
|
+
node scripts/pib-db.js list-actions
|
|
19
|
+
|
|
20
|
+
# Active projects with open action counts
|
|
21
|
+
node scripts/pib-db.js list-projects
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Present grouped by urgency:
|
|
25
|
+
- **Overdue** — actions with `due` before today
|
|
26
|
+
- **Due today** — actions with `due` = today
|
|
27
|
+
- **Flagged** — actions with `flagged = 1`
|
|
28
|
+
- **Recent** — actions created in the last 7 days
|
|
29
|
+
|
|
30
|
+
If pib-db doesn't exist (file not found), skip with: "Work tracking
|
|
31
|
+
available — run `node scripts/pib-db.js init` to set up."
|
|
32
|
+
|
|
33
|
+
## What to Include
|
|
34
|
+
|
|
35
|
+
For each work source, provide:
|
|
36
|
+
- **What** — the query or command to find open work
|
|
37
|
+
- **What it surfaces** — overdue items, due today, flagged/urgent, blocked
|
|
38
|
+
- **Format** — how to present results (counts, lists, grouped)
|
|
39
|
+
|
|
40
|
+
## Example Work Scans
|
|
41
|
+
|
|
42
|
+
Uncomment and adapt these for your project:
|
|
43
|
+
|
|
44
|
+
<!--
|
|
45
|
+
### Task Backlog
|
|
46
|
+
```bash
|
|
47
|
+
sqlite3 project.db "SELECT id, text, status, due_date FROM tasks WHERE status != 'done' ORDER BY due_date"
|
|
48
|
+
```
|
|
49
|
+
All open tasks. Group by: overdue, due today, due this week, no date.
|
|
50
|
+
|
|
51
|
+
### Inbox / Queue
|
|
52
|
+
```bash
|
|
53
|
+
sqlite3 project.db "SELECT COUNT(*) FROM inbox WHERE processed = 0"
|
|
54
|
+
```
|
|
55
|
+
Unprocessed items that arrived since last session. Report count; details
|
|
56
|
+
come during processing.
|
|
57
|
+
|
|
58
|
+
### Issue Tracker
|
|
59
|
+
```bash
|
|
60
|
+
gh issue list --state open --assignee @me --json number,title,labels
|
|
61
|
+
```
|
|
62
|
+
Open issues assigned to the user. Flag any marked urgent or blocking.
|
|
63
|
+
|
|
64
|
+
### Markdown Task Lists
|
|
65
|
+
```bash
|
|
66
|
+
grep -r '- \[ \]' docs/todo.md
|
|
67
|
+
```
|
|
68
|
+
If work is tracked in markdown files, scan for unchecked items.
|
|
69
|
+
-->
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: orient-quick
|
|
3
|
+
description: |
|
|
4
|
+
Quick session orientation — core phases only, skip presentation.
|
|
5
|
+
Use when: "orient-quick", "quick orient", "/orient-quick".
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# /orient-quick
|
|
9
|
+
|
|
10
|
+
Load the `/orient` skill and run it in **Quick Mode** — core phases
|
|
11
|
+
only, skip presentation phases. See the orient SKILL.md's Quick Mode
|
|
12
|
+
section for details.
|
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
---
|
|
2
|
+
model: opus
|
|
3
|
+
name: plan
|
|
4
|
+
description: |
|
|
5
|
+
Structured planning with cabinet critique. The relevant cabinet members
|
|
6
|
+
weigh in on your approach before you build. Plans are self-contained: a
|
|
7
|
+
future session can execute them without re-exploring the codebase. This is
|
|
8
|
+
a skeleton skill using the phases/ directory pattern. Use when: "plan this",
|
|
9
|
+
"create a plan", "/plan", or when triaging work into actionable items.
|
|
10
|
+
related:
|
|
11
|
+
- type: file
|
|
12
|
+
path: .claude/skills/plan/phases/research.md
|
|
13
|
+
role: "Project-specific: what to investigate before planning"
|
|
14
|
+
- type: file
|
|
15
|
+
path: .claude/skills/plan/phases/overlap-check.md
|
|
16
|
+
role: "Project-specific: how to search for existing work"
|
|
17
|
+
- type: file
|
|
18
|
+
path: .claude/skills/plan/phases/plan-template.md
|
|
19
|
+
role: "Project-specific: what sections your plans have"
|
|
20
|
+
- type: file
|
|
21
|
+
path: .claude/skills/plan/phases/cabinet-critique.md
|
|
22
|
+
role: "Project-specific: which cabinet members to activate, special rules"
|
|
23
|
+
- type: file
|
|
24
|
+
path: .claude/skills/plan/phases/composition-check.md
|
|
25
|
+
role: "Project-specific: duplication check for reusable components"
|
|
26
|
+
- type: file
|
|
27
|
+
path: .claude/skills/plan/phases/completeness-check.md
|
|
28
|
+
role: "Project-specific: domain-specific completeness rules"
|
|
29
|
+
- type: file
|
|
30
|
+
path: .claude/skills/plan/phases/present.md
|
|
31
|
+
role: "Project-specific: how and where to present the plan"
|
|
32
|
+
- type: file
|
|
33
|
+
path: .claude/skills/plan/phases/work-tracker.md
|
|
34
|
+
role: "Project-specific: how to create work items"
|
|
35
|
+
- type: file
|
|
36
|
+
path: .claude/skills/plan/phases/calibration-examples.md
|
|
37
|
+
role: "Project-specific: detailed before/after plan examples"
|
|
38
|
+
- type: file
|
|
39
|
+
path: cabinet/_briefing.md
|
|
40
|
+
role: "Project identity and configuration"
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
# /plan — Structured Planning with Cabinet Critique
|
|
44
|
+
|
|
45
|
+
## Purpose
|
|
46
|
+
|
|
47
|
+
Create a plan that carries enough detail to be executed by a future session
|
|
48
|
+
without re-exploring the codebase. The relevant cabinet members critique the
|
|
49
|
+
approach before you build. Plans carry the problem, the approach, the
|
|
50
|
+
surface area, and the acceptance criteria. Without structured planning,
|
|
51
|
+
sessions produce code changes that miss edge
|
|
52
|
+
cases, duplicate existing work, and can't be verified.
|
|
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
|
+
## Why This Matters
|
|
73
|
+
|
|
74
|
+
Planning before building prevents three failure modes:
|
|
75
|
+
1. **Duplicate work** — building something that already exists or is
|
|
76
|
+
already planned. The overlap check catches this.
|
|
77
|
+
2. **Incomplete features** — plans that deliver dead code (infrastructure
|
|
78
|
+
nobody calls, endpoints nobody hits). The completeness check catches this.
|
|
79
|
+
3. **Untestable acceptance** — "verify it works correctly" is not pass/fail.
|
|
80
|
+
Structured AC force specificity.
|
|
81
|
+
|
|
82
|
+
The cabinet critique catches what the planner misses. A security
|
|
83
|
+
cabinet member notices the new API endpoint lacks auth. A data integrity
|
|
84
|
+
cabinet member notices the migration doesn't handle NULL values. These
|
|
85
|
+
concerns surface before a single line is written.
|
|
86
|
+
|
|
87
|
+
## Workflow
|
|
88
|
+
|
|
89
|
+
### 1. Research the Problem
|
|
90
|
+
|
|
91
|
+
Read `phases/research.md` for project-specific guidance on what to
|
|
92
|
+
investigate before planning. This might include: always check architecture
|
|
93
|
+
decision records, always consult specific documentation, always review
|
|
94
|
+
specific files or APIs, always search specific external sources.
|
|
95
|
+
|
|
96
|
+
**Default (absent/empty):** Explore the codebase to understand:
|
|
97
|
+
- What files are involved
|
|
98
|
+
- What patterns exist (how similar things are done elsewhere)
|
|
99
|
+
- What the current behavior is vs. desired behavior
|
|
100
|
+
- What constraints exist (tech stack, conventions, dependencies)
|
|
101
|
+
|
|
102
|
+
Don't propose a solution until you understand the current state.
|
|
103
|
+
|
|
104
|
+
### 2. Check for Existing Work
|
|
105
|
+
|
|
106
|
+
Read `phases/overlap-check.md` for how to search your project's work
|
|
107
|
+
tracker for items that overlap with the proposed work.
|
|
108
|
+
|
|
109
|
+
**Skip (absent/empty).** No work tracker = nothing to check against.
|
|
110
|
+
But note: without overlap checking, you risk creating duplicate plans.
|
|
111
|
+
|
|
112
|
+
When overlap is found:
|
|
113
|
+
- **Subsumes:** existing work covers this → don't create a new plan.
|
|
114
|
+
Update the existing item if needed.
|
|
115
|
+
- **Partial overlap:** some work is shared → document the relationship.
|
|
116
|
+
Propose splitting, merging, or absorbing.
|
|
117
|
+
- **Adjacent but distinct:** related topic but different scope → note
|
|
118
|
+
the relationship in both items.
|
|
119
|
+
|
|
120
|
+
### 3. Draft the Plan
|
|
121
|
+
|
|
122
|
+
Read `phases/plan-template.md` for your project's plan structure. This
|
|
123
|
+
defines what sections your plans have and what each section should contain.
|
|
124
|
+
|
|
125
|
+
**Default (absent/empty):** Use this template:
|
|
126
|
+
|
|
127
|
+
```markdown
|
|
128
|
+
## Problem
|
|
129
|
+
What friction, gap, or issue exists. Why this matters.
|
|
130
|
+
|
|
131
|
+
## Implementation
|
|
132
|
+
Numbered steps with file paths. Enough detail to execute without
|
|
133
|
+
re-exploring.
|
|
134
|
+
|
|
135
|
+
## Surface Area
|
|
136
|
+
Every file that will be created or modified. This enables conflict
|
|
137
|
+
detection if multiple plans are executed in parallel.
|
|
138
|
+
- files: path/to/file1.ext
|
|
139
|
+
- files: path/to/file2.ext (new)
|
|
140
|
+
|
|
141
|
+
## Acceptance Criteria
|
|
142
|
+
Testable criteria — each marked by category:
|
|
143
|
+
- [auto] Criteria verifiable by running a command
|
|
144
|
+
- [manual] Criteria requiring human judgment or interaction
|
|
145
|
+
- [deferred] Criteria that can't be tested until later (e.g., post-deploy)
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
**Surface area rules:** Two plans conflict if they touch the same files.
|
|
149
|
+
When in doubt, declare more surface area, not less. False conflicts just
|
|
150
|
+
serialize execution; missed conflicts cause merge failures.
|
|
151
|
+
|
|
152
|
+
**Acceptance criteria must be pass/fail.** Each criterion names the input,
|
|
153
|
+
action, and expected output. "Verify it works correctly" is not a
|
|
154
|
+
criterion. "POST /api/foo returns 201 with expected payload" is.
|
|
155
|
+
|
|
156
|
+
### 4. Composition Check
|
|
157
|
+
|
|
158
|
+
Read `phases/composition-check.md` for how to check whether the planned
|
|
159
|
+
work duplicates existing reusable components in your project (skills,
|
|
160
|
+
plugins, middleware, shared libraries).
|
|
161
|
+
|
|
162
|
+
**Skip (absent/empty).** No reusable component library = nothing to
|
|
163
|
+
check against. But if your project has a library of reusable pieces,
|
|
164
|
+
this step prevents building a second version of something that already
|
|
165
|
+
exists.
|
|
166
|
+
|
|
167
|
+
When this step fires, check before running cabinet critique:
|
|
168
|
+
- Does the new/modified component duplicate logic from an existing one?
|
|
169
|
+
If so, compose with the existing component rather than duplicating.
|
|
170
|
+
- Does the new component depend on others? If so, declare the
|
|
171
|
+
relationships in the plan.
|
|
172
|
+
|
|
173
|
+
### 5. Cabinet Critique (Parallel Agents)
|
|
174
|
+
|
|
175
|
+
Read `phases/cabinet-critique.md` for which cabinet members to always
|
|
176
|
+
activate during planning, any special rules (e.g., "always include a
|
|
177
|
+
design committee for UI plans"), and any project-specific critique
|
|
178
|
+
workflow.
|
|
179
|
+
|
|
180
|
+
**Default (absent/empty):** Read `.claude/skills/cabinet-*/SKILL.md`
|
|
181
|
+
and identify cabinet members whose convening criteria match the plan's
|
|
182
|
+
surface area or topic. Spawn each matching cabinet member as a parallel
|
|
183
|
+
agent. Each receives:
|
|
184
|
+
- The cabinet member's full SKILL.md content
|
|
185
|
+
- Essential project briefing from `_briefing.md`
|
|
186
|
+
- The draft plan (problem, implementation, surface area, AC)
|
|
187
|
+
- Instructions to evaluate through their lens and return concerns + verdict
|
|
188
|
+
|
|
189
|
+
**Collect all verdicts.** Apply escalation:
|
|
190
|
+
- Any **block** → flag plan as needing revision before presenting
|
|
191
|
+
- 3+ **conditional** → treat as block-equivalent
|
|
192
|
+
- All **continue** → proceed with brief summary of suggestions
|
|
193
|
+
|
|
194
|
+
Include the synthesized critique alongside the plan when presenting.
|
|
195
|
+
|
|
196
|
+
If no cabinet members exist in the project, skip critique entirely. The
|
|
197
|
+
plan is still valuable without it — critique adds depth, not structure.
|
|
198
|
+
|
|
199
|
+
### 6. Completeness Check
|
|
200
|
+
|
|
201
|
+
Read `phases/completeness-check.md` for domain-specific completeness
|
|
202
|
+
rules beyond the generic ones (e.g., "all API changes require migration
|
|
203
|
+
scripts," "UI changes must address mobile viewport," "cost estimates
|
|
204
|
+
required for infrastructure changes").
|
|
205
|
+
|
|
206
|
+
**Default (absent/empty):** Apply the three generic completeness checks:
|
|
207
|
+
|
|
208
|
+
**a. Feature completeness.** "If someone executes this plan exactly,
|
|
209
|
+
will the user see a working feature?" If the answer is "no, someone
|
|
210
|
+
needs to wire it up later" — the plan is incomplete. Dead code is not
|
|
211
|
+
a feature. A callback nobody calls is not a feature.
|
|
212
|
+
|
|
213
|
+
**b. Surface area completeness.** Every file mentioned in Implementation
|
|
214
|
+
appears in Surface Area. New files are marked `(new)`.
|
|
215
|
+
|
|
216
|
+
**c. Acceptance criteria are testable.** Every criterion is pass/fail
|
|
217
|
+
with a category tag ([auto], [manual], [deferred]).
|
|
218
|
+
|
|
219
|
+
If any check fails, revise the plan before presenting.
|
|
220
|
+
|
|
221
|
+
### 7. Present to User
|
|
222
|
+
|
|
223
|
+
Read `phases/present.md` for how and where to present the plan. This
|
|
224
|
+
might include: a specific presentation format, required sections (cost
|
|
225
|
+
estimates, risk assessment), posting to a review channel, or generating
|
|
226
|
+
a formatted document.
|
|
227
|
+
|
|
228
|
+
**Default (absent/empty):** Present the full plan inline in conversation:
|
|
229
|
+
- The complete plan (all sections from your template)
|
|
230
|
+
- The cabinet critique summary (if cabinet members were activated)
|
|
231
|
+
- Any design decisions or tradeoffs you made
|
|
232
|
+
- Anything you're uncertain about
|
|
233
|
+
|
|
234
|
+
**Wait for explicit approval.** The user may:
|
|
235
|
+
- Approve as-is → proceed to create the work item
|
|
236
|
+
- Request changes → revise and re-present
|
|
237
|
+
- Ask questions → answer, then re-present if anything changed
|
|
238
|
+
- Reject → stop, don't create the work item
|
|
239
|
+
|
|
240
|
+
**Never skip user approval.** Even if the plan seems obvious — the user
|
|
241
|
+
needs to see and approve the specifics. This step always runs regardless
|
|
242
|
+
of phase file content.
|
|
243
|
+
|
|
244
|
+
### 8. Create the Work Item
|
|
245
|
+
|
|
246
|
+
Read `phases/work-tracker.md` for how to file the approved plan as a
|
|
247
|
+
work item in your project's tracking system.
|
|
248
|
+
|
|
249
|
+
**Skip (absent/empty).** Present the plan in conversation for the user
|
|
250
|
+
to file manually. But note: plans that live only in conversation context
|
|
251
|
+
will be lost — they need to be persisted somewhere durable.
|
|
252
|
+
|
|
253
|
+
### 9. Discover Custom Phases
|
|
254
|
+
|
|
255
|
+
Check for any additional phase files in `phases/` that the skeleton
|
|
256
|
+
doesn't define. These are project-specific extensions. Each custom
|
|
257
|
+
phase file declares its position in the workflow. Execute them at their
|
|
258
|
+
declared position.
|
|
259
|
+
|
|
260
|
+
## Phase Summary
|
|
261
|
+
|
|
262
|
+
| Phase | Absent = | What it customizes |
|
|
263
|
+
|-------|----------|-------------------|
|
|
264
|
+
| `research.md` | Default: explore codebase | What to always investigate first |
|
|
265
|
+
| `overlap-check.md` | Skip | How to search your work tracker |
|
|
266
|
+
| `plan-template.md` | Default: standard template | Your plan's sections and format |
|
|
267
|
+
| `composition-check.md` | Skip | Duplication check for reusable components |
|
|
268
|
+
| `cabinet-critique.md` | Default: match by convening criteria | Which cabinet members, special rules |
|
|
269
|
+
| `completeness-check.md` | Default: three generic checks | Domain-specific completeness rules |
|
|
270
|
+
| `present.md` | Default: inline in conversation | How and where to present |
|
|
271
|
+
| `work-tracker.md` | Skip | How to file work items |
|
|
272
|
+
| `calibration-examples.md` | Default: narrative only | Detailed before/after plan examples |
|
|
273
|
+
|
|
274
|
+
## Principles
|
|
275
|
+
|
|
276
|
+
- **Plans are self-contained.** A future session should be able to
|
|
277
|
+
execute the plan without needing context from this conversation.
|
|
278
|
+
- **Plans deliver complete features.** No dead code, no unwired
|
|
279
|
+
callbacks, no half-built infrastructure.
|
|
280
|
+
- **Surface areas are conservative.** Declare everything you might touch.
|
|
281
|
+
- **Plans carry the reasoning.** Include *why* this approach was chosen,
|
|
282
|
+
not just *what* to do. This helps future sessions evaluate whether the
|
|
283
|
+
plan still makes sense if context has changed.
|
|
284
|
+
- **User approves every plan.** No plan becomes work without explicit
|
|
285
|
+
sign-off.
|
|
286
|
+
|
|
287
|
+
## Guardrails
|
|
288
|
+
|
|
289
|
+
### Plan persistence — MANDATORY
|
|
290
|
+
|
|
291
|
+
Plan files (e.g., `.claude/plans/*.md` or equivalent working documents)
|
|
292
|
+
are **ephemeral** — they get overwritten next time anyone enters plan
|
|
293
|
+
mode. They are NOT durable artifacts.
|
|
294
|
+
|
|
295
|
+
**All architectural context, design decisions, and reasoning MUST be
|
|
296
|
+
persisted to the work item** (action notes, issue body, task description —
|
|
297
|
+
wherever your work tracker stores plans). The plan file is a working
|
|
298
|
+
scratchpad during planning. When you create the work item:
|
|
299
|
+
|
|
300
|
+
1. **Work item notes** must contain enough detail to execute without
|
|
301
|
+
referencing the plan file (implementation steps, surface area,
|
|
302
|
+
verification criteria, key design decisions).
|
|
303
|
+
2. **Project notes** (for multi-phase plans) must contain the
|
|
304
|
+
architectural reasoning that spans all phases.
|
|
305
|
+
3. **Never reference the plan file** from work item notes as if it will
|
|
306
|
+
persist. It won't.
|
|
307
|
+
|
|
308
|
+
### Completed work — mark it done
|
|
309
|
+
|
|
310
|
+
When creating work items for work that was done in a prior session,
|
|
311
|
+
verify the work actually exists (check for files, DB tables, deployed
|
|
312
|
+
features) before marking complete. If the system says something is
|
|
313
|
+
active but it's actually built, mark it complete immediately.
|
|
314
|
+
|
|
315
|
+
## Lessons Learned
|
|
316
|
+
|
|
317
|
+
Record project-specific planning failures here so they don't recur.
|
|
318
|
+
Each entry should name the failure mode, what happened, and the fix.
|
|
319
|
+
This section accumulates over time — it's the skill's memory.
|
|
320
|
+
|
|
321
|
+
<!-- Add project-specific lessons below this line -->
|
|
322
|
+
|
|
323
|
+
## Calibration
|
|
324
|
+
|
|
325
|
+
**Core failure this targets:** Plans that deliver dead code, have
|
|
326
|
+
incomplete surface area, and untestable acceptance criteria.
|
|
327
|
+
|
|
328
|
+
### Without Skill (Bad)
|
|
329
|
+
|
|
330
|
+
User asks to plan a new feature. Claude explores the codebase, writes
|
|
331
|
+
a quick plan with 3 implementation steps, surface area listing 2 files,
|
|
332
|
+
and verification saying "verify it works correctly." The plan misses
|
|
333
|
+
that 2 other files need updating to wire the feature in, misses that
|
|
334
|
+
similar work was already planned, and has no way to verify it actually
|
|
335
|
+
works.
|
|
336
|
+
|
|
337
|
+
### With Skill (Good)
|
|
338
|
+
|
|
339
|
+
Same request. Claude explores, checks for existing work (finds a
|
|
340
|
+
related but distinct plan, notes the relationship), drafts a plan with
|
|
341
|
+
all files needed for a complete feature, runs it through cabinet members
|
|
342
|
+
(security flags a missing auth check, QA flags an untestable criterion),
|
|
343
|
+
revises, presents to the user with the critique. User approves, the plan
|
|
344
|
+
is filed as a work item. A future session can pick it up and execute
|
|
345
|
+
without re-exploring.
|
|
346
|
+
|
|
347
|
+
### Detailed Examples
|
|
348
|
+
|
|
349
|
+
Read `phases/calibration-examples.md` for project-specific before/after
|
|
350
|
+
plan examples showing exact formatting.
|
|
351
|
+
|
|
352
|
+
**Default (absent/empty):** Use the narrative examples above. They
|
|
353
|
+
convey the key failure modes without project-specific detail.
|
|
354
|
+
|
|
355
|
+
When present, the examples file should show at least one bad plan and
|
|
356
|
+
one good plan in your project's template format, with real-looking
|
|
357
|
+
(but anonymized) content demonstrating the difference between incomplete
|
|
358
|
+
and complete plans.
|