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,480 +6,131 @@ allowed-tools: spawn_agents_on_csv, Read, Write, Edit, Bash, Glob, Grep, request
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
<purpose>
|
|
9
|
-
Wave-based planning
|
|
10
|
-
|
|
11
|
-
**Core workflow**: Resolve Phase -> Determine Explorations -> Parallel Exploration -> Sequential Planning -> Check + Confirm
|
|
12
|
-
|
|
13
|
-
```
|
|
14
|
-
+---------------------------------------------------------------------------+
|
|
15
|
-
| PLAN CSV WAVE WORKFLOW |
|
|
16
|
-
+---------------------------------------------------------------------------+
|
|
17
|
-
| |
|
|
18
|
-
| Phase 1: Phase Resolution -> CSV |
|
|
19
|
-
| +-- Resolve phase directory from arguments (or --dir) |
|
|
20
|
-
| +-- Load context.md, index.json, spec-ref, codebase docs |
|
|
21
|
-
| +-- Check for upstream analysis (conclusions.json) |
|
|
22
|
-
| +-- If --gaps: load gaps from issues/verification/uat |
|
|
23
|
-
| +-- Determine exploration angles (architecture, implementation, etc.) |
|
|
24
|
-
| +-- Generate tasks.csv with one row per exploration + planning row |
|
|
25
|
-
| +-- User validates exploration breakdown (skip if -y) |
|
|
26
|
-
| |
|
|
27
|
-
| Phase 2: Wave Execution Engine |
|
|
28
|
-
| +-- Wave 1: Codebase Exploration (parallel) |
|
|
29
|
-
| | +-- Each agent explores one angle of the codebase |
|
|
30
|
-
| | +-- Agent reads files, discovers patterns, maps dependencies |
|
|
31
|
-
| | +-- Discoveries shared via board (patterns, conventions, risks) |
|
|
32
|
-
| | +-- Results: findings per exploration angle |
|
|
33
|
-
| +-- Wave 2: Plan Generation (sequential) |
|
|
34
|
-
| | +-- Single planning agent consumes all exploration findings |
|
|
35
|
-
| | +-- Generates plan.json with waves, dependencies, estimates |
|
|
36
|
-
| | +-- Generates .task/TASK-*.json for each task |
|
|
37
|
-
| | +-- Applies Deep Work Rules (read_first, convergence.criteria) |
|
|
38
|
-
| | +-- Results: plan.json path + task count |
|
|
39
|
-
| +-- discoveries.ndjson shared across all waves (append-only) |
|
|
40
|
-
| |
|
|
41
|
-
| Phase 3: Plan Checking + Confirmation |
|
|
42
|
-
| +-- Validate plan quality (coverage, feasibility, deps, criteria) |
|
|
43
|
-
| +-- Revision loop (max 3 rounds) if critical issues found |
|
|
44
|
-
| +-- Update index.json with plan metadata |
|
|
45
|
-
| +-- Display plan summary + options (execute/modify/view) |
|
|
46
|
-
| |
|
|
47
|
-
+---------------------------------------------------------------------------+
|
|
48
|
-
```
|
|
9
|
+
Wave-based planning via `spawn_agents_on_csv`. Wave 1 explores codebase in parallel across multiple angles, Wave 2 generates verified execution plan consuming all exploration findings.
|
|
49
10
|
|
|
11
|
+
Supports: Create (default), Revise (`--revise`), Check (`--check`), Gaps (`--gaps`).
|
|
50
12
|
</purpose>
|
|
51
13
|
|
|
52
14
|
<context>
|
|
53
|
-
|
|
54
|
-
$maestro-plan "3"
|
|
55
|
-
$maestro-plan -y "3"
|
|
56
|
-
$maestro-plan -c 4 "3 --spec SPEC-001"
|
|
57
|
-
$maestro-plan "3 --gaps"
|
|
58
|
-
$maestro-plan "3 --dir .workflow/scratch/quick-nav-fix"
|
|
59
|
-
$maestro-plan --continue "20260318-plan-P3-auth"
|
|
60
|
-
```
|
|
15
|
+
$ARGUMENTS — phase number/text and optional flags.
|
|
61
16
|
|
|
62
|
-
**Flags**:
|
|
63
|
-
- `-y, --yes`: Skip all confirmations (auto mode)
|
|
64
|
-
- `-c, --concurrency N`: Max concurrent agents within each wave (default: 4)
|
|
65
|
-
- `--continue`: Resume existing session
|
|
17
|
+
**Flags**: `-y` (auto), `-c N` (concurrency, default 4), `--continue` (resume), `--dir <path>`, `--gaps` (issue-linked), `--spec SPEC-xxx`, `--collab`, `--revise`, `--check`
|
|
66
18
|
|
|
67
|
-
|
|
19
|
+
**Scope routing** (priority): --dir → from parent artifact; no args → milestone; digit → phase; text → adhoc/standalone.
|
|
68
20
|
|
|
69
|
-
**
|
|
70
|
-
**
|
|
21
|
+
**Session**: `.workflow/.csv-wave/{YYYYMMDD}-plan-P{N}-{slug}/`
|
|
22
|
+
**Scratch**: `.workflow/scratch/{YYYYMMDD}-plan-P{N}-{slug}/` (.task/ subdir)
|
|
23
|
+
|
|
24
|
+
**Pre-load** (optional): context.md (prior analyze), conclusions.json, codebase ARCHITECTURE.md, `maestro wiki search`, `maestro spec load --category arch`, team preflight `maestro collab preflight`.
|
|
71
25
|
</context>
|
|
72
26
|
|
|
73
27
|
<csv_schema>
|
|
74
|
-
|
|
75
|
-
### tasks.csv (Master State)
|
|
76
|
-
|
|
77
28
|
```csv
|
|
78
|
-
id,title,description,
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
"P1","Plan Generation","Consume all exploration findings. Decompose phase goal into concrete tasks with waves, dependencies, convergence criteria. Generate plan.json + TASK-*.json files following Deep Work Rules.","planning","E1;E2;E3;E4","E1;E2;E3;E4","2","","",""
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
**Columns**:
|
|
87
|
-
|
|
88
|
-
| Column | Phase | Description |
|
|
89
|
-
|--------|-------|-------------|
|
|
90
|
-
| `id` | Input | Unique task identifier: `E{N}` for explorations (wave 1), `P1` for planning (wave 2) |
|
|
91
|
-
| `title` | Input | Short exploration or planning title |
|
|
92
|
-
| `description` | Input | Detailed exploration/planning instructions |
|
|
93
|
-
| `exploration_focus` | Input | Focus area: architecture/implementation/integration/risk/planning |
|
|
94
|
-
| `deps` | Input | Semicolon-separated dependency task IDs |
|
|
95
|
-
| `context_from` | Input | Semicolon-separated task IDs whose findings this task needs |
|
|
96
|
-
| `wave` | Computed | Wave number (1 = exploration, 2 = plan generation) |
|
|
97
|
-
| `status` | Output | `pending` -> `completed` / `failed` / `skipped` |
|
|
98
|
-
| `findings` | Output | Key findings summary (max 500 chars) |
|
|
99
|
-
| `error` | Output | Error message if failed |
|
|
100
|
-
|
|
101
|
-
### Per-Wave CSV (Temporary)
|
|
102
|
-
|
|
103
|
-
Each wave generates `wave-{N}.csv` with extra `prev_context` column.
|
|
104
|
-
|
|
105
|
-
### Output Artifacts
|
|
106
|
-
|
|
107
|
-
| File | Purpose | Lifecycle |
|
|
108
|
-
|------|---------|-----------|
|
|
109
|
-
| `tasks.csv` | Master state -- all tasks with status/findings | Updated after each wave |
|
|
110
|
-
| `wave-{N}.csv` | Per-wave input (temporary) | Created before wave, deleted after |
|
|
111
|
-
| `results.csv` | Final export of all task results | Created in Phase 3 |
|
|
112
|
-
| `discoveries.ndjson` | Shared exploration board | Append-only, carries across waves |
|
|
113
|
-
| `context.md` | Human-readable planning report | Created in Phase 3 |
|
|
114
|
-
| `plan.json` | Execution plan (in phase directory) | Created by wave 2 agent |
|
|
115
|
-
| `.task/TASK-*.json` | Individual task definitions (in phase directory) | Created by wave 2 agent |
|
|
116
|
-
|
|
117
|
-
### Session Structure
|
|
118
|
-
|
|
119
|
-
```
|
|
120
|
-
.workflow/.csv-wave/{YYYYMMDD}-plan-P{N}-{slug}/
|
|
121
|
-
+-- tasks.csv
|
|
122
|
-
+-- results.csv
|
|
123
|
-
+-- discoveries.ndjson
|
|
124
|
-
+-- context.md
|
|
125
|
-
+-- wave-{N}.csv (temporary)
|
|
29
|
+
id,title,description,angle,deps,context_from,wave,status,findings,output_path,error
|
|
30
|
+
"1","Explore: Architecture","Map module boundaries and dependencies","architecture","","","1","","","",""
|
|
31
|
+
"2","Explore: Patterns","Find existing similar implementations","patterns","","","1","","","",""
|
|
32
|
+
"3","Explore: Tests","Map test infrastructure and conventions","tests","","","1","","","",""
|
|
33
|
+
"4","Generate Plan","Consume explorations, produce plan.json + TASK files","planning","1;2;3","1;2;3","2","","","",""
|
|
126
34
|
```
|
|
35
|
+
Wave 1: N exploration rows (parallel). Wave 2: 1 planning row (sequential).
|
|
127
36
|
</csv_schema>
|
|
128
37
|
|
|
129
38
|
<invariants>
|
|
130
|
-
1. **
|
|
131
|
-
2. **
|
|
132
|
-
3. **
|
|
133
|
-
4. **
|
|
134
|
-
5. **
|
|
135
|
-
6. **Skip on Failure**: If all exploration agents failed, planning agent proceeds with available context
|
|
136
|
-
7. **Cleanup Temp Files**: Remove wave-{N}.csv after results are merged
|
|
137
|
-
8. **DO NOT STOP**: Continuous execution until all waves complete
|
|
39
|
+
1. **Wave order sacred**: Explorations (W1) before planning (W2)
|
|
40
|
+
2. **CSV source of truth**: Master tasks.csv holds all state
|
|
41
|
+
3. **Discovery board append-only**: Never modify/delete
|
|
42
|
+
4. **Skip on failure**: If all explorations fail, planner proceeds with available context
|
|
43
|
+
5. **DO NOT STOP**: Continuous until all waves complete
|
|
138
44
|
</invariants>
|
|
139
45
|
|
|
140
|
-
<
|
|
141
|
-
|
|
142
|
-
### Session Initialization
|
|
143
|
-
|
|
144
|
-
```javascript
|
|
145
|
-
// Parse from $ARGUMENTS:
|
|
146
|
-
// AUTO_YES <- --yes | -y
|
|
147
|
-
// continueMode <- --continue
|
|
148
|
-
// maxConcurrency <- --concurrency N | -c N (default: 4)
|
|
149
|
-
// autoMode <- --auto
|
|
150
|
-
// gapsMode <- --gaps
|
|
151
|
-
// dirMatch <- --dir <path>
|
|
152
|
-
// specMatch <- --spec SPEC-xxx
|
|
153
|
-
// collabMode <- --collab
|
|
154
|
-
// phaseArg <- remaining text after stripping all flags
|
|
155
|
-
|
|
156
|
-
// Auto-bootstrap .workflow/state.json if missing
|
|
157
|
-
|
|
158
|
-
// Scope determination from state.json (priority order):
|
|
159
|
-
// --dir given → scope from parent artifact or 'standalone'
|
|
160
|
-
// phaseArg empty → 'milestone' (requires current_milestone + roadmap.md) or ERROR E001
|
|
161
|
-
// phaseArg is digit → 'phase', resolve slug from roadmap, find latest completed analyze artifact
|
|
162
|
-
// phaseArg is text → 'adhoc' (if milestone active) or 'standalone', slugify phaseArg
|
|
163
|
-
|
|
164
|
-
// Session IDs (UTC+8):
|
|
165
|
-
// sessionId = {YYYYMMDD}-plan-P{phaseArg}-{phaseSlug}
|
|
166
|
-
// sessionFolder = .workflow/.csv-wave/{sessionId}
|
|
167
|
-
// scratchDir = .workflow/scratch/{sessionId}
|
|
168
|
-
|
|
169
|
-
// Create: sessionFolder, scratchDir/.task/
|
|
170
|
-
```
|
|
171
|
-
|
|
172
|
-
### Session Resume (`--continue`)
|
|
173
|
-
|
|
174
|
-
When `continueMode` is true:
|
|
175
|
-
1. Scan `.workflow/.csv-wave/` for directories matching `*-plan-*`
|
|
176
|
-
2. If `$ARGUMENTS` contains a session ID suffix, match it; otherwise use the most recent session
|
|
177
|
-
3. Read the session's `tasks.csv` to determine resume point:
|
|
178
|
-
- If all wave 1 tasks completed → skip to wave 2
|
|
179
|
-
- If wave 2 completed → skip to Phase 3 (plan checking)
|
|
180
|
-
- If Phase 3 incomplete → re-run plan checking
|
|
181
|
-
4. Re-use existing `sessionFolder` and `scratchDir` (do not create new ones)
|
|
182
|
-
5. Log: "Resuming session {sessionId} — skipping {N} completed tasks"
|
|
183
|
-
|
|
184
|
-
If no matching session found, list available sessions and abort.
|
|
185
|
-
|
|
186
|
-
### Phase 1: Phase Resolution -> CSV
|
|
187
|
-
|
|
188
|
-
**Objective**: Resolve phase, load context, determine exploration angles, generate tasks.csv.
|
|
189
|
-
|
|
190
|
-
**Decomposition Rules**:
|
|
191
|
-
|
|
192
|
-
1. **Scope resolution**: Already determined in Session Initialization (milestone/phase/adhoc/standalone)
|
|
193
|
-
|
|
194
|
-
2. **Context loading** (from upstream analyze artifact or --dir):
|
|
195
|
-
- Read `{contextDir}/context.md` (user decisions from analyze) — if contextDir resolved
|
|
196
|
-
- Read `.workflow/project.md` — project vision and constraints
|
|
197
|
-
- Read `.workflow/roadmap.md` — phase structure and dependencies
|
|
198
|
-
- Read spec-ref if `--spec` flag
|
|
199
|
-
- Read `.workflow/codebase/doc-index.json` if exists
|
|
200
|
-
- Find design artifacts from `state.json.artifacts[]` (type=brainstorm with ui-designer) for MASTER.md
|
|
201
|
-
- Load project specs via `maestro spec load --category arch`
|
|
202
|
-
|
|
203
|
-
3. **Upstream analysis check**:
|
|
204
|
-
- If `{contextDir}/conclusions.json` exists and has content: reuse as exploration context, skip wave 1
|
|
205
|
-
- If `{contextDir}/explorations.json` exists: load as additional context
|
|
206
|
-
|
|
207
|
-
4. **Gap mode** (if `--gaps`):
|
|
208
|
-
- Load gaps from `.workflow/issues/issues.jsonl` (primary), `verification.json` (fallback), `uat.md` (additional)
|
|
209
|
-
- Enrich with debug diagnosis from `{PHASE_DIR}/.debug/*/understanding.md`
|
|
210
|
-
- Skip wave 1 exploration, generate gap-fix tasks directly in wave 2
|
|
211
|
-
|
|
212
|
-
5. **Exploration angle determination** (skip if --gaps or upstream analysis loaded):
|
|
213
|
-
|
|
214
|
-
| Angle | Focus | When Included |
|
|
215
|
-
|-------|-------|---------------|
|
|
216
|
-
| architecture | Module boundaries, dependency graph, integration points | Always |
|
|
217
|
-
| implementation | Coding patterns, libraries, conventions, similar features | Always |
|
|
218
|
-
| integration | Existing code modifications, API contracts, shared state | When phase touches existing modules |
|
|
219
|
-
| risk | Backward compatibility, performance, security, test gaps | When phase is complex or critical |
|
|
220
|
-
|
|
221
|
-
6. **CSV generation**: Exploration rows (wave 1) + one planning row (wave 2).
|
|
222
|
-
|
|
223
|
-
**Wave computation**: Simple 2-wave -- all exploration tasks = wave 1, planning task = wave 2.
|
|
224
|
-
|
|
225
|
-
**User validation**: Display exploration breakdown (skip if AUTO_YES or `--auto`).
|
|
46
|
+
<state_machine>
|
|
226
47
|
|
|
227
|
-
|
|
48
|
+
<states>
|
|
49
|
+
S_PARSE — 解析参数、确定 scope PERSIST: —
|
|
50
|
+
S_RESUME — 恢复已有 session(--continue) PERSIST: —
|
|
51
|
+
S_CONTEXT — 加载上下文(context.md, specs, wiki) PERSIST: —
|
|
52
|
+
S_CSV_GEN — 确定探索角度、生成 tasks.csv PERSIST: tasks.csv
|
|
53
|
+
S_WAVE_1 — Parallel Exploration (spawn) PERSIST: discoveries.ndjson
|
|
54
|
+
S_WAVE_2 — Plan Generation (spawn single agent) PERSIST: plan.json + .task/
|
|
55
|
+
S_CHECK — Plan checking (max 3 iterations) PERSIST: plan updates
|
|
56
|
+
S_CONFIRM — 用户确认(-y 跳过) PERSIST: —
|
|
57
|
+
S_REGISTER — 注册 PLN artifact、更新 index.json PERSIST: state.json
|
|
58
|
+
</states>
|
|
228
59
|
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
If exit code is 1, present warnings and ask whether to proceed.
|
|
234
|
-
|
|
235
|
-
### Wiki Knowledge Search
|
|
236
|
-
|
|
237
|
-
During context collection, after loading files and before exploration (Wave 1):
|
|
238
|
-
```
|
|
239
|
-
phase_keywords = extract key terms from goal/title (2-5 terms)
|
|
240
|
-
wiki_result = Bash("maestro wiki search ${phase_keywords} --json 2>/dev/null")
|
|
241
|
-
|
|
242
|
-
IF wiki_result exit code != 0 OR empty:
|
|
243
|
-
W003: Wiki search unavailable, continue without prior knowledge
|
|
244
|
-
ELSE:
|
|
245
|
-
entries = JSON.parse(wiki_result).entries (limit to first 10)
|
|
246
|
-
Pass wiki_context to Wave 2 planning agent
|
|
247
|
-
```
|
|
248
|
-
|
|
249
|
-
### Mode Routing
|
|
250
|
-
|
|
251
|
-
| Mode | Trigger | Behavior |
|
|
252
|
-
|------|---------|----------|
|
|
253
|
-
| Create | Default (no --revise/--check) | Full pipeline: Phase 1 → Wave 1 → Wave 2 → Phase 3 |
|
|
254
|
-
| Revise | `--revise [instructions]` | Load existing plan, apply incremental edits, re-check |
|
|
255
|
-
| Check | `--check <plan-dir>` | Skip exploration/planning, run plan-checker only on existing plan |
|
|
256
|
-
|
|
257
|
-
**Revise mode**: Load plan.json from target dir, apply user instructions (add/remove/edit tasks, adjust waves), re-run plan-checker, update index.json.
|
|
258
|
-
|
|
259
|
-
**Check mode**: Read plan.json + .task/TASK-*.json from `--check` path, validate quality, report issues. No exploration, no generation.
|
|
260
|
-
|
|
261
|
-
### Phase 2: Wave Execution Engine
|
|
262
|
-
|
|
263
|
-
**Objective**: Explore codebase then generate plan via spawn_agents_on_csv.
|
|
264
|
-
|
|
265
|
-
#### Wave 1: Codebase Exploration (Parallel)
|
|
266
|
-
|
|
267
|
-
1. Read master `tasks.csv`
|
|
268
|
-
2. Filter rows where `wave == 1` AND `status == pending`
|
|
269
|
-
3. No prev_context needed (wave 1 has no predecessors)
|
|
270
|
-
4. Write `wave-1.csv`
|
|
271
|
-
5. Execute:
|
|
272
|
-
|
|
273
|
-
```javascript
|
|
274
|
-
spawn_agents_on_csv({
|
|
275
|
-
csv_path: `${sessionFolder}/wave-1.csv`,
|
|
276
|
-
id_column: "id",
|
|
277
|
-
instruction: buildExplorationInstruction(sessionFolder, phaseDir), // agent: ~/.codex/agents/cli-explore-agent.toml
|
|
278
|
-
max_concurrency: maxConcurrency,
|
|
279
|
-
max_runtime_seconds: 3600,
|
|
280
|
-
output_csv_path: `${sessionFolder}/wave-1-results.csv`,
|
|
281
|
-
output_schema: { // required: id, status, findings
|
|
282
|
-
id: "string", status: "completed|failed", findings: "string", error: "string"
|
|
283
|
-
}
|
|
284
|
-
})
|
|
285
|
-
```
|
|
286
|
-
|
|
287
|
-
6. Merge `wave-1-results.csv` into master `tasks.csv`, delete `wave-1.csv`
|
|
288
|
-
|
|
289
|
-
#### Task Count Guard (before Wave 2)
|
|
290
|
-
|
|
291
|
-
Before generating the planning instruction, assess scope complexity and embed expected task count ceiling:
|
|
292
|
-
- Single feature / simple change → expect **1-2 tasks** max
|
|
293
|
-
- Medium feature (multiple files, one module) → expect **2-4 tasks** max
|
|
294
|
-
- Large feature (cross-module) → expect **4-8 tasks** max
|
|
60
|
+
<transitions>
|
|
61
|
+
S_PARSE → S_RESUME WHEN: --continue
|
|
62
|
+
S_PARSE → S_CONTEXT WHEN: phase/dir resolved
|
|
63
|
+
S_PARSE → ERROR WHEN: no args and no roadmap
|
|
295
64
|
|
|
296
|
-
|
|
65
|
+
S_RESUME → S_WAVE_1 WHEN: W1 incomplete DO: load session, resume
|
|
66
|
+
S_RESUME → S_WAVE_2 WHEN: W1 done, W2 pending
|
|
67
|
+
S_RESUME → S_CHECK WHEN: W2 done, check pending
|
|
297
68
|
|
|
298
|
-
|
|
69
|
+
S_CONTEXT → S_CSV_GEN DO: load context.md, conclusions.json, specs, wiki, codebase docs
|
|
299
70
|
|
|
300
|
-
|
|
301
|
-
2. Filter rows where `wave == 2` AND `status == pending`
|
|
302
|
-
3. Build `prev_context` from wave 1 findings:
|
|
303
|
-
```
|
|
304
|
-
[E1: Architecture Exploration] Module boundaries: auth/ is self-contained, shared/ has...
|
|
305
|
-
[E2: Implementation Exploration] Patterns found: Result type for errors, zod for validation...
|
|
306
|
-
[E3: Integration Exploration] Touch points: routes/index.ts needs new route, middleware/auth.ts...
|
|
307
|
-
[E4: Risk Exploration] Risks: No test coverage for auth refresh flow, potential breaking change...
|
|
308
|
-
```
|
|
309
|
-
4. Write `wave-2.csv` with `prev_context` column
|
|
310
|
-
5. Execute:
|
|
71
|
+
S_CSV_GEN → S_WAVE_1 DO: determine exploration angles, generate tasks.csv, user validates (skip -y)
|
|
311
72
|
|
|
312
|
-
|
|
313
|
-
spawn_agents_on_csv({
|
|
314
|
-
csv_path: `${sessionFolder}/wave-2.csv`,
|
|
315
|
-
id_column: "id",
|
|
316
|
-
instruction: buildPlanningInstruction(sessionFolder, phaseDir, { // agent: ~/.codex/agents/workflow-planner.toml
|
|
317
|
-
contextMd, indexJson, specRef, docIndex, designRef, gapsContext
|
|
318
|
-
}),
|
|
319
|
-
max_concurrency: 1, // Single planning agent
|
|
320
|
-
max_runtime_seconds: 3600,
|
|
321
|
-
output_csv_path: `${sessionFolder}/wave-2-results.csv`,
|
|
322
|
-
output_schema: { // required: id, status, findings
|
|
323
|
-
id: "string", status: "completed|failed", findings: "string", error: "string"
|
|
324
|
-
}
|
|
325
|
-
})
|
|
326
|
-
```
|
|
327
|
-
|
|
328
|
-
6. Merge `wave-2-results.csv` into master `tasks.csv`, delete `wave-2.csv`
|
|
329
|
-
|
|
330
|
-
**Planning agent responsibilities** (embedded in instruction):
|
|
331
|
-
- Group work into feature-level tasks. One feature = one task (even if it touches 3-5 files). Do NOT split a single feature into multiple file-level tasks.
|
|
332
|
-
- Apply Deep Work Rules: `read_first[]` includes modified file + source of truth; `convergence.criteria[]` are grep-verifiable; all actions/steps have concrete values
|
|
333
|
-
- Write `plan.json` to `{PHASE_DIR}/plan.json` and `.task/TASK-{NNN}.json` to `{PHASE_DIR}/.task/`
|
|
334
|
-
- `--gaps`: create fix tasks from gap context, link to issues; `--collab`: pre-allocate ID ranges
|
|
335
|
-
|
|
336
|
-
**Task Grouping Rules (MANDATORY)** — pass to planning agent, re-prompt if violated:
|
|
337
|
-
|
|
338
|
-
1. **Group by feature** — All changes for one feature = one task (even if 3-5 files). Never create separate tasks per file.
|
|
339
|
-
2. **Group by context** — Related functional changes belong together. Don't split just because changes touch different files.
|
|
340
|
-
3. **Minimize agent count** — Group simple unrelated changes into a single "batch" task to reduce overhead. Each agent spawn costs significant tokens.
|
|
341
|
-
4. **Substantial tasks only** — Each task should represent 15-60 minutes of real work. If a task takes <5 minutes, merge it into another.
|
|
342
|
-
5. **True dependencies only** — `depends_on` only when Task B genuinely needs Task A's output (e.g., "Task A defines the interface that Task B implements"). Sequential execution wastes time.
|
|
343
|
-
6. **Prefer parallel** — Most tasks should be independent (no depends_on). Default to parallel waves.
|
|
344
|
-
7. **Complexity-based sizing**:
|
|
345
|
-
- **Low** (single file, single concern, zero cross-module): **1 task**
|
|
346
|
-
- **Medium** (multiple files OR integration point): **1-4 tasks**
|
|
347
|
-
- **High** (cross-module, architectural, new subsystem): **4-10 tasks**
|
|
348
|
-
|
|
349
|
-
**Anti-splitting rules** (re-prompt if violated):
|
|
350
|
-
- One feature = one task (even if 3-5 files); never split a feature into per-file tasks
|
|
351
|
-
- Group simple unrelated changes into a batch task to minimize agent spawns
|
|
352
|
-
- `depends_on` only for genuine output dependencies; most tasks should be parallel
|
|
353
|
-
- Each task must be substantial (15-60 min); sub-5-min changes must be merged
|
|
354
|
-
|
|
355
|
-
### Phase 3: Plan Checking + Confirmation
|
|
356
|
-
|
|
357
|
-
**Objective**: Validate plan quality, revise if needed, present to user.
|
|
358
|
-
|
|
359
|
-
1. **Plan checking** (inline, not a separate wave):
|
|
360
|
-
Read `plan.json` + all `.task/TASK-*.json`. Validate: requirements coverage, file feasibility, dependency correctness (no cycles, valid wave order), grep-verifiable convergence criteria, read_first completeness, action concreteness, no parallel file conflicts, **task count within complexity threshold** (reject over-split plans), **no per-file splitting** (each task must be feature-level).
|
|
361
|
-
|
|
362
|
-
1b. **Plan confidence scoring**:
|
|
73
|
+
S_WAVE_1 → S_WAVE_2 DO: spawn parallel explorations, merge results, build prev_context
|
|
363
74
|
|
|
364
|
-
|
|
75
|
+
S_WAVE_2 → S_CHECK DO: spawn planning agent, merge results
|
|
365
76
|
|
|
366
|
-
|
|
77
|
+
S_CHECK → S_CONFIRM WHEN: plan passes or max 3 iterations DO: A_PLAN_CHECK
|
|
78
|
+
S_CHECK → S_WAVE_2 WHEN: plan fails check, iterations < 3 DO: feed checker feedback back
|
|
367
79
|
|
|
368
|
-
|
|
80
|
+
S_CONFIRM → S_REGISTER WHEN: -y OR user confirms
|
|
81
|
+
S_CONFIRM → S_CSV_GEN WHEN: user wants to modify
|
|
82
|
+
S_CONFIRM → END WHEN: user cancels
|
|
369
83
|
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
- Test strategy decisions → `maestro spec add test ...`
|
|
373
|
-
- Typical: 0-3 entries per plan session
|
|
84
|
+
S_REGISTER → END DO: A_REGISTER
|
|
85
|
+
</transitions>
|
|
374
86
|
|
|
375
|
-
|
|
376
|
-
- Export `results.csv` from master `tasks.csv`
|
|
377
|
-
- Generate `context.md`: summary (phase, task count, wave count, complexity, exploration count), exploration findings per angle, plan overview (approach, task IDs, waves), next steps
|
|
87
|
+
<actions>
|
|
378
88
|
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
other_plans = state.json.artifacts.filter(a => a.milestone == current && a.type == "plan" && a.id != this)
|
|
382
|
-
For each other_plan: read .task/TASK-*.json, collect files[].path
|
|
383
|
-
collisions = intersection(this_plan_files, other_plan_files)
|
|
384
|
-
If collisions.length > 0: emit W004, display collision table (non-blocking)
|
|
385
|
-
```
|
|
89
|
+
### Exploration agent responsibilities (W1)
|
|
90
|
+
Each explores one angle: architecture (module boundaries, deps), patterns (similar implementations), tests (framework, conventions), risks (complexity, blockers). Reads files, maps dependencies, shares via discoveries.ndjson.
|
|
386
91
|
|
|
387
|
-
|
|
92
|
+
### Planning agent responsibilities (W2)
|
|
93
|
+
Consumes all exploration findings + context.md + specs. Produces:
|
|
94
|
+
- `plan.json`: summary, approach, task_ids, waves (with phase labels), confidence section
|
|
95
|
+
- `.task/TASK-*.json`: each with read_first[], convergence.criteria[] (grep-verifiable), concrete action/implementation
|
|
96
|
+
- Deep Work Rules: every task has read_first with file being modified + source of truth files
|
|
388
97
|
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
"status": "completed", "depends_on": "anl_art.id || exec_art.id" }
|
|
394
|
-
```
|
|
98
|
+
### A_PLAN_CHECK
|
|
99
|
+
Run plan-checker: coverage, dependency validity, criteria quality, pressure pass on highest-complexity task.
|
|
100
|
+
Confidence: 5-dimension factor model + readiness gate.
|
|
101
|
+
Collision detection against same-milestone plans.
|
|
395
102
|
|
|
396
|
-
|
|
397
|
-
|
|
103
|
+
### A_REGISTER
|
|
104
|
+
1. Register PLN artifact in state.json (scope, milestone, phase, depends_on)
|
|
105
|
+
2. Update index.json with plan metadata
|
|
106
|
+
3. If --gaps: link TASK files back to issues bidirectionally (task_refs[], task_plan_dir in issues.jsonl)
|
|
107
|
+
4. Display: phase, task count, wave count, check status, confidence, next steps
|
|
398
108
|
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
=== PLAN READY ===
|
|
402
|
-
Phase: {phase_name}
|
|
403
|
-
Tasks: {task_count} tasks in {wave_count} waves
|
|
404
|
-
Check: {checker_status} (iteration {check_count}/{max_checks})
|
|
405
|
-
Collision: {collision_status}
|
|
406
|
-
Confidence: {overall}% (weakest: {dim})
|
|
109
|
+
</actions>
|
|
110
|
+
</state_machine>
|
|
407
111
|
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
| Type | Dedup Key | Data Schema | Description |
|
|
418
|
-
|------|-----------|-------------|-------------|
|
|
419
|
-
| `code_pattern` | `data.name` | `{name, file, description}` | Reusable code pattern found |
|
|
420
|
-
| `integration_point` | `data.file` | `{file, description, exports[]}` | Module connection point |
|
|
421
|
-
| `convention` | singleton | `{naming, imports, formatting}` | Project code conventions |
|
|
422
|
-
| `blocker` | `data.issue` | `{issue, severity, impact}` | Blocking issue found |
|
|
423
|
-
| `tech_stack` | singleton | `{framework, language, tools[]}` | Technology stack info |
|
|
424
|
-
|
|
425
|
-
#### Domain Discovery Types
|
|
426
|
-
|
|
427
|
-
| Type | Dedup Key | Data Schema | Description |
|
|
428
|
-
|------|-----------|-------------|-------------|
|
|
429
|
-
| `existing_pattern` | `data.name` | `{name, file, description, usage}` | Existing feature pattern to follow |
|
|
430
|
-
| `dependency_map` | `data.module` | `{module, imports[], exports[], dependents[]}` | Module dependency mapping |
|
|
431
|
-
| `risk_factor` | `data.risk` | `{risk, severity, mitigation, affected_files[]}` | Identified risk |
|
|
432
|
-
| `test_command` | `data.command` | `{command, scope, framework}` | Test execution command |
|
|
433
|
-
|
|
434
|
-
#### Protocol
|
|
435
|
-
|
|
436
|
-
1. **Read** `{session_folder}/discoveries.ndjson` before own exploration
|
|
437
|
-
2. **Skip covered**: If discovery of same type + dedup key exists, skip
|
|
438
|
-
3. **Write immediately**: Append findings as found
|
|
439
|
-
4. **Append-only**: Never modify or delete
|
|
440
|
-
5. **Deduplicate**: Check before writing
|
|
441
|
-
|
|
442
|
-
```bash
|
|
443
|
-
echo '{"ts":"<ISO>","worker":"{id}","type":"existing_pattern","data":{"name":"Result error handling","file":"src/utils/result.ts","description":"All functions return Result<T,E> instead of throwing","usage":"Used in auth, payments, validation modules"}}' >> {session_folder}/discoveries.ndjson
|
|
444
|
-
```
|
|
445
|
-
</execution>
|
|
112
|
+
<discovery_board>
|
|
113
|
+
| Type | Dedup Key | Data |
|
|
114
|
+
|------|-----------|------|
|
|
115
|
+
| existing_pattern | name | {name, file, description, usage} |
|
|
116
|
+
| dependency_map | module | {module, imports[], exports[], dependents[]} |
|
|
117
|
+
| risk_factor | risk | {risk, severity, mitigation, affected_files[]} |
|
|
118
|
+
| convention | singleton | {naming, imports, formatting} |
|
|
119
|
+
| test_command | command | {command, scope, framework} |
|
|
120
|
+
</discovery_board>
|
|
446
121
|
|
|
447
122
|
<error_codes>
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
|
452
|
-
|
|
|
453
|
-
|
|
|
454
|
-
| No plan found to revise (--revise) | Use --dir to specify plan, or create plan first |
|
|
455
|
-
| Plan directory not found (--check) | Check path, use --dir |
|
|
456
|
-
| No context.md found | Warn, proceed with exploration only |
|
|
457
|
-
| Wiki search unavailable (W003) | Continue without prior knowledge context |
|
|
458
|
-
| Collision detected (W004) | Review colliding files, confirm or adjust scope |
|
|
459
|
-
| Exploration agent timeout | Mark as failed, continue with available explorations |
|
|
460
|
-
| Planning agent fails | Retry once with simplified context, then abort |
|
|
461
|
-
| Plan produces invalid JSON | Retry once, then abort with error details |
|
|
462
|
-
| Plan-checker exceeds 3 rounds | Accept plan with warnings, note in index.json |
|
|
463
|
-
| CSV parse error | Validate format, show line number |
|
|
464
|
-
| discoveries.ndjson corrupt | Ignore malformed lines |
|
|
465
|
-
| Continue mode: no session found | List available sessions |
|
|
123
|
+
| Condition | Recovery |
|
|
124
|
+
|-----------|----------|
|
|
125
|
+
| No args and no roadmap | Provide phase number or topic |
|
|
126
|
+
| --gaps but no gap source | Run maestro-verify first |
|
|
127
|
+
| Planning agent fails | Retry once with simplified context |
|
|
128
|
+
| Plan-checker exceeds 3 rounds | Accept with warnings |
|
|
466
129
|
</error_codes>
|
|
467
130
|
|
|
468
131
|
<success_criteria>
|
|
469
|
-
- [ ]
|
|
470
|
-
- [ ]
|
|
471
|
-
- [ ]
|
|
472
|
-
- [ ]
|
|
473
|
-
- [ ] Plan passes quality checks (coverage, deps, criteria)
|
|
474
|
-
- [ ] Plan confidence scored with 5-dimension factor model
|
|
475
|
-
- [ ] Readiness gate checked before confirmation
|
|
476
|
-
- [ ] plan.json includes confidence section
|
|
477
|
-
- [ ] Collision detection executed against same-milestone plans
|
|
478
|
-
- [ ] PLN artifact registered in state.json
|
|
479
|
-
- [ ] context.md produced with exploration findings + plan overview
|
|
480
|
-
- [ ] index.json updated with plan metadata
|
|
481
|
-
- [ ] Issues linked bidirectionally (if --gaps mode)
|
|
482
|
-
- [ ] Wiki knowledge integrated (if available)
|
|
483
|
-
- [ ] Team conflict preflight checked
|
|
484
|
-
- [ ] discoveries.ndjson append-only throughout
|
|
132
|
+
- [ ] Parallel explorations + sequential planning via spawn_agents_on_csv
|
|
133
|
+
- [ ] plan.json + TASK files with read_first and grep-verifiable convergence criteria
|
|
134
|
+
- [ ] Plan confidence scored, readiness gate checked, collision detected
|
|
135
|
+
- [ ] PLN artifact registered, issues linked if --gaps
|
|
485
136
|
</success_criteria>
|