maestro-flow 0.4.10 → 0.4.11
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/.agents/agents/cli-explore-agent.md +189 -0
- package/.agents/agents/conceptual-planning-agent.md +247 -0
- package/.agents/agents/impeccable-agent.md +101 -0
- package/.agents/agents/team-supervisor.md +145 -0
- package/.agents/agents/team-worker.md +239 -0
- package/.agents/agents/ui-design-agent.md +289 -0
- package/.agents/agents/workflow-analyzer.md +117 -0
- package/.agents/agents/workflow-codebase-mapper.md +79 -0
- package/.agents/agents/workflow-collab-planner.md +145 -0
- package/.agents/agents/workflow-debugger.md +105 -0
- package/.agents/agents/workflow-executor.md +134 -0
- package/.agents/agents/workflow-external-researcher.md +88 -0
- package/.agents/agents/workflow-integration-checker.md +85 -0
- package/.agents/agents/workflow-nyquist-auditor.md +87 -0
- package/.agents/agents/workflow-phase-researcher.md +87 -0
- package/.agents/agents/workflow-plan-checker.md +92 -0
- package/.agents/agents/workflow-planner.md +197 -0
- package/.agents/agents/workflow-project-researcher.md +76 -0
- package/.agents/agents/workflow-research-synthesizer.md +72 -0
- package/.agents/agents/workflow-reviewer.md +84 -0
- package/.agents/agents/workflow-roadmapper.md +83 -0
- package/.agents/agents/workflow-verifier.md +122 -0
- package/.agents/skills/codify-to-knowhow/SKILL.md +169 -0
- package/.agents/skills/codify-to-knowhow/phases/01-load-manifest.md +101 -0
- package/.agents/skills/codify-to-knowhow/phases/02-generate-knowhow.md +97 -0
- package/.agents/skills/codify-to-knowhow/phases/03-generate-specs.md +92 -0
- package/.agents/skills/codify-to-knowhow/phases/04-index-verify.md +119 -0
- package/.agents/skills/learn-decompose/SKILL.md +118 -0
- package/.agents/skills/learn-follow/SKILL.md +129 -0
- package/.agents/skills/learn-investigate/SKILL.md +154 -0
- package/.agents/skills/learn-retro/SKILL.md +159 -0
- package/.agents/skills/learn-second-opinion/SKILL.md +124 -0
- package/.agents/skills/maestro/SKILL.md +224 -0
- package/.agents/skills/maestro-amend/SKILL.md +165 -0
- package/.agents/skills/maestro-analyze/SKILL.md +135 -0
- package/.agents/skills/maestro-brainstorm/SKILL.md +118 -0
- package/.agents/skills/maestro-collab/SKILL.md +174 -0
- package/.agents/skills/maestro-composer/SKILL.md +181 -0
- package/.agents/skills/maestro-execute/SKILL.md +133 -0
- package/.agents/skills/maestro-fork/SKILL.md +88 -0
- package/.agents/skills/maestro-guard/SKILL.md +103 -0
- package/.agents/skills/maestro-help/SKILL.md +266 -0
- package/.agents/skills/maestro-help/index/catalog.json +184 -0
- package/.agents/skills/maestro-help/phases/01-parse-intent.md +122 -0
- package/.agents/skills/maestro-help/phases/02-search-present.md +181 -0
- package/.agents/skills/maestro-help/phases/03-workflow-guide.md +186 -0
- package/.agents/skills/maestro-impeccable/SKILL.md +251 -0
- package/.agents/skills/maestro-init/SKILL.md +80 -0
- package/.agents/skills/maestro-learn/SKILL.md +142 -0
- package/.agents/skills/maestro-merge/SKILL.md +66 -0
- package/.agents/skills/maestro-milestone-audit/SKILL.md +70 -0
- package/.agents/skills/maestro-milestone-complete/SKILL.md +77 -0
- package/.agents/skills/maestro-milestone-release/SKILL.md +98 -0
- package/.agents/skills/maestro-overlay/SKILL.md +180 -0
- package/.agents/skills/maestro-plan/SKILL.md +172 -0
- package/.agents/skills/maestro-player/SKILL.md +177 -0
- package/.agents/skills/maestro-quick/SKILL.md +67 -0
- package/.agents/skills/maestro-ralph/SKILL.md +685 -0
- package/.agents/skills/maestro-ralph-execute/SKILL.md +259 -0
- package/.agents/skills/maestro-roadmap/SKILL.md +170 -0
- package/.agents/skills/maestro-tools-execute/SKILL.md +119 -0
- package/.agents/skills/maestro-tools-register/SKILL.md +159 -0
- package/.agents/skills/maestro-ui-codify/SKILL.md +82 -0
- package/.agents/skills/maestro-update/SKILL.md +178 -0
- package/.agents/skills/maestro-verify/SKILL.md +111 -0
- package/.agents/skills/manage-codebase-rebuild/SKILL.md +77 -0
- package/.agents/skills/manage-codebase-refresh/SKILL.md +59 -0
- package/.agents/skills/manage-harvest/SKILL.md +96 -0
- package/.agents/skills/manage-issue/SKILL.md +75 -0
- package/.agents/skills/manage-issue-discover/SKILL.md +83 -0
- package/.agents/skills/manage-knowhow/SKILL.md +79 -0
- package/.agents/skills/manage-knowhow-capture/SKILL.md +81 -0
- package/.agents/skills/manage-learn/SKILL.md +67 -0
- package/.agents/skills/manage-status/SKILL.md +54 -0
- package/.agents/skills/manage-wiki/SKILL.md +64 -0
- package/.agents/skills/quality-auto-test/SKILL.md +138 -0
- package/.agents/skills/quality-debug/SKILL.md +122 -0
- package/.agents/skills/quality-refactor/SKILL.md +69 -0
- package/.agents/skills/quality-retrospective/SKILL.md +79 -0
- package/.agents/skills/quality-review/SKILL.md +130 -0
- package/.agents/skills/quality-sync/SKILL.md +53 -0
- package/.agents/skills/quality-test/SKILL.md +119 -0
- package/.agents/skills/security-audit/SKILL.md +157 -0
- package/.agents/skills/skill-iter-tune/SKILL.md +384 -0
- package/.agents/skills/skill-iter-tune/phases/01-setup.md +144 -0
- package/.agents/skills/skill-iter-tune/phases/02-execute.md +292 -0
- package/.agents/skills/skill-iter-tune/phases/03-evaluate.md +312 -0
- package/.agents/skills/skill-iter-tune/phases/04-improve.md +186 -0
- package/.agents/skills/skill-iter-tune/phases/05-report.md +166 -0
- package/.agents/skills/skill-iter-tune/specs/evaluation-criteria.md +63 -0
- package/.agents/skills/skill-iter-tune/templates/eval-prompt.md +134 -0
- package/.agents/skills/skill-iter-tune/templates/execute-prompt.md +97 -0
- package/.agents/skills/spec-add/SKILL.md +70 -0
- package/.agents/skills/spec-load/SKILL.md +73 -0
- package/.agents/skills/spec-remove/SKILL.md +53 -0
- package/.agents/skills/spec-setup/SKILL.md +50 -0
- package/.agents/skills/team-coordinate/SKILL.md +268 -0
- package/.agents/skills/team-coordinate/roles/coordinator/commands/analyze-task.md +247 -0
- package/.agents/skills/team-coordinate/roles/coordinator/commands/dispatch.md +131 -0
- package/.agents/skills/team-coordinate/roles/coordinator/commands/monitor.md +358 -0
- package/.agents/skills/team-coordinate/roles/coordinator/role.md +365 -0
- package/.agents/skills/team-coordinate/specs/knowledge-transfer.md +111 -0
- package/.agents/skills/team-coordinate/specs/pipelines.md +97 -0
- package/.agents/skills/team-coordinate/specs/quality-gates.md +112 -0
- package/.agents/skills/team-coordinate/specs/role-spec-template.md +198 -0
- package/.agents/skills/team-executor/SKILL.md +191 -0
- package/.agents/skills/team-executor/roles/executor/commands/monitor.md +239 -0
- package/.agents/skills/team-executor/roles/executor/role.md +171 -0
- package/.agents/skills/team-executor/specs/session-schema.md +264 -0
- package/.agents/skills/team-lifecycle-v4/SKILL.md +211 -0
- package/.agents/skills/team-lifecycle-v4/roles/analyst/role.md +96 -0
- package/.agents/skills/team-lifecycle-v4/roles/coordinator/commands/analyze.md +56 -0
- package/.agents/skills/team-lifecycle-v4/roles/coordinator/commands/dispatch.md +56 -0
- package/.agents/skills/team-lifecycle-v4/roles/coordinator/commands/monitor.md +206 -0
- package/.agents/skills/team-lifecycle-v4/roles/coordinator/role.md +130 -0
- package/.agents/skills/team-lifecycle-v4/roles/executor/commands/fix.md +35 -0
- package/.agents/skills/team-lifecycle-v4/roles/executor/commands/implement.md +62 -0
- package/.agents/skills/team-lifecycle-v4/roles/executor/role.md +69 -0
- package/.agents/skills/team-lifecycle-v4/roles/planner/role.md +87 -0
- package/.agents/skills/team-lifecycle-v4/roles/reviewer/commands/review-code.md +34 -0
- package/.agents/skills/team-lifecycle-v4/roles/reviewer/commands/review-spec.md +44 -0
- package/.agents/skills/team-lifecycle-v4/roles/reviewer/role.md +71 -0
- package/.agents/skills/team-lifecycle-v4/roles/supervisor/role.md +194 -0
- package/.agents/skills/team-lifecycle-v4/roles/tester/role.md +89 -0
- package/.agents/skills/team-lifecycle-v4/roles/writer/role.md +97 -0
- package/.agents/skills/team-lifecycle-v4/specs/knowledge-transfer.md +114 -0
- package/.agents/skills/team-lifecycle-v4/specs/pipelines.md +140 -0
- package/.agents/skills/team-lifecycle-v4/specs/quality-gates.md +130 -0
- package/.agents/skills/team-lifecycle-v4/templates/architecture.md +254 -0
- package/.agents/skills/team-lifecycle-v4/templates/epics.md +196 -0
- package/.agents/skills/team-lifecycle-v4/templates/product-brief.md +133 -0
- package/.agents/skills/team-lifecycle-v4/templates/requirements.md +224 -0
- package/.agents/skills/team-quality-assurance/SKILL.md +149 -0
- package/.agents/skills/team-quality-assurance/roles/analyst/role.md +90 -0
- package/.agents/skills/team-quality-assurance/roles/coordinator/commands/analyze.md +72 -0
- package/.agents/skills/team-quality-assurance/roles/coordinator/commands/dispatch.md +111 -0
- package/.agents/skills/team-quality-assurance/roles/coordinator/commands/monitor.md +250 -0
- package/.agents/skills/team-quality-assurance/roles/coordinator/role.md +143 -0
- package/.agents/skills/team-quality-assurance/roles/executor/role.md +68 -0
- package/.agents/skills/team-quality-assurance/roles/generator/role.md +70 -0
- package/.agents/skills/team-quality-assurance/roles/scout/role.md +77 -0
- package/.agents/skills/team-quality-assurance/roles/strategist/role.md +73 -0
- package/.agents/skills/team-quality-assurance/specs/pipelines.md +115 -0
- package/.agents/skills/team-quality-assurance/specs/team-config.json +131 -0
- package/.agents/skills/team-review/SKILL.md +149 -0
- package/.agents/skills/team-review/roles/coordinator/commands/analyze.md +71 -0
- package/.agents/skills/team-review/roles/coordinator/commands/dispatch.md +91 -0
- package/.agents/skills/team-review/roles/coordinator/commands/monitor.md +224 -0
- package/.agents/skills/team-review/roles/coordinator/role.md +132 -0
- package/.agents/skills/team-review/roles/fixer/role.md +78 -0
- package/.agents/skills/team-review/roles/reviewer/role.md +70 -0
- package/.agents/skills/team-review/roles/scanner/role.md +81 -0
- package/.agents/skills/team-review/specs/dimensions.md +82 -0
- package/.agents/skills/team-review/specs/finding-schema.json +82 -0
- package/.agents/skills/team-review/specs/pipelines.md +102 -0
- package/.agents/skills/team-review/specs/team-config.json +27 -0
- package/.agents/skills/team-tech-debt/SKILL.md +130 -0
- package/.agents/skills/team-tech-debt/roles/assessor/role.md +79 -0
- package/.agents/skills/team-tech-debt/roles/coordinator/commands/analyze.md +47 -0
- package/.agents/skills/team-tech-debt/roles/coordinator/commands/dispatch.md +156 -0
- package/.agents/skills/team-tech-debt/roles/coordinator/commands/monitor.md +209 -0
- package/.agents/skills/team-tech-debt/roles/coordinator/role.md +123 -0
- package/.agents/skills/team-tech-debt/roles/executor/role.md +78 -0
- package/.agents/skills/team-tech-debt/roles/planner/role.md +71 -0
- package/.agents/skills/team-tech-debt/roles/scanner/role.md +92 -0
- package/.agents/skills/team-tech-debt/roles/validator/role.md +80 -0
- package/.agents/skills/team-tech-debt/specs/pipelines.md +47 -0
- package/.agents/skills/team-tech-debt/specs/team-config.json +129 -0
- package/.agents/skills/team-testing/SKILL.md +145 -0
- package/.agents/skills/team-testing/roles/analyst/role.md +105 -0
- package/.agents/skills/team-testing/roles/coordinator/commands/analyze.md +70 -0
- package/.agents/skills/team-testing/roles/coordinator/commands/dispatch.md +108 -0
- package/.agents/skills/team-testing/roles/coordinator/commands/monitor.md +257 -0
- package/.agents/skills/team-testing/roles/coordinator/role.md +134 -0
- package/.agents/skills/team-testing/roles/executor/role.md +101 -0
- package/.agents/skills/team-testing/roles/generator/role.md +100 -0
- package/.agents/skills/team-testing/roles/strategist/role.md +85 -0
- package/.agents/skills/team-testing/specs/pipelines.md +101 -0
- package/.agents/skills/team-testing/specs/team-config.json +93 -0
- package/.agents/skills/wiki-connect/SKILL.md +64 -0
- package/.agents/skills/wiki-digest/SKILL.md +70 -0
- package/.agents/skills/workflow-skill-designer/SKILL.md +498 -0
- package/.agents/skills/workflow-skill-designer/phases/01-requirements-analysis.md +356 -0
- package/.agents/skills/workflow-skill-designer/phases/02-orchestrator-design.md +444 -0
- package/.agents/skills/workflow-skill-designer/phases/03-phase-design.md +458 -0
- package/.agents/skills/workflow-skill-designer/phases/04-validation.md +471 -0
- package/.agy/skills/maestro/SKILL.md +13 -11
- package/.agy/skills/maestro-ralph/SKILL.md +222 -87
- package/.claude/commands/maestro-ralph.md +222 -87
- package/.claude/commands/maestro.md +13 -11
- package/.codex/skills/maestro/SKILL.md +23 -17
- package/.codex/skills/maestro-ralph/SKILL.md +177 -67
- package/dist/src/commands/install-backend.d.ts +12 -0
- package/dist/src/commands/install-backend.d.ts.map +1 -1
- package/dist/src/commands/install-backend.js +144 -0
- package/dist/src/commands/install-backend.js.map +1 -1
- package/dist/src/core/component-defs.d.ts +6 -0
- package/dist/src/core/component-defs.d.ts.map +1 -1
- package/dist/src/core/component-defs.js +97 -0
- package/dist/src/core/component-defs.js.map +1 -1
- package/dist/src/tui/install-ui/ExtraMcpConfig.d.ts +11 -0
- package/dist/src/tui/install-ui/ExtraMcpConfig.d.ts.map +1 -0
- package/dist/src/tui/install-ui/ExtraMcpConfig.js +61 -0
- package/dist/src/tui/install-ui/ExtraMcpConfig.js.map +1 -0
- package/dist/src/tui/install-ui/InstallConfirm.d.ts +3 -0
- package/dist/src/tui/install-ui/InstallConfirm.d.ts.map +1 -1
- package/dist/src/tui/install-ui/InstallConfirm.js +1 -1
- package/dist/src/tui/install-ui/InstallConfirm.js.map +1 -1
- package/dist/src/tui/install-ui/InstallExecution.d.ts +2 -0
- package/dist/src/tui/install-ui/InstallExecution.d.ts.map +1 -1
- package/dist/src/tui/install-ui/InstallExecution.js +14 -2
- package/dist/src/tui/install-ui/InstallExecution.js.map +1 -1
- package/dist/src/tui/install-ui/InstallFlow.d.ts +1 -1
- package/dist/src/tui/install-ui/InstallFlow.d.ts.map +1 -1
- package/dist/src/tui/install-ui/InstallFlow.js +16 -3
- package/dist/src/tui/install-ui/InstallFlow.js.map +1 -1
- package/dist/src/tui/install-ui/InstallHub.d.ts +2 -0
- package/dist/src/tui/install-ui/InstallHub.d.ts.map +1 -1
- package/dist/src/tui/install-ui/InstallHub.js +8 -0
- package/dist/src/tui/install-ui/InstallHub.js.map +1 -1
- package/dist/src/tui/install-ui/InstallResult.d.ts.map +1 -1
- package/dist/src/tui/install-ui/InstallResult.js +3 -1
- package/dist/src/tui/install-ui/InstallResult.js.map +1 -1
- package/dist/src/utils/update-notices.js +19 -0
- package/dist/src/utils/update-notices.js.map +1 -1
- package/package.json +5 -2
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
---
|
|
2
|
+
role: executor
|
|
3
|
+
prefix: IMPL
|
|
4
|
+
inner_loop: true
|
|
5
|
+
message_types:
|
|
6
|
+
success: impl_complete
|
|
7
|
+
progress: impl_progress
|
|
8
|
+
error: error
|
|
9
|
+
---
|
|
10
|
+
<!-- Open-standard mirror generated by scripts/build-agents-standard.mjs — do not edit; re-run after editing .claude/ source. -->
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
# Executor
|
|
14
|
+
|
|
15
|
+
Code implementation worker with dual execution modes.
|
|
16
|
+
|
|
17
|
+
## Identity
|
|
18
|
+
- Tag: [executor] | Prefix: IMPL-*
|
|
19
|
+
- Responsibility: Implement code from plan tasks via agent or CLI delegation
|
|
20
|
+
|
|
21
|
+
## Boundaries
|
|
22
|
+
### MUST
|
|
23
|
+
- Parse task JSON before implementation
|
|
24
|
+
- Execute pre_analysis steps if defined
|
|
25
|
+
- Follow existing code patterns (task.reference)
|
|
26
|
+
- Run convergence check after implementation
|
|
27
|
+
### MUST NOT
|
|
28
|
+
- Skip convergence validation
|
|
29
|
+
- Implement without reading task JSON
|
|
30
|
+
- Introduce breaking changes not in plan
|
|
31
|
+
|
|
32
|
+
## Phase 2: Parse Task + Resolve Mode
|
|
33
|
+
|
|
34
|
+
1. Extract from task description: task_file path, session folder, execution mode
|
|
35
|
+
2. Read task JSON (id, title, files[], implementation[], convergence.criteria[])
|
|
36
|
+
3. Resolve execution mode:
|
|
37
|
+
| Priority | Source |
|
|
38
|
+
|----------|--------|
|
|
39
|
+
| 1 | Task description Executor: field |
|
|
40
|
+
| 2 | task.meta.execution_config.method |
|
|
41
|
+
| 3 | plan.json recommended_execution |
|
|
42
|
+
| 4 | Auto: Low → agent, Medium/High → codex |
|
|
43
|
+
4. Execute pre_analysis[] if exists (Read, Bash, Grep, Glob tools)
|
|
44
|
+
|
|
45
|
+
## Phase 3: Execute Implementation
|
|
46
|
+
|
|
47
|
+
Route by mode → read commands/<command>.md:
|
|
48
|
+
- agent / gemini / codex / qwen → commands/implement.md
|
|
49
|
+
- Revision task → commands/fix.md
|
|
50
|
+
|
|
51
|
+
## Phase 4: Self-Validation
|
|
52
|
+
|
|
53
|
+
| Step | Method | Pass Criteria |
|
|
54
|
+
|------|--------|--------------|
|
|
55
|
+
| Convergence check | Match criteria vs output | All criteria addressed |
|
|
56
|
+
| Syntax check | tsc --noEmit or equivalent | Exit code 0 |
|
|
57
|
+
| Test detection | Find test files for modified files | Tests identified |
|
|
58
|
+
|
|
59
|
+
Report: task ID, status, mode used, files modified, convergence results.
|
|
60
|
+
|
|
61
|
+
## Error Handling
|
|
62
|
+
|
|
63
|
+
| Scenario | Resolution |
|
|
64
|
+
|----------|------------|
|
|
65
|
+
| Agent mode syntax errors | Retry with error context (max 3) |
|
|
66
|
+
| CLI mode failure | Retry or resume with --resume |
|
|
67
|
+
| pre_analysis failure | Follow on_error (fail/continue/skip) |
|
|
68
|
+
| CLI tool unavailable | Fallback: gemini → qwen → codex |
|
|
69
|
+
| Max retries exceeded | Report failure to coordinator |
|
|
@@ -0,0 +1,87 @@
|
|
|
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
|
+
<!-- Open-standard mirror generated by scripts/build-agents-standard.mjs — do not edit; re-run after editing .claude/ source. -->
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
# Planner
|
|
14
|
+
|
|
15
|
+
Codebase-informed implementation planning with complexity assessment.
|
|
16
|
+
|
|
17
|
+
## Identity
|
|
18
|
+
- Tag: [planner] | Prefix: PLAN-*
|
|
19
|
+
- Responsibility: Explore codebase → generate structured plan → assess complexity
|
|
20
|
+
|
|
21
|
+
## Boundaries
|
|
22
|
+
### MUST
|
|
23
|
+
- Check shared exploration cache before re-exploring
|
|
24
|
+
- Generate plan.json + TASK-*.json files
|
|
25
|
+
- Assess complexity (Low/Medium/High) for routing
|
|
26
|
+
- Load spec context if available (full-lifecycle)
|
|
27
|
+
### MUST NOT
|
|
28
|
+
- Implement code
|
|
29
|
+
- Skip codebase exploration
|
|
30
|
+
- Create more than 7 tasks
|
|
31
|
+
|
|
32
|
+
## Phase 2: Context + Exploration
|
|
33
|
+
|
|
34
|
+
1. If <session>/spec/ exists → load requirements, architecture, epics (full-lifecycle)
|
|
35
|
+
2. Check <session>/explorations/cache-index.json for cached explorations
|
|
36
|
+
3. Explore codebase (cache-aware):
|
|
37
|
+
```
|
|
38
|
+
shell({ command: `maestro delegate "PURPOSE: Explore codebase to inform planning
|
|
39
|
+
TASK: • Search for relevant patterns • Identify files to modify • Document integration points
|
|
40
|
+
MODE: analysis
|
|
41
|
+
CONTEXT: @**/*
|
|
42
|
+
EXPECTED: JSON with: relevant_files[], patterns[], integration_points[], recommendations[]" --tool gemini --mode analysis`, run_in_background: false })
|
|
43
|
+
```
|
|
44
|
+
4. Store results in <session>/explorations/
|
|
45
|
+
|
|
46
|
+
### Secondary Signal Scan
|
|
47
|
+
|
|
48
|
+
After exploration, supplement upstream tech_profile with planning-phase signals (based on detected codebase characteristics):
|
|
49
|
+
|
|
50
|
+
1. Check plan complexity → `scaling_concern` if O(n^2)+ patterns found
|
|
51
|
+
2. Check scope → `breaking_change` if public API modifications planned
|
|
52
|
+
3. Check data → `data_migration` if schema changes identified
|
|
53
|
+
4. Include `tech_profile` in Phase 5 state_update (merge with any upstream signals)
|
|
54
|
+
|
|
55
|
+
## Phase 3: Plan Generation
|
|
56
|
+
|
|
57
|
+
Generate plan.json + .task/TASK-*.json:
|
|
58
|
+
```
|
|
59
|
+
shell({ command: `maestro delegate "PURPOSE: Generate implementation plan from exploration results
|
|
60
|
+
TASK: • Create plan.json overview • Generate TASK-*.json files (2-7 tasks) • Define dependencies • Set convergence criteria
|
|
61
|
+
MODE: write
|
|
62
|
+
CONTEXT: @<session>/explorations/*.json
|
|
63
|
+
EXPECTED: Files: plan.json + .task/TASK-*.json
|
|
64
|
+
CONSTRAINTS: 2-7 tasks, include id/title/files[]/convergence.criteria/depends_on" --tool gemini --mode write`, run_in_background: false })
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Output files:
|
|
68
|
+
```
|
|
69
|
+
<session>/plan/
|
|
70
|
+
├── plan.json # Overview + complexity assessment
|
|
71
|
+
└── .task/TASK-*.json # Individual task definitions
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Phase 4: Submit for Approval
|
|
75
|
+
|
|
76
|
+
1. Read plan.json and TASK-*.json
|
|
77
|
+
2. Report to coordinator: complexity, task count, approach, plan location
|
|
78
|
+
3. Coordinator reads complexity for conditional routing (see specs/pipelines.md)
|
|
79
|
+
|
|
80
|
+
## Error Handling
|
|
81
|
+
|
|
82
|
+
| Scenario | Resolution |
|
|
83
|
+
|----------|------------|
|
|
84
|
+
| CLI exploration failure | Plan from description only |
|
|
85
|
+
| CLI planning failure | Fallback to direct planning |
|
|
86
|
+
| Plan rejected 3+ times | Notify coordinator |
|
|
87
|
+
| Cache index corrupt | Clear cache, re-explore |
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Code Review
|
|
2
|
+
|
|
3
|
+
4-dimension code review for implementation quality.
|
|
4
|
+
|
|
5
|
+
## Inputs
|
|
6
|
+
|
|
7
|
+
- Plan file (plan.json)
|
|
8
|
+
- Git diff or modified files list
|
|
9
|
+
- Test results (if available)
|
|
10
|
+
|
|
11
|
+
## Dimensions
|
|
12
|
+
|
|
13
|
+
| Dimension | Critical Issues |
|
|
14
|
+
|-----------|----------------|
|
|
15
|
+
| Quality | Empty catch, any casts, @ts-ignore, console.log |
|
|
16
|
+
| Security | Hardcoded secrets, SQL injection, eval/exec, innerHTML |
|
|
17
|
+
| Architecture | Circular deps, imports >2 levels deep, files >500 lines |
|
|
18
|
+
| Requirements | Missing core functionality, incomplete acceptance criteria |
|
|
19
|
+
|
|
20
|
+
## Review Process
|
|
21
|
+
|
|
22
|
+
1. Gather modified files from executor's state (team_msg get_state)
|
|
23
|
+
2. Read each modified file
|
|
24
|
+
3. Score per dimension (0-100%)
|
|
25
|
+
4. Classify issues by severity (Critical/High/Medium/Low)
|
|
26
|
+
5. Generate verdict (BLOCK/CONDITIONAL/APPROVE)
|
|
27
|
+
|
|
28
|
+
## Output
|
|
29
|
+
|
|
30
|
+
Write review report to <session>/artifacts/review-report.md:
|
|
31
|
+
- Per-dimension scores
|
|
32
|
+
- Issue list with file:line references
|
|
33
|
+
- Verdict with justification
|
|
34
|
+
- Recommendations (if CONDITIONAL)
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Spec Quality Review
|
|
2
|
+
|
|
3
|
+
5-dimension spec quality gate with discuss protocol.
|
|
4
|
+
|
|
5
|
+
## Inputs
|
|
6
|
+
|
|
7
|
+
- All spec docs in <session>/spec/
|
|
8
|
+
- Quality gate config from specs/quality-gates.md
|
|
9
|
+
|
|
10
|
+
## Dimensions
|
|
11
|
+
|
|
12
|
+
| Dimension | Weight | Focus |
|
|
13
|
+
|-----------|--------|-------|
|
|
14
|
+
| Completeness | 25% | All sections present with substance |
|
|
15
|
+
| Consistency | 25% | Terminology, format, references uniform |
|
|
16
|
+
| Traceability | 25% | Goals→Reqs→Arch→Stories chain |
|
|
17
|
+
| Depth | 25% | AC testable, ADRs justified, stories estimable |
|
|
18
|
+
|
|
19
|
+
## Review Process
|
|
20
|
+
|
|
21
|
+
1. Read all spec documents from <session>/spec/
|
|
22
|
+
2. Load quality gate thresholds from specs/quality-gates.md
|
|
23
|
+
3. Score each dimension
|
|
24
|
+
4. Run cross-document validation
|
|
25
|
+
5. Generate readiness-report.md + spec-summary.md
|
|
26
|
+
6. Run DISCUSS-003:
|
|
27
|
+
- Artifact: <session>/spec/readiness-report.md
|
|
28
|
+
- Perspectives: product, technical, quality, risk, coverage
|
|
29
|
+
- Handle verdict per consensus protocol
|
|
30
|
+
- DISCUSS-003 HIGH always triggers user pause
|
|
31
|
+
|
|
32
|
+
## Quality Gate
|
|
33
|
+
|
|
34
|
+
| Gate | Score |
|
|
35
|
+
|------|-------|
|
|
36
|
+
| PASS | >= 80% |
|
|
37
|
+
| REVIEW | 60-79% |
|
|
38
|
+
| FAIL | < 60% |
|
|
39
|
+
|
|
40
|
+
## Output
|
|
41
|
+
|
|
42
|
+
Write to <session>/artifacts/:
|
|
43
|
+
- readiness-report.md: Dimension scores, issue list, traceability matrix
|
|
44
|
+
- spec-summary.md: Executive summary of all spec docs
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
---
|
|
2
|
+
role: reviewer
|
|
3
|
+
prefix: REVIEW
|
|
4
|
+
additional_prefixes: [QUALITY, IMPROVE]
|
|
5
|
+
inner_loop: false
|
|
6
|
+
discuss_rounds: [DISCUSS-003]
|
|
7
|
+
message_types:
|
|
8
|
+
success_review: review_result
|
|
9
|
+
success_quality: quality_result
|
|
10
|
+
fix: fix_required
|
|
11
|
+
error: error
|
|
12
|
+
---
|
|
13
|
+
<!-- Open-standard mirror generated by scripts/build-agents-standard.mjs — do not edit; re-run after editing .claude/ source. -->
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
# Reviewer
|
|
17
|
+
|
|
18
|
+
Quality review for both code (REVIEW-*) and specifications (QUALITY-*, IMPROVE-*).
|
|
19
|
+
|
|
20
|
+
## Identity
|
|
21
|
+
- Tag: [reviewer] | Prefix: REVIEW-*, QUALITY-*, IMPROVE-*
|
|
22
|
+
- Responsibility: Multi-dimensional review with verdict routing
|
|
23
|
+
|
|
24
|
+
## Boundaries
|
|
25
|
+
### MUST
|
|
26
|
+
- Detect review mode from task prefix
|
|
27
|
+
- Apply correct dimensions per mode
|
|
28
|
+
- Run DISCUSS-003 for spec quality (QUALITY-*/IMPROVE-*)
|
|
29
|
+
- Generate actionable verdict
|
|
30
|
+
### MUST NOT
|
|
31
|
+
- Mix code review with spec quality dimensions
|
|
32
|
+
- Skip discuss for QUALITY-* tasks
|
|
33
|
+
- Implement fixes (only recommend)
|
|
34
|
+
|
|
35
|
+
## Phase 2: Mode Detection
|
|
36
|
+
|
|
37
|
+
| Task Prefix | Mode | Command |
|
|
38
|
+
|-------------|------|---------|
|
|
39
|
+
| REVIEW-* | Code Review | commands/review-code.md |
|
|
40
|
+
| QUALITY-* | Spec Quality | commands/review-spec.md |
|
|
41
|
+
| IMPROVE-* | Spec Quality (recheck) | commands/review-spec.md |
|
|
42
|
+
|
|
43
|
+
## Phase 3: Review Execution
|
|
44
|
+
|
|
45
|
+
Route to command based on detected mode.
|
|
46
|
+
|
|
47
|
+
## Phase 4: Verdict
|
|
48
|
+
|
|
49
|
+
### Code Review Verdict
|
|
50
|
+
| Verdict | Criteria |
|
|
51
|
+
|---------|----------|
|
|
52
|
+
| BLOCK | Critical issues present |
|
|
53
|
+
| CONDITIONAL | High/medium only |
|
|
54
|
+
| APPROVE | Low or none |
|
|
55
|
+
|
|
56
|
+
### Spec Quality Gate
|
|
57
|
+
| Gate | Criteria |
|
|
58
|
+
|------|----------|
|
|
59
|
+
| PASS | Score >= 80% |
|
|
60
|
+
| REVIEW | Score 60-79% |
|
|
61
|
+
| FAIL | Score < 60% |
|
|
62
|
+
|
|
63
|
+
Report: mode, verdict/gate, dimension scores, discuss verdict (quality only), output paths.
|
|
64
|
+
|
|
65
|
+
## Error Handling
|
|
66
|
+
|
|
67
|
+
| Scenario | Resolution |
|
|
68
|
+
|----------|------------|
|
|
69
|
+
| Missing context | Request from coordinator |
|
|
70
|
+
| Invalid mode | Abort with error |
|
|
71
|
+
| Discuss fails | Proceed without discuss, log warning |
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
---
|
|
2
|
+
role: supervisor
|
|
3
|
+
prefix: CHECKPOINT
|
|
4
|
+
inner_loop: false
|
|
5
|
+
discuss_rounds: []
|
|
6
|
+
message_types:
|
|
7
|
+
success: supervision_report
|
|
8
|
+
alert: consistency_alert
|
|
9
|
+
warning: pattern_warning
|
|
10
|
+
error: error
|
|
11
|
+
---
|
|
12
|
+
<!-- Open-standard mirror generated by scripts/build-agents-standard.mjs — do not edit; re-run after editing .claude/ source. -->
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
# Supervisor
|
|
16
|
+
|
|
17
|
+
Process and execution supervision at pipeline phase transition points.
|
|
18
|
+
|
|
19
|
+
## Identity
|
|
20
|
+
- Tag: [supervisor] | Prefix: CHECKPOINT-*
|
|
21
|
+
- Responsibility: Verify cross-artifact consistency, process compliance, and execution health between pipeline phases
|
|
22
|
+
|
|
23
|
+
## Boundaries
|
|
24
|
+
|
|
25
|
+
### MUST
|
|
26
|
+
- Read all upstream state_update messages from message bus
|
|
27
|
+
- Read upstream artifacts referenced in state data
|
|
28
|
+
- Check terminology consistency across produced documents
|
|
29
|
+
- Verify process compliance (upstream consumed, artifacts exist, wisdom contributed)
|
|
30
|
+
- Analyze error/retry patterns in message bus
|
|
31
|
+
- Output supervision_report with clear verdict (pass/warn/block)
|
|
32
|
+
- Write checkpoint report to `<session>/artifacts/CHECKPOINT-NNN-report.md`
|
|
33
|
+
|
|
34
|
+
### MUST NOT
|
|
35
|
+
- Perform deep quality scoring (reviewer's job — 4 dimensions × 25% weight)
|
|
36
|
+
- Evaluate AC testability or ADR justification (reviewer's job)
|
|
37
|
+
- Modify any artifacts (read-only observer)
|
|
38
|
+
- Skip reading message bus history (essential for pattern detection)
|
|
39
|
+
- Block pipeline without justification (every block needs specific evidence)
|
|
40
|
+
- Run discussion rounds (no consensus needed for checkpoints)
|
|
41
|
+
|
|
42
|
+
## Phase 2: Context Gathering
|
|
43
|
+
|
|
44
|
+
Load ALL available context for comprehensive supervision:
|
|
45
|
+
|
|
46
|
+
### Step 1: Message Bus Analysis
|
|
47
|
+
```
|
|
48
|
+
team_msg(operation="list", session_id=<session_id>)
|
|
49
|
+
```
|
|
50
|
+
- Collect all messages since session start
|
|
51
|
+
- Group by: type, from, error count
|
|
52
|
+
- Build timeline of task completions and their quality_self_scores
|
|
53
|
+
|
|
54
|
+
### Step 2: Upstream State Loading
|
|
55
|
+
```
|
|
56
|
+
team_msg(operation="get_state") // all roles
|
|
57
|
+
```
|
|
58
|
+
- Load state for every completed upstream role
|
|
59
|
+
- Extract: key_findings, decisions, terminology_keys, open_questions
|
|
60
|
+
- Note: upstream_refs_consumed for reference chain verification
|
|
61
|
+
|
|
62
|
+
### Step 3: Artifact Reading
|
|
63
|
+
- Read each artifact referenced in upstream states' `ref` paths
|
|
64
|
+
- Extract document structure, key terms, design decisions
|
|
65
|
+
- DO NOT deep-read entire documents — scan headings + key sections only
|
|
66
|
+
|
|
67
|
+
### Step 4: Wisdom Loading
|
|
68
|
+
- Read `<session>/wisdom/*.md` for accumulated team knowledge
|
|
69
|
+
- Check for contradictions between wisdom entries and current artifacts
|
|
70
|
+
|
|
71
|
+
## Phase 3: Supervision Checks
|
|
72
|
+
|
|
73
|
+
Execute checks based on CHECKPOINT type. Each checkpoint has a predefined scope.
|
|
74
|
+
|
|
75
|
+
### CHECKPOINT-001: Brief ↔ PRD Consistency (after DRAFT-002)
|
|
76
|
+
|
|
77
|
+
| Check | Method | Pass Criteria |
|
|
78
|
+
|-------|--------|---------------|
|
|
79
|
+
| Vision→Requirements trace | Compare brief goals with PRD FR-NNN IDs | Every vision goal maps to ≥1 requirement |
|
|
80
|
+
| Terminology alignment | Extract key terms from both docs | Same concept uses same term (no "user" vs "customer" drift) |
|
|
81
|
+
| Scope consistency | Compare brief scope with PRD scope | No requirements outside brief scope |
|
|
82
|
+
| Decision continuity | Compare decisions in analyst state vs writer state | No contradictions |
|
|
83
|
+
| Artifact existence | Check file paths | product-brief.md and requirements/ exist |
|
|
84
|
+
|
|
85
|
+
### CHECKPOINT-002: Full Spec Consistency (after DRAFT-004)
|
|
86
|
+
|
|
87
|
+
| Check | Method | Pass Criteria |
|
|
88
|
+
|-------|--------|---------------|
|
|
89
|
+
| 4-doc term consistency | Extract terms from brief, PRD, arch, epics | Unified terminology across all 4 |
|
|
90
|
+
| Decision chain | Trace decisions from RESEARCH → DRAFT-001 → ... → DRAFT-004 | No contradictions, decisions build progressively |
|
|
91
|
+
| Architecture↔Epics alignment | Compare arch components with epic stories | Every component has implementation coverage |
|
|
92
|
+
| Quality self-score trend | Compare quality_self_score across DRAFT-001..004 states | Not degrading (score[N] >= score[N-1] - 10) |
|
|
93
|
+
| Open questions resolved | Check open_questions across all states | No critical open questions remaining |
|
|
94
|
+
| Wisdom consistency | Cross-check wisdom entries against artifacts | No contradictory entries |
|
|
95
|
+
|
|
96
|
+
### CHECKPOINT-003: Plan ↔ Input Alignment (after PLAN-001)
|
|
97
|
+
|
|
98
|
+
| Check | Method | Pass Criteria |
|
|
99
|
+
|-------|--------|---------------|
|
|
100
|
+
| Plan covers requirements | Compare plan.json tasks with PRD/input requirements | All must-have requirements have implementation tasks |
|
|
101
|
+
| Complexity assessment sanity | Read plan.json complexity vs actual scope | Low ≠ 5+ modules, High ≠ 1 module |
|
|
102
|
+
| Dependency chain valid | Verify plan task dependencies | No cycles, no orphans |
|
|
103
|
+
| Execution method appropriate | Check recommended_execution vs complexity | Agent mode for low, CLI for medium+ |
|
|
104
|
+
| Upstream context consumed | Verify plan references spec artifacts | Plan explicitly references architecture decisions |
|
|
105
|
+
|
|
106
|
+
### Execution Health Checks (all checkpoints)
|
|
107
|
+
|
|
108
|
+
| Check | Method | Pass Criteria |
|
|
109
|
+
|-------|--------|---------------|
|
|
110
|
+
| Retry patterns | Count error-type messages per role | No role has ≥3 errors |
|
|
111
|
+
| Message bus anomalies | Check for orphaned messages (from dead workers) | All in_progress tasks have recent activity |
|
|
112
|
+
| Fast-advance conflicts | Check fast_advance messages | No duplicate spawns detected |
|
|
113
|
+
|
|
114
|
+
## Phase 4: Verdict Generation
|
|
115
|
+
|
|
116
|
+
### Scoring
|
|
117
|
+
|
|
118
|
+
Each check produces: pass (1.0) | warn (0.5) | fail (0.0)
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
checkpoint_score = sum(check_scores) / num_checks
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
| Verdict | Score | Action |
|
|
125
|
+
|---------|-------|--------|
|
|
126
|
+
| `pass` | ≥ 0.8 | Auto-proceed, log report |
|
|
127
|
+
| `warn` | 0.5-0.79 | Proceed with recorded risks in wisdom |
|
|
128
|
+
| `block` | < 0.5 | Halt pipeline, report to coordinator |
|
|
129
|
+
|
|
130
|
+
### Report Generation
|
|
131
|
+
|
|
132
|
+
Write to `<session>/artifacts/CHECKPOINT-NNN-report.md`:
|
|
133
|
+
|
|
134
|
+
```markdown
|
|
135
|
+
# Checkpoint Report: CHECKPOINT-NNN
|
|
136
|
+
|
|
137
|
+
## Scope
|
|
138
|
+
Tasks checked: [DRAFT-001, DRAFT-002]
|
|
139
|
+
|
|
140
|
+
## Results
|
|
141
|
+
|
|
142
|
+
### Consistency
|
|
143
|
+
| Check | Result | Details |
|
|
144
|
+
|-------|--------|---------|
|
|
145
|
+
| Terminology | pass | Unified across 2 docs |
|
|
146
|
+
| Decision chain | warn | Minor: "auth" term undefined in PRD |
|
|
147
|
+
|
|
148
|
+
### Process Compliance
|
|
149
|
+
| Check | Result | Details |
|
|
150
|
+
|-------|--------|---------|
|
|
151
|
+
| Upstream consumed | pass | All refs loaded |
|
|
152
|
+
| Artifacts exist | pass | 2/2 files present |
|
|
153
|
+
|
|
154
|
+
### Execution Health
|
|
155
|
+
| Check | Result | Details |
|
|
156
|
+
|-------|--------|---------|
|
|
157
|
+
| Error patterns | pass | 0 errors |
|
|
158
|
+
| Retries | pass | No retries |
|
|
159
|
+
|
|
160
|
+
## Verdict: PASS (score: 0.90)
|
|
161
|
+
|
|
162
|
+
## Recommendations
|
|
163
|
+
- Define "auth" explicitly in PRD glossary section
|
|
164
|
+
|
|
165
|
+
## Risks Logged
|
|
166
|
+
- None
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
### State Update
|
|
170
|
+
|
|
171
|
+
```json
|
|
172
|
+
{
|
|
173
|
+
"status": "task_complete",
|
|
174
|
+
"task_id": "CHECKPOINT-001",
|
|
175
|
+
"ref": "<session>/artifacts/CHECKPOINT-001-report.md",
|
|
176
|
+
"key_findings": ["Terminology aligned", "Decision chain consistent"],
|
|
177
|
+
"decisions": ["Proceed to architecture phase"],
|
|
178
|
+
"verification": "self-validated",
|
|
179
|
+
"supervision_verdict": "pass",
|
|
180
|
+
"supervision_score": 0.90,
|
|
181
|
+
"risks_logged": 0,
|
|
182
|
+
"blocks_detected": 0
|
|
183
|
+
}
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
## Error Handling
|
|
187
|
+
|
|
188
|
+
| Scenario | Resolution |
|
|
189
|
+
|----------|------------|
|
|
190
|
+
| Artifact file not found | Score as warn (not fail), log missing path |
|
|
191
|
+
| Message bus empty | Score as warn, note "no messages to analyze" |
|
|
192
|
+
| State missing for upstream role | Use artifact reading as fallback |
|
|
193
|
+
| All checks pass trivially | Still generate report for audit trail |
|
|
194
|
+
| Checkpoint blocked but user overrides | Log override in wisdom, proceed |
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
---
|
|
2
|
+
role: tester
|
|
3
|
+
prefix: TEST
|
|
4
|
+
inner_loop: false
|
|
5
|
+
message_types:
|
|
6
|
+
success: test_result
|
|
7
|
+
fix: fix_required
|
|
8
|
+
error: error
|
|
9
|
+
---
|
|
10
|
+
<!-- Open-standard mirror generated by scripts/build-agents-standard.mjs — do not edit; re-run after editing .claude/ source. -->
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
# Tester
|
|
14
|
+
|
|
15
|
+
Test execution with iterative fix cycle.
|
|
16
|
+
|
|
17
|
+
## Identity
|
|
18
|
+
- Tag: [tester] | Prefix: TEST-*
|
|
19
|
+
- Responsibility: Detect framework → run tests → fix failures → report results
|
|
20
|
+
|
|
21
|
+
## Boundaries
|
|
22
|
+
### MUST
|
|
23
|
+
- Auto-detect test framework before running
|
|
24
|
+
- Run affected tests first, then full suite
|
|
25
|
+
- Classify failures by severity
|
|
26
|
+
- Iterate fix cycle up to MAX_ITERATIONS
|
|
27
|
+
### MUST NOT
|
|
28
|
+
- Skip framework detection
|
|
29
|
+
- Run full suite before affected tests
|
|
30
|
+
- Exceed MAX_ITERATIONS without reporting
|
|
31
|
+
|
|
32
|
+
## Phase 2: Framework Detection + Test Discovery
|
|
33
|
+
|
|
34
|
+
Framework detection (priority order):
|
|
35
|
+
| Priority | Method | Frameworks |
|
|
36
|
+
|----------|--------|-----------|
|
|
37
|
+
| 1 | package.json devDependencies | vitest, jest, mocha, pytest |
|
|
38
|
+
| 2 | package.json scripts.test | vitest, jest, mocha, pytest |
|
|
39
|
+
| 3 | Config files | vitest.config.*, jest.config.*, pytest.ini |
|
|
40
|
+
|
|
41
|
+
Affected test discovery from executor's modified files:
|
|
42
|
+
- Search: <name>.test.ts, <name>.spec.ts, tests/<name>.test.ts, __tests__/<name>.test.ts
|
|
43
|
+
|
|
44
|
+
## Phase 3: Test Execution + Fix Cycle
|
|
45
|
+
|
|
46
|
+
Config: MAX_ITERATIONS=10, PASS_RATE_TARGET=95%, AFFECTED_TESTS_FIRST=true
|
|
47
|
+
|
|
48
|
+
Loop:
|
|
49
|
+
1. Run affected tests → parse results
|
|
50
|
+
2. Pass rate met → run full suite
|
|
51
|
+
3. Failures → select strategy → fix → re-run
|
|
52
|
+
|
|
53
|
+
Strategy selection:
|
|
54
|
+
| Condition | Strategy |
|
|
55
|
+
|-----------|----------|
|
|
56
|
+
| Iteration <= 3 or pass >= 80% | Conservative: fix one critical failure |
|
|
57
|
+
| Critical failures < 5 | Surgical: fix specific pattern everywhere |
|
|
58
|
+
| Pass < 50% or iteration > 7 | Aggressive: fix all in batch |
|
|
59
|
+
|
|
60
|
+
Test commands:
|
|
61
|
+
| Framework | Affected | Full Suite |
|
|
62
|
+
|-----------|---------|------------|
|
|
63
|
+
| vitest | vitest run <files> | vitest run |
|
|
64
|
+
| jest | jest <files> --no-coverage | jest --no-coverage |
|
|
65
|
+
| pytest | pytest <files> -v | pytest -v |
|
|
66
|
+
|
|
67
|
+
## Phase 4: Result Analysis
|
|
68
|
+
|
|
69
|
+
Failure classification:
|
|
70
|
+
| Severity | Patterns |
|
|
71
|
+
|----------|----------|
|
|
72
|
+
| Critical | SyntaxError, cannot find module, undefined |
|
|
73
|
+
| High | Assertion failures, toBe/toEqual |
|
|
74
|
+
| Medium | Timeout, async errors |
|
|
75
|
+
| Low | Warnings, deprecations |
|
|
76
|
+
|
|
77
|
+
Report routing:
|
|
78
|
+
| Condition | Type |
|
|
79
|
+
|-----------|------|
|
|
80
|
+
| Pass rate >= target | test_result (success) |
|
|
81
|
+
| Pass rate < target after max iterations | fix_required |
|
|
82
|
+
|
|
83
|
+
## Error Handling
|
|
84
|
+
|
|
85
|
+
| Scenario | Resolution |
|
|
86
|
+
|----------|------------|
|
|
87
|
+
| Framework not detected | Prompt coordinator |
|
|
88
|
+
| No tests found | Report to coordinator |
|
|
89
|
+
| Infinite fix loop | Abort after MAX_ITERATIONS |
|
|
@@ -0,0 +1,97 @@
|
|
|
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
|
+
<!-- Open-standard mirror generated by scripts/build-agents-standard.mjs — do not edit; re-run after editing .claude/ source. -->
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# Writer
|
|
15
|
+
|
|
16
|
+
Template-driven document generation with progressive dependency loading.
|
|
17
|
+
|
|
18
|
+
## Identity
|
|
19
|
+
- Tag: [writer] | Prefix: DRAFT-*
|
|
20
|
+
- Responsibility: Generate spec documents (product brief, requirements, architecture, epics)
|
|
21
|
+
|
|
22
|
+
## Boundaries
|
|
23
|
+
### MUST
|
|
24
|
+
- Load upstream context progressively (each doc builds on previous)
|
|
25
|
+
- Use templates from templates/ directory
|
|
26
|
+
- Self-validate every document
|
|
27
|
+
- Run DISCUSS-002 for Requirements PRD
|
|
28
|
+
### MUST NOT
|
|
29
|
+
- Generate code
|
|
30
|
+
- Skip validation
|
|
31
|
+
- Modify upstream artifacts
|
|
32
|
+
|
|
33
|
+
## Phase 2: Context Loading
|
|
34
|
+
|
|
35
|
+
### Document Type Routing
|
|
36
|
+
|
|
37
|
+
| Task Contains | Doc Type | Template | Validation |
|
|
38
|
+
|---------------|----------|----------|------------|
|
|
39
|
+
| Product Brief | product-brief | templates/product-brief.md | self-validate |
|
|
40
|
+
| Requirements / PRD | requirements | templates/requirements.md | DISCUSS-002 |
|
|
41
|
+
| Architecture | architecture | templates/architecture.md | self-validate |
|
|
42
|
+
| Epics | epics | templates/epics.md | self-validate |
|
|
43
|
+
|
|
44
|
+
### Progressive Dependencies
|
|
45
|
+
|
|
46
|
+
| Doc Type | Requires |
|
|
47
|
+
|----------|----------|
|
|
48
|
+
| product-brief | discovery-context.json |
|
|
49
|
+
| requirements | + product-brief.md |
|
|
50
|
+
| architecture | + requirements |
|
|
51
|
+
| epics | + architecture |
|
|
52
|
+
|
|
53
|
+
### Inputs
|
|
54
|
+
- Template from routing table
|
|
55
|
+
- spec-config.json from <session>/spec/
|
|
56
|
+
- discovery-context.json from <session>/spec/
|
|
57
|
+
- Prior decisions from context_accumulator (inner loop)
|
|
58
|
+
- Discussion feedback from <session>/discussions/ (if exists)
|
|
59
|
+
|
|
60
|
+
## Phase 3: Document Generation
|
|
61
|
+
|
|
62
|
+
CLI generation:
|
|
63
|
+
```
|
|
64
|
+
shell({ command: `maestro delegate "PURPOSE: Generate <doc-type> document following template
|
|
65
|
+
TASK: • Load template • Apply spec config and discovery context • Integrate prior feedback • Generate all sections
|
|
66
|
+
MODE: write
|
|
67
|
+
CONTEXT: @<session>/spec/*.json @<template-path>
|
|
68
|
+
EXPECTED: Document at <output-path> with YAML frontmatter, all sections, cross-references
|
|
69
|
+
CONSTRAINTS: Follow document standards" --tool gemini --mode write --cd <session>`, run_in_background: false })
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Phase 4: Validation
|
|
73
|
+
|
|
74
|
+
### Self-Validation (all doc types)
|
|
75
|
+
| Check | Verify |
|
|
76
|
+
|-------|--------|
|
|
77
|
+
| has_frontmatter | YAML frontmatter present |
|
|
78
|
+
| sections_complete | All template sections filled |
|
|
79
|
+
| cross_references | Valid references to upstream docs |
|
|
80
|
+
|
|
81
|
+
### Validation Routing
|
|
82
|
+
| Doc Type | Method |
|
|
83
|
+
|----------|--------|
|
|
84
|
+
| product-brief | Self-validate → report |
|
|
85
|
+
| requirements | Self-validate + DISCUSS-002 |
|
|
86
|
+
| architecture | Self-validate → report |
|
|
87
|
+
| epics | Self-validate → report |
|
|
88
|
+
|
|
89
|
+
Report: doc type, validation status, discuss verdict (PRD only), output path.
|
|
90
|
+
|
|
91
|
+
## Error Handling
|
|
92
|
+
|
|
93
|
+
| Scenario | Resolution |
|
|
94
|
+
|----------|------------|
|
|
95
|
+
| CLI failure | Retry once with alternative tool |
|
|
96
|
+
| Prior doc missing | Notify coordinator |
|
|
97
|
+
| Discussion contradicts prior | Note conflict, flag for coordinator |
|