catalyst-os 0.1.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/.catalyst/main/project-config.yaml +11 -0
- package/.catalyst/spec-structure.yaml +241 -0
- package/.catalyst/specs/spec-config.yaml +109 -0
- package/.catalyst/standards/coding.md +187 -0
- package/.catalyst/standards/git-workflow.md +181 -0
- package/.catalyst/standards/testing.md +185 -0
- package/.catalyst/workflows/approve-spec.md +413 -0
- package/.catalyst/workflows/build-spec.md +527 -0
- package/.catalyst/workflows/build-task.md +434 -0
- package/.catalyst/workflows/catalyze-project.md +212 -0
- package/.catalyst/workflows/catalyze-spec.md +265 -0
- package/.catalyst/workflows/validate-spec.md +388 -0
- package/.claude/agents/alchemist.md +84 -0
- package/.claude/agents/arbiter.md +142 -0
- package/.claude/agents/catalyst.md +102 -0
- package/.claude/agents/enforcer.md +62 -0
- package/.claude/agents/forge-master.md +318 -0
- package/.claude/agents/forger.md +216 -0
- package/.claude/agents/inquisitor.md +70 -0
- package/.claude/agents/necromancer.md +84 -0
- package/.claude/agents/oracle.md +67 -0
- package/.claude/agents/scout.md +74 -0
- package/.claude/agents/scribe.md +163 -0
- package/.claude/agents/seer.md +108 -0
- package/.claude/agents/sentinel.md +58 -0
- package/.claude/agents/shaper.md +85 -0
- package/.claude/agents/smith.md +85 -0
- package/.claude/agents/surveyor.md +52 -0
- package/.claude/agents/watcher.md +69 -0
- package/.claude/commands/approve-spec.md +383 -0
- package/.claude/commands/build-spec.md +381 -0
- package/.claude/commands/build-task.md +210 -0
- package/.claude/commands/catalyze-project.md +112 -0
- package/.claude/commands/catalyze-spec.md +197 -0
- package/.claude/commands/mission.md +48 -0
- package/.claude/commands/reject-spec.md +125 -0
- package/.claude/commands/roadmap.md +62 -0
- package/.claude/commands/status-spec.md +289 -0
- package/.claude/commands/tech-stack.md +75 -0
- package/.claude/commands/update-spec.md +265 -0
- package/.claude/commands/validate-spec.md +265 -0
- package/.claude/settings.local.json +13 -0
- package/.claude/skills/catalysts/build-orchestration/SKILL.md +54 -0
- package/.claude/skills/catalysts/spec-orchestration/SKILL.md +52 -0
- package/.claude/skills/catalysts/validation-orchestration/SKILL.md +50 -0
- package/.claude/skills/guardians/browser-automation/SKILL.md +58 -0
- package/.claude/skills/guardians/code-review/SKILL.md +60 -0
- package/.claude/skills/guardians/dependency-audit/SKILL.md +63 -0
- package/.claude/skills/guardians/e2e-test-execution/SKILL.md +52 -0
- package/.claude/skills/guardians/lint-checking/SKILL.md +46 -0
- package/.claude/skills/guardians/secret-scanning/SKILL.md +69 -0
- package/.claude/skills/guardians/test-fixture-creation/SKILL.md +54 -0
- package/.claude/skills/guardians/unit-test-writing/SKILL.md +57 -0
- package/.claude/skills/seekers/codebase-analysis/SKILL.md +67 -0
- package/.claude/skills/seekers/context7-lookup/SKILL.md +59 -0
- package/.claude/skills/seekers/documentation-management/SKILL.md +190 -0
- package/.claude/skills/seekers/figma-analysis/SKILL.md +57 -0
- package/.claude/skills/seekers/github-research/SKILL.md +57 -0
- package/.claude/skills/seekers/reddit-research/SKILL.md +55 -0
- package/.claude/skills/seekers/requirement-elicitation/SKILL.md +53 -0
- package/.claude/skills/seekers/ui-pattern-hunting/SKILL.md +62 -0
- package/.claude/skills/seekers/web-research/SKILL.md +61 -0
- package/.claude/skills/technologists/ai-integration/SKILL.md +53 -0
- package/.claude/skills/technologists/api-development/SKILL.md +51 -0
- package/.claude/skills/technologists/migration-creation/SKILL.md +58 -0
- package/.claude/skills/technologists/ml-pipeline/SKILL.md +54 -0
- package/.claude/skills/technologists/react-development/SKILL.md +61 -0
- package/.claude/skills/technologists/schema-design/SKILL.md +54 -0
- package/.claude/skills/technologists/service-implementation/SKILL.md +49 -0
- package/.claude/skills/technologists/task-breakdown/SKILL.md +60 -0
- package/.claude/skills/technologists/ui-component-building/SKILL.md +58 -0
- package/.claude-plugin/plugin.json +43 -0
- package/README.md +440 -0
- package/bin/install.js +174 -0
- package/package.json +40 -0
|
@@ -0,0 +1,381 @@
|
|
|
1
|
+
# /build-spec
|
|
2
|
+
|
|
3
|
+
Implement a specification using **strict TDD**.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
/build-spec @2025-11-29-stripe-integration
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Prerequisites
|
|
12
|
+
|
|
13
|
+
- Spec must exist in `.catalyst/specs/`
|
|
14
|
+
- `spec.md` must be complete
|
|
15
|
+
- No unresolved "Open Questions"
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## TDD IS MANDATORY - NO EXCEPTIONS
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
IMPLEMENTATION WITHOUT TESTS IS FORBIDDEN
|
|
23
|
+
|
|
24
|
+
The build MUST follow this exact sequence:
|
|
25
|
+
|
|
26
|
+
1. Forger -> Create tasks.md
|
|
27
|
+
2. Enforcer -> Write ALL tests (must FAIL) <- GATE 1
|
|
28
|
+
3. Verify -> Run tests, confirm RED <- GATE 2
|
|
29
|
+
4. Builders -> Implement until GREEN <- Only after
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## ORCHESTRATION MODE
|
|
35
|
+
|
|
36
|
+
**IMPORTANT**: This command operates in orchestration mode. The main agent DELEGATES work to specialized sub-agents.
|
|
37
|
+
|
|
38
|
+
### Output Location
|
|
39
|
+
|
|
40
|
+
All outputs go to the spec folder. See AGENTS.md "Documentation Output Policy".
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
.catalyst/specs/YYYY-MM-DD-{slug}/
|
|
44
|
+
├── spec.md # Already exists from /catalyze-spec
|
|
45
|
+
├── research.md # Already exists from /catalyze-spec
|
|
46
|
+
├── tasks.md # Forger creates (this phase)
|
|
47
|
+
├── validation.md # Arbiter creates (in /validate-spec)
|
|
48
|
+
├── handoff.md # Arbiter creates (on completion)
|
|
49
|
+
└── assets/
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Execution Order (DAG-Based Parallel Execution)
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
Phase 1: Forger (task breakdown -> tasks.md with Build DAG)
|
|
56
|
+
|
|
|
57
|
+
Phase 2: Enforcer (write ALL failing tests)
|
|
58
|
+
|
|
|
59
|
+
GATE 1: RED PHASE - All tests must FAIL
|
|
60
|
+
|
|
|
61
|
+
Phase 3: Foundation (Alchemist - sequential)
|
|
62
|
+
|
|
|
63
|
+
GATE 2: Foundation tests pass
|
|
64
|
+
|
|
|
65
|
+
Phase 4: Contracts (Smith - shared types, sequential)
|
|
66
|
+
|
|
|
67
|
+
GATE 3: Type-check passes
|
|
68
|
+
|
|
|
69
|
+
Phase 5: Parallel Implementation (Smith × N + Shaper × M)
|
|
70
|
+
[smith-1, smith-2, shaper-1, shaper-2, ...] <- scope-isolated
|
|
71
|
+
|
|
|
72
|
+
GATE 4: GREEN PHASE - All tests must PASS
|
|
73
|
+
|
|
|
74
|
+
Phase 6: Integration (Enforcer - cross-boundary tests)
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### PARALLEL EXECUTION RULES
|
|
78
|
+
|
|
79
|
+
| Phase | Agents | Parallel? |
|
|
80
|
+
|-------|--------|-----------|
|
|
81
|
+
| Task Breakdown | Forger | No (creates DAG first) |
|
|
82
|
+
| Test Writing | Enforcer | No (must complete before impl) |
|
|
83
|
+
| Foundation | Alchemist | No (DB schema first) |
|
|
84
|
+
| Contracts | Smith (single) | No (shared types before parallel) |
|
|
85
|
+
| Implementation | Smith × N + Shaper × M | **Yes - multiple instances** |
|
|
86
|
+
| Integration | Enforcer | No (after all parallel complete) |
|
|
87
|
+
|
|
88
|
+
**Multi-Instance Rules:**
|
|
89
|
+
- Each parallel agent has **exclusive scope** (files it can write)
|
|
90
|
+
- Each parallel agent has **read-only access** to shared types
|
|
91
|
+
- Scopes MUST NOT overlap between parallel agents
|
|
92
|
+
- Forge-Master spawns all ready agents in ONE message
|
|
93
|
+
|
|
94
|
+
**WRONG:**
|
|
95
|
+
```
|
|
96
|
+
forger -> [enforcer + smith + shaper] <- Tests parallel with code = NO TDD!
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
**CORRECT:**
|
|
100
|
+
```
|
|
101
|
+
forger -> enforcer -> GATE -> alchemist -> contracts -> [smith-1 + smith-2 + shaper-1 + shaper-2]
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## Workflow
|
|
107
|
+
|
|
108
|
+
The **Forge-Master** agent orchestrates the Technologists.
|
|
109
|
+
|
|
110
|
+
### Phase 1: Task Breakdown (Forger)
|
|
111
|
+
|
|
112
|
+
**Spawn Forger agent**:
|
|
113
|
+
|
|
114
|
+
```
|
|
115
|
+
"Break down spec.md into implementable tasks with Build DAG. Write to:
|
|
116
|
+
.catalyst/specs/{slug}/tasks.md
|
|
117
|
+
|
|
118
|
+
Include: phases, scope boundaries, dependencies, parallel opportunities."
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Forger creates `tasks.md` with **Build DAG**:
|
|
122
|
+
|
|
123
|
+
```markdown
|
|
124
|
+
# Tasks: {Feature Name}
|
|
125
|
+
|
|
126
|
+
## Build DAG
|
|
127
|
+
|
|
128
|
+
### Phase 1: Foundation (Sequential)
|
|
129
|
+
| ID | Agent | Scope | Blocks | Est |
|
|
130
|
+
|----|-------|-------|--------|-----|
|
|
131
|
+
| db-schema | alchemist | prisma/*, src/db/* | api-*, ui-* | 1h |
|
|
132
|
+
|
|
133
|
+
### Phase 2: Contracts (Sequential)
|
|
134
|
+
| ID | Agent | Scope | Depends On | Blocks | Est |
|
|
135
|
+
|----|-------|-------|------------|--------|-----|
|
|
136
|
+
| api-types | smith | src/types/api.ts | db-schema | api-*, ui-* | 30m |
|
|
137
|
+
|
|
138
|
+
### Phase 3: Parallel Backend (smith × 2)
|
|
139
|
+
| ID | Agent | Scope | Reads | Depends On | Est |
|
|
140
|
+
|----|-------|-------|-------|------------|-----|
|
|
141
|
+
| api-auth | smith-1 | src/api/auth/** | src/types/** | api-types | 1.5h |
|
|
142
|
+
| api-billing | smith-2 | src/api/billing/** | src/types/** | api-types | 1.5h |
|
|
143
|
+
|
|
144
|
+
### Phase 4: Parallel Frontend (shaper × 2)
|
|
145
|
+
| ID | Agent | Scope | Reads | Depends On | Est |
|
|
146
|
+
|----|-------|-------|-------|------------|-----|
|
|
147
|
+
| ui-pricing | shaper-1 | src/pages/pricing/** | src/types/** | api-billing | 1h |
|
|
148
|
+
| ui-dashboard | shaper-2 | src/pages/dashboard/** | src/types/** | api-types | 1.5h |
|
|
149
|
+
|
|
150
|
+
### Phase 5: Integration (Sequential)
|
|
151
|
+
| ID | Agent | Scope | Depends On | Est |
|
|
152
|
+
|----|-------|-------|------------|-----|
|
|
153
|
+
| integration | enforcer | tests/integration/** | api-*, ui-* | 1h |
|
|
154
|
+
|
|
155
|
+
## Progress
|
|
156
|
+
| ID | Status | Agent | Tests | Notes |
|
|
157
|
+
|----|--------|-------|-------|-------|
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
### Phase 2: Write Tests First (Enforcer) - RED PHASE
|
|
163
|
+
|
|
164
|
+
**CRITICAL: This phase MUST complete before ANY implementation starts.**
|
|
165
|
+
|
|
166
|
+
**Spawn Enforcer agent**:
|
|
167
|
+
|
|
168
|
+
```
|
|
169
|
+
"Write failing tests for ALL tasks in tasks.md.
|
|
170
|
+
Tests go in project test folders (src/__tests__/, tests/, etc.).
|
|
171
|
+
Update tasks.md Progress section with test file locations."
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
Enforcer will:
|
|
175
|
+
1. For EVERY task, write failing tests in project test folders
|
|
176
|
+
2. Update `tasks.md` Progress section with test locations
|
|
177
|
+
3. Run tests to confirm all FAIL
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
### GATE 1: Red Phase Verification
|
|
182
|
+
|
|
183
|
+
**STOP! Before proceeding to implementation:**
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
# Run all tests - they MUST fail
|
|
187
|
+
npm test # or appropriate test command
|
|
188
|
+
|
|
189
|
+
# Expected output:
|
|
190
|
+
# Tests: 0 passed, 45 failed
|
|
191
|
+
# Status: RED
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
**Gate Checklist:**
|
|
195
|
+
- [ ] Every task has at least one test
|
|
196
|
+
- [ ] All tests have been executed
|
|
197
|
+
- [ ] All tests FAIL (none pass)
|
|
198
|
+
|
|
199
|
+
**If ANY test passes -> STOP and investigate**
|
|
200
|
+
|
|
201
|
+
---
|
|
202
|
+
|
|
203
|
+
### Phase 3-4: Foundation & Contracts (Sequential)
|
|
204
|
+
|
|
205
|
+
**Only start this phase AFTER Gate 1 (Red Phase) passes!**
|
|
206
|
+
|
|
207
|
+
**Spawn Alchemist** (foundation):
|
|
208
|
+
|
|
209
|
+
```
|
|
210
|
+
"Implement db-schema task.
|
|
211
|
+
SCOPE (write): prisma/*, src/db/*
|
|
212
|
+
Run tests after to verify progress."
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
**Spawn Smith** (contracts - after foundation completes):
|
|
216
|
+
|
|
217
|
+
```
|
|
218
|
+
"Implement api-types task.
|
|
219
|
+
SCOPE (write): src/types/api.ts
|
|
220
|
+
Defines shared types for all parallel agents."
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
---
|
|
224
|
+
|
|
225
|
+
### Phase 5: Parallel Implementation (DAG-Driven)
|
|
226
|
+
|
|
227
|
+
**Only start AFTER contracts phase completes!**
|
|
228
|
+
|
|
229
|
+
**Spawn ALL ready agents in ONE message with scope boundaries:**
|
|
230
|
+
|
|
231
|
+
```
|
|
232
|
+
Smith-1: "Implement api-auth task.
|
|
233
|
+
SCOPE (write): src/api/auth/**, tests/api/auth/**
|
|
234
|
+
READS (no modify): src/types/**
|
|
235
|
+
Run tests after each change."
|
|
236
|
+
|
|
237
|
+
Smith-2: "Implement api-billing task.
|
|
238
|
+
SCOPE (write): src/api/billing/**, tests/api/billing/**
|
|
239
|
+
READS (no modify): src/types/**
|
|
240
|
+
Run tests after each change."
|
|
241
|
+
|
|
242
|
+
Shaper-1: "Implement ui-pricing task.
|
|
243
|
+
SCOPE (write): src/pages/pricing/**, src/components/pricing/**
|
|
244
|
+
READS (no modify): src/types/**, src/components/shared/**
|
|
245
|
+
Run tests after each change."
|
|
246
|
+
|
|
247
|
+
Shaper-2: "Implement ui-dashboard task.
|
|
248
|
+
SCOPE (write): src/pages/dashboard/**, src/components/dashboard/**
|
|
249
|
+
READS (no modify): src/types/**, src/components/shared/**
|
|
250
|
+
Run tests after each change."
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
**CRITICAL**: Include scope in every agent prompt. Agents must NOT modify files outside their scope.
|
|
254
|
+
|
|
255
|
+
Each builder updates `tasks.md` Progress section as they complete tasks.
|
|
256
|
+
|
|
257
|
+
---
|
|
258
|
+
|
|
259
|
+
### Phase 6: Integration (Sequential)
|
|
260
|
+
|
|
261
|
+
**Only start AFTER all parallel tasks complete!**
|
|
262
|
+
|
|
263
|
+
**Spawn Enforcer**:
|
|
264
|
+
|
|
265
|
+
```
|
|
266
|
+
"Run integration tests for cross-boundary functionality.
|
|
267
|
+
SCOPE: tests/integration/**
|
|
268
|
+
Verify all components work together."
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
---
|
|
272
|
+
|
|
273
|
+
### Implementation Rules
|
|
274
|
+
|
|
275
|
+
```
|
|
276
|
+
FOR EACH TASK:
|
|
277
|
+
|
|
278
|
+
1. Verify test exists and FAILS
|
|
279
|
+
2. Write MINIMAL code to make test pass
|
|
280
|
+
3. Run test -> must PASS
|
|
281
|
+
4. Refactor if needed
|
|
282
|
+
5. Run test -> must still PASS
|
|
283
|
+
6. Update tasks.md Progress
|
|
284
|
+
|
|
285
|
+
NEVER write code without a failing test first
|
|
286
|
+
NEVER write more code than needed to pass the test
|
|
287
|
+
NEVER modify files outside your SCOPE
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
---
|
|
291
|
+
|
|
292
|
+
### GATE 2: Green Phase Verification
|
|
293
|
+
|
|
294
|
+
**Before completing build:**
|
|
295
|
+
|
|
296
|
+
```bash
|
|
297
|
+
# Run all tests - they MUST pass
|
|
298
|
+
npm test
|
|
299
|
+
|
|
300
|
+
# Expected output:
|
|
301
|
+
# Tests: 45 passed, 0 failed
|
|
302
|
+
# Status: GREEN
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
---
|
|
306
|
+
|
|
307
|
+
## Output
|
|
308
|
+
|
|
309
|
+
```
|
|
310
|
+
Build complete!
|
|
311
|
+
|
|
312
|
+
Spec: 2025-11-29-stripe-integration
|
|
313
|
+
|
|
314
|
+
TDD Compliance: VERIFIED
|
|
315
|
+
- Red Phase: 45 tests written, all failed
|
|
316
|
+
- Green Phase: 45 tests passing
|
|
317
|
+
|
|
318
|
+
DAG Execution:
|
|
319
|
+
- Foundation: 1 task (alchemist)
|
|
320
|
+
- Contracts: 1 task (smith)
|
|
321
|
+
- Parallel: 4 tasks (smith-1, smith-2, shaper-1, shaper-2)
|
|
322
|
+
- Integration: 1 task (enforcer)
|
|
323
|
+
|
|
324
|
+
Tasks: 7/7 completed
|
|
325
|
+
Tests: 45 passing, 0 failing
|
|
326
|
+
Scope Violations: 0
|
|
327
|
+
|
|
328
|
+
Updated: .catalyst/specs/2025-11-29-stripe-integration/tasks.md
|
|
329
|
+
|
|
330
|
+
Next: Run /validate-spec @2025-11-29-stripe-integration
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
---
|
|
334
|
+
|
|
335
|
+
## Failure Modes
|
|
336
|
+
|
|
337
|
+
### If Gate 1 Fails (tests pass before implementation)
|
|
338
|
+
|
|
339
|
+
```
|
|
340
|
+
PROBLEM: Some tests pass before code exists
|
|
341
|
+
ACTION: Stop and fix tests - they're testing wrong things
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
### If Implementation Starts Without Tests
|
|
345
|
+
|
|
346
|
+
```
|
|
347
|
+
PROBLEM: Builder agent started without tests
|
|
348
|
+
ACTION: STOP immediately
|
|
349
|
+
Delete any code written
|
|
350
|
+
Return to Phase 2
|
|
351
|
+
Write tests first
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
### If Scope Violation Detected
|
|
355
|
+
|
|
356
|
+
```
|
|
357
|
+
PROBLEM: Agent modified files outside its scope
|
|
358
|
+
ACTION: STOP that agent
|
|
359
|
+
Revert out-of-scope changes (git checkout)
|
|
360
|
+
Re-run task with stricter prompt
|
|
361
|
+
Report violation to user
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
### If Parallel Agents Conflict
|
|
365
|
+
|
|
366
|
+
```
|
|
367
|
+
PROBLEM: Two agents wrote to same file
|
|
368
|
+
ACTION: STOP build immediately
|
|
369
|
+
Revert conflicting changes
|
|
370
|
+
Return to Forger
|
|
371
|
+
Re-structure DAG with non-overlapping scopes
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
### If Dependency Deadlock
|
|
375
|
+
|
|
376
|
+
```
|
|
377
|
+
PROBLEM: Circular dependency detected in DAG
|
|
378
|
+
ACTION: STOP all execution
|
|
379
|
+
Report to user
|
|
380
|
+
Request Forger to restructure DAG
|
|
381
|
+
```
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
# /build-task
|
|
2
|
+
|
|
3
|
+
Execute a focused task on an existing codebase. Works with or without prior specs (brownfield compatible).
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
/build-task "change session timeout to 30 days"
|
|
9
|
+
/build-task @2026-01-11-supabase-auth "change session timeout"
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## When to Use
|
|
15
|
+
|
|
16
|
+
| Use `/build-task` | Use `/catalyze-spec` |
|
|
17
|
+
|-------------------|----------------------|
|
|
18
|
+
| Modify existing feature | New feature from scratch |
|
|
19
|
+
| Stakeholder change request | Major addition |
|
|
20
|
+
| Mid-level refactoring | Architectural change |
|
|
21
|
+
| Post-completion modifications | Needs research phase |
|
|
22
|
+
| Brownfield projects (no specs) | Greenfield projects |
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## ORCHESTRATION MODE
|
|
27
|
+
|
|
28
|
+
**IMPORTANT**: This command operates in orchestration mode. The main agent DELEGATES work to specialized sub-agents.
|
|
29
|
+
|
|
30
|
+
### Output Location
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
.catalyst/tasks/YYYY-MM-DD-{slug}.md
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Tasks are **independent entities**. They can optionally reference specs but don't require them.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Workflow
|
|
41
|
+
|
|
42
|
+
### Phase 0: Context Gathering
|
|
43
|
+
|
|
44
|
+
1. **Check for @spec reference:**
|
|
45
|
+
- If provided → Read spec for context
|
|
46
|
+
- If not provided → Analyze codebase directly
|
|
47
|
+
|
|
48
|
+
2. **Auto-detect related specs (optional):**
|
|
49
|
+
- Search `.catalyst/specs/` for keyword matches
|
|
50
|
+
- If found → Add as reference in task file
|
|
51
|
+
- If not found → Continue without
|
|
52
|
+
|
|
53
|
+
3. **Create task file:**
|
|
54
|
+
```
|
|
55
|
+
.catalyst/tasks/YYYY-MM-DD-{slug}.md
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Phase 1: Test Assessment (Enforcer)
|
|
59
|
+
|
|
60
|
+
**CRITICAL: Assess before assuming TDD is needed.**
|
|
61
|
+
|
|
62
|
+
Spawn **Enforcer** agent to analyze:
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
"Analyze test coverage for [task description].
|
|
66
|
+
Determine test strategy: COVERED, MODIFY, or NEW.
|
|
67
|
+
Output assessment to task file."
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
| Strategy | Condition | Action |
|
|
71
|
+
|----------|-----------|--------|
|
|
72
|
+
| **COVERED** | Existing tests fully cover this change | Skip to Phase 3 |
|
|
73
|
+
| **MODIFY** | Tests exist but assertions need updating | Update tests first |
|
|
74
|
+
| **NEW** | No tests cover this area | Write new tests first |
|
|
75
|
+
|
|
76
|
+
### Phase 2: Tests (if MODIFY or NEW)
|
|
77
|
+
|
|
78
|
+
If assessment is MODIFY or NEW:
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
Enforcer: "Write/update tests for [task].
|
|
82
|
+
Tests must FAIL before implementation (TDD)."
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
If assessment is COVERED:
|
|
86
|
+
- Skip to Phase 3
|
|
87
|
+
|
|
88
|
+
### Phase 3: Implementation
|
|
89
|
+
|
|
90
|
+
Spawn appropriate builder based on task scope:
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
Smith: "Implement [backend changes]. Run tests after."
|
|
94
|
+
Shaper: "Implement [frontend changes]. Run tests after."
|
|
95
|
+
Alchemist: "Implement [database changes]. Run tests after."
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Phase 4: Verify & Commit
|
|
99
|
+
|
|
100
|
+
1. **Run tests** - All must pass
|
|
101
|
+
2. **Run lint** - No errors
|
|
102
|
+
3. **Update task file** - Mark COMPLETE, add commit hash
|
|
103
|
+
4. **Commit** with structured message:
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
task({scope}): {description}
|
|
107
|
+
|
|
108
|
+
Task: YYYY-MM-DD-{slug}
|
|
109
|
+
Related: @spec-name (if any)
|
|
110
|
+
|
|
111
|
+
Changes:
|
|
112
|
+
- {change 1}
|
|
113
|
+
- {change 2}
|
|
114
|
+
|
|
115
|
+
Tests: {X} passing
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## Task File Format
|
|
121
|
+
|
|
122
|
+
```markdown
|
|
123
|
+
# Task: {Title}
|
|
124
|
+
|
|
125
|
+
> Status: IN_PROGRESS | COMPLETE
|
|
126
|
+
> Created: YYYY-MM-DD
|
|
127
|
+
> Requested by: {Who asked for this}
|
|
128
|
+
> Related Spec: @spec-name (optional, if found)
|
|
129
|
+
|
|
130
|
+
## Description
|
|
131
|
+
{Brief description of what needs to change and why}
|
|
132
|
+
|
|
133
|
+
## Test Assessment
|
|
134
|
+
| Strategy | Reason |
|
|
135
|
+
|----------|--------|
|
|
136
|
+
| COVERED / MODIFY / NEW | {Explanation} |
|
|
137
|
+
|
|
138
|
+
### Affected Tests (if MODIFY/NEW)
|
|
139
|
+
- path/to/test.ts → {what changes}
|
|
140
|
+
|
|
141
|
+
## Changes Required
|
|
142
|
+
- [ ] {Task item 1}
|
|
143
|
+
- [ ] {Task item 2}
|
|
144
|
+
|
|
145
|
+
## Files Modified
|
|
146
|
+
- src/path/to/file.ts
|
|
147
|
+
|
|
148
|
+
## Commit
|
|
149
|
+
- Hash: {filled on completion}
|
|
150
|
+
- Branch: task/{slug}
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## Output
|
|
156
|
+
|
|
157
|
+
### Success
|
|
158
|
+
```
|
|
159
|
+
Task complete!
|
|
160
|
+
|
|
161
|
+
Task: 2026-01-25-session-timeout
|
|
162
|
+
Status: COMPLETE
|
|
163
|
+
|
|
164
|
+
Test Assessment: MODIFY
|
|
165
|
+
- Updated 2 test files
|
|
166
|
+
|
|
167
|
+
Changes:
|
|
168
|
+
- src/lib/supabase.ts (session config)
|
|
169
|
+
- tests/auth/session.test.ts (assertions)
|
|
170
|
+
|
|
171
|
+
Tests: 12 passing
|
|
172
|
+
Commit: abc1234
|
|
173
|
+
|
|
174
|
+
[If related spec found:]
|
|
175
|
+
Related: @2026-01-11-supabase-auth
|
|
176
|
+
|
|
177
|
+
Created: .catalyst/tasks/2026-01-25-session-timeout.md
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### Assessment Only (dry run)
|
|
181
|
+
```
|
|
182
|
+
Task assessed!
|
|
183
|
+
|
|
184
|
+
Task: 2026-01-25-session-timeout
|
|
185
|
+
Test Strategy: COVERED
|
|
186
|
+
|
|
187
|
+
Existing tests fully cover this change:
|
|
188
|
+
- tests/auth/session.test.ts (line 45-67)
|
|
189
|
+
|
|
190
|
+
Ready to implement. Run again to proceed.
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## Examples
|
|
196
|
+
|
|
197
|
+
### With Spec Reference
|
|
198
|
+
```
|
|
199
|
+
/build-task @2026-01-11-supabase-auth "increase session timeout to 30 days"
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
### Without Spec (Brownfield)
|
|
203
|
+
```
|
|
204
|
+
/build-task "add loading spinner to dashboard"
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
### Multiple Related Changes
|
|
208
|
+
```
|
|
209
|
+
/build-task "update all API endpoints to use new auth header format"
|
|
210
|
+
```
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# /catalyze-project
|
|
2
|
+
|
|
3
|
+
Initialize the project foundation. Always creates all 6 documents.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
/catalyze-project
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Process
|
|
14
|
+
|
|
15
|
+
### Phase 1: Detection
|
|
16
|
+
|
|
17
|
+
Scan the project to determine if greenfield or brownfield:
|
|
18
|
+
|
|
19
|
+
| Signal | Greenfield | Brownfield |
|
|
20
|
+
|--------|------------|------------|
|
|
21
|
+
| Source files (`src/`, `app/`, `lib/`) | Few or none | Many |
|
|
22
|
+
| Package files | Minimal deps | Established deps |
|
|
23
|
+
| Git history | < 10 commits | > 10 commits |
|
|
24
|
+
| Lines of code | < 500 | > 500 |
|
|
25
|
+
|
|
26
|
+
### Phase 2: Gather Information
|
|
27
|
+
|
|
28
|
+
**If Greenfield** - Heavy questioning via Oracle:
|
|
29
|
+
|
|
30
|
+
1. What problem are you solving?
|
|
31
|
+
2. Who is the primary user?
|
|
32
|
+
3. What's the core value proposition?
|
|
33
|
+
4. What are the must-have features for v1?
|
|
34
|
+
5. What's explicitly out of scope?
|
|
35
|
+
6. Any technical constraints?
|
|
36
|
+
7. Any existing designs or wireframes?
|
|
37
|
+
8. What's the timeline pressure?
|
|
38
|
+
9. Are there similar products to reference?
|
|
39
|
+
|
|
40
|
+
**If Brownfield** - Heavy scanning via 3 parallel Explore agents:
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
Agent 1: Architecture + Tech Stack
|
|
44
|
+
Agent 2: Conventions + Patterns
|
|
45
|
+
Agent 3: Concerns + TODOs
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Then ask only what can't be inferred:
|
|
49
|
+
1. What's the project's mission? (if no README)
|
|
50
|
+
2. What are the current priorities?
|
|
51
|
+
|
|
52
|
+
### Phase 3: Generate All 6 Documents
|
|
53
|
+
|
|
54
|
+
Always create all documents in `.catalyst/main/`:
|
|
55
|
+
|
|
56
|
+
| Document | Greenfield Source | Brownfield Source |
|
|
57
|
+
|----------|-------------------|-------------------|
|
|
58
|
+
| `mission.md` | Questions | README + questions |
|
|
59
|
+
| `roadmap.md` | Questions | TODOs + questions |
|
|
60
|
+
| `tech-stack.md` | Recommended based on requirements | Detected from code |
|
|
61
|
+
| `architecture.md` | Planned architecture | Analyzed from code |
|
|
62
|
+
| `conventions.md` | Best practice standards | Learned from code |
|
|
63
|
+
| `concerns.md` | Empty (fresh start) | Issues found in code |
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Templates
|
|
68
|
+
|
|
69
|
+
Located at `.catalyst/main/temp/`:
|
|
70
|
+
- `temp-mission.md`
|
|
71
|
+
- `temp-roadmap.md`
|
|
72
|
+
- `temp-tech-stack.md`
|
|
73
|
+
- `temp-architecture.md`
|
|
74
|
+
- `temp-conventions.md`
|
|
75
|
+
- `temp-concerns.md`
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## Output
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
.catalyst/main/
|
|
83
|
+
├── mission.md
|
|
84
|
+
├── roadmap.md
|
|
85
|
+
├── tech-stack.md
|
|
86
|
+
├── architecture.md
|
|
87
|
+
├── conventions.md
|
|
88
|
+
└── concerns.md
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
```
|
|
92
|
+
✅ Project initialized!
|
|
93
|
+
|
|
94
|
+
Created 6 documents in .catalyst/main/
|
|
95
|
+
- Architecture: [summary]
|
|
96
|
+
- Conventions: [count] patterns
|
|
97
|
+
- Concerns: [count] issues
|
|
98
|
+
|
|
99
|
+
Next: Run /catalyze-spec "feature description" to shape your first spec.
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## Refresh
|
|
105
|
+
|
|
106
|
+
To refresh analysis docs after major changes:
|
|
107
|
+
|
|
108
|
+
```
|
|
109
|
+
/catalyze-project --refresh
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Re-analyzes codebase and updates architecture, conventions, concerns.
|