catalyst-os 2.0.2 → 3.0.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.
@@ -0,0 +1,112 @@
1
+ # Meet Spec
2
+
3
+ > **When to invoke:** When the user wants to shape a spec by holding a voice meeting.
4
+ > **Invoked by:** `/meet-spec` command.
5
+ > **Orchestrator:** Catalyst agent.
6
+
7
+ ## Purpose
8
+
9
+ Run a local, browser-based voice meeting (ElevenLabs) where the user talks through a
10
+ feature. The meeting agent can investigate the codebase live. When the meeting ends,
11
+ write a structured, `/catalyze-spec`-ready notes artifact.
12
+
13
+ **This skill does NOT produce a spec.** It produces a meeting artifact. The user runs
14
+ `/catalyze-spec @<artifact>` afterwards, when they choose to.
15
+
16
+ ## Output Location
17
+
18
+ ```
19
+ .catalyst/meetings/YYYY-MM-DD-{slug}/
20
+ └── meeting.md # Summary + Decisions + Action Items + Open Questions + Research Findings + Transcript
21
+ ```
22
+
23
+ ## Modes
24
+
25
+ `voice.mode` in `project-config.yaml` picks how the meeting runs:
26
+
27
+ - **diy** (default, free) — the browser does speech (Web Speech API) and the brain is a
28
+ local `claude -p`, which reads the codebase/docs and searches the web natively. No
29
+ ElevenLabs, no API key, no per-minute cost. Needs Chrome and the `claude` CLI on PATH.
30
+ - **bundled** — ElevenLabs Conversational AI. Nicer voice, but billed per minute (BYOK).
31
+ Requires `elevenlabs_api_key` in `.catalyst/secrets.local.yaml`, `voice.agent_id` in
32
+ config, and an agent that has a `investigate_codebase` client tool. See the README.
33
+
34
+ `language` sets the spoken meeting language (e.g. `"tr"`); written artifacts stay English.
35
+
36
+ ## Workflow
37
+
38
+ ### Phase 0: Preflight (stop early if not ready)
39
+
40
+ 1. Read `.catalyst/main/project-config.yaml`. If `voice.enabled` is not `true`, stop and
41
+ tell the user how to enable it. Do not proceed.
42
+ 2. Check `node --version` is >= 18 and `.catalyst/voice/meet-server.js` exists; otherwise
43
+ stop and explain (re-install catalyst-os if the runtime is missing).
44
+ 3. **Bundled mode only:** check `.catalyst/secrets.local.yaml` has a non-empty
45
+ `elevenlabs_api_key` and `voice.agent_id` is set. If missing, stop with setup
46
+ instructions — do NOT print or echo the key. In **diy** mode, skip this check entirely.
47
+
48
+ **On any failure: stop gracefully. Voice is optional; never break the rest of Catalyst.**
49
+
50
+ ### Phase 1: Initialize meeting folder
51
+
52
+ 1. Determine the topic from `$ARGUMENTS`; if empty, ask the user one short question.
53
+ 2. Derive a kebab-case `{slug}` from the topic.
54
+ 3. Create `.catalyst/meetings/YYYY-MM-DD-{slug}/` (today's date).
55
+
56
+ ### Phase 2: Launch the meeting room
57
+
58
+ Start the local daemon in the background and open the browser. The server reads config
59
+ (and, in bundled mode, the key from `secrets.local.yaml`) itself — never pass the key on
60
+ the command line or env.
61
+
62
+ ```bash
63
+ PORT=4399 \
64
+ MEETING_DIR=".catalyst/meetings/YYYY-MM-DD-{slug}" \
65
+ MEETING_TOPIC="{topic}" \
66
+ node .catalyst/voice/meet-server.js &
67
+ ```
68
+
69
+ Run it from the project root (so `claude -p` investigations resolve against this repo).
70
+ Then open `http://localhost:4399` (e.g. `open`, `xdg-open`, or `start`). Tell the user:
71
+ "The meeting room is open. Click **Start meeting**, talk it through, then click **End
72
+ meeting** when you're done."
73
+
74
+ ### Phase 3: Wait for the artifact
75
+
76
+ Poll for `.catalyst/meetings/YYYY-MM-DD-{slug}/meeting.md`. It is written when the user
77
+ clicks **End meeting** (the server folds the transcript + live findings into the artifact
78
+ via a single `claude -p` summarization pass). When it appears, the meeting is over — the
79
+ server shuts itself down.
80
+
81
+ ### Phase 4: Output
82
+
83
+ ```
84
+ Meeting captured.
85
+
86
+ Artifact: .catalyst/meetings/YYYY-MM-DD-{slug}/meeting.md
87
+ ├── Summary
88
+ ├── Decisions
89
+ ├── Action Items
90
+ ├── Open Questions
91
+ ├── Research Findings (live codebase investigations from the meeting)
92
+ └── Transcript
93
+
94
+ Next step — shape it into a spec when you're ready:
95
+ /catalyze-spec @.catalyst/meetings/YYYY-MM-DD-{slug}/meeting.md
96
+ ```
97
+
98
+ **Do NOT auto-run `/catalyze-spec`.** The user references the artifact themselves.
99
+
100
+ ## Notes
101
+
102
+ - **Live codebase access:** in **diy** mode every turn is a headless `claude -p` in this
103
+ repo, so the agent reads the codebase/docs and searches the web natively. In **bundled**
104
+ mode the ElevenLabs agent calls the `investigate_codebase` client tool, which the browser
105
+ relays to the daemon, which runs the same `claude -p`. Either way it loads Catalyst's
106
+ agents and can delegate to Seer/Scout.
107
+ - **Typed messages:** the meeting room has a text box; typed messages are sent as user
108
+ turns (handy when speech is misheard) and appear in the transcript.
109
+ - **Latency:** investigations take seconds; the meeting room shows a "thinking" indicator
110
+ while the agent says it is looking into it. This is expected meeting behavior.
111
+ - **Cost:** billed to the user's ElevenLabs account (~$0.10/min bundled). A 30-min meeting
112
+ is ~$3.
@@ -73,13 +73,20 @@ Update spec.md status to COMPLETE.
73
73
 
74
74
  ### Phase 7: Push & Pull Request
75
75
 
76
+ > **This phase is atomic — do NOT stop or ask for confirmation between push and PR creation.**
77
+ > If validation passed in Phase 1 and the commit succeeded in Phase 5, proceed straight through push → PR without pausing.
78
+ > Only halt if a git/gh command returns an error.
79
+
76
80
  1. Read `git.development_branch` from `.catalyst/main/project-config.yaml` (e.g., `development`, `staging`)
77
81
  2. Push the feature branch: `git push -u origin {branch-name}`
78
- 3. Create a PR targeting the development branch:
82
+ 3. **Immediately** create a PR targeting the development branch — do not wait for user input:
79
83
  ```
80
84
  gh pr create --base {development_branch} --title "feat({scope}): {spec title}" --body "..."
81
85
  ```
82
86
  4. Include spec summary, TDD stats, and file change counts in the PR body
87
+ 5. Capture the returned PR URL for the final output
88
+
89
+ **Do not ask** "should I create a PR?" or "ready to push?" — the user already invoked `/seal-spec`, which is the explicit authorization for the full push + PR flow. Only pause if a command fails or the working tree is in an unexpected state.
83
90
 
84
91
  ### Phase 8: Self-Documentation
85
92
 
@@ -0,0 +1,139 @@
1
+ # Spec Challenge
2
+
3
+ > **When to invoke:** When stress-testing a freshly shaped spec — interviewing the user across every branch of the design tree until shared understanding is reached.
4
+ > **Invoked by:** `/challenge-spec` command.
5
+ > **Position:** Optional intermediate step between `/catalyze-spec` and `/forge-spec`.
6
+
7
+ ## Purpose
8
+
9
+ Shaping produces a spec. Challenge proves the spec is forge-ready. The orchestrator interviews the user one question at a time about every unresolved branch — assumptions, edge cases, integration points, scope ambiguity — patching `spec.md` and logging the trail to `handoff.md` as each answer lands.
10
+
11
+ This is not a sign-off step. It is an interrogation step. The bar is "every branch of the design tree resolved", not "user said yes".
12
+
13
+ ## Skills Referenced
14
+
15
+ - `brainstorming` — same form (one question at a time, recommend an answer, acknowledge before moving on). The 9-question cap **does not apply** here; challenge is exhaustive by design.
16
+ - `agent-delegation` — if a question becomes a research task, spawn Seer/Scout rather than guessing.
17
+
18
+ ## When NOT to Use
19
+
20
+ - Spec is trivial (rename, copy change, single-file fix) — go straight to `/forge-spec`.
21
+ - Spec is still in DRAFT and missing whole sections — finish `/catalyze-spec` first.
22
+ - Implementation has already started (`tasks.md` exists with completed tasks) — use `/update-spec` instead.
23
+ - Spec is COMPLETE — challenge is meaningless after the fact.
24
+
25
+ ## Prerequisites
26
+
27
+ - Target spec folder exists at `.catalyst/specs/{slug}/`.
28
+ - `spec.md` exists with at minimum: Overview, Requirements, Acceptance Criteria, Technical Approach.
29
+ - `handoff.md` exists (create if missing — Catalyst should have left one).
30
+
31
+ If any prerequisite is missing, STOP and tell the user to run or finish `/catalyze-spec` first.
32
+
33
+ ## Workflow
34
+
35
+ ### Phase 1: Inventory the Decision Tree
36
+
37
+ Read in order: `spec.md`, `research.md`, `handoff.md`, plus any assets.
38
+
39
+ Build a working list (kept in your head or a scratch section in `handoff.md`) of every branch that needs resolution. Look for:
40
+
41
+ | Source | What to extract |
42
+ |--------|-----------------|
43
+ | `spec.md` → Open Questions | Each one is an explicit branch. |
44
+ | `spec.md` → Requirements | Vague verbs ("handle", "support", "manage") hide branches. |
45
+ | `spec.md` → Acceptance Criteria | Missing thresholds, missing failure modes. |
46
+ | `spec.md` → Out of Scope | Anything that *could* be in scope but isn't justified. |
47
+ | `spec.md` → Technical Approach | Library/framework choices without a stated reason. |
48
+ | `research.md` | Findings the spec didn't actually use. |
49
+ | `handoff.md` | Prior decisions that may now be in tension. |
50
+
51
+ Surface anything that, if guessed wrong, would cause `/forge-spec` to backtrack.
52
+
53
+ ### Phase 2: Codebase First, User Second
54
+
55
+ > **Rule from grill-me:** "If a question can be answered by exploring the codebase, explore the codebase instead."
56
+
57
+ Before asking the user anything, walk the list and ask: can I answer this myself? Use `Read`, `grep`, or spawn **Seer** for deeper analysis. Only the residue — genuine product/scope/intent decisions — goes to the user.
58
+
59
+ ### Phase 3: The Interview
60
+
61
+ For each remaining branch, ask **one question at a time** following these rules:
62
+
63
+ 1. **Lead with your recommendation.** "I'd recommend X because Y. Agree, or push back?"
64
+ 2. **Multiple choice when options exist.** Numbered. Each option has a one-line tradeoff.
65
+ 3. **Acknowledge the answer.** One sentence. Connect it to the next question.
66
+ 4. **Walk depth-first.** If an answer opens a new branch, resolve that branch before returning to the trunk.
67
+ 5. **Resolve dependencies in order.** Don't ask about caching strategy before storage backend is chosen.
68
+ 6. **No artificial cap.** Keep going until every branch is resolved. Stop only when:
69
+ - The user says "good enough" / "ship it" / "stop".
70
+ - You can no longer surface a branch that would cause `/forge-spec` to backtrack.
71
+
72
+ ### Phase 4: Patch As You Go
73
+
74
+ After **each** resolved question, update the spec immediately. Do not batch.
75
+
76
+ **`spec.md` patches** — find the right home for the answer:
77
+
78
+ | Answer type | Goes in |
79
+ |-------------|---------|
80
+ | Removes an unknown | Delete from Open Questions |
81
+ | Adds a verifiable behavior | Append to Acceptance Criteria |
82
+ | Tightens scope | Add to Requirements or Out of Scope |
83
+ | Picks a library/pattern | Update Technical Approach |
84
+ | Reframes the problem | Update Overview / User Stories |
85
+
86
+ **`handoff.md` log** — append every Q&A under a `## Challenge Log` section:
87
+
88
+ ```markdown
89
+ ## Challenge Log
90
+
91
+ ### {YYYY-MM-DD HH:MM} — {short topic}
92
+ **Q:** {the question, including the recommendation you led with}
93
+ **A:** {user's answer, verbatim or close to it}
94
+ **Spec impact:** {which section of spec.md was patched and how}
95
+ ```
96
+
97
+ The log is the audit trail. Future-you (or anyone running `/primer-spec`) can read it and understand *why* the spec looks the way it does.
98
+
99
+ ### Phase 5: Close Out
100
+
101
+ When the interview ends:
102
+
103
+ 1. Re-read `spec.md` end-to-end. Check that patches are coherent and don't contradict each other.
104
+ 2. Confirm Open Questions is empty (or every remaining item is explicitly deferred with a note).
105
+ 3. Append a closing entry to `handoff.md`:
106
+ ```markdown
107
+ ### Challenge complete — {YYYY-MM-DD HH:MM}
108
+ Branches resolved: {N}
109
+ Spec sections updated: {list}
110
+ Deferred (not blocking forge): {list or "none"}
111
+ ```
112
+ 4. Leave `spec.md` Status as `DRAFT` — challenge does not mark the spec ready for production. `/forge-spec` is still next.
113
+
114
+ ## Output
115
+
116
+ ```
117
+ Spec challenged.
118
+
119
+ Branches resolved: {N}
120
+ spec.md sections updated: {list}
121
+ handoff.md: +Challenge Log ({N} entries)
122
+ Deferred: {list or "none"}
123
+
124
+ Next steps:
125
+ - /forge-spec @{slug} to start TDD build
126
+ - /update-spec @{slug} "..." if you want further structural changes first
127
+ ```
128
+
129
+ ## Anti-Patterns
130
+
131
+ | Anti-Pattern | Fix |
132
+ |--------------|-----|
133
+ | Asking the user something `grep` would answer | Phase 2 first — codebase before user. |
134
+ | Batching 4 questions because "they're related" | One at a time. Always. Related questions go in sequence, not in a list. |
135
+ | Asking without a recommendation | Lead with your pick + why. The user's job is to push back, not to design from scratch. |
136
+ | Logging answers in batch at the end | Patch `spec.md` and append to `handoff.md` after each answer — context is freshest then. |
137
+ | Stopping at 9 questions because brainstorming says so | Brainstorming caps apply to scoping. Challenge is exhaustive — keep going until branches are resolved. |
138
+ | Treating user's "looks fine" as resolution | If you have a branch in mind, ask it. "Looks fine" without a specific answer is not a resolution. |
139
+ | Marking spec READY / APPROVED at the end | Status stays DRAFT. `/forge-spec` is next. Challenge is not approval. |
@@ -174,7 +174,8 @@ REMINDER: /forge-spec follows strict TDD
174
174
  4. Tests must PASS (green phase)
175
175
 
176
176
  Next steps:
177
+ - /challenge-spec @YYYY-MM-DD-{slug} (optional) to interrogate every branch before tests are written
177
178
  - /forge-spec @YYYY-MM-DD-{slug} to start TDD build
178
179
  ```
179
180
 
180
- **IMPORTANT: Do NOT suggest `/seal-spec` after spec shaping.** `/seal-spec` is only for committing a fully built and validated implementation — it is the FINAL step, not a plan-approval step. The correct flow is: `/catalyze-spec` → `/forge-spec` → `/audit-spec` → `/seal-spec`.
181
+ **IMPORTANT: Do NOT suggest `/seal-spec` after spec shaping.** `/seal-spec` is only for committing a fully built and validated implementation — it is the FINAL step, not a plan-approval step. The correct flow is: `/catalyze-spec` → *(optional)* `/challenge-spec` → `/forge-spec` → `/audit-spec` → `/seal-spec`.
@@ -56,7 +56,7 @@ If TDD was skipped → REJECT and return to /forge-spec
56
56
  TDD Check (sequential, must pass first)
57
57
  |
58
58
  v
59
- [Enforcer + Sentinel + Inquisitor + Watcher] (all parallel)
59
+ [Enforcer + Sentinel + Inquisitor + Watcher + Curator] (all parallel)
60
60
  |
61
61
  v
62
62
  Arbiter compiles results → validation.md
@@ -98,7 +98,9 @@ Spawn all Guardians in parallel:
98
98
  - Secret scanning
99
99
  - Input validation checks
100
100
 
101
- **Alchemist** (Schema Integrity — only for specs touching database):
101
+ **Curator** (Schema Integrity — only for specs touching database):
102
+ - READ-ONLY Guardian — audits the schema, never creates or modifies it
103
+ - (The Alchemist *builds* the schema during `/forge-spec`; Curator independently *verifies* it here)
102
104
  - Query actual database schema for all tables the spec touches
103
105
  - Verify column names in spec/code match real database columns
104
106
  - Verify all foreign keys and constraints exist in the actual DB
@@ -147,7 +149,7 @@ If all validation passes, create handoff.md with:
147
149
  - Secrets: status
148
150
  - Inputs: status
149
151
 
150
- ### Schema Integrity (Alchemist) — if spec touches database
152
+ ### Schema Integrity (Curator) — if spec touches database
151
153
  - Column names match: status
152
154
  - Constraints verified: status
153
155
  - API end-to-end trace: status
@@ -41,7 +41,9 @@ Skills tell you HOW. User instructions tell you WHAT.
41
41
 
42
42
  | Skill | Path | Load when... |
43
43
  |-------|------|-------------|
44
+ | **meet-spec** | `.claude/skills/meet-spec/SKILL.md` | `/meet-spec` — shaping a spec via a voice meeting (optional) |
44
45
  | **spec-shaping** | `.claude/skills/spec-shaping/SKILL.md` | `/catalyze-spec` — shaping a new specification |
46
+ | **spec-challenge** | `.claude/skills/spec-challenge/SKILL.md` | `/challenge-spec` — interrogating a shaped spec branch by branch (optional) |
45
47
  | **build-orchestration** | `.claude/skills/build-orchestration/SKILL.md` | `/forge-spec` — implementing a specification |
46
48
  | **spec-validation** | `.claude/skills/spec-validation/SKILL.md` | `/audit-spec` — quality checks on implementation |
47
49
  | **spec-approval** | `.claude/skills/spec-approval/SKILL.md` | `/seal-spec` — final commit and archival |
package/README.md CHANGED
@@ -10,6 +10,7 @@
10
10
  npx catalyst-os # Install to your project
11
11
  /catalyze-project # Initialize project foundation
12
12
  /catalyze-spec "description" # Shape a feature specification
13
+ /challenge-spec @spec-name # (optional) Interrogate the spec branch by branch
13
14
  /forge-spec @spec-name # Implement with TDD
14
15
  /audit-spec @spec-name # Run quality checks
15
16
  /seal-spec @spec-name # Accept and archive
@@ -44,6 +45,7 @@ Then run `/catalyze-project` to initialize — this detects your workspace type,
44
45
  │ ├── receiving-code-review/
45
46
  │ ├── workspace-detection/
46
47
  │ ├── spec-shaping/
48
+ │ ├── spec-challenge/
47
49
  │ ├── build-orchestration/
48
50
  │ ├── spec-validation/
49
51
  │ ├── spec-approval/
@@ -102,6 +104,7 @@ Without this, skills are optional documentation. With it, they're mandatory proc
102
104
  | Skill | Command | Purpose |
103
105
  |-------|---------|---------|
104
106
  | `spec-shaping` | `/catalyze-spec` | Shape feature requests into specifications |
107
+ | `spec-challenge` | `/challenge-spec` | Interrogate a shaped spec branch by branch (optional) |
105
108
  | `build-orchestration` | `/forge-spec` | DAG-based TDD implementation |
106
109
  | `spec-validation` | `/audit-spec` | Quality checks via Guardian agents |
107
110
  | `spec-approval` | `/seal-spec` | Final verification and archival |
@@ -185,6 +188,10 @@ Guardians (Quality)
185
188
  └──────────────┘ └──────────────┘ └──────────────┘ └──────────────┘
186
189
  Context full? New conversation?
187
190
  Run /primer-spec @slug to restore awareness before continuing.
191
+
192
+ Optional gate between CATALYZE and FORGE:
193
+ /challenge-spec @slug — interrogate every branch of the design tree
194
+ before tests are written. Patches spec.md, logs to handoff.md.
188
195
  ```
189
196
 
190
197
  ---
@@ -195,6 +202,7 @@ Guardians (Quality)
195
202
  |---------|-------------|--------|
196
203
  | `/catalyze-project` | Start new project | mission.md, roadmap.md, tech-stack.md |
197
204
  | `/catalyze-spec "feature"` | New feature request | spec.md, research.md |
205
+ | `/challenge-spec @slug` | Stress-test the spec before forging (optional) | spec.md (patched), handoff.md (Challenge Log) |
198
206
  | `/forge-spec @slug` | Implement feature | tasks.md (updated) |
199
207
  | `/primer-spec @slug` | Restore context (new conversation) | Brief status summary |
200
208
  | `/audit-spec @slug` | Quality checks | validation.md, handoff.md |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "catalyst-os",
3
- "version": "2.0.2",
3
+ "version": "3.0.0",
4
4
  "scripts": {
5
5
  "postinstall": "node .catalyst/bin/install.js",
6
6
  "validate": "node .catalyst/bin/validate-artifacts.js"
@@ -13,6 +13,7 @@
13
13
  "AGENTS.md",
14
14
  ".claude",
15
15
  ".catalyst/bin",
16
+ ".catalyst/voice",
16
17
  ".catalyst/spec-structure.yaml",
17
18
  ".catalyst/main/project-config.yaml"
18
19
  ],