maestro-flow 0.3.2 → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/CLAUDE.md +2 -2
- package/.claude/agents/cli-explore-agent.md +1 -1
- package/.claude/agents/team-worker.md +237 -237
- package/.claude/commands/maestro-coordinate.md +65 -65
- package/.claude/commands/maestro-link-coordinate.md +71 -71
- package/.claude/commands/manage-issue-execute.md +73 -73
- package/.claude/commands/quality-business-test.md +110 -0
- package/.claude/skills/team-coordinate/SKILL.md +266 -266
- package/.claude/skills/team-lifecycle-v4/SKILL.md +209 -209
- package/.claude/skills/team-lifecycle-v4/roles/analyst/role.md +94 -94
- package/.claude/skills/team-lifecycle-v4/roles/executor/commands/implement.md +62 -62
- package/.claude/skills/team-lifecycle-v4/roles/planner/role.md +85 -85
- package/.claude/skills/team-lifecycle-v4/roles/writer/role.md +95 -95
- package/.claude/skills/team-quality-assurance/SKILL.md +147 -147
- package/.claude/skills/team-quality-assurance/roles/scout/role.md +75 -75
- package/.claude/skills/team-review/SKILL.md +147 -147
- package/.claude/skills/team-review/roles/reviewer/role.md +68 -68
- package/.claude/skills/team-review/roles/scanner/role.md +79 -79
- package/.claude/skills/team-tech-debt/SKILL.md +128 -128
- package/.claude/skills/team-tech-debt/roles/executor/role.md +76 -76
- package/.claude/skills/team-tech-debt/roles/scanner/role.md +90 -90
- package/.claude/skills/team-tech-debt/roles/validator/role.md +78 -78
- package/.claude/skills/team-testing/SKILL.md +143 -143
- package/.claude/skills/team-testing/roles/executor/role.md +99 -99
- package/.claude/skills/team-testing/roles/generator/role.md +98 -98
- package/.codex/skills/maestro-coordinate/SKILL.md +1 -1
- package/.codex/skills/manage-issue-analyze/SKILL.md +3 -3
- package/.codex/skills/manage-issue-execute/SKILL.md +4 -4
- package/.codex/skills/manage-issue-plan/SKILL.md +2 -2
- package/.codex/skills/quality-business-test/SKILL.md +223 -0
- package/.codex/skills/team-coordinate/SKILL.md +7 -7
- package/.codex/skills/team-coordinate/roles/coordinator/role.md +1 -1
- package/.codex/skills/team-lifecycle-v4/SKILL.md +2 -2
- package/.codex/skills/team-lifecycle-v4/instructions/agent-instruction.md +2 -2
- package/.codex/skills/team-lifecycle-v4/roles/analyst/role.md +2 -2
- package/.codex/skills/team-lifecycle-v4/roles/coordinator/role.md +2 -2
- package/.codex/skills/team-lifecycle-v4/roles/executor/commands/implement.md +1 -1
- package/.codex/skills/team-lifecycle-v4/roles/planner/role.md +2 -2
- package/.codex/skills/team-lifecycle-v4/roles/writer/role.md +1 -1
- package/.codex/skills/team-quality-assurance/SKILL.md +2 -2
- package/.codex/skills/team-quality-assurance/roles/coordinator/role.md +2 -2
- package/.codex/skills/team-quality-assurance/roles/scout/role.md +2 -2
- package/.codex/skills/team-review/SKILL.md +2 -2
- package/.codex/skills/team-review/roles/coordinator/role.md +2 -2
- package/.codex/skills/team-review/roles/reviewer/role.md +1 -1
- package/.codex/skills/team-review/roles/scanner/role.md +1 -1
- package/.codex/skills/team-tech-debt/SKILL.md +2 -2
- package/.codex/skills/team-tech-debt/roles/coordinator/role.md +1 -1
- package/.codex/skills/team-tech-debt/roles/executor/role.md +1 -1
- package/.codex/skills/team-tech-debt/roles/scanner/role.md +1 -1
- package/.codex/skills/team-tech-debt/roles/validator/role.md +1 -1
- package/.codex/skills/team-testing/SKILL.md +2 -2
- package/.codex/skills/team-testing/roles/coordinator/role.md +2 -2
- package/.codex/skills/team-testing/roles/executor/role.md +1 -1
- package/.codex/skills/team-testing/roles/generator/role.md +1 -1
- package/README.md +31 -2
- package/README.zh-CN.md +23 -1
- package/chains/_intent-map.json +6 -0
- package/chains/_router.json +14 -0
- package/chains/full-lifecycle.json +15 -0
- package/chains/quality-loop.json +16 -1
- package/chains/singles/business-test.json +26 -0
- package/dashboard/dist-server/dashboard/src/server/agents/codex-cli-adapter.js +16 -2
- package/dashboard/dist-server/dashboard/src/server/agents/codex-cli-adapter.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/agents/stream-json-adapter.d.ts +1 -1
- package/dashboard/dist-server/dashboard/src/server/agents/stream-json-adapter.js +25 -9
- package/dashboard/dist-server/dashboard/src/server/agents/stream-json-adapter.js.map +1 -1
- package/dashboard/dist-server/src/agents/cli-agent-runner.d.ts +3 -0
- package/dashboard/dist-server/src/agents/cli-agent-runner.js +78 -61
- package/dashboard/dist-server/src/agents/cli-agent-runner.js.map +1 -1
- package/dashboard/dist-server/src/agents/cli-history-store.d.ts +14 -1
- package/dashboard/dist-server/src/agents/cli-history-store.js +24 -2
- package/dashboard/dist-server/src/agents/cli-history-store.js.map +1 -1
- package/dashboard/dist-server/src/commands/delegate.js +142 -6
- package/dashboard/dist-server/src/commands/delegate.js.map +1 -1
- package/dist/src/agents/cli-agent-runner.d.ts +3 -0
- package/dist/src/agents/cli-agent-runner.d.ts.map +1 -1
- package/dist/src/agents/cli-agent-runner.js +78 -61
- package/dist/src/agents/cli-agent-runner.js.map +1 -1
- package/dist/src/agents/cli-history-store.d.ts +14 -1
- package/dist/src/agents/cli-history-store.d.ts.map +1 -1
- package/dist/src/agents/cli-history-store.js +24 -2
- package/dist/src/agents/cli-history-store.js.map +1 -1
- package/dist/src/commands/delegate.d.ts.map +1 -1
- package/dist/src/commands/delegate.js +142 -6
- package/dist/src/commands/delegate.js.map +1 -1
- package/dist/src/commands/hooks.d.ts +15 -0
- package/dist/src/commands/hooks.d.ts.map +1 -1
- package/dist/src/commands/hooks.js +29 -2
- package/dist/src/commands/hooks.js.map +1 -1
- package/dist/src/commands/install-backend.d.ts +15 -0
- package/dist/src/commands/install-backend.d.ts.map +1 -1
- package/dist/src/commands/install-backend.js +67 -0
- package/dist/src/commands/install-backend.js.map +1 -1
- package/dist/src/commands/install-ui/BackupConfig.d.ts +6 -4
- package/dist/src/commands/install-ui/BackupConfig.d.ts.map +1 -1
- package/dist/src/commands/install-ui/BackupConfig.js +39 -12
- package/dist/src/commands/install-ui/BackupConfig.js.map +1 -1
- package/dist/src/commands/install-ui/ConfigPanel.d.ts.map +1 -1
- package/dist/src/commands/install-ui/ConfigPanel.js +1 -1
- package/dist/src/commands/install-ui/ConfigPanel.js.map +1 -1
- package/dist/src/commands/install-ui/InstallConfirm.d.ts +3 -0
- package/dist/src/commands/install-ui/InstallConfirm.d.ts.map +1 -1
- package/dist/src/commands/install-ui/InstallConfirm.js +5 -1
- package/dist/src/commands/install-ui/InstallConfirm.js.map +1 -1
- package/dist/src/commands/install-ui/InstallExecution.d.ts +2 -0
- package/dist/src/commands/install-ui/InstallExecution.d.ts.map +1 -1
- package/dist/src/commands/install-ui/InstallExecution.js +30 -5
- package/dist/src/commands/install-ui/InstallExecution.js.map +1 -1
- package/dist/src/commands/install-ui/InstallFlow.d.ts +1 -1
- package/dist/src/commands/install-ui/InstallFlow.d.ts.map +1 -1
- package/dist/src/commands/install-ui/InstallFlow.js +31 -6
- package/dist/src/commands/install-ui/InstallFlow.js.map +1 -1
- package/dist/src/commands/install-ui/InstallHub.d.ts +5 -0
- package/dist/src/commands/install-ui/InstallHub.d.ts.map +1 -1
- package/dist/src/commands/install-ui/InstallHub.js +24 -0
- package/dist/src/commands/install-ui/InstallHub.js.map +1 -1
- package/dist/src/commands/install-ui/InstallResult.d.ts.map +1 -1
- package/dist/src/commands/install-ui/InstallResult.js +1 -1
- package/dist/src/commands/install-ui/InstallResult.js.map +1 -1
- package/dist/src/commands/install-ui/StatuslineConfig.d.ts +9 -0
- package/dist/src/commands/install-ui/StatuslineConfig.d.ts.map +1 -0
- package/dist/src/commands/install-ui/StatuslineConfig.js +13 -0
- package/dist/src/commands/install-ui/StatuslineConfig.js.map +1 -0
- package/dist/src/commands/install-ui/index.d.ts +1 -1
- package/dist/src/commands/install-ui/index.d.ts.map +1 -1
- package/dist/src/commands/install-ui/types.d.ts +6 -0
- package/dist/src/commands/install-ui/types.d.ts.map +1 -1
- package/dist/src/commands/install-ui/types.js +3 -0
- package/dist/src/commands/install-ui/types.js.map +1 -1
- package/dist/src/commands/install.d.ts.map +1 -1
- package/dist/src/commands/install.js +6 -1
- package/dist/src/commands/install.js.map +1 -1
- package/dist/src/commands/overlay.d.ts.map +1 -1
- package/dist/src/commands/overlay.js +45 -1
- package/dist/src/commands/overlay.js.map +1 -1
- package/dist/src/commands/team.d.ts +10 -0
- package/dist/src/commands/team.d.ts.map +1 -1
- package/dist/src/commands/team.js +436 -42
- package/dist/src/commands/team.js.map +1 -1
- package/dist/src/core/manifest.d.ts.map +1 -1
- package/dist/src/core/manifest.js +58 -0
- package/dist/src/core/manifest.js.map +1 -1
- package/dist/src/core/overlay/applier.d.ts +4 -0
- package/dist/src/core/overlay/applier.d.ts.map +1 -1
- package/dist/src/core/overlay/applier.js.map +1 -1
- package/dist/src/hooks/delegate-monitor.js +1 -1
- package/dist/src/hooks/delegate-monitor.js.map +1 -1
- package/dist/src/hooks/plugins/spec-injection-plugin.d.ts.map +1 -1
- package/dist/src/hooks/plugins/spec-injection-plugin.js +17 -1
- package/dist/src/hooks/plugins/spec-injection-plugin.js.map +1 -1
- package/dist/src/hooks/spec-injector.d.ts +2 -1
- package/dist/src/hooks/spec-injector.d.ts.map +1 -1
- package/dist/src/hooks/spec-injector.js +19 -2
- package/dist/src/hooks/spec-injector.js.map +1 -1
- package/dist/src/hooks/team-monitor.d.ts.map +1 -1
- package/dist/src/hooks/team-monitor.js +17 -0
- package/dist/src/hooks/team-monitor.js.map +1 -1
- package/dist/src/i18n/locales/en.d.ts.map +1 -1
- package/dist/src/i18n/locales/en.js +25 -1
- package/dist/src/i18n/locales/en.js.map +1 -1
- package/dist/src/i18n/locales/zh.d.ts.map +1 -1
- package/dist/src/i18n/locales/zh.js +25 -1
- package/dist/src/i18n/locales/zh.js.map +1 -1
- package/dist/src/i18n/types.d.ts +22 -0
- package/dist/src/i18n/types.d.ts.map +1 -1
- package/dist/src/mcp/delegate-channel-relay.d.ts.map +1 -1
- package/dist/src/mcp/delegate-channel-relay.js +9 -9
- package/dist/src/mcp/delegate-channel-relay.js.map +1 -1
- package/dist/src/tools/index.d.ts.map +1 -1
- package/dist/src/tools/index.js +11 -2
- package/dist/src/tools/index.js.map +1 -1
- package/dist/src/tools/namespace-guard.d.ts +37 -0
- package/dist/src/tools/namespace-guard.d.ts.map +1 -0
- package/dist/src/tools/namespace-guard.js +126 -0
- package/dist/src/tools/namespace-guard.js.map +1 -0
- package/dist/src/tools/spec-loader.d.ts +17 -1
- package/dist/src/tools/spec-loader.d.ts.map +1 -1
- package/dist/src/tools/spec-loader.js +71 -13
- package/dist/src/tools/spec-loader.js.map +1 -1
- package/dist/src/tools/team-members.d.ts +16 -0
- package/dist/src/tools/team-members.d.ts.map +1 -1
- package/dist/src/tools/team-members.js +31 -0
- package/dist/src/tools/team-members.js.map +1 -1
- package/package.json +2 -2
- package/templates/business-test-report.json +68 -0
- package/workflows/delegate-usage.md +330 -0
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
# Implement
|
|
2
|
-
|
|
3
|
-
Execute implementation from task JSON via agent or CLI delegation.
|
|
4
|
-
|
|
5
|
-
## Agent Mode
|
|
6
|
-
|
|
7
|
-
Direct implementation using Edit/Write/Bash tools:
|
|
8
|
-
|
|
9
|
-
1. Read task.files[] as target files
|
|
10
|
-
2. Read task.implementation[] as step-by-step instructions
|
|
11
|
-
3. For each step:
|
|
12
|
-
- Substitute [variable] placeholders with pre_analysis results
|
|
13
|
-
- New file → Write tool; Modify file → Edit tool
|
|
14
|
-
- Follow task.reference patterns
|
|
15
|
-
4. Apply task.rationale.chosen_approach
|
|
16
|
-
5. Mitigate task.risks[] during implementation
|
|
17
|
-
|
|
18
|
-
Quality rules:
|
|
19
|
-
- Verify module existence before referencing
|
|
20
|
-
- Incremental progress — small working changes
|
|
21
|
-
- Follow existing patterns from task.reference
|
|
22
|
-
- ASCII-only, no premature abstractions
|
|
23
|
-
|
|
24
|
-
## CLI Delegation Mode
|
|
25
|
-
|
|
26
|
-
Build prompt from task JSON, delegate to CLI:
|
|
27
|
-
|
|
28
|
-
Prompt structure:
|
|
29
|
-
```
|
|
30
|
-
PURPOSE: <task.title>
|
|
31
|
-
<task.description>
|
|
32
|
-
|
|
33
|
-
TARGET FILES:
|
|
34
|
-
<task.files[] with paths and changes>
|
|
35
|
-
|
|
36
|
-
IMPLEMENTATION STEPS:
|
|
37
|
-
<task.implementation[] numbered>
|
|
38
|
-
|
|
39
|
-
PRE-ANALYSIS CONTEXT:
|
|
40
|
-
<pre_analysis results>
|
|
41
|
-
|
|
42
|
-
REFERENCE:
|
|
43
|
-
<task.reference pattern and files>
|
|
44
|
-
|
|
45
|
-
DONE WHEN:
|
|
46
|
-
<task.convergence.criteria[]>
|
|
47
|
-
|
|
48
|
-
MODE: write
|
|
49
|
-
CONSTRAINTS: Only modify listed files | Follow existing patterns
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
CLI call:
|
|
53
|
-
```
|
|
54
|
-
Bash({ command: `maestro
|
|
55
|
-
run_in_background: false, timeout: 3600000 })
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
Resume strategy:
|
|
59
|
-
| Strategy | Command |
|
|
60
|
-
|----------|---------|
|
|
61
|
-
| new | --id <session>-<task_id> |
|
|
62
|
-
| resume | --resume <parent_id> |
|
|
1
|
+
# Implement
|
|
2
|
+
|
|
3
|
+
Execute implementation from task JSON via agent or CLI delegation.
|
|
4
|
+
|
|
5
|
+
## Agent Mode
|
|
6
|
+
|
|
7
|
+
Direct implementation using Edit/Write/Bash tools:
|
|
8
|
+
|
|
9
|
+
1. Read task.files[] as target files
|
|
10
|
+
2. Read task.implementation[] as step-by-step instructions
|
|
11
|
+
3. For each step:
|
|
12
|
+
- Substitute [variable] placeholders with pre_analysis results
|
|
13
|
+
- New file → Write tool; Modify file → Edit tool
|
|
14
|
+
- Follow task.reference patterns
|
|
15
|
+
4. Apply task.rationale.chosen_approach
|
|
16
|
+
5. Mitigate task.risks[] during implementation
|
|
17
|
+
|
|
18
|
+
Quality rules:
|
|
19
|
+
- Verify module existence before referencing
|
|
20
|
+
- Incremental progress — small working changes
|
|
21
|
+
- Follow existing patterns from task.reference
|
|
22
|
+
- ASCII-only, no premature abstractions
|
|
23
|
+
|
|
24
|
+
## CLI Delegation Mode
|
|
25
|
+
|
|
26
|
+
Build prompt from task JSON, delegate to CLI:
|
|
27
|
+
|
|
28
|
+
Prompt structure:
|
|
29
|
+
```
|
|
30
|
+
PURPOSE: <task.title>
|
|
31
|
+
<task.description>
|
|
32
|
+
|
|
33
|
+
TARGET FILES:
|
|
34
|
+
<task.files[] with paths and changes>
|
|
35
|
+
|
|
36
|
+
IMPLEMENTATION STEPS:
|
|
37
|
+
<task.implementation[] numbered>
|
|
38
|
+
|
|
39
|
+
PRE-ANALYSIS CONTEXT:
|
|
40
|
+
<pre_analysis results>
|
|
41
|
+
|
|
42
|
+
REFERENCE:
|
|
43
|
+
<task.reference pattern and files>
|
|
44
|
+
|
|
45
|
+
DONE WHEN:
|
|
46
|
+
<task.convergence.criteria[]>
|
|
47
|
+
|
|
48
|
+
MODE: write
|
|
49
|
+
CONSTRAINTS: Only modify listed files | Follow existing patterns
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
CLI call:
|
|
53
|
+
```
|
|
54
|
+
Bash({ command: `maestro delegate "<prompt>" --to <tool> --mode write --rule development-implement-feature`,
|
|
55
|
+
run_in_background: false, timeout: 3600000 })
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Resume strategy:
|
|
59
|
+
| Strategy | Command |
|
|
60
|
+
|----------|---------|
|
|
61
|
+
| new | --id <session>-<task_id> |
|
|
62
|
+
| resume | --resume <parent_id> |
|
|
@@ -1,85 +1,85 @@
|
|
|
1
|
-
---
|
|
2
|
-
role: planner
|
|
3
|
-
prefix: PLAN
|
|
4
|
-
inner_loop: true
|
|
5
|
-
message_types:
|
|
6
|
-
success: plan_ready
|
|
7
|
-
revision: plan_revision
|
|
8
|
-
error: error
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
# Planner
|
|
12
|
-
|
|
13
|
-
Codebase-informed implementation planning with complexity assessment.
|
|
14
|
-
|
|
15
|
-
## Identity
|
|
16
|
-
- Tag: [planner] | Prefix: PLAN-*
|
|
17
|
-
- Responsibility: Explore codebase → generate structured plan → assess complexity
|
|
18
|
-
|
|
19
|
-
## Boundaries
|
|
20
|
-
### MUST
|
|
21
|
-
- Check shared exploration cache before re-exploring
|
|
22
|
-
- Generate plan.json + TASK-*.json files
|
|
23
|
-
- Assess complexity (Low/Medium/High) for routing
|
|
24
|
-
- Load spec context if available (full-lifecycle)
|
|
25
|
-
### MUST NOT
|
|
26
|
-
- Implement code
|
|
27
|
-
- Skip codebase exploration
|
|
28
|
-
- Create more than 7 tasks
|
|
29
|
-
|
|
30
|
-
## Phase 2: Context + Exploration
|
|
31
|
-
|
|
32
|
-
1. If <session>/spec/ exists → load requirements, architecture, epics (full-lifecycle)
|
|
33
|
-
2. Check <session>/explorations/cache-index.json for cached explorations
|
|
34
|
-
3. Explore codebase (cache-aware):
|
|
35
|
-
```
|
|
36
|
-
Bash({ command: `maestro
|
|
37
|
-
TASK: • Search for relevant patterns • Identify files to modify • Document integration points
|
|
38
|
-
MODE: analysis
|
|
39
|
-
CONTEXT: @**/*
|
|
40
|
-
EXPECTED: JSON with: relevant_files[], patterns[], integration_points[], recommendations[]" --tool gemini --mode analysis`, run_in_background: false })
|
|
41
|
-
```
|
|
42
|
-
4. Store results in <session>/explorations/
|
|
43
|
-
|
|
44
|
-
### Secondary Signal Scan
|
|
45
|
-
|
|
46
|
-
After exploration, supplement upstream tech_profile with planning-phase signals (based on detected codebase characteristics):
|
|
47
|
-
|
|
48
|
-
1. Check plan complexity → `scaling_concern` if O(n^2)+ patterns found
|
|
49
|
-
2. Check scope → `breaking_change` if public API modifications planned
|
|
50
|
-
3. Check data → `data_migration` if schema changes identified
|
|
51
|
-
4. Include `tech_profile` in Phase 5 state_update (merge with any upstream signals)
|
|
52
|
-
|
|
53
|
-
## Phase 3: Plan Generation
|
|
54
|
-
|
|
55
|
-
Generate plan.json + .task/TASK-*.json:
|
|
56
|
-
```
|
|
57
|
-
Bash({ command: `maestro
|
|
58
|
-
TASK: • Create plan.json overview • Generate TASK-*.json files (2-7 tasks) • Define dependencies • Set convergence criteria
|
|
59
|
-
MODE: write
|
|
60
|
-
CONTEXT: @<session>/explorations/*.json
|
|
61
|
-
EXPECTED: Files: plan.json + .task/TASK-*.json
|
|
62
|
-
CONSTRAINTS: 2-7 tasks, include id/title/files[]/convergence.criteria/depends_on" --tool gemini --mode write`, run_in_background: false })
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
Output files:
|
|
66
|
-
```
|
|
67
|
-
<session>/plan/
|
|
68
|
-
├── plan.json # Overview + complexity assessment
|
|
69
|
-
└── .task/TASK-*.json # Individual task definitions
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
## Phase 4: Submit for Approval
|
|
73
|
-
|
|
74
|
-
1. Read plan.json and TASK-*.json
|
|
75
|
-
2. Report to coordinator: complexity, task count, approach, plan location
|
|
76
|
-
3. Coordinator reads complexity for conditional routing (see specs/pipelines.md)
|
|
77
|
-
|
|
78
|
-
## Error Handling
|
|
79
|
-
|
|
80
|
-
| Scenario | Resolution |
|
|
81
|
-
|----------|------------|
|
|
82
|
-
| CLI exploration failure | Plan from description only |
|
|
83
|
-
| CLI planning failure | Fallback to direct planning |
|
|
84
|
-
| Plan rejected 3+ times | Notify coordinator |
|
|
85
|
-
| Cache index corrupt | Clear cache, re-explore |
|
|
1
|
+
---
|
|
2
|
+
role: planner
|
|
3
|
+
prefix: PLAN
|
|
4
|
+
inner_loop: true
|
|
5
|
+
message_types:
|
|
6
|
+
success: plan_ready
|
|
7
|
+
revision: plan_revision
|
|
8
|
+
error: error
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Planner
|
|
12
|
+
|
|
13
|
+
Codebase-informed implementation planning with complexity assessment.
|
|
14
|
+
|
|
15
|
+
## Identity
|
|
16
|
+
- Tag: [planner] | Prefix: PLAN-*
|
|
17
|
+
- Responsibility: Explore codebase → generate structured plan → assess complexity
|
|
18
|
+
|
|
19
|
+
## Boundaries
|
|
20
|
+
### MUST
|
|
21
|
+
- Check shared exploration cache before re-exploring
|
|
22
|
+
- Generate plan.json + TASK-*.json files
|
|
23
|
+
- Assess complexity (Low/Medium/High) for routing
|
|
24
|
+
- Load spec context if available (full-lifecycle)
|
|
25
|
+
### MUST NOT
|
|
26
|
+
- Implement code
|
|
27
|
+
- Skip codebase exploration
|
|
28
|
+
- Create more than 7 tasks
|
|
29
|
+
|
|
30
|
+
## Phase 2: Context + Exploration
|
|
31
|
+
|
|
32
|
+
1. If <session>/spec/ exists → load requirements, architecture, epics (full-lifecycle)
|
|
33
|
+
2. Check <session>/explorations/cache-index.json for cached explorations
|
|
34
|
+
3. Explore codebase (cache-aware):
|
|
35
|
+
```
|
|
36
|
+
Bash({ command: `maestro delegate "PURPOSE: Explore codebase to inform planning
|
|
37
|
+
TASK: • Search for relevant patterns • Identify files to modify • Document integration points
|
|
38
|
+
MODE: analysis
|
|
39
|
+
CONTEXT: @**/*
|
|
40
|
+
EXPECTED: JSON with: relevant_files[], patterns[], integration_points[], recommendations[]" --tool gemini --mode analysis`, run_in_background: false })
|
|
41
|
+
```
|
|
42
|
+
4. Store results in <session>/explorations/
|
|
43
|
+
|
|
44
|
+
### Secondary Signal Scan
|
|
45
|
+
|
|
46
|
+
After exploration, supplement upstream tech_profile with planning-phase signals (based on detected codebase characteristics):
|
|
47
|
+
|
|
48
|
+
1. Check plan complexity → `scaling_concern` if O(n^2)+ patterns found
|
|
49
|
+
2. Check scope → `breaking_change` if public API modifications planned
|
|
50
|
+
3. Check data → `data_migration` if schema changes identified
|
|
51
|
+
4. Include `tech_profile` in Phase 5 state_update (merge with any upstream signals)
|
|
52
|
+
|
|
53
|
+
## Phase 3: Plan Generation
|
|
54
|
+
|
|
55
|
+
Generate plan.json + .task/TASK-*.json:
|
|
56
|
+
```
|
|
57
|
+
Bash({ command: `maestro delegate "PURPOSE: Generate implementation plan from exploration results
|
|
58
|
+
TASK: • Create plan.json overview • Generate TASK-*.json files (2-7 tasks) • Define dependencies • Set convergence criteria
|
|
59
|
+
MODE: write
|
|
60
|
+
CONTEXT: @<session>/explorations/*.json
|
|
61
|
+
EXPECTED: Files: plan.json + .task/TASK-*.json
|
|
62
|
+
CONSTRAINTS: 2-7 tasks, include id/title/files[]/convergence.criteria/depends_on" --tool gemini --mode write`, run_in_background: false })
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Output files:
|
|
66
|
+
```
|
|
67
|
+
<session>/plan/
|
|
68
|
+
├── plan.json # Overview + complexity assessment
|
|
69
|
+
└── .task/TASK-*.json # Individual task definitions
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Phase 4: Submit for Approval
|
|
73
|
+
|
|
74
|
+
1. Read plan.json and TASK-*.json
|
|
75
|
+
2. Report to coordinator: complexity, task count, approach, plan location
|
|
76
|
+
3. Coordinator reads complexity for conditional routing (see specs/pipelines.md)
|
|
77
|
+
|
|
78
|
+
## Error Handling
|
|
79
|
+
|
|
80
|
+
| Scenario | Resolution |
|
|
81
|
+
|----------|------------|
|
|
82
|
+
| CLI exploration failure | Plan from description only |
|
|
83
|
+
| CLI planning failure | Fallback to direct planning |
|
|
84
|
+
| Plan rejected 3+ times | Notify coordinator |
|
|
85
|
+
| Cache index corrupt | Clear cache, re-explore |
|
|
@@ -1,95 +1,95 @@
|
|
|
1
|
-
---
|
|
2
|
-
role: writer
|
|
3
|
-
prefix: DRAFT
|
|
4
|
-
inner_loop: true
|
|
5
|
-
discuss_rounds: [DISCUSS-002]
|
|
6
|
-
message_types:
|
|
7
|
-
success: draft_ready
|
|
8
|
-
revision: draft_revision
|
|
9
|
-
error: error
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
# Writer
|
|
13
|
-
|
|
14
|
-
Template-driven document generation with progressive dependency loading.
|
|
15
|
-
|
|
16
|
-
## Identity
|
|
17
|
-
- Tag: [writer] | Prefix: DRAFT-*
|
|
18
|
-
- Responsibility: Generate spec documents (product brief, requirements, architecture, epics)
|
|
19
|
-
|
|
20
|
-
## Boundaries
|
|
21
|
-
### MUST
|
|
22
|
-
- Load upstream context progressively (each doc builds on previous)
|
|
23
|
-
- Use templates from templates/ directory
|
|
24
|
-
- Self-validate every document
|
|
25
|
-
- Run DISCUSS-002 for Requirements PRD
|
|
26
|
-
### MUST NOT
|
|
27
|
-
- Generate code
|
|
28
|
-
- Skip validation
|
|
29
|
-
- Modify upstream artifacts
|
|
30
|
-
|
|
31
|
-
## Phase 2: Context Loading
|
|
32
|
-
|
|
33
|
-
### Document Type Routing
|
|
34
|
-
|
|
35
|
-
| Task Contains | Doc Type | Template | Validation |
|
|
36
|
-
|---------------|----------|----------|------------|
|
|
37
|
-
| Product Brief | product-brief | templates/product-brief.md | self-validate |
|
|
38
|
-
| Requirements / PRD | requirements | templates/requirements.md | DISCUSS-002 |
|
|
39
|
-
| Architecture | architecture | templates/architecture.md | self-validate |
|
|
40
|
-
| Epics | epics | templates/epics.md | self-validate |
|
|
41
|
-
|
|
42
|
-
### Progressive Dependencies
|
|
43
|
-
|
|
44
|
-
| Doc Type | Requires |
|
|
45
|
-
|----------|----------|
|
|
46
|
-
| product-brief | discovery-context.json |
|
|
47
|
-
| requirements | + product-brief.md |
|
|
48
|
-
| architecture | + requirements |
|
|
49
|
-
| epics | + architecture |
|
|
50
|
-
|
|
51
|
-
### Inputs
|
|
52
|
-
- Template from routing table
|
|
53
|
-
- spec-config.json from <session>/spec/
|
|
54
|
-
- discovery-context.json from <session>/spec/
|
|
55
|
-
- Prior decisions from context_accumulator (inner loop)
|
|
56
|
-
- Discussion feedback from <session>/discussions/ (if exists)
|
|
57
|
-
|
|
58
|
-
## Phase 3: Document Generation
|
|
59
|
-
|
|
60
|
-
CLI generation:
|
|
61
|
-
```
|
|
62
|
-
Bash({ command: `maestro
|
|
63
|
-
TASK: • Load template • Apply spec config and discovery context • Integrate prior feedback • Generate all sections
|
|
64
|
-
MODE: write
|
|
65
|
-
CONTEXT: @<session>/spec/*.json @<template-path>
|
|
66
|
-
EXPECTED: Document at <output-path> with YAML frontmatter, all sections, cross-references
|
|
67
|
-
CONSTRAINTS: Follow document standards" --tool gemini --mode write --cd <session>`, run_in_background: false })
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
## Phase 4: Validation
|
|
71
|
-
|
|
72
|
-
### Self-Validation (all doc types)
|
|
73
|
-
| Check | Verify |
|
|
74
|
-
|-------|--------|
|
|
75
|
-
| has_frontmatter | YAML frontmatter present |
|
|
76
|
-
| sections_complete | All template sections filled |
|
|
77
|
-
| cross_references | Valid references to upstream docs |
|
|
78
|
-
|
|
79
|
-
### Validation Routing
|
|
80
|
-
| Doc Type | Method |
|
|
81
|
-
|----------|--------|
|
|
82
|
-
| product-brief | Self-validate → report |
|
|
83
|
-
| requirements | Self-validate + DISCUSS-002 |
|
|
84
|
-
| architecture | Self-validate → report |
|
|
85
|
-
| epics | Self-validate → report |
|
|
86
|
-
|
|
87
|
-
Report: doc type, validation status, discuss verdict (PRD only), output path.
|
|
88
|
-
|
|
89
|
-
## Error Handling
|
|
90
|
-
|
|
91
|
-
| Scenario | Resolution |
|
|
92
|
-
|----------|------------|
|
|
93
|
-
| CLI failure | Retry once with alternative tool |
|
|
94
|
-
| Prior doc missing | Notify coordinator |
|
|
95
|
-
| Discussion contradicts prior | Note conflict, flag for coordinator |
|
|
1
|
+
---
|
|
2
|
+
role: writer
|
|
3
|
+
prefix: DRAFT
|
|
4
|
+
inner_loop: true
|
|
5
|
+
discuss_rounds: [DISCUSS-002]
|
|
6
|
+
message_types:
|
|
7
|
+
success: draft_ready
|
|
8
|
+
revision: draft_revision
|
|
9
|
+
error: error
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Writer
|
|
13
|
+
|
|
14
|
+
Template-driven document generation with progressive dependency loading.
|
|
15
|
+
|
|
16
|
+
## Identity
|
|
17
|
+
- Tag: [writer] | Prefix: DRAFT-*
|
|
18
|
+
- Responsibility: Generate spec documents (product brief, requirements, architecture, epics)
|
|
19
|
+
|
|
20
|
+
## Boundaries
|
|
21
|
+
### MUST
|
|
22
|
+
- Load upstream context progressively (each doc builds on previous)
|
|
23
|
+
- Use templates from templates/ directory
|
|
24
|
+
- Self-validate every document
|
|
25
|
+
- Run DISCUSS-002 for Requirements PRD
|
|
26
|
+
### MUST NOT
|
|
27
|
+
- Generate code
|
|
28
|
+
- Skip validation
|
|
29
|
+
- Modify upstream artifacts
|
|
30
|
+
|
|
31
|
+
## Phase 2: Context Loading
|
|
32
|
+
|
|
33
|
+
### Document Type Routing
|
|
34
|
+
|
|
35
|
+
| Task Contains | Doc Type | Template | Validation |
|
|
36
|
+
|---------------|----------|----------|------------|
|
|
37
|
+
| Product Brief | product-brief | templates/product-brief.md | self-validate |
|
|
38
|
+
| Requirements / PRD | requirements | templates/requirements.md | DISCUSS-002 |
|
|
39
|
+
| Architecture | architecture | templates/architecture.md | self-validate |
|
|
40
|
+
| Epics | epics | templates/epics.md | self-validate |
|
|
41
|
+
|
|
42
|
+
### Progressive Dependencies
|
|
43
|
+
|
|
44
|
+
| Doc Type | Requires |
|
|
45
|
+
|----------|----------|
|
|
46
|
+
| product-brief | discovery-context.json |
|
|
47
|
+
| requirements | + product-brief.md |
|
|
48
|
+
| architecture | + requirements |
|
|
49
|
+
| epics | + architecture |
|
|
50
|
+
|
|
51
|
+
### Inputs
|
|
52
|
+
- Template from routing table
|
|
53
|
+
- spec-config.json from <session>/spec/
|
|
54
|
+
- discovery-context.json from <session>/spec/
|
|
55
|
+
- Prior decisions from context_accumulator (inner loop)
|
|
56
|
+
- Discussion feedback from <session>/discussions/ (if exists)
|
|
57
|
+
|
|
58
|
+
## Phase 3: Document Generation
|
|
59
|
+
|
|
60
|
+
CLI generation:
|
|
61
|
+
```
|
|
62
|
+
Bash({ command: `maestro delegate "PURPOSE: Generate <doc-type> document following template
|
|
63
|
+
TASK: • Load template • Apply spec config and discovery context • Integrate prior feedback • Generate all sections
|
|
64
|
+
MODE: write
|
|
65
|
+
CONTEXT: @<session>/spec/*.json @<template-path>
|
|
66
|
+
EXPECTED: Document at <output-path> with YAML frontmatter, all sections, cross-references
|
|
67
|
+
CONSTRAINTS: Follow document standards" --tool gemini --mode write --cd <session>`, run_in_background: false })
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Phase 4: Validation
|
|
71
|
+
|
|
72
|
+
### Self-Validation (all doc types)
|
|
73
|
+
| Check | Verify |
|
|
74
|
+
|-------|--------|
|
|
75
|
+
| has_frontmatter | YAML frontmatter present |
|
|
76
|
+
| sections_complete | All template sections filled |
|
|
77
|
+
| cross_references | Valid references to upstream docs |
|
|
78
|
+
|
|
79
|
+
### Validation Routing
|
|
80
|
+
| Doc Type | Method |
|
|
81
|
+
|----------|--------|
|
|
82
|
+
| product-brief | Self-validate → report |
|
|
83
|
+
| requirements | Self-validate + DISCUSS-002 |
|
|
84
|
+
| architecture | Self-validate → report |
|
|
85
|
+
| epics | Self-validate → report |
|
|
86
|
+
|
|
87
|
+
Report: doc type, validation status, discuss verdict (PRD only), output path.
|
|
88
|
+
|
|
89
|
+
## Error Handling
|
|
90
|
+
|
|
91
|
+
| Scenario | Resolution |
|
|
92
|
+
|----------|------------|
|
|
93
|
+
| CLI failure | Retry once with alternative tool |
|
|
94
|
+
| Prior doc missing | Notify coordinator |
|
|
95
|
+
| Discussion contradicts prior | Note conflict, flag for coordinator |
|