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,38 @@
1
+ # Load Findings — Where to Get Findings for Triage
2
+
3
+ Define where the triage skill loads audit findings from. The /triage-audit
4
+ skill reads this file before presenting findings.
5
+
6
+ When this file is absent or empty, the default behavior is: query pib-db
7
+ for findings with `triage_status = 'open'`, fall back to the most recent
8
+ `reviews/*/run-summary.json`. To explicitly skip, write only `skip: true`.
9
+
10
+ ## What to Include
11
+
12
+ Define your finding source:
13
+ - **Primary source** — where findings live (database, API, filesystem)
14
+ - **Fallback** — what to do if the primary source is unavailable
15
+ - **Filtering** — which findings to include (all open, specific run, etc.)
16
+
17
+ ## Example Override
18
+
19
+ Uncomment and adapt if your project stores findings elsewhere:
20
+
21
+ <!--
22
+ ### External API
23
+ ```bash
24
+ curl -s https://your-api.example.com/api/audit/findings?status=open \
25
+ -H "Authorization: Bearer $API_TOKEN"
26
+ ```
27
+ Returns JSON array of findings in the same format as run-summary.json.
28
+
29
+ ### Specific Run
30
+ Load findings from a specific audit run instead of all open findings:
31
+ ```bash
32
+ node scripts/pib-db.js query "SELECT * FROM audit_findings WHERE run_id = 'run-2026-04-01'"
33
+ ```
34
+
35
+ ### Multiple Sources
36
+ Merge findings from pib-db (local) and an external API (team findings)
37
+ before presenting for triage.
38
+ -->
@@ -0,0 +1,66 @@
1
+ # Triage UI — How to Present Findings
2
+
3
+ Define how findings are presented for human triage judgment. The
4
+ /triage-audit skill reads this file after loading findings.
5
+
6
+ When this file is absent or empty, the default behavior is: start the
7
+ local triage server, POST findings with commentary, tell the user to
8
+ open the browser UI. Fallback: present in conversation. To explicitly
9
+ skip UI presentation, write only `skip: true`.
10
+
11
+ ## What to Include
12
+
13
+ Define your triage interface:
14
+ - **Primary UI** — how findings are presented (browser, CLI, external tool)
15
+ - **Commentary** — how Claude's assessment is included with each finding
16
+ - **Fallback** — what to do if the primary UI isn't available
17
+
18
+ ## Default Behavior
19
+
20
+ 1. **Prepare commentary** for each finding:
21
+ - Your assessment of severity and importance
22
+ - Suggested fix approach and estimated effort
23
+ - Relationship to other findings (shared root cause?)
24
+ - Relationship to open work (already being addressed?)
25
+
26
+ 2. **Start triage server:**
27
+ ```bash
28
+ node scripts/triage-server.mjs --port 3847
29
+ ```
30
+
31
+ 3. **POST findings** to `http://localhost:3847/api/findings` with
32
+ commentary attached to each finding
33
+
34
+ 4. **Tell user** to open `http://localhost:3847` in their browser
35
+
36
+ 5. **Wait for verdicts** — poll `GET /api/verdicts` until the user
37
+ submits their decisions
38
+
39
+ ## Important
40
+
41
+ Never summarize away findings. Every item must be visible with full
42
+ context: title, description, assumption, evidence, question, and
43
+ commentary. The user needs the complete picture to make good triage
44
+ decisions. Abbreviated or summarized findings lead to uninformed
45
+ verdicts.
46
+
47
+ ## Example Override
48
+
49
+ Uncomment and adapt for your project:
50
+
51
+ <!--
52
+ ### CLI-Only Triage
53
+ Present findings in the conversation, grouped by cabinet member.
54
+ For each group, show findings severity-ordered and ask for verdicts.
55
+ Useful when browser access isn't available.
56
+
57
+ ### External Triage Tool
58
+ POST findings to an external triage dashboard:
59
+ ```bash
60
+ curl -X POST https://your-app.example.com/api/triage/session \
61
+ -H "Content-Type: application/json" \
62
+ -H "Authorization: Bearer $API_TOKEN" \
63
+ -d @findings-with-commentary.json
64
+ ```
65
+ Tell user to open the external dashboard URL.
66
+ -->
@@ -0,0 +1,35 @@
1
+ ---
2
+ name: unlink
3
+ description: |
4
+ Remove local development linking for Claude Cabinet. Returns the
5
+ project to using the published npm version. Use when: "unlink",
6
+ "stop using local CoR", "use published version", "/unlink".
7
+ ---
8
+
9
+ # /unlink — Remove Local Development Link
10
+
11
+ ## Purpose
12
+
13
+ Disconnect from a local Claude Cabinet checkout and return to using
14
+ the published npm version.
15
+
16
+ ## Context Detection
17
+
18
+ **CoR source repo** (`package.json` has `name: "create-claude-cabinet"`):
19
+ - Run `npm unlink` to remove the global registration
20
+ - Warn: "This will break the link for all consuming projects that depend
21
+ on it. They'll need to `npm unlink create-claude-cabinet` too, or
22
+ they'll get resolution errors."
23
+
24
+ **Any other project**:
25
+ - Run `npm unlink create-claude-cabinet`
26
+ - The project returns to using the published npm version
27
+ - Tell the user: "Unlinked. `npx create-claude-cabinet` will now pull
28
+ from npm instead of your local checkout."
29
+
30
+ ## When to Use
31
+
32
+ - Before testing against the published npm version
33
+ - When done with a local development cycle
34
+ - When the local CoR checkout is moving to a branch you don't want
35
+ consuming projects to track
@@ -0,0 +1,116 @@
1
+ ---
2
+ name: validate
3
+ description: |
4
+ Run structural validation checks and present a unified summary. The
5
+ orchestration pattern is generic; the specific validators are project-defined
6
+ in phases/validators.md. Use when: "validate", "run checks", "/validate",
7
+ or after any structural changes.
8
+ related:
9
+ - type: file
10
+ path: .claude/skills/validate/phases/validators.md
11
+ role: "Project-specific validator definitions"
12
+ - type: file
13
+ path: cabinet/_briefing.md
14
+ role: "Scan scopes for validation targets"
15
+ ---
16
+
17
+ # /validate — Run All Validation Checks
18
+
19
+ ## Purpose
20
+
21
+ Run every configured validator and report results in a unified summary.
22
+ Zero errors is the standard.
23
+
24
+ This is a **skeleton skill** using the `phases/` directory pattern. The
25
+ orchestration (run → collect → report) is generic. Your project defines
26
+ which validators to run in `phases/validators.md`.
27
+
28
+ ### Phase File Protocol
29
+
30
+ Phase files have three states:
31
+
32
+ | State | Meaning |
33
+ |-------|---------|
34
+ | Absent or empty | Use this skeleton's **default behavior** for the phase |
35
+ | Contains only `skip: true` | **Explicitly opted out** — skip this phase entirely |
36
+ | Contains content | **Custom behavior** — use the file's content instead |
37
+
38
+ ## Workflow
39
+
40
+ ### 1. Read Validators
41
+
42
+ Read `phases/validators.md` for the list of project-specific checks.
43
+ Each validator has a name, command, and description of what it catches.
44
+
45
+ If `phases/validators.md` is empty or missing, report that no validators
46
+ are configured and suggest the user define some.
47
+
48
+ ### 2. Run Each Validator
49
+
50
+ Execute each validator command in sequence. For each:
51
+ - Run the command
52
+ - Capture stdout/stderr and exit code
53
+ - Record pass (exit 0) or fail (non-zero) with output
54
+
55
+ If a validator fails, continue running the rest — don't stop at the
56
+ first failure. The point is a complete picture.
57
+
58
+ ### 3. Report
59
+
60
+ Present a unified summary:
61
+
62
+ ```
63
+ ## Validation Results
64
+
65
+ | Check | Status | Details |
66
+ |-------|--------|---------|
67
+ | {name} | PASS/FAIL | {error count or "clean"} |
68
+ | ... | ... | ... |
69
+
70
+ ### Errors
71
+ {For each failed check, list the specific errors}
72
+ ```
73
+
74
+ If errors found:
75
+ - For quick fixes (obvious typo, missing tag): propose the fix
76
+ - For complex issues: suggest creating a plan via /plan
77
+ - Never silently skip errors
78
+
79
+ ### 4. Terminal State
80
+
81
+ - All pass → ready to commit and deploy
82
+ - Any fail → fix errors and re-validate
83
+
84
+ ## Extending
85
+
86
+ To add a new validator:
87
+ 1. Add an entry to `phases/validators.md`
88
+ 2. Ensure the script/command exists and returns exit 0 on success
89
+ 3. Run `/validate` to confirm it works
90
+
91
+ To skip a validator temporarily: comment it out in `phases/validators.md`.
92
+
93
+ To add a phase the skeleton doesn't define: create a new file in `phases/`
94
+ (e.g., `phases/pre-validate.md` for setup steps). Claude reads whatever
95
+ phase files exist at runtime.
96
+
97
+ ## Calibration
98
+
99
+ **Core failure this targets:** Committing or deploying code that has
100
+ structural problems (broken references, type errors, lint violations)
101
+ because checks weren't run or results weren't reviewed.
102
+
103
+ ### Without Skill (Bad)
104
+
105
+ Developer makes changes across several files, commits, and deploys.
106
+ The deploy fails because of a type error that local checking would have
107
+ caught. Or worse: the deploy succeeds but a broken cross-reference
108
+ causes a runtime error that isn't discovered for days.
109
+
110
+ ### With Skill (Good)
111
+
112
+ Developer runs `/validate` after changes. The unified summary shows
113
+ one type error and one structural issue. Both are fixed before commit.
114
+ The deploy succeeds cleanly. The structural issue would have caused a
115
+ subtle bug that wouldn't have surfaced until a user hit a specific
116
+ code path.
@@ -0,0 +1,53 @@
1
+ # Validators
2
+
3
+ Define your project-specific validation checks here. Each validator is
4
+ a named check with a command to run. The /validate skill reads this file
5
+ and executes each check in sequence.
6
+
7
+ ## Format
8
+
9
+ For each validator, provide:
10
+ - **Name** — short label for the summary table
11
+ - **Command** — shell command that returns exit 0 on success, non-zero on failure
12
+ - **What it catches** — brief description of what this validator detects
13
+
14
+ ## Example Validators
15
+
16
+ Uncomment and adapt these for your project:
17
+
18
+ <!--
19
+ ### Type Check
20
+ ```bash
21
+ cd your-app-dir && npx tsc --noEmit
22
+ ```
23
+ Catches type errors before they reach production.
24
+
25
+ ### Lint
26
+ ```bash
27
+ cd your-app-dir && npx eslint src/
28
+ ```
29
+ Catches style violations and common code quality issues.
30
+
31
+ ### Production Build
32
+ ```bash
33
+ cd your-app-dir && npx vite build
34
+ ```
35
+ Catches what the type checker misses: bare catch blocks, runtime-only
36
+ errors, bundle resolution failures. A type check pass + build fail =
37
+ broken deploy.
38
+
39
+ ### Structural Validation
40
+ ```bash
41
+ ./scripts/validate-structure.sh
42
+ ```
43
+ Project-specific structural checks (e.g., required files exist, cross-references
44
+ are valid, configuration is consistent). Write these scripts for your
45
+ project's invariants.
46
+
47
+ ### Memory/Docs Validation
48
+ ```bash
49
+ ./scripts/validate-docs.sh
50
+ ```
51
+ Checks that documentation references (memory index, CLAUDE.md links) point
52
+ to files that actually exist.
53
+ -->