catalyst-os 1.1.1 → 1.3.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 (35) hide show
  1. package/.catalyst/bin/validate-artifacts.js +213 -0
  2. package/.catalyst/main/project-config.yaml +3 -0
  3. package/.catalyst/spec-structure.yaml +4 -4
  4. package/.claude/agents/alchemist.md +29 -1
  5. package/.claude/agents/arbiter.md +1 -1
  6. package/.claude/agents/enforcer.md +26 -0
  7. package/.claude/agents/forge-master.md +22 -1
  8. package/.claude/agents/inquisitor.md +20 -3
  9. package/.claude/agents/shaper.md +29 -1
  10. package/.claude/agents/smith.md +29 -1
  11. package/.claude/commands/build-spec-worktree.md +19 -0
  12. package/.claude/commands/build-spec.md +12 -0
  13. package/.claude/commands/commit-spec.md +20 -0
  14. package/.claude/commands/{reject-spec.md → discard-spec.md} +9 -9
  15. package/.claude/commands/iterate-spec.md +10 -0
  16. package/.claude/commands/primer-spec.md +23 -13
  17. package/.claude/commands/review-spec.md +29 -0
  18. package/.claude/commands/status-spec.md +20 -12
  19. package/.claude/hooks/post-edit-format.sh +62 -0
  20. package/.claude/hooks/pre-compact-save.sh +98 -0
  21. package/.claude/rules/coding-standards.md +21 -0
  22. package/.claude/rules/git-workflow.md +25 -0
  23. package/.claude/rules/security.md +23 -0
  24. package/.claude/settings.json +15 -0
  25. package/.claude/settings.local.json +5 -3
  26. package/.claude/skills/build-orchestration/SKILL.md +39 -8
  27. package/.claude/skills/spec-approval/SKILL.md +3 -3
  28. package/.claude/skills/spec-iteration/SKILL.md +6 -4
  29. package/.claude/skills/spec-shaping/SKILL.md +1 -1
  30. package/.claude/skills/spec-validation/SKILL.md +10 -6
  31. package/.claude/skills/using-skills/SKILL.md +2 -2
  32. package/README.md +9 -9
  33. package/package.json +3 -2
  34. package/.claude/commands/approve-spec.md +0 -22
  35. package/.claude/commands/validate-spec.md +0 -17
@@ -0,0 +1,213 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Validate structural integrity of all catalyst-os artifacts.
4
+ * Run: node .catalyst/bin/validate-artifacts.js
5
+ * Exit code: 0 = all valid, 1 = errors found
6
+ */
7
+
8
+ const fs = require('fs');
9
+ const path = require('path');
10
+
11
+ const ROOT = path.resolve(__dirname, '..', '..');
12
+ let errors = 0;
13
+ let warnings = 0;
14
+
15
+ function error(msg) {
16
+ console.error(` ✗ ${msg}`);
17
+ errors++;
18
+ }
19
+
20
+ function warn(msg) {
21
+ console.warn(` ⚠ ${msg}`);
22
+ warnings++;
23
+ }
24
+
25
+ function ok(msg) {
26
+ console.log(` ✓ ${msg}`);
27
+ }
28
+
29
+ // --- Helpers ---
30
+
31
+ function fileExists(relPath) {
32
+ return fs.existsSync(path.join(ROOT, relPath));
33
+ }
34
+
35
+ function readFile(relPath) {
36
+ const full = path.join(ROOT, relPath);
37
+ if (!fs.existsSync(full)) return null;
38
+ return fs.readFileSync(full, 'utf8');
39
+ }
40
+
41
+ function listDir(relPath) {
42
+ const full = path.join(ROOT, relPath);
43
+ if (!fs.existsSync(full)) return [];
44
+ return fs.readdirSync(full);
45
+ }
46
+
47
+ function extractFrontmatter(content) {
48
+ const match = content.match(/^---\n([\s\S]*?)\n---/);
49
+ if (!match) return null;
50
+ // Simple YAML key extraction (no full parser needed)
51
+ const fm = {};
52
+ for (const line of match[1].split('\n')) {
53
+ const kv = line.match(/^(\w+):\s*(.+)/);
54
+ if (kv) fm[kv[1]] = kv[2].trim();
55
+ }
56
+ return fm;
57
+ }
58
+
59
+ // --- Validators ---
60
+
61
+ console.log('\n📦 Catalyst OS Artifact Validation\n');
62
+
63
+ // 1. Skills
64
+ console.log('Skills:');
65
+ const skillDirs = listDir('.claude/skills').filter(d => !d.startsWith('.'));
66
+ if (skillDirs.length === 0) {
67
+ error('No skills found in .claude/skills/');
68
+ } else {
69
+ for (const dir of skillDirs) {
70
+ const skillPath = `.claude/skills/${dir}/SKILL.md`;
71
+ const content = readFile(skillPath);
72
+ if (!content) {
73
+ error(`${skillPath} — missing`);
74
+ } else if (content.trim().length < 10) {
75
+ error(`${skillPath} — empty or too short`);
76
+ } else {
77
+ ok(dir);
78
+ }
79
+ }
80
+ }
81
+
82
+ // 2. Agents
83
+ console.log('\nAgents:');
84
+ const agentFiles = listDir('.claude/agents').filter(f => f.endsWith('.md'));
85
+ if (agentFiles.length === 0) {
86
+ error('No agents found in .claude/agents/');
87
+ } else {
88
+ const requiredFields = ['name', 'description', 'model'];
89
+ for (const file of agentFiles) {
90
+ const content = readFile(`.claude/agents/${file}`);
91
+ if (!content) {
92
+ error(`${file} — cannot read`);
93
+ continue;
94
+ }
95
+ const fm = extractFrontmatter(content);
96
+ if (!fm) {
97
+ error(`${file} — missing YAML frontmatter`);
98
+ continue;
99
+ }
100
+ const missing = requiredFields.filter(f => !fm[f]);
101
+ if (missing.length > 0) {
102
+ error(`${file} — missing frontmatter fields: ${missing.join(', ')}`);
103
+ } else {
104
+ ok(file.replace('.md', ''));
105
+ }
106
+ }
107
+ }
108
+
109
+ // 3. Commands
110
+ console.log('\nCommands:');
111
+ const cmdFiles = listDir('.claude/commands').filter(f => f.endsWith('.md'));
112
+ if (cmdFiles.length === 0) {
113
+ error('No commands found in .claude/commands/');
114
+ } else {
115
+ for (const file of cmdFiles) {
116
+ const content = readFile(`.claude/commands/${file}`);
117
+ if (!content || content.trim().length < 10) {
118
+ error(`${file} — empty or too short`);
119
+ } else {
120
+ ok(file.replace('.md', ''));
121
+ }
122
+ }
123
+ }
124
+
125
+ // 4. Skill Index consistency (using-skills references vs actual skills)
126
+ console.log('\nSkill Index:');
127
+ const usingSkills = readFile('.claude/skills/using-skills/SKILL.md');
128
+ if (usingSkills) {
129
+ // Extract skill paths from the index tables
130
+ const pathMatches = usingSkills.matchAll(/`\.claude\/skills\/([^/]+)\/SKILL\.md`/g);
131
+ const referenced = new Set();
132
+ for (const m of pathMatches) {
133
+ referenced.add(m[1]);
134
+ }
135
+
136
+ // Check referenced skills exist
137
+ for (const skill of referenced) {
138
+ if (!fileExists(`.claude/skills/${skill}/SKILL.md`)) {
139
+ error(`using-skills references "${skill}" but .claude/skills/${skill}/SKILL.md doesn't exist`);
140
+ }
141
+ }
142
+
143
+ // Check actual skills are referenced
144
+ for (const dir of skillDirs) {
145
+ if (!referenced.has(dir)) {
146
+ warn(`Skill "${dir}" exists but is not listed in using-skills/SKILL.md`);
147
+ }
148
+ }
149
+
150
+ if (errors === 0) ok('All skill references valid');
151
+ } else {
152
+ error('using-skills/SKILL.md not found');
153
+ }
154
+
155
+ // 5. spec-structure.yaml file references
156
+ console.log('\nSpec Structure:');
157
+ if (fileExists('.catalyst/spec-structure.yaml')) {
158
+ ok('spec-structure.yaml exists');
159
+ } else {
160
+ error('.catalyst/spec-structure.yaml missing');
161
+ }
162
+
163
+ // 6. Core files
164
+ console.log('\nCore Files:');
165
+ const coreFiles = ['CLAUDE.md', 'AGENTS.md', 'package.json', '.catalyst/main/project-config.yaml'];
166
+ for (const f of coreFiles) {
167
+ if (fileExists(f)) {
168
+ ok(f);
169
+ } else {
170
+ error(`${f} — missing`);
171
+ }
172
+ }
173
+
174
+ // 7. Hooks (if settings.json references them)
175
+ console.log('\nHooks:');
176
+ const settings = readFile('.claude/settings.json');
177
+ if (settings) {
178
+ try {
179
+ const parsed = JSON.parse(settings);
180
+ const hooks = parsed.hooks || {};
181
+ for (const [event, hookList] of Object.entries(hooks)) {
182
+ for (const hook of hookList) {
183
+ const cmd = hook.command || '';
184
+ // Extract script path from command (first token before any args)
185
+ const scriptPath = cmd.split(/\s/)[0];
186
+ if (scriptPath && scriptPath.startsWith('.')) {
187
+ if (fileExists(scriptPath)) {
188
+ ok(`${event}: ${scriptPath}`);
189
+ } else {
190
+ error(`${event}: ${scriptPath} — referenced in settings.json but missing`);
191
+ }
192
+ }
193
+ }
194
+ }
195
+ } catch (e) {
196
+ error(`settings.json — invalid JSON: ${e.message}`);
197
+ }
198
+ } else {
199
+ warn('No .claude/settings.json found');
200
+ }
201
+
202
+ // --- Summary ---
203
+ console.log('\n' + '─'.repeat(40));
204
+ if (errors > 0) {
205
+ console.error(`\n❌ ${errors} error(s), ${warnings} warning(s)\n`);
206
+ process.exit(1);
207
+ } else if (warnings > 0) {
208
+ console.log(`\n⚠️ ${warnings} warning(s), 0 errors\n`);
209
+ process.exit(0);
210
+ } else {
211
+ console.log('\n✅ All artifacts valid\n');
212
+ process.exit(0);
213
+ }
@@ -25,6 +25,9 @@ git:
25
25
  - "main"
26
26
  - "master"
27
27
 
28
+ # Path for git worktrees (relative to repo root, used by /build-spec-worktree)
29
+ worktree_path: ".catalyst/worktrees"
30
+
28
31
  # Commit message templates
29
32
  commit_templates:
30
33
  red_phase: "test({scope}): write failing tests for {spec}"
@@ -35,7 +35,7 @@ files:
35
35
  handoff.md:
36
36
  owner: scribe
37
37
  purpose: Human-readable summary (colleague walkthrough)
38
- created: build-spec (started), validate-spec (finalized)
38
+ created: build-spec (started), review-spec (finalized)
39
39
  updated_by: [scribe, arbiter]
40
40
  pattern: narrative
41
41
  note: |
@@ -45,7 +45,7 @@ files:
45
45
  validation.md:
46
46
  owner: arbiter
47
47
  purpose: Test results, quality checks
48
- created: validate-spec
48
+ created: review-spec
49
49
  updated_by: [arbiter, enforcer, sentinel, inquisitor, watcher]
50
50
 
51
51
  assets/:
@@ -289,7 +289,7 @@ build_dag:
289
289
  library:
290
290
  root: "library/"
291
291
  description: "Reusable patterns extracted from completed specs"
292
- created_by: "/approve-spec (optional)"
292
+ created_by: "/commit-spec (optional)"
293
293
 
294
294
  # Auto-detect patterns by keywords
295
295
  pattern_detection:
@@ -316,4 +316,4 @@ library:
316
316
 
317
317
  completed:
318
318
  location: "completed/"
319
- description: "Specs moved here after /approve-spec"
319
+ description: "Specs moved here after /commit-spec"
@@ -41,7 +41,8 @@ You handle all database concerns including schema design, migrations, and data t
41
41
  5. **Indexes**: Plan for query performance
42
42
  6. **Migration**: Write safe, reversible migrations
43
43
  7. **Self-Review**: Before reporting done (see below)
44
- 8. **Report**: Actual test/migration output, files changed, any concerns
44
+ 8. **Update tasks.md**: Mark your task as done (see below) — MANDATORY
45
+ 9. **Report**: Actual test/migration output, files changed, any concerns
45
46
 
46
47
  ## Self-Review Before Reporting
47
48
 
@@ -72,6 +73,33 @@ Before reporting task completion to the orchestrator, review your own work:
72
73
 
73
74
  If you find issues during self-review, fix them before reporting.
74
75
 
76
+ ## MANDATORY: Update tasks.md on Completion
77
+
78
+ **After your task passes self-review, you MUST update tasks.md BEFORE reporting back.**
79
+
80
+ The orchestrator may lose context or the conversation may end before it updates. If you don't do this, your work looks like it never happened.
81
+
82
+ ### How to Update
83
+
84
+ 1. **Find tasks.md**: Read `.catalyst/specs/*/tasks.md` (the spec you're working on)
85
+ 2. **Update the Progress table**: Change your task's status from `⚡ Active` to `✓ Done`
86
+ 3. **Add commit hash** if you committed
87
+ 4. **Update Current Session**: Note what's next based on the DAG
88
+
89
+ ### Example
90
+
91
+ Before:
92
+ ```
93
+ | db-schema | ⚡ Active | alchemist | Pending | Working... |
94
+ ```
95
+
96
+ After:
97
+ ```
98
+ | db-schema | ✓ Done | alchemist | ✓ Pass | Schema migrated, types generated |
99
+ ```
100
+
101
+ **If you skip this step, `/primer-spec` will show the spec as not started and all your progress is invisible.**
102
+
75
103
  ## When Receiving Review Feedback
76
104
 
77
105
  Follow `.claude/skills/receiving-code-review/SKILL.md`:
@@ -2,7 +2,7 @@
2
2
  name: arbiter
3
3
  description: >
4
4
  PROACTIVELY DELEGATE validation orchestration to this agent. MUST BE USED when:
5
- - /validate-spec command is invoked
5
+ - /review-spec command is invoked
6
6
  - Implementation is complete and needs quality checks
7
7
  - Production readiness needs to be verified
8
8
 
@@ -85,6 +85,32 @@ Write test → Run (PASS) → Revert the fix → Run (MUST FAIL) → Restore fix
85
85
  If it doesn't fail when reverted, the test is worthless.
86
86
  ```
87
87
 
88
+ ## MANDATORY: Update tasks.md on Completion
89
+
90
+ **After completing your test-writing or integration task, you MUST update tasks.md BEFORE reporting back.**
91
+
92
+ The orchestrator may lose context or the conversation may end before it updates. If you don't do this, your work looks like it never happened.
93
+
94
+ ### How to Update
95
+
96
+ 1. **Find tasks.md**: Read `.catalyst/specs/*/tasks.md` (the spec you're working on)
97
+ 2. **Update the Progress table**: Change your task's status from `⚡ Active` to `✓ Done`
98
+ 3. **Update Current Session**: Note what's next based on the DAG
99
+
100
+ ### Example
101
+
102
+ Before:
103
+ ```
104
+ | integration | ⚡ Active | enforcer | Pending | Running E2E tests |
105
+ ```
106
+
107
+ After:
108
+ ```
109
+ | integration | ✓ Done | enforcer | ✓ Pass | All integration tests passing |
110
+ ```
111
+
112
+ **If you skip this step, `/primer-spec` will show the spec as not started and all your progress is invisible.**
113
+
88
114
  ## Principles
89
115
 
90
116
  - **Red First**: Tests must fail before implementation — and you must WATCH them fail
@@ -52,6 +52,14 @@ Before any action, load `.claude/skills/using-skills/SKILL.md` and check which s
52
52
  - Flag blockers immediately
53
53
  - Never skip failing tests
54
54
 
55
+ ## Context Awareness
56
+
57
+ Long builds consume enormous context. At each phase gate:
58
+ - Check if context is getting long
59
+ - Remind the user: *"Context checkpoint — good time to compact if needed. `/primer-spec @{slug}` to resume."*
60
+ - Always update `tasks.md ## Current Session` before suggesting compaction
61
+ - The PreCompact hook will auto-save state, but proactive updates are better
62
+
55
63
  ## DAG Execution Model
56
64
 
57
65
  ### Reading the DAG
@@ -133,6 +141,8 @@ This commit is PROOF that red phase happened.
133
141
  No commit = no implementation. No exceptions.
134
142
  ```
135
143
 
144
+ > **Context checkpoint:** Update `tasks.md ## Current Session`, then tell the user: *"Good point to compact if context is long. `/primer-spec @{slug}` to resume."*
145
+
136
146
  ### 3. Foundation Phase (Sequential)
137
147
  ```
138
148
  Spawn: Alchemist
@@ -177,6 +187,8 @@ This commit is PROOF that green phase happened.
177
187
  No commit = no integration. No exceptions.
178
188
  ```
179
189
 
190
+ > **Context checkpoint:** Update `tasks.md ## Current Session`, then tell the user: *"Good point to compact if context is long. `/primer-spec @{slug}` to resume."*
191
+
180
192
  ### 6. Integration Phase (Sequential)
181
193
  ```
182
194
  Spawn: Enforcer
@@ -214,9 +226,18 @@ Agent reports "task complete, tests pass":
214
226
  1. Check: Did the agent include actual test output in its report?
215
227
  2. Check: Does VCS diff show the expected file changes?
216
228
  3. Run: Execute the test command for that scope yourself
217
- 4. ONLY THEN: Mark the task as Done in tasks.md
229
+ 4. Verify: Did the agent update tasks.md Progress table? (agents are instructed to)
230
+ 5. If NOT updated: Update tasks.md yourself IMMEDIATELY
231
+ 6. ONLY THEN: Consider the task Done
218
232
  ```
219
233
 
234
+ ### CRITICAL: tasks.md Must Stay Current
235
+
236
+ Agents are instructed to update tasks.md themselves. But if an agent fails to do so:
237
+ - **You MUST update tasks.md immediately** after verifying completion
238
+ - Do NOT defer this — if the conversation ends, stale tasks.md means `/primer-spec` shows no progress
239
+ - Update BOTH the Progress table AND the Current Session section
240
+
220
241
  ## Escalation Protocol
221
242
 
222
243
  See: `.claude/skills/agent-delegation/SKILL.md`
@@ -13,7 +13,7 @@ color: red
13
13
  skills: lint-checking, code-review
14
14
  ---
15
15
 
16
- You are the Inquisitor, a code quality specialist who reviews code for issues.
16
+ You are the Inquisitor, a code quality specialist who reviews code for issues and proposes simplifications.
17
17
 
18
18
  ## Opening
19
19
 
@@ -21,7 +21,7 @@ You are the Inquisitor, a code quality specialist who reviews code for issues.
21
21
 
22
22
  ## Role
23
23
 
24
- You enforce code quality standards through linting, pattern review, and code review.
24
+ You enforce code quality standards through linting, pattern review, code review, and **code simplification**.
25
25
 
26
26
  ## Behavior
27
27
 
@@ -31,6 +31,7 @@ You enforce code quality standards through linting, pattern review, and code rev
31
31
  - Provide actionable fix suggestions
32
32
  - Avoid nitpicking
33
33
  - Ensure test coverage
34
+ - **Identify code that can be simplified without changing behavior**
34
35
 
35
36
  ## Review Checklist
36
37
 
@@ -59,6 +60,22 @@ You enforce code quality standards through linting, pattern review, and code rev
59
60
  - Testable structure
60
61
  - Reasonable complexity
61
62
 
63
+ ### Code Simplification
64
+
65
+ Look for and suggest fixes for:
66
+ - **Unnecessary abstractions** — helpers/utilities created for one-time use; inline them
67
+ - **Over-engineered patterns** — factory patterns, strategy patterns, builders where a simple function suffices
68
+ - **Overly defensive code** — error handling for impossible scenarios, redundant null checks on non-nullable types
69
+ - **Dead code** — unused imports, unreachable branches, commented-out code
70
+ - **Premature generalization** — config objects, feature flags, or extensibility hooks for things that have only one use
71
+ - **Verbose patterns** — 10 lines that could be 3 without losing clarity
72
+
73
+ **Rules for simplification:**
74
+ - NEVER change behavior — only structure
75
+ - NEVER remove error handling at system boundaries (user input, external APIs)
76
+ - Verify tests still pass after each simplification
77
+ - If unsure whether something is dead code, leave it and flag it as "candidate for removal"
78
+
62
79
  ## Output
63
80
 
64
81
  Provide review with:
@@ -66,5 +83,5 @@ Provide review with:
66
83
  - Critical issues (must fix)
67
84
  - Major issues (should fix)
68
85
  - Minor issues (nice to fix)
69
- - Suggestions for improvement
86
+ - **Simplification opportunities** (with before/after snippets)
70
87
  - What's done well
@@ -41,7 +41,8 @@ You implement frontend functionality including React components, pages, and UI f
41
41
  5. **Style**: Apply styling to match design
42
42
  6. **Polish**: Add interactions, transitions, states
43
43
  7. **Self-Review**: Before reporting done (see below)
44
- 8. **Report**: Actual test output, files changed, any concerns
44
+ 8. **Update tasks.md**: Mark your task as done (see below) — MANDATORY
45
+ 9. **Report**: Actual test output, files changed, any concerns
45
46
 
46
47
  ## Self-Review Before Reporting
47
48
 
@@ -68,6 +69,33 @@ Before reporting task completion to the orchestrator, review your own work:
68
69
 
69
70
  If you find issues during self-review, fix them before reporting.
70
71
 
72
+ ## MANDATORY: Update tasks.md on Completion
73
+
74
+ **After your task passes self-review, you MUST update tasks.md BEFORE reporting back.**
75
+
76
+ The orchestrator may lose context or the conversation may end before it updates. If you don't do this, your work looks like it never happened.
77
+
78
+ ### How to Update
79
+
80
+ 1. **Find tasks.md**: Read `.catalyst/specs/*/tasks.md` (the spec you're working on)
81
+ 2. **Update the Progress table**: Change your task's status from `⚡ Active` to `✓ Done`
82
+ 3. **Add commit hash** if you committed
83
+ 4. **Update Current Session**: Note what's next based on the DAG
84
+
85
+ ### Example
86
+
87
+ Before:
88
+ ```
89
+ | ui-profile | ⚡ Active | shaper-1 | Pending | Working... |
90
+ ```
91
+
92
+ After:
93
+ ```
94
+ | ui-profile | ✓ Done | shaper-1 | ✓ Pass | Profile page complete |
95
+ ```
96
+
97
+ **If you skip this step, `/primer-spec` will show the spec as not started and all your progress is invisible.**
98
+
71
99
  ## When Receiving Review Feedback
72
100
 
73
101
  Follow `.claude/skills/receiving-code-review/SKILL.md`:
@@ -40,7 +40,8 @@ You implement backend functionality including APIs, services, business logic, an
40
40
  4. **Implement**: Write code to pass tests (green phase)
41
41
  5. **Refactor**: Clean up while keeping tests green
42
42
  6. **Self-Review**: Before reporting done (see below)
43
- 7. **Report**: Actual test output, files changed, any concerns
43
+ 7. **Update tasks.md**: Mark your task as done (see below) — MANDATORY
44
+ 8. **Report**: Actual test output, files changed, any concerns
44
45
 
45
46
  ## Self-Review Before Reporting
46
47
 
@@ -67,6 +68,33 @@ Before reporting task completion to the orchestrator, review your own work:
67
68
 
68
69
  If you find issues during self-review, fix them before reporting.
69
70
 
71
+ ## MANDATORY: Update tasks.md on Completion
72
+
73
+ **After your task passes self-review, you MUST update tasks.md BEFORE reporting back.**
74
+
75
+ The orchestrator may lose context or the conversation may end before it updates. If you don't do this, your work looks like it never happened.
76
+
77
+ ### How to Update
78
+
79
+ 1. **Find tasks.md**: Read `.catalyst/specs/*/tasks.md` (the spec you're working on)
80
+ 2. **Update the Progress table**: Change your task's status from `⚡ Active` to `✓ Done`
81
+ 3. **Add commit hash** if you committed
82
+ 4. **Update Current Session**: Note what's next based on the DAG
83
+
84
+ ### Example
85
+
86
+ Before:
87
+ ```
88
+ | api-auth | ⚡ Active | smith-1 | Pending | Working... |
89
+ ```
90
+
91
+ After:
92
+ ```
93
+ | api-auth | ✓ Done | smith-1 | ✓ Pass | Implemented auth endpoints |
94
+ ```
95
+
96
+ **If you skip this step, `/primer-spec` will show the spec as not started and all your progress is invisible.**
97
+
70
98
  ## When Receiving Review Feedback
71
99
 
72
100
  Follow `.claude/skills/receiving-code-review/SKILL.md`:
@@ -0,0 +1,19 @@
1
+ # /build-spec-worktree
2
+
3
+ Implement a specification using **strict TDD** in an isolated git worktree.
4
+
5
+ Use this instead of `/build-spec` when you need worktree isolation — e.g., working on a second spec while another is in progress, or wanting a clean working directory.
6
+
7
+ ## Usage
8
+
9
+ ```
10
+ /build-spec-worktree @2025-11-29-stripe-integration
11
+ ```
12
+
13
+ ---
14
+
15
+ **Invoke skill:** `build-orchestration` with `--worktree`
16
+
17
+ **Orchestrator:** Forge-Master (delegates to Forger, Enforcer, Smith, Shaper, Alchemist)
18
+
19
+ **Process skills used:** `test-driven-development`, `agent-delegation`, `verification-before-completion`, `systematic-debugging`
@@ -8,6 +8,18 @@ Implement a specification using **strict TDD**.
8
8
  /build-spec @2025-11-29-stripe-integration
9
9
  ```
10
10
 
11
+ ## Pre-computed Context
12
+
13
+ ```bash
14
+ # Detect spec and branch state
15
+ echo "=== BRANCH ===" && git branch --show-current
16
+ echo "=== STATUS ===" && git status --short
17
+ echo "=== SPEC FILES ===" && ls .catalyst/specs/*$ARGUMENTS*/ 2>/dev/null || echo "No spec found for: $ARGUMENTS"
18
+ echo "=== SPEC FRONTMATTER ===" && head -30 .catalyst/specs/*$ARGUMENTS*/spec.md 2>/dev/null || echo "No spec.md"
19
+ echo "=== TASKS EXIST? ===" && head -5 .catalyst/specs/*$ARGUMENTS*/tasks.md 2>/dev/null || echo "No tasks.md yet (fresh build)"
20
+ echo "=== PROJECT CONFIG ===" && cat .catalyst/main/project-config.yaml 2>/dev/null || echo "No project config"
21
+ ```
22
+
11
23
  ---
12
24
 
13
25
  **Invoke skill:** `build-orchestration`
@@ -0,0 +1,20 @@
1
+ # /commit-spec
2
+
3
+ Commit, archive, and propagate learnings from a **fully built and validated** implementation.
4
+
5
+ > **Lifecycle position:** This is the FINAL step. Only use after `/build-spec` and `/review-spec` have completed successfully.
6
+ >
7
+ > **Flow:** `/catalyze-spec` → `/build-spec` → `/review-spec` → **`/commit-spec`**
8
+
9
+ ## Usage
10
+
11
+ ```
12
+ /commit-spec @2025-11-29-stripe-integration
13
+ /commit-spec @2025-11-29-stripe-integration "Great work!"
14
+ ```
15
+
16
+ ---
17
+
18
+ **Invoke skill:** `spec-approval`
19
+
20
+ **Process skills used:** `verification-before-completion`, `agent-delegation`
@@ -1,13 +1,13 @@
1
- # /reject-spec
1
+ # /discard-spec
2
2
 
3
3
  Request changes to the implementation.
4
4
 
5
5
  ## Usage
6
6
 
7
7
  ```
8
- /reject-spec @2025-11-29-stripe-integration "reason"
9
- /reject-spec @2025-11-29-stripe-integration "UI doesn't match mockup"
10
- /reject-spec @2025-11-29-stripe-integration "TDD not followed"
8
+ /discard-spec @2025-11-29-stripe-integration "reason"
9
+ /discard-spec @2025-11-29-stripe-integration "UI doesn't match mockup"
10
+ /discard-spec @2025-11-29-stripe-integration "TDD not followed"
11
11
  ```
12
12
 
13
13
  ---
@@ -17,7 +17,7 @@ Request changes to the implementation.
17
17
  **If TDD was not followed, this is an automatic rejection reason:**
18
18
 
19
19
  ```
20
- /reject-spec @spec-name "TDD not followed - tests written after code"
20
+ /discard-spec @spec-name "TDD not followed - tests written after code"
21
21
  ```
22
22
 
23
23
  This routes directly back to `/build-spec` with instructions to follow TDD.
@@ -55,7 +55,7 @@ Based on rejection reason:
55
55
  | Test failures | Enforcer + Builders | `/build-spec` |
56
56
  | UI/UX issues | Shaper | `/build-spec` |
57
57
  | API issues | Smith | `/build-spec` |
58
- | Quality issues | Inquisitor | `/validate-spec` |
58
+ | Quality issues | Inquisitor | `/review-spec` |
59
59
  | Security issues | Watcher | IMMEDIATE FIX |
60
60
 
61
61
  ### Phase 3: Update Status
@@ -77,7 +77,7 @@ Update `tasks.md` with action items:
77
77
 
78
78
  ### Standard Rejection
79
79
  ```
80
- Spec rejected - changes requested
80
+ Spec discarded - changes requested
81
81
 
82
82
  Spec: 2025-11-29-stripe-integration
83
83
  Reason: UI doesn't match mockup
@@ -90,12 +90,12 @@ Changes needed:
90
90
  Updated: .catalyst/specs/{slug}/validation.md
91
91
 
92
92
  Next: Fix issues and run /build-spec @2025-11-29-stripe-integration
93
- Then /validate-spec @2025-11-29-stripe-integration
93
+ Then /review-spec @2025-11-29-stripe-integration
94
94
  ```
95
95
 
96
96
  ### TDD Violation Rejection
97
97
  ```
98
- Spec rejected - TDD VIOLATION
98
+ Spec discarded - TDD VIOLATION
99
99
 
100
100
  Spec: 2025-11-29-stripe-integration
101
101
  Reason: TDD not followed - tests written after code
@@ -9,6 +9,16 @@ Continue building a spec with new improvements discovered during development.
9
9
  /iterate-spec @2025-11-29-stripe-integration "handle edge case where user cancels mid-checkout"
10
10
  ```
11
11
 
12
+ ## Pre-computed Context
13
+
14
+ ```bash
15
+ # Current state for iteration
16
+ echo "=== BRANCH ===" && git branch --show-current
17
+ echo "=== STATUS ===" && git status --short
18
+ echo "=== TASKS.MD ===" && cat .catalyst/specs/*$ARGUMENTS*/tasks.md 2>/dev/null | head -80 || echo "No tasks.md for: $ARGUMENTS"
19
+ echo "=== SPEC FRONTMATTER ===" && head -30 .catalyst/specs/*$ARGUMENTS*/spec.md 2>/dev/null || echo "No spec.md"
20
+ ```
21
+
12
22
  ---
13
23
 
14
24
  **Invoke skill:** `spec-iteration`