maestro-flow 0.3.45 → 0.3.47
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/agents/ui-design-agent.md +1 -0
- package/.claude/agents/workflow-executor.md +3 -0
- package/.claude/commands/learn-decompose.md +91 -146
- package/.claude/commands/learn-follow.md +102 -137
- package/.claude/commands/learn-investigate.md +102 -167
- package/.claude/commands/learn-retro.md +100 -243
- package/.claude/commands/learn-second-opinion.md +95 -135
- package/.claude/commands/maestro-amend.md +95 -232
- package/.claude/commands/maestro-analyze.md +1 -6
- package/.claude/commands/maestro-collab.md +104 -265
- package/.claude/commands/maestro-composer.md +113 -293
- package/.claude/commands/maestro-execute.md +11 -17
- package/.claude/commands/maestro-impeccable.md +89 -0
- package/.claude/commands/maestro-plan.md +1 -6
- package/.claude/commands/maestro-player.md +111 -340
- package/.claude/commands/maestro-quick.md +9 -0
- package/.claude/commands/maestro-ralph-execute.md +167 -210
- package/.claude/commands/maestro-ralph.md +245 -426
- package/.claude/commands/maestro-tools-register.md +28 -7
- package/.claude/commands/maestro-ui-codify.md +13 -0
- package/.claude/commands/maestro-ui-craft.md +364 -0
- package/.claude/commands/maestro-ui-design.md +12 -1
- package/.claude/commands/maestro-verify.md +12 -13
- package/.claude/commands/maestro.md +142 -72
- package/.claude/commands/manage-knowhow-capture.md +45 -161
- package/.claude/commands/quality-auto-test.md +9 -0
- package/.claude/commands/quality-debug.md +11 -24
- package/.claude/commands/quality-refactor.md +9 -0
- package/.claude/commands/quality-review.md +5 -13
- package/.claude/commands/quality-test.md +5 -0
- package/.claude/commands/spec-add.md +1 -1
- package/.claude/commands/spec-load.md +3 -2
- package/.claude/skills/maestro-help/SKILL.md +264 -0
- package/.claude/skills/maestro-help/index/catalog.json +182 -0
- package/.claude/skills/maestro-help/phases/01-parse-intent.md +122 -0
- package/.claude/skills/maestro-help/phases/02-search-present.md +181 -0
- package/.claude/skills/maestro-help/phases/03-workflow-guide.md +186 -0
- package/.claude/skills/maestro-impeccable/SKILL.md +169 -0
- package/.codex/agents/team-supervisor.toml +40 -0
- package/.codex/agents/team-worker.toml +63 -0
- package/.codex/skills/learn-decompose/SKILL.md +1 -1
- package/.codex/skills/learn-investigate/SKILL.md +2 -1
- package/.codex/skills/maestro/SKILL.md +278 -313
- package/.codex/skills/maestro-analyze/SKILL.md +126 -417
- package/.codex/skills/maestro-brainstorm/SKILL.md +129 -451
- package/.codex/skills/maestro-collab/SKILL.md +134 -547
- package/.codex/skills/maestro-execute/SKILL.md +4 -2
- package/.codex/skills/maestro-help/SKILL.md +213 -0
- package/.codex/skills/maestro-help/catalog.json +182 -0
- package/.codex/skills/maestro-impeccable/SKILL.md +112 -0
- package/.codex/skills/maestro-plan/SKILL.md +88 -437
- package/.codex/skills/maestro-player/SKILL.md +191 -333
- package/.codex/skills/maestro-quick/SKILL.md +2 -0
- package/.codex/skills/maestro-ralph/SKILL.md +307 -710
- package/.codex/skills/maestro-roadmap/SKILL.md +201 -518
- package/.codex/skills/maestro-tools-register/SKILL.md +29 -7
- package/.codex/skills/maestro-ui-codify/SKILL.md +1 -0
- package/.codex/skills/maestro-ui-craft/SKILL.md +341 -0
- package/.codex/skills/maestro-ui-design/SKILL.md +10 -0
- package/.codex/skills/maestro-verify/SKILL.md +116 -409
- package/.codex/skills/manage-knowhow-capture/SKILL.md +18 -3
- package/.codex/skills/quality-auto-test/SKILL.md +145 -443
- package/.codex/skills/quality-debug/SKILL.md +2 -1
- package/.codex/skills/quality-refactor/SKILL.md +1 -1
- package/.codex/skills/quality-review/SKILL.md +1 -1
- package/.codex/skills/quality-test/SKILL.md +229 -507
- package/.codex/skills/spec-add/SKILL.md +1 -1
- package/README.md +4 -1
- package/README.zh-CN.md +3 -1
- package/dashboard/dist-server/dashboard/src/server/agents/codex-cli-adapter.js +3 -0
- package/dashboard/dist-server/dashboard/src/server/agents/codex-cli-adapter.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/index.js +5 -3
- package/dashboard/dist-server/dashboard/src/server/index.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/board-state.integration.test.js +3 -3
- package/dashboard/dist-server/dashboard/src/server/routes/board-state.integration.test.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/index.js +14 -5
- package/dashboard/dist-server/dashboard/src/server/routes/index.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/install.js +110 -1
- package/dashboard/dist-server/dashboard/src/server/routes/install.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/maestro-coordinate.d.ts +2 -0
- package/dashboard/dist-server/dashboard/src/server/routes/maestro-coordinate.js +181 -0
- package/dashboard/dist-server/dashboard/src/server/routes/maestro-coordinate.js.map +1 -0
- package/dashboard/dist-server/dashboard/src/server/routes/settings.js +56 -0
- package/dashboard/dist-server/dashboard/src/server/routes/settings.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/wiki.js +2 -0
- package/dashboard/dist-server/dashboard/src/server/routes/wiki.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/state/event-bus.d.ts +2 -0
- package/dashboard/dist-server/dashboard/src/server/state/event-bus.js +2 -0
- package/dashboard/dist-server/dashboard/src/server/state/event-bus.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/state/fs-watcher.d.ts +2 -0
- package/dashboard/dist-server/dashboard/src/server/state/fs-watcher.js +58 -0
- package/dashboard/dist-server/dashboard/src/server/state/fs-watcher.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/spec-entry-parser.js +2 -2
- package/dashboard/dist-server/dashboard/src/server/wiki/spec-entry-parser.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js +2 -0
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-types.d.ts +3 -1
- package/dashboard/dist-server/dashboard/src/server/ws/handlers/agent-handler.d.ts +7 -2
- package/dashboard/dist-server/dashboard/src/server/ws/handlers/agent-handler.js +7 -1
- package/dashboard/dist-server/dashboard/src/server/ws/handlers/agent-handler.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/shared/constants.d.ts +2 -0
- package/dashboard/dist-server/dashboard/src/shared/constants.js +9 -9
- package/dashboard/dist-server/dashboard/src/shared/constants.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/shared/maestro-session-types.d.ts +113 -0
- package/dashboard/dist-server/dashboard/src/shared/maestro-session-types.js +6 -0
- package/dashboard/dist-server/dashboard/src/shared/maestro-session-types.js.map +1 -0
- package/dashboard/dist-server/dashboard/src/shared/types.d.ts +4 -3
- package/dashboard/dist-server/dashboard/src/shared/ws-protocol.d.ts +1 -1
- package/dashboard/dist-server/dashboard/src/shared/ws-protocol.js.map +1 -1
- package/dist/src/agents/cli-agent-runner.d.ts.map +1 -1
- package/dist/src/agents/cli-agent-runner.js +1 -3
- package/dist/src/agents/cli-agent-runner.js.map +1 -1
- package/dist/src/agents/cli-history-store.d.ts +5 -0
- package/dist/src/agents/cli-history-store.d.ts.map +1 -1
- package/dist/src/agents/cli-history-store.js +65 -13
- package/dist/src/agents/cli-history-store.js.map +1 -1
- package/dist/src/cli.js +13 -0
- package/dist/src/cli.js.map +1 -1
- package/dist/src/commands/command-help.d.ts +3 -0
- package/dist/src/commands/command-help.d.ts.map +1 -0
- package/dist/src/commands/command-help.js +60 -0
- package/dist/src/commands/command-help.js.map +1 -0
- package/dist/src/commands/config.d.ts.map +1 -1
- package/dist/src/commands/config.js +17 -0
- package/dist/src/commands/config.js.map +1 -1
- package/dist/src/commands/delegate.d.ts.map +1 -1
- package/dist/src/commands/delegate.js +12 -2
- package/dist/src/commands/delegate.js.map +1 -1
- package/dist/src/commands/impeccable.d.ts +10 -0
- package/dist/src/commands/impeccable.d.ts.map +1 -0
- package/dist/src/commands/impeccable.js +181 -0
- package/dist/src/commands/impeccable.js.map +1 -0
- package/dist/src/commands/knowhow.d.ts.map +1 -1
- package/dist/src/commands/knowhow.js +7 -4
- package/dist/src/commands/knowhow.js.map +1 -1
- package/dist/src/commands/spec.js +1 -1
- package/dist/src/commands/spec.js.map +1 -1
- package/dist/src/commands/wiki.d.ts.map +1 -1
- package/dist/src/commands/wiki.js +5 -1
- package/dist/src/commands/wiki.js.map +1 -1
- package/dist/src/config/cli-tools-config.d.ts.map +1 -1
- package/dist/src/config/cli-tools-config.js +10 -7
- package/dist/src/config/cli-tools-config.js.map +1 -1
- package/dist/src/core/addon-registry.d.ts +31 -0
- package/dist/src/core/addon-registry.d.ts.map +1 -0
- package/dist/src/core/addon-registry.js +28 -0
- package/dist/src/core/addon-registry.js.map +1 -0
- package/dist/src/hooks/plugins/spec-injection-plugin.js +9 -4
- package/dist/src/hooks/plugins/spec-injection-plugin.js.map +1 -1
- package/dist/src/hooks/spec-injector.js +2 -2
- package/dist/src/hooks/spec-injector.js.map +1 -1
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/tools/impeccable/critique-storage.d.ts +28 -0
- package/dist/src/tools/impeccable/critique-storage.d.ts.map +1 -0
- package/dist/src/tools/impeccable/critique-storage.js +120 -0
- package/dist/src/tools/impeccable/critique-storage.js.map +1 -0
- package/dist/src/tools/impeccable/design-parser.d.ts +90 -0
- package/dist/src/tools/impeccable/design-parser.d.ts.map +1 -0
- package/dist/src/tools/impeccable/design-parser.js +696 -0
- package/dist/src/tools/impeccable/design-parser.js.map +1 -0
- package/dist/src/tools/impeccable/detect-csp.d.ts +6 -0
- package/dist/src/tools/impeccable/detect-csp.d.ts.map +1 -0
- package/dist/src/tools/impeccable/detect-csp.js +130 -0
- package/dist/src/tools/impeccable/detect-csp.js.map +1 -0
- package/dist/src/tools/impeccable/is-generated.d.ts +4 -0
- package/dist/src/tools/impeccable/is-generated.d.ts.map +1 -0
- package/dist/src/tools/impeccable/is-generated.js +56 -0
- package/dist/src/tools/impeccable/is-generated.js.map +1 -0
- package/dist/src/tools/impeccable/live/accept.d.ts +50 -0
- package/dist/src/tools/impeccable/live/accept.d.ts.map +1 -0
- package/dist/src/tools/impeccable/live/accept.js +556 -0
- package/dist/src/tools/impeccable/live/accept.js.map +1 -0
- package/dist/src/tools/impeccable/live/bootstrap.d.ts +2 -0
- package/dist/src/tools/impeccable/live/bootstrap.d.ts.map +1 -0
- package/dist/src/tools/impeccable/live/bootstrap.js +244 -0
- package/dist/src/tools/impeccable/live/bootstrap.js.map +1 -0
- package/dist/src/tools/impeccable/live/complete.d.ts +7 -0
- package/dist/src/tools/impeccable/live/complete.d.ts.map +1 -0
- package/dist/src/tools/impeccable/live/complete.js +67 -0
- package/dist/src/tools/impeccable/live/complete.js.map +1 -0
- package/dist/src/tools/impeccable/live/completion.d.ts +24 -0
- package/dist/src/tools/impeccable/live/completion.d.ts.map +1 -0
- package/dist/src/tools/impeccable/live/completion.js +26 -0
- package/dist/src/tools/impeccable/live/completion.js.map +1 -0
- package/dist/src/tools/impeccable/live/inject.d.ts +41 -0
- package/dist/src/tools/impeccable/live/inject.d.ts.map +1 -0
- package/dist/src/tools/impeccable/live/inject.js +394 -0
- package/dist/src/tools/impeccable/live/inject.js.map +1 -0
- package/dist/src/tools/impeccable/live/poll.d.ts +24 -0
- package/dist/src/tools/impeccable/live/poll.d.ts.map +1 -0
- package/dist/src/tools/impeccable/live/poll.js +180 -0
- package/dist/src/tools/impeccable/live/poll.js.map +1 -0
- package/dist/src/tools/impeccable/live/resume.d.ts +5 -0
- package/dist/src/tools/impeccable/live/resume.d.ts.map +1 -0
- package/dist/src/tools/impeccable/live/resume.js +30 -0
- package/dist/src/tools/impeccable/live/resume.js.map +1 -0
- package/dist/src/tools/impeccable/live/server.d.ts +6 -0
- package/dist/src/tools/impeccable/live/server.d.ts.map +1 -0
- package/dist/src/tools/impeccable/live/server.js +867 -0
- package/dist/src/tools/impeccable/live/server.js.map +1 -0
- package/dist/src/tools/impeccable/live/session-store.d.ts +72 -0
- package/dist/src/tools/impeccable/live/session-store.d.ts.map +1 -0
- package/dist/src/tools/impeccable/live/session-store.js +281 -0
- package/dist/src/tools/impeccable/live/session-store.js.map +1 -0
- package/dist/src/tools/impeccable/live/static/live-browser-session.js +123 -0
- package/dist/src/tools/impeccable/live/static/live-browser.js +4860 -0
- package/dist/src/tools/impeccable/live/static/modern-screenshot.umd.js +14 -0
- package/dist/src/tools/impeccable/live/status.d.ts +2 -0
- package/dist/src/tools/impeccable/live/status.d.ts.map +1 -0
- package/dist/src/tools/impeccable/live/status.js +52 -0
- package/dist/src/tools/impeccable/live/status.js.map +1 -0
- package/dist/src/tools/impeccable/live/wrap.d.ts +33 -0
- package/dist/src/tools/impeccable/live/wrap.d.ts.map +1 -0
- package/dist/src/tools/impeccable/live/wrap.js +572 -0
- package/dist/src/tools/impeccable/live/wrap.js.map +1 -0
- package/dist/src/tools/impeccable/load-context.d.ts +13 -0
- package/dist/src/tools/impeccable/load-context.d.ts.map +1 -0
- package/dist/src/tools/impeccable/load-context.js +79 -0
- package/dist/src/tools/impeccable/load-context.js.map +1 -0
- package/dist/src/tools/impeccable/paths.d.ts +34 -0
- package/dist/src/tools/impeccable/paths.d.ts.map +1 -0
- package/dist/src/tools/impeccable/paths.js +102 -0
- package/dist/src/tools/impeccable/paths.js.map +1 -0
- package/dist/src/tools/spec-entry-parser.d.ts +1 -1
- package/dist/src/tools/spec-entry-parser.d.ts.map +1 -1
- package/dist/src/tools/spec-entry-parser.js +1 -1
- package/dist/src/tools/spec-entry-parser.js.map +1 -1
- package/dist/src/tools/spec-init.d.ts.map +1 -1
- package/dist/src/tools/spec-init.js +26 -1
- package/dist/src/tools/spec-init.js.map +1 -1
- package/dist/src/tools/spec-loader.d.ts +1 -1
- package/dist/src/tools/spec-loader.d.ts.map +1 -1
- package/dist/src/tools/spec-loader.js +2 -0
- package/dist/src/tools/spec-loader.js.map +1 -1
- package/dist/src/tools/store-knowhow.d.ts.map +1 -1
- package/dist/src/tools/store-knowhow.js +15 -6
- package/dist/src/tools/store-knowhow.js.map +1 -1
- package/package.json +5 -3
- package/workflows/claude-instructions.md +17 -5
- package/workflows/cli-tools-usage.md +10 -3
- package/workflows/delegate-usage.md +3 -2
- package/workflows/impeccable/adapt.md +190 -0
- package/workflows/impeccable/animate.md +175 -0
- package/workflows/impeccable/audit.md +133 -0
- package/workflows/impeccable/bolder.md +113 -0
- package/workflows/impeccable/brand.md +118 -0
- package/workflows/impeccable/clarify.md +174 -0
- package/workflows/impeccable/codex.md +105 -0
- package/workflows/impeccable/cognitive-load.md +106 -0
- package/workflows/impeccable/color-and-contrast.md +105 -0
- package/workflows/impeccable/colorize.md +154 -0
- package/workflows/impeccable/craft.md +123 -0
- package/workflows/impeccable/critique.md +261 -0
- package/workflows/impeccable/delight.md +302 -0
- package/workflows/impeccable/distill.md +111 -0
- package/workflows/impeccable/document.md +439 -0
- package/workflows/impeccable/extract.md +69 -0
- package/workflows/impeccable/harden.md +347 -0
- package/workflows/impeccable/heuristics-scoring.md +234 -0
- package/workflows/impeccable/interaction-design.md +195 -0
- package/workflows/impeccable/layout.md +141 -0
- package/workflows/impeccable/live.md +622 -0
- package/workflows/impeccable/motion-design.md +109 -0
- package/workflows/impeccable/onboard.md +234 -0
- package/workflows/impeccable/optimize.md +258 -0
- package/workflows/impeccable/overdrive.md +130 -0
- package/workflows/impeccable/personas.md +179 -0
- package/workflows/impeccable/polish.md +242 -0
- package/workflows/impeccable/product.md +62 -0
- package/workflows/impeccable/quieter.md +99 -0
- package/workflows/impeccable/responsive-design.md +114 -0
- package/workflows/impeccable/shape.md +165 -0
- package/workflows/impeccable/spatial-design.md +100 -0
- package/workflows/impeccable/teach.md +168 -0
- package/workflows/impeccable/typeset.md +124 -0
- package/workflows/impeccable/typography.md +159 -0
- package/workflows/impeccable/ux-writing.md +107 -0
- package/workflows/impeccable.md +164 -0
- package/workflows/maestro.md +7 -3
- package/workflows/skill-authoring.md +265 -0
- package/workflows/specs-add.md +3 -2
- package/workflows/specs-load.md +2 -1
- package/workflows/specs-setup.md +21 -1
- package/workflows/tools-spec.md +20 -13
- package/.claude/commands/maestro-link-coordinate.md +0 -71
- package/.codex/skills/maestro-link-coordinate/SKILL.md +0 -257
|
@@ -6,486 +6,195 @@ allowed-tools: spawn_agents_on_csv, Read, Write, Edit, Bash, Glob, Grep, AskUser
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
<purpose>
|
|
9
|
-
Wave-based multi-dimensional analysis using `spawn_agents_on_csv`. Diamond topology:
|
|
10
|
-
|
|
11
|
-
**Core workflow**: Parse Subject -> CLI Exploration -> 6-Dimension Scoring -> Decision Synthesis
|
|
12
|
-
|
|
13
|
-
**Tri-depth**: Full mode (all 3 waves), Quick mode (`-q`, Wave 3 only), or Gaps mode (`--gaps`, issue root cause analysis pipeline).
|
|
14
|
-
|
|
15
|
-
```
|
|
16
|
-
+---------------------------------------------------------------------------+
|
|
17
|
-
| ANALYZE CSV WAVE WORKFLOW |
|
|
18
|
-
+---------------------------------------------------------------------------+
|
|
19
|
-
| |
|
|
20
|
-
| Phase 1: Subject Resolution -> CSV |
|
|
21
|
-
| +-- Parse phase number or topic text from arguments |
|
|
22
|
-
| +-- Detect mode (phase / scratch) and depth (full / quick) |
|
|
23
|
-
| +-- Resolve output directory |
|
|
24
|
-
| +-- Load prior context (project.md, roadmap, brainstorm artifacts) |
|
|
25
|
-
| +-- Select dimensions and perspectives (interactive or auto) |
|
|
26
|
-
| +-- Generate tasks.csv with exploration + scoring + synthesis rows |
|
|
27
|
-
| +-- User validates dimension breakdown (skip if -y) |
|
|
28
|
-
| |
|
|
29
|
-
| Phase 2: Wave Execution Engine |
|
|
30
|
-
| +-- Wave 1: CLI Exploration (parallel) [SKIP in -q mode] |
|
|
31
|
-
| | +-- Each agent explores codebase for a specific dimension |
|
|
32
|
-
| | +-- 3-layer exploration: module discovery, structure tracing, |
|
|
33
|
-
| | | code anchor extraction |
|
|
34
|
-
| | +-- Discoveries shared via board (code patterns, tech stack) |
|
|
35
|
-
| | +-- Results: findings + relevant file paths per dimension |
|
|
36
|
-
| +-- Wave 2: 6-Dimension Scoring (parallel) [SKIP in -q mode] |
|
|
37
|
-
| | +-- Each agent scores one dimension (1-5) with evidence |
|
|
38
|
-
| | +-- Receives exploration findings via prev_context |
|
|
39
|
-
| | +-- Discoveries shared via board (risks, alternatives) |
|
|
40
|
-
| | +-- Results: score + recommendations per dimension |
|
|
41
|
-
| +-- Wave 3: Decision Synthesis (single agent) |
|
|
42
|
-
| | +-- Compile all scores into analysis.md |
|
|
43
|
-
| | +-- Identify gray areas, generate Locked/Free/Deferred decisions |
|
|
44
|
-
| | +-- Build context.md for downstream plan |
|
|
45
|
-
| | +-- Go/No-Go recommendation with confidence level |
|
|
46
|
-
| +-- discoveries.ndjson shared across all waves (append-only) |
|
|
47
|
-
| |
|
|
48
|
-
| Phase 3: Results Aggregation |
|
|
49
|
-
| +-- Export results.csv + analysis.md + context.md |
|
|
50
|
-
| +-- Generate conclusions.json with decision trail |
|
|
51
|
-
| +-- Auto-create issues for deferred items |
|
|
52
|
-
| +-- Update phase index.json with analysis status |
|
|
53
|
-
| +-- Display summary with verdict + next steps |
|
|
54
|
-
| |
|
|
55
|
-
+---------------------------------------------------------------------------+
|
|
56
|
-
```
|
|
9
|
+
Wave-based multi-dimensional analysis using `spawn_agents_on_csv`. Diamond topology:
|
|
10
|
+
Wave 1 (CLI exploration, parallel) -> Wave 2 (6-dimension scoring, parallel) -> Wave 3 (decision synthesis).
|
|
57
11
|
|
|
12
|
+
**Tri-depth**: Full mode (all 3 waves), Quick mode (`-q`, Wave 3 only), Gaps mode (`--gaps`, issue root cause pipeline).
|
|
58
13
|
</purpose>
|
|
59
14
|
|
|
60
15
|
<context>
|
|
61
|
-
|
|
62
|
-
$maestro-analyze "3"
|
|
63
|
-
$maestro-analyze -y "microservices vs monolith"
|
|
64
|
-
$maestro-analyze -c 6 "3 -q"
|
|
65
|
-
$maestro-analyze --continue "20260318-analyze-microservices"
|
|
66
|
-
```
|
|
16
|
+
$ARGUMENTS -- phase number, topic text, and optional flags.
|
|
67
17
|
|
|
68
18
|
**Flags**:
|
|
69
19
|
- `-y, --yes`: Skip all confirmations (auto mode)
|
|
70
|
-
- `-c, --concurrency N`: Max concurrent agents
|
|
20
|
+
- `-c, --concurrency N`: Max concurrent agents per wave (default: 6)
|
|
71
21
|
- `--continue`: Resume existing session
|
|
72
|
-
- `-q, --quick`:
|
|
73
|
-
- `--gaps [ISS-ID]`: Issue root cause analysis
|
|
74
|
-
|
|
75
|
-
When `--yes` or `-y`: Auto-confirm dimension selection, skip interactive scoping, use defaults for perspectives and depth, auto-deepen for up to 3 rounds.
|
|
22
|
+
- `-q, --quick`: Skip exploration + scoring, Wave 3 only
|
|
23
|
+
- `--gaps [ISS-ID]`: Issue root cause analysis. If ISS-ID: single issue. If omitted: all open/registered from issues.jsonl.
|
|
76
24
|
|
|
77
|
-
**
|
|
78
|
-
**
|
|
25
|
+
**Session**: `.workflow/.csv-wave/{YYYYMMDD}-analyze-{slug}/`
|
|
26
|
+
**Output**: tasks.csv, results.csv, discoveries.ndjson, context.md (all modes), analysis.md + conclusions.json (full mode only)
|
|
79
27
|
</context>
|
|
80
28
|
|
|
81
29
|
<csv_schema>
|
|
82
30
|
|
|
83
|
-
### tasks.csv
|
|
31
|
+
### tasks.csv
|
|
84
32
|
|
|
85
33
|
```csv
|
|
86
34
|
id,title,description,dimension,analysis_type,deps,context_from,wave,status,findings,score,recommendations,error
|
|
87
|
-
"1","Explore: Architecture","Explore codebase for architecture
|
|
88
|
-
"2","Explore: Implementation","Explore codebase for implementation patterns: code structure, error handling,
|
|
89
|
-
"3","Explore: Performance","Explore codebase for performance
|
|
90
|
-
"4","Score: Feasibility","Score feasibility (0-100)
|
|
91
|
-
"5","Score: Impact","Score impact (0-100)
|
|
92
|
-
"6","Score: Risk","Score risk (0-100)
|
|
93
|
-
"7","Score: Complexity","Score complexity (0-100)
|
|
94
|
-
"8","Score: Alignment","Score alignment (0-100)
|
|
95
|
-
"9","Score: Maintainability","Score maintainability (0-100)
|
|
96
|
-
"10","Decision Synthesis","Compile
|
|
35
|
+
"1","Explore: Architecture","Explore codebase for architecture patterns: module boundaries, dependency graph, design patterns. 3-layer: module discovery, structure tracing, code anchor extraction.","architecture","explore","","","1","","","","",""
|
|
36
|
+
"2","Explore: Implementation","Explore codebase for implementation patterns: code structure, error handling, type safety. Extract code anchors with file:line.","implementation","explore","","","1","","","","",""
|
|
37
|
+
"3","Explore: Performance","Explore codebase for performance: hot paths, resource utilization, concurrency, bottlenecks.","performance","explore","","","1","","","","",""
|
|
38
|
+
"4","Score: Feasibility","Score feasibility (0-100): technical difficulty, team capability, time estimate, tooling.","feasibility","score","1;2;3","1;2;3","2","","","","",""
|
|
39
|
+
"5","Score: Impact","Score impact (0-100): user value, business value, tech debt reduction, DX.","impact","score","1;2;3","1;2;3","2","","","","",""
|
|
40
|
+
"6","Score: Risk","Score risk (0-100): failure modes, security, scalability, regression.","risk","score","1;2;3","1;2;3","2","","","","",""
|
|
41
|
+
"7","Score: Complexity","Score complexity (0-100): integration points, dependencies, learning curve, testing.","complexity","score","1;2;3","1;2;3","2","","","","",""
|
|
42
|
+
"8","Score: Alignment","Score alignment (0-100): project vision, roadmap consistency, architecture principles.","alignment","score","1;2;3","1;2;3","2","","","","",""
|
|
43
|
+
"9","Score: Maintainability","Score maintainability (0-100): code clarity, docs, test coverage, refactoring safety.","maintainability","score","1;2;3","1;2;3","2","","","","",""
|
|
44
|
+
"10","Decision Synthesis","Compile scores into analysis.md. Gray areas. Locked/Free/Deferred decisions for context.md. Go/No-Go + conclusions.json.","synthesis","decide","4;5;6;7;8;9","4;5;6;7;8;9","3","","","","",""
|
|
97
45
|
```
|
|
98
46
|
|
|
99
|
-
**
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|--------|-------|-------------|
|
|
103
|
-
| `id` | Input | Unique task identifier (string) |
|
|
104
|
-
| `title` | Input | Short task title |
|
|
105
|
-
| `description` | Input | Detailed analysis instructions for this task |
|
|
106
|
-
| `dimension` | Input | Analysis dimension: architecture/implementation/performance/feasibility/impact/risk/complexity/alignment/maintainability/synthesis |
|
|
107
|
-
| `analysis_type` | Input | Task type: explore/score/decide |
|
|
108
|
-
| `deps` | Input | Semicolon-separated dependency task IDs |
|
|
109
|
-
| `context_from` | Input | Semicolon-separated task IDs whose findings this task needs |
|
|
110
|
-
| `wave` | Computed | Wave number (1 = explore, 2 = score, 3 = decide) |
|
|
111
|
-
| `status` | Output | `pending` -> `completed` / `failed` / `skipped` |
|
|
112
|
-
| `findings` | Output | Key findings summary (max 500 chars) |
|
|
113
|
-
| `score` | Output | Dimension score (0-100 for scoring tasks, empty for explore/decide) |
|
|
114
|
-
| `recommendations` | Output | Dimension-specific recommendations |
|
|
115
|
-
| `confidence_score` | Output | Per-dimension confidence score (0-100) from factor-based assessment |
|
|
116
|
-
| `error` | Output | Error message if failed |
|
|
117
|
-
|
|
118
|
-
### Per-Wave CSV (Temporary)
|
|
119
|
-
|
|
120
|
-
Each wave generates `wave-{N}.csv` with extra `prev_context` column.
|
|
121
|
-
|
|
122
|
-
### Output Artifacts
|
|
123
|
-
|
|
124
|
-
| File | Purpose | Lifecycle |
|
|
125
|
-
|------|---------|-----------|
|
|
126
|
-
| `tasks.csv` | Master state -- all tasks with status/findings | Updated after each wave |
|
|
127
|
-
| `wave-{N}.csv` | Per-wave input (temporary) | Created before wave, deleted after |
|
|
128
|
-
| `results.csv` | Final export of all task results | Created in Phase 3 |
|
|
129
|
-
| `discoveries.ndjson` | Shared exploration board | Append-only, carries across waves |
|
|
130
|
-
| `context.md` | Locked/Free/Deferred decisions for downstream plan | Created in Phase 3 |
|
|
131
|
-
| `analysis.md` | 6-dimension scoring summary + risk matrix + Go/No-Go | Created in Phase 3 (full mode only) |
|
|
132
|
-
| `conclusions.json` | Structured conclusions with decision trail | Created in Phase 3 (full mode only) |
|
|
133
|
-
|
|
134
|
-
### Session Structure
|
|
47
|
+
**Column semantics**:
|
|
48
|
+
- Input: id (unique string), title, description (detailed agent instructions), dimension (architecture/implementation/performance/feasibility/impact/risk/complexity/alignment/maintainability/synthesis), analysis_type (explore/score/decide), deps (semicolon-sep task IDs), context_from (IDs whose findings this task needs), wave (1=explore, 2=score, 3=decide)
|
|
49
|
+
- Output: status (pending->completed/failed/skipped), findings (key summary, max 500 chars), score (0-100 for scoring tasks, empty for explore/decide), recommendations, confidence_score (0-100 per dimension), error
|
|
135
50
|
|
|
136
|
-
|
|
137
|
-
.
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
+-- discoveries.ndjson
|
|
141
|
-
+-- context.md
|
|
142
|
-
+-- analysis.md
|
|
143
|
-
+-- conclusions.json
|
|
144
|
-
+-- wave-{N}.csv (temporary)
|
|
145
|
-
```
|
|
51
|
+
Wave 1: N exploration rows (parallel). Wave 2: 6 scoring rows (parallel). Wave 3: 1 synthesis row.
|
|
52
|
+
Quick mode: 1 synthesis row only. Gaps mode: 1 row per issue (W1) + 1 per group (W2).
|
|
53
|
+
|
|
54
|
+
Available exploration dimensions: architecture, implementation, performance, security, concept, comparison, decision, external_research.
|
|
146
55
|
</csv_schema>
|
|
147
56
|
|
|
148
57
|
<invariants>
|
|
149
|
-
1. **
|
|
150
|
-
2. **
|
|
151
|
-
3. **
|
|
152
|
-
4. **
|
|
153
|
-
5. **
|
|
154
|
-
6. **
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
8. **Cleanup Temp Files**: Remove wave-{N}.csv after results are merged
|
|
158
|
-
9. **DO NOT STOP**: Continuous execution until all waves complete
|
|
159
|
-
10. **Tri-Output**: context.md is ALWAYS produced (all modes). analysis.md + conclusions.json are full-mode only. Gaps mode writes analysis records to issues.jsonl + context.md for plan --gaps.
|
|
58
|
+
1. **Wave order sacred**: Never execute wave N+1 before wave N completes
|
|
59
|
+
2. **CSV is source of truth**: Master tasks.csv holds all state
|
|
60
|
+
3. **Context propagation**: prev_context from master CSV, not memory
|
|
61
|
+
4. **Discovery board append-only**: Never modify/delete discoveries.ndjson
|
|
62
|
+
5. **Quick mode shortcut**: -q generates only wave 3 task
|
|
63
|
+
6. **Gaps mode pipeline**: --gaps follows: Load issues from issues.jsonl -> Classify & group by location/component -> CSV gen (W1: 1 explore row per issue, W2: 1 synthesis per group) -> Execute waves -> Write issue.analysis record per issue -> Append history `{ action: "analyzed", at: <ISO>, by: "maestro-analyze --gaps" }` -> Output context.md for plan --gaps
|
|
64
|
+
7. **Graceful degradation**: Missing exploration reduces scoring quality; missing scoring reduces synthesis quality
|
|
65
|
+
8. **Tri-output**: context.md always. analysis.md + conclusions.json full-mode only. Gaps mode writes to issues.jsonl + context.md
|
|
160
66
|
</invariants>
|
|
161
67
|
|
|
162
|
-
<
|
|
163
|
-
|
|
164
|
-
### Session Initialization
|
|
68
|
+
<state_machine>
|
|
165
69
|
|
|
166
|
-
|
|
70
|
+
<states>
|
|
71
|
+
S_PARSE -- 解析参数、确定 scope/depth/mode PERSIST: --
|
|
72
|
+
S_CONTEXT -- 加载先验上下文(project/roadmap/specs) PERSIST: --
|
|
73
|
+
S_CSV_GEN -- 生成 tasks.csv PERSIST: tasks.csv
|
|
74
|
+
S_WAVE_1 -- CLI Exploration (parallel spawn) PERSIST: per-dimension findings + tasks.csv
|
|
75
|
+
S_WAVE_2 -- 6-Dimension Scoring (parallel spawn) PERSIST: scores + tasks.csv
|
|
76
|
+
S_WAVE_3 -- Decision Synthesis (single agent spawn) PERSIST: context.md + analysis.md + conclusions.json
|
|
77
|
+
S_AGGREGATE -- 注册 artifact、输出摘要 PERSIST: state.json + results.csv
|
|
78
|
+
</states>
|
|
167
79
|
|
|
168
|
-
|
|
169
|
-
|----------|--------|---------|
|
|
170
|
-
| `AUTO_YES` | `--yes` or `-y` | false |
|
|
171
|
-
| `continueMode` | `--continue` | false |
|
|
172
|
-
| `maxConcurrency` | `--concurrency N` or `-c N` | 6 |
|
|
173
|
-
| `QUICK_MODE` | `-q` or `--quick` | false |
|
|
174
|
-
| `GAPS_MODE` | `--gaps` | false |
|
|
175
|
-
| `gapsIssueId` | `--gaps ISS-{id}` | null |
|
|
176
|
-
| `subjectArg` | remaining text after flag removal | "" |
|
|
80
|
+
<transitions>
|
|
177
81
|
|
|
178
|
-
|
|
82
|
+
S_PARSE:
|
|
83
|
+
-> S_CONTEXT WHEN: scope resolved (milestone/phase/adhoc/standalone/gaps)
|
|
84
|
+
-> ERROR(E001) WHEN: no args and no roadmap
|
|
179
85
|
|
|
180
|
-
**Scope
|
|
86
|
+
**Scope routing**:
|
|
87
|
+
| Condition | Scope | Slug |
|
|
88
|
+
|-----------|-------|------|
|
|
89
|
+
| --gaps flag | gaps | ISS-ID slugified or "issue-gaps" |
|
|
90
|
+
| Empty subject + milestone + roadmap | milestone | milestone name slugified |
|
|
91
|
+
| Empty subject, no roadmap | ERROR E001 | -- |
|
|
92
|
+
| Numeric + milestone + roadmap | phase | phase slug from roadmap |
|
|
93
|
+
| Text subject + milestone | adhoc | subject slugified (max 40) |
|
|
94
|
+
| Text subject, no milestone | standalone | subject slugified (max 40) |
|
|
181
95
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
| `GAPS_MODE` | `gaps` | `gapsIssueId` slugified or `"issue-gaps"` |
|
|
185
|
-
| Empty subject + milestone + roadmap | `milestone` | milestone name slugified |
|
|
186
|
-
| Empty subject, no roadmap | ERROR: `"E001: No args and no roadmap"` | — |
|
|
187
|
-
| Numeric subject + milestone + roadmap | `phase` | phase slug from roadmap |
|
|
188
|
-
| Numeric subject, no roadmap | ERROR: `"Phase number requires init + roadmap"` | — |
|
|
189
|
-
| Text subject + milestone | `adhoc` | subject slugified (max 40 chars) |
|
|
190
|
-
| Text subject, no milestone | `standalone` | subject slugified (max 40 chars) |
|
|
96
|
+
S_CONTEXT:
|
|
97
|
+
-> S_CSV_GEN DO: load project.md, roadmap.md, state.json, prior artifacts, specs
|
|
191
98
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
99
|
+
S_CSV_GEN:
|
|
100
|
+
-> S_WAVE_1 WHEN: full mode DO: generate N explore + 6 score + 1 synthesis rows
|
|
101
|
+
-> S_WAVE_3 WHEN: quick mode DO: generate 1 synthesis row only
|
|
102
|
+
-> S_WAVE_1 WHEN: gaps mode DO: generate per-issue explore + per-group synthesis rows
|
|
195
103
|
|
|
196
|
-
|
|
104
|
+
S_WAVE_1:
|
|
105
|
+
-> S_WAVE_2 WHEN: full mode, 1+ completed DO: A_SPAWN_WAVE_1
|
|
106
|
+
-> S_WAVE_3 WHEN: gaps mode, 1+ completed DO: merge results
|
|
107
|
+
-> ERROR WHEN: all failed
|
|
197
108
|
|
|
198
|
-
|
|
109
|
+
S_WAVE_2:
|
|
110
|
+
-> S_WAVE_3 DO: A_SPAWN_WAVE_2
|
|
199
111
|
|
|
200
|
-
|
|
112
|
+
S_WAVE_3:
|
|
113
|
+
-> S_AGGREGATE DO: A_SPAWN_WAVE_3
|
|
201
114
|
|
|
202
|
-
|
|
115
|
+
S_AGGREGATE:
|
|
116
|
+
-> END DO: A_AGGREGATE_RESULTS
|
|
203
117
|
|
|
204
|
-
|
|
205
|
-
2. **Context loading** (milestone/phase scope):
|
|
206
|
-
- Read `.workflow/project.md` -- project vision and constraints
|
|
207
|
-
- Read `.workflow/roadmap.md` -- phase structure and dependencies
|
|
208
|
-
- Read `.workflow/state.json` → `current_milestone`, `artifacts[]`, `accumulated_context`
|
|
209
|
-
- Find prior analyze artifacts from `state.json.artifacts[]` (type=analyze, same milestone) → load their `context.md`
|
|
210
|
-
- Find brainstorm artifacts from `state.json.artifacts[]` (type=brainstorm, same milestone) → load `guidance-specification.md`
|
|
211
|
-
- Load project specs: `maestro spec load --category arch`
|
|
118
|
+
</transitions>
|
|
212
119
|
|
|
213
|
-
|
|
120
|
+
<actions>
|
|
214
121
|
|
|
215
|
-
|
|
216
|
-
- Load issues from `.workflow/issues/issues.jsonl`
|
|
217
|
-
- If `gapsIssueId`: load single issue, validate existence
|
|
218
|
-
- If no ISS-ID: filter `status == "open" || status == "registered"`
|
|
219
|
-
- Classify & group issues by location/component overlap
|
|
220
|
-
- Generate tasks.csv: wave 1 = one exploration row per issue, wave 2 = one synthesis row per group
|
|
221
|
-
- Execute via spawn_agents_on_csv (wave 1 parallel per issue, wave 2 parallel per group)
|
|
222
|
-
- Pipeline: Load Issues → Classify & Group → CSV Generation → Wave 1: Explore → Wave 2: Synthesize → Write issue.analysis → Output context.md
|
|
223
|
-
- On completion: append history entry `{ action: "analyzed", at: <ISO>, by: "maestro-analyze --gaps" }` per issue
|
|
122
|
+
### A_SPAWN_WAVE_1
|
|
224
123
|
|
|
225
|
-
|
|
124
|
+
Filter wave==1 -> write wave-1.csv -> `spawn_agents_on_csv({ csv_path, max_concurrency })`.
|
|
226
125
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
126
|
+
**Exploration agent** (3-layer per dimension):
|
|
127
|
+
1. Module Discovery (breadth): keyword search, relevant files, module boundaries
|
|
128
|
+
2. Structure Tracing (depth): top 3-5 files, call chains 2-3 levels, data flow
|
|
129
|
+
3. Code Anchor Extraction (detail): code snippet 20-50 lines with file:line per finding
|
|
231
130
|
|
|
232
|
-
|
|
233
|
-
- architecture, implementation, performance, security, concept, comparison, decision, external_research
|
|
131
|
+
Share via discovery board. Merge results -> master tasks.csv.
|
|
234
132
|
|
|
235
|
-
|
|
236
|
-
- Full mode: N exploration rows (wave 1) + 6 scoring rows (wave 2) + 1 synthesis row (wave 3)
|
|
237
|
-
- Quick mode: 1 synthesis row only (wave 1, no deps)
|
|
133
|
+
### A_SPAWN_WAVE_2
|
|
238
134
|
|
|
239
|
-
|
|
135
|
+
Filter wave==2 -> build prev_context from wave 1 findings -> write wave-2.csv -> spawn.
|
|
240
136
|
|
|
241
|
-
**
|
|
137
|
+
**Scoring agent** (6 dimensions: feasibility, impact, risk, complexity, alignment, maintainability):
|
|
138
|
+
Score 0-100 with specific evidence (code refs from exploration). Each score MUST reference exploration findings.
|
|
242
139
|
|
|
243
|
-
|
|
140
|
+
Merge results -> master tasks.csv.
|
|
244
141
|
|
|
245
|
-
|
|
142
|
+
### A_SPAWN_WAVE_3
|
|
246
143
|
|
|
247
|
-
|
|
144
|
+
Filter wave==3 -> build prev_context from wave 2 scores (or project context for quick mode) -> spawn.
|
|
248
145
|
|
|
249
|
-
|
|
146
|
+
**Synthesis agent**:
|
|
147
|
+
- Full mode: analysis.md (executive summary, per-dimension scores, risk matrix, Go/No-Go), context.md (Locked/Free/Deferred decisions), conclusions.json
|
|
148
|
+
- Quick mode: context.md only from available project context
|
|
149
|
+
- Gaps mode: per-issue analysis records -> issues.jsonl + context.md for plan --gaps
|
|
250
150
|
|
|
251
|
-
|
|
252
|
-
spawn_agents_on_csv({
|
|
253
|
-
csv_path: `${sessionFolder}/wave-1.csv`,
|
|
254
|
-
id_column: "id",
|
|
255
|
-
instruction: buildExplorationInstruction(sessionFolder), // agent: ~/.codex/agents/cli-explore-agent.toml
|
|
256
|
-
max_concurrency: maxConcurrency,
|
|
257
|
-
max_runtime_seconds: 3600,
|
|
258
|
-
output_csv_path: `${sessionFolder}/wave-1-results.csv`,
|
|
259
|
-
output_schema: { id, status: ["completed"|"failed"], findings, score, recommendations, error }
|
|
260
|
-
// required: id, status, findings
|
|
261
|
-
})
|
|
262
|
-
```
|
|
263
|
-
|
|
264
|
-
Merge results into master `tasks.csv`, delete `wave-1.csv`.
|
|
265
|
-
|
|
266
|
-
**Exploration agent responsibilities** (3-layer per dimension):
|
|
267
|
-
1. **Module Discovery** (breadth) -- keyword search, relevant files, module boundaries
|
|
268
|
-
2. **Structure Tracing** (depth) -- top 3-5 files: call chains 2-3 levels, data flow
|
|
269
|
-
3. **Code Anchor Extraction** (detail) -- code snippet (20-50 lines) with file:line per finding
|
|
270
|
-
- Share findings via discovery board
|
|
271
|
-
|
|
272
|
-
#### Wave 2: 6-Dimension Scoring (Parallel) [SKIP in -q mode]
|
|
273
|
-
|
|
274
|
-
Filter `wave == 2 && status == pending` from master CSV. Build `prev_context` from wave 1 findings (format: `[Task N: Title] summary...` per exploration task). Write `wave-2.csv` with `prev_context` column.
|
|
275
|
-
|
|
276
|
-
```javascript
|
|
277
|
-
spawn_agents_on_csv({
|
|
278
|
-
csv_path: `${sessionFolder}/wave-2.csv`,
|
|
279
|
-
id_column: "id",
|
|
280
|
-
instruction: buildScoringInstruction(sessionFolder), // agent: ~/.codex/agents/workflow-analyzer.toml
|
|
281
|
-
max_concurrency: maxConcurrency,
|
|
282
|
-
max_runtime_seconds: 3600,
|
|
283
|
-
output_csv_path: `${sessionFolder}/wave-2-results.csv`,
|
|
284
|
-
output_schema: { id, status: ["completed"|"failed"], findings, score, recommendations, error }
|
|
285
|
-
// required: id, status, findings, score
|
|
286
|
-
})
|
|
287
|
-
```
|
|
151
|
+
Gray area detection: domain-aware (things users SEE/CALL/RUN/READ), phase-specific (skip prior decided areas).
|
|
288
152
|
|
|
289
|
-
|
|
153
|
+
### A_AGGREGATE_RESULTS
|
|
290
154
|
|
|
291
|
-
|
|
155
|
+
1. Export results.csv
|
|
156
|
+
2. **Confidence scoring** (full mode): factors -- findings_depth(.30), evidence_strength(.25), coverage_breadth(.20), user_validation(.15), consistency(.10). Thresholds: <60% deeper, 60-80% optional, 80-95% converging, >95% converge.
|
|
157
|
+
3. Auto-create issues from Deferred items -> issues.jsonl
|
|
158
|
+
4. Spec enrichment: Locked decisions -> `maestro spec add arch`; code patterns -> `maestro spec add coding`
|
|
159
|
+
5. Register artifact in state.json (type: analyze)
|
|
160
|
+
6. Copy outputs to scratchDir, display summary
|
|
292
161
|
|
|
293
|
-
|
|
294
|
-
|-----------|------------|-------------|
|
|
295
|
-
| Feasibility | Technical difficulty, team capability, time, tooling | 0-100 |
|
|
296
|
-
| Impact | User value, business value, tech debt reduction, DX | 0-100 |
|
|
297
|
-
| Risk | Failure modes, security, scalability, regression | 0-100 |
|
|
298
|
-
| Complexity | Integration points, dependencies, learning curve, testing | 0-100 |
|
|
299
|
-
| Alignment | Project vision fit, roadmap consistency, architecture principles | 0-100 |
|
|
300
|
-
| Maintainability | Code clarity, documentation, test coverage, refactoring safety | 0-100 |
|
|
162
|
+
</actions>
|
|
301
163
|
|
|
302
|
-
|
|
164
|
+
</state_machine>
|
|
303
165
|
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
Filter `wave == 3` (or wave 1 in quick mode) `&& status == pending`. If full mode and all wave 2 failed, fall back to available exploration context.
|
|
307
|
-
|
|
308
|
-
**prev_context source**:
|
|
309
|
-
- Full mode: wave 2 scoring findings (format: `[Task N: Score Dim] Score: X. summary...`)
|
|
310
|
-
- Quick mode: loaded project context (project.md, roadmap, brainstorm artifacts)
|
|
311
|
-
|
|
312
|
-
Write wave CSV with `prev_context`, execute `spawn_agents_on_csv` for synthesis agent, merge results, delete temp CSV.
|
|
313
|
-
|
|
314
|
-
**Synthesis agent responsibilities**:
|
|
315
|
-
- Compile dimension scores into analysis.md (full mode):
|
|
316
|
-
- Executive summary with overall assessment
|
|
317
|
-
- Per-dimension scores with key evidence
|
|
318
|
-
- Risk matrix visualization
|
|
319
|
-
- Go/No-Go recommendation with confidence
|
|
320
|
-
- Identify gray areas (both modes):
|
|
321
|
-
- Domain-aware: something users SEE/CALL/RUN/READ/are ORGANIZED
|
|
322
|
-
- Phase-specific: skip areas decided in prior context.md
|
|
323
|
-
- If guidance-specification.md loaded: skip MUST/MUST NOT, focus on SHOULD/MAY gaps
|
|
324
|
-
- Generate Locked/Free/Deferred decisions for context.md
|
|
325
|
-
- Build conclusions.json (full mode) with decision trail and recommendations
|
|
326
|
-
|
|
327
|
-
### Phase 3: Results Aggregation
|
|
328
|
-
|
|
329
|
-
**Objective**: Generate final results and output artifacts.
|
|
330
|
-
|
|
331
|
-
1. Read final master `tasks.csv`
|
|
332
|
-
2. Export as `results.csv`
|
|
333
|
-
3. Build `analysis.md` (full mode only):
|
|
334
|
-
|
|
335
|
-
```markdown
|
|
336
|
-
# Analysis Report -- {subject}
|
|
337
|
-
|
|
338
|
-
## Executive Summary
|
|
339
|
-
- Overall assessment: {Go/No-Go/Conditional}
|
|
340
|
-
- Confidence: {high/medium/low}
|
|
341
|
-
- Key risk: {top risk}
|
|
342
|
-
|
|
343
|
-
## Dimension Scores
|
|
344
|
-
| Dimension | Score | Key Evidence |
|
|
345
|
-
|-----------|-------|-------------|
|
|
346
|
-
| Feasibility | {N}/100 | {evidence} |
|
|
347
|
-
| Impact | {N}/100 | {evidence} |
|
|
348
|
-
| Risk | {N}/100 | {evidence} |
|
|
349
|
-
| Complexity | {N}/100 | {evidence} |
|
|
350
|
-
| Alignment | {N}/100 | {evidence} |
|
|
351
|
-
| Maintainability | {N}/100 | {evidence} |
|
|
352
|
-
|
|
353
|
-
## Risk Matrix
|
|
354
|
-
{probability-impact matrix}
|
|
355
|
-
|
|
356
|
-
## Recommendations
|
|
357
|
-
{prioritized recommendations with rationale}
|
|
358
|
-
```
|
|
166
|
+
<discovery_board>
|
|
359
167
|
|
|
360
|
-
|
|
168
|
+
| Type | Dedup Key | Data |
|
|
169
|
+
|------|-----------|------|
|
|
170
|
+
| exploration_finding | data.file+data.line | {file, line, snippet, dimension, significance} |
|
|
171
|
+
| dimension_score | data.dimension | {dimension, score, evidence, confidence} |
|
|
172
|
+
| risk_item | data.description | {description, probability, impact, mitigation} |
|
|
173
|
+
| decision_candidate | data.area | {area, options[], recommendation, classification} |
|
|
174
|
+
| alternative | data.name | {name, description, pros[], cons[], fit_score} |
|
|
361
175
|
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
4. Build `context.md` (both modes):
|
|
365
|
-
|
|
366
|
-
```markdown
|
|
367
|
-
# Context: {subject}
|
|
368
|
-
|
|
369
|
-
**Date**: {date}
|
|
370
|
-
**Mode**: {full|quick}
|
|
371
|
-
**Areas discussed**: {list}
|
|
372
|
-
|
|
373
|
-
## Decisions
|
|
374
|
-
|
|
375
|
-
### Decision N: {TITLE}
|
|
376
|
-
- **Context**: {what and why}
|
|
377
|
-
- **Options**: 1. {opt1} 2. {opt2}
|
|
378
|
-
- **Chosen**: {selected}
|
|
379
|
-
- **Reason**: {rationale}
|
|
380
|
-
|
|
381
|
-
## Constraints
|
|
382
|
-
|
|
383
|
-
### Locked
|
|
384
|
-
{decisions that are final and must be followed}
|
|
385
|
-
|
|
386
|
-
### Free
|
|
387
|
-
{decisions left to implementer discretion}
|
|
388
|
-
|
|
389
|
-
### Deferred
|
|
390
|
-
{ideas captured but postponed to later phases}
|
|
391
|
-
|
|
392
|
-
## Code Context
|
|
393
|
-
{relevant code references from exploration}
|
|
394
|
-
```
|
|
395
|
-
|
|
396
|
-
5. Build `conclusions.json` (full mode only):
|
|
397
|
-
|
|
398
|
-
```json
|
|
399
|
-
{
|
|
400
|
-
"session_id": "<session>",
|
|
401
|
-
"subject": "<subject>",
|
|
402
|
-
"mode": "full",
|
|
403
|
-
"recommendation": "Go|No-Go|Conditional",
|
|
404
|
-
"confidence": "high|medium|low",
|
|
405
|
-
"dimensions": [
|
|
406
|
-
{ "name": "feasibility", "score": 75, "findings": "...", "recommendations": "..." }
|
|
407
|
-
],
|
|
408
|
-
"decisions": [
|
|
409
|
-
{ "title": "...", "classification": "locked|free|deferred", "rationale": "..." }
|
|
410
|
-
],
|
|
411
|
-
"risk_matrix": [...],
|
|
412
|
-
"timestamp": "<ISO>"
|
|
413
|
-
}
|
|
414
|
-
```
|
|
415
|
-
|
|
416
|
-
6. **Auto-create issues from Deferred items**: Filter decisions with `classification == "Deferred"`, append each as issue to `.workflow/issues/issues.jsonl`.
|
|
417
|
-
|
|
418
|
-
7b. **Spec Enrichment**: For each Locked decision in context.md, persist via CLI:
|
|
419
|
-
- `maestro spec add arch "<decision.title>" "<decision.rationale>" --keywords ... --source analyze:{sessionId}`
|
|
420
|
-
- For non-trivial code patterns discovered during exploration → `maestro spec add coding ...`
|
|
421
|
-
|
|
422
|
-
7. **Register artifact in state.json**: Append `{ id: "ANL-{next_id}", type: "analyze", milestone, phase, scope, path: scratchDir, status: "completed", depends_on: null, harvested: false, created_at, completed_at }`.
|
|
423
|
-
8. Copy final outputs (context.md, analysis.md, conclusions.json) from CSV session folder to `scratchDir`
|
|
424
|
-
9. Display summary
|
|
425
|
-
|
|
426
|
-
### Shared Discovery Board Protocol
|
|
427
|
-
|
|
428
|
-
#### Standard Discovery Types
|
|
429
|
-
|
|
430
|
-
| Type | Dedup Key | Data Schema | Description |
|
|
431
|
-
|------|-----------|-------------|-------------|
|
|
432
|
-
| `code_pattern` | `data.name` | `{name, file, description}` | Reusable code pattern found |
|
|
433
|
-
| `integration_point` | `data.file` | `{file, description, exports[]}` | Module connection point |
|
|
434
|
-
| `convention` | singleton | `{naming, imports, formatting}` | Project code conventions |
|
|
435
|
-
| `blocker` | `data.issue` | `{issue, severity, impact}` | Blocking issue found |
|
|
436
|
-
| `tech_stack` | singleton | `{framework, language, tools[]}` | Technology stack info |
|
|
437
|
-
|
|
438
|
-
#### Domain Discovery Types
|
|
439
|
-
|
|
440
|
-
| Type | Dedup Key | Data Schema | Description |
|
|
441
|
-
|------|-----------|-------------|-------------|
|
|
442
|
-
| `exploration_finding` | `data.file+data.line` | `{file, line, snippet, dimension, significance}` | Code anchor from exploration |
|
|
443
|
-
| `dimension_score` | `data.dimension` | `{dimension, score, evidence, confidence}` | Scoring result |
|
|
444
|
-
| `risk_item` | `data.description` | `{description, probability, impact, mitigation}` | Identified risk |
|
|
445
|
-
| `decision_candidate` | `data.area` | `{area, options[], recommendation, classification}` | Gray area for decision |
|
|
446
|
-
| `alternative` | `data.name` | `{name, description, pros[], cons[], fit_score}` | Alternative approach |
|
|
447
|
-
|
|
448
|
-
#### Protocol
|
|
449
|
-
|
|
450
|
-
1. **Read** `{session_folder}/discoveries.ndjson` before own analysis
|
|
451
|
-
2. **Skip covered**: If discovery of same type + dedup key exists, skip
|
|
452
|
-
3. **Write immediately**: Append findings as found
|
|
453
|
-
4. **Append-only**: Never modify or delete
|
|
454
|
-
5. **Deduplicate**: Check before writing
|
|
455
|
-
|
|
456
|
-
```bash
|
|
457
|
-
echo '{"ts":"<ISO>","worker":"{id}","type":"exploration_finding","data":{"file":"src/auth/login.ts","line":42,"snippet":"export async function verifyToken(...)","dimension":"architecture","significance":"Core auth entry point"}}' >> {session_folder}/discoveries.ndjson
|
|
458
|
-
```
|
|
459
|
-
</execution>
|
|
176
|
+
Protocol: read before analysis, append-only, dedup by type+key.
|
|
177
|
+
</discovery_board>
|
|
460
178
|
|
|
461
179
|
<error_codes>
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
|
466
|
-
| --gaps
|
|
467
|
-
|
|
|
468
|
-
|
|
|
469
|
-
|
|
|
470
|
-
|
|
|
471
|
-
| All exploration agents failed | Proceed to scoring with limited context, note limitation |
|
|
472
|
-
| Scoring agent timeout | Mark as failed, use available scores for synthesis |
|
|
473
|
-
| All scoring agents failed | Skip analysis.md, proceed to decision extraction only |
|
|
474
|
-
| Synthesis agent failed | Use raw scores/exploration as fallback, generate minimal context.md |
|
|
475
|
-
| CSV parse error | Validate format, show line number |
|
|
476
|
-
| discoveries.ndjson corrupt | Ignore malformed lines |
|
|
180
|
+
| Condition | Recovery |
|
|
181
|
+
|-----------|----------|
|
|
182
|
+
| Subject argument missing (non-gaps) | Abort: "Analysis subject required" |
|
|
183
|
+
| --gaps but no issues found | Abort: "No open/registered issues" |
|
|
184
|
+
| --gaps ISS-ID not found | Abort: "Issue not found" |
|
|
185
|
+
| Phase directory not found | List available phases, abort |
|
|
186
|
+
| All exploration agents failed | Proceed to scoring with limited context |
|
|
187
|
+
| All scoring agents failed | Skip analysis.md, decision extraction only |
|
|
188
|
+
| Synthesis agent failed | Minimal context.md from raw scores/exploration |
|
|
477
189
|
| Continue mode: no session found | List available sessions |
|
|
478
190
|
</error_codes>
|
|
479
191
|
|
|
480
192
|
<success_criteria>
|
|
481
|
-
- [ ] Session folder created with valid tasks.csv
|
|
482
193
|
- [ ] All waves executed in order (or skipped per mode)
|
|
483
|
-
- [ ] context.md produced (all modes)
|
|
484
|
-
- [ ]
|
|
194
|
+
- [ ] context.md produced (all modes); analysis.md + conclusions.json (full mode)
|
|
195
|
+
- [ ] Confidence scored per dimension with factor-based model (full mode)
|
|
485
196
|
- [ ] Deferred items auto-created as issues
|
|
486
197
|
- [ ] Artifact registered in state.json
|
|
487
|
-
- [ ] Confidence scored per dimension with factor-based model (full mode only)
|
|
488
|
-
- [ ] Confidence summary appended to analysis.md and conclusions.json
|
|
489
|
-
- [ ] Final outputs copied to scratchDir
|
|
490
198
|
- [ ] discoveries.ndjson append-only throughout
|
|
491
199
|
</success_criteria>
|
|
200
|
+
</output>
|