maestro-flow 0.5.41 → 0.5.42

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.
Files changed (67) hide show
  1. package/.agents/skills/maestro-analyze/SKILL.md +0 -42
  2. package/.agents/skills/maestro-blueprint/SKILL.md +0 -22
  3. package/.agents/skills/maestro-brainstorm/SKILL.md +4 -24
  4. package/.agents/skills/maestro-execute/SKILL.md +1 -1
  5. package/.agents/skills/maestro-grill/SKILL.md +0 -16
  6. package/.agents/skills/maestro-milestone-audit/SKILL.md +0 -15
  7. package/.agents/skills/maestro-plan/SKILL.md +5 -62
  8. package/.agents/skills/maestro-roadmap/SKILL.md +0 -8
  9. package/.agents/skills/team-adversarial-swarm/workflows/wf-swarm-synthesize.js +248 -248
  10. package/.agents/skills/team-coordinate/specs/role-spec-template.md +197 -198
  11. package/.agents/skills/team-roadmap-dev/SKILL.md +164 -164
  12. package/.agents/skills/team-roadmap-dev/specs/team-config.json +1 -1
  13. package/.agents/skills/team-swarm/roles/analyst/role.md +172 -176
  14. package/.agy/skills/maestro-analyze/SKILL.md +0 -42
  15. package/.agy/skills/maestro-blueprint/SKILL.md +0 -22
  16. package/.agy/skills/maestro-brainstorm/SKILL.md +4 -24
  17. package/.agy/skills/maestro-execute/SKILL.md +1 -1
  18. package/.agy/skills/maestro-grill/SKILL.md +0 -16
  19. package/.agy/skills/maestro-milestone-audit/SKILL.md +0 -15
  20. package/.agy/skills/maestro-plan/SKILL.md +5 -62
  21. package/.agy/skills/maestro-roadmap/SKILL.md +0 -8
  22. package/.agy/skills/team-adversarial-swarm/workflows/wf-swarm-synthesize.js +248 -248
  23. package/.agy/skills/team-coordinate/specs/role-spec-template.md +197 -198
  24. package/.agy/skills/team-roadmap-dev/SKILL.md +141 -153
  25. package/.agy/skills/team-roadmap-dev/specs/team-config.json +1 -1
  26. package/.agy/skills/team-swarm/roles/analyst/role.md +172 -176
  27. package/.claude/commands/maestro-analyze.md +0 -42
  28. package/.claude/commands/maestro-blueprint.md +0 -22
  29. package/.claude/commands/maestro-brainstorm.md +4 -24
  30. package/.claude/commands/maestro-execute.md +1 -1
  31. package/.claude/commands/maestro-grill.md +0 -16
  32. package/.claude/commands/maestro-milestone-audit.md +0 -15
  33. package/.claude/commands/maestro-plan.md +5 -62
  34. package/.claude/commands/maestro-roadmap.md +0 -8
  35. package/.claude/skills/team-adversarial-swarm/workflows/wf-swarm-synthesize.js +248 -248
  36. package/.claude/skills/team-coordinate/specs/role-spec-template.md +197 -198
  37. package/.claude/skills/team-roadmap-dev/SKILL.md +169 -169
  38. package/.claude/skills/team-roadmap-dev/specs/team-config.json +1 -1
  39. package/.claude/skills/team-swarm/roles/analyst/role.md +181 -185
  40. package/dashboard/dist-server/src/commands/install-backend.js +31 -16
  41. package/dashboard/dist-server/src/commands/install-backend.js.map +1 -1
  42. package/dashboard/dist-server/src/core/component-defs.js +25 -0
  43. package/dashboard/dist-server/src/core/component-defs.js.map +1 -1
  44. package/dashboard/dist-server/src/tools/spec-loader.js +7 -3
  45. package/dashboard/dist-server/src/tools/spec-loader.js.map +1 -1
  46. package/dist/src/commands/install-backend.d.ts.map +1 -1
  47. package/dist/src/commands/install-backend.js +31 -16
  48. package/dist/src/commands/install-backend.js.map +1 -1
  49. package/dist/src/core/component-defs.d.ts.map +1 -1
  50. package/dist/src/core/component-defs.js +25 -0
  51. package/dist/src/core/component-defs.js.map +1 -1
  52. package/dist/src/tools/spec-loader.d.ts.map +1 -1
  53. package/dist/src/tools/spec-loader.js +7 -3
  54. package/dist/src/tools/spec-loader.js.map +1 -1
  55. package/dist/src/utils/update-notices.js +11 -0
  56. package/dist/src/utils/update-notices.js.map +1 -1
  57. package/package.json +1 -1
  58. package/workflows/agy-instructions.md +147 -161
  59. package/workflows/claude-instructions.md +100 -48
  60. package/workflows/codex-instructions.md +147 -161
  61. package/workflows/execute.md +4 -3
  62. package/workflows/explore-usage.md +41 -81
  63. package/workflows/grill.md +11 -0
  64. package/workflows/milestone-audit.md +8 -0
  65. package/workflows/odyssey-base-codex.md +115 -116
  66. package/workflows/odyssey-base.md +89 -91
  67. package/workflows/plan.md +6 -0
@@ -5,179 +5,175 @@ inner_loop: false
5
5
  output_tag: [analyst]
6
6
  message_types:
7
7
  ---
8
-
9
- # Analyst Role — Phase 2-4
10
-
11
- Tag: `[analyst]` | Prefix: `ANALYST-*`
12
- Responsibility: After swarm converges, synthesize the best solution + top trails + convergence curve into a human-readable `best-solution.md` report. Provides interpretation, not just data dump.
13
-
14
- ## Boundaries
15
-
16
- ### MUST
17
- - Read `<session>/best.json`, `<session>/artifacts/swarm-report.json`, all `<session>/trails/*.jsonl`
18
- - Produce `<session>/artifacts/best-solution.md` as the final deliverable
19
- - Explain WHY the best path won (which decisions mattered, evidence chain)
20
- - Compare best vs runner-ups to surface stability vs luck
21
- - Document convergence story (entropy curve, when stagnation hit)
22
-
23
- ### MUST NOT
24
- - Re-score solutions (that is scorer's job — analyst takes verified_score as given)
25
- - Modify best.json, trails, or pheromone state
26
- - Generate solutions of its own — analyst synthesizes existing ant outputs
27
- - Exceed ~150 lines in best-solution.md (be sharp, not verbose)
28
-
29
- ## Phase 2: Context Loading
30
-
31
- | Input | Source | Required |
32
- |-------|--------|----------|
33
- | Original objective | `<session>/swarm-config.json#ant_prompt.objective` | Yes |
34
- | Best solution | `<session>/best.json` | Yes |
35
- | Full swarm report | `<session>/artifacts/swarm-report.json` | Yes |
36
- | All trails | `<session>/trails/*.jsonl` | Yes |
37
- | Convergence reason | swarm-report.json or `aco.py converged` output | Yes |
38
- | Best ant artifact | `<session>/artifacts/ant-<best.iteration>-<best.id>.json` (full evidence) | Yes |
39
- | Issues log | `<session>/wisdom/issues.md` | Optional |
40
-
41
- Workflow:
42
- 1. Extract session path from task description
43
- 2. Read swarm-config.json -> capture objective
44
- 3. Read best.json -> identify best ant
45
- 4. Read full swarm-report.json -> get top_k + convergence_curve
46
- 5. Read the best ant's full artifact for evidence chain
47
- 6. Read all trails/*.jsonl into a list (chronological)
48
-
49
- ## Phase 3: Synthesis
50
-
51
- ### 3.1 Structure the report
52
-
53
- Layout for `best-solution.md`:
54
-
55
- ```markdown
56
- # Swarm Result — <objective_short_form>
57
-
58
- ## Best Solution
59
-
60
- **Path**: node_a → node_c → node_f
61
- **Verified Score**: 0.82
62
- **Iteration**: 3 of 5
63
- **Ant**: ANT-3-2
64
-
65
- ### Summary
66
- <one paragraph — what the best solution proposes and why it answers the objective>
67
-
68
- ### Evidence Chain
69
- - `src/foo.ts:42` — <how this evidence supports the decision>
70
- - `tests/foo.spec.ts:18` — <...>
71
-
72
- ### Candidate Artifact
73
- <extract from best.candidate_solution — quote or summarize, link to file if file_ref>
74
-
75
- ## Why This Path Won
76
-
77
- | Decision | Pheromone-guided? | Why it mattered |
78
- |----------|-------------------|-----------------|
79
- | start = node_a | weighted | <reason> |
80
- | a → c | yes (0.45 hint) | <reason> |
81
- | c → f | NO (deviation) | <reason> — this was the key call |
82
-
83
- ## Runner-Up Solutions
84
-
85
- | Rank | Ant | Path | Score | Diff from best |
86
- |------|-----|------|-------|----------------|
87
- | 2 | ANT-2-1 | a → b → e | 0.74 | -0.08; weaker evidence at e |
88
- | 3 | ANT-4-3 | a → c → g | 0.71 | -0.11; valid but less specific |
89
-
90
- ## Convergence Story
91
-
92
- Iterations: 4 of 5 max
93
- Trigger: stagnation (best unchanged for 2 iterations)
94
-
95
- Entropy curve:
96
- - iter 1: 3.21 (broad exploration)
97
- - iter 2: 2.45 (narrowing on node_a region)
98
- - iter 3: 1.85 (best emerges at ANT-3-2)
99
- - iter 4: 1.72 (consensus around best, no improvement)
100
-
101
- Interpretation: <2-3 sentences on whether the swarm converged on a genuine optimum or got stuck>
102
-
103
- ## Caveats
104
-
105
- - <e.g., 40% of ants in iter 2 flagged as hallucinations>
106
- - <e.g., evidence for node_f is single-source — recommend manual verification>
107
- - <e.g., search space had only N nodes — larger space may surface better solutions>
108
-
109
- ## Reproducibility
110
-
111
- - Config: `swarm-config.json` (pinned)
112
- - Best path: `best.json`
113
- - Full trails: `trails/<iter>.jsonl`
114
- - Random seed: <if used>
115
- ```
116
-
117
- ### 3.2 Interpretation rules
118
-
119
- - **Why-it-won analysis** is the highest-value content. Don't just describe the path — explain which decisions were pivotal.
120
- - **Pheromone vs deviation**: track which steps followed pheromone hints vs deviated. Deviations that produced higher scores are the most interesting signal.
121
- - **Runner-up diff**: surface why #2 lost — was it a weaker path or just unlucky evidence?
122
- - **Caveats are mandatory**: every swarm result has limitations. List them honestly.
123
-
124
- ### 3.3 Constraints
125
-
126
- - Target 150 lines
127
- - No prose padding every section earns its place
128
- - Quote evidence verbatim where possible (file:line refs)
129
- - Don't editorialize beyond what evidence supports
130
-
131
- ## Phase 4: Verify + Publish
132
-
133
- ### Behavioral Traits
134
-
135
- #### Accuracy
136
- - Every cited path/score MUST match best.json or trails source
137
- - Every evidence reference MUST be verifiable (Read to confirm if file_ref)
138
- - Convergence curve numbers MUST match swarm-report.json#convergence_curve
139
-
140
- #### Feedback Contract
141
- | Field | Required | Content |
142
- |-------|----------|---------|
143
- | artifacts_written | Always | `<session>/artifacts/best-solution.md` |
144
- | line_count | Always | int (target 150) |
145
- | verification_method | Always | "cross_ref_with_best.json + evidence_verified" |
146
-
147
- #### Quality Gate
148
- - Final report file exists and parses as markdown
149
- - All sections present (Best Solution / Why Won / Runner-Ups / Convergence / Caveats / Reproducibility)
150
- - Line count ≤ 200 (hard cap — fail if exceeded, retry with sharper edit)
151
-
152
- ### Verification Steps
153
-
154
- 1. Read written best-solution.md back
155
- 2. Cross-check best.score against best.json
156
- 3. Confirm runner-up scores against trails
157
- 4. If file_ref evidence in best.candidate_solution -> Read to confirm file exists
158
- 5. Count lines — if > 200, condense and rewrite
159
-
160
- ### State Update
161
-
162
- ```json
163
- {
164
- "task_id": "ANALYST-1",
165
- "role": "analyst",
166
- "status": "completed",
167
- "artifact_path": "<session>/artifacts/best-solution.md",
168
- "best_score": <float>,
169
- "best_ant_id": "<id>",
170
- "line_count": <int>,
171
- "verification": "cross_ref_pass + evidence_verified"
172
- }
173
- ```
174
-
175
- ## Error Handling
176
-
177
- | Scenario | Resolution |
178
- |----------|------------|
179
- | best.json missing | Pipeline produced no valid ant write minimal report with `status: no_solution` |
180
- | Trails empty | Same as above — no exploration data to analyze |
181
- | Best ant artifact missing | Use only best.json fields; note as caveat |
182
- | Cross-ref mismatch (score discrepancy) | Trust best.json; note discrepancy in caveats |
183
- | Line count > 200 after rewrite | Hard-fail report; coordinator decides retry vs accept |
8
+
9
+ # Analyst Role — Phase 2-4
10
+
11
+ Tag: `[analyst]` | Prefix: `ANALYST-*`
12
+ Responsibility: After swarm converges, synthesize the best solution + top trails + convergence curve into a human-readable `best-solution.md` report. Provides interpretation, not just data dump.
13
+
14
+ ## Boundaries
15
+
16
+ ### MUST
17
+ - Read `<session>/best.json`, `<session>/artifacts/swarm-report.json`, all `<session>/trails/*.jsonl`
18
+ - Produce `<session>/artifacts/best-solution.md` as the final deliverable
19
+ - Explain WHY the best path won (which decisions mattered, evidence chain)
20
+ - Compare best vs runner-ups to surface stability vs luck
21
+ - Document convergence story (entropy curve, when stagnation hit)
22
+
23
+ ### MUST NOT
24
+ - Re-score solutions (that is scorer's job — analyst takes verified_score as given)
25
+ - Modify best.json, trails, or pheromone state
26
+ - Generate solutions of its own — analyst synthesizes existing ant outputs
27
+ - Pad best-solution.md with prose every section must earn its place
28
+
29
+ ## Phase 2: Context Loading
30
+
31
+ | Input | Source | Required |
32
+ |-------|--------|----------|
33
+ | Original objective | `<session>/swarm-config.json#ant_prompt.objective` | Yes |
34
+ | Best solution | `<session>/best.json` | Yes |
35
+ | Full swarm report | `<session>/artifacts/swarm-report.json` | Yes |
36
+ | All trails | `<session>/trails/*.jsonl` | Yes |
37
+ | Convergence reason | swarm-report.json or `aco.py converged` output | Yes |
38
+ | Best ant artifact | `<session>/artifacts/ant-<best.iteration>-<best.id>.json` (full evidence) | Yes |
39
+ | Issues log | `<session>/wisdom/issues.md` | Optional |
40
+
41
+ Workflow:
42
+ 1. Extract session path from task description
43
+ 2. Read swarm-config.json -> capture objective
44
+ 3. Read best.json -> identify best ant
45
+ 4. Read full swarm-report.json -> get top_k + convergence_curve
46
+ 5. Read the best ant's full artifact for evidence chain
47
+ 6. Read all trails/*.jsonl into a list (chronological)
48
+
49
+ ## Phase 3: Synthesis
50
+
51
+ ### 3.1 Structure the report
52
+
53
+ Layout for `best-solution.md`:
54
+
55
+ ```markdown
56
+ # Swarm Result — <objective_short_form>
57
+
58
+ ## Best Solution
59
+
60
+ **Path**: node_a → node_c → node_f
61
+ **Verified Score**: 0.82
62
+ **Iteration**: 3 of 5
63
+ **Ant**: ANT-3-2
64
+
65
+ ### Summary
66
+ <one paragraph — what the best solution proposes and why it answers the objective>
67
+
68
+ ### Evidence Chain
69
+ - `src/foo.ts:42` — <how this evidence supports the decision>
70
+ - `tests/foo.spec.ts:18` — <...>
71
+
72
+ ### Candidate Artifact
73
+ <extract from best.candidate_solution — quote or summarize, link to file if file_ref>
74
+
75
+ ## Why This Path Won
76
+
77
+ | Decision | Pheromone-guided? | Why it mattered |
78
+ |----------|-------------------|-----------------|
79
+ | start = node_a | weighted | <reason> |
80
+ | a → c | yes (0.45 hint) | <reason> |
81
+ | c → f | NO (deviation) | <reason> — this was the key call |
82
+
83
+ ## Runner-Up Solutions
84
+
85
+ | Rank | Ant | Path | Score | Diff from best |
86
+ |------|-----|------|-------|----------------|
87
+ | 2 | ANT-2-1 | a → b → e | 0.74 | -0.08; weaker evidence at e |
88
+ | 3 | ANT-4-3 | a → c → g | 0.71 | -0.11; valid but less specific |
89
+
90
+ ## Convergence Story
91
+
92
+ Iterations: 4 of 5 max
93
+ Trigger: stagnation (best unchanged for 2 iterations)
94
+
95
+ Entropy curve:
96
+ - iter 1: 3.21 (broad exploration)
97
+ - iter 2: 2.45 (narrowing on node_a region)
98
+ - iter 3: 1.85 (best emerges at ANT-3-2)
99
+ - iter 4: 1.72 (consensus around best, no improvement)
100
+
101
+ Interpretation: <2-3 sentences on whether the swarm converged on a genuine optimum or got stuck>
102
+
103
+ ## Caveats
104
+
105
+ - <e.g., 40% of ants in iter 2 flagged as hallucinations>
106
+ - <e.g., evidence for node_f is single-source — recommend manual verification>
107
+ - <e.g., search space had only N nodes — larger space may surface better solutions>
108
+
109
+ ## Reproducibility
110
+
111
+ - Config: `swarm-config.json` (pinned)
112
+ - Best path: `best.json`
113
+ - Full trails: `trails/<iter>.jsonl`
114
+ - Random seed: <if used>
115
+ ```
116
+
117
+ ### 3.2 Interpretation rules
118
+
119
+ - **Why-it-won analysis** is the highest-value content. Don't just describe the path — explain which decisions were pivotal.
120
+ - **Pheromone vs deviation**: track which steps followed pheromone hints vs deviated. Deviations that produced higher scores are the most interesting signal.
121
+ - **Runner-up diff**: surface why #2 lost — was it a weaker path or just unlucky evidence?
122
+ - **Caveats are mandatory**: every swarm result has limitations. List them honestly.
123
+
124
+ ### 3.3 Constraints
125
+
126
+ - No prose padding — every section earns its place
127
+ - Quote evidence verbatim where possible (file:line refs)
128
+ - Don't editorialize beyond what evidence supports
129
+
130
+ ## Phase 4: Verify + Publish
131
+
132
+ ### Behavioral Traits
133
+
134
+ #### Accuracy
135
+ - Every cited path/score MUST match best.json or trails source
136
+ - Every evidence reference MUST be verifiable (Read to confirm if file_ref)
137
+ - Convergence curve numbers MUST match swarm-report.json#convergence_curve
138
+
139
+ #### Feedback Contract
140
+ | Field | Required | Content |
141
+ |-------|----------|---------|
142
+ | artifacts_written | Always | `<session>/artifacts/best-solution.md` |
143
+ | line_count | Always | int (informational) |
144
+ | verification_method | Always | "cross_ref_with_best.json + evidence_verified" |
145
+
146
+ #### Quality Gate
147
+ - Final report file exists and parses as markdown
148
+ - All sections present (Best Solution / Why Won / Runner-Ups / Convergence / Caveats / Reproducibility)
149
+
150
+ ### Verification Steps
151
+
152
+ 1. Read written best-solution.md back
153
+ 2. Cross-check best.score against best.json
154
+ 3. Confirm runner-up scores against trails
155
+ 4. If file_ref evidence in best.candidate_solution -> Read to confirm file exists
156
+
157
+ ### State Update
158
+
159
+ ```json
160
+ {
161
+ "task_id": "ANALYST-1",
162
+ "role": "analyst",
163
+ "status": "completed",
164
+ "artifact_path": "<session>/artifacts/best-solution.md",
165
+ "best_score": <float>,
166
+ "best_ant_id": "<id>",
167
+ "line_count": <int>,
168
+ "verification": "cross_ref_pass + evidence_verified"
169
+ }
170
+ ```
171
+
172
+ ## Error Handling
173
+
174
+ | Scenario | Resolution |
175
+ |----------|------------|
176
+ | best.json missing | Pipeline produced no valid ant — write minimal report with `status: no_solution` |
177
+ | Trails empty | Same as above — no exploration data to analyze |
178
+ | Best ant artifact missing | Use only best.json fields; note as caveat |
179
+ | Cross-ref mismatch (score discrepancy) | Trust best.json; note discrepancy in caveats |
@@ -86,51 +86,9 @@ Follows @~/.maestro/workflows/interview-mechanics.md standard.
86
86
  <execution>
87
87
  Follow '~/.maestro/workflows/analyze.md' completely.
88
88
 
89
- ### Evidence-Backed Decisions
90
-
91
- Every decision MUST trace to independently gathered evidence. Manual Read/Grep is preparation — NOT evidence. Valid evidence sources:
92
- - cli-explore-agent output (code anchors, call chains, data flows)
93
- - maestro delegate CLI analysis output (multi-perspective findings)
94
- - User-provided input (domain knowledge, constraints, corrections)
95
-
96
- Decisions without CLI/agent-sourced evidence MUST be flagged as LOW CONFIDENCE.
97
-
98
- ### Boundary Grill (Step 5 → Step 6)
99
-
100
- After discussion rounds, BEFORE synthesis: run boundary grill per `~/.maestro/workflows/boundary-grill.md`.
101
- Input: discussion.md decisions + exploration-codebase.json. Scope guard: "only analyze decisions; do not prejudge plan/execute concerns".
102
- IF conflicts → results to `analysis.md` § Boundary Grill Results + update `context.md` Locked/Free/Deferred.
103
-
104
- ### Standard Mode Gates
105
-
106
- Gates 1-4 are defined in `analyze.md`. NEVER skip gates. NEVER substitute manual Read/Grep for agent/CLI exploration.
107
-
108
- ### Artifact Verification
109
-
110
- Before writing the completion report (Step 9), verify ALL expected artifacts exist in OUTPUT_DIR:
111
- ```
112
- FULL_MODE_REQUIRED = [
113
- "discussion.md", // Step 3+5
114
- "exploration-codebase.json", // Step 4.1
115
- "explorations.json" OR "perspectives.json", // Step 4.3
116
- "analysis.md", // Step 6
117
- "conclusions.json", // Step 7
118
- "context.md", // Step 8
119
- "context-package.json" // Step 8.6
120
- ]
121
- ```
122
- If any artifact is missing: DO NOT report completion. Produce the missing artifact first.
123
-
124
89
  ### --gaps Mode
125
90
 
126
91
  When `--gaps` is present, follow `~/.maestro/workflows/issue-gaps-analyze.md` instead of the standard pipeline.
127
-
128
- **Handoff:** context.md is consumed by maestro-plan. In --gaps mode, context.md contains issue root causes for `plan --gaps`.
129
-
130
- **scope_verdict** (added to context.md in Step 6 Synthesis for macro/adhoc/standalone scopes):
131
- - `large` (3+ independent subsystems or hard serial dependencies) → suggest `/maestro-roadmap --from analyze:ANL-xxx`
132
- - `medium` (1-2 subsystems, parallelizable) → suggest `/maestro-plan --from analyze:ANL-xxx`
133
- - `small` (single-file or few-file change) → suggest `/maestro-plan --from analyze:ANL-xxx`
134
92
  </execution>
135
93
 
136
94
  <completion>
@@ -88,28 +88,6 @@ Each phase produces artifacts that are prerequisites for the next. Do NOT advanc
88
88
  **GATE P5 → P6**: `epics/` directory with `_index.md` + individual `EPIC-*.md` files. Cross-Epic dependency map present.
89
89
  **GATE P6**: Readiness score computed. Pass (≥80%) or Review (≥60%) required for handoff.
90
90
 
91
- ### Artifact Verification (before completion)
92
-
93
- ```
94
- REQUIRED_ARTIFACTS = [
95
- "blueprint-config.json", // P0
96
- "product-brief.md", // P2
97
- "glossary.json", // P2 (≥5 terms)
98
- "requirements/_index.md", // P3
99
- "architecture/_index.md", // P4
100
- "epics/_index.md", // P5
101
- "readiness-report.md", // P6
102
- "blueprint-summary.md", // P6
103
- "context-package.json" // P6
104
- ]
105
- ```
106
- If any artifact is missing: DO NOT report completion. Go back and produce it.
107
-
108
- ### Evidence Requirement
109
-
110
- Architecture Decision Records (ADR-*.md) MUST cite evidence for each decision:
111
- - Valid: code analysis, requirement traceability (REQ-xxx), upstream context, CLI analysis output
112
- - INVALID: generic rationale without reference to project-specific constraints
113
91
  </execution>
114
92
 
115
93
  <completion>
@@ -90,35 +90,15 @@ These gates apply to Auto mode (full pipeline). Do NOT advance past a gate until
90
90
  - BLOCKED if missing: complete all role analyses before spawning cross-role-reviewer.
91
91
 
92
92
  **GATE 2.5: Cross-Role Review → Boundary Grill** (Step 4.5 → Step 4.6)
93
- Run boundary grill per `~/.maestro/workflows/boundary-grill.md` after cross-role-reviewer output.
94
- Input: reviewer findings + role Decision Digests. Scope guard: "only brainstorm decisions; do not pre-resolve roadmap/plan choices".
95
- IF conflicts → results to `guidance-specification.md` §12.5 + feed into GATE 3. NON-BLOCKING.
93
+ - REQUIRED: Boundary grill executed per workflow boundary-grill.md after cross-role review.
94
+ - NON-BLOCKING: conflicts logged as warnings.
96
95
 
97
96
  **GATE 3: Cross-Role Review → Completion** (Step 4.5/4.6 → Report)
98
97
  - REQUIRED: Cross-role-reviewer output received with `patch_targets[]`.
99
- - REQUIRED: Boundary grill completed (if conflicts detected, results logged).
100
- - REQUIRED: If findings > 0, resolutions applied via Edit AND logged in `guidance-specification.md` §12.
101
- - REQUIRED: If findings == 0, final report explicitly states "No cross-role issues detected".
98
+ - REQUIRED: Boundary grill completed.
99
+ - REQUIRED: Resolutions applied and logged (details in workflow).
102
100
  - BLOCKED if missing: complete review synthesis before reporting.
103
101
 
104
- ### Artifact Verification (before completion report)
105
-
106
- ```
107
- AUTO_MODE_REQUIRED = [
108
- "guidance-specification.md", // Step 1
109
- "{role}/analysis.md" (per selected role), // Step 3
110
- "{role}/analysis-F-*.md" (per feature), // Step 3
111
- ]
112
- ```
113
- If any artifact is missing: DO NOT report completion. Go back and produce the missing artifact.
114
-
115
- ### Evidence Requirement
116
-
117
- Role analysis findings in `{role}/analysis.md` §2 Decision Digest MUST cite concrete evidence:
118
- - Code references (file:line), API endpoints, data models from the codebase
119
- - User-provided constraints from interview
120
- - Cross-role references to other role analyses
121
- Decisions without evidence are flagged LOW CONFIDENCE.
122
102
  </execution>
123
103
 
124
104
  <completion>
@@ -37,7 +37,7 @@ $ARGUMENTS — phase number, or no args for milestone-wide execution, with optio
37
37
  | `--method agent\|cli\|auto` | Execution method: Agent tool, CLI delegate, or auto-select | `auto` |
38
38
  | `--executor <tool>` | Explicit executor tool for CLI delegate mode | First enabled in config |
39
39
  | `--dir <path>` | Execute a specific plan directory instead of auto-discovery | — |
40
- | `-y` / `--yes` | Auto mode — skip interactive questions | false |
40
+ | `-y` / `--yes` | Auto mode — skip ALL interactive questions (executor selection, wave progression, blocked prompts) | false |
41
41
 
42
42
  ### Scope routing
43
43
 
@@ -91,22 +91,6 @@ Follow '~/.maestro/workflows/grill.md' completely.
91
91
  - REQUIRED: `context-package.json` generated.
92
92
  - BLOCKED if any artifact missing: produce it before reporting completion.
93
93
 
94
- ### Evidence Requirement
95
-
96
- Grill questions MUST reference specific code (`file:line`) when challenging the user's proposal. Generic questions without code grounding are INVALID.
97
-
98
- If codebase scan failed (W001): flag ALL subsequent locked decisions as LOW CONFIDENCE.
99
-
100
- ### Artifact Verification (before completion)
101
-
102
- ```
103
- REQUIRED_ARTIFACTS = [
104
- "grill-report.md", // Branch Log + Q&A + synthesis
105
- "terminology.md", // ≥5 terms with code refs
106
- "context-package.json" // Schema "context-package/1.0"
107
- ]
108
- ```
109
- If any missing: DO NOT report completion. Go back and produce the missing artifact.
110
94
  </execution>
111
95
 
112
96
  <completion>
@@ -69,21 +69,6 @@ Audit checklist steps (phase coverage, ad-hoc completeness, execution completene
69
69
  - REQUIRED: Clear PASS/FAIL verdict determined with evidence for each check.
70
70
  - BLOCKED if missing: integration check not completed — do not write report without cross-artifact verification.
71
71
 
72
- ### Artifact Verification (before completion)
73
-
74
- ```
75
- REQUIRED_ARTIFACTS = [
76
- ".workflow/milestones/{milestone}/audit-report.md" // Clear PASS/FAIL verdict
77
- ]
78
- ```
79
- If missing: DO NOT report completion. Write the audit report first.
80
-
81
- ### Evidence Requirement
82
-
83
- Every audit check result MUST cite what was examined and what was found:
84
- - PASS: "Phase 1 chain complete: ANL-001 → PLN-001 → EXC-001, all tasks completed"
85
- - FAIL: "Phase 2 missing EXC artifact — PLN-002 exists but no execution found"
86
- - Do NOT mark checks as PASS without verifying the actual artifact exists and contains expected content.
87
72
  </execution>
88
73
 
89
74
  <completion>
@@ -86,79 +86,22 @@ Follow '~/.maestro/workflows/plan.md' completely.
86
86
  - BLOCKED if missing: plan.json or TASK files not produced by planner agent — do not proceed to checking.
87
87
 
88
88
  **GATE P3.5 → P4: Boundary Grill → Plan Check**
89
- Run boundary grill per `~/.maestro/workflows/boundary-grill.md`.
90
- Input: plan.json tasks + convergence criteria + upstream context. Scope guard: "only plan scope; do not re-analyze or re-scope".
91
- IF conflicts → results to plan.json `boundary_grill` section + affected TASK files. DEC conflicts add `boundary_warning` to confidence.
92
- NON-BLOCKING: warnings, not hard stops.
89
+ - REQUIRED: Boundary grill executed per workflow boundary-grill.md.
90
+ - NON-BLOCKING: conflicts logged as warnings, not hard stops.
93
91
 
94
92
  **GATE P4 → P5: Plan Check → User Confirmation**
95
93
  - REQUIRED: Plan-checker passed (or minor issues acknowledged).
96
- - REQUIRED: Boundary grill completed (conflicts resolved or accepted as risks).
94
+ - REQUIRED: Boundary grill completed.
97
95
  - REQUIRED: Confidence scored with 5-dimension factor model.
98
96
  - REQUIRED: Pressure pass completed on highest-complexity task.
99
- - REQUIRED: If plan touches UI (检出 `dashboard/` 或 UI 关键词 `landing|page|dashboard|frontend|UI|component|界面`), each delivery wave has ≥1 `[UI-observable]` convergence criterion (vertical-slice delivery, not backend-only).
100
- - BLOCKED if: plan-checker found critical issues, OR UI plan missing `[UI-observable]` coverage — fix plan before presenting to user.
97
+ - REQUIRED: UI plans have `[UI-observable]` convergence criteria per wave (details in workflow).
98
+ - BLOCKED if: plan-checker found critical issues, OR UI plan missing `[UI-observable]` coverage.
101
99
 
102
100
  **GATE P5 → Completion: User Confirmation → Done**
103
101
  - REQUIRED: User confirmation captured (execute/modify/cancel).
104
102
  - REQUIRED: PLN artifact registered in state.json.
105
103
  - BLOCKED if missing: no user confirmation — do not register artifact or report completion.
106
104
 
107
- ### Artifact Verification (before completion)
108
-
109
- ```
110
- REQUIRED_ARTIFACTS = [
111
- "plan.json", // Task definitions, waves, summary
112
- ".task/TASK-*.json" (per task) // Individual task files with convergence criteria
113
- ]
114
- ```
115
- Every task MUST have `convergence.criteria[]` with grep-verifiable conditions. If any task lacks verifiable criteria: DO NOT report completion — fix the criteria first.
116
-
117
- ### P3 Agent Constraint (MANDATORY)
118
-
119
- Main flow **MUST** spawn a planner agent (Agent tool) for P3 planning — inline planning by main flow is FORBIDDEN. The agent produces both `plan.json` and `.task/TASK-*.json` files. Main flow only passes context and validates output.
120
-
121
- ### Codebase Docs Loading (P1 addition)
122
-
123
- During P1 Context Collection, after loading context files, load codebase documentation if available:
124
-
125
- ```
126
- IF exists(.workflow/codebase/doc-index.json):
127
- codebase_ctx = Read(.workflow/codebase/ARCHITECTURE.md) + Read(.workflow/codebase/FEATURES.md)
128
- Pass codebase_ctx to planner agent as structural context
129
- ELSE:
130
- display "W004: Codebase docs unavailable, continuing with code exploration only"
131
- ```
132
-
133
- ### Wiki Knowledge Search (P1 addition)
134
-
135
- During P1 Context Collection, after loading context files and before parallel exploration (step 5), search the wiki for prior knowledge related to the phase:
136
-
137
- ```
138
- phase_keywords = extract key terms from goal/title (2-5 terms)
139
- wiki_result = Bash("maestro search ${phase_keywords} --json 2>/dev/null")
140
-
141
- IF wiki_result exit code != 0 OR empty:
142
- display "W003: Wiki search unavailable, continuing without prior knowledge"
143
- ELSE:
144
- entries = JSON.parse(wiki_result).entries (limit to first 10)
145
- wiki_context = structured block for downstream stages
146
- ```
147
-
148
- ### Issue Linkback (--gaps mode)
149
-
150
- After plan generation and checking, if `--gaps` mode was used, link TASK files back to issues bidirectionally:
151
-
152
- ```
153
- For each created TASK-{NNN}.json that has issue_id:
154
- Update corresponding issue in .workflow/issues/issues.jsonl:
155
- task_refs: append TASK-{NNN} to array
156
- task_plan_dir: relative path to .task/ directory
157
- status: "planned"
158
- updated_at: now()
159
- Append history entry: { action: "planned", at: <ISO>, by: "maestro-plan", summary: "Linked to TASK-{NNN}" }
160
- ```
161
-
162
105
  ### Mode: Revise / Check
163
106
 
164
107
  Follow workflow plan.md § "Revise Mode" and § "Check Mode" respectively. These modes bypass the standard P1-P5 create pipeline.
@@ -96,14 +96,6 @@ Sub-modes:
96
96
  - REQUIRED: Artifact registered in state.json with milestone entries.
97
97
  - BLOCKED if missing: do not report completion without written roadmap.
98
98
 
99
- ### Artifact Verification (before completion)
100
-
101
- ```
102
- REQUIRED_ARTIFACTS = [
103
- ".workflow/roadmap.md" // Milestone > Phase hierarchy with progress table
104
- ]
105
- ```
106
- If missing: DO NOT report completion.
107
99
 
108
100
  </execution>
109
101