substrate-ai 0.1.33 → 0.2.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/README.md CHANGED
@@ -50,20 +50,20 @@ The primary way to use Substrate is from inside a Claude Code session. Substrate
50
50
 
51
51
  ```bash
52
52
  npm install substrate-ai
53
- [npx] substrate auto init
53
+ [npx] substrate init
54
54
  ```
55
55
 
56
56
  This scaffolds CLAUDE.md with a `## Substrate Pipeline` section containing behavioral directives. Claude Code reads this on session start.
57
57
 
58
- 2. **Start a Claude Code session.** Claude sees the substrate instructions automatically and knows to run `substrate auto run --help-agent` on first use to learn the full event protocol, commands, and interaction patterns.
58
+ 2. **Start a Claude Code session.** Claude sees the substrate instructions automatically and knows to run `substrate run --help-agent` on first use to learn the full event protocol, commands, and interaction patterns.
59
59
 
60
60
  3. **Tell Claude what to build.** Claude drives the pipeline conversationally — running stories, parsing structured events, handling escalations, offering to fix review issues, and summarizing results. You stay in control: Claude always asks before re-running failed stories or applying fixes.
61
61
 
62
62
  ```bash
63
63
  # What Claude runs under the hood:
64
- substrate auto run --events --stories 7-1,7-2 # Structured NDJSON for Claude to parse
65
- substrate auto run # Human-readable progress (default)
66
- substrate auto run --help-agent # Full protocol reference (<2000 tokens)
64
+ substrate run --events --stories 7-1,7-2 # Structured NDJSON for Claude to parse
65
+ substrate run # Human-readable progress (default)
66
+ substrate run --help-agent # Full protocol reference (<2000 tokens)
67
67
  ```
68
68
 
69
69
  ### Pick Up an Existing BMAD Project
@@ -83,7 +83,7 @@ Already have a project with BMAD artifacts (from vanilla BMAD, the Beads-based a
83
83
 
84
84
  ```bash
85
85
  npm install substrate-ai
86
- [npx] substrate auto init
86
+ [npx] substrate init
87
87
  ```
88
88
 
89
89
  **Then start a Claude Code session and tell it what to do:**
@@ -100,11 +100,11 @@ Substrate also runs standalone without an AI agent driving it:
100
100
 
101
101
  ```bash
102
102
  [npx] substrate brainstorm # Explore your idea
103
- [npx] substrate auto init # Set up methodology pack
104
- [npx] substrate auto run # Full pipeline: analysis → implement
105
- [npx] substrate auto run --from solutioning # Skip to a specific phase
106
- [npx] substrate auto resume # Pick up where you left off
107
- [npx] substrate auto status # Check pipeline progress
103
+ [npx] substrate init # Set up methodology pack
104
+ [npx] substrate run # Full pipeline: analysis → implement
105
+ [npx] substrate run --from solutioning # Skip to a specific phase
106
+ [npx] substrate resume # Pick up where you left off
107
+ [npx] substrate status # Check pipeline progress
108
108
  ```
109
109
 
110
110
  The pipeline walks through the full software development lifecycle: analysis, planning, solutioning, and implementation — dispatching agents to build, test, and code-review each story.
@@ -121,7 +121,7 @@ Substrate dispatches work to CLI-based AI agents running as child processes. It
121
121
 
122
122
  All three agents are fully supported as worker targets. Substrate auto-discovers available agents and routes work based on adapter health checks and configuration.
123
123
 
124
- > **Note on agent scaffolding:** Separately from worker dispatch, Substrate can also scaffold instruction files that teach an AI agent how to *drive* the pipeline as a front-end. Today, `substrate auto init` generates a CLAUDE.md scaffold for Claude Code (see [AI Agent Integration](#ai-agent-integration)). Equivalent scaffolds for Codex (`AGENTS.md`) and Gemini (`GEMINI.md`) are planned.
124
+ > **Note on agent scaffolding:** Separately from worker dispatch, Substrate can also scaffold instruction files that teach an AI agent how to *drive* the pipeline as a front-end. Today, `substrate init` generates a CLAUDE.md scaffold for Claude Code (see [AI Agent Integration](#ai-agent-integration)). Equivalent scaffolds for Codex (`AGENTS.md`) and Gemini (`GEMINI.md`) are planned.
125
125
 
126
126
  ## Pipeline Observability
127
127
 
@@ -129,10 +129,10 @@ Substrate provides multiple output modes for monitoring pipeline execution.
129
129
 
130
130
  ### Human-Readable Progress (default)
131
131
 
132
- `substrate auto run` displays compact, updating progress lines with color:
132
+ `substrate run` displays compact, updating progress lines with color:
133
133
 
134
134
  ```
135
- substrate auto run — 6 stories, concurrency 3
135
+ substrate run — 6 stories, concurrency 3
136
136
 
137
137
  [create] 7-1 creating story...
138
138
  [dev] 7-2 implementing...
@@ -154,8 +154,8 @@ Pipeline complete: 5 succeeded, 0 failed, 1 escalated
154
154
  For programmatic consumption, `--events` emits newline-delimited JSON events on stdout:
155
155
 
156
156
  ```bash
157
- [npx] substrate auto run --events
158
- [npx] substrate auto run --events --stories 7-1,7-2
157
+ [npx] substrate run --events
158
+ [npx] substrate run --events --stories 7-1,7-2
159
159
  ```
160
160
 
161
161
  Seven event types form a discriminated union on the `type` field:
@@ -190,7 +190,7 @@ Substrate is designed to be operated by AI agents, not just humans. Two mechanis
190
190
  ### Self-Describing CLI (`--help-agent`)
191
191
 
192
192
  ```bash
193
- [npx] substrate auto run --help-agent
193
+ [npx] substrate run --help-agent
194
194
  ```
195
195
 
196
196
  Outputs a machine-optimized markdown prompt fragment (<2000 tokens) that an AI agent can ingest as a system prompt. Generated from the same TypeScript type definitions as the event emitter, so documentation never drifts from implementation. Includes:
@@ -202,7 +202,7 @@ Outputs a machine-optimized markdown prompt fragment (<2000 tokens) that an AI a
202
202
 
203
203
  ### CLAUDE.md Scaffold
204
204
 
205
- `substrate auto init` injects a `## Substrate Pipeline` section into your project's CLAUDE.md with behavioral directives for Claude Code:
205
+ `substrate init` injects a `## Substrate Pipeline` section into your project's CLAUDE.md with behavioral directives for Claude Code:
206
206
 
207
207
  - Instructions to run `--help-agent` on first use
208
208
  - Event-driven interaction patterns (escalation handling, fix offers, confirmation requirements)
@@ -216,28 +216,32 @@ Outputs a machine-optimized markdown prompt fragment (<2000 tokens) that an AI a
216
216
  | Command | Description |
217
217
  |---------|-------------|
218
218
  | `substrate brainstorm` | Interactive multi-persona ideation session |
219
- | `substrate auto init` | Initialize methodology pack for autonomous pipeline |
220
- | `substrate auto run` | Run the full pipeline (analysis → implement) |
221
- | `substrate auto run --events` | Emit NDJSON event stream on stdout |
222
- | `substrate auto run --verbose` | Show full pino log output on stderr |
223
- | `substrate auto run --help-agent` | Print agent instruction prompt fragment and exit |
224
- | `substrate auto run --from <phase>` | Start from a specific phase |
225
- | `substrate auto resume` | Resume an interrupted pipeline run |
226
- | `substrate auto status` | Show pipeline run status |
219
+ | `substrate init` | Initialize methodology pack for autonomous pipeline |
220
+ | `substrate run` | Run the full pipeline (analysis → implement) |
221
+ | `substrate run --events` | Emit NDJSON event stream on stdout |
222
+ | `substrate run --verbose` | Show full pino log output on stderr |
223
+ | `substrate run --help-agent` | Print agent instruction prompt fragment and exit |
224
+ | `substrate run --from <phase>` | Start from a specific phase |
225
+ | `substrate resume` | Resume an interrupted pipeline run |
226
+ | `substrate status` | Show pipeline run status |
227
227
 
228
- ### Monitoring
228
+ ### Observability
229
229
 
230
230
  | Command | Description |
231
231
  |---------|-------------|
232
+ | `substrate health` | Check pipeline health, stall detection, and process status |
233
+ | `substrate supervisor` | Long-running monitor that kills stalled runs and auto-restarts |
234
+ | `substrate metrics` | Historical pipeline run metrics and cross-run comparison |
232
235
  | `substrate monitor status` | View task metrics and agent performance |
233
236
  | `substrate monitor report` | Generate a detailed performance report |
234
- | `substrate cost-report` | View cost and token usage summary |
237
+ | `substrate cost` | View cost and token usage summary |
235
238
 
236
239
  ### Setup
237
240
 
238
241
  | Command | Description |
239
242
  |---------|-------------|
240
- | `substrate init` | Initialize project configuration |
243
+ | `substrate adapters` | List and check available AI agent adapters |
244
+ | `substrate config` | Show, set, export, or import configuration |
241
245
  | `substrate --help` | Show all available commands |
242
246
 
243
247
  ## Configuration
@@ -268,40 +272,6 @@ npm run typecheck
268
272
  npm run lint
269
273
  ```
270
274
 
271
- ## Manual Task Graphs
272
-
273
- For fine-grained control, you can define exactly what agents should do in a YAML task graph:
274
-
275
- ```yaml
276
- version: "1"
277
- session:
278
- name: "my-tasks"
279
- tasks:
280
- write-tests:
281
- name: "Write unit tests"
282
- prompt: |
283
- Look at the src/utils/ directory.
284
- Write comprehensive unit tests for all exported functions.
285
- type: testing
286
- agent: claude-code
287
- update-docs:
288
- name: "Update README"
289
- prompt: |
290
- Read the README.md and verify it accurately describes
291
- the project. Fix any inaccuracies.
292
- type: docs
293
- agent: codex
294
- depends_on:
295
- - write-tests
296
- ```
297
-
298
- ```bash
299
- [npx] substrate start --graph tasks.yaml # Execute the graph
300
- [npx] substrate plan --graph tasks.yaml # Preview without running
301
- ```
302
-
303
- Tasks without dependencies run in parallel. Each agent gets its own isolated git worktree.
304
-
305
275
  ## License
306
276
 
307
277
  MIT