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.
Files changed (135) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +196 -0
  3. package/bin/create-claude-cabinet.js +8 -0
  4. package/lib/cli.js +624 -0
  5. package/lib/copy.js +152 -0
  6. package/lib/db-setup.js +51 -0
  7. package/lib/metadata.js +42 -0
  8. package/lib/reset.js +193 -0
  9. package/lib/settings-merge.js +93 -0
  10. package/package.json +29 -0
  11. package/templates/EXTENSIONS.md +311 -0
  12. package/templates/README.md +485 -0
  13. package/templates/briefing/_briefing-api-template.md +21 -0
  14. package/templates/briefing/_briefing-architecture-template.md +16 -0
  15. package/templates/briefing/_briefing-cabinet-template.md +20 -0
  16. package/templates/briefing/_briefing-identity-template.md +18 -0
  17. package/templates/briefing/_briefing-scopes-template.md +39 -0
  18. package/templates/briefing/_briefing-template.md +148 -0
  19. package/templates/briefing/_briefing-work-tracking-template.md +18 -0
  20. package/templates/cabinet/committees-template.yaml +49 -0
  21. package/templates/cabinet/composition-patterns.md +240 -0
  22. package/templates/cabinet/eval-protocol.md +208 -0
  23. package/templates/cabinet/lifecycle.md +93 -0
  24. package/templates/cabinet/output-contract.md +148 -0
  25. package/templates/cabinet/prompt-guide.md +266 -0
  26. package/templates/hooks/cor-upstream-guard.sh +79 -0
  27. package/templates/hooks/git-guardrails.sh +67 -0
  28. package/templates/hooks/skill-telemetry.sh +66 -0
  29. package/templates/hooks/skill-tool-telemetry.sh +54 -0
  30. package/templates/hooks/stop-hook.md +56 -0
  31. package/templates/memory/patterns/_pattern-template.md +119 -0
  32. package/templates/memory/patterns/pattern-intelligence-first.md +41 -0
  33. package/templates/rules/enforcement-pipeline.md +151 -0
  34. package/templates/scripts/cor-drift-check.cjs +84 -0
  35. package/templates/scripts/finding-schema.json +94 -0
  36. package/templates/scripts/load-triage-history.js +151 -0
  37. package/templates/scripts/merge-findings.js +126 -0
  38. package/templates/scripts/pib-db-schema.sql +68 -0
  39. package/templates/scripts/pib-db.js +365 -0
  40. package/templates/scripts/triage-server.mjs +98 -0
  41. package/templates/scripts/triage-ui.html +536 -0
  42. package/templates/skills/audit/SKILL.md +273 -0
  43. package/templates/skills/audit/phases/finding-output.md +56 -0
  44. package/templates/skills/audit/phases/member-execution.md +83 -0
  45. package/templates/skills/audit/phases/member-selection.md +44 -0
  46. package/templates/skills/audit/phases/structural-checks.md +54 -0
  47. package/templates/skills/audit/phases/triage-history.md +45 -0
  48. package/templates/skills/cabinet-accessibility/SKILL.md +180 -0
  49. package/templates/skills/cabinet-anti-confirmation/SKILL.md +172 -0
  50. package/templates/skills/cabinet-architecture/SKILL.md +279 -0
  51. package/templates/skills/cabinet-boundary-man/SKILL.md +265 -0
  52. package/templates/skills/cabinet-cor-health/SKILL.md +342 -0
  53. package/templates/skills/cabinet-data-integrity/SKILL.md +157 -0
  54. package/templates/skills/cabinet-debugger/SKILL.md +221 -0
  55. package/templates/skills/cabinet-historian/SKILL.md +253 -0
  56. package/templates/skills/cabinet-organized-mind/SKILL.md +338 -0
  57. package/templates/skills/cabinet-process-therapist/SKILL.md +261 -0
  58. package/templates/skills/cabinet-qa/SKILL.md +205 -0
  59. package/templates/skills/cabinet-record-keeper/SKILL.md +168 -0
  60. package/templates/skills/cabinet-roster-check/SKILL.md +297 -0
  61. package/templates/skills/cabinet-security/SKILL.md +181 -0
  62. package/templates/skills/cabinet-small-screen/SKILL.md +154 -0
  63. package/templates/skills/cabinet-speed-freak/SKILL.md +169 -0
  64. package/templates/skills/cabinet-system-advocate/SKILL.md +194 -0
  65. package/templates/skills/cabinet-technical-debt/SKILL.md +115 -0
  66. package/templates/skills/cabinet-usability/SKILL.md +189 -0
  67. package/templates/skills/cabinet-workflow-cop/SKILL.md +238 -0
  68. package/templates/skills/cor-upgrade/SKILL.md +302 -0
  69. package/templates/skills/debrief/SKILL.md +409 -0
  70. package/templates/skills/debrief/phases/auto-maintenance.md +48 -0
  71. package/templates/skills/debrief/phases/close-work.md +88 -0
  72. package/templates/skills/debrief/phases/health-checks.md +54 -0
  73. package/templates/skills/debrief/phases/inventory.md +40 -0
  74. package/templates/skills/debrief/phases/loose-ends.md +52 -0
  75. package/templates/skills/debrief/phases/record-lessons.md +67 -0
  76. package/templates/skills/debrief/phases/report.md +59 -0
  77. package/templates/skills/debrief/phases/update-state.md +48 -0
  78. package/templates/skills/debrief/phases/upstream-feedback.md +129 -0
  79. package/templates/skills/debrief-quick/SKILL.md +12 -0
  80. package/templates/skills/execute/SKILL.md +293 -0
  81. package/templates/skills/execute/phases/cabinet.md +49 -0
  82. package/templates/skills/execute/phases/commit-and-deploy.md +66 -0
  83. package/templates/skills/execute/phases/load-plan.md +49 -0
  84. package/templates/skills/execute/phases/validators.md +50 -0
  85. package/templates/skills/execute/phases/verification-tools.md +67 -0
  86. package/templates/skills/extract/SKILL.md +168 -0
  87. package/templates/skills/investigate/SKILL.md +160 -0
  88. package/templates/skills/link/SKILL.md +52 -0
  89. package/templates/skills/menu/SKILL.md +61 -0
  90. package/templates/skills/onboard/SKILL.md +356 -0
  91. package/templates/skills/onboard/phases/detect-state.md +79 -0
  92. package/templates/skills/onboard/phases/generate-briefing.md +127 -0
  93. package/templates/skills/onboard/phases/generate-session-loop.md +87 -0
  94. package/templates/skills/onboard/phases/interview.md +233 -0
  95. package/templates/skills/onboard/phases/modularity-menu.md +162 -0
  96. package/templates/skills/onboard/phases/options.md +98 -0
  97. package/templates/skills/onboard/phases/post-onboard-audit.md +121 -0
  98. package/templates/skills/onboard/phases/summary.md +122 -0
  99. package/templates/skills/onboard/phases/work-tracking.md +231 -0
  100. package/templates/skills/orient/SKILL.md +251 -0
  101. package/templates/skills/orient/phases/auto-maintenance.md +48 -0
  102. package/templates/skills/orient/phases/briefing.md +53 -0
  103. package/templates/skills/orient/phases/cabinet.md +46 -0
  104. package/templates/skills/orient/phases/context.md +63 -0
  105. package/templates/skills/orient/phases/data-sync.md +35 -0
  106. package/templates/skills/orient/phases/health-checks.md +50 -0
  107. package/templates/skills/orient/phases/work-scan.md +69 -0
  108. package/templates/skills/orient-quick/SKILL.md +12 -0
  109. package/templates/skills/plan/SKILL.md +358 -0
  110. package/templates/skills/plan/phases/cabinet-critique.md +47 -0
  111. package/templates/skills/plan/phases/calibration-examples.md +75 -0
  112. package/templates/skills/plan/phases/completeness-check.md +44 -0
  113. package/templates/skills/plan/phases/composition-check.md +36 -0
  114. package/templates/skills/plan/phases/overlap-check.md +62 -0
  115. package/templates/skills/plan/phases/plan-template.md +69 -0
  116. package/templates/skills/plan/phases/present.md +60 -0
  117. package/templates/skills/plan/phases/research.md +43 -0
  118. package/templates/skills/plan/phases/work-tracker.md +95 -0
  119. package/templates/skills/publish/SKILL.md +74 -0
  120. package/templates/skills/pulse/SKILL.md +242 -0
  121. package/templates/skills/pulse/phases/auto-fix-scope.md +40 -0
  122. package/templates/skills/pulse/phases/checks.md +58 -0
  123. package/templates/skills/pulse/phases/output.md +54 -0
  124. package/templates/skills/seed/SKILL.md +257 -0
  125. package/templates/skills/seed/phases/build-member.md +93 -0
  126. package/templates/skills/seed/phases/evaluate-existing.md +61 -0
  127. package/templates/skills/seed/phases/maintain.md +92 -0
  128. package/templates/skills/seed/phases/scan-signals.md +86 -0
  129. package/templates/skills/triage-audit/SKILL.md +251 -0
  130. package/templates/skills/triage-audit/phases/apply-verdicts.md +90 -0
  131. package/templates/skills/triage-audit/phases/load-findings.md +38 -0
  132. package/templates/skills/triage-audit/phases/triage-ui.md +66 -0
  133. package/templates/skills/unlink/SKILL.md +35 -0
  134. package/templates/skills/validate/SKILL.md +116 -0
  135. package/templates/skills/validate/phases/validators.md +53 -0
@@ -0,0 +1,66 @@
1
+ # Commit and Deploy — How to Persist and Deploy Changes
2
+
3
+ Define how your project persists work (commit strategy) and deploys
4
+ changes (if applicable). The /execute skill reads this file at Step 6
5
+ after validation passes.
6
+
7
+ When this file is absent or empty, the default behavior is: commit with
8
+ a clear message describing the implementation. Don't push or deploy —
9
+ deployment strategy is project-specific. To explicitly skip commit
10
+ (e.g., changes are committed manually), write only `skip: true`.
11
+
12
+ ## What to Include
13
+
14
+ - **Commit strategy** — message format, what to stage, branch conventions
15
+ - **Push rules** — when to push, to which remote
16
+ - **Deployment** — how to deploy, whether deploy is automatic or manual
17
+ - **Post-deploy verification** — how to confirm deployment succeeded
18
+
19
+ ## Example Commit-and-Deploy Configurations
20
+
21
+ Uncomment and adapt these for your project:
22
+
23
+ <!--
24
+ ### Standard Git Workflow
25
+ ```bash
26
+ # Stage specific files (never git add -A)
27
+ git add path/to/changed/files
28
+
29
+ # Commit with descriptive message
30
+ git commit -m "feat: description of what was implemented
31
+
32
+ Co-Authored-By: Claude <noreply@anthropic.com>"
33
+
34
+ # Push to remote
35
+ git push origin current-branch
36
+ ```
37
+
38
+ ### Deployment (auto-deploy on push)
39
+ If your platform auto-deploys on push (Railway, Vercel, Netlify):
40
+ - Push triggers deployment automatically
41
+ - Run /verify-deploy or equivalent to confirm
42
+ - Wait for deployment to complete before marking work done
43
+
44
+ ### Deployment (manual)
45
+ ```bash
46
+ # Build and deploy
47
+ npm run build
48
+ railway up # or: vercel deploy, fly deploy, etc.
49
+ ```
50
+
51
+ ### Deployment (split: code vs. content)
52
+ Some projects deploy code and content differently:
53
+ - **Code changes** → full deploy (rebuild required)
54
+ - **Content/markdown changes** → git push triggers a pull on the server
55
+ (no rebuild, instant update)
56
+
57
+ Determine which type of change was made and use the appropriate path.
58
+
59
+ ### Post-Deploy Verification
60
+ ```bash
61
+ # Check deployment health
62
+ curl -s https://your-app.example.com/health | jq .
63
+ # Verify the specific change is live
64
+ curl -s https://your-app.example.com/api/version
65
+ ```
66
+ -->
@@ -0,0 +1,49 @@
1
+ # Load Plan — Where Plans Live and How to Read Them
2
+
3
+ Define where your project stores plans and how to read them. The /execute
4
+ skill reads this file to find and load the plan before implementing.
5
+
6
+ When this file is absent or empty, the default behavior is: expect the
7
+ plan to be provided in conversation or referenced by the user. To
8
+ explicitly skip plan loading (plan is always provided inline), write
9
+ only `skip: true`.
10
+
11
+ ## What to Include
12
+
13
+ - **Where plans live** — database, markdown files, issue tracker, etc.
14
+ - **How to query** — the command or API to fetch a specific plan
15
+ - **What to extract** — implementation steps, surface area, acceptance
16
+ criteria, plan type (code vs. walkthrough)
17
+
18
+ ## Example Load-Plan Configurations
19
+
20
+ Uncomment and adapt these for your project:
21
+
22
+ <!--
23
+ ### Database API
24
+ ```bash
25
+ # Fetch plan from action notes
26
+ curl -s https://your-app.example.com/api/tasks/TASK_ID \
27
+ -H "Authorization: Bearer $API_TOKEN" | jq '.notes'
28
+ ```
29
+ Parse the notes for: ## Implementation, ## Surface Area, ## Acceptance Criteria
30
+
31
+ ### Local Database
32
+ ```bash
33
+ sqlite3 project.db "SELECT notes FROM tasks WHERE id = 'TASK_ID'"
34
+ ```
35
+
36
+ ### GitHub Issue
37
+ ```bash
38
+ gh issue view ISSUE_NUMBER --json body | jq -r '.body'
39
+ ```
40
+
41
+ ### Markdown File
42
+ ```bash
43
+ Read docs/plans/YYYY-MM-DD-plan-title.md
44
+ ```
45
+
46
+ ### Plan Identification
47
+ When the user says "execute the plan," look up the most recent active
48
+ plan item. When ambiguous, list open plan items and ask which one.
49
+ -->
@@ -0,0 +1,50 @@
1
+ # Validators — What Validation to Run
2
+
3
+ Define what validation to run after implementation and before commit.
4
+ The /execute skill reads this file at Step 6. This may reference or
5
+ duplicate your project's /validate skill phases — that's fine, the
6
+ execute skeleton needs to know what to run inline.
7
+
8
+ When this file is absent or empty, the default behavior is: run the
9
+ project's /validate skill if it exists. If no validate skill exists,
10
+ run the project's type checker and linter at minimum. To explicitly
11
+ skip validation, write only `skip: true`.
12
+
13
+ ## What to Include
14
+
15
+ - **Type checking** — command to verify types
16
+ - **Linting** — command to check style and correctness
17
+ - **Build** — command to verify the project builds
18
+ - **Structural validation** — project-specific integrity checks
19
+ - **Pass criteria** — what "passing" means (zero errors? warnings OK?)
20
+
21
+ ## Example Validator Configurations
22
+
23
+ Uncomment and adapt these for your project:
24
+
25
+ <!--
26
+ ### TypeScript Project
27
+ ```bash
28
+ npx tsc -b --noEmit # Type checking — must exit 0
29
+ npx eslint . --max-warnings 0 # Linting — zero warnings
30
+ npm run build # Build — must succeed
31
+ ```
32
+
33
+ ### Python Project
34
+ ```bash
35
+ mypy src/ # Type checking
36
+ ruff check src/ # Linting
37
+ python -m pytest --co -q # Verify tests collect (don't run full suite)
38
+ ```
39
+
40
+ ### Structural Validation
41
+ ```bash
42
+ ./scripts/validate-fids.sh # Entity ID coverage
43
+ ./scripts/validate-threads.sh # Thread structure integrity
44
+ ./scripts/validate-schema.sh # Schema consistency
45
+ ```
46
+
47
+ ### Pass Criteria
48
+ All commands must exit 0. Warnings are acceptable for linting only if
49
+ they existed before this session's changes (don't introduce new ones).
50
+ -->
@@ -0,0 +1,67 @@
1
+ # Verification Tools — How to Check Acceptance Criteria
2
+
3
+ Define what tools your project has for verifying acceptance criteria.
4
+ The /execute skill reads this file during the QA gate (Step 7) to know
5
+ what's available for checking [manual] criteria.
6
+
7
+ When this file is absent or empty, the default behavior is: use whatever
8
+ tools are available in the environment. For [auto] criteria, run the
9
+ command. For [manual] criteria, attempt verification with available
10
+ tools before deferring to the user. To skip tool-based verification
11
+ entirely (defer all manual criteria to user), write only `skip: true`.
12
+
13
+ ## What to Include
14
+
15
+ - **Available tools** — what verification tools the project has
16
+ - **Tool-to-criterion mapping** — which tool to use for which kind of check
17
+ - **Limitations** — what genuinely can't be verified with tools
18
+ (physical hardware, native gestures, audio output)
19
+
20
+ ## Example Verification Tool Configurations
21
+
22
+ Uncomment and adapt these for your project:
23
+
24
+ <!--
25
+ ### Preview Tools (Claude Code built-in)
26
+ For web applications with a dev server:
27
+ - preview_start — ensure a dev server is running
28
+ - preview_snapshot — check page content, structure, element presence
29
+ - preview_screenshot — capture visual state for layout/styling checks
30
+ - preview_click — test interactive elements (buttons, toggles, menus)
31
+ - preview_fill — test form inputs
32
+ - preview_console_logs — check for runtime errors
33
+ - preview_inspect — verify CSS properties
34
+ - preview_eval — run JS to navigate, scroll, check DOM state
35
+ - preview_resize — test responsive behavior
36
+
37
+ Tool-to-criterion mapping:
38
+ - "Page renders X" → preview_snapshot or preview_screenshot
39
+ - "Clicking X does Y" → preview_click + preview_snapshot
40
+ - "No console errors" → preview_console_logs
41
+ - "Element has style X" → preview_inspect
42
+ - "Responsive at Npx" → preview_resize + preview_screenshot
43
+
44
+ ### Test Runner
45
+ ```bash
46
+ npm test -- --grep "test-pattern"
47
+ pytest -k "test_pattern"
48
+ ```
49
+
50
+ ### API Verification
51
+ ```bash
52
+ curl -s -o /dev/null -w "%{http_code}" https://localhost:3000/api/endpoint
53
+ ```
54
+
55
+ ### Browser Automation (external)
56
+ If using Playwright, Cypress, or similar:
57
+ ```bash
58
+ npx playwright test tests/specific-test.spec.ts
59
+ ```
60
+
61
+ ### What Can't Be Tool-Verified
62
+ These genuinely require user interaction:
63
+ - Native touch gestures on physical device
64
+ - Audio output quality
65
+ - Physical hardware interaction
66
+ - Real-time performance under production load
67
+ -->
@@ -0,0 +1,168 @@
1
+ ---
2
+ name: extract
3
+ description: |
4
+ Analyze non-CoR skills, cabinet members, and other artifacts in a consuming
5
+ project and propose candidates for upstreaming into Claude Cabinet as
6
+ generic templates. Does not perform the extraction — files a proposal
7
+ that surfaces during orient in the CoR repo. Use when: "extract",
8
+ "upstream this", "should this be in CoR?", "/extract".
9
+ ---
10
+
11
+ # /extract — Propose Artifacts for Upstreaming to CoR
12
+
13
+ ## Purpose
14
+
15
+ Consuming projects grow custom skills, cabinet members, phase files, and
16
+ other artifacts that solve real problems. Some of those solutions are
17
+ project-specific. Others solve problems that any project would have.
18
+ This skill identifies the latter and proposes upstreaming them into
19
+ Claude Cabinet as generic templates.
20
+
21
+ **This skill proposes. It does not extract.** The actual separation of
22
+ generic orchestration from project-specific context happens in the CoR
23
+ repo after a human reviews and accepts the proposal. The consuming
24
+ project then adopts the CoR version via `/cor-upgrade`.
25
+
26
+ ## Where This Runs
27
+
28
+ **Consuming projects only.** If run from the CoR source repo
29
+ (`package.json` name is `create-claude-cabinet`), say: "This skill runs
30
+ from consuming projects. Here, use orient to review incoming proposals."
31
+
32
+ ## Workflow
33
+
34
+ ### 1. Inventory Non-CoR Artifacts
35
+
36
+ Compare the project's `.claude/` directory against `.corrc.json`'s
37
+ manifest. Anything not in the manifest is project-specific:
38
+
39
+ - **Custom skills** — `.claude/skills/*/SKILL.md` not in manifest
40
+ - **Custom cabinet members** — `.claude/skills/cabinet-*/SKILL.md`
41
+ not in the standard set
42
+ - **Custom phase files** — phase files in CoR skills that override
43
+ defaults with substantial logic (not just `skip: true`)
44
+ - **Custom hooks** — hook scripts not installed by CoR
45
+ - **Custom rules** — `.claude/rules/` files beyond the CoR defaults
46
+ - **Patterns** — `.claude/memory/patterns/` entries that encode
47
+ reusable lessons
48
+
49
+ ### 2. Assess Each Candidate
50
+
51
+ For each non-CoR artifact, evaluate:
52
+
53
+ **Generalizability** — Would other projects benefit from this?
54
+ - Does it solve a problem tied to this specific project, or a class
55
+ of problems?
56
+ - Could the project-specific parts be isolated into phase files?
57
+ - Is the core logic reusable if you strip out hardcoded paths, names,
58
+ and domain concepts?
59
+
60
+ **Maturity** — Is this ready to propose?
61
+ - Has it been used enough to know it works? (Check telemetry if
62
+ available, or ask the user.)
63
+ - Has it been refined, or is it a first draft?
64
+ - Are there known issues or things the user wants to change?
65
+
66
+ **Category** — What kind of CoR artifact would this become?
67
+ - A new skill template (SKILL.md + default phase behaviors)
68
+ - A new cabinet member (SKILL.md with scan scope and finding format)
69
+ - A new phase file for an existing skill (e.g., a custom orient check)
70
+ - A new hook or rule template
71
+ - A new pattern worth promoting to the standard set
72
+
73
+ Rate each candidate: **strong** (clearly generic, proven, ready),
74
+ **possible** (could be generic with work), or **project-specific**
75
+ (not a candidate). Only propose strong and possible candidates.
76
+
77
+ ### 3. Draft Proposals
78
+
79
+ For each candidate, draft a proposal that includes:
80
+
81
+ ```markdown
82
+ # Extraction Proposal: [artifact name]
83
+
84
+ ## Source
85
+ - Project: [project name/path]
86
+ - Artifact: [path to the artifact]
87
+ - Type: skill | cabinet-member | phase | hook | rule | pattern
88
+
89
+ ## What It Does
90
+ [1-2 paragraphs describing the artifact's purpose and how it works
91
+ in the source project]
92
+
93
+ ## Why It's Generic
94
+ [Why this solves a class of problems, not just this project's problem.
95
+ What other projects would use it for.]
96
+
97
+ ## Suggested Generalized Form
98
+ [How this would look as a CoR template. What becomes the skeleton,
99
+ what becomes phase-file-configurable, what gets dropped as
100
+ project-specific. Include a rough SKILL.md outline if it's a skill
101
+ or cabinet member.]
102
+
103
+ ## What Stays Project-Specific
104
+ [What parts of the current implementation would remain as phase files
105
+ or project configuration after extraction]
106
+
107
+ ## Assessment
108
+ - Generalizability: strong | possible
109
+ - Maturity: proven | early
110
+ - Complexity: low | medium | high (effort to extract)
111
+
112
+ ## Source Artifact Content
113
+ [Full content of the artifact being proposed, so the CoR repo has
114
+ everything needed to evaluate without access to the source project]
115
+ ```
116
+
117
+ ### 4. File Proposals
118
+
119
+ **If linked** (the CoR package resolves to a local directory — check
120
+ if `node -e "console.log(require.resolve('create-claude-cabinet'))"`
121
+ points to a local path rather than a `node_modules` path):
122
+
123
+ - Write each proposal as a markdown file in the CoR repo's
124
+ `proposals/` directory (create it if needed)
125
+ - Filename: `[source-project]-[artifact-name].md`
126
+ (e.g., `flow-review-pr.md`)
127
+ - These will surface during orient in the CoR repo
128
+
129
+ **If not linked** (CoR is installed from npm):
130
+
131
+ - Open a GitHub issue on the CoR repo for each proposal
132
+ - Title: `Extract proposal: [artifact name] from [project]`
133
+ - Label: `extraction-proposal` (create if needed)
134
+ - Body: the full proposal markdown
135
+ - Requires `gh` CLI to be authenticated
136
+
137
+ **If neither works** (no link, no gh access):
138
+
139
+ - Output the proposals to the terminal and tell the user to
140
+ file them manually or copy them to the CoR repo
141
+
142
+ ### 5. Summary
143
+
144
+ After filing, summarize:
145
+ - How many artifacts were scanned
146
+ - How many proposals were filed (strong + possible)
147
+ - How many were project-specific (not proposed)
148
+ - Where the proposals went (local files or GitHub issues)
149
+ - Remind: "Review these in the CoR repo. Accepted proposals get
150
+ built as generic templates, then your project adopts them via
151
+ /cor-upgrade."
152
+
153
+ ## Running on a Subset
154
+
155
+ The user can target specific artifacts:
156
+
157
+ - `/extract` — scan everything
158
+ - `/extract skills/my-skill` — evaluate a specific skill
159
+ - `/extract cabinet-members` — evaluate all custom cabinet members
160
+
161
+ ## What This Does NOT Do
162
+
163
+ - **Does not modify the consuming project.** No files are changed here.
164
+ - **Does not modify CoR templates.** Proposals are filed, not applied.
165
+ - **Does not decide.** A human reviews each proposal in the CoR repo.
166
+ - **Does not extract phase files from skills.** The separation of
167
+ skeleton from phases happens during implementation in CoR, not here.
168
+ The proposal includes a *suggested* separation, not a final one.
@@ -0,0 +1,160 @@
1
+ ---
2
+ model: opus
3
+ name: investigate
4
+ description: |
5
+ Structured codebase exploration before planning. Four phases: observe
6
+ (gather facts), hypothesize (form explanations), test (verify), conclude
7
+ (summarize findings). Replaces ad-hoc grepping with a systematic approach.
8
+ Use when: "investigate", "explore this", "figure out how X works",
9
+ "why is X happening", "look into", "/investigate".
10
+ related:
11
+ - type: skill
12
+ name: plan
13
+ role: "Terminal state — /investigate feeds into /plan"
14
+ - type: skill
15
+ name: audit
16
+ role: "Audit finds issues, /investigate explores them"
17
+ - type: file
18
+ path: cabinet/_briefing.md
19
+ role: "System briefing for investigation scope"
20
+ model: opus
21
+ ---
22
+
23
+ # /investigate — Structured Codebase Exploration
24
+
25
+ ## Purpose
26
+
27
+ Replace ad-hoc grepping and scattered file reads with a disciplined
28
+ exploration protocol. When you need to understand how something works,
29
+ why something is broken, or what the codebase looks like before planning
30
+ a change, /investigate gives you a structured path from question to answer.
31
+
32
+ Adapted from obra/superpowers systematic-debugging pattern.
33
+
34
+ ## Workflow
35
+
36
+ ### 1. Frame the Question
37
+
38
+ State the investigation question clearly. Good questions:
39
+ - "How does inbox processing route items to threads?"
40
+ - "Why are telemetry events showing duplicate session-start entries?"
41
+ - "What would need to change to support recurring actions?"
42
+
43
+ Bad questions (too vague — narrow first):
44
+ - "How does the system work?" → Pick a specific subsystem
45
+ - "Is the code good?" → That's /audit, not /investigate
46
+
47
+ ### 2. Observe (Gather Facts)
48
+
49
+ Collect raw data without interpreting it. Use the Explore agent or
50
+ direct Grep/Glob/Read calls:
51
+
52
+ - **Map the surface area:** Which files, functions, and data flows
53
+ are involved? Use Glob to find relevant files, Grep to find key
54
+ function names and call sites.
55
+ - **Read the code:** Read the actual implementation, not just the docs.
56
+ Docs can be stale; code is ground truth.
57
+ - **Check the data:** If the question involves runtime behavior, look
58
+ at actual data (DB contents, log files, telemetry, API responses).
59
+ - **Note surprises:** Anything that contradicts your expectations is
60
+ a finding worth recording.
61
+
62
+ **Output:** A bulleted list of concrete observations. Each observation
63
+ should cite a specific file:line or data point.
64
+
65
+ ### 3. Hypothesize (Form Explanations)
66
+
67
+ Based on observations, form 1-3 hypotheses that explain what you're seeing.
68
+
69
+ For each hypothesis:
70
+ - State it clearly in one sentence
71
+ - Identify what evidence would confirm it
72
+ - Identify what evidence would refute it
73
+
74
+ **The discipline here is generating alternatives.** Don't lock onto the
75
+ first explanation. If you only have one hypothesis, you're not investigating
76
+ — you're confirming.
77
+
78
+ ### 4. Test (Verify)
79
+
80
+ For each hypothesis, actively seek the confirming AND refuting evidence
81
+ you identified. This may involve:
82
+ - Reading more code to check call paths
83
+ - Running commands to check actual behavior
84
+ - Querying the database for state
85
+ - Checking git history for when behavior changed
86
+
87
+ **Record results per hypothesis:** confirmed, refuted, or inconclusive
88
+ (with what additional data would resolve it).
89
+
90
+ ### 5. Conclude
91
+
92
+ Summarize findings in a structured report:
93
+
94
+ ```markdown
95
+ ## Investigation: {question}
96
+
97
+ ### Observations
98
+ - {key observation 1} — {file:line}
99
+ - {key observation 2} — {file:line}
100
+
101
+ ### Findings
102
+ - {finding 1}: {what we learned and why it matters}
103
+ - {finding 2}: {what we learned and why it matters}
104
+
105
+ ### Unresolved
106
+ - {anything still unclear, if applicable}
107
+
108
+ ### Recommendation
109
+ {What to do with these findings — usually "proceed to /plan"}
110
+ ```
111
+
112
+ Present the report to the user. If the findings are sufficient to act on,
113
+ the next step is `/plan`.
114
+
115
+ ## Terminal State
116
+
117
+ Next step: `/plan` (if findings warrant action) or report findings and
118
+ close (if the investigation was purely informational).
119
+
120
+ ## Principles
121
+
122
+ - **Observe before hypothesizing.** Gather facts first. Premature
123
+ hypotheses create confirmation bias — you read code looking for
124
+ evidence of what you already believe.
125
+ - **Generate alternatives.** One hypothesis is confirmation, not
126
+ investigation. Force yourself to consider at least one alternative
127
+ explanation.
128
+ - **Cite evidence.** Every observation and finding should point to a
129
+ specific file, line, data point, or command output. Unsourced claims
130
+ are opinions, not findings.
131
+ - **Know when to stop.** Investigation serves planning. Once you have
132
+ enough understanding to plan confidently, stop. Exhaustive exploration
133
+ of every tangent is a different activity.
134
+
135
+ ## Calibration
136
+
137
+ **Core failure this targets:** Starting implementation based on assumptions
138
+ about how the codebase works, then discovering mid-implementation that the
139
+ assumptions were wrong.
140
+
141
+ ### Without Skill (Bad)
142
+
143
+ User says "add a feature to archive completed items." Claude greps for
144
+ "item" in a few files, reads the config, and starts writing an archive
145
+ script. Mid-implementation, discovers that items are referenced by ID
146
+ in API endpoints, in 3 different UI routes, in a sync mechanism, and
147
+ in foreign key relationships across 2 database tables. The archive
148
+ script moved the records but broke 6 references. Rolls back and starts
149
+ over with a proper plan.
150
+
151
+ ### With Skill (Good)
152
+
153
+ User says `/investigate` — "what would need to change to archive items?"
154
+ Claude maps the surface area: config files, API endpoints, UI routes,
155
+ database foreign keys, sync references. Forms two hypotheses: (1) items
156
+ can be soft-deleted with a status flag, (2) items need physical removal
157
+ with cascade cleanup. Tests both against the codebase. Concludes with a
158
+ complete dependency map and recommends `/plan` with the status-flag
159
+ approach. The subsequent plan accounts for all 6 reference points from
160
+ the start.
@@ -0,0 +1,52 @@
1
+ ---
2
+ name: link
3
+ description: |
4
+ Set up local development linking for Claude Cabinet. Detects whether
5
+ you're in the CoR source repo or a consuming project and runs the
6
+ appropriate npm link command. Use when: "link", "local dev", "use local
7
+ CoR", "/link".
8
+ ---
9
+
10
+ # /link — Local Development Linking
11
+
12
+ ## Purpose
13
+
14
+ Connect a consuming project to a local checkout of Claude Cabinet so
15
+ template changes are immediately available without publishing to npm.
16
+
17
+ ## Context Detection
18
+
19
+ Before doing anything, determine where you are:
20
+
21
+ **CoR source repo** (`package.json` has `name: "create-claude-cabinet"`):
22
+ - Run `npm link` to register the package globally
23
+ - This makes the local checkout available to any project that links to it
24
+ - Tell the user: "Registered locally. In your other projects, run `/link`
25
+ to connect them to this checkout."
26
+
27
+ **Any other project** (anything that isn't the CoR source repo):
28
+ - Run `npm link create-claude-cabinet` to point to the local CoR checkout
29
+ - Verify it worked: check that `npx create-claude-cabinet --help` resolves
30
+ to the local version
31
+ - If CoR is already installed (`.corrc.json` exists): "Linked to local
32
+ CoR. Run `/cor-upgrade` to pull template changes into your installed
33
+ skills."
34
+ - If CoR is not yet installed: "Linked to local CoR. Run
35
+ `npx create-claude-cabinet` to install."
36
+
37
+ ## Prerequisites
38
+
39
+ The CoR source repo must have been linked first (`npm link` from the CoR
40
+ directory). If a consuming project tries to link and the global link
41
+ doesn't exist, npm will error. In that case, tell the user to run `/link`
42
+ in their CoR checkout first.
43
+
44
+ ## What This Encodes
45
+
46
+ - `npm link` (in source) registers a global symlink to the package
47
+ - `npm link create-claude-cabinet` (in consumer) creates a local symlink
48
+ to the globally registered package
49
+ - The link survives across terminal sessions
50
+ - The link uses whatever is on disk — no version pinning, no caching
51
+ - After linking, `npx create-claude-cabinet` and `/cor-upgrade` both
52
+ resolve to the local checkout
@@ -0,0 +1,61 @@
1
+ ---
2
+ name: menu
3
+ description: |
4
+ Show available skills with descriptions and invocability.
5
+ Use when: "menu", "what can you do", "what skills", "help", "/menu".
6
+ ---
7
+
8
+ # /menu — Available Skills
9
+
10
+ ## Purpose
11
+
12
+ Dynamically discover and display all available skills, what they do, and
13
+ whether they are auto-invocable or manual-only.
14
+
15
+ ## Workflow
16
+
17
+ 1. **Discover skills:** Use the Glob tool to find all `.claude/skills/*/SKILL.md` files.
18
+
19
+ 2. **Read frontmatter from each:** For every discovered SKILL.md, use the Read tool
20
+ to extract the YAML frontmatter (between the `---` delimiters). Parse these fields:
21
+ - `name` — the skill name (used as `/name` in the table)
22
+ - `description` — first line or sentence of the description (strip the
23
+ "Use when:" portion for display)
24
+ - `disable-model-invocation` — if `true`, the skill is manual-only.
25
+ If absent or false, Claude can invoke it automatically.
26
+
27
+ 3. **Group skills into two categories:**
28
+
29
+ **Auto (Claude uses these when relevant)** — skills where
30
+ `disable-model-invocation` is absent or false. These trigger automatically
31
+ when the context matches.
32
+
33
+ **Manual (user invokes these — they have side effects)** — skills where
34
+ `disable-model-invocation: true`. The user must explicitly invoke these.
35
+
36
+ Note: `/menu` itself goes in whichever category its own frontmatter indicates.
37
+
38
+ 4. **Format as two tables:**
39
+
40
+ ### Auto (Claude uses these when relevant)
41
+ | Skill | When it triggers |
42
+ |---|---|
43
+ | `/name` | description (from the "Use when:" part of the description field) |
44
+
45
+ ### Manual (you invoke these — they have side effects)
46
+ | Skill | What it does |
47
+ |---|---|
48
+
49
+ Sort alphabetically within each group.
50
+
51
+ 5. **Suggest relevant skills:** Based on current context (open work items,
52
+ queued tasks, recent activity), suggest which skills are most relevant
53
+ right now.
54
+
55
+ ## Important
56
+
57
+ - Do NOT hardcode any skill names or descriptions. Every entry must come
58
+ from reading the actual SKILL.md files at discovery time.
59
+ - If a new skill is added to `.claude/skills/`, it automatically appears
60
+ in the menu on the next invocation. No updates to this file needed.
61
+ - If a SKILL.md has no description, show the skill name with "(no description)".