maestro-flow 0.4.9 → 0.4.10
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/.agy/agents/cli-explore-agent.md +186 -0
- package/.agy/agents/conceptual-planning-agent.md +244 -0
- package/.agy/agents/impeccable-agent.md +97 -0
- package/.agy/agents/team-supervisor.md +142 -0
- package/.agy/agents/team-worker.md +236 -0
- package/.agy/agents/ui-design-agent.md +286 -0
- package/.agy/agents/workflow-analyzer.md +114 -0
- package/.agy/agents/workflow-codebase-mapper.md +76 -0
- package/.agy/agents/workflow-collab-planner.md +142 -0
- package/.agy/agents/workflow-debugger.md +102 -0
- package/.agy/agents/workflow-executor.md +131 -0
- package/.agy/agents/workflow-external-researcher.md +86 -0
- package/.agy/agents/workflow-integration-checker.md +82 -0
- package/.agy/agents/workflow-nyquist-auditor.md +84 -0
- package/.agy/agents/workflow-phase-researcher.md +84 -0
- package/.agy/agents/workflow-plan-checker.md +89 -0
- package/.agy/agents/workflow-planner.md +194 -0
- package/.agy/agents/workflow-project-researcher.md +73 -0
- package/.agy/agents/workflow-research-synthesizer.md +70 -0
- package/.agy/agents/workflow-reviewer.md +81 -0
- package/.agy/agents/workflow-roadmapper.md +81 -0
- package/.agy/agents/workflow-verifier.md +119 -0
- package/.agy/skills/codify-to-knowhow/SKILL.md +172 -0
- package/.agy/skills/codify-to-knowhow/phases/01-load-manifest.md +101 -0
- package/.agy/skills/codify-to-knowhow/phases/02-generate-knowhow.md +97 -0
- package/.agy/skills/codify-to-knowhow/phases/03-generate-specs.md +92 -0
- package/.agy/skills/codify-to-knowhow/phases/04-index-verify.md +119 -0
- package/.agy/skills/learn-decompose/SKILL.md +118 -0
- package/.agy/skills/learn-follow/SKILL.md +129 -0
- package/.agy/skills/learn-investigate/SKILL.md +154 -0
- package/.agy/skills/learn-retro/SKILL.md +159 -0
- package/.agy/skills/learn-second-opinion/SKILL.md +124 -0
- package/.agy/skills/maestro/SKILL.md +221 -0
- package/.agy/skills/maestro-amend/SKILL.md +162 -0
- package/.agy/skills/maestro-analyze/SKILL.md +135 -0
- package/.agy/skills/maestro-brainstorm/SKILL.md +118 -0
- package/.agy/skills/maestro-collab/SKILL.md +174 -0
- package/.agy/skills/maestro-composer/SKILL.md +180 -0
- package/.agy/skills/maestro-execute/SKILL.md +133 -0
- package/.agy/skills/maestro-fork/SKILL.md +88 -0
- package/.agy/skills/maestro-guard/SKILL.md +101 -0
- package/.agy/skills/maestro-help/SKILL.md +267 -0
- package/.agy/skills/maestro-help/index/catalog.json +184 -0
- package/.agy/skills/maestro-help/phases/01-parse-intent.md +122 -0
- package/.agy/skills/maestro-help/phases/02-search-present.md +181 -0
- package/.agy/skills/maestro-help/phases/03-workflow-guide.md +186 -0
- package/.agy/skills/maestro-impeccable/SKILL.md +250 -0
- package/.agy/skills/maestro-init/SKILL.md +80 -0
- package/.agy/skills/maestro-learn/SKILL.md +142 -0
- package/.agy/skills/maestro-merge/SKILL.md +66 -0
- package/.agy/skills/maestro-milestone-audit/SKILL.md +70 -0
- package/.agy/skills/maestro-milestone-complete/SKILL.md +77 -0
- package/.agy/skills/maestro-milestone-release/SKILL.md +98 -0
- package/.agy/skills/maestro-overlay/SKILL.md +177 -0
- package/.agy/skills/maestro-plan/SKILL.md +172 -0
- package/.agy/skills/maestro-player/SKILL.md +176 -0
- package/.agy/skills/maestro-quick/SKILL.md +67 -0
- package/.agy/skills/maestro-ralph/SKILL.md +546 -0
- package/.agy/skills/maestro-ralph-execute/SKILL.md +255 -0
- package/.agy/skills/maestro-roadmap/SKILL.md +170 -0
- package/.agy/skills/maestro-tools-execute/SKILL.md +119 -0
- package/.agy/skills/maestro-tools-register/SKILL.md +159 -0
- package/.agy/skills/maestro-ui-codify/SKILL.md +81 -0
- package/.agy/skills/maestro-update/SKILL.md +175 -0
- package/.agy/skills/maestro-verify/SKILL.md +111 -0
- package/.agy/skills/manage-codebase-rebuild/SKILL.md +77 -0
- package/.agy/skills/manage-codebase-refresh/SKILL.md +59 -0
- package/.agy/skills/manage-harvest/SKILL.md +96 -0
- package/.agy/skills/manage-issue/SKILL.md +72 -0
- package/.agy/skills/manage-issue-discover/SKILL.md +83 -0
- package/.agy/skills/manage-knowhow/SKILL.md +76 -0
- package/.agy/skills/manage-knowhow-capture/SKILL.md +78 -0
- package/.agy/skills/manage-learn/SKILL.md +64 -0
- package/.agy/skills/manage-status/SKILL.md +51 -0
- package/.agy/skills/manage-wiki/SKILL.md +61 -0
- package/.agy/skills/quality-auto-test/SKILL.md +135 -0
- package/.agy/skills/quality-debug/SKILL.md +122 -0
- package/.agy/skills/quality-refactor/SKILL.md +69 -0
- package/.agy/skills/quality-retrospective/SKILL.md +79 -0
- package/.agy/skills/quality-review/SKILL.md +130 -0
- package/.agy/skills/quality-sync/SKILL.md +53 -0
- package/.agy/skills/quality-test/SKILL.md +119 -0
- package/.agy/skills/security-audit/SKILL.md +157 -0
- package/.agy/skills/skill-iter-tune/SKILL.md +381 -0
- package/.agy/skills/skill-iter-tune/phases/01-setup.md +144 -0
- package/.agy/skills/skill-iter-tune/phases/02-execute.md +292 -0
- package/.agy/skills/skill-iter-tune/phases/03-evaluate.md +312 -0
- package/.agy/skills/skill-iter-tune/phases/04-improve.md +198 -0
- package/.agy/skills/skill-iter-tune/phases/05-report.md +166 -0
- package/.agy/skills/skill-iter-tune/specs/evaluation-criteria.md +63 -0
- package/.agy/skills/skill-iter-tune/templates/eval-prompt.md +134 -0
- package/.agy/skills/skill-iter-tune/templates/execute-prompt.md +97 -0
- package/.agy/skills/spec-add/SKILL.md +67 -0
- package/.agy/skills/spec-load/SKILL.md +70 -0
- package/.agy/skills/spec-remove/SKILL.md +50 -0
- package/.agy/skills/spec-setup/SKILL.md +47 -0
- package/.agy/skills/team-coordinate/SKILL.md +267 -0
- package/.agy/skills/team-coordinate/roles/coordinator/commands/analyze-task.md +247 -0
- package/.agy/skills/team-coordinate/roles/coordinator/commands/dispatch.md +131 -0
- package/.agy/skills/team-coordinate/roles/coordinator/commands/monitor.md +348 -0
- package/.agy/skills/team-coordinate/roles/coordinator/role.md +362 -0
- package/.agy/skills/team-coordinate/specs/knowledge-transfer.md +111 -0
- package/.agy/skills/team-coordinate/specs/pipelines.md +97 -0
- package/.agy/skills/team-coordinate/specs/quality-gates.md +112 -0
- package/.agy/skills/team-coordinate/specs/role-spec-template.md +198 -0
- package/.agy/skills/team-executor/SKILL.md +180 -0
- package/.agy/skills/team-executor/roles/executor/commands/monitor.md +235 -0
- package/.agy/skills/team-executor/roles/executor/role.md +171 -0
- package/.agy/skills/team-executor/specs/session-schema.md +264 -0
- package/.agy/skills/team-lifecycle-v4/SKILL.md +189 -0
- package/.agy/skills/team-lifecycle-v4/roles/analyst/role.md +92 -0
- package/.agy/skills/team-lifecycle-v4/roles/coordinator/commands/analyze.md +56 -0
- package/.agy/skills/team-lifecycle-v4/roles/coordinator/commands/dispatch.md +56 -0
- package/.agy/skills/team-lifecycle-v4/roles/coordinator/commands/monitor.md +206 -0
- package/.agy/skills/team-lifecycle-v4/roles/coordinator/role.md +130 -0
- package/.agy/skills/team-lifecycle-v4/roles/executor/commands/fix.md +35 -0
- package/.agy/skills/team-lifecycle-v4/roles/executor/commands/implement.md +62 -0
- package/.agy/skills/team-lifecycle-v4/roles/executor/role.md +64 -0
- package/.agy/skills/team-lifecycle-v4/roles/planner/role.md +82 -0
- package/.agy/skills/team-lifecycle-v4/roles/reviewer/commands/review-code.md +34 -0
- package/.agy/skills/team-lifecycle-v4/roles/reviewer/commands/review-spec.md +44 -0
- package/.agy/skills/team-lifecycle-v4/roles/reviewer/role.md +65 -0
- package/.agy/skills/team-lifecycle-v4/roles/supervisor/role.md +188 -0
- package/.agy/skills/team-lifecycle-v4/roles/tester/role.md +84 -0
- package/.agy/skills/team-lifecycle-v4/roles/writer/role.md +92 -0
- package/.agy/skills/team-lifecycle-v4/specs/knowledge-transfer.md +114 -0
- package/.agy/skills/team-lifecycle-v4/specs/pipelines.md +140 -0
- package/.agy/skills/team-lifecycle-v4/specs/quality-gates.md +130 -0
- package/.agy/skills/team-lifecycle-v4/templates/architecture.md +254 -0
- package/.agy/skills/team-lifecycle-v4/templates/epics.md +196 -0
- package/.agy/skills/team-lifecycle-v4/templates/product-brief.md +133 -0
- package/.agy/skills/team-lifecycle-v4/templates/requirements.md +224 -0
- package/.agy/skills/team-quality-assurance/SKILL.md +148 -0
- package/.agy/skills/team-quality-assurance/roles/analyst/role.md +85 -0
- package/.agy/skills/team-quality-assurance/roles/coordinator/commands/analyze.md +72 -0
- package/.agy/skills/team-quality-assurance/roles/coordinator/commands/dispatch.md +111 -0
- package/.agy/skills/team-quality-assurance/roles/coordinator/commands/monitor.md +235 -0
- package/.agy/skills/team-quality-assurance/roles/coordinator/role.md +143 -0
- package/.agy/skills/team-quality-assurance/roles/executor/role.md +62 -0
- package/.agy/skills/team-quality-assurance/roles/generator/role.md +65 -0
- package/.agy/skills/team-quality-assurance/roles/scout/role.md +72 -0
- package/.agy/skills/team-quality-assurance/roles/strategist/role.md +69 -0
- package/.agy/skills/team-quality-assurance/specs/pipelines.md +115 -0
- package/.agy/skills/team-quality-assurance/specs/team-config.json +131 -0
- package/.agy/skills/team-review/SKILL.md +149 -0
- package/.agy/skills/team-review/roles/coordinator/commands/analyze.md +71 -0
- package/.agy/skills/team-review/roles/coordinator/commands/dispatch.md +91 -0
- package/.agy/skills/team-review/roles/coordinator/commands/monitor.md +209 -0
- package/.agy/skills/team-review/roles/coordinator/role.md +132 -0
- package/.agy/skills/team-review/roles/fixer/role.md +74 -0
- package/.agy/skills/team-review/roles/reviewer/role.md +66 -0
- package/.agy/skills/team-review/roles/scanner/role.md +77 -0
- package/.agy/skills/team-review/specs/dimensions.md +82 -0
- package/.agy/skills/team-review/specs/finding-schema.json +82 -0
- package/.agy/skills/team-review/specs/pipelines.md +102 -0
- package/.agy/skills/team-review/specs/team-config.json +27 -0
- package/.agy/skills/team-tech-debt/SKILL.md +133 -0
- package/.agy/skills/team-tech-debt/roles/assessor/role.md +76 -0
- package/.agy/skills/team-tech-debt/roles/coordinator/commands/analyze.md +47 -0
- package/.agy/skills/team-tech-debt/roles/coordinator/commands/dispatch.md +156 -0
- package/.agy/skills/team-tech-debt/roles/coordinator/commands/monitor.md +198 -0
- package/.agy/skills/team-tech-debt/roles/coordinator/role.md +123 -0
- package/.agy/skills/team-tech-debt/roles/executor/role.md +76 -0
- package/.agy/skills/team-tech-debt/roles/planner/role.md +68 -0
- package/.agy/skills/team-tech-debt/roles/scanner/role.md +90 -0
- package/.agy/skills/team-tech-debt/roles/validator/role.md +78 -0
- package/.agy/skills/team-tech-debt/specs/pipelines.md +47 -0
- package/.agy/skills/team-tech-debt/specs/team-config.json +129 -0
- package/.agy/skills/team-testing/SKILL.md +144 -0
- package/.agy/skills/team-testing/roles/analyst/role.md +101 -0
- package/.agy/skills/team-testing/roles/coordinator/commands/analyze.md +70 -0
- package/.agy/skills/team-testing/roles/coordinator/commands/dispatch.md +108 -0
- package/.agy/skills/team-testing/roles/coordinator/commands/monitor.md +242 -0
- package/.agy/skills/team-testing/roles/coordinator/role.md +134 -0
- package/.agy/skills/team-testing/roles/executor/role.md +95 -0
- package/.agy/skills/team-testing/roles/generator/role.md +95 -0
- package/.agy/skills/team-testing/roles/strategist/role.md +81 -0
- package/.agy/skills/team-testing/specs/pipelines.md +101 -0
- package/.agy/skills/team-testing/specs/team-config.json +93 -0
- package/.agy/skills/wiki-connect/SKILL.md +64 -0
- package/.agy/skills/wiki-digest/SKILL.md +70 -0
- package/.agy/skills/workflow-skill-designer/SKILL.md +506 -0
- package/.agy/skills/workflow-skill-designer/phases/01-requirements-analysis.md +356 -0
- package/.agy/skills/workflow-skill-designer/phases/02-orchestrator-design.md +444 -0
- package/.agy/skills/workflow-skill-designer/phases/03-phase-design.md +458 -0
- package/.agy/skills/workflow-skill-designer/phases/04-validation.md +471 -0
- package/package.json +3 -1
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: maestro-brainstorm
|
|
3
|
+
description: Use when exploring ideas, evaluating approaches, or needing multi-perspective analysis before implementation
|
|
4
|
+
argument-hint: [topic|role-name] [--yes] [--count N] [--session ID] [--update] [--skip-questions] [--include-questions] [--style-skill PKG]
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- ask_question
|
|
7
|
+
- define_subagent
|
|
8
|
+
- grep_search
|
|
9
|
+
- invoke_subagent
|
|
10
|
+
- manage_subagents
|
|
11
|
+
- run_command
|
|
12
|
+
- send_message
|
|
13
|
+
- view_file
|
|
14
|
+
- write_to_file
|
|
15
|
+
---
|
|
16
|
+
<purpose>
|
|
17
|
+
Unified brainstorming combining interactive framework generation, multi-role parallel analysis, and cross-role synthesis. Two modes: Auto (full pipeline with guidance-specification → parallel role analysis → synthesis) and Single Role (individual role analysis for an existing session). Outputs structured artifacts in .brainstorming/ directory ready for downstream planning.
|
|
18
|
+
</purpose>
|
|
19
|
+
|
|
20
|
+
<required_reading>
|
|
21
|
+
@~/.maestro/workflows/brainstorm.md
|
|
22
|
+
</required_reading>
|
|
23
|
+
|
|
24
|
+
<deferred_reading>
|
|
25
|
+
- [scratch-index.json](~/.maestro/templates/scratch-index.json) — read when operating in scratch mode
|
|
26
|
+
- [index.json](~/.maestro/templates/index.json) — read when operating in phase mode
|
|
27
|
+
- [brainstorm-visualize.md](~/.maestro/workflows/brainstorm-visualize.md) — read when html-prototypes/ produced and user wants to browse them
|
|
28
|
+
</deferred_reading>
|
|
29
|
+
|
|
30
|
+
<context>
|
|
31
|
+
$ARGUMENTS -- topic text for auto mode, or role name for single role mode.
|
|
32
|
+
|
|
33
|
+
**Auto mode**: topic text (e.g., "Build real-time collaboration platform") triggers full pipeline.
|
|
34
|
+
**Single role mode**: valid role name (e.g., "system-architect") runs one role analysis.
|
|
35
|
+
**All output** goes to `.workflow/scratch/{YYYYMMDD}-brainstorm-{slug}/`.
|
|
36
|
+
**Artifact registration**: On completion, registers artifact (type=brainstorm) in state.json.
|
|
37
|
+
**Output boundary**: ALL file writes MUST target `{output_dir}/` or `.workflow/state.json` only. NEVER modify source code or files outside these paths.
|
|
38
|
+
|
|
39
|
+
**Valid roles**: data-architect, product-manager, product-owner, scrum-master, subject-matter-expert, system-architect, test-strategist, ui-designer, ux-expert
|
|
40
|
+
|
|
41
|
+
**Flags**:
|
|
42
|
+
- `--yes` / `-y`: Auto mode, skip interactive questions, use defaults
|
|
43
|
+
- `--count N`: Number of roles to select (default 3, max 9)
|
|
44
|
+
- `--session ID`: Use existing session
|
|
45
|
+
- `--update`: Update existing analysis (single role)
|
|
46
|
+
- `--skip-questions`: Skip context gathering questions
|
|
47
|
+
- `--include-questions`: Force context gathering even if analysis exists
|
|
48
|
+
- `--style-skill PKG`: Style package for ui-designer role
|
|
49
|
+
|
|
50
|
+
### Pre-load specs
|
|
51
|
+
1. **Architecture specs**: Run `maestro spec load --category arch` to load architecture constraints. Use as context for multi-role analysis — ensures roles respect documented decisions.
|
|
52
|
+
2. Optional — proceed without if unavailable.
|
|
53
|
+
|
|
54
|
+
### Role Knowledge
|
|
55
|
+
1. Browse accumulated knowledge for this role:
|
|
56
|
+
`maestro wiki list --category arch`
|
|
57
|
+
2. Analyze the index, identify entries relevant to the current task
|
|
58
|
+
3. Load selected documents:
|
|
59
|
+
`maestro wiki load <id1> [id2] [id3...]`
|
|
60
|
+
4. Review loaded knowledge before proceeding
|
|
61
|
+
</context>
|
|
62
|
+
|
|
63
|
+
<execution>
|
|
64
|
+
Follow '~/.maestro/workflows/brainstorm.md' completely.
|
|
65
|
+
|
|
66
|
+
**Next-step routing on completion:**
|
|
67
|
+
|
|
68
|
+
Auto mode:
|
|
69
|
+
- Project not initialized → view_file(AbsolutePath="<agy-skills-dir>/maestro-init/SKILL.md") + execute inline
|
|
70
|
+
- Project initialized, need spec package → view_file(AbsolutePath="<agy-skills-dir>/maestro-roadmap/SKILL.md") + execute inline (args: "--mode full --from-brainstorm {session_id}")
|
|
71
|
+
- Project initialized, quick roadmap → view_file(AbsolutePath="<agy-skills-dir>/maestro-roadmap/SKILL.md") + execute inline (args: "--from-brainstorm {session_id}")
|
|
72
|
+
- Need deeper analysis first → view_file(AbsolutePath="<agy-skills-dir>/maestro-analyze/SKILL.md") + execute inline (args: "{topic}")
|
|
73
|
+
- `html-prototypes/` produced with 2+ files and user wants to browse → load `~/.maestro/workflows/brainstorm-visualize.md` and launch visualizer server (optional, user-triggered)
|
|
74
|
+
- DESIGN.md established during Step 3.5 → suggest: "Run `/maestro-impeccable build <feature-description>` to build with the established design system"
|
|
75
|
+
|
|
76
|
+
Single role mode:
|
|
77
|
+
- More roles needed → view_file(AbsolutePath="<agy-skills-dir>/maestro-brainstorm/SKILL.md") + execute inline (args: "{next_role} --session {session_id}")
|
|
78
|
+
- All roles done, run synthesis → view_file(AbsolutePath="<agy-skills-dir>/maestro-brainstorm/SKILL.md") + execute inline (args: "{topic} --session {session_id}")
|
|
79
|
+
</execution>
|
|
80
|
+
|
|
81
|
+
<error_codes>
|
|
82
|
+
| Code | Severity | Condition | Recovery |
|
|
83
|
+
|------|----------|-----------|----------|
|
|
84
|
+
| E001 | error | Topic or role argument required | Prompt user for topic text or role name |
|
|
85
|
+
| E002 | error | No active session for single role mode | Guide user to run auto mode first |
|
|
86
|
+
| E003 | error | Invalid role name | Show valid roles list |
|
|
87
|
+
| W001 | warning | Fewer than 10 ideas in divergent phase | Proceed with available ideas |
|
|
88
|
+
| W002 | warning | Project context (.workflow/) not found | Continue without project context |
|
|
89
|
+
| W003 | warning | Role template not found | Use generic analysis structure |
|
|
90
|
+
| W004 | warning | Validation score < 60 | Log warning, suggest manual review |
|
|
91
|
+
| W005 | warning | External research agent failed | Continue without designResearchContext |
|
|
92
|
+
</error_codes>
|
|
93
|
+
|
|
94
|
+
<success_criteria>
|
|
95
|
+
**Auto mode**:
|
|
96
|
+
- [ ] guidance-specification.md with RFC 2119 keywords, terminology, non-goals, feature decomposition
|
|
97
|
+
- [ ] design-research.md persisted when Step 1.7 external research ran (fail-soft: absence not a failure)
|
|
98
|
+
- [ ] Spec Review Gate passed (Step 3.5) or `--yes` bypassed
|
|
99
|
+
- [ ] Role analysis files for each selected NON-UI role in `.brainstorming/{role}/`
|
|
100
|
+
- [ ] If `ui-designer` in selected_roles AND Step 3.5 ran: `.workflow/impeccable/DESIGN.md` exists (visual style established via impeccable explore)
|
|
101
|
+
- [ ] If `ui-designer` in selected_roles: `ui-designer/analysis.md` exists with UX analysis (interaction flows, state design, information architecture)
|
|
102
|
+
- [ ] Feature specs in `.brainstorming/feature-specs/` (or synthesis-specification.md)
|
|
103
|
+
- [ ] UI-bearing feature specs reference DESIGN.md for visual constraints in Section 3 (Interface Contract)
|
|
104
|
+
- [ ] feature-index.json and synthesis-changelog.md
|
|
105
|
+
- [ ] Final Output Gate passed (Step 5.5) or `--yes` bypassed
|
|
106
|
+
- [ ] All user decisions captured with Decision Recording Protocol
|
|
107
|
+
- [ ] Session metadata updated with completion status
|
|
108
|
+
- [ ] Confidence scored per role completion and after cross-role analysis
|
|
109
|
+
- [ ] Readiness gate checked before spec generation
|
|
110
|
+
- [ ] Pressure pass completed on at least 1 feature spec
|
|
111
|
+
- [ ] Confidence summary appended to synthesis-changelog.md
|
|
112
|
+
|
|
113
|
+
**Single role mode**:
|
|
114
|
+
- [ ] analysis.md written to `{output_dir}/{role}/`
|
|
115
|
+
- [ ] Feature-point organization used when feature list available
|
|
116
|
+
- [ ] Framework reference included when guidance-specification.md exists
|
|
117
|
+
- [ ] Session metadata updated
|
|
118
|
+
</success_criteria>
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: maestro-collab
|
|
3
|
+
description: Use when a question needs cross-verification from multiple CLI tools or diverse analytical perspectives
|
|
4
|
+
argument-hint: <requirement> [--tools gemini,qwen,claude] [--mode analysis|write] [--rule <template>] [-y]
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- ask_question
|
|
7
|
+
- define_subagent
|
|
8
|
+
- grep_search
|
|
9
|
+
- invoke_subagent
|
|
10
|
+
- manage_subagents
|
|
11
|
+
- run_command
|
|
12
|
+
- send_message
|
|
13
|
+
- view_file
|
|
14
|
+
- write_to_file
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
<purpose>
|
|
18
|
+
Fan-out requirement to multiple CLI tools in parallel → cross-verify for consensus/conflicts → synthesize into unified report with downstream artifacts (context.md + conclusions.json).
|
|
19
|
+
</purpose>
|
|
20
|
+
|
|
21
|
+
<context>
|
|
22
|
+
$ARGUMENTS — requirement text and optional flags.
|
|
23
|
+
|
|
24
|
+
**Flags**:
|
|
25
|
+
- `--tools <list>`: Comma-separated CLI tools (default: first 3 enabled)
|
|
26
|
+
- `--mode analysis|write`: Delegate mode (default: analysis)
|
|
27
|
+
- `--rule <template>`: Shared rule template for all delegates
|
|
28
|
+
- `-y`: Skip plan confirmation
|
|
29
|
+
|
|
30
|
+
**Pre-load** (optional): `maestro spec load --category arch` + `maestro wiki list --category arch` → include in delegate prompts.
|
|
31
|
+
|
|
32
|
+
**Output**: `.workflow/scratch/{YYYYMMDD}-collab-{slug}/`
|
|
33
|
+
- `collab-report.md` — merged findings with consensus/conflict/unique tags
|
|
34
|
+
- `context.md` — Locked/Free/Deferred decisions (plan compatible)
|
|
35
|
+
- `conclusions.json` — structured: session_id, tools[], consensus_level, recommendation, confidence, dimensions[], decisions[]
|
|
36
|
+
- `per-tool/{tool}-output.md` — raw outputs
|
|
37
|
+
</context>
|
|
38
|
+
|
|
39
|
+
<state_machine>
|
|
40
|
+
|
|
41
|
+
<states>
|
|
42
|
+
S_PARSE — 解析参数、提取 flags PERSIST: —
|
|
43
|
+
S_DISCOVER — 发现可用 CLI 工具 PERSIST: —
|
|
44
|
+
S_CONFIRM — 展示计划、用户确认(-y 跳过) PERSIST: —
|
|
45
|
+
S_FANOUT — 构建 prompt、并行启动 delegate、STOP PERSIST: —
|
|
46
|
+
S_COLLECT — 回调到达、收集结果 PERSIST: per-tool outputs
|
|
47
|
+
S_CROSS_VERIFY — 分类发现(共识/冲突/独有) PERSIST: —
|
|
48
|
+
S_SYNTHESIZE — 解决冲突、生成 3 个输出文件 PERSIST: outputs
|
|
49
|
+
S_REGISTER — 注册 CLB artifact PERSIST: state.json
|
|
50
|
+
S_REPORT — 显示摘要 + next-step routing PERSIST: —
|
|
51
|
+
</states>
|
|
52
|
+
|
|
53
|
+
<transitions>
|
|
54
|
+
|
|
55
|
+
S_PARSE:
|
|
56
|
+
→ S_DISCOVER WHEN: requirement non-empty DO: extract requirement, tools, mode, rule, autoYes
|
|
57
|
+
→ S_PARSE WHEN: requirement empty DO: ask_question for requirement
|
|
58
|
+
|
|
59
|
+
S_DISCOVER:
|
|
60
|
+
→ S_CONFIRM WHEN: eligible tools >= 2 DO: A_DISCOVER_TOOLS
|
|
61
|
+
→ ERROR(E002) WHEN: eligible tools < 2
|
|
62
|
+
|
|
63
|
+
S_CONFIRM:
|
|
64
|
+
→ S_FANOUT WHEN: autoYes DO: A_SETUP_SESSION
|
|
65
|
+
→ S_FANOUT WHEN: user confirms "执行" DO: A_SETUP_SESSION
|
|
66
|
+
→ S_DISCOVER WHEN: user selects "修改工具选择" DO: re-select tools, validate >= 2
|
|
67
|
+
→ END WHEN: user cancels
|
|
68
|
+
|
|
69
|
+
S_FANOUT:
|
|
70
|
+
→ S_COLLECT DO: A_PARALLEL_DELEGATE then STOP — wait for callbacks
|
|
71
|
+
|
|
72
|
+
S_COLLECT:
|
|
73
|
+
→ S_CROSS_VERIFY WHEN: all callbacks arrived DO: A_COLLECT_OUTPUTS
|
|
74
|
+
→ ERROR(E004) WHEN: all delegates failed
|
|
75
|
+
GUARD: 1+ succeeded → continue with partial results (W001)
|
|
76
|
+
|
|
77
|
+
S_CROSS_VERIFY:
|
|
78
|
+
→ S_SYNTHESIZE DO: A_CLASSIFY_FINDINGS
|
|
79
|
+
|
|
80
|
+
S_SYNTHESIZE:
|
|
81
|
+
→ S_REGISTER DO: A_GENERATE_OUTPUTS
|
|
82
|
+
|
|
83
|
+
S_REGISTER:
|
|
84
|
+
→ S_REPORT DO: append CLB artifact to state.json (type: collab, scope: adhoc)
|
|
85
|
+
|
|
86
|
+
S_REPORT:
|
|
87
|
+
→ END DO: display summary (requirement, tools, consensus_level, per-tool status, artifact id, output dir)
|
|
88
|
+
|
|
89
|
+
</transitions>
|
|
90
|
+
|
|
91
|
+
<actions>
|
|
92
|
+
|
|
93
|
+
### A_DISCOVER_TOOLS
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
run_command("maestro tools list --json 2>/dev/null || cat ~/.maestro/cli-tools.json")
|
|
97
|
+
```
|
|
98
|
+
Filter: enabled == true. If --mode write: exclude type == "api-endpoint".
|
|
99
|
+
Auto-select (no --tools): first 3 eligible in config order.
|
|
100
|
+
|
|
101
|
+
### A_SETUP_SESSION
|
|
102
|
+
|
|
103
|
+
Create: `.workflow/scratch/{YYYYMMDD}-collab-{slug}/` + `per-tool/`.
|
|
104
|
+
|
|
105
|
+
### A_PARALLEL_DELEGATE
|
|
106
|
+
|
|
107
|
+
1. Build shared prompt:
|
|
108
|
+
```
|
|
109
|
+
PURPOSE: {requirement}; success = actionable findings with evidence
|
|
110
|
+
TASK: {auto-decomposed into 3-5 specific verbs}
|
|
111
|
+
MODE: {delegateMode}
|
|
112
|
+
CONTEXT: @**/*
|
|
113
|
+
EXPECTED: Structured findings with file:line refs, confidence (0-100), prioritized recommendations
|
|
114
|
+
CONSTRAINTS: {from requirement}
|
|
115
|
+
```
|
|
116
|
+
2. Launch ALL delegates in ONE message — multiple `run_command(run_in_background: true)`:
|
|
117
|
+
```
|
|
118
|
+
maestro delegate "${prompt}" --to {tool} --mode ${mode} [--rule ${rule}]
|
|
119
|
+
```
|
|
120
|
+
3. **STOP immediately after launch. Wait for background callbacks.**
|
|
121
|
+
|
|
122
|
+
### A_COLLECT_OUTPUTS
|
|
123
|
+
|
|
124
|
+
On each callback: `maestro delegate output <id>` → write `per-tool/{tool}-output.md`.
|
|
125
|
+
|
|
126
|
+
### A_CLASSIFY_FINDINGS
|
|
127
|
+
|
|
128
|
+
Read all per-tool outputs. For each finding:
|
|
129
|
+
|
|
130
|
+
| Condition | Tag |
|
|
131
|
+
|-----------|-----|
|
|
132
|
+
| 2+ tools agree | CONSENSUS |
|
|
133
|
+
| Tools disagree | CONFLICT |
|
|
134
|
+
| 1 tool only | UNIQUE |
|
|
135
|
+
|
|
136
|
+
consensus_level = consensus_count / total_findings * 100.
|
|
137
|
+
If consensus_level < 40%: W003.
|
|
138
|
+
|
|
139
|
+
### A_GENERATE_OUTPUTS
|
|
140
|
+
|
|
141
|
+
Resolve conflicts via evidence-weighted voting:
|
|
142
|
+
- Higher confidence wins; more specific evidence (file:line) wins over general; tied → SUGGESTED
|
|
143
|
+
|
|
144
|
+
Write 3 files:
|
|
145
|
+
1. **collab-report.md**: Summary, Consensus Findings, Resolved Conflicts, Unresolved Items, Unique Insights, Recommendations, Per-Tool Confidence table
|
|
146
|
+
2. **context.md**: Locked (CONSENSUS items), Free (UNIQUE with strong evidence), Deferred (UNRESOLVED conflicts). Standard Locked/Free/Deferred format for plan compatibility.
|
|
147
|
+
3. **conclusions.json**: session_id, subject, mode, tools[], consensus_level, recommendation (Go/No-Go/Conditional), confidence, dimensions[{name, score, findings}], decisions[{title, classification, source_tools, rationale}]
|
|
148
|
+
|
|
149
|
+
</actions>
|
|
150
|
+
|
|
151
|
+
</state_machine>
|
|
152
|
+
|
|
153
|
+
<error_codes>
|
|
154
|
+
| Code | Condition | Recovery |
|
|
155
|
+
|------|-----------|----------|
|
|
156
|
+
| E002 | Fewer than 2 eligible tools | Check cli-tools.json, enable more tools |
|
|
157
|
+
| E004 | All delegates failed | Abort with per-tool error details |
|
|
158
|
+
| W001 | One tool failed | Continue with remaining (partial degradation) |
|
|
159
|
+
| W003 | consensus_level < 40% | Flag in summary, recommend manual review |
|
|
160
|
+
</error_codes>
|
|
161
|
+
|
|
162
|
+
<success_criteria>
|
|
163
|
+
- [ ] All delegates launched in parallel via run_command(run_in_background: true), STOP after launch
|
|
164
|
+
- [ ] Cross-verification: consensus/conflict/unique classification with consensus_level
|
|
165
|
+
- [ ] 3 output files produced (collab-report.md, context.md, conclusions.json)
|
|
166
|
+
- [ ] CLB artifact registered in state.json
|
|
167
|
+
- [ ] Partial degradation: continued if 1+ tools succeeded
|
|
168
|
+
</success_criteria>
|
|
169
|
+
|
|
170
|
+
<next_step_routing>
|
|
171
|
+
- Deep feasibility → `/maestro-analyze "{topic}"`
|
|
172
|
+
- Plan from conclusions → `/maestro-plan --dir {dir}`
|
|
173
|
+
- Expand → `/maestro-brainstorm "{topic}"`
|
|
174
|
+
</next_step_routing>
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: maestro-composer
|
|
3
|
+
description: Compose reusable workflow templates from natural language
|
|
4
|
+
argument-hint: <workflow-description> [--resume] [--edit <template-path>]
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- ask_question
|
|
7
|
+
- define_subagent
|
|
8
|
+
- grep_search
|
|
9
|
+
- invoke_subagent
|
|
10
|
+
- manage_subagents
|
|
11
|
+
- replace_file_content
|
|
12
|
+
- run_command
|
|
13
|
+
- send_message
|
|
14
|
+
- view_file
|
|
15
|
+
- write_to_file
|
|
16
|
+
---
|
|
17
|
+
<purpose>
|
|
18
|
+
Interactive workflow template composer. Parse natural language → resolve executors → inject checkpoints → build DAG → persist to `~/.maestro/templates/workflows/`. Progressive disclosure — specs loaded only when phase needs them.
|
|
19
|
+
|
|
20
|
+
Three entry modes: **New design** (default), **Resume** (`--resume`), **Edit** (`--edit <path>`).
|
|
21
|
+
</purpose>
|
|
22
|
+
|
|
23
|
+
<deferred_reading>
|
|
24
|
+
- [node-catalog](~/.maestro/templates/workflows/specs/node-catalog.md) — read at Phase 2 (Resolve)
|
|
25
|
+
- [template-schema](~/.maestro/templates/workflows/specs/template-schema.md) — read at Phase 5 (Persist)
|
|
26
|
+
</deferred_reading>
|
|
27
|
+
|
|
28
|
+
<context>
|
|
29
|
+
$ARGUMENTS — natural language description, or flags.
|
|
30
|
+
|
|
31
|
+
**Flags**: `--resume` (resume in-progress design), `--edit <path>` (edit existing template)
|
|
32
|
+
|
|
33
|
+
**Constants**:
|
|
34
|
+
- Template dir: `~/.maestro/templates/workflows/`
|
|
35
|
+
- Template index: `~/.maestro/templates/workflows/index.json`
|
|
36
|
+
- Design drafts: `.workflow/templates/design-drafts/`
|
|
37
|
+
- Template ID: `wft-<slug>-<YYYYMMDD>`, Node ID: `N-<seq>`, Checkpoint: `CP-<seq>`
|
|
38
|
+
- Max nodes: 20
|
|
39
|
+
|
|
40
|
+
### Pre-load specs
|
|
41
|
+
1. **Architecture specs**: Run `maestro spec load --category arch` to load architecture constraints. Use as context for node resolution — ensures workflow design respects documented patterns.
|
|
42
|
+
2. **Coding specs**: Run `maestro spec load --category coding` to load coding conventions. Informs executor argument defaults and context injection.
|
|
43
|
+
3. Optional — proceed without if unavailable.
|
|
44
|
+
</context>
|
|
45
|
+
|
|
46
|
+
<state_machine>
|
|
47
|
+
|
|
48
|
+
<states>
|
|
49
|
+
S_ROUTE — 入口路由(new/resume/edit) PERSIST: —
|
|
50
|
+
S_PARSE — 语义意图提取 PERSIST: intent.json
|
|
51
|
+
S_CONFIRM_1 — 确认解析结果 PERSIST: —
|
|
52
|
+
S_RESOLVE — 映射步骤到 executor 节点 PERSIST: nodes.json
|
|
53
|
+
S_CONFIRM_2 — 确认节点映射 PERSIST: —
|
|
54
|
+
S_ENRICH — 注入 checkpoint + 构建 DAG PERSIST: dag.json
|
|
55
|
+
S_CONFIRM_3 — 可视化 pipeline + 用户审批 PERSIST: —
|
|
56
|
+
S_PERSIST — 组装 JSON + 保存模板 PERSIST: template file + index
|
|
57
|
+
</states>
|
|
58
|
+
|
|
59
|
+
<transitions>
|
|
60
|
+
|
|
61
|
+
S_ROUTE:
|
|
62
|
+
→ S_PARSE WHEN: no flags (new design)
|
|
63
|
+
→ S_RESOLVE WHEN: --resume DO: load draft, skip to last incomplete phase
|
|
64
|
+
→ S_CONFIRM_3 WHEN: --edit <path> DO: load template, show pipeline, ask edits
|
|
65
|
+
|
|
66
|
+
S_PARSE:
|
|
67
|
+
→ S_CONFIRM_1 DO: A_PARSE_INTENT
|
|
68
|
+
|
|
69
|
+
S_CONFIRM_1:
|
|
70
|
+
→ S_RESOLVE WHEN: user confirms "Looks good"
|
|
71
|
+
→ S_PARSE WHEN: user selects "Edit steps" or "Add step"
|
|
72
|
+
→ END WHEN: user cancels DO: save draft
|
|
73
|
+
|
|
74
|
+
S_RESOLVE:
|
|
75
|
+
→ S_CONFIRM_2 DO: A_RESOLVE_NODES (read deferred: node-catalog)
|
|
76
|
+
|
|
77
|
+
S_CONFIRM_2:
|
|
78
|
+
→ S_ENRICH WHEN: user confirms "Continue"
|
|
79
|
+
→ S_RESOLVE WHEN: user changes executor or node type
|
|
80
|
+
→ S_PARSE WHEN: user selects "Back to intent"
|
|
81
|
+
→ END WHEN: user cancels DO: save draft
|
|
82
|
+
|
|
83
|
+
S_ENRICH:
|
|
84
|
+
→ S_CONFIRM_3 DO: A_BUILD_DAG
|
|
85
|
+
|
|
86
|
+
S_CONFIRM_3:
|
|
87
|
+
→ S_PERSIST WHEN: user confirms "Confirm & Save"
|
|
88
|
+
→ S_CONFIRM_3 WHEN: user edits/adds/removes node DO: apply change, re-render
|
|
89
|
+
→ S_ENRICH WHEN: user selects "Re-run checkpoints"
|
|
90
|
+
→ END WHEN: user cancels DO: save draft
|
|
91
|
+
|
|
92
|
+
S_PERSIST:
|
|
93
|
+
→ END DO: A_SAVE_TEMPLATE (read deferred: template-schema)
|
|
94
|
+
|
|
95
|
+
</transitions>
|
|
96
|
+
|
|
97
|
+
<actions>
|
|
98
|
+
|
|
99
|
+
### A_PARSE_INTENT
|
|
100
|
+
|
|
101
|
+
1. Parse description (if empty: ask_question for workflow description)
|
|
102
|
+
2. Extract candidate nodes via semantic signals:
|
|
103
|
+
|
|
104
|
+
| Signal | Type hint |
|
|
105
|
+
|--------|-----------|
|
|
106
|
+
| "analyze", "review", "explore" | analysis (cli) |
|
|
107
|
+
| "plan", "design", "spec" | planning (skill) |
|
|
108
|
+
| "implement", "build", "code", "fix" | execution (skill) |
|
|
109
|
+
| "test", "validate", "verify" | testing (skill) |
|
|
110
|
+
| "then", "next", "after" | sequential edge |
|
|
111
|
+
| "parallel", "simultaneously" | parallel edge |
|
|
112
|
+
|
|
113
|
+
3. Extract variables (inputs that vary per run)
|
|
114
|
+
4. Classify: task type + complexity (simple 1-3 / medium 4-7 / complex 8+)
|
|
115
|
+
5. Write `intent.json` to design drafts dir
|
|
116
|
+
6. Display: parsed steps, variables, task type, complexity
|
|
117
|
+
|
|
118
|
+
### A_RESOLVE_NODES
|
|
119
|
+
|
|
120
|
+
Read deferred `node-catalog.md` (fallback to built-in mapping):
|
|
121
|
+
|
|
122
|
+
| Type hint | Default executor |
|
|
123
|
+
|-----------|-----------------|
|
|
124
|
+
| planning | `maestro-plan` |
|
|
125
|
+
| execution | `maestro-execute` |
|
|
126
|
+
| testing | `quality-test` |
|
|
127
|
+
| review | `quality-review` |
|
|
128
|
+
| brainstorm | `maestro-brainstorm` |
|
|
129
|
+
| analysis | `maestro delegate --role analyze` |
|
|
130
|
+
| verify | `maestro-verify` |
|
|
131
|
+
| refactor | `quality-refactor` |
|
|
132
|
+
| debug | `quality-debug` |
|
|
133
|
+
|
|
134
|
+
Build `args_template` with variable placeholders. Context injection: planning-after-analysis → `--context {prev_output_path}`, execution-after-planning → `--resume-session {prev_session_id}`.
|
|
135
|
+
Write `nodes.json`. Display resolved node list.
|
|
136
|
+
|
|
137
|
+
### A_BUILD_DAG
|
|
138
|
+
|
|
139
|
+
1. Build sequential edges (fan-out/fan-in for parallel groups)
|
|
140
|
+
2. Auto-inject checkpoints:
|
|
141
|
+
|
|
142
|
+
| Rule | Condition |
|
|
143
|
+
|------|-----------|
|
|
144
|
+
| Artifact boundary | Source outputs plan/spec/analysis/review |
|
|
145
|
+
| Execution gate | Target contains `execute` |
|
|
146
|
+
| Long-running | Target is maestro-plan, maestro-roadmap --mode full |
|
|
147
|
+
| Post-testing | Source contains `test` or `auto-test` |
|
|
148
|
+
| User-defined | type_hint == checkpoint |
|
|
149
|
+
|
|
150
|
+
3. Finalize context_schema from {variable} references
|
|
151
|
+
4. Validate: no cycles, no orphans, all reachable
|
|
152
|
+
5. Write `dag.json`
|
|
153
|
+
6. Display ASCII pipeline visualization
|
|
154
|
+
|
|
155
|
+
### A_SAVE_TEMPLATE
|
|
156
|
+
|
|
157
|
+
Read deferred `template-schema.md` (fallback to built-in structure).
|
|
158
|
+
Assemble template JSON: template_id, name, nodes, edges, checkpoints, context_schema, execution_mode.
|
|
159
|
+
Write to `~/.maestro/templates/workflows/<slug>.json`. Update index.json.
|
|
160
|
+
Display: path, ID, node count, variables, execute/edit commands. Clean up draft dir.
|
|
161
|
+
|
|
162
|
+
</actions>
|
|
163
|
+
|
|
164
|
+
</state_machine>
|
|
165
|
+
|
|
166
|
+
<error_codes>
|
|
167
|
+
| Code | Condition | Recovery |
|
|
168
|
+
|------|-----------|----------|
|
|
169
|
+
| E002 | 0 steps extracted | Ask user to rephrase with action verbs |
|
|
170
|
+
| E003 | Node count > 20 | Suggest splitting into sub-workflows |
|
|
171
|
+
| E005 | DAG cycle detected | Show cycle, ask user to resolve |
|
|
172
|
+
| E006 | Edit template not found (--edit) | Show available templates |
|
|
173
|
+
| W001 | Ambiguous step→executor mapping | Show candidates, let user choose |
|
|
174
|
+
</error_codes>
|
|
175
|
+
|
|
176
|
+
<success_criteria>
|
|
177
|
+
- [ ] Each phase has interactive confirmation gate
|
|
178
|
+
- [ ] Template JSON written with nodes, edges, checkpoints, context_schema
|
|
179
|
+
- [ ] Index updated; deferred specs loaded only when phase needs them
|
|
180
|
+
</success_criteria>
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: maestro-execute
|
|
3
|
+
description: Use when a confirmed plan is ready for implementation
|
|
4
|
+
argument-hint: [phase] [--auto-commit] [--method agent|cli|auto] [--executor <tool>] [--dir <path>] [-y]
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- ask_question
|
|
7
|
+
- define_subagent
|
|
8
|
+
- grep_search
|
|
9
|
+
- invoke_subagent
|
|
10
|
+
- manage_subagents
|
|
11
|
+
- replace_file_content
|
|
12
|
+
- run_command
|
|
13
|
+
- send_message
|
|
14
|
+
- view_file
|
|
15
|
+
- write_to_file
|
|
16
|
+
---
|
|
17
|
+
<purpose>
|
|
18
|
+
Execute all tasks in a plan using wave-based parallel execution with dependency-aware ordering. Each plan is executed independently (plans串行, plan内wave并行). Task summaries are written to the plan's scratch directory under `.summaries/`. Registers EXC artifact in state.json.
|
|
19
|
+
|
|
20
|
+
Invoked after /maestro-plan produces a confirmed plan. When called without args on a milestone, finds all pending plans and executes them sequentially.
|
|
21
|
+
</purpose>
|
|
22
|
+
|
|
23
|
+
<required_reading>
|
|
24
|
+
@~/.maestro/workflows/execute.md
|
|
25
|
+
</required_reading>
|
|
26
|
+
|
|
27
|
+
<deferred_reading>
|
|
28
|
+
- [task.json](~/.maestro/templates/task.json) — read when reading task definitions
|
|
29
|
+
- [state.json](~/.maestro/templates/state.json) — read when registering artifact
|
|
30
|
+
</deferred_reading>
|
|
31
|
+
|
|
32
|
+
<context>
|
|
33
|
+
$ARGUMENTS — phase number, or no args for milestone-wide execution, with optional flags.
|
|
34
|
+
|
|
35
|
+
Scope routing, flags, resolution logic, output directory format, artifact registration schema, and incremental knowhow extraction are defined in workflow `execute.md`.
|
|
36
|
+
|
|
37
|
+
### Pre-load context (before task execution)
|
|
38
|
+
|
|
39
|
+
1. **Codebase docs**: If `.workflow/codebase/doc-index.json` exists, read `ARCHITECTURE.md` for module boundaries. Pass as shared context to executor agents.
|
|
40
|
+
2. **Wiki knowledge**: Run `maestro wiki search "<phase keywords>" --json 2>/dev/null`. If results found, extract top 5 entries as prior knowledge context for agents.
|
|
41
|
+
3. **Coding specs + tools**: Run `maestro spec load --category coding` to load coding conventions AND discoverable knowhow tools (tool: true entries). Pass as specs context to all executor agents.
|
|
42
|
+
4. **UI specs (conditional)**: If any task involves frontend/UI work (task scope/description contains keywords like component, page, style, layout, CSS, HTML, frontend; or focus_paths in `src/components/`, `src/pages/`, `src/styles/`, `src/ui/`), also run `maestro spec load --category ui` and include in agent context.
|
|
43
|
+
5. All are optional — proceed without if unavailable (log warning).
|
|
44
|
+
|
|
45
|
+
### Role Knowledge
|
|
46
|
+
`maestro wiki list --category coding` → select relevant → `maestro wiki load`
|
|
47
|
+
</context>
|
|
48
|
+
|
|
49
|
+
<execution>
|
|
50
|
+
### Pre-flight: team conflict check
|
|
51
|
+
|
|
52
|
+
Before any task execution, run:
|
|
53
|
+
```
|
|
54
|
+
run_command("maestro collab preflight --phase <phase-number>")
|
|
55
|
+
```
|
|
56
|
+
If exit code is 1, present warnings and ask whether to proceed.
|
|
57
|
+
|
|
58
|
+
Follow '~/.maestro/workflows/execute.md' completely.
|
|
59
|
+
|
|
60
|
+
### Post-task Knowledge Inquiry
|
|
61
|
+
|
|
62
|
+
After each task completion, check triggers:
|
|
63
|
+
|
|
64
|
+
| Condition | Ask | Route |
|
|
65
|
+
|-----------|-----|-------|
|
|
66
|
+
| Summary mentions approach change / plan deviation | "Record as arch constraint?" | spec-add arch |
|
|
67
|
+
| retry_count >= 2 | "Document fix pattern?" | spec-add debug |
|
|
68
|
+
| Summary contains design rationale ("chose X because") | "Record as knowhow?" | spec-add learning |
|
|
69
|
+
|
|
70
|
+
On confirm → `Skill("spec-add", "<category> <content>")`.
|
|
71
|
+
|
|
72
|
+
### Issue Status Sync
|
|
73
|
+
|
|
74
|
+
On each task completion, if `task.issue_id` exists, sync status back to the issue in `.workflow/issues/issues.jsonl`:
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
For each completed/failed TASK with issue_id:
|
|
78
|
+
Read issue from issues.jsonl by issue_id
|
|
79
|
+
Collect all task_refs[] statuses for that issue:
|
|
80
|
+
all task_refs completed → issue.status = "resolved"
|
|
81
|
+
any task_ref failed → issue.status = "in_progress"
|
|
82
|
+
Append history entry: { action: "executed", at: <ISO>, by: "maestro-execute", summary: "TASK-{NNN} {status}" }
|
|
83
|
+
Write updated issue back to issues.jsonl
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
**Report format on completion:**
|
|
87
|
+
|
|
88
|
+
```
|
|
89
|
+
=== EXECUTION COMPLETE ===
|
|
90
|
+
Plans executed: {plans_count}
|
|
91
|
+
Completed: {completed_count}/{total_count} tasks
|
|
92
|
+
Failed: {failed_count} tasks
|
|
93
|
+
|
|
94
|
+
Summaries: {plan_dir}/.summaries/
|
|
95
|
+
Tasks: {plan_dir}/.task/
|
|
96
|
+
|
|
97
|
+
Next steps:
|
|
98
|
+
/maestro-verify -- Verify execution results
|
|
99
|
+
/maestro-verify --dir {dir} -- Verify specific plan
|
|
100
|
+
/manage-status -- View project dashboard
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
**Completion status:**
|
|
104
|
+
```
|
|
105
|
+
--- COMPLETION STATUS ---
|
|
106
|
+
STATUS: DONE|DONE_WITH_CONCERNS|NEEDS_RETRY
|
|
107
|
+
CONCERNS: {failed_count} tasks failed (if any)
|
|
108
|
+
NEXT: /maestro-verify
|
|
109
|
+
--- END STATUS ---
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
If failed tasks exist, suggest /quality-debug for investigation.
|
|
113
|
+
</execution>
|
|
114
|
+
|
|
115
|
+
<error_codes>
|
|
116
|
+
| Code | Severity | Condition | Recovery |
|
|
117
|
+
|------|----------|-----------|----------|
|
|
118
|
+
| E001 | error | No pending plans found | Verify plans exist, run maestro-plan first |
|
|
119
|
+
| E002 | error | Plan directory not found | Check --dir path |
|
|
120
|
+
| E003 | error | plan.json not found in directory | Verify plan.json exists, run maestro-plan first |
|
|
121
|
+
| E004 | error | No pending tasks, all tasks already completed | Check task statuses, reset if needed |
|
|
122
|
+
| W001 | warning | Executor completed with partial failures | Check task dependencies, retry failed wave |
|
|
123
|
+
</error_codes>
|
|
124
|
+
|
|
125
|
+
<success_criteria>
|
|
126
|
+
- [ ] All pending plans identified and executed sequentially
|
|
127
|
+
- [ ] Within each plan: waves executed in parallel, waves串行
|
|
128
|
+
- [ ] `.summaries/TASK-{NNN}-summary.md` written for each completed task
|
|
129
|
+
- [ ] `.task/TASK-{NNN}.json` statuses updated (completed|blocked)
|
|
130
|
+
- [ ] EXC artifact registered in state.json for each plan executed
|
|
131
|
+
- [ ] Incremental knowhow extracted to specs/learnings.md
|
|
132
|
+
- [ ] state.json updated with execution progress
|
|
133
|
+
</success_criteria>
|