maestro-flow 0.3.18 → 0.3.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/commands/learn-investigate.md +195 -195
- package/.claude/commands/learn-retro.md +303 -303
- package/.claude/commands/learn-second-opinion.md +167 -167
- package/.claude/commands/maestro-amend.md +300 -300
- package/.claude/commands/maestro-analyze.md +126 -126
- package/.claude/commands/maestro-composer.md +354 -354
- package/.claude/commands/maestro-execute.md +114 -114
- package/.claude/commands/maestro-learn.md +140 -140
- package/.claude/commands/maestro-milestone-audit.md +68 -68
- package/.claude/commands/maestro-milestone-complete.md +75 -75
- package/.claude/commands/maestro-milestone-release.md +96 -96
- package/.claude/commands/maestro-plan.md +138 -138
- package/.claude/commands/maestro-player.md +404 -404
- package/.claude/commands/maestro-update.md +176 -176
- package/.claude/commands/maestro-verify.md +90 -90
- package/.claude/commands/manage-codebase-rebuild.md +75 -75
- package/.claude/commands/manage-knowhow-capture.md +193 -193
- package/.claude/commands/manage-knowhow.md +77 -77
- package/.claude/commands/manage-learn.md +67 -67
- package/.claude/commands/manage-wiki.md +62 -62
- package/.claude/commands/quality-business-test.md +110 -110
- package/.claude/commands/quality-retrospective.md +78 -78
- package/.claude/commands/spec-add.md +49 -49
- package/.claude/commands/spec-load.md +51 -51
- package/.claude/commands/spec-remove.md +51 -51
- package/.claude/commands/wiki-connect.md +62 -62
- package/.claude/commands/wiki-digest.md +69 -69
- package/.codex/skills/maestro/SKILL.md +24 -13
- package/.codex/skills/maestro-link-coordinate/SKILL.md +5 -5
- package/.codex/skills/maestro-player/SKILL.md +5 -5
- package/dashboard/dist-server/dashboard/src/server/coordinator/workflow-coordinator.js +3 -3
- package/dashboard/dist-server/dashboard/src/server/coordinator/workflow-coordinator.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/execution/execution-scheduler.js +1 -1
- package/dashboard/dist-server/dashboard/src/server/execution/execution-scheduler.js.map +1 -1
- package/dist/src/commands/coordinate.js +2 -2
- package/dist/src/commands/coordinate.js.map +1 -1
- package/dist/src/hooks/coordinator-tracker.d.ts +1 -1
- package/dist/src/hooks/coordinator-tracker.js +3 -3
- package/dist/src/hooks/coordinator-tracker.js.map +1 -1
- package/package.json +1 -1
- package/workflows/maestro-link-coordinate.md +3 -3
- package/workflows/maestro.codex.md +2 -2
- package/workflows/maestro-coordinate.codex.md +0 -281
|
@@ -1,114 +1,114 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: maestro-execute
|
|
3
|
-
description: Execute plan with wave-based parallel execution and atomic commits
|
|
4
|
-
argument-hint: "[phase] [--auto-commit] [--method agent|codex|gemini|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
|
-
</context>
|
|
35
|
-
|
|
36
|
-
<execution>
|
|
37
|
-
### Pre-flight: team conflict check
|
|
38
|
-
|
|
39
|
-
Before any task execution, run:
|
|
40
|
-
```
|
|
41
|
-
Bash("maestro collab preflight --phase <phase-number>")
|
|
42
|
-
```
|
|
43
|
-
If exit code is 1, present warnings and ask whether to proceed.
|
|
44
|
-
|
|
45
|
-
Follow '~/.maestro/workflows/execute.md' completely.
|
|
46
|
-
|
|
47
|
-
### Post-task Knowledge Inquiry
|
|
48
|
-
|
|
49
|
-
After each task completes, evaluate inquiry triggers:
|
|
50
|
-
|
|
51
|
-
1. **Execution deviation**: If task summary mentions approach change, dependency swap, or plan deviation:
|
|
52
|
-
→ Ask: "TASK-{NNN} deviated from the plan. Should this decision be recorded as an architecture constraint? (`/spec-add arch`)"
|
|
53
|
-
|
|
54
|
-
2. **Retry success**: If task required ≥2 retries before completion:
|
|
55
|
-
→ Ask: "TASK-{NNN} succeeded after {N} retries. Should this fix pattern be documented? (`/spec-add debug`)"
|
|
56
|
-
|
|
57
|
-
3. **Implicit knowledge**: If task summary contains design rationale ("chose X because", "rejected Y due to"):
|
|
58
|
-
→ Ask: "Design decision detected. Should it be recorded as a learning? (`/spec-add learning`)"
|
|
59
|
-
|
|
60
|
-
If user confirms, invoke `Skill({ skill: "spec-add", args: "<category> <content>" })` with extracted content.
|
|
61
|
-
|
|
62
|
-
### Issue Status Sync
|
|
63
|
-
|
|
64
|
-
On each task completion, if `task.issue_id` exists, sync status back to the issue in `.workflow/issues/issues.jsonl`:
|
|
65
|
-
|
|
66
|
-
```
|
|
67
|
-
For each completed/failed TASK with issue_id:
|
|
68
|
-
Read issue from issues.jsonl by issue_id
|
|
69
|
-
Collect all task_refs[] statuses for that issue:
|
|
70
|
-
all task_refs completed → issue.status = "resolved"
|
|
71
|
-
any task_ref failed → issue.status = "in_progress"
|
|
72
|
-
Append history entry: { action: "executed", at: <ISO>, by: "maestro-execute", summary: "TASK-{NNN} {status}" }
|
|
73
|
-
Write updated issue back to issues.jsonl
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
**Report format on completion:**
|
|
77
|
-
|
|
78
|
-
```
|
|
79
|
-
=== EXECUTION COMPLETE ===
|
|
80
|
-
Plans executed: {plans_count}
|
|
81
|
-
Completed: {completed_count}/{total_count} tasks
|
|
82
|
-
Failed: {failed_count} tasks
|
|
83
|
-
|
|
84
|
-
Summaries: {plan_dir}/.summaries/
|
|
85
|
-
Tasks: {plan_dir}/.task/
|
|
86
|
-
|
|
87
|
-
Next steps:
|
|
88
|
-
/maestro-verify -- Verify execution results
|
|
89
|
-
/maestro-verify --dir {dir} -- Verify specific plan
|
|
90
|
-
/manage-status -- View project dashboard
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
If failed tasks exist, suggest /quality-debug for investigation.
|
|
94
|
-
</execution>
|
|
95
|
-
|
|
96
|
-
<error_codes>
|
|
97
|
-
| Code | Severity | Condition | Recovery |
|
|
98
|
-
|------|----------|-----------|----------|
|
|
99
|
-
| E001 | error | No pending plans found | Verify plans exist, run maestro-plan first |
|
|
100
|
-
| E002 | error | Plan directory not found | Check --dir path |
|
|
101
|
-
| E003 | error | plan.json not found in directory | Verify plan.json exists, run maestro-plan first |
|
|
102
|
-
| E004 | error | No pending tasks, all tasks already completed | Check task statuses, reset if needed |
|
|
103
|
-
| W001 | warning | Executor completed with partial failures | Check task dependencies, retry failed wave |
|
|
104
|
-
</error_codes>
|
|
105
|
-
|
|
106
|
-
<success_criteria>
|
|
107
|
-
- [ ] All pending plans identified and executed sequentially
|
|
108
|
-
- [ ] Within each plan: waves executed in parallel, waves串行
|
|
109
|
-
- [ ] `.summaries/TASK-{NNN}-summary.md` written for each completed task
|
|
110
|
-
- [ ] `.task/TASK-{NNN}.json` statuses updated (completed|blocked)
|
|
111
|
-
- [ ] EXC artifact registered in state.json for each plan executed
|
|
112
|
-
- [ ] Incremental learnings extracted to specs/learnings.md
|
|
113
|
-
- [ ] state.json updated with execution progress
|
|
114
|
-
</success_criteria>
|
|
1
|
+
---
|
|
2
|
+
name: maestro-execute
|
|
3
|
+
description: Execute plan with wave-based parallel execution and atomic commits
|
|
4
|
+
argument-hint: "[phase] [--auto-commit] [--method agent|codex|gemini|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
|
+
</context>
|
|
35
|
+
|
|
36
|
+
<execution>
|
|
37
|
+
### Pre-flight: team conflict check
|
|
38
|
+
|
|
39
|
+
Before any task execution, run:
|
|
40
|
+
```
|
|
41
|
+
Bash("maestro collab preflight --phase <phase-number>")
|
|
42
|
+
```
|
|
43
|
+
If exit code is 1, present warnings and ask whether to proceed.
|
|
44
|
+
|
|
45
|
+
Follow '~/.maestro/workflows/execute.md' completely.
|
|
46
|
+
|
|
47
|
+
### Post-task Knowledge Inquiry
|
|
48
|
+
|
|
49
|
+
After each task completes, evaluate inquiry triggers:
|
|
50
|
+
|
|
51
|
+
1. **Execution deviation**: If task summary mentions approach change, dependency swap, or plan deviation:
|
|
52
|
+
→ Ask: "TASK-{NNN} deviated from the plan. Should this decision be recorded as an architecture constraint? (`/spec-add arch`)"
|
|
53
|
+
|
|
54
|
+
2. **Retry success**: If task required ≥2 retries before completion:
|
|
55
|
+
→ Ask: "TASK-{NNN} succeeded after {N} retries. Should this fix pattern be documented? (`/spec-add debug`)"
|
|
56
|
+
|
|
57
|
+
3. **Implicit knowledge**: If task summary contains design rationale ("chose X because", "rejected Y due to"):
|
|
58
|
+
→ Ask: "Design decision detected. Should it be recorded as a learning? (`/spec-add learning`)"
|
|
59
|
+
|
|
60
|
+
If user confirms, invoke `Skill({ skill: "spec-add", args: "<category> <content>" })` with extracted content.
|
|
61
|
+
|
|
62
|
+
### Issue Status Sync
|
|
63
|
+
|
|
64
|
+
On each task completion, if `task.issue_id` exists, sync status back to the issue in `.workflow/issues/issues.jsonl`:
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
For each completed/failed TASK with issue_id:
|
|
68
|
+
Read issue from issues.jsonl by issue_id
|
|
69
|
+
Collect all task_refs[] statuses for that issue:
|
|
70
|
+
all task_refs completed → issue.status = "resolved"
|
|
71
|
+
any task_ref failed → issue.status = "in_progress"
|
|
72
|
+
Append history entry: { action: "executed", at: <ISO>, by: "maestro-execute", summary: "TASK-{NNN} {status}" }
|
|
73
|
+
Write updated issue back to issues.jsonl
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
**Report format on completion:**
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
=== EXECUTION COMPLETE ===
|
|
80
|
+
Plans executed: {plans_count}
|
|
81
|
+
Completed: {completed_count}/{total_count} tasks
|
|
82
|
+
Failed: {failed_count} tasks
|
|
83
|
+
|
|
84
|
+
Summaries: {plan_dir}/.summaries/
|
|
85
|
+
Tasks: {plan_dir}/.task/
|
|
86
|
+
|
|
87
|
+
Next steps:
|
|
88
|
+
/maestro-verify -- Verify execution results
|
|
89
|
+
/maestro-verify --dir {dir} -- Verify specific plan
|
|
90
|
+
/manage-status -- View project dashboard
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
If failed tasks exist, suggest /quality-debug for investigation.
|
|
94
|
+
</execution>
|
|
95
|
+
|
|
96
|
+
<error_codes>
|
|
97
|
+
| Code | Severity | Condition | Recovery |
|
|
98
|
+
|------|----------|-----------|----------|
|
|
99
|
+
| E001 | error | No pending plans found | Verify plans exist, run maestro-plan first |
|
|
100
|
+
| E002 | error | Plan directory not found | Check --dir path |
|
|
101
|
+
| E003 | error | plan.json not found in directory | Verify plan.json exists, run maestro-plan first |
|
|
102
|
+
| E004 | error | No pending tasks, all tasks already completed | Check task statuses, reset if needed |
|
|
103
|
+
| W001 | warning | Executor completed with partial failures | Check task dependencies, retry failed wave |
|
|
104
|
+
</error_codes>
|
|
105
|
+
|
|
106
|
+
<success_criteria>
|
|
107
|
+
- [ ] All pending plans identified and executed sequentially
|
|
108
|
+
- [ ] Within each plan: waves executed in parallel, waves串行
|
|
109
|
+
- [ ] `.summaries/TASK-{NNN}-summary.md` written for each completed task
|
|
110
|
+
- [ ] `.task/TASK-{NNN}.json` statuses updated (completed|blocked)
|
|
111
|
+
- [ ] EXC artifact registered in state.json for each plan executed
|
|
112
|
+
- [ ] Incremental learnings extracted to specs/learnings.md
|
|
113
|
+
- [ ] state.json updated with execution progress
|
|
114
|
+
</success_criteria>
|
|
@@ -1,140 +1,140 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: maestro-learn
|
|
3
|
-
description: Learning coordinator — route intent to learn commands, execute single or multi-step chains
|
|
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>
|
|
1
|
+
---
|
|
2
|
+
name: maestro-learn
|
|
3
|
+
description: Learning coordinator — route intent to learn commands, execute single or multi-step chains
|
|
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>
|
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: maestro-milestone-audit
|
|
3
|
-
description: Audit current milestone for cross-phase integration gaps
|
|
4
|
-
argument-hint: "[<milestone>]"
|
|
5
|
-
allowed-tools:
|
|
6
|
-
- Read
|
|
7
|
-
- Write
|
|
8
|
-
- Bash
|
|
9
|
-
- Glob
|
|
10
|
-
- Grep
|
|
11
|
-
- Agent
|
|
12
|
-
- AskUserQuestion
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
<purpose>
|
|
16
|
-
Audit milestone completion using the artifact registry. Checks:
|
|
17
|
-
1. Phase coverage — every phase in roadmap has plan + execute artifacts (completed)
|
|
18
|
-
2. Ad-hoc completeness — all adhoc artifacts are completed (or explicitly skipped)
|
|
19
|
-
3. Execution completeness — all tasks in executed plans are completed
|
|
20
|
-
4. Cross-artifact integration — interfaces, data contracts, configuration consistency
|
|
21
|
-
|
|
22
|
-
Data source: `state.json.artifacts[]` filtered by current milestone.
|
|
23
|
-
Produces audit report at `.workflow/milestones/{milestone}/audit-report.md`.
|
|
24
|
-
</purpose>
|
|
25
|
-
|
|
26
|
-
<required_reading>
|
|
27
|
-
@~/.maestro/workflows/milestone-audit.md
|
|
28
|
-
</required_reading>
|
|
29
|
-
|
|
30
|
-
<context>
|
|
31
|
-
Milestone: $ARGUMENTS (optional -- defaults to current_milestone from state.json).
|
|
32
|
-
|
|
33
|
-
**Requires:** All phases in the milestone should have completed execute artifacts.
|
|
34
|
-
|
|
35
|
-
**Data source:**
|
|
36
|
-
- `.workflow/state.json` — artifacts[], current_milestone, milestones[]
|
|
37
|
-
- `.workflow/roadmap.md` — milestone-to-phase mapping
|
|
38
|
-
- Plan scratch dirs — for task status verification
|
|
39
|
-
</context>
|
|
40
|
-
|
|
41
|
-
<execution>
|
|
42
|
-
Follow '~/.maestro/workflows/milestone-audit.md' completely.
|
|
43
|
-
|
|
44
|
-
Audit checklist steps (phase coverage, ad-hoc completeness, execution completeness, cross-artifact integration) are defined in workflow `milestone-audit.md`.
|
|
45
|
-
|
|
46
|
-
**Next-step routing on completion:**
|
|
47
|
-
- Verdict PASS → `/maestro-milestone-complete {milestone}`
|
|
48
|
-
- Verdict FAIL, integration gaps → `/maestro-plan --gaps`
|
|
49
|
-
- Verdict FAIL, incomplete execution → `/maestro-execute`
|
|
50
|
-
</execution>
|
|
51
|
-
|
|
52
|
-
<error_codes>
|
|
53
|
-
| Code | Severity | Condition | Recovery |
|
|
54
|
-
|------|----------|-----------|----------|
|
|
55
|
-
| E001 | error | Milestone identifier required | Check arguments format |
|
|
56
|
-
| E002 | error | Milestone not found in state.json | Check milestone ID |
|
|
57
|
-
| E003 | error | No execute artifacts found for milestone | Run maestro-execute first |
|
|
58
|
-
| W001 | warning | Some phases lack complete artifact chains | Review incomplete phases |
|
|
59
|
-
</error_codes>
|
|
60
|
-
|
|
61
|
-
<success_criteria>
|
|
62
|
-
- [ ] All phases in milestone identified from roadmap
|
|
63
|
-
- [ ] Artifact chains verified (ANL→PLN→EXC) per phase
|
|
64
|
-
- [ ] Ad-hoc artifacts checked for completion
|
|
65
|
-
- [ ] Integration check completed (shared interfaces, data contracts)
|
|
66
|
-
- [ ] Audit report written with clear PASS/FAIL verdict
|
|
67
|
-
- [ ] Next-step routing provided
|
|
68
|
-
</success_criteria>
|
|
1
|
+
---
|
|
2
|
+
name: maestro-milestone-audit
|
|
3
|
+
description: Audit current milestone for cross-phase integration gaps
|
|
4
|
+
argument-hint: "[<milestone>]"
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Bash
|
|
9
|
+
- Glob
|
|
10
|
+
- Grep
|
|
11
|
+
- Agent
|
|
12
|
+
- AskUserQuestion
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
<purpose>
|
|
16
|
+
Audit milestone completion using the artifact registry. Checks:
|
|
17
|
+
1. Phase coverage — every phase in roadmap has plan + execute artifacts (completed)
|
|
18
|
+
2. Ad-hoc completeness — all adhoc artifacts are completed (or explicitly skipped)
|
|
19
|
+
3. Execution completeness — all tasks in executed plans are completed
|
|
20
|
+
4. Cross-artifact integration — interfaces, data contracts, configuration consistency
|
|
21
|
+
|
|
22
|
+
Data source: `state.json.artifacts[]` filtered by current milestone.
|
|
23
|
+
Produces audit report at `.workflow/milestones/{milestone}/audit-report.md`.
|
|
24
|
+
</purpose>
|
|
25
|
+
|
|
26
|
+
<required_reading>
|
|
27
|
+
@~/.maestro/workflows/milestone-audit.md
|
|
28
|
+
</required_reading>
|
|
29
|
+
|
|
30
|
+
<context>
|
|
31
|
+
Milestone: $ARGUMENTS (optional -- defaults to current_milestone from state.json).
|
|
32
|
+
|
|
33
|
+
**Requires:** All phases in the milestone should have completed execute artifacts.
|
|
34
|
+
|
|
35
|
+
**Data source:**
|
|
36
|
+
- `.workflow/state.json` — artifacts[], current_milestone, milestones[]
|
|
37
|
+
- `.workflow/roadmap.md` — milestone-to-phase mapping
|
|
38
|
+
- Plan scratch dirs — for task status verification
|
|
39
|
+
</context>
|
|
40
|
+
|
|
41
|
+
<execution>
|
|
42
|
+
Follow '~/.maestro/workflows/milestone-audit.md' completely.
|
|
43
|
+
|
|
44
|
+
Audit checklist steps (phase coverage, ad-hoc completeness, execution completeness, cross-artifact integration) are defined in workflow `milestone-audit.md`.
|
|
45
|
+
|
|
46
|
+
**Next-step routing on completion:**
|
|
47
|
+
- Verdict PASS → `/maestro-milestone-complete {milestone}`
|
|
48
|
+
- Verdict FAIL, integration gaps → `/maestro-plan --gaps`
|
|
49
|
+
- Verdict FAIL, incomplete execution → `/maestro-execute`
|
|
50
|
+
</execution>
|
|
51
|
+
|
|
52
|
+
<error_codes>
|
|
53
|
+
| Code | Severity | Condition | Recovery |
|
|
54
|
+
|------|----------|-----------|----------|
|
|
55
|
+
| E001 | error | Milestone identifier required | Check arguments format |
|
|
56
|
+
| E002 | error | Milestone not found in state.json | Check milestone ID |
|
|
57
|
+
| E003 | error | No execute artifacts found for milestone | Run maestro-execute first |
|
|
58
|
+
| W001 | warning | Some phases lack complete artifact chains | Review incomplete phases |
|
|
59
|
+
</error_codes>
|
|
60
|
+
|
|
61
|
+
<success_criteria>
|
|
62
|
+
- [ ] All phases in milestone identified from roadmap
|
|
63
|
+
- [ ] Artifact chains verified (ANL→PLN→EXC) per phase
|
|
64
|
+
- [ ] Ad-hoc artifacts checked for completion
|
|
65
|
+
- [ ] Integration check completed (shared interfaces, data contracts)
|
|
66
|
+
- [ ] Audit report written with clear PASS/FAIL verdict
|
|
67
|
+
- [ ] Next-step routing provided
|
|
68
|
+
</success_criteria>
|