maestro-flow 0.3.21 → 0.3.23
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/.claude/commands/maestro-analyze.md +1 -1
- package/.claude/commands/maestro-brainstorm.md +1 -1
- package/.claude/commands/maestro-composer.md +3 -3
- package/.claude/commands/maestro-init.md +4 -4
- package/.claude/commands/maestro-roadmap.md +164 -108
- package/.claude/commands/maestro.md +19 -10
- package/.claude/commands/quality-business-test.md +2 -2
- package/.claude/skills/team-quality-assurance/roles/scout/role.md +1 -1
- package/.claude/skills/team-review/roles/reviewer/role.md +1 -1
- package/.claude/skills/team-review/roles/scanner/role.md +1 -1
- package/.claude/skills/team-tech-debt/roles/scanner/role.md +3 -3
- package/.codex/skills/maestro/SKILL.md +12 -9
- package/.codex/skills/maestro-brainstorm/SKILL.md +1 -1
- package/.codex/skills/maestro-composer/SKILL.md +3 -3
- package/.codex/skills/maestro-init/SKILL.md +1 -1
- package/.codex/skills/maestro-link-coordinate/SKILL.md +1 -1
- package/.codex/skills/maestro-player/SKILL.md +2 -2
- package/.codex/skills/maestro-roadmap/SKILL.md +443 -332
- package/.codex/skills/quality-business-test/SKILL.md +2 -2
- package/.codex/skills/team-coordinate/roles/coordinator/role.md +1 -1
- package/.codex/skills/team-lifecycle-v4/roles/coordinator/role.md +1 -1
- package/.codex/skills/team-quality-assurance/roles/scout/role.md +1 -1
- package/.codex/skills/team-review/roles/reviewer/role.md +1 -1
- package/.codex/skills/team-review/roles/scanner/role.md +1 -1
- package/.codex/skills/team-tech-debt/roles/scanner/role.md +3 -3
- package/chains/singles/spec-generate.json +3 -3
- package/chains/spec-driven.json +2 -2
- package/dashboard/dist-server/dashboard/src/server/agents/claude-code-adapter.js +4 -0
- package/dashboard/dist-server/dashboard/src/server/agents/claude-code-adapter.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/coordinator/chain-map.js +2 -2
- package/dashboard/dist-server/dashboard/src/server/coordinator/chain-map.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/install-utils.d.ts +5 -12
- package/dashboard/dist-server/dashboard/src/server/routes/install-utils.js +10 -65
- package/dashboard/dist-server/dashboard/src/server/routes/install-utils.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/install.js +17 -11
- package/dashboard/dist-server/dashboard/src/server/routes/install.js.map +1 -1
- package/dashboard/dist-server/src/agents/cli-agent-runner.d.ts +4 -0
- package/dashboard/dist-server/src/agents/cli-agent-runner.js +4 -2
- package/dashboard/dist-server/src/agents/cli-agent-runner.js.map +1 -1
- package/dashboard/dist-server/src/commands/delegate.d.ts +2 -0
- package/dashboard/dist-server/src/commands/delegate.js +20 -4
- package/dashboard/dist-server/src/commands/delegate.js.map +1 -1
- package/dashboard/dist-server/src/config/cli-tools-config.d.ts +64 -3
- package/dashboard/dist-server/src/config/cli-tools-config.js +226 -9
- package/dashboard/dist-server/src/config/cli-tools-config.js.map +1 -1
- package/dist/src/agents/cli-agent-runner.d.ts +4 -0
- package/dist/src/agents/cli-agent-runner.d.ts.map +1 -1
- package/dist/src/agents/cli-agent-runner.js +4 -2
- package/dist/src/agents/cli-agent-runner.js.map +1 -1
- package/dist/src/cli.js +2 -0
- package/dist/src/cli.js.map +1 -1
- package/dist/src/commands/cli.d.ts.map +1 -1
- package/dist/src/commands/cli.js +21 -4
- package/dist/src/commands/cli.js.map +1 -1
- package/dist/src/commands/delegate.d.ts +2 -0
- package/dist/src/commands/delegate.d.ts.map +1 -1
- package/dist/src/commands/delegate.js +20 -4
- package/dist/src/commands/delegate.js.map +1 -1
- package/dist/src/commands/install-backend.d.ts +5 -16
- package/dist/src/commands/install-backend.d.ts.map +1 -1
- package/dist/src/commands/install-backend.js +8 -104
- package/dist/src/commands/install-backend.js.map +1 -1
- package/dist/src/commands/install-ui/ExecutionView.js +1 -1
- package/dist/src/commands/install-ui/ExecutionView.js.map +1 -1
- package/dist/src/commands/install-ui/InstallExecution.d.ts +1 -0
- package/dist/src/commands/install-ui/InstallExecution.d.ts.map +1 -1
- package/dist/src/commands/install-ui/InstallExecution.js +19 -4
- package/dist/src/commands/install-ui/InstallExecution.js.map +1 -1
- package/dist/src/commands/install-ui/InstallResult.d.ts.map +1 -1
- package/dist/src/commands/install-ui/InstallResult.js +1 -1
- package/dist/src/commands/install-ui/InstallResult.js.map +1 -1
- package/dist/src/commands/install.d.ts.map +1 -1
- package/dist/src/commands/install.js +23 -3
- package/dist/src/commands/install.js.map +1 -1
- package/dist/src/commands/tools-ui/CommandReference.d.ts +7 -0
- package/dist/src/commands/tools-ui/CommandReference.d.ts.map +1 -0
- package/dist/src/commands/tools-ui/CommandReference.js +33 -0
- package/dist/src/commands/tools-ui/CommandReference.js.map +1 -0
- package/dist/src/commands/tools-ui/ConfigSources.d.ts +6 -0
- package/dist/src/commands/tools-ui/ConfigSources.d.ts.map +1 -0
- package/dist/src/commands/tools-ui/ConfigSources.js +27 -0
- package/dist/src/commands/tools-ui/ConfigSources.js.map +1 -0
- package/dist/src/commands/tools-ui/RegisterSettings.d.ts +8 -0
- package/dist/src/commands/tools-ui/RegisterSettings.d.ts.map +1 -0
- package/dist/src/commands/tools-ui/RegisterSettings.js +125 -0
- package/dist/src/commands/tools-ui/RegisterSettings.js.map +1 -0
- package/dist/src/commands/tools-ui/RoleMappings.d.ts +9 -0
- package/dist/src/commands/tools-ui/RoleMappings.d.ts.map +1 -0
- package/dist/src/commands/tools-ui/RoleMappings.js +104 -0
- package/dist/src/commands/tools-ui/RoleMappings.js.map +1 -0
- package/dist/src/commands/tools-ui/ToolsDashboard.d.ts +8 -0
- package/dist/src/commands/tools-ui/ToolsDashboard.d.ts.map +1 -0
- package/dist/src/commands/tools-ui/ToolsDashboard.js +60 -0
- package/dist/src/commands/tools-ui/ToolsDashboard.js.map +1 -0
- package/dist/src/commands/tools-ui/ToolsOverview.d.ts +9 -0
- package/dist/src/commands/tools-ui/ToolsOverview.d.ts.map +1 -0
- package/dist/src/commands/tools-ui/ToolsOverview.js +84 -0
- package/dist/src/commands/tools-ui/ToolsOverview.js.map +1 -0
- package/dist/src/commands/tools.d.ts +3 -0
- package/dist/src/commands/tools.d.ts.map +1 -0
- package/dist/src/commands/tools.js +78 -0
- package/dist/src/commands/tools.js.map +1 -0
- package/dist/src/config/cli-tools-config.d.ts +64 -3
- package/dist/src/config/cli-tools-config.d.ts.map +1 -1
- package/dist/src/config/cli-tools-config.js +226 -9
- package/dist/src/config/cli-tools-config.js.map +1 -1
- package/dist/src/core/component-defs.d.ts +16 -0
- package/dist/src/core/component-defs.d.ts.map +1 -0
- package/dist/src/core/component-defs.js +142 -0
- package/dist/src/core/component-defs.js.map +1 -0
- package/dist/src/core/manifest.d.ts +8 -1
- package/dist/src/core/manifest.d.ts.map +1 -1
- package/dist/src/core/manifest.js +29 -40
- package/dist/src/core/manifest.js.map +1 -1
- package/dist/src/core/tag-injector.d.ts +72 -0
- package/dist/src/core/tag-injector.d.ts.map +1 -0
- package/dist/src/core/tag-injector.js +228 -0
- package/dist/src/core/tag-injector.js.map +1 -0
- package/dist/src/index.d.ts +4 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +2 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/tools/spec-entry-parser.d.ts.map +1 -1
- package/dist/src/tools/spec-entry-parser.js +27 -1
- package/dist/src/tools/spec-entry-parser.js.map +1 -1
- package/dist/src/tools/spec-loader.d.ts +5 -1
- package/dist/src/tools/spec-loader.d.ts.map +1 -1
- package/dist/src/tools/spec-loader.js +47 -59
- package/dist/src/tools/spec-loader.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +1 -1
- package/templates/cli/prompts/workflow-skill-conflict-patterns.txt +1 -1
- package/templates/cli/prompts/workflow-skill-lessons-learned.txt +1 -1
- package/templates/search-tools.md +1 -1
- package/templates/workflows/specs/node-catalog.md +1 -1
- package/workflows/brainstorm.md +1 -1
- package/{.claude/CLAUDE.md → workflows/claude-instructions.md} +25 -26
- package/workflows/cli-tools-usage.md +16 -2
- package/workflows/codex-instructions.md +150 -0
- package/workflows/delegate-usage.md +16 -2
- package/workflows/execute.md +28 -14
- package/workflows/init.md +2 -2
- package/workflows/issue-discover.md +2 -2
- package/workflows/maestro-super.md +120 -0
- package/workflows/maestro.codex.md +4 -4
- package/workflows/maestro.md +5 -5
- package/workflows/roadmap-common.md +197 -0
- package/workflows/roadmap.md +190 -355
- package/workflows/spec-generate.md +457 -544
- package/.claude/commands/maestro-spec-generate.md +0 -78
- package/.codex/skills/maestro-spec-generate/SKILL.md +0 -355
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: maestro-spec-generate
|
|
3
|
-
description: Generate specification package from idea/requirements through 7-phase document chain producing product brief, PRD, architecture, epics, and interactive roadmap
|
|
4
|
-
argument-hint: "<idea or @file> [-y] [-c] [--count N]"
|
|
5
|
-
allowed-tools:
|
|
6
|
-
- Read
|
|
7
|
-
- Write
|
|
8
|
-
- Edit
|
|
9
|
-
- Bash
|
|
10
|
-
- Glob
|
|
11
|
-
- Grep
|
|
12
|
-
- Agent
|
|
13
|
-
- AskUserQuestion
|
|
14
|
-
---
|
|
15
|
-
<purpose>
|
|
16
|
-
Transform an idea, brainstorm output, or user requirements into a complete specification package through a 7-phase document chain: Discovery → Requirement Clarification → Product Brief → PRD → Architecture → Epics & Stories → Readiness Check → Roadmap Generation. Outputs a validated specification package with roadmap in `.workflow/.spec/` and writes `.workflow/roadmap.md` for downstream execution.
|
|
17
|
-
|
|
18
|
-
This is the heavy-path entry for structured decomposition: idea → spec-generate (spec + roadmap) → init → plan → execute.
|
|
19
|
-
</purpose>
|
|
20
|
-
|
|
21
|
-
<required_reading>
|
|
22
|
-
@~/.maestro/workflows/spec-generate.md
|
|
23
|
-
</required_reading>
|
|
24
|
-
|
|
25
|
-
<deferred_reading>
|
|
26
|
-
- [spec-config.json](~/.maestro/templates/spec-config.json) — read when initializing spec configuration
|
|
27
|
-
</deferred_reading>
|
|
28
|
-
|
|
29
|
-
<context>
|
|
30
|
-
$ARGUMENTS -- idea text, @file reference to requirements document, or brainstorm session reference.
|
|
31
|
-
|
|
32
|
-
Flags, input types, output location, and pipeline position defined in workflow spec-generate.md.
|
|
33
|
-
|
|
34
|
-
**Note:** `maestro-init` MUST run before this command. It creates the `.workflow/` directory and project context that spec-generate builds upon.
|
|
35
|
-
</context>
|
|
36
|
-
|
|
37
|
-
<execution>
|
|
38
|
-
Follow '~/.maestro/workflows/spec-generate.md' completely.
|
|
39
|
-
|
|
40
|
-
**Next-step routing on completion:**
|
|
41
|
-
- Roadmap generated, ready to plan → /maestro-plan 1
|
|
42
|
-
- Need UI design first → /maestro-ui-design 1
|
|
43
|
-
- Need analysis before planning → /maestro-analyze 1
|
|
44
|
-
- View project dashboard → /manage-status
|
|
45
|
-
</execution>
|
|
46
|
-
|
|
47
|
-
<error_codes>
|
|
48
|
-
| Code | Severity | Condition | Recovery |
|
|
49
|
-
|------|----------|-----------|----------|
|
|
50
|
-
| E001 | error | Idea/topic text or @file required | Prompt user for input |
|
|
51
|
-
| E002 | error | `.workflow/` not initialized (no parent dir) | Create `.workflow/` directory |
|
|
52
|
-
| E003 | error | Brainstorm session not found (--from-brainstorm) | Show available sessions |
|
|
53
|
-
| E004 | error | Phase 6 readiness Fail after 2 auto-fix iterations | Present manual fix options |
|
|
54
|
-
| W001 | warning | CLI analysis failed, using fallback | Continue with available data |
|
|
55
|
-
| W002 | warning | Codebase exploration failed | Continue without codebase context |
|
|
56
|
-
| W005 | warning | External research agent failed | Continue without apiResearchContext |
|
|
57
|
-
| W003 | warning | Glossary has < 5 terms | Note in readiness check |
|
|
58
|
-
| W004 | warning | Review-level readiness score (60-79%) | Proceed with caveats |
|
|
59
|
-
</error_codes>
|
|
60
|
-
|
|
61
|
-
<success_criteria>
|
|
62
|
-
- [ ] `spec-config.json` created with session metadata and phase tracking
|
|
63
|
-
- [ ] `product-brief.md` with vision, goals, scope, multi-perspective synthesis
|
|
64
|
-
- [ ] `glossary.json` with 5+ core terms for cross-document consistency
|
|
65
|
-
- [ ] `requirements/` directory with `_index.md` + individual `REQ-*.md` + `NFR-*.md` files
|
|
66
|
-
- [ ] All requirements have RFC 2119 keywords and acceptance criteria
|
|
67
|
-
- [ ] `architecture/` directory with `_index.md` + individual `ADR-*.md` files
|
|
68
|
-
- [ ] Architecture includes state machine, config model, error handling, observability (service type)
|
|
69
|
-
- [ ] `epics/` directory with `_index.md` + individual `EPIC-*.md` files
|
|
70
|
-
- [ ] Cross-Epic dependency map (Mermaid) and MVP subset tagged
|
|
71
|
-
- [ ] `readiness-report.md` with 4-dimension quality scores and traceability matrix
|
|
72
|
-
- [ ] `spec-summary.md` with one-page executive summary
|
|
73
|
-
- [ ] All documents have valid YAML frontmatter with session_id
|
|
74
|
-
- [ ] Glossary terms used consistently across all documents
|
|
75
|
-
- [ ] Readiness gate: Pass (>=80%) or Review (>=60%) with documented caveats
|
|
76
|
-
- [ ] `roadmap.md` generated from Epics with interactive user confirmation
|
|
77
|
-
- [ ] `.workflow/roadmap.md` written (if `.workflow/` exists)
|
|
78
|
-
</success_criteria>
|
|
@@ -1,355 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: maestro-spec-generate
|
|
3
|
-
description: Specification package generation via 2-wave CSV pipeline. Wave 1 runs parallel research agents (domain, competitive, tech stack). Wave 2 runs sequential 7-phase document chain using research context. Replaces maestro-spec-generate command.
|
|
4
|
-
argument-hint: "\"<idea or @file>\" [-y|--yes] [--skip-research] [--from-brainstorm SESSION-ID]"
|
|
5
|
-
allowed-tools: spawn_agents_on_csv, Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
<purpose>
|
|
9
|
-
2-wave specification generation using `spawn_agents_on_csv`. Wave 1 runs parallel research agents to gather domain, competitive, and technical context. Wave 2 runs a single synthesis agent that produces the full 7-phase document chain (product brief, PRD, architecture, data model, API spec, UI wireframes, epic-to-roadmap) using Wave 1 research as context.
|
|
10
|
-
|
|
11
|
-
**Core workflow**: Parse Input -> Parallel Research -> Sequential Document Chain -> Readiness Check -> Roadmap Output
|
|
12
|
-
|
|
13
|
-
```
|
|
14
|
-
+---------------------------------------------------------------------------+
|
|
15
|
-
| SPEC GENERATE CSV WAVE WORKFLOW |
|
|
16
|
-
+---------------------------------------------------------------------------+
|
|
17
|
-
| |
|
|
18
|
-
| Phase 1: Input Parsing + CSV Generation |
|
|
19
|
-
| +-- Parse idea/topic from arguments |
|
|
20
|
-
| +-- Detect input type (text, @file, brainstorm import) |
|
|
21
|
-
| +-- Initialize session directory + spec-config.json |
|
|
22
|
-
| +-- Codebase detection (conditional exploration) |
|
|
23
|
-
| +-- Generate tasks.csv with research + synthesis rows |
|
|
24
|
-
| +-- User validates breakdown (skip if -y) |
|
|
25
|
-
| |
|
|
26
|
-
| Phase 2: Wave Execution Engine |
|
|
27
|
-
| +-- Wave 1: Research (parallel) |
|
|
28
|
-
| | +-- Domain research agent: problem space, competitors, trends |
|
|
29
|
-
| | +-- Competitive analysis agent: existing solutions, gaps |
|
|
30
|
-
| | +-- Tech stack analysis agent: feasibility, constraints, stack |
|
|
31
|
-
| | +-- Discoveries shared via board (patterns, tech, domain) |
|
|
32
|
-
| | +-- Results: findings per research dimension |
|
|
33
|
-
| +-- Wave 2: Document Chain (sequential synthesis) |
|
|
34
|
-
| | +-- Single agent produces 7-phase output: |
|
|
35
|
-
| | | 1. Product Brief (vision, goals, scope) |
|
|
36
|
-
| | | 2. PRD / Requirements (REQ-*, NFR-*) |
|
|
37
|
-
| | | 3. Architecture (ADR-*, component design) |
|
|
38
|
-
| | | 4. Data Model (entities, relationships) |
|
|
39
|
-
| | | 5. API Specification (endpoints, contracts) |
|
|
40
|
-
| | | 6. UI Wireframes (user flows, screen specs) |
|
|
41
|
-
| | | 7. Epic-to-Roadmap (EPIC-*, phase mapping) |
|
|
42
|
-
| | +-- Uses Wave 1 research as prev_context |
|
|
43
|
-
| | +-- Generates glossary.json for terminology consistency |
|
|
44
|
-
| +-- discoveries.ndjson shared across all waves (append-only) |
|
|
45
|
-
| |
|
|
46
|
-
| Phase 3: Results Aggregation |
|
|
47
|
-
| +-- Export results.csv |
|
|
48
|
-
| +-- Run readiness check (completeness, consistency, traceability) |
|
|
49
|
-
| +-- Generate context.md with spec summary |
|
|
50
|
-
| +-- Write spec package to .workflow/.spec/SPEC-{slug}-{date}/ |
|
|
51
|
-
| +-- Write .workflow/roadmap.md |
|
|
52
|
-
| +-- Display summary with quality score + next steps |
|
|
53
|
-
| |
|
|
54
|
-
+---------------------------------------------------------------------------+
|
|
55
|
-
```
|
|
56
|
-
</purpose>
|
|
57
|
-
|
|
58
|
-
<context>
|
|
59
|
-
$ARGUMENTS -- idea/topic text or @file reference, plus optional flags.
|
|
60
|
-
|
|
61
|
-
**Usage**:
|
|
62
|
-
|
|
63
|
-
```bash
|
|
64
|
-
$maestro-spec-generate "Build a real-time collaboration platform"
|
|
65
|
-
$maestro-spec-generate -y "@requirements.md"
|
|
66
|
-
$maestro-spec-generate --skip-research "CLI workflow orchestration tool"
|
|
67
|
-
$maestro-spec-generate --from-brainstorm WFS-001 "Enhance auth system"
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
**Flags**:
|
|
71
|
-
- `-y, --yes`: Skip all confirmations (auto mode)
|
|
72
|
-
- `--skip-research`: Skip Wave 1 research, jump directly to document generation
|
|
73
|
-
- `--from-brainstorm SESSION-ID`: Import guidance-specification.md from brainstorm session as seed
|
|
74
|
-
|
|
75
|
-
When `--yes` or `-y`: Auto-confirm all interactive decisions, skip requirement clarification rounds, use recommended defaults for spec type and depth.
|
|
76
|
-
|
|
77
|
-
**Output Directory**: `.workflow/.csv-wave/{session-id}/`
|
|
78
|
-
**Core Output**: `tasks.csv` (master state) + `results.csv` (final) + `discoveries.ndjson` (shared exploration) + `context.md` (human-readable report) + spec package in `.workflow/.spec/SPEC-{slug}-{date}/`
|
|
79
|
-
</context>
|
|
80
|
-
|
|
81
|
-
<csv_schema>
|
|
82
|
-
|
|
83
|
-
### tasks.csv (Master State)
|
|
84
|
-
|
|
85
|
-
```csv
|
|
86
|
-
id,title,description,research_focus,doc_phase,deps,context_from,wave,status,findings,output_file,error
|
|
87
|
-
"1","Domain Research","Research the problem domain: identify target users, market needs, existing solutions, industry trends, and domain terminology. Produce structured findings with confidence levels.","domain","","","","1","","","",""
|
|
88
|
-
"2","Competitive Analysis","Analyze competing products and approaches: feature comparison matrix, UX patterns, pricing models, market positioning. Identify gaps and opportunities for differentiation.","competitive","","","","1","","","",""
|
|
89
|
-
"3","Tech Stack Analysis","Evaluate technical feasibility: recommended languages, frameworks, databases, infrastructure. Assess constraints, integration complexity, scalability requirements. Reference existing codebase if available.","tech_stack","","","","1","","","",""
|
|
90
|
-
"4","Document Chain","Generate complete 7-phase specification package using research context. Phases: (1) Product Brief with vision/goals/scope, (2) PRD with REQ-*/NFR-* requirements, (3) Architecture with ADR-* decisions, (4) Data Model with entity relationships, (5) API Specification with endpoint contracts, (6) UI Wireframes with user flows, (7) Epic-to-Roadmap with EPIC-* and phase mapping. Produce glossary.json for terminology consistency across all documents.","","1-7","1;2;3","1;2;3","2","","","",""
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
**Columns**:
|
|
94
|
-
|
|
95
|
-
| Column | Phase | Description |
|
|
96
|
-
|--------|-------|-------------|
|
|
97
|
-
| `id` | Input | Unique task identifier (string) |
|
|
98
|
-
| `title` | Input | Short task title |
|
|
99
|
-
| `description` | Input | Detailed instructions for this task |
|
|
100
|
-
| `research_focus` | Input | Research dimension: domain/competitive/tech_stack (Wave 1 only) |
|
|
101
|
-
| `doc_phase` | Input | Document phase range: "1-7" (Wave 2 only, empty for research) |
|
|
102
|
-
| `deps` | Input | Semicolon-separated dependency task IDs |
|
|
103
|
-
| `context_from` | Input | Semicolon-separated task IDs whose findings this task needs |
|
|
104
|
-
| `wave` | Computed | Wave number (1 = research, 2 = document chain) |
|
|
105
|
-
| `status` | Output | `pending` -> `completed` / `failed` / `skipped` |
|
|
106
|
-
| `findings` | Output | Key findings summary (max 500 chars) |
|
|
107
|
-
| `output_file` | Output | Path to generated output file(s), semicolon-separated |
|
|
108
|
-
| `error` | Output | Error message if failed |
|
|
109
|
-
|
|
110
|
-
### Per-Wave CSV (Temporary)
|
|
111
|
-
|
|
112
|
-
Each wave generates `wave-{N}.csv` with extra `prev_context` column.
|
|
113
|
-
</csv_schema>
|
|
114
|
-
|
|
115
|
-
<invariants>
|
|
116
|
-
1. **Start Immediately**: First action is session initialization, then Phase 1
|
|
117
|
-
2. **Wave Order is Sacred**: Never execute wave 2 before wave 1 completes and results are merged
|
|
118
|
-
3. **CSV is Source of Truth**: Master tasks.csv holds all state
|
|
119
|
-
4. **Context Propagation**: prev_context built from master CSV, not from memory
|
|
120
|
-
5. **Discovery Board is Append-Only**: Never clear, modify, or recreate discoveries.ndjson
|
|
121
|
-
6. **Graceful Degradation**: If research fails, document chain proceeds with seed input only
|
|
122
|
-
7. **Cleanup Temp Files**: Remove wave-{N}.csv after results are merged
|
|
123
|
-
8. **DO NOT STOP**: Continuous execution until all waves complete
|
|
124
|
-
</invariants>
|
|
125
|
-
|
|
126
|
-
<execution>
|
|
127
|
-
|
|
128
|
-
### Output Artifacts
|
|
129
|
-
|
|
130
|
-
| File | Purpose | Lifecycle |
|
|
131
|
-
|------|---------|-----------|
|
|
132
|
-
| `tasks.csv` | Master state -- all tasks with status/findings | Updated after each wave |
|
|
133
|
-
| `wave-{N}.csv` | Per-wave input (temporary) | Created before wave, deleted after |
|
|
134
|
-
| `results.csv` | Final export of all task results | Created in Phase 3 |
|
|
135
|
-
| `discoveries.ndjson` | Shared exploration board | Append-only, carries across waves |
|
|
136
|
-
| `context.md` | Human-readable spec generation report | Created in Phase 3 |
|
|
137
|
-
| `spec-config.json` | Session metadata and phase tracking | Created in Phase 1 |
|
|
138
|
-
|
|
139
|
-
### Session Structure
|
|
140
|
-
|
|
141
|
-
```
|
|
142
|
-
.workflow/.csv-wave/{YYYYMMDD}-spec-generate-{slug}/
|
|
143
|
-
+-- tasks.csv
|
|
144
|
-
+-- results.csv
|
|
145
|
-
+-- discoveries.ndjson
|
|
146
|
-
+-- context.md
|
|
147
|
-
+-- spec-config.json
|
|
148
|
-
+-- wave-{N}.csv (temporary)
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
**Spec package output**:
|
|
152
|
-
```
|
|
153
|
-
.workflow/.spec/SPEC-{slug}-{date}/
|
|
154
|
-
+-- spec-config.json
|
|
155
|
-
+-- product-brief.md
|
|
156
|
-
+-- glossary.json
|
|
157
|
-
+-- requirements/
|
|
158
|
-
| +-- _index.md
|
|
159
|
-
| +-- REQ-NNN-{slug}.md
|
|
160
|
-
| +-- NFR-{type}-NNN-{slug}.md
|
|
161
|
-
+-- architecture/
|
|
162
|
-
| +-- _index.md
|
|
163
|
-
| +-- ADR-NNN-{slug}.md
|
|
164
|
-
+-- epics/
|
|
165
|
-
| +-- _index.md
|
|
166
|
-
| +-- EPIC-NNN-{slug}.md
|
|
167
|
-
+-- readiness-report.md
|
|
168
|
-
+-- spec-summary.md
|
|
169
|
-
+-- roadmap.md
|
|
170
|
-
```
|
|
171
|
-
|
|
172
|
-
### Session Initialization
|
|
173
|
-
|
|
174
|
-
Parse `$ARGUMENTS` to extract:
|
|
175
|
-
- `AUTO_YES` from `--yes` / `-y`
|
|
176
|
-
- `skipResearch` from `--skip-research`
|
|
177
|
-
- `brainstormSession` from `--from-brainstorm <SESSION-ID>`
|
|
178
|
-
- `topicArg` = remaining text after stripping all flags
|
|
179
|
-
- `slug` = topicArg lowercased, non-alphanumeric → `-`, max 40 chars
|
|
180
|
-
|
|
181
|
-
Session ID: `{YYYYMMDD}-spec-generate-{slug}`
|
|
182
|
-
Session folder: `.workflow/.csv-wave/{sessionId}/` — create via `mkdir -p`
|
|
183
|
-
|
|
184
|
-
### Phase 1: Input Parsing + CSV Generation
|
|
185
|
-
|
|
186
|
-
**Objective**: Parse input, detect type, initialize session, generate tasks.csv.
|
|
187
|
-
|
|
188
|
-
**Decomposition Rules**:
|
|
189
|
-
|
|
190
|
-
1. **Input parsing**: Parse `{topicArg}` -- direct text, `@file` reference, or brainstorm import
|
|
191
|
-
2. **Brainstorm import**: If `--from-brainstorm`, read `guidance-specification.md` as enriched seed
|
|
192
|
-
3. **Codebase detection**: Check for source files (*.ts, *.js, *.py); if found, add codebase context to research prompts
|
|
193
|
-
4. **Session init**: Create `spec-config.json` with session metadata
|
|
194
|
-
|
|
195
|
-
5. **CSV generation**:
|
|
196
|
-
|
|
197
|
-
| Condition | Wave 1 Tasks | Wave 2 Tasks |
|
|
198
|
-
|-----------|-------------|-------------|
|
|
199
|
-
| Normal | 3 research agents | 1 document chain agent |
|
|
200
|
-
| `--skip-research` | 0 (skipped) | 1 document chain agent (wave 1) |
|
|
201
|
-
| `--from-brainstorm` | 3 research agents (enriched) | 1 document chain agent |
|
|
202
|
-
|
|
203
|
-
6. **Wave computation**: Simple 2-wave -- all research tasks = wave 1, document chain = wave 2.
|
|
204
|
-
|
|
205
|
-
**User validation**: Display task breakdown (skip if AUTO_YES).
|
|
206
|
-
|
|
207
|
-
### Phase 2: Wave Execution Engine
|
|
208
|
-
|
|
209
|
-
**Objective**: Execute research and document generation wave-by-wave via spawn_agents_on_csv.
|
|
210
|
-
|
|
211
|
-
#### Wave 1: Research (Parallel)
|
|
212
|
-
|
|
213
|
-
Filter master `tasks.csv` for `wave == 1 AND status == pending` → write `wave-1.csv` (no prev_context needed).
|
|
214
|
-
|
|
215
|
-
```javascript
|
|
216
|
-
spawn_agents_on_csv({
|
|
217
|
-
csv_path: `${sessionFolder}/wave-1.csv`,
|
|
218
|
-
id_column: "id",
|
|
219
|
-
instruction: buildResearchInstruction(sessionFolder, topicArg),
|
|
220
|
-
max_concurrency: 3,
|
|
221
|
-
max_runtime_seconds: 3600,
|
|
222
|
-
output_csv_path: `${sessionFolder}/wave-1-results.csv`,
|
|
223
|
-
output_schema: {
|
|
224
|
-
type: "object",
|
|
225
|
-
properties: {
|
|
226
|
-
id: { type: "string" },
|
|
227
|
-
status: { type: "string", enum: ["completed", "failed"] },
|
|
228
|
-
findings: { type: "string" },
|
|
229
|
-
output_file: { type: "string" },
|
|
230
|
-
error: { type: "string" }
|
|
231
|
-
},
|
|
232
|
-
required: ["id", "status", "findings"]
|
|
233
|
-
}
|
|
234
|
-
})
|
|
235
|
-
```
|
|
236
|
-
|
|
237
|
-
Merge `wave-1-results.csv` into master `tasks.csv`, delete `wave-1.csv`.
|
|
238
|
-
|
|
239
|
-
#### Wave 2: Document Chain (Sequential)
|
|
240
|
-
|
|
241
|
-
Filter master `tasks.csv` for `wave == 2 AND status == pending`. If all wave 1 tasks failed, use degraded mode (basic seed only).
|
|
242
|
-
|
|
243
|
-
Build `prev_context` from wave 1 findings (format: `[Task N: Title] summary...` per task).
|
|
244
|
-
Write `wave-2.csv` with `prev_context` column → execute `spawn_agents_on_csv` → merge results → delete `wave-2.csv`.
|
|
245
|
-
|
|
246
|
-
### Phase 3: Results Aggregation
|
|
247
|
-
|
|
248
|
-
**Objective**: Generate final results, readiness check, and write spec package.
|
|
249
|
-
|
|
250
|
-
Export master `tasks.csv` as `results.csv`. **Readiness check** -- score on 4 dimensions (25% each):
|
|
251
|
-
- Completeness: all required documents generated with substantive content
|
|
252
|
-
- Consistency: glossary terms used uniformly, scope containment
|
|
253
|
-
- Traceability: goals -> requirements -> architecture -> epics chain
|
|
254
|
-
- Depth: acceptance criteria testable, ADRs justified, stories estimable
|
|
255
|
-
|
|
256
|
-
**Gate decision**:
|
|
257
|
-
|
|
258
|
-
| Score | Gate | Action |
|
|
259
|
-
|-------|------|--------|
|
|
260
|
-
| >= 80% | Pass | Proceed to output |
|
|
261
|
-
| 60-79% | Review | Proceed with caveats logged |
|
|
262
|
-
| < 60% | Fail | Log issues, proceed with available output |
|
|
263
|
-
|
|
264
|
-
Generate `context.md`:
|
|
265
|
-
|
|
266
|
-
```markdown
|
|
267
|
-
# Spec Generate Report
|
|
268
|
-
|
|
269
|
-
## Summary
|
|
270
|
-
- Topic: {topic}
|
|
271
|
-
- Research agents: {research_count} ({completed_count} completed)
|
|
272
|
-
- Document phases: 7
|
|
273
|
-
- Quality score: {score}% ({gate})
|
|
274
|
-
|
|
275
|
-
## Research Findings
|
|
276
|
-
### Domain Research
|
|
277
|
-
{findings}
|
|
278
|
-
|
|
279
|
-
### Competitive Analysis
|
|
280
|
-
{findings}
|
|
281
|
-
|
|
282
|
-
### Tech Stack Analysis
|
|
283
|
-
{findings}
|
|
284
|
-
|
|
285
|
-
## Document Chain Output
|
|
286
|
-
- Product Brief: {status}
|
|
287
|
-
- Requirements: {req_count} REQs + {nfr_count} NFRs
|
|
288
|
-
- Architecture: {adr_count} ADRs
|
|
289
|
-
- Epics: {epic_count} Epics
|
|
290
|
-
- Roadmap: {phase_count} phases
|
|
291
|
-
|
|
292
|
-
## Readiness
|
|
293
|
-
- Completeness: {score}%
|
|
294
|
-
- Consistency: {score}%
|
|
295
|
-
- Traceability: {score}%
|
|
296
|
-
- Depth: {score}%
|
|
297
|
-
- Overall: {score}% ({gate})
|
|
298
|
-
```
|
|
299
|
-
|
|
300
|
-
Write spec package to `.workflow/.spec/SPEC-{slug}-{date}/`, write `.workflow/roadmap.md`, display summary.
|
|
301
|
-
|
|
302
|
-
### Shared Discovery Board Protocol
|
|
303
|
-
|
|
304
|
-
#### Standard Discovery Types
|
|
305
|
-
|
|
306
|
-
| Type | Dedup Key | Data Schema | Description |
|
|
307
|
-
|------|-----------|-------------|-------------|
|
|
308
|
-
| `code_pattern` | `data.name` | `{name, file, description}` | Reusable code pattern found |
|
|
309
|
-
| `integration_point` | `data.file` | `{file, description, exports[]}` | Module connection point |
|
|
310
|
-
| `convention` | singleton | `{naming, imports, formatting}` | Project code conventions |
|
|
311
|
-
| `tech_stack` | singleton | `{framework, language, tools[]}` | Technology stack info |
|
|
312
|
-
|
|
313
|
-
#### Domain Discovery Types
|
|
314
|
-
|
|
315
|
-
| Type | Dedup Key | Data Schema | Description |
|
|
316
|
-
|------|-----------|-------------|-------------|
|
|
317
|
-
| `domain_term` | `data.term` | `{term, definition, aliases}` | Domain terminology |
|
|
318
|
-
| `competitor` | `data.name` | `{name, features[], gaps[]}` | Competitive product |
|
|
319
|
-
| `market_trend` | `data.name` | `{name, impact, relevance}` | Market trend |
|
|
320
|
-
| `tech_constraint` | `data.name` | `{name, type, severity, mitigation}` | Technical constraint |
|
|
321
|
-
|
|
322
|
-
#### Protocol
|
|
323
|
-
|
|
324
|
-
Read `{session_folder}/discoveries.ndjson` before own analysis. Deduplicate by type + dedup key before writing. Append-only — never modify or delete.
|
|
325
|
-
|
|
326
|
-
```bash
|
|
327
|
-
echo '{"ts":"<ISO>","worker":"{id}","type":"domain_term","data":{"term":"workflow","definition":"A sequence of orchestrated tasks","aliases":["pipeline","process"]}}' >> {session_folder}/discoveries.ndjson
|
|
328
|
-
```
|
|
329
|
-
</execution>
|
|
330
|
-
|
|
331
|
-
<error_codes>
|
|
332
|
-
| Error | Resolution |
|
|
333
|
-
|-------|------------|
|
|
334
|
-
| No idea/topic provided | Abort with error: "Idea or topic text required" |
|
|
335
|
-
| Brainstorm session not found | Abort with error: "Session {id} not found" -- list available sessions |
|
|
336
|
-
| @file not found | Abort with error: "File {path} not found" |
|
|
337
|
-
| Research agent timeout | Mark as failed, document chain uses available findings |
|
|
338
|
-
| All research agents failed | Document chain runs in degraded mode (seed only) |
|
|
339
|
-
| Document chain agent failed | Export partial output, log quality issues |
|
|
340
|
-
| CSV parse error | Validate format, show line number |
|
|
341
|
-
| discoveries.ndjson corrupt | Ignore malformed lines |
|
|
342
|
-
| Readiness score < 60% | Log issues, proceed with available output |
|
|
343
|
-
</error_codes>
|
|
344
|
-
|
|
345
|
-
<success_criteria>
|
|
346
|
-
- [ ] Input parsed from text, @file, or brainstorm session
|
|
347
|
-
- [ ] Session initialized with spec-config.json and tasks.csv
|
|
348
|
-
- [ ] Wave 1 research agents completed (domain, competitive, tech stack)
|
|
349
|
-
- [ ] Wave 2 document chain produced 7-phase spec package
|
|
350
|
-
- [ ] Readiness check scored on completeness, consistency, traceability, depth
|
|
351
|
-
- [ ] Spec package written to .workflow/.spec/SPEC-{slug}-{date}/
|
|
352
|
-
- [ ] .workflow/roadmap.md written
|
|
353
|
-
- [ ] context.md generated with research and spec summary
|
|
354
|
-
- [ ] Completion report displayed with quality score and next steps
|
|
355
|
-
</success_criteria>
|