maestro-flow 0.3.8 → 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 +6 -6
- 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 -97
- package/.claude/commands/maestro-fork.md +111 -0
- package/.claude/commands/maestro-init.md +6 -6
- 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 +2 -2
- package/.claude/commands/manage-memory-capture.md +4 -4
- package/.claude/commands/manage-memory.md +2 -2
- 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 +2 -2
- 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 +1 -1
- package/.claude/commands/spec-setup.md +5 -5
- package/.claude/commands/wiki-connect.md +3 -3
- package/.claude/commands/wiki-digest.md +4 -4
- 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 +19 -14
- package/README.zh-CN.md +16 -12
- 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-BmPOu8sO.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-BjZ43aSa.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-B7yRL0s_.js → RequirementBoardPage-Bf1trzqs.js} +2 -2
- package/dashboard/dist/assets/{RequirementPage-D8J_-b6O.js → RequirementPage-Bllxe2XI.js} +10 -5
- package/dashboard/dist/assets/{SpecsPage-6lO8v8_C.js → SpecsPage-9lwxKT27.js} +2 -2
- package/dashboard/dist/assets/{SupervisorPage-Ds5N378a.js → SupervisorPage-SusdfHFq.js} +1 -1
- package/dashboard/dist/assets/{TeamsPage-DrkKr17T.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-CadP5YgU.js → arrow-left-Bqtb2hle.js} +1 -1
- package/dashboard/dist/assets/{check-5xufDzS8.js → check-u6fGOwQO.js} +1 -1
- package/dashboard/dist/assets/{chevron-right-CYbpR4ev.js → chevron-right-Csu22t58.js} +1 -1
- package/dashboard/dist/assets/{circle-Bm-5Q-Yh.js → circle-CMrkbRNg.js} +1 -1
- package/dashboard/dist/assets/{circle-alert-BqcYuT7x.js → circle-alert-c3tH1P4z.js} +1 -1
- package/dashboard/dist/assets/{circle-check-big-yyzAFysU.js → circle-check-big-TDSeWstm.js} +1 -1
- package/dashboard/dist/assets/{circle-check-DEVzW_lm.js → circle-check-gYxxSYuH.js} +1 -1
- package/dashboard/dist/assets/{code-BBdC8Wmw.js → code-CFN2uX9V.js} +1 -1
- package/dashboard/dist/assets/{columns-3-CQ9Trztr.js → columns-3-38xIDlzy.js} +1 -1
- package/dashboard/dist/assets/{download-DayuF-sn.js → download-DC7KkKyP.js} +1 -1
- package/dashboard/dist/assets/{folder-CqXeSKeC.js → folder-CWq_lAnf.js} +1 -1
- package/dashboard/dist/assets/index-DWG-WrzT.js +231 -0
- package/dashboard/dist/assets/{index-Dru5HYy0.js → index-Do71weNR.js} +1 -1
- package/dashboard/dist/assets/index-GUNJodSR.css +1 -0
- package/dashboard/dist/assets/{list-DBOD6IUt.js → list-CgIP_2A-.js} +1 -1
- package/dashboard/dist/assets/{minus-fQI1Syn2.js → minus-DYoN5UGk.js} +1 -1
- package/dashboard/dist/assets/{pen-line-Bkbbngl5.js → pen-line-Bh_WKYHm.js} +1 -1
- package/dashboard/dist/assets/{proxy-teW12DdZ.js → proxy-BKxDAKTj.js} +1 -1
- package/dashboard/dist/assets/{search-Bq3ygFUW.js → search-SieXnOgr.js} +1 -1
- package/dashboard/dist/assets/{shallow-22ZN8sFt.js → shallow-Bme1JY57.js} +1 -1
- package/dashboard/dist/assets/{table-BEYtdWc4.js → table-llyEtj-7.js} +1 -1
- package/dashboard/dist/assets/terminal-BB3Xfuv5.js +6 -0
- package/dashboard/dist/assets/{trash-2-DMqGBgcF.js → trash-2-C8f4vFFM.js} +1 -1
- package/dashboard/dist/assets/{zap-9DVkGVtt.js → zap-4uwlzVm0.js} +1 -1
- package/dashboard/dist/index.html +2 -2
- 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/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/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 +43 -3
- package/dashboard/dist-server/dashboard/src/server/state/state-manager.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/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/execute.md +94 -28
- package/workflows/fork.md +309 -0
- package/workflows/init.md +10 -1
- package/workflows/issue.md +66 -7
- package/workflows/maestro-coordinate.md +23 -16
- package/workflows/maestro.md +52 -35
- package/workflows/merge.md +285 -0
- package/workflows/milestone-audit.md +89 -70
- package/workflows/milestone-complete.md +89 -156
- package/workflows/plan.md +122 -17
- package/workflows/retrospective.md +3 -3
- package/workflows/roadmap.md +11 -3
- 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/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-CL8YDfOU.js +0 -67
- package/dashboard/dist/assets/ChatPage-CT-ozBK2.js +0 -8
- package/dashboard/dist/assets/CollabPage-C0rWMden.js +0 -1
- package/dashboard/dist/assets/KanbanPage-C6WbAlwI.js +0 -16
- package/dashboard/dist/assets/McpPage-BPIXADQi.js +0 -16
- package/dashboard/dist/assets/TreeBrowser-g_QUKemL.js +0 -11
- package/dashboard/dist/assets/WorkflowPage-X8aNkDEr.js +0 -6
- package/dashboard/dist/assets/git-branch-SqFf4Ru5.js +0 -6
- package/dashboard/dist/assets/index-D2Mtyw7I.css +0 -1
- package/dashboard/dist/assets/index-nufWop4p.js +0 -231
- package/dashboard/dist/assets/wrench-B84-zdLI.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,399 +0,0 @@
|
|
|
1
|
-
# Workflow: phase-transition
|
|
2
|
-
|
|
3
|
-
Mark a phase as complete, validate readiness, extract learnings, update project state, and route to next action.
|
|
4
|
-
|
|
5
|
-
## Trigger
|
|
6
|
-
|
|
7
|
-
- Manual via `/workflow:phase-transition [phase-number] [--force]`
|
|
8
|
-
- Suggested by `/workflow:status` when a phase has all tasks completed and verification passed
|
|
9
|
-
|
|
10
|
-
## Arguments
|
|
11
|
-
|
|
12
|
-
| Arg | Description | Default |
|
|
13
|
-
|-----|-------------|---------|
|
|
14
|
-
| `[phase-number]` | Phase to transition | Current phase from state.json |
|
|
15
|
-
| `--force` | Skip validation checks and force completion | `false` |
|
|
16
|
-
|
|
17
|
-
## Prerequisites
|
|
18
|
-
|
|
19
|
-
- `.workflow/state.json` must exist
|
|
20
|
-
- `.workflow/phases/{NN}-{slug}/index.json` must exist for the target phase
|
|
21
|
-
- Phase should have tasks executed and verification attempted
|
|
22
|
-
|
|
23
|
-
---
|
|
24
|
-
|
|
25
|
-
## Workflow Steps
|
|
26
|
-
|
|
27
|
-
### Step 1: Load Phase Data
|
|
28
|
-
|
|
29
|
-
```
|
|
30
|
-
a. Read .workflow/state.json
|
|
31
|
-
Extract: current_phase, phases_summary
|
|
32
|
-
|
|
33
|
-
b. Determine target phase:
|
|
34
|
-
If phase-number argument provided: use it
|
|
35
|
-
Else: use state.json.current_phase
|
|
36
|
-
|
|
37
|
-
c. Find phase directory:
|
|
38
|
-
Glob: .workflow/phases/{NN}-*/
|
|
39
|
-
Match where NN == target phase number
|
|
40
|
-
If not found: fail "Phase {NN} directory not found"
|
|
41
|
-
|
|
42
|
-
d. Read .workflow/phases/{NN}-{slug}/index.json
|
|
43
|
-
Extract: status, plan.task_ids, verification, validation, uat
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
### Step 2: Validate Completion
|
|
47
|
-
|
|
48
|
-
```
|
|
49
|
-
Check completion criteria (unless --force):
|
|
50
|
-
|
|
51
|
-
a. Task completion:
|
|
52
|
-
For each task_id in plan.task_ids:
|
|
53
|
-
Read .workflow/phases/{NN}-{slug}/.task/{task_id}.json
|
|
54
|
-
Check status == "completed"
|
|
55
|
-
|
|
56
|
-
incomplete_tasks = tasks where status != "completed"
|
|
57
|
-
If incomplete_tasks.length > 0:
|
|
58
|
-
BLOCKER: "Tasks not completed: {incomplete_tasks}"
|
|
59
|
-
|
|
60
|
-
b. Verification status:
|
|
61
|
-
Check index.json verification.status
|
|
62
|
-
If verification.status == "pending":
|
|
63
|
-
BLOCKER: "Verification not attempted (run /workflow:verify first)"
|
|
64
|
-
If verification.status == "gaps_found":
|
|
65
|
-
WARNING: "Verification has unresolved gaps"
|
|
66
|
-
(Not a hard blocker, but warn)
|
|
67
|
-
|
|
68
|
-
c. Validation status (if applicable):
|
|
69
|
-
Check index.json validation.status
|
|
70
|
-
If validation.status == "gaps_found":
|
|
71
|
-
WARNING: "Test validation has gaps"
|
|
72
|
-
|
|
73
|
-
c2. Review status (if applicable):
|
|
74
|
-
IF file exists "${PHASE_DIR}/review.json":
|
|
75
|
-
Read review.json.verdict
|
|
76
|
-
If verdict == "BLOCK":
|
|
77
|
-
WARNING: "Code review verdict is BLOCK — critical findings should be fixed first (W003)"
|
|
78
|
-
ELSE:
|
|
79
|
-
WARNING: "Code review not yet run — recommended before transition (W004)"
|
|
80
|
-
|
|
81
|
-
d. If any BLOCKERs found and not --force:
|
|
82
|
-
Display all blockers and warnings
|
|
83
|
-
AskUserQuestion: "Phase has blockers. Force complete anyway? [y/N]"
|
|
84
|
-
If no: exit with blocker list
|
|
85
|
-
If yes: proceed (treat as --force)
|
|
86
|
-
|
|
87
|
-
e. If only WARNINGs:
|
|
88
|
-
Display warnings
|
|
89
|
-
AskUserQuestion: "Phase has warnings but no blockers. Complete? [Y/n]"
|
|
90
|
-
If no: exit
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
### Step 2.1: Validate Open Issues
|
|
94
|
-
|
|
95
|
-
```
|
|
96
|
-
Read .workflow/issues/issues.jsonl (if exists)
|
|
97
|
-
Filter issues where phase_ref == completing_phase_slug
|
|
98
|
-
AND status NOT in ["completed", "failed", "deferred"]
|
|
99
|
-
|
|
100
|
-
open_critical = filtered issues where severity == "critical"
|
|
101
|
-
open_other = filtered issues where severity != "critical"
|
|
102
|
-
|
|
103
|
-
If open_critical.length > 0:
|
|
104
|
-
BLOCKER: "Cannot transition: {open_critical.length} critical issues unresolved"
|
|
105
|
-
For each issue in open_critical:
|
|
106
|
-
Display: " {issue.id} | {issue.title} | {issue.status}"
|
|
107
|
-
|
|
108
|
-
If open_other.length > 0:
|
|
109
|
-
WARNING: "{open_other.length} non-critical issues still open -- will be auto-closed on transition"
|
|
110
|
-
For each issue in open_other:
|
|
111
|
-
Display: " {issue.id} | {issue.title} | {issue.severity} | {issue.status}"
|
|
112
|
-
|
|
113
|
-
Apply same BLOCKER/WARNING logic as Step 2d-2e above.
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
### Step 3: Update Phase Index
|
|
117
|
-
|
|
118
|
-
```
|
|
119
|
-
Update .workflow/phases/{NN}-{slug}/index.json:
|
|
120
|
-
|
|
121
|
-
status: "completed"
|
|
122
|
-
completed_at: "{ISO timestamp}"
|
|
123
|
-
execution.completed_at: "{ISO timestamp}" (if not already set)
|
|
124
|
-
|
|
125
|
-
Write updated index.json
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
### Step 4: Update Project State
|
|
129
|
-
|
|
130
|
-
```
|
|
131
|
-
Read .workflow/state.json
|
|
132
|
-
|
|
133
|
-
a. Find next pending phase (milestone-scoped):
|
|
134
|
-
Read current_milestone from state.json
|
|
135
|
-
Read .workflow/roadmap.md to identify which phase numbers belong to current_milestone
|
|
136
|
-
(parse milestone headings and their nested phase entries)
|
|
137
|
-
milestone_phases = list of phase numbers under current_milestone
|
|
138
|
-
|
|
139
|
-
Scan .workflow/phases/*/index.json
|
|
140
|
-
Filter to only phases whose number is in milestone_phases
|
|
141
|
-
Find first phase where status == "pending" or status == "exploring" or status == "planning"
|
|
142
|
-
next_phase = that phase number (or null if none within current milestone)
|
|
143
|
-
|
|
144
|
-
b. Update state.json:
|
|
145
|
-
current_phase: next_phase (or keep current if no next)
|
|
146
|
-
phases_summary.completed: phases_summary.completed + 1
|
|
147
|
-
phases_summary.in_progress: phases_summary.in_progress - 1
|
|
148
|
-
Guard: if phases_summary.in_progress < 0 then phases_summary.in_progress = 0
|
|
149
|
-
phases_summary.pending: phases_summary.total - phases_summary.completed - phases_summary.in_progress
|
|
150
|
-
(pending is always derived, never independently incremented/decremented)
|
|
151
|
-
last_updated: "{ISO timestamp}"
|
|
152
|
-
|
|
153
|
-
c. Write structured deferred items to accumulated_context:
|
|
154
|
-
Collect deferred entries from Step 5b (deferred_from_fix_plans + deferred_from_gaps).
|
|
155
|
-
Note: Step 5 extracts these but they are written here as part of state update.
|
|
156
|
-
|
|
157
|
-
all_deferred = deferred_from_fix_plans + deferred_from_gaps (from verification.json)
|
|
158
|
-
IF all_deferred.length > 0:
|
|
159
|
-
existing_deferred = state.accumulated_context.deferred[]
|
|
160
|
-
FOR each entry IN all_deferred:
|
|
161
|
-
// Dedup check: extract key nouns from entry.description (content words, excluding stop words)
|
|
162
|
-
entry_nouns = extract_key_nouns(entry.description)
|
|
163
|
-
duplicate_found = false
|
|
164
|
-
FOR each existing IN existing_deferred:
|
|
165
|
-
existing_nouns = extract_key_nouns(existing.description)
|
|
166
|
-
shared_nouns = intersection(entry_nouns, existing_nouns)
|
|
167
|
-
IF shared_nouns.length >= 2:
|
|
168
|
-
// Merge instead of appending: keep higher severity, concatenate fix_direction
|
|
169
|
-
existing.severity = max_severity(existing.severity, entry.severity)
|
|
170
|
-
existing.fix_direction = existing.fix_direction + "; " + entry.fix_direction
|
|
171
|
-
duplicate_found = true
|
|
172
|
-
BREAK
|
|
173
|
-
IF NOT duplicate_found:
|
|
174
|
-
Append to state.accumulated_context.deferred[]:
|
|
175
|
-
{
|
|
176
|
-
"id": entry.id,
|
|
177
|
-
"severity": entry.severity,
|
|
178
|
-
"fix_direction": entry.fix_direction,
|
|
179
|
-
"description": entry.description
|
|
180
|
-
}
|
|
181
|
-
Note: Each deferred item is a structured object, NOT a plain string.
|
|
182
|
-
This matches the schema in templates/state.json.
|
|
183
|
-
Severity ranking: critical > high > medium > low.
|
|
184
|
-
|
|
185
|
-
d. If all phases completed:
|
|
186
|
-
status: "idle"
|
|
187
|
-
(All phases done)
|
|
188
|
-
|
|
189
|
-
e. Record transition in history:
|
|
190
|
-
Append to state.transition_history[] (create array if absent):
|
|
191
|
-
{
|
|
192
|
-
"type": "phase",
|
|
193
|
-
"from_phase": completing_phase_number,
|
|
194
|
-
"to_phase": next_phase (or null if last phase in milestone),
|
|
195
|
-
"milestone": state.current_milestone,
|
|
196
|
-
"transitioned_at": "{ISO timestamp}",
|
|
197
|
-
"trigger": "phase-transition",
|
|
198
|
-
"force": was --force used (boolean),
|
|
199
|
-
"snapshot": {
|
|
200
|
-
"phases_completed": state.phases_summary.completed (after increment),
|
|
201
|
-
"phases_total": state.phases_summary.total,
|
|
202
|
-
"deferred_count": state.accumulated_context.deferred.length,
|
|
203
|
-
"verification_status": index.verification.status (from the completing phase),
|
|
204
|
-
"learnings_count": learnings.length (from Step 5, or 0 if Step 5 not yet run)
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
Write updated state.json
|
|
209
|
-
```
|
|
210
|
-
|
|
211
|
-
### Step 5: Extract Learnings
|
|
212
|
-
|
|
213
|
-
```
|
|
214
|
-
a. Read reflection-log.md (if exists in phase directory):
|
|
215
|
-
Extract key insights, strategy adjustments, patterns discovered
|
|
216
|
-
Format as learning entries
|
|
217
|
-
|
|
218
|
-
b. Read verification.json (if exists):
|
|
219
|
-
Extract resolved gaps — these represent patterns learned
|
|
220
|
-
Extract successful verification strategies
|
|
221
|
-
|
|
222
|
-
Also read fix_plans[] (if present):
|
|
223
|
-
deferred_from_fix_plans = []
|
|
224
|
-
FOR each fix_plan IN verification.fix_plans[]:
|
|
225
|
-
deferred_from_fix_plans.push({
|
|
226
|
-
id: fix_plan.id or "FP-{index}",
|
|
227
|
-
severity: "high",
|
|
228
|
-
fix_direction: fix_plan.tasks.map(t => t.action or t.description).join("; "),
|
|
229
|
-
description: fix_plan.objective or fix_plan.description
|
|
230
|
-
})
|
|
231
|
-
|
|
232
|
-
Also read gaps[] and convert unresolved gaps to structured deferred entries:
|
|
233
|
-
deferred_from_gaps = []
|
|
234
|
-
FOR each gap IN verification.gaps[]:
|
|
235
|
-
deferred_from_gaps.push({
|
|
236
|
-
id: gap.id,
|
|
237
|
-
severity: gap.severity or "medium",
|
|
238
|
-
fix_direction: gap.fix_direction or "",
|
|
239
|
-
description: gap.description
|
|
240
|
-
})
|
|
241
|
-
|
|
242
|
-
c. Read validation.json (if exists):
|
|
243
|
-
Extract test patterns that worked well
|
|
244
|
-
Extract coverage insights
|
|
245
|
-
|
|
246
|
-
c2. Read review.json (if exists):
|
|
247
|
-
Extract recurring findings patterns (e.g., "security issues in API handlers")
|
|
248
|
-
Extract dimension-specific insights (e.g., "architecture coupling in module X")
|
|
249
|
-
|
|
250
|
-
d. Compile learnings:
|
|
251
|
-
learnings = [
|
|
252
|
-
{ type: "pattern", content: "{discovered pattern}" },
|
|
253
|
-
{ type: "decision", content: "{strategy adjustment}" },
|
|
254
|
-
{ type: "pitfall", content: "{issue encountered and resolution}" }
|
|
255
|
-
]
|
|
256
|
-
|
|
257
|
-
e. If learnings found:
|
|
258
|
-
For each learning:
|
|
259
|
-
Append to .workflow/specs/learnings.md under "## Entries":
|
|
260
|
-
### [YYYY-MM-DD HH:mm] {type}: {summary}
|
|
261
|
-
|
|
262
|
-
{content}
|
|
263
|
-
Phase: {NN} | Source: phase-transition
|
|
264
|
-
|
|
265
|
-
Display: "Extracted {count} learnings to specs/learnings.md"
|
|
266
|
-
```
|
|
267
|
-
|
|
268
|
-
### Step 5.1: Extract Issue Learnings
|
|
269
|
-
|
|
270
|
-
```
|
|
271
|
-
IF file exists ".workflow/issues/issues.jsonl":
|
|
272
|
-
issues = read_ndjson(".workflow/issues/issues.jsonl")
|
|
273
|
-
phase_issues = issues.filter(i => i.phase_ref == completing_phase_slug)
|
|
274
|
-
|
|
275
|
-
// Extract pitfall learnings from completed issues with resolution
|
|
276
|
-
FOR each issue in phase_issues where status == "completed" AND resolution != null:
|
|
277
|
-
Append to .workflow/specs/learnings.md under "## Entries":
|
|
278
|
-
### [YYYY-MM-DD HH:mm] pitfall: {issue.title}
|
|
279
|
-
|
|
280
|
-
{issue.resolution}
|
|
281
|
-
Phase: {NN} | Source: issue-resolution | Issue: {issue.id}
|
|
282
|
-
|
|
283
|
-
// Auto-close remaining open non-critical issues
|
|
284
|
-
FOR each issue in phase_issues where status NOT in ["completed", "failed", "deferred"]:
|
|
285
|
-
Update issue in issues.jsonl:
|
|
286
|
-
status: "completed"
|
|
287
|
-
resolution: "phase_transitioned"
|
|
288
|
-
resolved_at: now()
|
|
289
|
-
updated_at: now()
|
|
290
|
-
Append to issue.issue_history:
|
|
291
|
-
{ from: issue.status, to: "completed", changed_at: now(), actor: "phase-transition" }
|
|
292
|
-
|
|
293
|
-
// Archive phase issues to history
|
|
294
|
-
IF auto-closed issues exist:
|
|
295
|
-
Append auto-closed issues to .workflow/issues/issue-history.jsonl
|
|
296
|
-
Display: "Auto-closed {count} non-critical issues on phase transition"
|
|
297
|
-
```
|
|
298
|
-
|
|
299
|
-
### Step 5.2: Update Project Artifacts
|
|
300
|
-
|
|
301
|
-
```
|
|
302
|
-
a. Update project.md Requirements (Active → Validated):
|
|
303
|
-
Read .workflow/roadmap.md
|
|
304
|
-
Find the completed phase entry, extract its Requirements field (REQ-IDs)
|
|
305
|
-
Read .workflow/project.md
|
|
306
|
-
|
|
307
|
-
For each REQ-ID mapped to this phase:
|
|
308
|
-
In project.md "### Active" section:
|
|
309
|
-
Find the line containing the REQ-ID or its description
|
|
310
|
-
Change "- [ ]" to "- [x]"
|
|
311
|
-
Move the checked line to "### Validated" section
|
|
312
|
-
(append below the last entry or the "(None yet)" placeholder)
|
|
313
|
-
If "(None yet — ship to validate)" placeholder exists in Validated:
|
|
314
|
-
Remove the placeholder line
|
|
315
|
-
|
|
316
|
-
Write updated project.md
|
|
317
|
-
Display: "project.md: {count} requirements moved Active → Validated"
|
|
318
|
-
|
|
319
|
-
b. Update roadmap.md phase status:
|
|
320
|
-
Read .workflow/roadmap.md
|
|
321
|
-
Find the completed phase heading or entry (Phase {NN})
|
|
322
|
-
Append status marker to the phase title line: " ✅ COMPLETED"
|
|
323
|
-
e.g., "### Phase 1: Authentication" → "### Phase 1: Authentication ✅ COMPLETED"
|
|
324
|
-
If the phase entry has a Status field: set to "completed"
|
|
325
|
-
|
|
326
|
-
Write updated roadmap.md
|
|
327
|
-
Display: "roadmap.md: Phase {NN} marked as completed"
|
|
328
|
-
```
|
|
329
|
-
|
|
330
|
-
### Step 6: Report and Route
|
|
331
|
-
|
|
332
|
-
```
|
|
333
|
-
Display completion summary:
|
|
334
|
-
|
|
335
|
-
Phase {NN} ({title}) marked as COMPLETED
|
|
336
|
-
|
|
337
|
-
Tasks: {completed}/{total}
|
|
338
|
-
Verification: {verification.status}
|
|
339
|
-
Review: {review.verdict or "not run"}
|
|
340
|
-
Validation: {validation.status}
|
|
341
|
-
Learnings extracted: {count}
|
|
342
|
-
|
|
343
|
-
Route to next action:
|
|
344
|
-
|
|
345
|
-
If next_phase exists (within current milestone):
|
|
346
|
-
"Next phase: {next_phase_number} - {next_phase_title}"
|
|
347
|
-
Suggest: Skill({ skill: "maestro-plan", args: "{next_phase_number}" }) to begin planning,
|
|
348
|
-
or Skill({ skill: "manage-status" }) to review
|
|
349
|
-
|
|
350
|
-
If no next_phase within current milestone (all milestone phases completed):
|
|
351
|
-
"All phases in milestone '{current_milestone}' completed!"
|
|
352
|
-
Suggest: Skill({ skill: "maestro-milestone-audit" }) to audit and close the milestone
|
|
353
|
-
|
|
354
|
-
If no next phase across all milestones (project done):
|
|
355
|
-
"All phases completed!"
|
|
356
|
-
Suggest: Skill({ skill: "maestro-milestone-audit" })
|
|
357
|
-
|
|
358
|
-
If warnings were present:
|
|
359
|
-
"Note: Phase completed with warnings. Consider addressing them in a future phase."
|
|
360
|
-
```
|
|
361
|
-
|
|
362
|
-
---
|
|
363
|
-
|
|
364
|
-
## Error Handling
|
|
365
|
-
|
|
366
|
-
| Error | Action |
|
|
367
|
-
|-------|--------|
|
|
368
|
-
| state.json missing | Fail: "Run /workflow:init first" |
|
|
369
|
-
| Phase directory not found | Fail with available phase numbers |
|
|
370
|
-
| Phase already completed | Warn: "Phase already completed at {timestamp}. Re-transition? [y/N]" |
|
|
371
|
-
| index.json missing in phase dir | Fail: "Phase {NN} has no index.json" |
|
|
372
|
-
| Task JSON files missing | Count as incomplete tasks |
|
|
373
|
-
| W001 | Phase has warnings but no blockers — continue with user confirmation |
|
|
374
|
-
| W002 | UAT test failures exist (quality-test output) — review recommended before transition |
|
|
375
|
-
| W003 | Code review verdict is BLOCK — Skill({ skill: "quality-review" }) findings should be fixed first |
|
|
376
|
-
| W004 | Code review not yet run — Skill({ skill: "quality-review" }) recommended before transition |
|
|
377
|
-
|
|
378
|
-
## Output Files
|
|
379
|
-
|
|
380
|
-
| File | Action |
|
|
381
|
-
|------|--------|
|
|
382
|
-
| `.workflow/phases/{NN}-{slug}/index.json` | Updated: status="completed", completed_at set |
|
|
383
|
-
| `.workflow/state.json` | Updated: current_phase advanced, phases_summary updated |
|
|
384
|
-
| `.workflow/specs/learnings.md` | Appended with extracted learnings |
|
|
385
|
-
| `.workflow/project.md` | Updated: completed requirements moved Active → Validated |
|
|
386
|
-
| `.workflow/roadmap.md` | Updated: completed phase marked with ✅ COMPLETED |
|
|
387
|
-
|
|
388
|
-
## State Transitions
|
|
389
|
-
|
|
390
|
-
```
|
|
391
|
-
Phase index.json:
|
|
392
|
-
any status -> "completed"
|
|
393
|
-
|
|
394
|
-
Project state.json:
|
|
395
|
-
current_phase -> next pending phase (within current milestone)
|
|
396
|
-
phases_summary.completed++
|
|
397
|
-
phases_summary.in_progress--
|
|
398
|
-
phases_summary.pending = total - completed - in_progress (derived)
|
|
399
|
-
```
|