maestro-flow 0.3.7 → 0.3.9
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-decompose.md +3 -3
- package/.claude/commands/learn-follow.md +5 -5
- package/.claude/commands/learn-investigate.md +3 -3
- package/.claude/commands/learn-retro.md +303 -0
- package/.claude/commands/learn-second-opinion.md +3 -3
- package/.claude/commands/maestro-analyze.md +123 -99
- package/.claude/commands/maestro-brainstorm.md +2 -2
- package/.claude/commands/maestro-execute.md +137 -96
- package/.claude/commands/maestro-fork.md +111 -0
- package/.claude/commands/maestro-init.md +6 -6
- package/.claude/commands/maestro-learn.md +74 -298
- package/.claude/commands/maestro-merge.md +77 -0
- package/.claude/commands/maestro-milestone-audit.md +72 -60
- package/.claude/commands/maestro-milestone-complete.md +67 -59
- package/.claude/commands/maestro-milestone-release.md +6 -6
- package/.claude/commands/maestro-plan.md +151 -130
- package/.claude/commands/maestro-quick.md +4 -4
- package/.claude/commands/maestro-roadmap.md +5 -5
- package/.claude/commands/maestro-spec-generate.md +5 -5
- package/.claude/commands/maestro-ui-design.md +3 -3
- package/.claude/commands/maestro-verify.md +106 -87
- package/.claude/commands/maestro.md +10 -4
- package/.claude/commands/manage-codebase-rebuild.md +4 -4
- package/.claude/commands/manage-codebase-refresh.md +1 -1
- package/.claude/commands/manage-harvest.md +5 -5
- package/.claude/commands/manage-issue-discover.md +1 -1
- package/.claude/commands/manage-issue-execute.md +6 -6
- package/.claude/commands/manage-issue.md +6 -6
- package/.claude/commands/manage-learn.md +23 -17
- package/.claude/commands/manage-memory-capture.md +15 -17
- package/.claude/commands/manage-memory.md +3 -3
- package/.claude/commands/manage-status.md +24 -24
- package/.claude/commands/quality-business-test.md +5 -5
- package/.claude/commands/quality-debug.md +4 -4
- package/.claude/commands/quality-integration-test.md +4 -4
- package/.claude/commands/quality-refactor.md +3 -3
- package/.claude/commands/quality-retrospective.md +7 -7
- package/.claude/commands/quality-review.md +4 -4
- package/.claude/commands/quality-sync.md +3 -3
- package/.claude/commands/quality-test-gen.md +4 -4
- package/.claude/commands/quality-test.md +9 -9
- package/.claude/commands/spec-add.md +2 -2
- package/.claude/commands/spec-load.md +8 -3
- package/.claude/commands/spec-setup.md +5 -5
- package/.claude/commands/wiki-connect.md +3 -3
- package/.claude/commands/wiki-digest.md +30 -5
- package/.codex/skills/maestro-analyze/SKILL.md +52 -14
- package/.codex/skills/maestro-execute/SKILL.md +27 -26
- package/.codex/skills/maestro-milestone-audit/SKILL.md +103 -209
- package/.codex/skills/maestro-milestone-complete/SKILL.md +149 -158
- package/.codex/skills/maestro-plan/SKILL.md +47 -17
- package/.codex/skills/maestro-roadmap/SKILL.md +3 -2
- package/.codex/skills/team-coordinate/roles/coordinator/commands/monitor.md +2 -2
- package/.codex/skills/team-executor/roles/executor/commands/monitor.md +1 -1
- package/.codex/skills/team-lifecycle-v4/roles/coordinator/commands/monitor.md +2 -2
- package/.codex/skills/team-lifecycle-v4/specs/knowledge-transfer.md +2 -2
- package/.codex/skills/team-quality-assurance/roles/coordinator/commands/monitor.md +1 -1
- package/.codex/skills/team-review/roles/coordinator/commands/monitor.md +1 -1
- package/.codex/skills/team-tech-debt/roles/coordinator/commands/monitor.md +1 -1
- package/.codex/skills/team-testing/roles/coordinator/commands/monitor.md +1 -1
- package/README.md +115 -227
- package/README.zh-CN.md +169 -187
- package/bin/maestro-mcp.js +1 -1
- package/chains/_intent-map.json +21 -9
- package/chains/_router.json +30 -77
- package/chains/brainstorm-driven.json +17 -6
- package/chains/full-lifecycle.json +22 -23
- package/chains/milestone-close.json +20 -7
- package/chains/milestone-fork-merge.json +50 -0
- package/chains/roadmap-driven.json +17 -6
- package/chains/spec-driven.json +17 -6
- package/dashboard/dist/assets/{ArtifactsPage-A9yzYtpj.js → ArtifactsPage-DZNCi6tn.js} +12 -7
- package/dashboard/dist/assets/ChatInput-Bvr-FeEq.js +49 -0
- package/dashboard/dist/assets/ChatPage-D9zTkJZo.js +22 -0
- package/dashboard/dist/assets/CollabPage-B4NAHXS2.js +1 -0
- package/dashboard/dist/assets/ExecutionPanel-CFt4LJyq.js +1 -0
- package/dashboard/dist/assets/KanbanPage-C8USth6H.js +21 -0
- package/dashboard/dist/assets/{MarkdownRenderer-CCXHaut3.js → MarkdownRenderer-X4af_WNb.js} +1 -1
- package/dashboard/dist/assets/McpPage-BKfCVIyU.js +21 -0
- package/dashboard/dist/assets/OutputPanel-BlBQFJSW.js +1 -0
- package/dashboard/dist/assets/ProblemsPanel-De3DLvoI.js +1 -0
- package/dashboard/dist/assets/{RequirementBoardPage-CEOvppGn.js → RequirementBoardPage-Bf1trzqs.js} +2 -2
- package/dashboard/dist/assets/{RequirementPage-DpnbTEqY.js → RequirementPage-Bllxe2XI.js} +10 -5
- package/dashboard/dist/assets/{SpecsPage-CYqOfFkB.js → SpecsPage-9lwxKT27.js} +2 -2
- package/dashboard/dist/assets/{SupervisorPage-B2sZwkq8.js → SupervisorPage-SusdfHFq.js} +1 -1
- package/dashboard/dist/assets/{TeamsPage-CkZdCAVZ.js → TeamsPage-DsuM6OwC.js} +2 -2
- package/dashboard/dist/assets/TreeBrowser-Q12qobZs.js +6 -0
- package/dashboard/dist/assets/WorkflowPage-D_Fzdy3_.js +6 -0
- package/dashboard/dist/assets/{arrow-left-6fktHyjN.js → arrow-left-Bqtb2hle.js} +1 -1
- package/dashboard/dist/assets/{check-Cbxq2l1-.js → check-u6fGOwQO.js} +1 -1
- package/dashboard/dist/assets/{chevron-right-Yts3bi8p.js → chevron-right-Csu22t58.js} +1 -1
- package/dashboard/dist/assets/{circle-4Ci4Xolf.js → circle-CMrkbRNg.js} +1 -1
- package/dashboard/dist/assets/{circle-alert-B25g9BTL.js → circle-alert-c3tH1P4z.js} +1 -1
- package/dashboard/dist/assets/{circle-check-big-DzO2BlL7.js → circle-check-big-TDSeWstm.js} +1 -1
- package/dashboard/dist/assets/{circle-check-BA5_XqeV.js → circle-check-gYxxSYuH.js} +1 -1
- package/dashboard/dist/assets/{code-zxwuybO8.js → code-CFN2uX9V.js} +1 -1
- package/dashboard/dist/assets/{columns-3-DV4oeCfU.js → columns-3-38xIDlzy.js} +1 -1
- package/dashboard/dist/assets/{download-CXCyQw8M.js → download-DC7KkKyP.js} +1 -1
- package/dashboard/dist/assets/{folder-Bvjj8Vn9.js → folder-CWq_lAnf.js} +1 -1
- package/dashboard/dist/assets/index-DWG-WrzT.js +231 -0
- package/dashboard/dist/assets/{index-BvScJmJM.js → index-Do71weNR.js} +1 -1
- package/dashboard/dist/assets/index-GUNJodSR.css +1 -0
- package/dashboard/dist/assets/{list-Dj4i9N75.js → list-CgIP_2A-.js} +1 -1
- package/dashboard/dist/assets/{minus-DwlFabsT.js → minus-DYoN5UGk.js} +1 -1
- package/dashboard/dist/assets/{pen-line-D7UzECt6.js → pen-line-Bh_WKYHm.js} +1 -1
- package/dashboard/dist/assets/{proxy-B9XRqHD9.js → proxy-BKxDAKTj.js} +1 -1
- package/dashboard/dist/assets/{search-BQbBTIYl.js → search-SieXnOgr.js} +1 -1
- package/dashboard/dist/assets/{shallow-Clb1Lyd_.js → shallow-Bme1JY57.js} +1 -1
- package/dashboard/dist/assets/{table-BqxCXid2.js → table-llyEtj-7.js} +1 -1
- package/dashboard/dist/assets/terminal-BB3Xfuv5.js +6 -0
- package/dashboard/dist/assets/{trash-2-6rN9B-EQ.js → trash-2-C8f4vFFM.js} +1 -1
- package/dashboard/dist/assets/{zap-DxUhG-gk.js → zap-4uwlzVm0.js} +1 -1
- package/dashboard/dist/index.html +2 -2
- package/dashboard/dist-server/dashboard/src/server/agents/agent-sdk-adapter.d.ts +1 -1
- package/dashboard/dist-server/dashboard/src/server/agents/agent-sdk-adapter.js +5 -4
- package/dashboard/dist-server/dashboard/src/server/agents/agent-sdk-adapter.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/agents/claude-code-adapter.js +8 -4
- package/dashboard/dist-server/dashboard/src/server/agents/claude-code-adapter.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/agents/entry-normalizer.d.ts +1 -0
- package/dashboard/dist-server/dashboard/src/server/agents/entry-normalizer.js +2 -1
- package/dashboard/dist-server/dashboard/src/server/agents/entry-normalizer.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/agents/stream-json-adapter.js +20 -10
- package/dashboard/dist-server/dashboard/src/server/agents/stream-json-adapter.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/agents/tools/issue-mcp-server.d.ts +1 -1
- package/dashboard/dist-server/dashboard/src/server/agents/tools/issue-mcp-server.js +3 -4
- package/dashboard/dist-server/dashboard/src/server/agents/tools/issue-mcp-server.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/agents/tools/issue-mcp-server.test.js +4 -4
- package/dashboard/dist-server/dashboard/src/server/agents/tools/issue-mcp-server.test.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/commander/commander-agent.js +4 -3
- package/dashboard/dist-server/dashboard/src/server/commander/commander-agent.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/commander/commander-agent.test.js +20 -7
- package/dashboard/dist-server/dashboard/src/server/commander/commander-agent.test.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/execution/wave-executor.d.ts +1 -1
- package/dashboard/dist-server/dashboard/src/server/execution/wave-executor.js +4 -4
- package/dashboard/dist-server/dashboard/src/server/execution/wave-executor.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/index.js +2 -1
- package/dashboard/dist-server/dashboard/src/server/index.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/git.d.ts +2 -0
- package/dashboard/dist-server/dashboard/src/server/routes/git.js +79 -0
- package/dashboard/dist-server/dashboard/src/server/routes/git.js.map +1 -0
- package/dashboard/dist-server/dashboard/src/server/routes/index.js +3 -0
- package/dashboard/dist-server/dashboard/src/server/routes/index.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/issues.js +14 -14
- package/dashboard/dist-server/dashboard/src/server/routes/issues.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/linear.js +7 -5
- package/dashboard/dist-server/dashboard/src/server/routes/linear.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/workspace.js +43 -0
- package/dashboard/dist-server/dashboard/src/server/routes/workspace.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/state/state-manager.js +186 -25
- package/dashboard/dist-server/dashboard/src/server/state/state-manager.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/utils/issue-store.d.ts +6 -0
- package/dashboard/dist-server/dashboard/src/server/utils/issue-store.js +24 -2
- package/dashboard/dist-server/dashboard/src/server/utils/issue-store.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/ws/handlers/execution-handler.js +4 -7
- package/dashboard/dist-server/dashboard/src/server/ws/handlers/execution-handler.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/shared/constants.js +2 -1
- package/dashboard/dist-server/dashboard/src/shared/constants.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/shared/constants.test.js +5 -5
- package/dashboard/dist-server/dashboard/src/shared/constants.test.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/shared/issue-types.test.js +4 -4
- package/dashboard/dist-server/dashboard/src/shared/issue-types.test.js.map +1 -1
- package/dashboard/dist-server/src/commands/delegate.js +7 -1
- package/dashboard/dist-server/src/commands/delegate.js.map +1 -1
- package/dashboard/package.json +59 -59
- package/dist/src/cli.js +3 -1
- package/dist/src/cli.js.map +1 -1
- package/dist/src/commands/{team.d.ts → collab.d.ts} +2 -2
- package/dist/src/commands/collab.d.ts.map +1 -0
- package/dist/src/commands/{team.js → collab.js} +391 -24
- package/dist/src/commands/collab.js.map +1 -0
- package/dist/src/commands/delegate.d.ts.map +1 -1
- package/dist/src/commands/delegate.js +7 -1
- package/dist/src/commands/delegate.js.map +1 -1
- package/dist/src/commands/msg.d.ts.map +1 -1
- package/dist/src/commands/msg.js +4 -3
- package/dist/src/commands/msg.js.map +1 -1
- package/dist/src/hooks/team-monitor.d.ts.map +1 -1
- package/dist/src/hooks/team-monitor.js +16 -0
- package/dist/src/hooks/team-monitor.js.map +1 -1
- package/dist/src/tools/collab-adapter.d.ts +85 -0
- package/dist/src/tools/collab-adapter.d.ts.map +1 -0
- package/dist/src/tools/collab-adapter.js +320 -0
- package/dist/src/tools/collab-adapter.js.map +1 -0
- package/dist/src/tools/namespace-guard.d.ts +2 -0
- package/dist/src/tools/namespace-guard.d.ts.map +1 -1
- package/dist/src/tools/namespace-guard.js +12 -0
- package/dist/src/tools/namespace-guard.js.map +1 -1
- package/dist/src/tools/phase-gate-evaluator.d.ts +45 -0
- package/dist/src/tools/phase-gate-evaluator.d.ts.map +1 -0
- package/dist/src/tools/phase-gate-evaluator.js +42 -0
- package/dist/src/tools/phase-gate-evaluator.js.map +1 -0
- package/dist/src/tools/team-members.d.ts +18 -0
- package/dist/src/tools/team-members.d.ts.map +1 -1
- package/dist/src/tools/team-members.js +50 -0
- package/dist/src/tools/team-members.js.map +1 -1
- package/dist/src/tools/team-tasks.d.ts +120 -0
- package/dist/src/tools/team-tasks.d.ts.map +1 -0
- package/dist/src/tools/team-tasks.js +365 -0
- package/dist/src/tools/team-tasks.js.map +1 -0
- package/dist/src/tools/transition-recorder.d.ts +3 -0
- package/dist/src/tools/transition-recorder.d.ts.map +1 -1
- package/dist/src/tools/transition-recorder.js +52 -1
- package/dist/src/tools/transition-recorder.js.map +1 -1
- package/dist/src/utils/get-version.d.ts.map +1 -1
- package/dist/src/utils/get-version.js +15 -4
- package/dist/src/utils/get-version.js.map +1 -1
- package/package.json +1 -1
- package/templates/config.json +7 -0
- package/templates/worktree-scope.json +10 -0
- package/templates/worktrees.json +27 -0
- package/workflows/analyze.md +86 -36
- package/workflows/brainstorm.md +17 -37
- package/workflows/delegate-usage.md +39 -41
- package/workflows/execute.md +247 -61
- package/workflows/fork.md +309 -0
- package/workflows/init.md +11 -2
- package/workflows/issue.md +66 -7
- package/workflows/maestro-coordinate.codex.md +1 -1
- package/workflows/maestro-coordinate.md +24 -17
- package/workflows/maestro.md +54 -37
- package/workflows/memory.md +2 -1
- package/workflows/merge.md +285 -0
- package/workflows/milestone-audit.md +89 -70
- package/workflows/milestone-complete.md +89 -156
- package/workflows/plan.md +131 -19
- package/workflows/retrospective.md +5 -5
- package/workflows/roadmap.md +12 -4
- package/workflows/spec-generate.md +9 -0
- package/workflows/status.md +76 -27
- package/workflows/ui-design.md +14 -12
- package/workflows/verify.md +44 -8
- package/.claude/commands/learn-retro-decision.md +0 -198
- package/.claude/commands/learn-retro-git.md +0 -160
- package/.claude/commands/maestro-phase-add.md +0 -63
- package/.claude/commands/maestro-phase-transition.md +0 -75
- package/.codex/skills/maestro-phase-add/SKILL.md +0 -154
- package/.codex/skills/maestro-phase-transition/SKILL.md +0 -173
- package/chains/singles/phase-add.json +0 -31
- package/chains/singles/phase-transition.json +0 -23
- package/dashboard/dist/assets/ChatInput-PuCvZZ3y.js +0 -67
- package/dashboard/dist/assets/ChatPage-v19GURYH.js +0 -8
- package/dashboard/dist/assets/CollabPage-I5k_mCbG.js +0 -1
- package/dashboard/dist/assets/KanbanPage-PDDBv5-9.js +0 -16
- package/dashboard/dist/assets/McpPage-CiqXpCHg.js +0 -16
- package/dashboard/dist/assets/TreeBrowser-0VIMWclo.js +0 -11
- package/dashboard/dist/assets/WorkflowPage-Csm23wUS.js +0 -6
- package/dashboard/dist/assets/git-branch-DL8p9kVC.js +0 -6
- package/dashboard/dist/assets/index-11DuhKhc.js +0 -231
- package/dashboard/dist/assets/index-D2Mtyw7I.css +0 -1
- package/dashboard/dist/assets/wrench-BScEJFqC.js +0 -11
- package/dist/src/commands/team.d.ts.map +0 -1
- package/dist/src/commands/team.js.map +0 -1
- package/workflows/phase-add.md +0 -252
- package/workflows/phase-transition.md +0 -399
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: maestro-learn
|
|
3
|
-
description: Learning coordinator
|
|
3
|
+
description: Learning coordinator — route intent to learn commands, execute single or multi-step chains
|
|
4
4
|
argument-hint: "\"intent text\" [-y] [--dry-run] [--chain <name>]"
|
|
5
5
|
allowed-tools:
|
|
6
6
|
- Read
|
|
@@ -12,23 +12,18 @@ allowed-tools:
|
|
|
12
12
|
- AskUserQuestion
|
|
13
13
|
---
|
|
14
14
|
<purpose>
|
|
15
|
-
|
|
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
16
|
|
|
17
|
-
|
|
18
|
-
1. **Intent-based**: User describes a learning goal → classify → select command/chain → confirm → execute
|
|
19
|
-
2. **Direct**: User specifies a known chain name via `--chain`
|
|
20
|
-
|
|
21
|
-
Produces session directory at `.workflow/learning/.maestro-learn/{session_id}/` with status.json tracking chain progress.
|
|
22
|
-
Executes commands sequentially via Skill() with artifact propagation between steps.
|
|
17
|
+
Executes commands sequentially via Skill() with session tracking.
|
|
23
18
|
</purpose>
|
|
24
19
|
|
|
25
20
|
<context>
|
|
26
21
|
$ARGUMENTS — user learning intent text, or flags.
|
|
27
22
|
|
|
28
23
|
**Flags:**
|
|
29
|
-
- `-y` / `--yes` — Auto mode: skip
|
|
24
|
+
- `-y` / `--yes` — Auto mode: skip confirmation
|
|
30
25
|
- `--dry-run` — Show planned chain without executing
|
|
31
|
-
- `--chain <name>` — Force a specific chain (bypass intent detection)
|
|
26
|
+
- `--chain <name>` — Force a specific chain (bypass intent detection)
|
|
32
27
|
|
|
33
28
|
**Available learn commands:**
|
|
34
29
|
| Command | Purpose |
|
|
@@ -37,8 +32,18 @@ $ARGUMENTS — user learning intent text, or flags.
|
|
|
37
32
|
| `learn-investigate` | Hypothesis-driven question investigation |
|
|
38
33
|
| `learn-decompose` | 4-dimension parallel pattern extraction |
|
|
39
34
|
| `learn-second-opinion` | Multi-perspective review/challenge/consult |
|
|
40
|
-
| `learn-retro
|
|
41
|
-
|
|
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 |
|
|
42
47
|
|
|
43
48
|
**Storage:**
|
|
44
49
|
- `.workflow/learning/.maestro-learn/{session_id}/status.json` — Session tracking
|
|
@@ -47,318 +52,89 @@ $ARGUMENTS — user learning intent text, or flags.
|
|
|
47
52
|
|
|
48
53
|
<execution>
|
|
49
54
|
|
|
50
|
-
### Step 1: Parse
|
|
51
|
-
|
|
52
|
-
```javascript
|
|
53
|
-
const autoYes = /\b(-y|--yes)\b/.test($ARGUMENTS)
|
|
54
|
-
const dryRun = /\b--dry-run\b/.test($ARGUMENTS)
|
|
55
|
-
const forcedChain = $ARGUMENTS.match(/--chain\s+(\S+)/)?.[1] || null
|
|
56
|
-
const intent = $ARGUMENTS
|
|
57
|
-
.replace(/\b(-y|--yes|--dry-run)\b/g, '')
|
|
58
|
-
.replace(/--chain\s+\S+/g, '')
|
|
59
|
-
.trim()
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
**Display banner:**
|
|
63
|
-
```
|
|
64
|
-
============================================================
|
|
65
|
-
MAESTRO LEARN COORDINATOR
|
|
66
|
-
============================================================
|
|
67
|
-
Mode: {intent-based | forced-chain}
|
|
68
|
-
Auto: {yes | no}
|
|
69
|
-
Input: {intent}
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
---
|
|
73
|
-
|
|
74
|
-
### Step 2: Analyze Intent
|
|
75
|
-
|
|
76
|
-
**If `$FORCED_CHAIN` is set:**
|
|
77
|
-
- Validate against known chains: `follow`, `investigate`, `decompose`, `second-opinion`, `retro-git`, `retro-decision`, `deep-understand`, `pattern-catalog`, `full-retro`
|
|
78
|
-
- If valid: skip intent analysis, jump to **Step 4**
|
|
79
|
-
- If invalid: **Error E005** — display valid chains
|
|
80
|
-
|
|
81
|
-
**Extract structured intent:**
|
|
82
|
-
|
|
83
|
-
```json
|
|
84
|
-
{
|
|
85
|
-
"action": "<from enum>",
|
|
86
|
-
"target": "<file path | module | topic | wiki-id | null>",
|
|
87
|
-
"mode": "<review | challenge | consult | null>",
|
|
88
|
-
"scope": "<path filter | null>",
|
|
89
|
-
"flags": "<--depth, --days, --save-wiki, etc.>"
|
|
90
|
-
}
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
**Action enum:**
|
|
94
|
-
|
|
95
|
-
| action | Triggered by (semantic) |
|
|
96
|
-
|--------|------------------------|
|
|
97
|
-
| `read` | Read code, follow along, walk through, understand file, 阅读, 跟读 |
|
|
98
|
-
| `question` | Why does X, how does Y work, what happens if, investigate, 为什么, 怎么 |
|
|
99
|
-
| `patterns` | Find patterns, decompose, catalog, extract conventions, 分解, 模式 |
|
|
100
|
-
| `opinion` | Second opinion, review, challenge, critique, consult, 评审, 挑战 |
|
|
101
|
-
| `retro-git` | Git activity, commit history, retro, work sessions, 提交回顾 |
|
|
102
|
-
| `retro-decision` | Decision review, architecture decisions, decision quality, 决策回顾 |
|
|
103
|
-
| `learn` | Generic learn, capture insight, remember — route to best fit |
|
|
104
|
-
|
|
105
|
-
**Target resolution:**
|
|
106
|
-
- Contains `/` or `\` or file extension → file path
|
|
107
|
-
- Matches `<type>-<slug>` → wiki ID
|
|
108
|
-
- Matches `--days`, `--author` → retro-git flags
|
|
109
|
-
- Matches `--phase`, `--tag`, `--id` → retro-decision flags
|
|
110
|
-
- Otherwise → topic string (passed as quoted argument)
|
|
111
|
-
|
|
112
|
-
---
|
|
113
|
-
|
|
114
|
-
### Step 3: Route via action → command
|
|
115
|
-
|
|
116
|
-
```javascript
|
|
117
|
-
const routeMap = {
|
|
118
|
-
'read': 'follow',
|
|
119
|
-
'question': 'investigate',
|
|
120
|
-
'patterns': 'decompose',
|
|
121
|
-
'opinion': 'second-opinion',
|
|
122
|
-
'retro-git': 'retro-git',
|
|
123
|
-
'retro-decision': 'retro-decision',
|
|
124
|
-
'learn': null, // needs disambiguation
|
|
125
|
-
};
|
|
126
|
-
|
|
127
|
-
function routeLearnIntent(action, target, intent) {
|
|
128
|
-
// Direct mapping
|
|
129
|
-
if (routeMap[action]) return routeMap[action];
|
|
130
|
-
|
|
131
|
-
// Disambiguate generic 'learn' based on target and context
|
|
132
|
-
if (target && isFilePath(target)) return 'follow';
|
|
133
|
-
if (target && isWikiId(target)) return 'follow';
|
|
134
|
-
if (/retro|commit|git|session/i.test(intent)) return 'retro-git';
|
|
135
|
-
if (/decision|architect/i.test(intent)) return 'retro-decision';
|
|
136
|
-
if (/pattern|decompose|catalog/i.test(intent)) return 'decompose';
|
|
137
|
-
if (/opinion|review|challenge/i.test(intent)) return 'second-opinion';
|
|
138
|
-
if (/why|how|what if/i.test(intent)) return 'investigate';
|
|
139
|
-
|
|
140
|
-
// Fallback: ask user
|
|
141
|
-
return null;
|
|
142
|
-
}
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
**Compute clarity score:**
|
|
146
|
-
- 3: `action` recognized + `target` present + specific flags
|
|
147
|
-
- 2: `action` recognized + `target` present
|
|
148
|
-
- 1: `action` recognized but no `target`
|
|
149
|
-
- 0: Cannot determine action
|
|
150
|
-
|
|
151
|
-
**If clarity < 2 and not autoYes:**
|
|
152
|
-
|
|
153
|
-
```
|
|
154
|
-
AskUserQuestion:
|
|
155
|
-
header: "What would you like to learn?"
|
|
156
|
-
question: |
|
|
157
|
-
I need a bit more detail. What are you trying to do?
|
|
158
|
-
options:
|
|
159
|
-
- "Read through code/docs" → follow
|
|
160
|
-
- "Investigate a question" → investigate
|
|
161
|
-
- "Find patterns in code" → decompose
|
|
162
|
-
- "Get a second opinion" → second-opinion
|
|
163
|
-
- "Review git activity" → retro-git
|
|
164
|
-
- "Evaluate decisions" → retro-decision
|
|
165
|
-
- "Let me rephrase" → re-parse
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
Max 2 clarification rounds. If still unclear: **Error E002**.
|
|
55
|
+
### Step 1: Parse & Route
|
|
169
56
|
|
|
170
|
-
|
|
57
|
+
Parse flags (`-y`, `--dry-run`, `--chain`). Extract intent text.
|
|
171
58
|
|
|
172
|
-
|
|
59
|
+
**If `--chain` specified:** validate against known chains, jump to Step 2.
|
|
173
60
|
|
|
174
|
-
|
|
61
|
+
**Intent routing table** (match first token or keywords):
|
|
175
62
|
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
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` |
|
|
185
73
|
|
|
186
|
-
|
|
187
|
-
'deep-understand': [
|
|
188
|
-
{ cmd: 'learn-follow', args: '{target} --depth deep' },
|
|
189
|
-
{ cmd: 'learn-decompose', args: '{target} --save-spec' },
|
|
190
|
-
{ cmd: 'learn-second-opinion', args: '{target} --mode challenge' }
|
|
191
|
-
],
|
|
192
|
-
'pattern-catalog': [
|
|
193
|
-
{ cmd: 'learn-decompose', args: '{target} --save-spec --save-wiki' },
|
|
194
|
-
{ cmd: 'learn-second-opinion', args: '{target} --mode review' }
|
|
195
|
-
],
|
|
196
|
-
'full-retro': [
|
|
197
|
-
{ cmd: 'learn-retro-git', args: '{flags}' },
|
|
198
|
-
{ cmd: 'learn-retro-decision', args: '{flags}' }
|
|
199
|
-
]
|
|
200
|
-
};
|
|
74
|
+
**If no match:** present menu via AskUserQuestion:
|
|
201
75
|
```
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
#### 4b: Assemble arguments
|
|
209
|
-
|
|
210
|
-
- Replace `{target}` with resolved target path/topic/wiki-id
|
|
211
|
-
- Replace `{flags}` with extracted flags (--depth, --days, --mode, --scope, etc.)
|
|
212
|
-
- Clean empty placeholders
|
|
213
|
-
|
|
214
|
-
#### 4c: Confirm (skip if autoYes)
|
|
215
|
-
|
|
216
|
-
**If `$DRY_RUN`:**
|
|
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
|
|
217
82
|
```
|
|
218
|
-
============================================================
|
|
219
|
-
MAESTRO LEARN: {chain_name} (dry run)
|
|
220
|
-
============================================================
|
|
221
|
-
Intent: {original_intent}
|
|
222
|
-
Target: {resolved_target}
|
|
223
83
|
|
|
224
|
-
|
|
225
|
-
1. [{command}] args: {assembled_args}
|
|
226
|
-
...
|
|
84
|
+
Max 1 clarification round. If still unclear: error.
|
|
227
85
|
|
|
228
|
-
|
|
229
|
-
============================================================
|
|
230
|
-
```
|
|
231
|
-
Exit after display.
|
|
86
|
+
### Step 2: Resolve Target & Build Args
|
|
232
87
|
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
question: |
|
|
238
|
-
Execute this learning chain?
|
|
239
|
-
|
|
240
|
-
Pipeline:
|
|
241
|
-
1. {command} — {description}
|
|
242
|
-
...
|
|
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.)
|
|
243
92
|
|
|
244
|
-
|
|
245
|
-
- "Execute" → proceed
|
|
246
|
-
- "Cancel" → exit
|
|
93
|
+
**Chain → command mapping:**
|
|
247
94
|
```
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
SESSION_DIR=".workflow/learning/.maestro-learn/${SESSION_ID}"
|
|
256
|
-
mkdir -p "${SESSION_DIR}"
|
|
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]
|
|
257
102
|
```
|
|
258
103
|
|
|
259
|
-
|
|
260
|
-
```json
|
|
261
|
-
{
|
|
262
|
-
"session_id": "{SESSION_ID}",
|
|
263
|
-
"created_at": "{ISO timestamp}",
|
|
264
|
-
"intent": "{original_intent}",
|
|
265
|
-
"chain": "{chain_name}",
|
|
266
|
-
"steps": [
|
|
267
|
-
{ "index": 0, "cmd": "{command}", "args": "{args}", "status": "pending" }
|
|
268
|
-
],
|
|
269
|
-
"current_step": 0,
|
|
270
|
-
"auto_mode": false
|
|
271
|
-
}
|
|
272
|
-
```
|
|
104
|
+
### Step 3: Confirm & Execute
|
|
273
105
|
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
### Step 6: Execute Chain
|
|
277
|
-
|
|
278
|
-
For each step in the chain (starting from `$STEP_INDEX` or 0):
|
|
279
|
-
|
|
280
|
-
1. Update `status.json`: set step status to `"running"`
|
|
281
|
-
2. Display step header:
|
|
282
|
-
```
|
|
283
|
-
── Step {N}/{total}: {command} ──────────────────────────
|
|
284
|
-
```
|
|
285
|
-
3. Execute: `Skill({ skill: "{command}", args: "{assembled_args}" })`
|
|
286
|
-
4. On success:
|
|
287
|
-
- Update step status to `"completed"`
|
|
288
|
-
- Record duration
|
|
289
|
-
- Continue to next step
|
|
290
|
-
5. On failure:
|
|
291
|
-
- Update step status to `"failed"`, record error
|
|
292
|
-
- **If autoYes**: skip and continue (log warning)
|
|
293
|
-
- **If interactive**:
|
|
294
|
-
```
|
|
295
|
-
AskUserQuestion:
|
|
296
|
-
header: "Step {N} failed"
|
|
297
|
-
question: "{error summary}"
|
|
298
|
-
options:
|
|
299
|
-
- "Retry" → re-execute same step
|
|
300
|
-
- "Skip" → continue to next step
|
|
301
|
-
- "Abort" → exit chain
|
|
302
|
-
```
|
|
303
|
-
|
|
304
|
-
---
|
|
305
|
-
|
|
306
|
-
### Step 7: Session Summary
|
|
307
|
-
|
|
308
|
-
After all steps complete (or chain aborted):
|
|
309
|
-
|
|
310
|
-
```
|
|
311
|
-
=== MAESTRO LEARN SESSION COMPLETE ===
|
|
312
|
-
Session: {session_id}
|
|
313
|
-
Chain: {chain_name} ({steps_completed}/{steps_total} steps)
|
|
314
|
-
Mode: {auto | interactive}
|
|
315
|
-
|
|
316
|
-
Steps:
|
|
317
|
-
[{status_icon}] {N}. {command_name} — {duration}
|
|
318
|
-
|
|
319
|
-
Artifacts:
|
|
320
|
-
- {list of files written to .workflow/learning/}
|
|
321
|
-
|
|
322
|
-
Next:
|
|
323
|
-
{suggested_next_action based on chain type}
|
|
324
|
-
```
|
|
106
|
+
**If `--dry-run`:** display chain plan and exit.
|
|
325
107
|
|
|
326
|
-
**
|
|
108
|
+
**If not `-y`:** show plan, ask for confirmation.
|
|
327
109
|
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
| `deep-understand` | "Browse insights → `/manage-learn list`" |
|
|
337
|
-
| `pattern-catalog` | "Load specs → `/spec-load`" |
|
|
338
|
-
| `full-retro` | "Browse all insights → `/manage-learn list --tag retro`" |
|
|
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
|
|
339
118
|
|
|
340
119
|
</execution>
|
|
341
120
|
|
|
342
121
|
<error_codes>
|
|
343
122
|
| Code | Severity | Description | Recovery |
|
|
344
123
|
|------|----------|-------------|----------|
|
|
345
|
-
| E001 | error | No intent provided
|
|
346
|
-
| E002 | error |
|
|
347
|
-
| E003 | error | Chain step failed + user chose abort |
|
|
348
|
-
| E005 | error | Invalid chain name
|
|
349
|
-
| W001 | warning | Intent ambiguous between
|
|
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 |
|
|
350
129
|
| W002 | warning | Chain step completed with warnings | Log and continue |
|
|
351
|
-
| W003 | warning | `.workflow/learning/` not found | Auto-create and proceed |
|
|
352
130
|
</error_codes>
|
|
353
131
|
|
|
354
132
|
<success_criteria>
|
|
355
|
-
- [ ] Intent
|
|
356
|
-
- [ ]
|
|
357
|
-
- [ ] Session directory created
|
|
358
|
-
- [ ]
|
|
359
|
-
- [ ]
|
|
360
|
-
- [ ]
|
|
361
|
-
- [ ] Error handling: retry/skip/abort per step (auto-skip in -y mode)
|
|
362
|
-
- [ ] Session summary displayed on completion with next-step routing
|
|
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
|
|
363
139
|
- [ ] No files modified outside `.workflow/learning/`
|
|
364
140
|
</success_criteria>
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: maestro-merge
|
|
3
|
+
description: Two-phase merge of milestone worktree branch back — git merge first, artifact sync only on success
|
|
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 workflow artifacts for all phases, and reconcile project state. 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 (patch, don't overwrite).
|
|
19
|
+
</purpose>
|
|
20
|
+
|
|
21
|
+
<required_reading>
|
|
22
|
+
@~/.maestro/workflows/merge.md
|
|
23
|
+
</required_reading>
|
|
24
|
+
|
|
25
|
+
<context>
|
|
26
|
+
$ARGUMENTS -- milestone name and optional flags.
|
|
27
|
+
|
|
28
|
+
**Flags:**
|
|
29
|
+
- `-m <N>` or bare `<N>`: Milestone number (1-based, maps to registry)
|
|
30
|
+
- `--force`: Merge even if not all phases are completed
|
|
31
|
+
- `--dry-run`: Show what would be merged without executing
|
|
32
|
+
- `--no-cleanup`: Keep worktree and branch after merge (for inspection)
|
|
33
|
+
- `--continue`: Resume a merge that was paused due to git conflict
|
|
34
|
+
|
|
35
|
+
**Merge sequence:**
|
|
36
|
+
1. Registry health check (remove stale entries)
|
|
37
|
+
2. Validate phase readiness across all owned phases
|
|
38
|
+
3. Pre-merge rebase (`git merge main` in worktree)
|
|
39
|
+
4. Phase 1: Git merge (source code only)
|
|
40
|
+
5. Phase 2: Artifact sync (only after git merge succeeds)
|
|
41
|
+
6. Atomic state reconciliation
|
|
42
|
+
7. Cleanup (worktree remove + branch delete)
|
|
43
|
+
|
|
44
|
+
**Conflict handling:**
|
|
45
|
+
If git merge fails, the command saves state to `.workflow/.merge-state.json` and exits. User resolves conflicts, then runs `maestro-merge --continue` to resume artifact sync.
|
|
46
|
+
</context>
|
|
47
|
+
|
|
48
|
+
<execution>
|
|
49
|
+
Follow '~/.maestro/workflows/merge.md' completely.
|
|
50
|
+
|
|
51
|
+
**Next-step routing on completion:**
|
|
52
|
+
- View dashboard → Skill({ skill: "manage-status" })
|
|
53
|
+
- Audit milestone → Skill({ skill: "maestro-milestone-audit" })
|
|
54
|
+
</execution>
|
|
55
|
+
|
|
56
|
+
<error_codes>
|
|
57
|
+
| Code | Severity | Condition | Recovery |
|
|
58
|
+
|------|----------|-----------|----------|
|
|
59
|
+
| E001 | error | Running inside a worktree | Run from main worktree |
|
|
60
|
+
| E002 | error | No worktree registry found | Nothing to merge |
|
|
61
|
+
| E003 | error | --continue but no merge state | Start fresh merge |
|
|
62
|
+
| E004 | error | No milestone number provided | Provide `-m <N>` |
|
|
63
|
+
| W001 | warning | Stale registry entries found | Auto-cleaned |
|
|
64
|
+
| W002 | warning | Incomplete phases (without --force) | Confirm or use --force |
|
|
65
|
+
| W003 | warning | Conflict pulling main into worktree | Resolve in worktree first |
|
|
66
|
+
</error_codes>
|
|
67
|
+
|
|
68
|
+
<success_criteria>
|
|
69
|
+
- [ ] Registry health check passed (stale entries cleaned)
|
|
70
|
+
- [ ] Pre-merge rebase successful (worktree has latest main)
|
|
71
|
+
- [ ] Git merge completed without conflicts (or conflicts resolved via --continue)
|
|
72
|
+
- [ ] All owned phase artifacts synced to main `.workflow/phases/`
|
|
73
|
+
- [ ] `state.json` reconciled (phases_summary, accumulated_context, transition_history patched)
|
|
74
|
+
- [ ] `roadmap.md` completed phases marked
|
|
75
|
+
- [ ] Worktree removed and branch deleted (unless --no-cleanup)
|
|
76
|
+
- [ ] Registry updated (entry removed)
|
|
77
|
+
</success_criteria>
|
|
@@ -1,60 +1,72 @@
|
|
|
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
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
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 (from architecture):**
|
|
45
|
+
1. Phase coverage: each phase in roadmap has analyze → plan → execute chain
|
|
46
|
+
2. Ad-hoc completeness: all adhoc artifacts completed or skipped
|
|
47
|
+
3. Execution completeness: all tasks in executed plans completed
|
|
48
|
+
4. Cross-artifact integration: interface compatibility, data contracts, config consistency
|
|
49
|
+
|
|
50
|
+
**Next-step routing on completion:**
|
|
51
|
+
- Verdict PASS → `/maestro-milestone-complete {milestone}`
|
|
52
|
+
- Verdict FAIL, integration gaps → `/maestro-plan --gaps`
|
|
53
|
+
- Verdict FAIL, incomplete execution → `/maestro-execute`
|
|
54
|
+
</execution>
|
|
55
|
+
|
|
56
|
+
<error_codes>
|
|
57
|
+
| Code | Severity | Condition | Recovery |
|
|
58
|
+
|------|----------|-----------|----------|
|
|
59
|
+
| E001 | error | Milestone identifier required | Check arguments format |
|
|
60
|
+
| E002 | error | Milestone not found in state.json | Check milestone ID |
|
|
61
|
+
| E003 | error | No execute artifacts found for milestone | Run maestro-execute first |
|
|
62
|
+
| W001 | warning | Some phases lack complete artifact chains | Review incomplete phases |
|
|
63
|
+
</error_codes>
|
|
64
|
+
|
|
65
|
+
<success_criteria>
|
|
66
|
+
- [ ] All phases in milestone identified from roadmap
|
|
67
|
+
- [ ] Artifact chains verified (ANL→PLN→EXC) per phase
|
|
68
|
+
- [ ] Ad-hoc artifacts checked for completion
|
|
69
|
+
- [ ] Integration check completed (shared interfaces, data contracts)
|
|
70
|
+
- [ ] Audit report written with clear PASS/FAIL verdict
|
|
71
|
+
- [ ] Next-step routing provided
|
|
72
|
+
</success_criteria>
|