valent-pipeline 0.5.6 → 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.
- package/README.md +17 -24
- package/package.json +1 -1
- package/pipeline/docs/agent-reference.md +83 -61
- package/pipeline/docs/communication-standard.md +24 -26
- package/pipeline/docs/index.md +12 -24
- package/pipeline/docs/knowledge-system.md +18 -18
- package/pipeline/docs/npx-implementation-plan.md +18 -8
- package/pipeline/docs/npx-packaging.md +12 -12
- package/pipeline/docs/pipeline-overview.md +37 -30
- package/pipeline/docs/pipeline-state-schema.md +70 -79
- package/pipeline/docs/task-graph.md +99 -128
- package/pipeline/docs/template-skeleton.md +27 -24
- package/pipeline/orchestrators/claude-code/plan.workflow.js +68 -21
- package/pipeline/orchestrators/claude-code/retro.workflow.js +3 -3
- package/pipeline/orchestrators/claude-code/sprint.workflow.js +7 -9
- package/pipeline/steps/orchestration/update-backlog-status.md +2 -2
- package/pipeline/task-graphs/backend-api.yaml +1 -1
- package/pipeline/task-graphs/data-pipeline.yaml +1 -1
- package/pipeline/task-graphs/document-generation.yaml +1 -1
- package/pipeline/task-graphs/frontend-only.yaml +2 -19
- package/pipeline/task-graphs/fullstack-web.yaml +2 -10
- package/pipeline/task-graphs/library.yaml +1 -1
- package/pipeline/task-graphs/mcp-server.yaml +1 -1
- package/skills/valent-configure/SKILL.md +1 -1
- package/skills/valent-debug-export/SKILL.md +0 -1
- package/skills/valent-help/SKILL.md +5 -6
- package/skills/valent-run-epic-workflow/SKILL.md +7 -7
- package/skills/valent-run-project-workflow/SKILL.md +7 -7
- package/skills/valent-run-story-workflow/SKILL.md +6 -6
- package/skills/valent-setup-backlog/SKILL.md +32 -9
- package/src/commands/init.js +25 -88
- package/src/commands/upgrade.js +40 -22
- package/src/lib/config-schema.js +6 -58
- package/src/lib/obsolete-manifest.js +76 -0
- package/pipeline/agents-manifest.yaml +0 -229
- package/pipeline/docs/design/codex-provider-support.md +0 -1047
- package/pipeline/docs/design/provider-adapter-guide.md +0 -172
- package/pipeline/docs/design/refactor-checklist.md +0 -127
- package/pipeline/docs/lead-lifecycle.md +0 -263
- package/pipeline/docs/lean-spawn-human-tasks.md +0 -207
- package/pipeline/docs/pm-agent-design.md +0 -880
- package/pipeline/orchestrators/codex/README.md +0 -52
- package/pipeline/orchestrators/codex/lead-loop.md +0 -115
- package/pipeline/prompts/embed.md +0 -67
- package/pipeline/prompts/help.md +0 -26
- package/pipeline/prompts/lead.md +0 -1207
- package/pipeline/prompts/pm.md +0 -292
- package/pipeline/prompts/pmcp.md +0 -52
- package/pipeline/providers/codex/AGENTS.md +0 -54
- package/pipeline/providers/codex/cloud-task-prompts/grooming.md +0 -40
- package/pipeline/providers/codex/cloud-task-prompts/implementation.md +0 -42
- package/pipeline/providers/codex/cloud-task-prompts/qa-validation.md +0 -40
- package/pipeline/providers/codex/cloud-task-prompts/retrospective.md +0 -35
- package/pipeline/providers/codex/cloud-task-prompts/rework.md +0 -43
- package/pipeline/providers/codex/cloud-task-protocol.md +0 -165
- package/pipeline/providers/codex/codex-project-files/.codex/agents/code-worker.toml +0 -14
- package/pipeline/providers/codex/codex-project-files/.codex/agents/review-explorer.toml +0 -14
- package/pipeline/providers/codex/codex-project-files/.codex/agents/spec-explorer.toml +0 -14
- package/pipeline/providers/codex/codex-project-files/.codex/agents/test-worker.toml +0 -14
- package/pipeline/providers/codex/codex-project-files/.codex/config.toml +0 -15
- package/pipeline/providers/codex/codex-project-files/.codex/setup.sh +0 -44
- package/pipeline/providers/codex/codex-project-files/.github/workflows/codex-sprint.yaml +0 -188
- package/pipeline/providers/codex/runtime.md +0 -159
- package/pipeline/providers/codex/spawn.template.md +0 -20
- package/pipeline/steps/orchestration/adopt-lead-and-create-team.md +0 -183
- package/pipeline/steps/orchestration/load-agents-manifest.md +0 -9
- package/pipeline/steps/orchestration/sprint-execute.md +0 -100
- package/pipeline/steps/orchestration/sprint-groom.md +0 -112
- package/pipeline/steps/orchestration/sprint-init.md +0 -71
- package/pipeline/steps/orchestration/sprint-plan.md +0 -98
- package/pipeline/steps/orchestration/sprint-pm-audit.md +0 -46
- package/pipeline/steps/orchestration/sprint-pm-review.md +0 -71
- package/pipeline/steps/orchestration/sprint-pm-teardown.md +0 -22
- package/pipeline/steps/orchestration/sprint-review.md +0 -82
- package/pipeline/steps/orchestration/sprint-size.md +0 -46
- package/skills/valent-pm/SKILL.md +0 -121
- package/skills/valent-run-epic/SKILL.md +0 -209
- package/skills/valent-run-project/SKILL.md +0 -265
- package/skills/valent-run-retrospective/SKILL.md +0 -82
- package/skills/valent-run-story/SKILL.md +0 -69
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@ npx valent-pipeline init
|
|
|
17
17
|
/valent-configure
|
|
18
18
|
|
|
19
19
|
# Execute a story
|
|
20
|
-
/valent-run-story STORY-001
|
|
20
|
+
/valent-run-story-workflow STORY-001
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
> **No global install required.** `npx valent-pipeline init` copies the CLI (`bin/` + `src/`)
|
|
@@ -224,14 +224,10 @@ Invoked as slash commands inside Claude Code:
|
|
|
224
224
|
| Skill | Description |
|
|
225
225
|
|---|---|
|
|
226
226
|
| `/valent-configure` | Interactive configuration wizard |
|
|
227
|
-
| `/valent-run-story STORY-ID` | Execute a single story (prose-Lead orchestrator) |
|
|
228
|
-
| `/valent-run-epic EPIC-ID` | Execute an epic with sprint planning (prose-Lead orchestrator) |
|
|
229
|
-
| `/valent-run-project` | Execute a full project across all epics (prose-Lead orchestrator) |
|
|
230
|
-
| `/valent-run-story-workflow STORY-ID` | Execute a single story via the native Claude Code **Workflow** orchestrator (experimental) |
|
|
231
|
-
| `/valent-run-epic-workflow EPIC-ID` | Execute an epic via the **Workflow** orchestrator (experimental) |
|
|
232
|
-
| `/valent-run-project-workflow` | Execute a full project via the **Workflow** orchestrator (experimental) |
|
|
233
227
|
| `/valent-setup-backlog` | Convert epics/stories into pipeline backlog |
|
|
234
|
-
| `/valent-run-
|
|
228
|
+
| `/valent-run-story-workflow STORY-ID` | Execute a single story via the Claude Code **Workflow** orchestrator |
|
|
229
|
+
| `/valent-run-epic-workflow EPIC-ID` | Execute an epic (sprint planning + execution) via the **Workflow** orchestrator |
|
|
230
|
+
| `/valent-run-project-workflow` | Execute a full project across all epics via the **Workflow** orchestrator |
|
|
235
231
|
| `/valent-run-deferred-tests` | Run deferred iOS tests on Mac |
|
|
236
232
|
| `/valent-debug-export` | Export diagnostic dump |
|
|
237
233
|
| `/valent-help` | Pipeline documentation and FAQ |
|
|
@@ -270,9 +266,7 @@ For each story, the pipeline produces 15+ artifacts in `stories/{story-id}/outpu
|
|
|
270
266
|
| `readiness-review.md` | READINESS | Spec gate results |
|
|
271
267
|
| `judge-review.md` | JUDGE | Bug review findings |
|
|
272
268
|
| `judge-decision.md` | JUDGE | Ship/reject decision with evidence |
|
|
273
|
-
| `
|
|
274
|
-
| `story-report.md` | Lead | Story completion summary |
|
|
275
|
-
| `decisions.md` | *(any)* | Design Council deliberation log |
|
|
269
|
+
| `story-report.md` | orchestrator | Story completion summary |
|
|
276
270
|
|
|
277
271
|
Plus committed, tested production code in your project source tree.
|
|
278
272
|
|
|
@@ -308,15 +302,14 @@ The **Retrospective** agent (triggered every N stories) is the sole gatekeeper f
|
|
|
308
302
|
|
|
309
303
|
## Execution Modes
|
|
310
304
|
|
|
311
|
-
|
|
305
|
+
The pipeline runs on a single orchestration path: the **Claude Code Workflow** path. A deterministic Workflow script (`pipeline/orchestrators/claude-code/{plan,sprint,retro}.workflow.js`) drives the pipeline with schema-validated gates, a code-owned rejection cap, parallel CRITIC passes, and journal-based resume (`resumeFromRunId`). Control flow lives in JavaScript and the journal — not in a model interpreting prose. Validated by `scripts/test-workflow.js` but not yet exercised end-to-end against a live story — validate against a fixture before relying on it. See `pipeline/orchestrators/claude-code/README.md`.
|
|
312
306
|
|
|
313
|
-
|
|
314
|
-
- **Workflow** (`/valent-run-story-workflow`, `/valent-run-epic-workflow`, `/valent-run-project-workflow`) — experimental, Claude Code only. A deterministic Workflow script (`pipeline/orchestrators/claude-code/{plan,sprint,retro}.workflow.js`) drives the pipeline with schema-validated gates, a code-owned rejection cap, parallel CRITIC passes, and journal-based resume (`resumeFromRunId`). Validated by `scripts/test-workflow.js` but not yet exercised end-to-end against a live story — validate against a fixture before relying on it. See `pipeline/orchestrators/claude-code/README.md`.
|
|
307
|
+
> Requires Claude Code (the Workflow tool). `runtime.provider` must be `claude-code`.
|
|
315
308
|
|
|
316
309
|
### Single Story
|
|
317
310
|
|
|
318
311
|
```
|
|
319
|
-
/valent-run-story STORY-001
|
|
312
|
+
/valent-run-story-workflow STORY-001
|
|
320
313
|
```
|
|
321
314
|
|
|
322
315
|
Executes one story through the full pipeline.
|
|
@@ -324,7 +317,7 @@ Executes one story through the full pipeline.
|
|
|
324
317
|
### Epic (Sprint-Based)
|
|
325
318
|
|
|
326
319
|
```
|
|
327
|
-
/valent-run-epic EPIC-001
|
|
320
|
+
/valent-run-epic-workflow EPIC-001
|
|
328
321
|
```
|
|
329
322
|
|
|
330
323
|
Runs an epic with sprint planning: grooms stories, estimates sizing using calibrated Fibonacci points, plans sprints, executes stories in priority order, and runs retrospectives between sprints.
|
|
@@ -332,7 +325,7 @@ Runs an epic with sprint planning: grooms stories, estimates sizing using calibr
|
|
|
332
325
|
### Full Project
|
|
333
326
|
|
|
334
327
|
```
|
|
335
|
-
/valent-run-project
|
|
328
|
+
/valent-run-project-workflow
|
|
336
329
|
```
|
|
337
330
|
|
|
338
331
|
Executes all epics in the backlog with cross-epic dependency resolution.
|
|
@@ -392,12 +385,12 @@ After initialization, the pipeline installs to `.valent-pipeline/` in your proje
|
|
|
392
385
|
```
|
|
393
386
|
.valent-pipeline/
|
|
394
387
|
pipeline-config.yaml # Your project configuration
|
|
395
|
-
pipeline-state.json # Pipeline runtime state
|
|
396
|
-
|
|
397
|
-
prompts/ # Agent prompt templates
|
|
398
|
-
templates/ # Handoff document templates
|
|
399
|
-
task-graphs/ # Task dependency graphs per project type
|
|
400
|
-
steps/ # Agent step files
|
|
388
|
+
pipeline-state.json # Pipeline runtime state (derived, human-readable view)
|
|
389
|
+
orchestrators/claude-code/ # Workflow orchestrator scripts (plan/sprint/retro)
|
|
390
|
+
prompts/ # Agent prompt templates
|
|
391
|
+
templates/ # Handoff document templates
|
|
392
|
+
task-graphs/ # Task dependency graphs per project type
|
|
393
|
+
steps/ # Agent step files
|
|
401
394
|
bend/ # Backend developer steps
|
|
402
395
|
fend/ # Frontend developer steps
|
|
403
396
|
critic/ # Code review steps
|
|
@@ -406,7 +399,7 @@ After initialization, the pipeline installs to `.valent-pipeline/` in your proje
|
|
|
406
399
|
reqs/ # Requirements analysis steps
|
|
407
400
|
readiness/ # Readiness gate steps
|
|
408
401
|
judge/ # Judge gate steps
|
|
409
|
-
orchestration/ #
|
|
402
|
+
orchestration/ # Shared orchestration steps (config, story resolution, status)
|
|
410
403
|
retrospective/ # Retrospective analysis steps
|
|
411
404
|
common/ # Shared agent protocols
|
|
412
405
|
data/ # Data pipeline developer steps
|
package/package.json
CHANGED
|
@@ -1,109 +1,130 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Agent Reference
|
|
2
2
|
|
|
3
|
-
> Quick reference for all agents in the
|
|
4
|
-
> Definitive source:
|
|
3
|
+
> Quick reference for all agents in the pipeline.
|
|
4
|
+
> Definitive source: `pipeline-config.yaml` `models:` (per-agent model tier) and
|
|
5
|
+
> `pipeline/task-graphs/*.yaml` (which agents run per project type).
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Orchestration
|
|
10
|
+
|
|
11
|
+
There is one orchestration path: the Claude Code **Workflow** path. It requires Claude Code
|
|
12
|
+
(`runtime.provider` must be `claude-code`). The workflow scripts in
|
|
13
|
+
`pipeline/orchestrators/claude-code/` own all control flow — they spawn agents as subagents,
|
|
14
|
+
wire dependencies, and manage each story's lifecycle. There is no "Lead" agent or persona that
|
|
15
|
+
spawns or monitors a team.
|
|
16
|
+
|
|
17
|
+
| Workflow | Script | Responsibility |
|
|
18
|
+
|---|---|---|
|
|
19
|
+
| Plan | `plan.workflow.js` | Backlog grooming, sizing, sprint packing |
|
|
20
|
+
| Sprint | `sprint.workflow.js` | Runs the per-story agent graph for each story in the sprint |
|
|
21
|
+
| Retro | `retro.workflow.js` | Post-sprint retrospective → correction directives |
|
|
22
|
+
|
|
23
|
+
Per-story agent selection is deterministic. The Sprint workflow reads `project_type` and the
|
|
24
|
+
story's `testing_profiles`, then resolves the task graph for that type via
|
|
25
|
+
`node .valent-pipeline/bin/cli.js resolve-graph --type <project_type> --profiles <list>` over
|
|
26
|
+
`pipeline/task-graphs/<type>.yaml`. The resolver evaluates `conditional` / `skip_when`
|
|
27
|
+
predicates and prunes dropped refs from every dependency, so no dangling dependency survives a
|
|
28
|
+
skip. Per-agent model tier comes from `pipeline-config.yaml` `models:` (a tier→roles map for
|
|
29
|
+
`opus` / `sonnet` / `haiku`), which the workflow passes to each spawned subagent.
|
|
30
|
+
|
|
31
|
+
> Removed in v0.6.0: the Lead agent (orchestration is now the JS workflow), the PM and PMCP
|
|
32
|
+
> agents (archived for a future Workflow stage, not currently run), the Help agent (use the
|
|
33
|
+
> `/valent-help` skill), the Embed agent (embedding is now the `db embed` CLI step), the Codex
|
|
34
|
+
> runtime, and `agents-manifest.yaml`.
|
|
5
35
|
|
|
6
36
|
---
|
|
7
37
|
|
|
8
38
|
## Agent Roster
|
|
9
39
|
|
|
10
|
-
###
|
|
40
|
+
### Spec & Gate Agents
|
|
11
41
|
|
|
12
|
-
|
|
42
|
+
Run once per story, in dependency order, before and around implementation.
|
|
13
43
|
|
|
14
44
|
| Agent | Model | Role | Reads | Writes | Key Behavior |
|
|
15
45
|
|-------|-------|------|-------|--------|--------------|
|
|
16
|
-
| REQS | Sonnet | Requirements analyst
|
|
17
|
-
| UXA | Sonnet | UX specification
|
|
18
|
-
| QA-A | Sonnet | QA spec writer
|
|
19
|
-
| READINESS |
|
|
20
|
-
|
|
|
21
|
-
|
|
|
22
|
-
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
46
|
+
| REQS | Sonnet | Requirements analyst — translates ACs into implementation brief | story-input (ACs, trigger-map, architecture-decisions, UX spec) | `reqs-brief.md` | Brainstorms ambiguity resolutions; loads domain-specific step files per testing profile; escalates only when options have genuinely competing tradeoffs |
|
|
47
|
+
| UXA | Sonnet | UX specification — translates UX spec into component specs | `reqs-brief.md`, ux-spec, trigger-map, scenarios | `uxa-spec.md` | Translation-only mode without trigger-map or scenarios; skipped when `testing_profiles` excludes `ui` |
|
|
48
|
+
| QA-A | Sonnet | QA spec writer — produces behavioral test specifications | `reqs-brief.md`, `uxa-spec.md` | `qa-test-spec.md`, `visual-validation-checklist.md` | Writes test specs before code exists; risk-based test depth (P0–P3); domain-specific step files per project type |
|
|
49
|
+
| READINESS | Opus | Spec quality gate — validates specs before execution begins | `reqs-brief.md`, `uxa-spec.md`, `qa-test-spec.md` | `readiness-review.md` | Sequential review: stops on first failure; routes rejection to responsible upstream agent |
|
|
50
|
+
| CRITIC | Opus | Code reviewer — 3 independent parallel review passes + triage | git-diff, `reqs-brief.md`, `qa-test-spec.md` | `critic-review.md` | Three parallel review passes (blind hunt, edge-case hunt, acceptance audit) feed a triage step that produces a single verdict; domain-specific review steps per project type |
|
|
51
|
+
| QA-B | Sonnet | Test executor — runs tests, validates spec alignment, files bugs | `qa-test-spec.md`, `critic-review.md`, `reqs-brief.md` | `execution-report.md`, `bugs.md`, `traceability-matrix.md` | Runs tests against real infrastructure; domain-specific execution steps |
|
|
52
|
+
| JUDGE | Opus | Final quality gate — bug review + ship decision | `execution-report.md`, `traceability-matrix.md`, `bugs.md`, `qa-test-spec.md` | `judge-review.md`, `judge-decision.md`, `story-report.md` | Evidence over assertion — independently verifies every upstream claim |
|
|
53
|
+
|
|
54
|
+
### Developer Agents
|
|
55
|
+
|
|
56
|
+
The Sprint workflow selects implementation agents from the resolved task graph based on the
|
|
57
|
+
story's `testing_profiles`. Each has its own prompt, step files, handoff template, and
|
|
58
|
+
domain-specific QA-A / QA-B / CRITIC steps.
|
|
59
|
+
|
|
60
|
+
| Agent | Model | Role | Selected when | Reads | Writes | Key Domain |
|
|
61
|
+
|-------|-------|------|---------------|-------|--------|------------|
|
|
62
|
+
| BEND | Sonnet | Backend developer | `api` profile (fullstack-web, backend-api) | `reqs-brief.md`, `qa-test-spec.md` | `bend-handoff.md` | Production backend code + tests; coordinates with FEND on shared files |
|
|
63
|
+
| FEND | Sonnet | Frontend developer | `ui` profile (fullstack-web, frontend-only) | `reqs-brief.md`, `uxa-spec.md`, `qa-test-spec.md` | `fend-handoff.md` | UI components + tests; implements to UXA component spec |
|
|
33
64
|
| DATA | Sonnet | Data pipeline developer | `data-pipeline` | `reqs-brief.md`, `qa-test-spec.md` | `data-handoff.md` | ETL/transforms, idempotency, checkpointing, row-level logging |
|
|
34
65
|
| MCP-DEV | Sonnet | Protocol developer | `mcp-server` | `reqs-brief.md`, `qa-test-spec.md` | `mcp-dev-handoff.md` | JSON-RPC/stdio, two-tier error model, tool registration |
|
|
35
66
|
| LIBDEV | Sonnet | Library developer | `library` | `reqs-brief.md`, `qa-test-spec.md` | `libdev-handoff.md` | Public API, exports/packaging, CJS/ESM, semver, type declarations |
|
|
36
67
|
| DOCGEN | Sonnet | Document generation developer | `document-generation` | `reqs-brief.md`, `qa-test-spec.md` | `docgen-handoff.md` | Template engine, render pipeline, encoding, assets |
|
|
37
|
-
| IAC | Sonnet | Infrastructure developer |
|
|
68
|
+
| IAC | Sonnet | Infrastructure developer | `iac` profile (cross-cutting, any type) | `reqs-brief.md`, `qa-test-spec.md` | `iac-handoff.md` | Terraform/Pulumi/CloudFormation, K8s, CI/CD, IAM |
|
|
38
69
|
| MOBILE | Sonnet | Mobile developer | `mobile-app` | `reqs-brief.md`, `uxa-spec.md`, `qa-test-spec.md` | `mobile-handoff.md` | React Native/Flutter, Maestro E2E, emulator lifecycle, iOS deferral |
|
|
39
70
|
|
|
40
71
|
**Notes:**
|
|
41
72
|
- DATA, MCP-DEV, LIBDEV, DOCGEN each replace BEND in their dedicated task graph.
|
|
42
|
-
- IAC is cross-cutting
|
|
43
|
-
- MOBILE replaces BEND for mobile-app projects; BEND can still be conditionally included
|
|
44
|
-
- Each domain agent has 5 standard steps: read-inputs, implement, write-tests, handoff, estimate.
|
|
73
|
+
- IAC is cross-cutting — it slots into ANY task graph when `iac` is in `testing_profiles`, running in parallel with the primary developer agent.
|
|
74
|
+
- MOBILE replaces BEND for mobile-app projects; BEND can still be conditionally included when `testing_profiles` includes `api`.
|
|
45
75
|
- See the agent prompts in `pipeline/prompts/` and step files in `pipeline/steps/` for full implementation details.
|
|
46
76
|
|
|
47
|
-
###
|
|
48
|
-
|
|
49
|
-
Lives across stories. Manages the backlog and orchestrates each story team.
|
|
50
|
-
|
|
51
|
-
| Agent | Model | Role | Reads | Writes | Key Behavior |
|
|
52
|
-
|-------|-------|------|-------|--------|--------------|
|
|
53
|
-
| Lead | Opus | Pipeline orchestrator -- spawns team, monitors execution, manages story lifecycle | story-input, `agents-manifest.yaml`, `pipeline-config.yaml`, `pipeline-state.json` | `story-report.md`, `pipeline-state.json` | Builds task graph from manifest; enforces circuit breaker on rejection loops; escalates to user as last resort |
|
|
54
|
-
|
|
55
|
-
### Ephemeral Agents (4)
|
|
56
|
-
|
|
57
|
-
Spawned on-demand by the Lead when triggered by specific events.
|
|
77
|
+
### Cross-Story Agents
|
|
58
78
|
|
|
59
|
-
| Agent | Model | Role | Reads | Writes |
|
|
60
|
-
|
|
61
|
-
|
|
|
62
|
-
|
|
|
63
|
-
| Retrospective | Sonnet | Batch reviewer -- analyzes last N stories for recurring patterns | _(story reports)_ | _(retrospective report)_ | Every N stories (configurable) |
|
|
64
|
-
| Help | Haiku | Pipeline help -- explains any piece of the pipeline from documentation | `.valent-pipeline/docs/` | _(inbox only)_ | User request |
|
|
79
|
+
| Agent | Model | Role | Reads | Writes | When |
|
|
80
|
+
|-------|-------|------|-------|--------|------|
|
|
81
|
+
| Retrospective | Opus | Learns after a sprint — analyzes outcomes for recurring patterns | story reports | correction directives | Run by the Retro workflow after a sprint |
|
|
82
|
+
| Knowledge | Haiku | Knowledge retrieval — answers queries during execution | chromadb, curated-knowledge-files, correction-directives | _(none — inbox only)_ | Responds via inbox only; uses CLI `db` commands for SQLite queries |
|
|
65
83
|
|
|
66
84
|
---
|
|
67
85
|
|
|
68
86
|
## Project-Type Agent Selection
|
|
69
87
|
|
|
70
|
-
|
|
88
|
+
The Sprint workflow resolves the task graph for the project's `project_type` and prunes agents
|
|
89
|
+
the story's `testing_profiles` do not require.
|
|
71
90
|
|
|
72
|
-
| Project Type | Developer Agent(s) |
|
|
91
|
+
| Project Type | Developer Agent(s) | Typically Skipped | Task Graph |
|
|
73
92
|
|---|---|---|---|
|
|
74
93
|
| `fullstack-web` | BEND + FEND | _(none)_ | `fullstack-web.yaml` |
|
|
75
|
-
| `backend-api` | BEND | UXA, FEND
|
|
94
|
+
| `backend-api` | BEND | UXA, FEND | `backend-api.yaml` |
|
|
76
95
|
| `frontend-only` | FEND | BEND | `frontend-only.yaml` |
|
|
77
|
-
| `data-pipeline` | DATA | UXA, FEND
|
|
78
|
-
| `mcp-server` | MCP-DEV | UXA, FEND
|
|
79
|
-
| `document-generation` | DOCGEN | UXA, FEND
|
|
80
|
-
| `library` | LIBDEV | UXA, FEND
|
|
81
|
-
| `mobile-app` | MOBILE (+ BEND if api profile) |
|
|
96
|
+
| `data-pipeline` | DATA | UXA, FEND | `data-pipeline.yaml` |
|
|
97
|
+
| `mcp-server` | MCP-DEV | UXA, FEND | `mcp-server.yaml` |
|
|
98
|
+
| `document-generation` | DOCGEN | UXA, FEND | `document-generation.yaml` |
|
|
99
|
+
| `library` | LIBDEV | UXA, FEND | `library.yaml` |
|
|
100
|
+
| `mobile-app` | MOBILE (+ BEND if `api` profile) | _(conditional)_ | `mobile-app.yaml` |
|
|
82
101
|
|
|
83
102
|
**Conditional agents (any project type):**
|
|
84
|
-
- **IAC**
|
|
85
|
-
- **
|
|
86
|
-
- **UXA** -- can be conditionally skipped even for UI projects if `testing_profiles` excludes `ui`
|
|
103
|
+
- **IAC** — included when `testing_profiles` includes `iac`; runs in parallel with the primary developer agent.
|
|
104
|
+
- **UXA / FEND** — pruned when `testing_profiles` excludes `ui`, even for an otherwise UI-capable project type.
|
|
87
105
|
|
|
88
106
|
---
|
|
89
107
|
|
|
90
108
|
## Model Tier Summary
|
|
91
109
|
|
|
92
|
-
Default assignments from `config-schema.js
|
|
110
|
+
Default assignments from `pipeline-config.yaml` `models:` (validated by `src/lib/config-schema.js`):
|
|
93
111
|
|
|
94
112
|
| Tier | Agents | Use Case | Cost |
|
|
95
113
|
|------|--------|----------|------|
|
|
96
|
-
| Opus |
|
|
97
|
-
| Sonnet | REQS, UXA, QA-A, QA-B,
|
|
98
|
-
| Haiku | Knowledge,
|
|
114
|
+
| Opus | READINESS, CRITIC, JUDGE, Retrospective | Quality gates + high-judgment review | Highest |
|
|
115
|
+
| Sonnet | REQS, UXA, QA-A, QA-B, BEND, FEND, DATA, MCP-DEV, LIBDEV, DOCGEN, IAC, MOBILE | Spec writing, implementation, test execution | Balanced |
|
|
116
|
+
| Haiku | Knowledge, CLI-runner steps (resolve/pack/validate/calibrate/persist) | Mechanical retrieval and IO; no reasoning | Lowest |
|
|
99
117
|
|
|
100
|
-
|
|
118
|
+
Embedding runs as the `db embed` CLI step, not an agent. Model assignments are configurable in
|
|
119
|
+
`pipeline-config.yaml` under the `models` section — move a role between tiers to adjust the
|
|
120
|
+
quality/cost tradeoff.
|
|
101
121
|
|
|
102
122
|
---
|
|
103
123
|
|
|
104
124
|
## Step File Architecture
|
|
105
125
|
|
|
106
|
-
Each agent has domain-specific step files that provide detailed execution instructions. Step
|
|
126
|
+
Each agent has domain-specific step files that provide detailed execution instructions. Step
|
|
127
|
+
files live in `pipeline/steps/{agent}/` and are referenced by the agent's prompt.
|
|
107
128
|
|
|
108
129
|
### Shared Steps (`common/`)
|
|
109
130
|
|
|
@@ -117,7 +138,8 @@ Each agent has domain-specific step files that provide detailed execution instru
|
|
|
117
138
|
|
|
118
139
|
### Domain-Specific Steps
|
|
119
140
|
|
|
120
|
-
QA-A, QA-B, CRITIC, and REQS each have domain-specific step files that load based on the
|
|
141
|
+
QA-A, QA-B, CRITIC, and REQS each have domain-specific step files that load based on the
|
|
142
|
+
story's `testing_profiles`:
|
|
121
143
|
|
|
122
144
|
| Profile | QA-A Step | QA-B Step | CRITIC Step | REQS Step |
|
|
123
145
|
|---|---|---|---|---|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Distilled Communication Standard
|
|
2
2
|
|
|
3
|
-
> **Canonical reference for all agent-to-agent communication in the
|
|
3
|
+
> **Canonical reference for all agent-to-agent communication in the pipeline (Workflow path).**
|
|
4
4
|
> Every agent prompt and every handoff template references this document.
|
|
5
5
|
> If your output violates a rule below, CRITIC or JUDGE will flag it.
|
|
6
6
|
|
|
@@ -136,17 +136,17 @@ let's discuss the auth middleware.
|
|
|
136
136
|
|
|
137
137
|
### Rule 6: TL;DR orchestrator summary first
|
|
138
138
|
|
|
139
|
-
**Rationale:** The
|
|
139
|
+
**Rationale:** The workflow orchestrator collects each agent's result and sequences the pipeline. It must be able to scan the state of any handoff in seconds. Every handoff document starts with a structured summary block (see Section 4) so the orchestrator never needs to read the full document to know: who produced it, what story, pass/fail, what state transition occurred, and what files changed.
|
|
140
140
|
|
|
141
141
|
**Good:** See the Orchestrator Summary Block format in Section 4.
|
|
142
142
|
|
|
143
|
-
**Bad:** A handoff document that starts with three paragraphs of context before the
|
|
143
|
+
**Bad:** A handoff document that starts with three paragraphs of context before the orchestrator can determine whether the phase passed or failed.
|
|
144
144
|
|
|
145
145
|
---
|
|
146
146
|
|
|
147
147
|
## 3. YAML Frontmatter Schema
|
|
148
148
|
|
|
149
|
-
Every handoff file begins with this YAML frontmatter block. It is the machine-readable metadata envelope that agents and the
|
|
149
|
+
Every handoff file begins with this YAML frontmatter block. It is the machine-readable metadata envelope that agents and the workflow orchestrator use to track pipeline state.
|
|
150
150
|
|
|
151
151
|
```yaml
|
|
152
152
|
---
|
|
@@ -182,7 +182,7 @@ correctionsApplied: [] # (optional) correction directive IDs applied durin
|
|
|
182
182
|
|
|
183
183
|
## 4. Orchestrator Summary Block
|
|
184
184
|
|
|
185
|
-
Immediately after the YAML frontmatter, every handoff document includes this block. It is the TL;DR that the
|
|
185
|
+
Immediately after the YAML frontmatter, every handoff document includes this block. It is the TL;DR that the workflow orchestrator reads to understand the state of the phase without parsing the full document. In the Workflow path, the agent's structured return (these machine-block fields, surfaced as JSON) is what the orchestrator script collects as the handoff.
|
|
186
186
|
|
|
187
187
|
```markdown
|
|
188
188
|
## Orchestrator Summary
|
|
@@ -224,30 +224,30 @@ Immediately after the YAML frontmatter, every handoff document includes this blo
|
|
|
224
224
|
- **Verdict:** fail
|
|
225
225
|
- **State transition:** critic-review -> bend-rework
|
|
226
226
|
- **Files created/modified:** stories/STORY-042/output/critic-review.md
|
|
227
|
-
- **Flags:** Second rejection on error handling;
|
|
227
|
+
- **Flags:** Second rejection on error handling; rework cap is approaching
|
|
228
228
|
```
|
|
229
229
|
|
|
230
230
|
---
|
|
231
231
|
|
|
232
|
-
## 5.
|
|
232
|
+
## 5. Inter-Agent Signal Vocabulary
|
|
233
233
|
|
|
234
|
-
|
|
234
|
+
This is the **signal vocabulary** agent prompts use to express coordination intent (notifications, questions, bug reports, escalation). Handoff documents are never sent as messages -- they are written to the story output directory. In the Workflow path, sequencing and coordination are performed by the orchestrator script, which collects each agent's structured return and routes work; these signals are the standardized phrasing an agent uses inside that return rather than messages relayed through a persistent inbox.
|
|
235
235
|
|
|
236
|
-
### Valid
|
|
236
|
+
### Valid signal types
|
|
237
237
|
|
|
238
238
|
| Type | Purpose | Example |
|
|
239
239
|
|------|---------|---------|
|
|
240
240
|
| Notification | Signal task completion or state change | "BEND task `implement-api` completed. Output: `bend-handoff.md`" |
|
|
241
|
-
| Question | Request specific information from a peer | "FEND -> BEND: What did you name the tenant creation endpoint?" |
|
|
241
|
+
| Question | Request specific information from a peer phase | "FEND -> BEND: What did you name the tenant creation endpoint?" |
|
|
242
242
|
| Bug report | Terse summary with pointer to shared file | "Bug P1: tenant creation returns 500 with unicode input. See `bugs.md#BUG-003`" |
|
|
243
243
|
| Design Council | Structured deliberation (see Section 6) | Uses `[DESIGN-COUNCIL]` prefix format |
|
|
244
|
-
| Escalation |
|
|
244
|
+
| Escalation | Surface a blocker requiring human input | "Escalation: CRITIC rejected BEND 3 times on same issue. See `critic-review.md#rejection-3`" |
|
|
245
245
|
|
|
246
246
|
### Format rules
|
|
247
247
|
|
|
248
|
-
1. **Terse references with pointers.** Detail lives in shared files, not in the
|
|
249
|
-
2. **Max ~500 tokens.**
|
|
250
|
-
3. **Include the file pointer.** If the
|
|
248
|
+
1. **Terse references with pointers.** Detail lives in shared files, not in the signal body.
|
|
249
|
+
2. **Max ~500 tokens.** Signals are short coordination markers, not documents.
|
|
250
|
+
3. **Include the file pointer.** If the signal references work product, include the path: `bugs.md#BUG-003`, `bend-handoff.md#error-handling`.
|
|
251
251
|
|
|
252
252
|
### Good example
|
|
253
253
|
|
|
@@ -272,7 +272,7 @@ endpoint that retrieves a tenant by ID...
|
|
|
272
272
|
|
|
273
273
|
## 6. Design Council Message Format
|
|
274
274
|
|
|
275
|
-
Design Council is a structured deliberation
|
|
275
|
+
Design Council is a structured deliberation format using the signal vocabulary above. It is invoked when normal rejection cycles are insufficient to resolve a design disagreement. In the Workflow path the orchestrator script sequences the deliberation by routing the structured positions between the relevant phases.
|
|
276
276
|
|
|
277
277
|
### When to invoke
|
|
278
278
|
|
|
@@ -282,7 +282,7 @@ Design Council is a structured deliberation protocol using existing inbox primit
|
|
|
282
282
|
|
|
283
283
|
### Step 1: Initiator sends structured question
|
|
284
284
|
|
|
285
|
-
|
|
285
|
+
Direct the question at 2-3 relevant phases:
|
|
286
286
|
|
|
287
287
|
```
|
|
288
288
|
[DESIGN-COUNCIL] Topic: {description}
|
|
@@ -348,15 +348,13 @@ The decision block is written to `decisions.md` in the story directory. Any agen
|
|
|
348
348
|
|
|
349
349
|
- The **initiator decides**; others advise.
|
|
350
350
|
- Design Council is **not a replacement for the rejection cycle**. CRITIC still rejects; Design Council is for when rejection alone is not resolving the issue.
|
|
351
|
-
- Design Council is a **communication pattern**, not a separate mode. It uses
|
|
351
|
+
- Design Council is a **communication pattern**, not a separate mode. It uses the signal vocabulary in Section 5.
|
|
352
352
|
|
|
353
353
|
---
|
|
354
354
|
|
|
355
355
|
## 7. Headless Escalation Protocol
|
|
356
356
|
|
|
357
|
-
When
|
|
358
|
-
|
|
359
|
-
See `lead.md#headless-escalation-protocol` for full classification rules and behavior.
|
|
357
|
+
When a blocker requires human input, the workflow orchestrator classifies it, logs it to `{story_output_dir}/escalation-log.md`, outputs the structured escalation block to CLI for visibility, marks the story `blocked-on-user`, and moves to the next unblocked story. The pipeline does not pause for skippable blockers. Blocking escalations (quality gate failures) stop the current story cleanly before moving on.
|
|
360
358
|
|
|
361
359
|
### Escalation block format
|
|
362
360
|
|
|
@@ -370,7 +368,7 @@ Options:
|
|
|
370
368
|
1. {option 1}
|
|
371
369
|
2. {option 2}
|
|
372
370
|
3. {option 3 — if applicable}
|
|
373
|
-
Need: {what the
|
|
371
|
+
Need: {what the workflow needs from the user to proceed}
|
|
374
372
|
═══════════════════════════════════════════════
|
|
375
373
|
```
|
|
376
374
|
|
|
@@ -396,11 +394,11 @@ Need: Pick an option or provide guidance
|
|
|
396
394
|
- **Skippable** blockers (missing inputs): pipeline logs the escalation and moves to the next unblocked story
|
|
397
395
|
- **Blocking** failures (quality gate exhaustion): pipeline stops cleanly on this story, persists state, then moves to the next unblocked story if safe
|
|
398
396
|
- If no unblocked stories remain, the pipeline stops cleanly with persisted state
|
|
399
|
-
- Escalation is the **last resort** — the
|
|
397
|
+
- Escalation is the **last resort** — the workflow should exhaust autonomous resolution first (e.g., the code-owned rework cap routing rejections upstream, or Design Council deliberation)
|
|
400
398
|
- All escalations are logged in both `{story_output_dir}/escalation-log.md` and `story-report.md`
|
|
401
399
|
- **Resume:** user fixes inputs, sets story status to `pending` in backlog, re-runs pipeline
|
|
402
400
|
|
|
403
|
-
> **
|
|
401
|
+
> **Note:** Headless escalation is implemented (skip-and-log; blocked stories surface with status `blocked-on-user`). For async notification when escalations occur during headless runs, scheduled remote agents and Slack integration (via MCP) are candidate notification channels.
|
|
404
402
|
|
|
405
403
|
### Bad example
|
|
406
404
|
|
|
@@ -433,10 +431,10 @@ Agents should verify their output against this checklist before finalizing.
|
|
|
433
431
|
- [ ] Cross-references use explicit file paths and anchors (`file.md#section`)
|
|
434
432
|
- [ ] Structured data (lists, key-value pairs, YAML) used instead of paragraphs
|
|
435
433
|
|
|
436
|
-
###
|
|
434
|
+
### Inter-agent signals
|
|
437
435
|
|
|
438
436
|
- [ ] Terse -- under ~500 tokens
|
|
439
|
-
- [ ] Detail lives in a shared file, not the
|
|
437
|
+
- [ ] Detail lives in a shared file, not the signal body
|
|
440
438
|
- [ ] Includes file pointer when referencing work product
|
|
441
439
|
- [ ] No greetings, sign-offs, or filler
|
|
442
440
|
|
package/pipeline/docs/index.md
CHANGED
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Reference documentation for the valent-pipeline multi-agent AI SDLC system.
|
|
4
4
|
|
|
5
|
+
The pipeline runs on a single orchestration path: the **Claude Code Workflow** path
|
|
6
|
+
(`orchestrators/claude-code/*.workflow.js`, driven by the `valent-run-*-workflow` skills).
|
|
7
|
+
|
|
5
8
|
## Reference
|
|
6
9
|
|
|
7
10
|
Core documentation for understanding and operating the pipeline.
|
|
@@ -9,13 +12,12 @@ Core documentation for understanding and operating the pipeline.
|
|
|
9
12
|
| Document | Description |
|
|
10
13
|
|---|---|
|
|
11
14
|
| [Pipeline Overview](pipeline-overview.md) | What the pipeline is, what it consumes and produces, end-to-end flow, key concepts |
|
|
12
|
-
| [Agent Reference](agent-reference.md) | All
|
|
13
|
-
| [Communication Standard](communication-standard.md) | Distilled handoff format, inbox message types,
|
|
14
|
-
| [
|
|
15
|
-
| [
|
|
16
|
-
| [
|
|
17
|
-
| [
|
|
18
|
-
| [Template Skeleton](template-skeleton.md) | Universal structure for all 27 handoff templates -- frontmatter, orchestrator summary, required/conditional sections |
|
|
15
|
+
| [Agent Reference](agent-reference.md) | All agents: roles, models, inputs, outputs, project-type selection |
|
|
16
|
+
| [Communication Standard](communication-standard.md) | Distilled handoff format, inbox message types, human escalation |
|
|
17
|
+
| [Task Graph Specification](task-graph.md) | How the dev task graph is resolved (`resolve-graph`), task states, conditional pruning |
|
|
18
|
+
| [Pipeline State Schema](pipeline-state-schema.md) | JSON schema for pipeline-state.json -- backlog and sprint state (derived, human-readable view) |
|
|
19
|
+
| [Knowledge System](knowledge-system.md) | Correction directives, curated knowledge, RAG, retrospective curation flow |
|
|
20
|
+
| [Template Skeleton](template-skeleton.md) | Universal structure for handoff templates -- frontmatter, orchestrator summary, required/conditional sections |
|
|
19
21
|
|
|
20
22
|
## Operations
|
|
21
23
|
|
|
@@ -23,19 +25,8 @@ Guides for installation, packaging, and maintenance.
|
|
|
23
25
|
|
|
24
26
|
| Document | Description |
|
|
25
27
|
|---|---|
|
|
26
|
-
| [NPX Packaging](npx-packaging.md) | File classification (infrastructure vs project-specific vs runtime), init workflow, version management |
|
|
28
|
+
| [NPX Packaging](npx-packaging.md) | File classification (infrastructure vs project-specific vs runtime), init/upgrade workflow, version management |
|
|
27
29
|
| [NPX Implementation Plan](npx-implementation-plan.md) | Step-by-step build plan for the npm package |
|
|
28
|
-
| [Lean Spawn & Human Tasks](lean-spawn-human-tasks.md) | Optimization phases, SQLite validation tasks, NPX setup tasks |
|
|
29
|
-
|
|
30
|
-
## Design
|
|
31
|
-
|
|
32
|
-
Design documents for pipeline extensions and architectural decisions.
|
|
33
|
-
|
|
34
|
-
| Document | Description |
|
|
35
|
-
|---|---|
|
|
36
|
-
| [Refactor Checklist](design/refactor-checklist.md) | Every location to update when changing agents, config, tables, statuses, or phases |
|
|
37
|
-
| [Codex Provider Support](design/codex-provider-support.md) | Multi-provider architecture: Codex runtime adapter, sync strategy, phased implementation plan |
|
|
38
|
-
| [Provider Adapter Guide](design/provider-adapter-guide.md) | How the provider adapter pattern works, how to add provider-specific behavior, sync protocol |
|
|
39
30
|
|
|
40
31
|
## Quick Navigation
|
|
41
32
|
|
|
@@ -43,9 +34,7 @@ Design documents for pipeline extensions and architectural decisions.
|
|
|
43
34
|
|
|
44
35
|
- **New to the pipeline?** Start with [Pipeline Overview](pipeline-overview.md), then [Agent Reference](agent-reference.md)
|
|
45
36
|
- **Configuring a project?** See the [README](../../README.md) configuration section, then [NPX Packaging](npx-packaging.md)
|
|
46
|
-
- **Adding or changing agents?** Read [
|
|
47
|
-
- **Adding provider support?** Read [Provider Adapter Guide](design/provider-adapter-guide.md), then [Codex Provider Support](design/codex-provider-support.md)
|
|
48
|
-
- **Debugging a stuck pipeline?** Check [Lead Lifecycle](lead-lifecycle.md) sections on stall detection, rejection loops, and crash recovery
|
|
37
|
+
- **Adding or changing agents?** Read [Agent Reference](agent-reference.md) and [Task Graph Specification](task-graph.md)
|
|
49
38
|
- **Understanding the knowledge system?** Read [Knowledge System](knowledge-system.md) for correction directives, curation, and RAG assessment
|
|
50
39
|
- **Writing or modifying templates?** Consult [Template Skeleton](template-skeleton.md) for the universal structure
|
|
51
40
|
|
|
@@ -53,12 +42,11 @@ Design documents for pipeline extensions and architectural decisions.
|
|
|
53
42
|
|
|
54
43
|
| File | Documentation |
|
|
55
44
|
|---|---|
|
|
56
|
-
| `agents-manifest.yaml` | [Agent Reference](agent-reference.md) |
|
|
57
45
|
| `pipeline-config.yaml` | [README](../../README.md#configuration) |
|
|
58
46
|
| `pipeline-state.json` | [Pipeline State Schema](pipeline-state-schema.md) |
|
|
59
47
|
| `prompts/*.md` | [Agent Reference](agent-reference.md) |
|
|
60
48
|
| `templates/*.md` | [Template Skeleton](template-skeleton.md) |
|
|
61
49
|
| `task-graphs/*.yaml` | [Task Graph Specification](task-graph.md) |
|
|
62
50
|
| `steps/**/*.md` | Individual agent prompts reference their step files |
|
|
51
|
+
| `orchestrators/claude-code/*.workflow.js` | [Pipeline Overview](pipeline-overview.md) |
|
|
63
52
|
| `knowledge/` | [Knowledge System](knowledge-system.md) |
|
|
64
|
-
| `providers/**/*` | [Provider Adapter Guide](design/provider-adapter-guide.md) |
|