maestro-flow-one 0.2.25 → 0.2.27

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.
@@ -13,28 +13,56 @@ allowed-tools:
13
13
  ---
14
14
  <purpose>
15
15
  Initialize a new project through auto state detection and unified flow. Invoked when starting a fresh project or onboarding an existing codebase into workflow management. Produces the `.workflow/` directory structure with project.md, state.json, config.json, and specs. Does NOT create roadmap — use maestro-roadmap (light mode, default) or maestro-roadmap --mode full (spec package) as the next step.
16
+
17
+ Pipeline position: entry point (no upstream). Downstream: `maestro-roadmap` or `maestro-brainstorm`.
16
18
  </purpose>
17
19
 
18
20
  <required_reading>
19
21
  @~/.maestro/workflows/init.md
20
- @~/.maestro/templates/project.md
21
- @~/.maestro/templates/state.json
22
- @~/.maestro/templates/config.json
23
22
  </required_reading>
24
23
 
24
+ <deferred_reading>
25
+ - [project.md](~/.maestro/templates/project.md) — read when generating project description
26
+ - [state.json](~/.maestro/templates/state.json) — read when creating initial state
27
+ - [config.json](~/.maestro/templates/config.json) — read when creating workflow configuration
28
+ </deferred_reading>
29
+
25
30
  <context>
31
+ $ARGUMENTS — none for interactive mode, or `-y` with `@file` reference for auto mode.
32
+
26
33
  **Flags:**
27
- - `-y` -- Automatic mode. After config questions, runs research without further interaction. Expects idea document via @ reference.
28
- - `--from <source>` -- Load upstream context package (brainstorm:ID, @file, or path). Consumes context-package.json to pre-fill project vision, goals, constraints, and terminology. Skips interactive questioning. Alias: `--from-brainstorm`
34
+
35
+ | Flag | Effect | Default |
36
+ |------|--------|---------|
37
+ | `-y` / `--yes` | Automatic mode. After config questions, runs research without further interaction. Expects idea document via @ reference. | `false` |
38
+ | `--from <source>` | Load upstream context package (brainstorm:ID, @file, or path). Consumes context-package.json to pre-fill project vision, goals, constraints, and terminology. Skips interactive questioning. Alias: `--from-brainstorm` | — |
29
39
 
30
40
  **Load project state if exists:**
31
41
  Check for `.workflow/state.json` -- loads context if project already initialized.
32
42
  </context>
33
43
 
44
+ <interview_protocol>
45
+ Follows @~/.maestro/workflows/interview-mechanics.md standard.
46
+
47
+ **Interaction mode**: convergent menu-driven
48
+ **Decision tree** (strict order): project type (greenfield / existing codebase onboarding) → tech stack detection and confirmation → directory structure preferences → initial configuration (specs categories, wiki bootstrap)
49
+ **Scope guard**: only init decisions; do not prejudge roadmap structure or plan scope
50
+ **Writeback target**: project.md (project description) + config.json (settings) + state.json (initial state)
51
+ **Additional skip conditions**: --from source (upstream context pre-fills decisions)
52
+ **Exit condition**: all configuration questions settled → proceed to workflow execution
53
+ </interview_protocol>
54
+
34
55
  <execution>
56
+ ### Pre-flight
57
+
58
+ 1. Check if `.workflow/` already exists — if so, load state and warn (E002 for greenfield conflicts)
59
+ 2. Validate `--from` source is accessible if provided
60
+
35
61
  Follow '~/.maestro/workflows/init.md' completely.
62
+ </execution>
36
63
 
37
- **Report format on completion:**
64
+ <completion>
65
+ ### Standalone report
38
66
 
39
67
  ```
40
68
  === WORKFLOW INITIALIZED ===
@@ -46,17 +74,31 @@ Created:
46
74
  .workflow/state.json
47
75
  .workflow/config.json
48
76
  .workflow/specs/
77
+ ```
49
78
 
50
- Next steps (choose one path to create roadmap):
51
- /maestro-roadmap <requirement> -- Direct interactive roadmap (light, default)
52
- /maestro-roadmap --mode full <idea> -- Full spec package + roadmap (heavy)
79
+ ### Ralph-invoked completion
53
80
 
54
- Other commands:
55
- /manage-status -- View project dashboard
56
- /maestro-brainstorm <topic> -- Explore ideas first
57
- /maestro-quick <task> -- Quick ad-hoc task
81
+ End the step by calling the CLI (no text block output):
58
82
  ```
59
- </execution>
83
+ maestro ralph complete <idx> --status {STATUS} [--evidence {path}]
84
+ ```
85
+
86
+ Status verdicts:
87
+ - **DONE** — Normal completion
88
+ - **DONE_WITH_CONCERNS** — Completed with caveats; pass `--concerns`
89
+ - **NEEDS_RETRY** — Tooling error / transient issue; ralph will retry
90
+ - **BLOCKED** — External hard blocker; pass `--reason`
91
+
92
+ ### Next-step routing
93
+
94
+ | Condition | Suggestion |
95
+ |-----------|-----------|
96
+ | Roadmap needed (default light) | `/maestro-roadmap <requirement>` |
97
+ | Full spec package + roadmap | `/maestro-roadmap --mode full <idea>` |
98
+ | Explore ideas first | `/maestro-brainstorm <topic>` |
99
+ | View project dashboard | `/manage-status` |
100
+ | Quick ad-hoc task | `/maestro-quick <task>` |
101
+ </completion>
60
102
 
61
103
  <error_codes>
62
104
  | Code | Severity | Condition | Recovery |
@@ -68,11 +110,11 @@ Other commands:
68
110
  </error_codes>
69
111
 
70
112
  <success_criteria>
71
- - [ ] Deep questioning completed (threads followed, not rushed) — or extracted from document/brainstorm
72
113
  - [ ] `.workflow/project.md` created with Core Value, Requirements (Validated/Active/Out of Scope), Key Decisions
73
114
  - [ ] `.workflow/state.json` created with artifacts[] array, initialized to idle state
74
115
  - [ ] `.workflow/config.json` created with workflow / execution / git / gates / codebase / guard / collab / specInjection / dashboard segments
75
116
  - [ ] `.workflow/specs/` initialized with convention files
76
- - [ ] Research completed (if enabled) 4 parallel agents spawned
77
- - [ ] User knows next step is `/maestro-roadmap` (light) or `/maestro-roadmap --mode full` (spec package)
117
+ - [ ] All interview decisions written to project.md / config.json before proceeding
118
+ - [ ] Research completed (if enabled) parallel agents spawned with results merged
119
+ - [ ] Next-step routing displayed in completion report
78
120
  </success_criteria>
@@ -120,7 +120,13 @@ For each created TASK-{NNN}.json that has issue_id:
120
120
 
121
121
  This ensures issue → TASK traceability. The `task_refs[]` and `task_plan_dir` fields on the issue allow the dashboard to resolve and display associated TASK details.
122
122
 
123
- **Report format on completion:**
123
+ ### Mode: Revise / Check
124
+
125
+ Follow workflow plan.md § "Revise Mode" and § "Check Mode" respectively. These modes bypass the standard P1-P5 create pipeline.
126
+ </execution>
127
+
128
+ <completion>
129
+ ### Standalone report
124
130
 
125
131
  ```
126
132
  === PLAN READY ===
@@ -131,20 +137,16 @@ Collision: {collision_status}
131
137
 
132
138
  Plan: scratch/{YYYYMMDD}-plan-P{N}-{slug}/plan.json
133
139
  Tasks: scratch/{YYYYMMDD}-plan-P{N}-{slug}/.task/TASK-*.json
134
-
135
- Next steps:
136
- /maestro-execute -- Execute the plan
137
- /maestro-execute --dir {dir} -- Execute specific plan
138
- /maestro-plan {phase} -- Re-plan with modifications
139
140
  ```
140
141
 
141
- **Completion (when invoked from ralph):**
142
- End the step by calling the CLI (no `--- COMPLETION STATUS ---` text block):
142
+ ### Ralph-invoked completion
143
+
144
+ End the step by calling the CLI (no text block output):
143
145
  ```
144
- maestro ralph complete <idx> --status DONE [--evidence scratch/{YYYYMMDD}-plan-P{N}-{slug}/plan.json]
146
+ maestro ralph complete <idx> --status {STATUS} [--evidence scratch/{YYYYMMDD}-plan-P{N}-{slug}/plan.json]
145
147
  ```
146
148
 
147
- STATUS verdicts (CLI-enforced enum):
149
+ Status verdicts:
148
150
  - **DONE** — Plan created/revised and confirmed → next step picks up automatically
149
151
  - **DONE_WITH_CONCERNS** — Plan produced but with explicit caveats; pass `--concerns "..."`
150
152
  - **NEEDS_RETRY** — Plan failed (tooling error, transient issue); ralph will retry
@@ -152,10 +154,14 @@ STATUS verdicts (CLI-enforced enum):
152
154
 
153
155
  > Ambiguous requirements are NOT a completion status — resolve them in-place via `AskUserQuestion` during planning (≤3 rounds), then proceed to DONE. `NEEDS_CONTEXT` has been removed; context shortage is handled by the harness's automatic compaction.
154
156
 
155
- ### Mode: Revise / Check
157
+ ### Next-step routing
156
158
 
157
- Follow workflow plan.md § "Revise Mode" and § "Check Mode" respectively. These modes bypass the standard P1-P5 create pipeline.
158
- </execution>
159
+ | Condition | Suggestion |
160
+ |-----------|-----------|
161
+ | Plan confirmed for execution | `/maestro-execute` |
162
+ | Plan confirmed, specific directory | `/maestro-execute --dir {dir}` |
163
+ | Re-plan with modifications | `/maestro-plan {phase}` |
164
+ </completion>
159
165
 
160
166
  <error_codes>
161
167
  | Code | Severity | Condition | Recovery |
@@ -36,13 +36,16 @@ For formal specification documents (Product Brief, PRD, Architecture, Epics), us
36
36
  $ARGUMENTS -- requirement text, @file reference, or upstream context source.
37
37
 
38
38
  **Flags:**
39
- - `-y` / `--yes`: Auto mode — skip interactive questions, use recommended defaults
40
- - `-c` / `--continue`: Resume from last checkpoint
41
- - `-m progressive|direct|auto`: Decomposition strategy (default: auto)
42
- - `--from <source>`: Load upstream context package (brainstorm:ID, blueprint:BLP-xxx, analyze:ANL-xxx, @file, or path). Consumes context-package.json
43
- - `--from-brainstorm SESSION-ID`: (backward compat alias for `--from brainstorm:ID`)
44
- - `--revise [instructions]`: Revise existing roadmap. If instructions provided, apply directly. If omitted, ask user. Preserves completed phase progress.
45
- - `--review`: Roadmap health assessment (read-only)
39
+
40
+ | Flag | Effect | Default |
41
+ |------|--------|---------|
42
+ | `-y` / `--yes` | Auto mode skip interactive questions, use recommended defaults | false |
43
+ | `-c` / `--continue` | Resume from last checkpoint | false |
44
+ | `-m progressive\|direct\|auto` | Decomposition strategy | auto |
45
+ | `--from <source>` | Load upstream context package (brainstorm:ID, blueprint:BLP-xxx, analyze:ANL-xxx, @file, or path). Consumes context-package.json | — |
46
+ | `--from-brainstorm SESSION-ID` | Backward compat alias for `--from brainstorm:ID` | — |
47
+ | `--revise [instructions]` | Revise existing roadmap. If instructions provided, apply directly. If omitted, ask user. Preserves completed phase progress. | — |
48
+ | `--review` | Roadmap health assessment (read-only) | — |
46
49
 
47
50
  **Input types:**
48
51
  - Direct text: `"Implement user authentication system with OAuth and 2FA"`
@@ -61,24 +64,22 @@ maestro-roadmap → .workflow/roadmap.md (Milestone > Phase hierarchy)
61
64
  maestro-analyze {phase} → maestro-plan → maestro-execute → maestro-verify
62
65
  ```
63
66
 
64
- ### Pre-load specs
65
- 1. **Architecture specs**: Run `maestro spec load --category arch` to load architecture constraints. Use as context for phase decomposition — ensures roadmap respects documented decisions and boundaries.
66
- 2. Optionalproceed without if unavailable.
67
+ ### Pre-load
68
+
69
+ 1. **Specs**: `maestro spec load --category arch` load architecture constraints for phase decomposition
70
+ 2. **Wiki search**: `maestro wiki search "{requirement keywords}" --json` → prior knowledge
71
+ 3. All optional — proceed without if unavailable
67
72
  </context>
68
73
 
69
74
  <interview_protocol>
70
- Interview the user relentlessly until shared understanding is reached. Active only in interactive mode; skip when `-y/--yes`, `--revise`, `--review`, `-c/--continue`, or input is already specific (clear requirement + mode).
71
-
72
- - One decision per turn via AskUserQuestion with 2–4 options + a (Recommended) default. The user controls termination — keep interviewing until convergence; they can interrupt naturally or via `Other` at any time.
73
- - Search-first when uncertain: before asking, resolve via `state.json`, existing `roadmap.md`, `project.md`, `maestro spec load`, `maestro wiki search`, Glob/Grep/Read, or for open-ended multi-file scans — spawn `Agent(subagent_type: Explore)` / `maestro delegate ... --role explore`. Never ask what code or memory can verify; never bounce your own ambiguity back to the user — search first, then ask only what truly needs human judgment.
74
- - Writeback cadence: each settled decision is immediately appended/updated in the `Roadmap Decisions` section at the top of `.workflow/roadmap.md` (create the section if absent). Do NOT batch writeback to the end — partial decisions must already be on disk before the next question.
75
- - Walk the decision dependency tree strictly: mode → requirement scope → decomposition strategy → phase dependencies/order. Do not open the next branch until the current one is settled.
76
- - Scope guard: only decide the shape of the roadmap. Do not pre-resolve intra-phase task breakdown — that belongs to `plan`.
77
-
78
- Decision points: scope (MVP / complete / phased) → strategy (progressive / direct / auto) → milestone boundaries → phase dependencies and order.
79
-
80
- Exit: on consensus or explicit user signal to proceed, finalize the `Roadmap Decisions` section (rows already populated incrementally). Schema:
81
- `| # | Decision | Choice | Source (user / code / default) |`
75
+ Follows @~/.maestro/workflows/interview-mechanics.md standard.
76
+
77
+ **Interaction mode**: convergent menu-driven
78
+ **Decision tree** (strict order): mode (create / revise / review) requirement scope (MVP / complete / phased) decomposition strategy (progressive / direct / auto) milestone boundaries phase dependencies and order
79
+ **Scope guard**: only roadmap shape; do not pre-resolve intra-phase task breakdown (belongs to plan)
80
+ **Writeback target**: .workflow/roadmap.md "Roadmap Decisions" section (create if absent)
81
+ **Additional skip conditions**: --revise, --review (skip to respective mode)
82
+ **Exit condition**: on consensus or explicit user signal → finalize Roadmap Decisions section
82
83
  </interview_protocol>
83
84
 
84
85
  <execution>
@@ -91,16 +92,45 @@ Sub-modes:
91
92
  - **Revise** (`--revise`): Follow workflow roadmap.md "Mode: Revise" section
92
93
  - **Review** (`--review`): Follow workflow roadmap.md "Mode: Review" section
93
94
 
94
- ### Next-step routing on completion
95
+ </execution>
96
+
97
+ <completion>
98
+ ### Standalone report
99
+
100
+ ```
101
+ === ROADMAP READY ===
102
+ Milestones: {count}
103
+ Phases: {total_phases}
104
+ Strategy: {progressive|direct|auto}
105
+ Output: .workflow/roadmap.md
106
+ --- COMPLETION STATUS ---
107
+ Status: {DONE|DONE_WITH_CONCERNS}
108
+ Concerns: {if any}
109
+ ```
110
+
111
+ ### Ralph-invoked completion
112
+
113
+ End the step by calling the CLI (no text block output):
114
+ ```
115
+ maestro ralph complete <idx> --status {STATUS} [--evidence {path}]
116
+ ```
117
+
118
+ Status verdicts:
119
+ - **DONE** — Normal completion
120
+ - **DONE_WITH_CONCERNS** — Completed with caveats; pass `--concerns`
121
+ - **NEEDS_RETRY** — Tooling error / transient issue; ralph will retry
122
+ - **BLOCKED** — External hard blocker; pass `--reason`
123
+
124
+ ### Next-step routing
95
125
 
96
126
  | Condition | Suggestion |
97
127
  |-----------|-----------|
98
- | Roadmap approved, need analysis | /maestro-analyze 1 |
99
- | Simple project, ready to plan | /maestro-plan 1 |
100
- | Need UI design first | /maestro-impeccable build |
101
- | View project dashboard | /manage-status |
102
- | Need formal spec documents | /maestro-blueprint |
103
- </execution>
128
+ | Roadmap approved, need analysis | `/maestro-analyze 1` |
129
+ | Simple project, ready to plan | `/maestro-plan 1` |
130
+ | Need UI design first | `/maestro-impeccable build` |
131
+ | View project dashboard | `/manage-status` |
132
+ | Need formal spec documents | `/maestro-blueprint` |
133
+ </completion>
104
134
 
105
135
  <error_codes>
106
136
  | Code | Severity | Condition | Recovery |
@@ -21,16 +21,16 @@ swarm-workflow provides parallel compute bursts within individual steps.
21
21
 
22
22
  Scripts: `~/.maestro/workflows/swarm/wf-*.js`
23
23
 
24
- | Script | Accelerates | Pattern |
25
- |--------|-------------|---------|
26
- | `wf-analyze` | maestro-analyze | cli-explore-agent → 6-dimension parallel scoring → synthesis |
27
- | `wf-brainstorm` | maestro-brainstorm | multi-role parallel analysis → cross-role-reviewerguidance |
28
- | `wf-review` | quality-review | 6-dimension workflow-reviewer → adversarial verify → report |
29
- | `wf-verify` | maestro-verify | 3-layer workflow-verifier + convergence + antipatternaggregate |
30
- | `wf-grill` | maestro-grill | cli-explore-agent → parallel branch stress-testingcontradiction synthesis |
31
- | `wf-plan` | maestro-plan | parallel context exploration workflow-plannerplan-checker |
32
- | `wf-execute` | maestro-execute | wave-based parallel workflow-executor (worktree isolation) |
33
- | `wf-milestone-audit` | maestro-milestone-audit | parallel coverage + execution + integration-checker |
24
+ | Script | Accelerates | Adversarial Pattern |
25
+ |--------|-------------|---------------------|
26
+ | `wf-analyze` | maestro-analyze | explore → 6-dim scoring → **skeptic cross-verify** → **3-way advocacy (go/no-go/conditional) + referee** |
27
+ | `wf-brainstorm` | maestro-brainstorm | multi-role analysis → **3-specialist cross-review** → **3-proposal competition** **arbitrator** |
28
+ | `wf-review` | quality-review | 6-dim scan**3-vote adversarial verify (prosecutor/defense/judge)** **3-perspective report + arbitrated verdict** |
29
+ | `wf-verify` | maestro-verify | 3-layer + antipattern + convergence **prosecutor vs defender debate** **judge verdict** |
30
+ | `wf-grill` | maestro-grill | explore → parallel branch stress → **meta-skeptic challenge** **3-vote verdict (optimist/pessimist/realist)** |
31
+ | `wf-plan` | maestro-plan | parallel context → **3-strategy competing proposals** **judge panel scoring** → **3-critic adversarial check** |
32
+ | `wf-execute` | maestro-execute | wave-based parallel execution → **adversarial convergence spot-check** **3-vote status determination** |
33
+ | `wf-milestone-audit` | maestro-milestone-audit | parallel 3-dim audit **adversarial dimension challenge** → **3-vote verdict (strict/lenient/objective)** |
34
34
 
35
35
  Integration modes:
36
36
  - **Standalone**: `/maestro-swarm-workflow "analyze auth module"` — direct invocation
@@ -175,11 +175,15 @@ Intent-to-script routing(按关键词匹配,--script 优先级最高):
175
175
 
176
176
  Workflow 返回 JSON 后:
177
177
 
178
- 1. **摘要输出**:按脚本类型格式化关键指标
179
- - analyze: overall_score, scope_verdict, go_no_go, critical findings count
180
- - brainstorm: role count, conflict/synergy count, top guidance items
181
- - review: verdict (APPROVE/REQUEST_CHANGES/BLOCK), confirmed vs false-positive count
182
- - verify: overall_passed, confidence, gap count, antipattern blocker count
178
+ 1. **摘要输出**:按脚本类型格式化关键指标(含对抗决策结果)
179
+ - analyze: overall_score, scope_verdict, adversarial_outcome (go/no-go/conditional advocacy + referee), scores_challenged count
180
+ - brainstorm: role count, conflict/synergy count, 3-proposal competition result, arbitration notes
181
+ - review: verdict (APPROVE/REQUEST_CHANGES/BLOCK), 3-vote tally, confirmed vs false-positive count, adversarial_verdict
182
+ - verify: overall_status, prosecutor vs defender confidence, adversarial_outcome, gap count
183
+ - grill: overall_verdict, meta-skeptic quality rating, 3-vote verdict tally, overblown findings count
184
+ - plan: selected_strategy (breadth/depth/risk), judge panel scores, 3-critic adversarial check verdict
185
+ - execute: 3-vote status (DONE/DONE_WITH_CONCERNS/NEEDS_RETRY), convergence trust %, discrepancy count
186
+ - milestone-audit: 3-vote verdict, dimensions_overturned count, next_step
183
187
 
184
188
  2. **Artifact 写入**(可选):
185
189
  - 若当前在 ralph session 中(检测 `.workflow/.maestro/ralph-*/status.json` 状态为 running):
@@ -187,10 +191,14 @@ Workflow 返回 JSON 后:
187
191
  - 否则写入 `.workflow/scratch/{YYYYMMDD}-swarm-{script}-{slug}/results.json`
188
192
 
189
193
  3. **Ralph 兼容产出**:
190
- - analyze → `analysis.md` + `context.md`(decisions)+ `conclusions.json`
191
- - brainstorm → `guidance-specification.md`
192
- - review → `review.json`
193
- - verify → `verification.json`
194
+ - analyze → `analysis.md` + `context.md`(decisions)+ `conclusions.json` + `adversarial-debate.json`
195
+ - brainstorm → `guidance-specification.md` + `proposals-competition.json`
196
+ - review → `review.json`(含 adversarial_verdict + 3-vote tally)
197
+ - verify → `verification.json`(含 adversarial_outcome: prosecutor/defender debate)
198
+ - grill → `grill-results.json`(含 meta-challenge + 3-vote verdict)
199
+ - plan → `plan.json`(含 competition scores + critic feedback)
200
+ - execute → `execution-report.json`(含 convergence_checks + 3-vote status)
201
+ - milestone-audit → `audit-report.json`(含 dimension challenges + 3-vote verdict)
194
202
 
195
203
  4. **RunId 提示**:显示 `Resume: /maestro-swarm-workflow --resume {runId}` 用于增量重跑
196
204