maestro-flow-one 0.2.0 → 0.2.2
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/.ace-tool/index.json +108 -0
- package/bin/maestro-flow.js +30 -0
- package/claude/maestro-flow/agents/cli-explore-agent.md +187 -0
- package/claude/maestro-flow/agents/conceptual-planning-agent.md +245 -0
- package/claude/maestro-flow/agents/team-supervisor.md +143 -0
- package/claude/maestro-flow/agents/team-worker.md +237 -0
- package/claude/maestro-flow/agents/ui-design-agent.md +286 -0
- package/claude/maestro-flow/agents/workflow-analyzer.md +115 -0
- package/claude/maestro-flow/agents/workflow-codebase-mapper.md +77 -0
- package/claude/maestro-flow/agents/workflow-collab-planner.md +143 -0
- package/claude/maestro-flow/agents/workflow-debugger.md +103 -0
- package/claude/maestro-flow/agents/workflow-executor.md +129 -0
- package/claude/maestro-flow/agents/workflow-external-researcher.md +86 -0
- package/claude/maestro-flow/agents/workflow-integration-checker.md +83 -0
- package/claude/maestro-flow/agents/workflow-nyquist-auditor.md +85 -0
- package/claude/maestro-flow/agents/workflow-phase-researcher.md +85 -0
- package/claude/maestro-flow/agents/workflow-plan-checker.md +90 -0
- package/claude/maestro-flow/agents/workflow-planner.md +195 -0
- package/claude/maestro-flow/agents/workflow-project-researcher.md +74 -0
- package/claude/maestro-flow/agents/workflow-research-synthesizer.md +70 -0
- package/claude/maestro-flow/agents/workflow-reviewer.md +82 -0
- package/claude/maestro-flow/agents/workflow-roadmapper.md +81 -0
- package/claude/maestro-flow/agents/workflow-verifier.md +120 -0
- package/codex/maestro-flow/agents/team-supervisor.toml +40 -0
- package/codex/maestro-flow/agents/team-worker.toml +63 -0
- package/maestro-flow/agents/cli-explore-agent.md +187 -0
- package/maestro-flow/agents/conceptual-planning-agent.md +245 -0
- package/maestro-flow/agents/team-supervisor.md +143 -0
- package/maestro-flow/agents/team-worker.md +237 -0
- package/maestro-flow/agents/ui-design-agent.md +286 -0
- package/maestro-flow/agents/workflow-analyzer.md +115 -0
- package/maestro-flow/agents/workflow-codebase-mapper.md +77 -0
- package/maestro-flow/agents/workflow-collab-planner.md +143 -0
- package/maestro-flow/agents/workflow-debugger.md +103 -0
- package/maestro-flow/agents/workflow-executor.md +129 -0
- package/maestro-flow/agents/workflow-external-researcher.md +86 -0
- package/maestro-flow/agents/workflow-integration-checker.md +83 -0
- package/maestro-flow/agents/workflow-nyquist-auditor.md +85 -0
- package/maestro-flow/agents/workflow-phase-researcher.md +85 -0
- package/maestro-flow/agents/workflow-plan-checker.md +90 -0
- package/maestro-flow/agents/workflow-planner.md +195 -0
- package/maestro-flow/agents/workflow-project-researcher.md +74 -0
- package/maestro-flow/agents/workflow-research-synthesizer.md +70 -0
- package/maestro-flow/agents/workflow-reviewer.md +82 -0
- package/maestro-flow/agents/workflow-roadmapper.md +81 -0
- package/maestro-flow/agents/workflow-verifier.md +120 -0
- package/maestro-flow/commands/learn/decompose.md +176 -0
- package/maestro-flow/commands/learn/follow.md +167 -0
- package/maestro-flow/commands/learn/investigate.md +221 -0
- package/maestro-flow/commands/learn/retro.md +303 -0
- package/maestro-flow/commands/learn/second-opinion.md +167 -0
- package/maestro-flow/commands/lifecycle/amend.md +300 -0
- package/maestro-flow/commands/lifecycle/analyze.md +130 -0
- package/maestro-flow/commands/lifecycle/brainstorm.md +104 -0
- package/maestro-flow/commands/lifecycle/collab.md +333 -0
- package/maestro-flow/commands/lifecycle/composer.md +354 -0
- package/maestro-flow/commands/lifecycle/execute.md +120 -0
- package/maestro-flow/commands/lifecycle/fork.md +86 -0
- package/maestro-flow/commands/lifecycle/init.md +78 -0
- package/maestro-flow/commands/lifecycle/learn.md +140 -0
- package/maestro-flow/commands/lifecycle/link-coordinate.md +71 -0
- package/maestro-flow/commands/lifecycle/merge.md +61 -0
- package/maestro-flow/commands/lifecycle/overlay.md +178 -0
- package/maestro-flow/commands/lifecycle/plan.md +154 -0
- package/maestro-flow/commands/lifecycle/player.md +404 -0
- package/maestro-flow/commands/lifecycle/quick.md +56 -0
- package/maestro-flow/commands/lifecycle/roadmap.md +164 -0
- package/maestro-flow/commands/lifecycle/ui-design.md +93 -0
- package/maestro-flow/commands/lifecycle/update.md +176 -0
- package/maestro-flow/commands/lifecycle/verify.md +96 -0
- package/maestro-flow/commands/manage/codebase-rebuild.md +75 -0
- package/maestro-flow/commands/manage/codebase-refresh.md +57 -0
- package/maestro-flow/commands/manage/harvest.md +94 -0
- package/maestro-flow/commands/manage/issue-discover.md +77 -0
- package/maestro-flow/commands/manage/issue.md +73 -0
- package/maestro-flow/commands/manage/knowhow-capture.md +193 -0
- package/maestro-flow/commands/manage/knowhow.md +77 -0
- package/maestro-flow/commands/manage/learn.md +67 -0
- package/maestro-flow/commands/manage/status.md +51 -0
- package/maestro-flow/commands/manage/wiki.md +62 -0
- package/maestro-flow/commands/milestone/audit.md +68 -0
- package/maestro-flow/commands/milestone/complete.md +75 -0
- package/maestro-flow/commands/milestone/release.md +96 -0
- package/maestro-flow/commands/quality/auto-test.md +128 -0
- package/maestro-flow/commands/quality/debug.md +125 -0
- package/maestro-flow/commands/quality/refactor.md +55 -0
- package/maestro-flow/commands/quality/retrospective.md +78 -0
- package/maestro-flow/commands/quality/review.md +114 -0
- package/maestro-flow/commands/quality/sync.md +51 -0
- package/maestro-flow/commands/quality/test.md +107 -0
- package/maestro-flow/commands/spec/add.md +49 -0
- package/maestro-flow/commands/spec/load.md +51 -0
- package/maestro-flow/commands/spec/remove.md +51 -0
- package/maestro-flow/commands/spec/setup.md +51 -0
- package/maestro-flow/commands/wiki/connect.md +62 -0
- package/maestro-flow/commands/wiki/digest.md +69 -0
- package/package.json +1 -1
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: maestro-execute
|
|
3
|
+
description: Execute plan with parallel waves and atomic commits
|
|
4
|
+
argument-hint: "[phase] [--auto-commit] [--method agent|cli|auto] [--executor <tool>] [--dir <path>] [-y]"
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Edit
|
|
9
|
+
- Bash
|
|
10
|
+
- Glob
|
|
11
|
+
- Grep
|
|
12
|
+
- Agent
|
|
13
|
+
- AskUserQuestion
|
|
14
|
+
---
|
|
15
|
+
<purpose>
|
|
16
|
+
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.
|
|
17
|
+
|
|
18
|
+
Invoked after /maestro-plan produces a confirmed plan. When called without args on a milestone, finds all pending plans and executes them sequentially.
|
|
19
|
+
</purpose>
|
|
20
|
+
|
|
21
|
+
<required_reading>
|
|
22
|
+
@~/.maestro/workflows/execute.md
|
|
23
|
+
</required_reading>
|
|
24
|
+
|
|
25
|
+
<deferred_reading>
|
|
26
|
+
- [task.json](~/.maestro/templates/task.json) — read when reading task definitions
|
|
27
|
+
- [state.json](~/.maestro/templates/state.json) — read when registering artifact
|
|
28
|
+
</deferred_reading>
|
|
29
|
+
|
|
30
|
+
<context>
|
|
31
|
+
$ARGUMENTS — phase number, or no args for milestone-wide execution, with optional flags.
|
|
32
|
+
|
|
33
|
+
Scope routing, flags, resolution logic, output directory format, artifact registration schema, and incremental learning extraction are defined in workflow `execute.md`.
|
|
34
|
+
|
|
35
|
+
### Pre-load context (before task execution)
|
|
36
|
+
|
|
37
|
+
1. **Codebase docs**: If `.workflow/codebase/doc-index.json` exists, read `ARCHITECTURE.md` for module boundaries. Pass as shared context to executor agents.
|
|
38
|
+
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.
|
|
39
|
+
3. Both are optional — proceed without if unavailable (log warning).
|
|
40
|
+
</context>
|
|
41
|
+
|
|
42
|
+
<execution>
|
|
43
|
+
### Pre-flight: team conflict check
|
|
44
|
+
|
|
45
|
+
Before any task execution, run:
|
|
46
|
+
```
|
|
47
|
+
Bash("maestro collab preflight --phase <phase-number>")
|
|
48
|
+
```
|
|
49
|
+
If exit code is 1, present warnings and ask whether to proceed.
|
|
50
|
+
|
|
51
|
+
Follow '~/.maestro/workflows/execute.md' completely.
|
|
52
|
+
|
|
53
|
+
### Post-task Knowledge Inquiry
|
|
54
|
+
|
|
55
|
+
After each task completes, evaluate inquiry triggers:
|
|
56
|
+
|
|
57
|
+
1. **Execution deviation**: If task summary mentions approach change, dependency swap, or plan deviation:
|
|
58
|
+
→ Ask: "TASK-{NNN} deviated from the plan. Should this decision be recorded as an architecture constraint? (`/spec-add arch`)"
|
|
59
|
+
|
|
60
|
+
2. **Retry success**: If task required ≥2 retries before completion:
|
|
61
|
+
→ Ask: "TASK-{NNN} succeeded after {N} retries. Should this fix pattern be documented? (`/spec-add debug`)"
|
|
62
|
+
|
|
63
|
+
3. **Implicit knowledge**: If task summary contains design rationale ("chose X because", "rejected Y due to"):
|
|
64
|
+
→ Ask: "Design decision detected. Should it be recorded as a learning? (`/spec-add learning`)"
|
|
65
|
+
|
|
66
|
+
If user confirms, invoke `Skill({ skill: "spec-add", args: "<category> <content>" })` with extracted content.
|
|
67
|
+
|
|
68
|
+
### Issue Status Sync
|
|
69
|
+
|
|
70
|
+
On each task completion, if `task.issue_id` exists, sync status back to the issue in `.workflow/issues/issues.jsonl`:
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
For each completed/failed TASK with issue_id:
|
|
74
|
+
Read issue from issues.jsonl by issue_id
|
|
75
|
+
Collect all task_refs[] statuses for that issue:
|
|
76
|
+
all task_refs completed → issue.status = "resolved"
|
|
77
|
+
any task_ref failed → issue.status = "in_progress"
|
|
78
|
+
Append history entry: { action: "executed", at: <ISO>, by: "maestro-execute", summary: "TASK-{NNN} {status}" }
|
|
79
|
+
Write updated issue back to issues.jsonl
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
**Report format on completion:**
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
=== EXECUTION COMPLETE ===
|
|
86
|
+
Plans executed: {plans_count}
|
|
87
|
+
Completed: {completed_count}/{total_count} tasks
|
|
88
|
+
Failed: {failed_count} tasks
|
|
89
|
+
|
|
90
|
+
Summaries: {plan_dir}/.summaries/
|
|
91
|
+
Tasks: {plan_dir}/.task/
|
|
92
|
+
|
|
93
|
+
Next steps:
|
|
94
|
+
/maestro-verify -- Verify execution results
|
|
95
|
+
/maestro-verify --dir {dir} -- Verify specific plan
|
|
96
|
+
/manage-status -- View project dashboard
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
If failed tasks exist, suggest /quality-debug for investigation.
|
|
100
|
+
</execution>
|
|
101
|
+
|
|
102
|
+
<error_codes>
|
|
103
|
+
| Code | Severity | Condition | Recovery |
|
|
104
|
+
|------|----------|-----------|----------|
|
|
105
|
+
| E001 | error | No pending plans found | Verify plans exist, run maestro-plan first |
|
|
106
|
+
| E002 | error | Plan directory not found | Check --dir path |
|
|
107
|
+
| E003 | error | plan.json not found in directory | Verify plan.json exists, run maestro-plan first |
|
|
108
|
+
| E004 | error | No pending tasks, all tasks already completed | Check task statuses, reset if needed |
|
|
109
|
+
| W001 | warning | Executor completed with partial failures | Check task dependencies, retry failed wave |
|
|
110
|
+
</error_codes>
|
|
111
|
+
|
|
112
|
+
<success_criteria>
|
|
113
|
+
- [ ] All pending plans identified and executed sequentially
|
|
114
|
+
- [ ] Within each plan: waves executed in parallel, waves串行
|
|
115
|
+
- [ ] `.summaries/TASK-{NNN}-summary.md` written for each completed task
|
|
116
|
+
- [ ] `.task/TASK-{NNN}.json` statuses updated (completed|blocked)
|
|
117
|
+
- [ ] EXC artifact registered in state.json for each plan executed
|
|
118
|
+
- [ ] Incremental learnings extracted to specs/learnings.md
|
|
119
|
+
- [ ] state.json updated with execution progress
|
|
120
|
+
</success_criteria>
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: maestro-fork
|
|
3
|
+
description: Create or sync milestone worktree for parallel dev
|
|
4
|
+
argument-hint: "-m <milestone-number> [--base <branch>] [--sync]"
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Edit
|
|
9
|
+
- Bash
|
|
10
|
+
- Glob
|
|
11
|
+
- Grep
|
|
12
|
+
- Agent
|
|
13
|
+
- AskUserQuestion
|
|
14
|
+
---
|
|
15
|
+
<purpose>
|
|
16
|
+
Create a git worktree for an entire milestone, enabling inter-milestone parallel development. The worktree scope is milestone-level — all scratch artifacts for that milestone are owned by the worktree.
|
|
17
|
+
|
|
18
|
+
Since `.workflow/` is gitignored, this command explicitly copies project context and existing milestone scratch artifacts into the worktree. Per-phase parallelism within a milestone is NOT supported.
|
|
19
|
+
|
|
20
|
+
Also supports `--sync` mode to pull latest main branch changes and shared artifacts into an active worktree (prevents source and artifact drift for long-lived worktrees).
|
|
21
|
+
|
|
22
|
+
Produces `.workflow/worktrees.json` registry in the main worktree and `.workflow/worktree-scope.json` marker in the worktree.
|
|
23
|
+
</purpose>
|
|
24
|
+
|
|
25
|
+
<required_reading>
|
|
26
|
+
@~/.maestro/workflows/fork.md
|
|
27
|
+
</required_reading>
|
|
28
|
+
|
|
29
|
+
<deferred_reading>
|
|
30
|
+
- [worktrees.json](~/.maestro/templates/worktrees.json) — read when updating registry
|
|
31
|
+
- [worktree-scope.json](~/.maestro/templates/worktree-scope.json) — read when writing scope marker
|
|
32
|
+
</deferred_reading>
|
|
33
|
+
|
|
34
|
+
<context>
|
|
35
|
+
$ARGUMENTS -- milestone number and optional flags.
|
|
36
|
+
|
|
37
|
+
Modes (`Fork` / `Sync`), flags (`-m`, `--base`, `--sync`), milestone resolution, worktree layout, and artifact scoping are defined in workflow `fork.md`.
|
|
38
|
+
</context>
|
|
39
|
+
|
|
40
|
+
<execution>
|
|
41
|
+
Follow '~/.maestro/workflows/fork.md' completely.
|
|
42
|
+
|
|
43
|
+
Fork and sync algorithm steps are defined in workflow `fork.md`.
|
|
44
|
+
|
|
45
|
+
**Next-step routing on completion:**
|
|
46
|
+
|
|
47
|
+
Fork mode:
|
|
48
|
+
- Enter worktree → `cd {wt.path} && /maestro-analyze`
|
|
49
|
+
- Automated → `maestro delegate "run full lifecycle for milestone" --cd {wt.path} --mode write`
|
|
50
|
+
- Status → Skill({ skill: "manage-status" })
|
|
51
|
+
|
|
52
|
+
Sync mode:
|
|
53
|
+
- Sync complete → resume work in worktree
|
|
54
|
+
- Conflicts found → resolve manually, then retry
|
|
55
|
+
</execution>
|
|
56
|
+
|
|
57
|
+
<error_codes>
|
|
58
|
+
| Code | Severity | Condition | Recovery |
|
|
59
|
+
|------|----------|-----------|----------|
|
|
60
|
+
| E001 | error | Project not initialized | Run maestro-init first |
|
|
61
|
+
| E002 | error | No roadmap found | Run maestro-roadmap first |
|
|
62
|
+
| E003 | error | Running inside a worktree | Run from main worktree |
|
|
63
|
+
| E004 | error | No milestone number provided | Provide `-m <N>` |
|
|
64
|
+
| E005 | error | No milestones defined in state.json | Run maestro-roadmap first |
|
|
65
|
+
| E006 | error | Milestone number out of range | Check available milestones |
|
|
66
|
+
| E007 | error | No active worktree for milestone (--sync) | Check worktrees.json |
|
|
67
|
+
| E008 | error | Milestone already has active worktree | Merge or cleanup first |
|
|
68
|
+
</error_codes>
|
|
69
|
+
|
|
70
|
+
<success_criteria>
|
|
71
|
+
Fork mode:
|
|
72
|
+
- [ ] Milestone resolved from state.json.milestones[]
|
|
73
|
+
- [ ] Git worktree created with branch (`milestone/{slug}`)
|
|
74
|
+
- [ ] Shared `.workflow/` files copied (project.md, roadmap.md, config.json, specs/)
|
|
75
|
+
- [ ] Milestone scratch artifacts copied (filtered from artifact registry)
|
|
76
|
+
- [ ] `worktree-scope.json` written with milestone scope
|
|
77
|
+
- [ ] Scoped `state.json` written (only this milestone's artifacts)
|
|
78
|
+
- [ ] `worktrees.json` registry updated in main worktree
|
|
79
|
+
- [ ] Milestone marked as `"forked"` in main `state.json.milestones[]`
|
|
80
|
+
- [ ] Summary displayed with next-step commands
|
|
81
|
+
|
|
82
|
+
Sync mode:
|
|
83
|
+
- [ ] Git merge main into worktree branch
|
|
84
|
+
- [ ] Shared artifacts re-copied (project.md, roadmap.md, config.json, specs/)
|
|
85
|
+
- [ ] Conflicts reported if any
|
|
86
|
+
</success_criteria>
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: maestro-init
|
|
3
|
+
description: Initialize project with auto state detection
|
|
4
|
+
argument-hint: "[-y] [--from-brainstorm SESSION-ID]"
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Bash
|
|
9
|
+
- Glob
|
|
10
|
+
- Grep
|
|
11
|
+
- Agent
|
|
12
|
+
- AskUserQuestion
|
|
13
|
+
---
|
|
14
|
+
<purpose>
|
|
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
|
+
</purpose>
|
|
17
|
+
|
|
18
|
+
<required_reading>
|
|
19
|
+
@~/.maestro/workflows/init.md
|
|
20
|
+
@~/.maestro/templates/project.md
|
|
21
|
+
@~/.maestro/templates/state.json
|
|
22
|
+
@~/.maestro/templates/config.json
|
|
23
|
+
</required_reading>
|
|
24
|
+
|
|
25
|
+
<context>
|
|
26
|
+
**Flags:**
|
|
27
|
+
- `-y` -- Automatic mode. After config questions, runs research without further interaction. Expects idea document via @ reference.
|
|
28
|
+
- `--from-brainstorm SESSION-ID` -- Import from a brainstorm session. Reads guidance-specification.md to pre-fill project vision, goals, constraints, and terminology. Skips interactive questioning.
|
|
29
|
+
|
|
30
|
+
**Load project state if exists:**
|
|
31
|
+
Check for `.workflow/state.json` -- loads context if project already initialized.
|
|
32
|
+
</context>
|
|
33
|
+
|
|
34
|
+
<execution>
|
|
35
|
+
Follow '~/.maestro/workflows/init.md' completely.
|
|
36
|
+
|
|
37
|
+
**Report format on completion:**
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
=== WORKFLOW INITIALIZED ===
|
|
41
|
+
Project: {project_name}
|
|
42
|
+
State: .workflow/state.json (active)
|
|
43
|
+
|
|
44
|
+
Created:
|
|
45
|
+
.workflow/project.md
|
|
46
|
+
.workflow/state.json
|
|
47
|
+
.workflow/config.json
|
|
48
|
+
.workflow/specs/
|
|
49
|
+
|
|
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)
|
|
53
|
+
|
|
54
|
+
Other commands:
|
|
55
|
+
/manage-status -- View project dashboard
|
|
56
|
+
/maestro-brainstorm <topic> -- Explore ideas first
|
|
57
|
+
/maestro-quick <task> -- Quick ad-hoc task
|
|
58
|
+
```
|
|
59
|
+
</execution>
|
|
60
|
+
|
|
61
|
+
<error_codes>
|
|
62
|
+
| Code | Severity | Condition | Recovery |
|
|
63
|
+
|------|----------|-----------|----------|
|
|
64
|
+
| E001 | error | No arguments provided when -y requires @ reference | Check arguments format, re-run with correct input |
|
|
65
|
+
| E002 | error | .workflow/ already exists for greenfield init | Check .workflow/ directory state, resolve conflicts |
|
|
66
|
+
| E003 | error | Brainstorm session not found (--from-brainstorm) | Check arguments format, re-run with correct input |
|
|
67
|
+
| W001 | warning | Research agent failed, continuing with partial results | Retry research or proceed with partial results |
|
|
68
|
+
</error_codes>
|
|
69
|
+
|
|
70
|
+
<success_criteria>
|
|
71
|
+
- [ ] Deep questioning completed (threads followed, not rushed) — or extracted from document/brainstorm
|
|
72
|
+
- [ ] `.workflow/project.md` created with Core Value, Requirements (Validated/Active/Out of Scope), Key Decisions
|
|
73
|
+
- [ ] `.workflow/state.json` created with artifacts[] array, initialized to idle state
|
|
74
|
+
- [ ] `.workflow/config.json` created with user-selected granularity, workflow agents, gate preferences
|
|
75
|
+
- [ ] `.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)
|
|
78
|
+
</success_criteria>
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: maestro-learn
|
|
3
|
+
description: Route learning intent to learn-* commands
|
|
4
|
+
argument-hint: "\"intent text\" [-y] [--dry-run] [--chain <name>]"
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Bash
|
|
9
|
+
- Glob
|
|
10
|
+
- Grep
|
|
11
|
+
- Agent
|
|
12
|
+
- AskUserQuestion
|
|
13
|
+
---
|
|
14
|
+
<purpose>
|
|
15
|
+
Route learning requests to the optimal learn command or multi-step chain. Supports direct chain selection via `--chain` or intent-based routing via keyword matching.
|
|
16
|
+
|
|
17
|
+
Executes commands sequentially via Skill() with session tracking.
|
|
18
|
+
</purpose>
|
|
19
|
+
|
|
20
|
+
<context>
|
|
21
|
+
$ARGUMENTS — user learning intent text, or flags.
|
|
22
|
+
|
|
23
|
+
**Flags:**
|
|
24
|
+
- `-y` / `--yes` — Auto mode: skip confirmation
|
|
25
|
+
- `--dry-run` — Show planned chain without executing
|
|
26
|
+
- `--chain <name>` — Force a specific chain (bypass intent detection)
|
|
27
|
+
|
|
28
|
+
**Available learn commands:**
|
|
29
|
+
| Command | Purpose |
|
|
30
|
+
|---------|---------|
|
|
31
|
+
| `learn-follow` | Guided reading with forcing questions, pattern extraction |
|
|
32
|
+
| `learn-investigate` | Hypothesis-driven question investigation |
|
|
33
|
+
| `learn-decompose` | 4-dimension parallel pattern extraction |
|
|
34
|
+
| `learn-second-opinion` | Multi-perspective review/challenge/consult |
|
|
35
|
+
| `learn-retro` | Unified retrospective (git metrics + decision evaluation) |
|
|
36
|
+
|
|
37
|
+
**Available chains:**
|
|
38
|
+
| Chain | Steps | Use when |
|
|
39
|
+
|-------|-------|----------|
|
|
40
|
+
| `follow` | learn-follow | Read/understand code or docs |
|
|
41
|
+
| `investigate` | learn-investigate | Answer a "how/why" question |
|
|
42
|
+
| `decompose` | learn-decompose | Catalog patterns in a module |
|
|
43
|
+
| `second-opinion` | learn-second-opinion | Get review/challenge on code |
|
|
44
|
+
| `retro` | learn-retro --lens all | Full retrospective (git + decisions) |
|
|
45
|
+
| `deep-understand` | follow → decompose → second-opinion | Thorough module analysis |
|
|
46
|
+
| `pattern-catalog` | decompose --save-spec --save-wiki → second-opinion --mode review | Full pattern extraction + review |
|
|
47
|
+
|
|
48
|
+
**Storage:**
|
|
49
|
+
- `.workflow/learning/.maestro-learn/{session_id}/status.json` — Session tracking
|
|
50
|
+
- All learn command outputs go to `.workflow/learning/`
|
|
51
|
+
</context>
|
|
52
|
+
|
|
53
|
+
<execution>
|
|
54
|
+
|
|
55
|
+
### Step 1: Parse & Route
|
|
56
|
+
|
|
57
|
+
Parse flags (`-y`, `--dry-run`, `--chain`). Extract intent text.
|
|
58
|
+
|
|
59
|
+
**If `--chain` specified:** validate against known chains, jump to Step 2.
|
|
60
|
+
|
|
61
|
+
**Intent routing table** (match first token or keywords):
|
|
62
|
+
|
|
63
|
+
| Keywords | Route |
|
|
64
|
+
|----------|-------|
|
|
65
|
+
| File path (contains `/` or `\`) | `follow` |
|
|
66
|
+
| Wiki ID (`type-slug` pattern) | `follow` |
|
|
67
|
+
| read, follow, walk through, understand, 阅读, 跟读 | `follow` |
|
|
68
|
+
| why, how, what if, investigate, 为什么, 怎么 | `investigate` |
|
|
69
|
+
| pattern, decompose, catalog, 分解, 模式 | `decompose` |
|
|
70
|
+
| opinion, review, challenge, consult, 评审, 挑战 | `second-opinion` |
|
|
71
|
+
| retro, git, commit, decision, 回顾 | `retro` |
|
|
72
|
+
| thorough, deep, 全面, 深入 | `deep-understand` |
|
|
73
|
+
|
|
74
|
+
**If no match:** present menu via AskUserQuestion:
|
|
75
|
+
```
|
|
76
|
+
What would you like to do?
|
|
77
|
+
1. Read through code/docs → follow
|
|
78
|
+
2. Investigate a question → investigate
|
|
79
|
+
3. Find patterns in code → decompose
|
|
80
|
+
4. Get a second opinion → second-opinion
|
|
81
|
+
5. Retrospective → retro
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Max 1 clarification round. If still unclear: error.
|
|
85
|
+
|
|
86
|
+
### Step 2: Resolve Target & Build Args
|
|
87
|
+
|
|
88
|
+
- File path → pass directly
|
|
89
|
+
- Wiki ID → pass directly
|
|
90
|
+
- Topic string → pass as quoted argument
|
|
91
|
+
- Extract any flags (--depth, --days, --lens, --mode, --scope, etc.)
|
|
92
|
+
|
|
93
|
+
**Chain → command mapping:**
|
|
94
|
+
```
|
|
95
|
+
follow → Skill("learn-follow", "{target} {flags}")
|
|
96
|
+
investigate → Skill("learn-investigate", "\"{target}\" {flags}")
|
|
97
|
+
decompose → Skill("learn-decompose", "{target} {flags}")
|
|
98
|
+
second-opinion → Skill("learn-second-opinion", "{target} {flags}")
|
|
99
|
+
retro → Skill("learn-retro", "{flags}")
|
|
100
|
+
deep-understand → [learn-follow --depth deep, learn-decompose --save-spec, learn-second-opinion --mode challenge]
|
|
101
|
+
pattern-catalog → [learn-decompose --save-spec --save-wiki, learn-second-opinion --mode review]
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Step 3: Confirm & Execute
|
|
105
|
+
|
|
106
|
+
**If `--dry-run`:** display chain plan and exit.
|
|
107
|
+
|
|
108
|
+
**If not `-y`:** show plan, ask for confirmation.
|
|
109
|
+
|
|
110
|
+
**Execute:**
|
|
111
|
+
1. Create session dir: `.workflow/learning/.maestro-learn/learn-{timestamp}/`
|
|
112
|
+
2. Write `status.json` with chain steps
|
|
113
|
+
3. Execute each step via `Skill()`:
|
|
114
|
+
- On success: mark completed, continue
|
|
115
|
+
- On failure (interactive): ask retry/skip/abort
|
|
116
|
+
- On failure (auto): skip and continue
|
|
117
|
+
4. Display session summary with artifact list and next-step suggestion
|
|
118
|
+
|
|
119
|
+
</execution>
|
|
120
|
+
|
|
121
|
+
<error_codes>
|
|
122
|
+
| Code | Severity | Description | Recovery |
|
|
123
|
+
|------|----------|-------------|----------|
|
|
124
|
+
| E001 | error | No intent provided | Provide a learning goal or use --chain |
|
|
125
|
+
| E002 | error | Cannot determine intent after clarification | Rephrase or use --chain directly |
|
|
126
|
+
| E003 | error | Chain step failed + user chose abort | Partial progress saved in status.json |
|
|
127
|
+
| E005 | error | Invalid --chain name | Show valid chains |
|
|
128
|
+
| W001 | warning | Intent ambiguous between commands | Present options |
|
|
129
|
+
| W002 | warning | Chain step completed with warnings | Log and continue |
|
|
130
|
+
</error_codes>
|
|
131
|
+
|
|
132
|
+
<success_criteria>
|
|
133
|
+
- [ ] Intent routed to correct chain (or --chain validated)
|
|
134
|
+
- [ ] Target resolved and arguments assembled
|
|
135
|
+
- [ ] Session directory created with status.json
|
|
136
|
+
- [ ] All chain steps executed via Skill()
|
|
137
|
+
- [ ] Error handling: retry/skip/abort per step
|
|
138
|
+
- [ ] Session summary displayed with next-step routing
|
|
139
|
+
- [ ] No files modified outside `.workflow/learning/`
|
|
140
|
+
</success_criteria>
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: maestro-link-coordinate
|
|
3
|
+
description: Execute command chain nodes step by step
|
|
4
|
+
argument-hint: "\"intent text\" [--list] [-c [sessionId]] [--chain <name>] [--tool <tool>] [-y]"
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Edit
|
|
9
|
+
- Bash
|
|
10
|
+
- Glob
|
|
11
|
+
- Grep
|
|
12
|
+
- Agent
|
|
13
|
+
---
|
|
14
|
+
<purpose>
|
|
15
|
+
Step-mode workflow coordinator using `maestro coordinate` CLI subcommands (start/next/status).
|
|
16
|
+
Walks chain graphs node by node — each command node executed via `maestro delegate` internally.
|
|
17
|
+
Decision/gate/eval nodes auto-resolve between steps. Session persisted for resume.
|
|
18
|
+
</purpose>
|
|
19
|
+
|
|
20
|
+
<required_reading>
|
|
21
|
+
@~/.maestro/workflows/maestro-link-coordinate.md
|
|
22
|
+
</required_reading>
|
|
23
|
+
|
|
24
|
+
<context>
|
|
25
|
+
$ARGUMENTS — user intent text, or flags.
|
|
26
|
+
|
|
27
|
+
**Flags:**
|
|
28
|
+
- `--list` — List all available chain graphs
|
|
29
|
+
- `-c` / `--continue [sessionId]` — Resume step_paused session via `coordinate next`
|
|
30
|
+
- `--chain <name>` — Force a specific chain graph
|
|
31
|
+
- `--tool <tool>` — CLI tool override (default: claude)
|
|
32
|
+
- `-y` / `--yes` — Auto mode
|
|
33
|
+
|
|
34
|
+
**CLI endpoints used:**
|
|
35
|
+
- `maestro coordinate list` — enumerate chains
|
|
36
|
+
- `maestro coordinate start "intent" --chain X` — begin step-mode session
|
|
37
|
+
- `maestro coordinate next [sessionId]` — advance one step
|
|
38
|
+
- `maestro coordinate status [sessionId]` — query state
|
|
39
|
+
- `maestro coordinate run "intent"` — autonomous full run
|
|
40
|
+
- `maestro coordinate watch <sessionId> [--follow]` — read-only event tail (separate from driver loop)
|
|
41
|
+
- `maestro coordinate report` — agent-invoked command-node result writer (authoritative result channel)
|
|
42
|
+
|
|
43
|
+
**Internal walker capabilities (invisible to driver loop):**
|
|
44
|
+
- Prompt assembly owned by the walker (main flow) for both command and decision nodes
|
|
45
|
+
- Decision nodes auto-resolve via `strategy: 'expr'` (fast path) with LLM decider fallback when expr has no match and no default edge, or explicit `strategy: 'llm'`
|
|
46
|
+
- Walker events published to a file/SQLite broker for `watch` observers
|
|
47
|
+
- LLM decision in step mode is synchronous — avoid tight per-step deadlines
|
|
48
|
+
</context>
|
|
49
|
+
|
|
50
|
+
<execution>
|
|
51
|
+
Follow '~/.maestro/workflows/maestro-link-coordinate.md' completely.
|
|
52
|
+
</execution>
|
|
53
|
+
|
|
54
|
+
<error_codes>
|
|
55
|
+
| Code | Severity | Description | Recovery |
|
|
56
|
+
|------|----------|-------------|----------|
|
|
57
|
+
| E001 | error | No intent and no --list/--chain | Suggest --list |
|
|
58
|
+
| E002 | error | Chain graph not found | Show list output |
|
|
59
|
+
| E003 | error | Step execution failed | Check status, retry next |
|
|
60
|
+
| E004 | error | Resume session not found | List sessions |
|
|
61
|
+
| E005 | error | CLI endpoint unavailable | Check maestro installation |
|
|
62
|
+
</error_codes>
|
|
63
|
+
|
|
64
|
+
<success_criteria>
|
|
65
|
+
- [ ] Chain graph loaded via `maestro coordinate start`
|
|
66
|
+
- [ ] Each step executed via `maestro coordinate next` loop
|
|
67
|
+
- [ ] JSON output parsed for session tracking
|
|
68
|
+
- [ ] Decision nodes auto-resolved between steps
|
|
69
|
+
- [ ] Session persisted and resumable via `-c`
|
|
70
|
+
- [ ] Completion summary displayed
|
|
71
|
+
</success_criteria>
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: maestro-merge
|
|
3
|
+
description: Merge milestone worktree branch back to main
|
|
4
|
+
argument-hint: "-m <milestone-number> [--force] [--dry-run] [--no-cleanup] [--continue]"
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Edit
|
|
9
|
+
- Bash
|
|
10
|
+
- Glob
|
|
11
|
+
- Grep
|
|
12
|
+
- Agent
|
|
13
|
+
- AskUserQuestion
|
|
14
|
+
---
|
|
15
|
+
<purpose>
|
|
16
|
+
Merge a completed milestone worktree branch back into the main branch, sync scratch artifacts, and reconcile the artifact registry. Uses a two-phase approach: git merge first (source code), artifact sync second (only after git succeeds). This prevents partial state corruption when merge conflicts occur.
|
|
17
|
+
|
|
18
|
+
Includes registry health check, pre-merge rebase (pull main into worktree to minimize conflicts), and atomic state reconciliation (merge artifact entries, don't overwrite).
|
|
19
|
+
</purpose>
|
|
20
|
+
|
|
21
|
+
<required_reading>
|
|
22
|
+
@~/.maestro/workflows/merge.md
|
|
23
|
+
</required_reading>
|
|
24
|
+
|
|
25
|
+
<context>
|
|
26
|
+
$ARGUMENTS -- milestone number and optional flags.
|
|
27
|
+
|
|
28
|
+
Flags (`-m`, `--force`, `--dry-run`, `--no-cleanup`, `--continue`), merge sequence, artifact sync detail, and conflict handling are defined in workflow `merge.md`.
|
|
29
|
+
</context>
|
|
30
|
+
|
|
31
|
+
<execution>
|
|
32
|
+
Follow '~/.maestro/workflows/merge.md' completely.
|
|
33
|
+
|
|
34
|
+
**Next-step routing on completion:**
|
|
35
|
+
- View dashboard → Skill({ skill: "manage-status" })
|
|
36
|
+
- Audit milestone → Skill({ skill: "maestro-milestone-audit" })
|
|
37
|
+
</execution>
|
|
38
|
+
|
|
39
|
+
<error_codes>
|
|
40
|
+
| Code | Severity | Condition | Recovery |
|
|
41
|
+
|------|----------|-----------|----------|
|
|
42
|
+
| E001 | error | Running inside a worktree | Run from main worktree |
|
|
43
|
+
| E002 | error | No worktree registry found | Nothing to merge |
|
|
44
|
+
| E003 | error | --continue but no merge state | Start fresh merge |
|
|
45
|
+
| E004 | error | No milestone number provided | Provide `-m <N>` |
|
|
46
|
+
| W001 | warning | Stale registry entries found | Auto-cleaned |
|
|
47
|
+
| W002 | warning | Incomplete artifacts (without --force) | Confirm or use --force |
|
|
48
|
+
| W003 | warning | Conflict pulling main into worktree | Resolve in worktree first |
|
|
49
|
+
</error_codes>
|
|
50
|
+
|
|
51
|
+
<success_criteria>
|
|
52
|
+
- [ ] Registry health check passed (stale entries cleaned)
|
|
53
|
+
- [ ] Pre-merge rebase successful (worktree has latest main)
|
|
54
|
+
- [ ] Git merge completed without conflicts (or conflicts resolved via --continue)
|
|
55
|
+
- [ ] All scratch artifacts synced to main `.workflow/scratch/`
|
|
56
|
+
- [ ] `state.json.artifacts[]` reconciled (worktree entries merged into main)
|
|
57
|
+
- [ ] Milestone `"forked"` flag removed in `state.json.milestones[]`
|
|
58
|
+
- [ ] `roadmap.md` completed phases marked
|
|
59
|
+
- [ ] Worktree removed and branch deleted (unless --no-cleanup)
|
|
60
|
+
- [ ] `worktrees.json` registry updated (entry removed)
|
|
61
|
+
</success_criteria>
|