maestro-flow 0.3.12 → 0.3.14
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/CLAUDE.md +7 -0
- package/.claude/agents/workflow-analyzer.md +0 -1
- package/.claude/agents/workflow-collab-planner.md +0 -1
- package/.claude/agents/workflow-debugger.md +0 -1
- package/.claude/agents/workflow-integration-checker.md +2 -2
- package/.claude/agents/workflow-nyquist-auditor.md +0 -1
- package/.claude/agents/workflow-phase-researcher.md +2 -2
- package/.claude/agents/workflow-plan-checker.md +1 -1
- package/.claude/agents/workflow-planner.md +1 -2
- package/.claude/agents/workflow-roadmapper.md +1 -1
- package/.claude/agents/workflow-verifier.md +0 -1
- package/.claude/commands/learn-retro.md +2 -2
- package/.claude/commands/learn-second-opinion.md +2 -2
- package/.claude/commands/maestro-analyze.md +10 -2
- package/.claude/commands/maestro-brainstorm.md +1 -1
- package/.claude/commands/maestro-execute.md +21 -4
- package/.claude/commands/maestro-milestone-complete.md +14 -0
- package/.claude/commands/maestro-plan.md +12 -6
- package/.claude/commands/maestro-roadmap.md +1 -1
- package/.claude/commands/maestro-ui-design.md +7 -7
- package/.claude/commands/maestro-update.md +176 -0
- package/.claude/commands/maestro-verify.md +18 -3
- package/.claude/commands/manage-codebase-rebuild.md +0 -1
- package/.claude/commands/manage-harvest.md +1 -1
- package/.claude/commands/manage-learn.md +5 -5
- package/.claude/commands/manage-memory-capture.md +4 -4
- package/.claude/commands/manage-memory.md +1 -1
- package/.claude/commands/manage-wiki.md +62 -0
- package/.claude/commands/quality-business-test.md +2 -2
- package/.claude/commands/quality-debug.md +53 -7
- package/.claude/commands/quality-retrospective.md +5 -5
- package/.claude/commands/quality-review.md +39 -7
- package/.claude/commands/quality-sync.md +1 -1
- package/.claude/commands/quality-test-gen.md +1 -1
- package/.claude/commands/quality-test.md +45 -12
- package/.claude/commands/spec-remove.md +51 -0
- package/.claude/commands/spec-setup.md +1 -3
- package/.claude/commands/wiki-connect.md +9 -5
- package/.claude/commands/wiki-digest.md +6 -3
- package/.codex/skills/maestro/SKILL.md +2 -2
- package/.codex/skills/maestro-analyze/SKILL.md +4 -4
- package/.codex/skills/maestro-brainstorm/SKILL.md +4 -4
- package/.codex/skills/maestro-coordinate/SKILL.md +2 -2
- package/.codex/skills/maestro-execute/SKILL.md +15 -5
- package/.codex/skills/maestro-init/SKILL.md +1 -1
- package/.codex/skills/maestro-link-coordinate/SKILL.md +430 -224
- package/.codex/skills/maestro-milestone-complete/SKILL.md +18 -1
- package/.codex/skills/maestro-plan/SKILL.md +6 -6
- package/.codex/skills/maestro-roadmap/SKILL.md +3 -4
- package/.codex/skills/maestro-spec-generate/SKILL.md +2 -2
- package/.codex/skills/maestro-ui-design/SKILL.md +6 -6
- package/.codex/skills/maestro-verify/SKILL.md +20 -11
- package/.codex/skills/manage-codebase-rebuild/SKILL.md +4 -4
- package/.codex/skills/manage-harvest/SKILL.md +10 -1
- package/.codex/skills/manage-issue-discover/SKILL.md +3 -3
- package/.codex/skills/manage-learn/SKILL.md +3 -2
- package/.codex/skills/manage-memory/SKILL.md +3 -3
- package/.codex/skills/manage-memory-capture/SKILL.md +8 -14
- package/.codex/skills/manage-status/SKILL.md +9 -4
- package/.codex/skills/manage-wiki/SKILL.md +55 -0
- package/.codex/skills/quality-business-test/SKILL.md +8 -6
- package/.codex/skills/quality-debug/SKILL.md +22 -9
- package/.codex/skills/quality-integration-test/SKILL.md +11 -7
- package/.codex/skills/quality-retrospective/SKILL.md +45 -26
- package/.codex/skills/quality-review/SKILL.md +10 -7
- package/.codex/skills/quality-test/SKILL.md +9 -4
- package/.codex/skills/quality-test-gen/SKILL.md +13 -9
- package/.codex/skills/spec-add/SKILL.md +11 -3
- package/.codex/skills/spec-load/SKILL.md +7 -0
- package/.codex/skills/spec-map/SKILL.md +2 -2
- package/.codex/skills/spec-remove/SKILL.md +101 -0
- package/.codex/skills/spec-setup/SKILL.md +4 -8
- package/.codex/skills/wiki-connect/SKILL.md +6 -5
- package/.codex/skills/wiki-digest/SKILL.md +2 -2
- package/chains/milestone-fork-merge.json +6 -6
- package/dashboard/dist-server/dashboard/src/server/agents/claude-code-adapter.d.ts +9 -0
- package/dashboard/dist-server/dashboard/src/server/agents/claude-code-adapter.js +109 -9
- package/dashboard/dist-server/dashboard/src/server/agents/claude-code-adapter.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/agents/claude-code-adapter.test.js +49 -0
- package/dashboard/dist-server/dashboard/src/server/agents/claude-code-adapter.test.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/index.js +5 -4
- package/dashboard/dist-server/dashboard/src/server/routes/index.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/specs.d.ts +5 -13
- package/dashboard/dist-server/dashboard/src/server/routes/specs.js +97 -155
- package/dashboard/dist-server/dashboard/src/server/routes/specs.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/wiki.d.ts +11 -1
- package/dashboard/dist-server/dashboard/src/server/routes/wiki.integration.test.js +27 -6
- package/dashboard/dist-server/dashboard/src/server/routes/wiki.integration.test.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/wiki.js +25 -7
- package/dashboard/dist-server/dashboard/src/server/routes/wiki.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/graph-analysis.js +8 -0
- package/dashboard/dist-server/dashboard/src/server/wiki/graph-analysis.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/search.js +1 -0
- package/dashboard/dist-server/dashboard/src/server/wiki/search.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/spec-entry-parser.d.ts +29 -0
- package/dashboard/dist-server/dashboard/src/server/wiki/spec-entry-parser.js +148 -0
- package/dashboard/dist-server/dashboard/src/server/wiki/spec-entry-parser.js.map +1 -0
- package/dashboard/dist-server/dashboard/src/server/wiki/stress.test.js +4 -2
- package/dashboard/dist-server/dashboard/src/server/wiki/stress.test.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/virtual-wiki-adapters.js +8 -2
- package/dashboard/dist-server/dashboard/src/server/wiki/virtual-wiki-adapters.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.d.ts +5 -0
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js +80 -38
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.test.js +8 -6
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.test.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-types.d.ts +40 -5
- package/dashboard/dist-server/dashboard/src/server/wiki/writer-stress.test.js +21 -23
- package/dashboard/dist-server/dashboard/src/server/wiki/writer-stress.test.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/writer.d.ts +33 -3
- package/dashboard/dist-server/dashboard/src/server/wiki/writer.js +184 -12
- package/dashboard/dist-server/dashboard/src/server/wiki/writer.js.map +1 -1
- package/dashboard/dist-server/src/commands/delegate.js +26 -0
- package/dashboard/dist-server/src/commands/delegate.js.map +1 -1
- package/dashboard/dist-server/src/coordinator/graph-types.d.ts +11 -1
- package/dashboard/dist-server/src/coordinator/graph-walker.js +29 -2
- package/dashboard/dist-server/src/coordinator/graph-walker.js.map +1 -1
- package/dashboard/dist-server/src/coordinator/prompt-assembler.js +3 -2
- package/dashboard/dist-server/src/coordinator/prompt-assembler.js.map +1 -1
- package/dashboard/dist-server/src/hooks/constants.d.ts +29 -60
- package/dashboard/dist-server/src/hooks/constants.js +105 -82
- package/dashboard/dist-server/src/hooks/constants.js.map +1 -1
- package/dashboard/dist-server/src/types/index.d.ts +2 -1
- package/dist/src/commands/delegate.d.ts.map +1 -1
- package/dist/src/commands/delegate.js +26 -0
- package/dist/src/commands/delegate.js.map +1 -1
- package/dist/src/commands/hooks.d.ts +2 -4
- package/dist/src/commands/hooks.d.ts.map +1 -1
- package/dist/src/commands/hooks.js +4 -7
- package/dist/src/commands/hooks.js.map +1 -1
- package/dist/src/commands/install-ui/InstallConfirm.d.ts +2 -3
- package/dist/src/commands/install-ui/InstallConfirm.d.ts.map +1 -1
- package/dist/src/commands/install-ui/InstallConfirm.js +1 -1
- package/dist/src/commands/install-ui/InstallConfirm.js.map +1 -1
- package/dist/src/commands/install-ui/InstallExecution.d.ts.map +1 -1
- package/dist/src/commands/install-ui/InstallExecution.js +1 -2
- package/dist/src/commands/install-ui/InstallExecution.js.map +1 -1
- package/dist/src/commands/install-ui/InstallFlow.d.ts.map +1 -1
- package/dist/src/commands/install-ui/InstallFlow.js +5 -7
- package/dist/src/commands/install-ui/InstallFlow.js.map +1 -1
- package/dist/src/commands/install-ui/StatuslineConfig.d.ts +3 -6
- package/dist/src/commands/install-ui/StatuslineConfig.d.ts.map +1 -1
- package/dist/src/commands/install-ui/StatuslineConfig.js +21 -17
- package/dist/src/commands/install-ui/StatuslineConfig.js.map +1 -1
- package/dist/src/commands/update.d.ts.map +1 -1
- package/dist/src/commands/update.js +95 -0
- package/dist/src/commands/update.js.map +1 -1
- package/dist/src/commands/wiki.d.ts.map +1 -1
- package/dist/src/commands/wiki.js +75 -11
- package/dist/src/commands/wiki.js.map +1 -1
- package/dist/src/coordinator/graph-types.d.ts +11 -1
- package/dist/src/coordinator/graph-types.d.ts.map +1 -1
- package/dist/src/coordinator/graph-walker.d.ts.map +1 -1
- package/dist/src/coordinator/graph-walker.js +29 -2
- package/dist/src/coordinator/graph-walker.js.map +1 -1
- package/dist/src/coordinator/prompt-assembler.d.ts.map +1 -1
- package/dist/src/coordinator/prompt-assembler.js +3 -2
- package/dist/src/coordinator/prompt-assembler.js.map +1 -1
- package/dist/src/hooks/__tests__/statusline-visual-test.d.ts +4 -1
- package/dist/src/hooks/__tests__/statusline-visual-test.d.ts.map +1 -1
- package/dist/src/hooks/__tests__/statusline-visual-test.js +55 -174
- package/dist/src/hooks/__tests__/statusline-visual-test.js.map +1 -1
- package/dist/src/hooks/auto-mode.d.ts +18 -0
- package/dist/src/hooks/auto-mode.d.ts.map +1 -0
- package/dist/src/hooks/auto-mode.js +28 -0
- package/dist/src/hooks/auto-mode.js.map +1 -0
- package/dist/src/hooks/constants.d.ts +29 -60
- package/dist/src/hooks/constants.d.ts.map +1 -1
- package/dist/src/hooks/constants.js +105 -82
- package/dist/src/hooks/constants.js.map +1 -1
- package/dist/src/hooks/context-monitor.d.ts.map +1 -1
- package/dist/src/hooks/context-monitor.js +14 -3
- package/dist/src/hooks/context-monitor.js.map +1 -1
- package/dist/src/hooks/coordinator-tracker.d.ts +1 -0
- package/dist/src/hooks/coordinator-tracker.d.ts.map +1 -1
- package/dist/src/hooks/coordinator-tracker.js +19 -9
- package/dist/src/hooks/coordinator-tracker.js.map +1 -1
- package/dist/src/hooks/skill-context.d.ts.map +1 -1
- package/dist/src/hooks/skill-context.js +54 -6
- package/dist/src/hooks/skill-context.js.map +1 -1
- package/dist/src/hooks/statusline.d.ts +11 -8
- package/dist/src/hooks/statusline.d.ts.map +1 -1
- package/dist/src/hooks/statusline.js +284 -182
- package/dist/src/hooks/statusline.js.map +1 -1
- package/dist/src/hooks/workspace.d.ts.map +1 -1
- package/dist/src/hooks/workspace.js +2 -1
- package/dist/src/hooks/workspace.js.map +1 -1
- package/dist/src/migrations/_template.d.ts +12 -0
- package/dist/src/migrations/_template.d.ts.map +1 -0
- package/dist/src/migrations/_template.js +55 -0
- package/dist/src/migrations/_template.js.map +1 -0
- package/dist/src/migrations/index.d.ts +14 -0
- package/dist/src/migrations/index.d.ts.map +1 -0
- package/dist/src/migrations/index.js +20 -0
- package/dist/src/migrations/index.js.map +1 -0
- package/dist/src/migrations/run.d.ts +12 -0
- package/dist/src/migrations/run.d.ts.map +1 -0
- package/dist/src/migrations/run.js +119 -0
- package/dist/src/migrations/run.js.map +1 -0
- package/dist/src/migrations/v1-to-v2.d.ts +10 -0
- package/dist/src/migrations/v1-to-v2.d.ts.map +1 -0
- package/dist/src/migrations/v1-to-v2.js +71 -0
- package/dist/src/migrations/v1-to-v2.js.map +1 -0
- package/dist/src/tools/team-activity.d.ts.map +1 -1
- package/dist/src/tools/team-activity.js +22 -0
- package/dist/src/tools/team-activity.js.map +1 -1
- package/dist/src/tools/transition-recorder.d.ts +2 -17
- package/dist/src/tools/transition-recorder.d.ts.map +1 -1
- package/dist/src/tools/transition-recorder.js +6 -3
- package/dist/src/tools/transition-recorder.js.map +1 -1
- package/dist/src/types/index.d.ts +2 -1
- package/dist/src/types/index.d.ts.map +1 -1
- package/dist/src/utils/migration-registry.d.ts +65 -0
- package/dist/src/utils/migration-registry.d.ts.map +1 -0
- package/dist/src/utils/migration-registry.js +117 -0
- package/dist/src/utils/migration-registry.js.map +1 -0
- package/dist/src/utils/state-schema.d.ts +153 -0
- package/dist/src/utils/state-schema.d.ts.map +1 -0
- package/dist/src/utils/state-schema.js +329 -0
- package/dist/src/utils/state-schema.js.map +1 -0
- package/package.json +1 -1
- package/templates/state.json +17 -39
- package/workflows/brainstorm.md +3 -3
- package/workflows/codebase-rebuild.md +2 -12
- package/workflows/debug.md +7 -8
- package/workflows/execute.md +18 -4
- package/workflows/fork.md +37 -86
- package/workflows/init.md +1 -4
- package/workflows/integration-test.md +4 -5
- package/workflows/issue.md +3 -9
- package/workflows/learn.md +20 -19
- package/workflows/maestro-coordinate.codex.md +9 -9
- package/workflows/maestro-coordinate.md +9 -9
- package/workflows/maestro.codex.md +8 -1
- package/workflows/maestro.md +14 -5
- package/workflows/memory.md +26 -71
- package/workflows/merge.md +45 -107
- package/workflows/milestone-complete.md +24 -7
- package/workflows/retrospective.md +77 -109
- package/workflows/review.md +5 -12
- package/workflows/specs-remove.md +115 -0
- package/workflows/specs-setup.md +10 -32
- package/workflows/status.md +291 -290
- package/workflows/sync.md +5 -5
- package/workflows/test.md +4 -5
- package/workflows/ui-style.md +3 -4
- package/workflows/verify.md +2 -2
- package/workflows/wiki-connect.md +188 -0
- package/workflows/wiki-digest.md +221 -0
- package/workflows/wiki-manage.md +204 -0
- package/.codex/skills/maestro-chain/SKILL.md +0 -233
package/.claude/CLAUDE.md
CHANGED
|
@@ -17,3 +17,10 @@ Available CLI endpoints are dynamically defined by the config file
|
|
|
17
17
|
|
|
18
18
|
- **Prefer `mcp__ide__getDiagnostics`** for code error checking over shell-based TypeScript compilation
|
|
19
19
|
|
|
20
|
+
## Knowledge Capture
|
|
21
|
+
|
|
22
|
+
- **Spec writes** → always `<spec-entry>` closed-tag format with `category`, `keywords`, `date`, `source`. Never raw Markdown. Route through `spec-add` when possible.
|
|
23
|
+
- **Capture signal** → when execution surfaces non-obvious knowledge (plan deviation, retry pattern, root cause, constraint violation), ask user once whether to persist it. Match category to content: decisions→`arch`, pitfalls→`debug`/`learning`, patterns→`coding`, rules→`quality`.
|
|
24
|
+
- **Promotion** → at milestone close, scan learnings for repeated keywords (≥2 entries) and offer to graduate them into formal conventions.
|
|
25
|
+
- **Traceability** → every entry needs a source anchor: `file:line`, `INS-{id}`, commit, or phase path.
|
|
26
|
+
|
|
@@ -95,7 +95,6 @@ N/A -- produces markdown analysis document
|
|
|
95
95
|
## Output Location
|
|
96
96
|
|
|
97
97
|
- **Scratch**: `.workflow/scratch/{topic-slug}/analysis.md`
|
|
98
|
-
- **Legacy fallback**: `.workflow/phases/{NN}-{slug}/` paths are still recognized for backward compatibility
|
|
99
98
|
|
|
100
99
|
The caller specifies the output path. If no path is specified, default to scratch mode using the subject as the slug.
|
|
101
100
|
|
|
@@ -133,7 +133,6 @@ You are a collaborative planner that works within a pre-allocated task ID range.
|
|
|
133
133
|
- **Scratch tasks**: `.workflow/scratch/{slug}/.task/TASK-{NNN}.json` (within assigned ID range only)
|
|
134
134
|
- **Plan notes**: `.workflow/scratch/{slug}/plan-note.md` (append your section, do not overwrite others)
|
|
135
135
|
- **Never write**: plan.json (that is the coordinating planner's responsibility)
|
|
136
|
-
- **Legacy fallback**: `.workflow/phases/{NN}-{slug}/` paths are still recognized for backward compatibility
|
|
137
136
|
|
|
138
137
|
## Error Behavior
|
|
139
138
|
- **ID range conflict** (task ID already exists): Stop and report -- do not overwrite; note conflict in plan-note.md
|
|
@@ -86,7 +86,6 @@ Each line in evidence.ndjson:
|
|
|
86
86
|
|
|
87
87
|
## Output Location
|
|
88
88
|
- **Scratch debugging**: `.workflow/scratch/debug-{slug}/understanding.md` and `.workflow/scratch/debug-{slug}/evidence.ndjson`
|
|
89
|
-
- **Legacy fallback**: `.workflow/phases/{NN}-{slug}/` paths are still recognized for backward compatibility
|
|
90
89
|
- **Code fixes**: Applied directly to project source files (not in .debug directory)
|
|
91
90
|
|
|
92
91
|
## Error Behavior
|
|
@@ -38,11 +38,11 @@ N/A -- reads code artifacts, not task JSON.
|
|
|
38
38
|
|
|
39
39
|
## Input
|
|
40
40
|
- Completed phase artifacts (code, configs, tests)
|
|
41
|
-
- Phase/scratch definitions (resolved via state.json artifact registry
|
|
41
|
+
- Phase/scratch definitions (resolved via state.json artifact registry)
|
|
42
42
|
- Task summaries from `.summaries/`
|
|
43
43
|
|
|
44
44
|
## Output Location
|
|
45
|
-
`.workflow/scratch/{milestone}/integration-audit.md`
|
|
45
|
+
`.workflow/scratch/{milestone}/integration-audit.md`
|
|
46
46
|
|
|
47
47
|
## Output
|
|
48
48
|
Integration audit report at the output location above:
|
|
@@ -44,7 +44,6 @@ You audit test coverage by mapping requirements to test files, calculating cover
|
|
|
44
44
|
- Test results: `.workflow/scratch/{slug}/.tests/test-results.json`
|
|
45
45
|
- Coverage report: `.workflow/scratch/{slug}/.tests/coverage-report.json`
|
|
46
46
|
- Generated test stubs: appropriate test directories within the project source tree
|
|
47
|
-
- **Legacy fallback**: `.workflow/phases/{NN}-{slug}/` paths are still recognized for backward compatibility
|
|
48
47
|
|
|
49
48
|
## Output
|
|
50
49
|
- `validation.json`:
|
|
@@ -33,7 +33,7 @@ You research the implementation approach for a specific phase of the roadmap. Yo
|
|
|
33
33
|
- Research summary from `.workflow/research/SUMMARY.md` (if available)
|
|
34
34
|
|
|
35
35
|
## Output
|
|
36
|
-
`.workflow/scratch/{slug}/research.md` (resolved via state.json artifact registry
|
|
36
|
+
`.workflow/scratch/{slug}/research.md` (resolved via state.json artifact registry).
|
|
37
37
|
|
|
38
38
|
Structure:
|
|
39
39
|
```
|
|
@@ -69,7 +69,7 @@ Structure:
|
|
|
69
69
|
N/A -- produces markdown research document
|
|
70
70
|
|
|
71
71
|
## Output Location
|
|
72
|
-
`.workflow/scratch/{slug}/research.md`
|
|
72
|
+
`.workflow/scratch/{slug}/research.md`
|
|
73
73
|
|
|
74
74
|
## Error Behavior
|
|
75
75
|
- If codebase analysis (`.workflow/codebase/`) is unavailable, note as limitation and proceed with external research only
|
|
@@ -44,7 +44,7 @@ You validate the quality of execution plans before they proceed to implementatio
|
|
|
44
44
|
- **Project specs** — `maestro spec load --category arch`: verify tasks comply with architecture constraints and module boundaries
|
|
45
45
|
|
|
46
46
|
## Output Location
|
|
47
|
-
`.workflow/scratch/{slug}/plan-check.md`
|
|
47
|
+
`.workflow/scratch/{slug}/plan-check.md`
|
|
48
48
|
|
|
49
49
|
## Output
|
|
50
50
|
Check report written to the output location above:
|
|
@@ -35,7 +35,7 @@ When invoked with `quick` flag:
|
|
|
35
35
|
- Focus on getting to execution fast
|
|
36
36
|
|
|
37
37
|
## Input
|
|
38
|
-
- `.workflow/scratch/{slug}/context.md` -- Context and decisions (resolved via state.json artifact registry
|
|
38
|
+
- `.workflow/scratch/{slug}/context.md` -- Context and decisions (resolved via state.json artifact registry)
|
|
39
39
|
- `.workflow/scratch/{slug}/research.md` -- Research (if available, resolved via artifact registry)
|
|
40
40
|
- Spec references and doc-index
|
|
41
41
|
- **Project specs** (MANDATORY) -- Loaded via `maestro spec load --category arch`:
|
|
@@ -167,7 +167,6 @@ When invoked with `quick` flag:
|
|
|
167
167
|
- **Scratch planning**: `.workflow/scratch/{slug}/plan.json` and `.workflow/scratch/{slug}/.task/TASK-{NNN}.json`
|
|
168
168
|
- **Plan notes** (collab mode): `.workflow/scratch/{slug}/plan-note.md`
|
|
169
169
|
- **Quick mode**: Same paths, fewer task files
|
|
170
|
-
- **Legacy fallback**: `.workflow/phases/{NN}-{slug}/` paths are still recognized for backward compatibility
|
|
171
170
|
|
|
172
171
|
## Error Behavior
|
|
173
172
|
- **Missing context.md**: Stop and report -- planning requires context; do not guess
|
|
@@ -60,7 +60,7 @@ You create a phased project roadmap from research findings and requirements. You
|
|
|
60
60
|
|
|
61
61
|
Phase identifiers use lowercase kebab-case slug names (e.g., `auth`, `api-layer`, `ui-components`).
|
|
62
62
|
|
|
63
|
-
These identifiers become scratch directory names under `.workflow/scratch/{slug}/` (resolved via state.json artifact registry
|
|
63
|
+
These identifiers become scratch directory names under `.workflow/scratch/{slug}/` (resolved via state.json artifact registry).
|
|
64
64
|
|
|
65
65
|
## Schema Reference
|
|
66
66
|
`@templates/roadmap.md` -- roadmap template
|
|
@@ -107,7 +107,6 @@ You perform goal-backward verification of completed work using a three-layer che
|
|
|
107
107
|
|
|
108
108
|
## Output Location
|
|
109
109
|
- **Scratch verification**: `.workflow/scratch/{slug}/verification.json`
|
|
110
|
-
- **Legacy fallback**: `.workflow/phases/{NN}-{slug}/` paths are still recognized for backward compatibility
|
|
111
110
|
- **Per-task verification**: Embedded in the `convergence_check` block within verification.json (not separate files)
|
|
112
111
|
|
|
113
112
|
## Error Behavior
|
|
@@ -52,7 +52,7 @@ Arguments: $ARGUMENTS
|
|
|
52
52
|
- `.workflow/learning/lessons.jsonl` — Existing insights for dedup
|
|
53
53
|
- `maestro wiki list --type spec --json` — Spec entries (decision lens)
|
|
54
54
|
- `.workflow/specs/architecture-constraints.md` — Documented architectural decisions (decision lens)
|
|
55
|
-
- Phase context with Locked/Free/Deferred decisions (decision lens) — resolve via `state.json.artifacts[]` scratch paths
|
|
55
|
+
- Phase context with Locked/Free/Deferred decisions (decision lens) — resolve via `state.json.artifacts[]` scratch paths
|
|
56
56
|
</context>
|
|
57
57
|
|
|
58
58
|
<execution>
|
|
@@ -146,7 +146,7 @@ git log --oneline --all --grep="decision\|chose\|decided\|architecture" -20
|
|
|
146
146
|
|
|
147
147
|
Also read:
|
|
148
148
|
- `.workflow/specs/architecture-constraints.md` — grep for `<spec-entry category="arch"` blocks
|
|
149
|
-
- Phase context files — resolve via `state.json.artifacts[]` scratch paths
|
|
149
|
+
- Phase context files — resolve via `state.json.artifacts[]` scratch paths — scan for "Locked:", "Deferred:" sections
|
|
150
150
|
- `.workflow/learning/lessons.jsonl` — filter `category == "decision"`
|
|
151
151
|
|
|
152
152
|
Apply scope filter (--phase, --tag, --id).
|
|
@@ -28,7 +28,7 @@ Arguments: $ARGUMENTS
|
|
|
28
28
|
- File path → analyze that file's content
|
|
29
29
|
- Wiki ID (`<type>-<slug>`) → fetch via `maestro wiki get`
|
|
30
30
|
- `HEAD` or `staged` → analyze current git diff (`git diff HEAD` or `git diff --staged`)
|
|
31
|
-
- Phase number (e.g., `3`) → resolve via `state.json.artifacts[]` to find plan in scratch dir
|
|
31
|
+
- Phase number (e.g., `3`) → resolve via `state.json.artifacts[]` to find plan in scratch dir
|
|
32
32
|
|
|
33
33
|
**Flags:**
|
|
34
34
|
- `--mode review` — 3-persona parallel review (default)
|
|
@@ -54,7 +54,7 @@ Arguments: $ARGUMENTS
|
|
|
54
54
|
- Wiki ID: `maestro wiki get <id>`
|
|
55
55
|
- `HEAD`: `git diff HEAD` (unstaged + staged changes)
|
|
56
56
|
- `staged`: `git diff --staged`
|
|
57
|
-
- Phase N: Resolve via `state.json.artifacts.find(a => a.type === 'plan' && a.phase === N)` → read `.workflow/{artifact.path}/plan.json
|
|
57
|
+
- Phase N: Resolve via `state.json.artifacts.find(a => a.type === 'plan' && a.phase === N)` → read `.workflow/{artifact.path}/plan.json`
|
|
58
58
|
- If unresolvable, AskUserQuestion for clarification
|
|
59
59
|
|
|
60
60
|
### Stage 2: Load Context
|
|
@@ -53,7 +53,15 @@ $ARGUMENTS -- phase number for milestone-scoped, topic text for adhoc/standalone
|
|
|
53
53
|
|
|
54
54
|
**Scope detection rule**: Text argument + `state.json.current_milestone` non-null → adhoc. Text argument + no milestone → standalone. No args + no roadmap → error (need topic or roadmap). `--gaps` → gaps scope (bypasses standard scope routing).
|
|
55
55
|
|
|
56
|
-
**Output directory
|
|
56
|
+
**Output directory** (relative to `.workflow/`):
|
|
57
|
+
|
|
58
|
+
| Scope | Directory format | Example |
|
|
59
|
+
|-------|-----------------|---------|
|
|
60
|
+
| Phase | `scratch/{YYYYMMDD}-analyze-P{N}-{slug}/` | `20260420-analyze-P1-auth` |
|
|
61
|
+
| Milestone | `scratch/{YYYYMMDD}-analyze-M{N}-{slug}/` | `20260420-analyze-M1-mvp` |
|
|
62
|
+
| Adhoc/Standalone | `scratch/{YYYYMMDD}-analyze-{slug}/` | `20260420-analyze-caching` |
|
|
63
|
+
|
|
64
|
+
Scope prefix (`P{N}` / `M{N}`) enables directory-level identification as fallback when state.json is unavailable.
|
|
57
65
|
|
|
58
66
|
**Artifact registration**: On completion, register artifact in `state.json.artifacts[]`:
|
|
59
67
|
```jsonc
|
|
@@ -63,7 +71,7 @@ $ARGUMENTS -- phase number for milestone-scoped, topic text for adhoc/standalone
|
|
|
63
71
|
"milestone": "{current_milestone or null}",
|
|
64
72
|
"phase": "{phase_number or null}",
|
|
65
73
|
"scope": "{milestone|phase|adhoc|standalone}",
|
|
66
|
-
"path": "scratch/analyze-{
|
|
74
|
+
"path": "scratch/{YYYYMMDD}-analyze-P{N}-{slug}", // P{N} for phase, M{N} for milestone, omit for adhoc/standalone
|
|
67
75
|
"status": "completed",
|
|
68
76
|
"depends_on": null,
|
|
69
77
|
"harvested": false,
|
|
@@ -30,7 +30,7 @@ $ARGUMENTS -- topic text for auto mode, or role name for single role mode.
|
|
|
30
30
|
|
|
31
31
|
**Auto mode**: topic text (e.g., "Build real-time collaboration platform") triggers full pipeline.
|
|
32
32
|
**Single role mode**: valid role name (e.g., "system-architect") runs one role analysis.
|
|
33
|
-
**All output** goes to `.workflow/scratch/brainstorm-{slug}
|
|
33
|
+
**All output** goes to `.workflow/scratch/{YYYYMMDD}-brainstorm-{slug}/`.
|
|
34
34
|
**Artifact registration**: On completion, registers artifact (type=brainstorm) in state.json.
|
|
35
35
|
**Output boundary**: ALL file writes MUST target `{output_dir}/` or `.workflow/state.json` only. NEVER modify source code or files outside these paths.
|
|
36
36
|
|
|
@@ -34,7 +34,7 @@ $ARGUMENTS — phase number, or no args for milestone-wide execution, with optio
|
|
|
34
34
|
- `--auto-commit` -- Automatically commit after each task completion
|
|
35
35
|
- `--method agent|cli|auto` -- Override execution method (default: from config.json)
|
|
36
36
|
- `--executor <tool>` -- Default CLI tool: gemini|codex|qwen|opencode|claude
|
|
37
|
-
- `--dir <path>` -- Execute specific plan directory (e.g., `scratch/plan-auth
|
|
37
|
+
- `--dir <path>` -- Execute specific plan directory (e.g., `scratch/20260420-plan-auth`)
|
|
38
38
|
|
|
39
39
|
**Scope routing:**
|
|
40
40
|
|
|
@@ -55,7 +55,9 @@ $ARGUMENTS — phase number, or no args for milestone-wide execution, with optio
|
|
|
55
55
|
|
|
56
56
|
**Output**: Task summaries written to plan's scratch dir:
|
|
57
57
|
```
|
|
58
|
-
|
|
58
|
+
{YYYYMMDD}-plan-P{N}-{slug}/ # phase-scoped
|
|
59
|
+
{YYYYMMDD}-plan-M{N}-{slug}/ # milestone-wide
|
|
60
|
+
{YYYYMMDD}-plan-{slug}/ # adhoc/standalone
|
|
59
61
|
├── plan.json
|
|
60
62
|
├── .task/
|
|
61
63
|
│ ├── TASK-001.json # status updated to completed|blocked
|
|
@@ -65,7 +67,7 @@ scratch/plan-{slug}-{date}/
|
|
|
65
67
|
└── TASK-002-summary.md
|
|
66
68
|
```
|
|
67
69
|
|
|
68
|
-
**Incremental learning extraction**: After each plan completes, extract strategy adjustments / patterns / pitfalls from `.summaries/` and append to `specs/learnings.md
|
|
70
|
+
**Incremental learning extraction**: After each plan completes, extract strategy adjustments / patterns / pitfalls from `.summaries/` and append to `specs/learnings.md` using `<spec-entry>` closed-tag format (category=`learning`, auto-extract keywords, date=today, source=`execute`). Mark artifact `harvested: true`.
|
|
69
71
|
|
|
70
72
|
**Artifact registration**: For each plan executed, register in `state.json.artifacts[]`:
|
|
71
73
|
```jsonc
|
|
@@ -75,7 +77,7 @@ scratch/plan-{slug}-{date}/
|
|
|
75
77
|
"milestone": "{current_milestone or null}",
|
|
76
78
|
"phase": "{phase or null}",
|
|
77
79
|
"scope": "{inherited from plan}",
|
|
78
|
-
"path": "{same as plan path}",
|
|
80
|
+
"path": "{same as plan path}", // inherits plan directory name with scope prefix
|
|
79
81
|
"status": "completed",
|
|
80
82
|
"depends_on": "PLN-{NNN}",
|
|
81
83
|
"harvested": false,
|
|
@@ -96,6 +98,21 @@ If exit code is 1, present warnings and ask whether to proceed.
|
|
|
96
98
|
|
|
97
99
|
Follow '~/.maestro/workflows/execute.md' completely.
|
|
98
100
|
|
|
101
|
+
### Post-task Knowledge Inquiry
|
|
102
|
+
|
|
103
|
+
After each task completes, evaluate inquiry triggers:
|
|
104
|
+
|
|
105
|
+
1. **Execution deviation**: If task summary mentions approach change, dependency swap, or plan deviation:
|
|
106
|
+
→ Ask: "TASK-{NNN} deviated from the plan. Should this decision be recorded as an architecture constraint? (`/spec-add arch`)"
|
|
107
|
+
|
|
108
|
+
2. **Retry success**: If task required ≥2 retries before completion:
|
|
109
|
+
→ Ask: "TASK-{NNN} succeeded after {N} retries. Should this fix pattern be documented? (`/spec-add debug`)"
|
|
110
|
+
|
|
111
|
+
3. **Implicit knowledge**: If task summary contains design rationale ("chose X because", "rejected Y due to"):
|
|
112
|
+
→ Ask: "Design decision detected. Should it be recorded as a learning? (`/spec-add learning`)"
|
|
113
|
+
|
|
114
|
+
If user confirms, invoke `Skill({ skill: "spec-add", args: "<category> <content>" })` with extracted content.
|
|
115
|
+
|
|
99
116
|
### Issue Status Sync
|
|
100
117
|
|
|
101
118
|
On each task completion, if `task.issue_id` exists, sync status back to the issue in `.workflow/issues/issues.jsonl`:
|
|
@@ -42,6 +42,20 @@ Follow '~/.maestro/workflows/milestone-complete.md' completely.
|
|
|
42
42
|
5. Update state.json: advance to next milestone, clear artifacts[]
|
|
43
43
|
6. Clean scratch dirs
|
|
44
44
|
|
|
45
|
+
### Knowledge Promotion Inquiry
|
|
46
|
+
|
|
47
|
+
After learning extraction (step 4), scan `learnings.md` for promotion candidates:
|
|
48
|
+
|
|
49
|
+
1. **High-frequency pattern detection**: Scan all `<spec-entry category="learning">` entries for keyword overlap (≥2 entries sharing keywords):
|
|
50
|
+
→ Ask: "Keyword '{keyword}' appears in {N} learning entries. Should this be promoted to a formal coding convention? (`/spec-add coding`)"
|
|
51
|
+
|
|
52
|
+
2. **Convention drift detection**: Compare executed task summaries against `coding-conventions.md` and `architecture-constraints.md`:
|
|
53
|
+
→ Ask: "Were any established conventions bypassed during this milestone? Should conventions be updated?"
|
|
54
|
+
|
|
55
|
+
3. **Wiki island check**: Auto-trigger `wiki-connect --fix` to link newly extracted knowledge.
|
|
56
|
+
|
|
57
|
+
If user confirms promotion, invoke `Skill({ skill: "spec-add", args: "<category> <content>" })` with promoted content, preserving original date and source traceability.
|
|
58
|
+
|
|
45
59
|
**Next-step routing on completion:**
|
|
46
60
|
- Cut a release → `/maestro-milestone-release`
|
|
47
61
|
- Next milestone → `/maestro-analyze` or `/maestro-plan 1`
|
|
@@ -20,7 +20,7 @@ Supports three modes:
|
|
|
20
20
|
- **Revise** (`--revise`): Incrementally modify existing plan — edit tasks, adjust waves, add/remove tasks
|
|
21
21
|
- **Check** (`--check`): Standalone plan verification — run plan-checker against existing plan
|
|
22
22
|
|
|
23
|
-
All plan output goes to `.workflow/scratch/plan-{
|
|
23
|
+
All plan output goes to `.workflow/scratch/{YYYYMMDD}-plan-[P{N}-|M{N}-]{slug}/`. Date-first ordering enables chronological sorting. Scope prefix in directory name (`P{N}` for phase, `M{N}` for milestone, omit for adhoc/standalone) enables fallback identification. Registers PLN artifact in state.json. Performs collision detection against other plans in same milestone.
|
|
24
24
|
</purpose>
|
|
25
25
|
|
|
26
26
|
<required_reading>
|
|
@@ -60,11 +60,17 @@ $ARGUMENTS — phase number, or no args for milestone-wide planning, with option
|
|
|
60
60
|
- Reads `context.md` from prior analyze artifact (auto-discovered from state.json or via --dir)
|
|
61
61
|
- Reads `conclusions.json` if available (implementation_scope seeds task generation)
|
|
62
62
|
|
|
63
|
-
**Output directory
|
|
63
|
+
**Output directory** (relative to `.workflow/`):
|
|
64
|
+
|
|
65
|
+
| Scope | Directory format | Example |
|
|
66
|
+
|-------|-----------------|---------|
|
|
67
|
+
| Phase | `scratch/{YYYYMMDD}-plan-P{N}-{slug}/` | `20260420-plan-P1-auth` |
|
|
68
|
+
| Milestone | `scratch/{YYYYMMDD}-plan-M{N}-{slug}/` | `20260420-plan-M1-mvp` |
|
|
69
|
+
| Adhoc/Standalone | `scratch/{YYYYMMDD}-plan-{slug}/` | `20260420-plan-caching` |
|
|
64
70
|
|
|
65
71
|
**Output structure:**
|
|
66
72
|
```
|
|
67
|
-
|
|
73
|
+
{YYYYMMDD}-plan-P{N}-{slug}/
|
|
68
74
|
├── plan.json # summary, task_ids[], waves[] with phase labels
|
|
69
75
|
└── .task/
|
|
70
76
|
├── TASK-001.json # { phase: 1, phase_slug: "auth", ... }
|
|
@@ -82,7 +88,7 @@ scratch/plan-{slug}-{date}/
|
|
|
82
88
|
"milestone": "{current_milestone or null}",
|
|
83
89
|
"phase": "{phase_number or null}",
|
|
84
90
|
"scope": "{milestone|phase|adhoc|standalone}",
|
|
85
|
-
"path": "scratch/plan-{
|
|
91
|
+
"path": "scratch/{YYYYMMDD}-plan-P{N}-{slug}", // P{N} for phase, M{N} for milestone, omit for adhoc/standalone
|
|
86
92
|
"status": "completed",
|
|
87
93
|
"depends_on": "{ANL-NNN or null}",
|
|
88
94
|
"harvested": false,
|
|
@@ -143,8 +149,8 @@ Tasks: {task_count} tasks in {wave_count} waves
|
|
|
143
149
|
Check: {checker_status} (iteration {check_count}/{max_checks})
|
|
144
150
|
Collision: {collision_status}
|
|
145
151
|
|
|
146
|
-
Plan: {
|
|
147
|
-
Tasks: {
|
|
152
|
+
Plan: scratch/{YYYYMMDD}-plan-P{N}-{slug}/plan.json
|
|
153
|
+
Tasks: scratch/{YYYYMMDD}-plan-P{N}-{slug}/.task/TASK-*.json
|
|
148
154
|
|
|
149
155
|
Next steps:
|
|
150
156
|
/maestro-execute -- Execute the plan
|
|
@@ -152,7 +152,7 @@ Read-only health assessment of the current roadmap.
|
|
|
152
152
|
- **Risk assessment**: Identify phases at risk (blocked, scope creep, dependency failures)
|
|
153
153
|
|
|
154
154
|
3. **Produce review report**
|
|
155
|
-
- Write to `.workflow/scratch/roadmap-review
|
|
155
|
+
- Write to `.workflow/scratch/{YYYYMMDD}-roadmap-review.md`
|
|
156
156
|
- Format:
|
|
157
157
|
```
|
|
158
158
|
=== ROADMAP REVIEW ===
|
|
@@ -49,7 +49,7 @@ $ARGUMENTS — phase number for phase mode, topic text for scratch mode, with op
|
|
|
49
49
|
- Flags `--layouts N` and `--refine` are only effective with `ui-design.md` (full pipeline)
|
|
50
50
|
|
|
51
51
|
**Phase mode** (number): resolves phase directory, reads context.md/brainstorm for requirements.
|
|
52
|
-
**Scratch mode** (text): creates `.workflow/scratch/ui-design-{slug}
|
|
52
|
+
**Scratch mode** (text): creates `.workflow/scratch/{YYYYMMDD}-ui-design-{slug}/` for standalone exploration.
|
|
53
53
|
|
|
54
54
|
**Output artifacts (in phase or scratch directory):**
|
|
55
55
|
| Artifact | Description |
|
|
@@ -101,12 +101,12 @@ Stack: {stack}
|
|
|
101
101
|
Matrix: {S x L x T} = {total} prototypes
|
|
102
102
|
|
|
103
103
|
Design System:
|
|
104
|
-
MASTER.md: {
|
|
105
|
-
Tokens: {
|
|
106
|
-
Animation: {
|
|
107
|
-
Layout Templates: {
|
|
108
|
-
Prototypes: {
|
|
109
|
-
Compare: {
|
|
104
|
+
MASTER.md: {scratch_dir}/design-ref/MASTER.md
|
|
105
|
+
Tokens: {scratch_dir}/design-ref/design-tokens.json
|
|
106
|
+
Animation: {scratch_dir}/design-ref/animation-tokens.json
|
|
107
|
+
Layout Templates: {scratch_dir}/design-ref/layout-templates/
|
|
108
|
+
Prototypes: {scratch_dir}/design-ref/prototypes/
|
|
109
|
+
Compare: {scratch_dir}/design-ref/prototypes/compare.html
|
|
110
110
|
|
|
111
111
|
Next steps:
|
|
112
112
|
/maestro-plan {phase} -- Plan with design reference
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: maestro-update
|
|
3
|
+
description: Interactive workflow migration — detect version, preview changes, apply upgrades
|
|
4
|
+
argument-hint: "[--dry-run] [--force]"
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Edit
|
|
9
|
+
- Bash
|
|
10
|
+
- Glob
|
|
11
|
+
- Grep
|
|
12
|
+
- AskUserQuestion
|
|
13
|
+
---
|
|
14
|
+
<purpose>
|
|
15
|
+
Detect the current `.workflow/` schema version, show available migrations, and interactively apply them step-by-step. Uses a migration registry that supports incremental version upgrades (e.g., 1.0 → 2.0 → 3.0).
|
|
16
|
+
|
|
17
|
+
Each migration step is previewed before execution. The user confirms each step in a loop.
|
|
18
|
+
</purpose>
|
|
19
|
+
|
|
20
|
+
<context>
|
|
21
|
+
$ARGUMENTS — optional flags.
|
|
22
|
+
|
|
23
|
+
**Flags:**
|
|
24
|
+
- `--dry-run` -- Preview migration plan without executing
|
|
25
|
+
- `--force` -- Skip confirmation prompts (apply all pending migrations)
|
|
26
|
+
|
|
27
|
+
**Migration registry:** `src/migrations/`
|
|
28
|
+
- Each migration is a standalone file (e.g., `v1-to-v2.ts`) exporting a `MigrationDef`
|
|
29
|
+
- All migrations are registered via `src/migrations/index.ts`
|
|
30
|
+
- Registry auto-chains: detects current version → walks chain → applies in order
|
|
31
|
+
- To add a new migration: create `src/migrations/v{N}-to-v{N+1}.ts`, register in `index.ts`
|
|
32
|
+
|
|
33
|
+
**CLI runner:** `src/migrations/run.ts`
|
|
34
|
+
- Executable entrypoint: `npx tsx src/migrations/run.ts [root] [--dry-run] [--force] [--json]`
|
|
35
|
+
- Outputs JSON (with `--json`) or human-readable text
|
|
36
|
+
|
|
37
|
+
**State version source:** `.workflow/state.json` → `version` field
|
|
38
|
+
</context>
|
|
39
|
+
|
|
40
|
+
<execution>
|
|
41
|
+
|
|
42
|
+
### Step 1: Detect Current State
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
1. Read .workflow/state.json
|
|
46
|
+
2. Extract version field (default "1.0" if missing)
|
|
47
|
+
3. Display:
|
|
48
|
+
|
|
49
|
+
=== Maestro Workflow Update ===
|
|
50
|
+
Project: {project_name}
|
|
51
|
+
Version: {version}
|
|
52
|
+
Location: {.workflow/ path}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Step 2: Dry-Run Preview
|
|
56
|
+
|
|
57
|
+
Run the migration CLI in dry-run + JSON mode to get the full plan:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
npx tsx src/migrations/run.ts "$(pwd)" --dry-run --json
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Parse the JSON output. If status is `up-to-date`:
|
|
64
|
+
```
|
|
65
|
+
Already up to date (v{version})
|
|
66
|
+
```
|
|
67
|
+
→ EXIT
|
|
68
|
+
|
|
69
|
+
Otherwise display the migration plan:
|
|
70
|
+
```
|
|
71
|
+
Pending Migrations ({N} step(s)):
|
|
72
|
+
|
|
73
|
+
1. [v{from} → v{to}] {name}
|
|
74
|
+
{description}
|
|
75
|
+
|
|
76
|
+
2. [v{from} → v{to}] {name}
|
|
77
|
+
{description}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
If `--dry-run` flag was passed by user → display plan and EXIT.
|
|
81
|
+
|
|
82
|
+
### Step 3: Interactive Confirmation Loop
|
|
83
|
+
|
|
84
|
+
For each migration step (unless `--force`):
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
LOOP for step_index = 1 to N:
|
|
88
|
+
|
|
89
|
+
Display:
|
|
90
|
+
--- Step {step_index}/{N}: {name} ---
|
|
91
|
+
Version: v{from} → v{to}
|
|
92
|
+
|
|
93
|
+
Changes:
|
|
94
|
+
{description, indented}
|
|
95
|
+
|
|
96
|
+
IF NOT --force:
|
|
97
|
+
AskUserQuestion: "Apply this migration?"
|
|
98
|
+
Options: [yes / skip / abort]
|
|
99
|
+
|
|
100
|
+
- "yes" → proceed to Step 4 (execute)
|
|
101
|
+
- "skip" → WARN "Skipping may break the migration chain"
|
|
102
|
+
continue to next step
|
|
103
|
+
- "abort" → display summary of what was applied so far → EXIT
|
|
104
|
+
|
|
105
|
+
IF --force:
|
|
106
|
+
→ proceed to Step 4 (execute)
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### Step 4: Execute Single Migration
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
1. Create backup:
|
|
113
|
+
Bash: cp .workflow/state.json .workflow/state.json.backup-v{from}-{timestamp}
|
|
114
|
+
|
|
115
|
+
2. Run migration:
|
|
116
|
+
Bash: npx tsx src/migrations/run.ts "$(pwd)" --json
|
|
117
|
+
|
|
118
|
+
NOTE: The runner executes ALL pending migrations. For step-by-step control,
|
|
119
|
+
read state.json, call the migration function directly, or use the runner
|
|
120
|
+
which stops on first failure.
|
|
121
|
+
|
|
122
|
+
3. Parse result JSON and display:
|
|
123
|
+
|
|
124
|
+
{status_icon} Step {N} completed: {name}
|
|
125
|
+
Summary: {summary}
|
|
126
|
+
Changes:
|
|
127
|
+
- {change_1}
|
|
128
|
+
- {change_2}
|
|
129
|
+
- ...
|
|
130
|
+
|
|
131
|
+
4. If failed:
|
|
132
|
+
Display: "Migration failed: {summary}"
|
|
133
|
+
Display: "Backup available at: {backup_path}"
|
|
134
|
+
Display: "Restore with: cp {backup_path} .workflow/state.json"
|
|
135
|
+
→ EXIT
|
|
136
|
+
|
|
137
|
+
5. Continue loop to next step
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### Step 5: Summary
|
|
141
|
+
|
|
142
|
+
After all steps completed (or user aborted):
|
|
143
|
+
|
|
144
|
+
```
|
|
145
|
+
=== Migration Complete ===
|
|
146
|
+
Applied: {applied_count} / {total_count} migration(s)
|
|
147
|
+
Skipped: {skipped_count}
|
|
148
|
+
Version: v{original} → v{final}
|
|
149
|
+
Backup: .workflow/state.json.backup-v{original}-{timestamp}
|
|
150
|
+
|
|
151
|
+
Next steps:
|
|
152
|
+
/manage-status -- Verify project state
|
|
153
|
+
/maestro -- Continue workflow
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
</execution>
|
|
157
|
+
|
|
158
|
+
<error_codes>
|
|
159
|
+
| Code | Severity | Condition | Recovery |
|
|
160
|
+
|------|----------|-----------|----------|
|
|
161
|
+
| E001 | error | .workflow/state.json not found | Run /maestro-init first |
|
|
162
|
+
| E002 | error | state.json parse error | Check file for corruption |
|
|
163
|
+
| E003 | error | Migration function failed | Restore from backup |
|
|
164
|
+
| W001 | warning | Skipped migration may break version chain | Re-run /maestro-update later |
|
|
165
|
+
| W002 | warning | tsx not available | Install tsx: npm i -D tsx |
|
|
166
|
+
</error_codes>
|
|
167
|
+
|
|
168
|
+
<success_criteria>
|
|
169
|
+
- [ ] Current version detected from state.json
|
|
170
|
+
- [ ] Dry-run preview shows full migration plan without execution
|
|
171
|
+
- [ ] Each step confirmed interactively (unless --force)
|
|
172
|
+
- [ ] Backup created before each migration
|
|
173
|
+
- [ ] Migration executed and result displayed with change list
|
|
174
|
+
- [ ] Abort stops cleanly with partial summary
|
|
175
|
+
- [ ] Summary shows applied/skipped counts and version change
|
|
176
|
+
</success_criteria>
|
|
@@ -20,7 +20,7 @@ Verify execution results through three complementary methods:
|
|
|
20
20
|
|
|
21
21
|
Supports dual-level verification:
|
|
22
22
|
- **Single plan**: `verify --dir scratch/plan-xxx` — verifies one plan, writes `verification.json` into plan dir
|
|
23
|
-
- **Milestone**: `verify` (no args) — aggregates all execute artifacts for current milestone into `scratch/verify-{
|
|
23
|
+
- **Milestone**: `verify` (no args) — aggregates all execute artifacts for current milestone into `scratch/{YYYYMMDD}-verify-M{N}-{slug}/milestone-verification.json`
|
|
24
24
|
|
|
25
25
|
Registers VRF artifact in state.json on completion.
|
|
26
26
|
</purpose>
|
|
@@ -51,7 +51,7 @@ $ARGUMENTS — phase number or no args for milestone-wide, with optional flags.
|
|
|
51
51
|
| `verify --dir scratch/plan-xxx` | Single plan: verify specific plan directory |
|
|
52
52
|
|
|
53
53
|
**Single plan output**: `verification.json` appended to plan's scratch dir
|
|
54
|
-
**Milestone output**: `scratch/verify-{
|
|
54
|
+
**Milestone output**: `scratch/{YYYYMMDD}-verify-M{N}-{slug}/milestone-verification.json`
|
|
55
55
|
|
|
56
56
|
**Artifact registration**: On completion, register VRF artifact:
|
|
57
57
|
```jsonc
|
|
@@ -61,7 +61,7 @@ $ARGUMENTS — phase number or no args for milestone-wide, with optional flags.
|
|
|
61
61
|
"milestone": "{current_milestone or null}",
|
|
62
62
|
"phase": null,
|
|
63
63
|
"scope": "milestone",
|
|
64
|
-
"path": "scratch/verify-{
|
|
64
|
+
"path": "scratch/{YYYYMMDD}-verify-M{N}-{slug}", // M{N} = milestone number
|
|
65
65
|
"status": "completed",
|
|
66
66
|
"depends_on": ["EXC-001", "EXC-002", ...],
|
|
67
67
|
"harvested": false,
|
|
@@ -74,6 +74,21 @@ $ARGUMENTS — phase number or no args for milestone-wide, with optional flags.
|
|
|
74
74
|
<execution>
|
|
75
75
|
Follow '~/.maestro/workflows/verify.md' completely.
|
|
76
76
|
|
|
77
|
+
### Post-verify Knowledge Inquiry
|
|
78
|
+
|
|
79
|
+
After verification completes, evaluate inquiry triggers:
|
|
80
|
+
|
|
81
|
+
1. **Anti-pattern detection**: If anti-pattern scan found blockers (TODO/FIXME, stubs, empty returns):
|
|
82
|
+
→ Ask: "Verification found {N} anti-patterns. Should `quality-rules.md` be updated to enforce these checks? (`/spec-add quality`)"
|
|
83
|
+
|
|
84
|
+
2. **Constraint violation**: If Goal-Backward check found constraint_violations or missing wiring:
|
|
85
|
+
→ Ask: "Verification found architecture constraint violations. Should `architecture-constraints.md` be updated? (`/spec-add arch`)"
|
|
86
|
+
|
|
87
|
+
3. **Test coverage gaps**: If Nyquist gaps found with recurring pattern (same module/type across tasks):
|
|
88
|
+
→ Ask: "Persistent test coverage gap detected in {module}. Should it be added to `test-conventions.md` as a required test area? (`/spec-add test`)"
|
|
89
|
+
|
|
90
|
+
If user confirms, invoke `Skill({ skill: "spec-add", args: "<category> <content>" })`.
|
|
91
|
+
|
|
77
92
|
**Next-step routing on completion:**
|
|
78
93
|
- All checks pass, no gaps → /quality-review
|
|
79
94
|
- Gaps found (must-have failures or anti-pattern blockers) → /maestro-plan --gaps
|
|
@@ -70,7 +70,6 @@ Follow '~/.maestro/workflows/codebase-rebuild.md' completely.
|
|
|
70
70
|
- [ ] doc-index.json generated and valid
|
|
71
71
|
- [ ] All documentation files regenerated
|
|
72
72
|
- [ ] state.json updated with rebuild timestamp
|
|
73
|
-
- [ ] project-tech.json refreshed with detected tech stack
|
|
74
73
|
- [ ] project.md Tech Stack section updated if changes detected
|
|
75
74
|
- [ ] Next step routing: `/manage-status` or `/manage-codebase-refresh` for incremental updates later
|
|
76
75
|
</success_criteria>
|
|
@@ -76,7 +76,7 @@ Follow '~/.maestro/workflows/harvest.md' Stages 1–8 in order. Key invariants:
|
|
|
76
76
|
2. **Dedup before write** — Stage 7 (dedup_check) runs BEFORE each write in Stage 6. Check harvest-log.jsonl, wiki search, issues.jsonl, and learnings.md for existing matches.
|
|
77
77
|
3. **Stable fragment IDs** — `HRV-{8 hex}` from `hash(source_id + content_hash)` so re-runs on same artifacts do not create duplicates.
|
|
78
78
|
4. **Reuse existing routing infrastructure**:
|
|
79
|
-
- Wiki: `maestro wiki create --type <type> --slug harvest-<source_type>-<short_id>`
|
|
79
|
+
- Wiki: `maestro wiki create --type <type> --slug harvest-<source_type>-<short_id> --created-by manage-harvest --source-ref HRV-<fragment_id> --category <fragment_category>`
|
|
80
80
|
- Spec: `Skill({ skill: "spec-add", args: "<category> <content>" })`
|
|
81
81
|
- Issue: append to `issues.jsonl` matching canonical schema from `workflows/issue.md`
|
|
82
82
|
5. **Never modify source artifacts** — harvest is purely extractive. Source files remain untouched.
|