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,70 @@
|
|
|
1
|
+
# Analyze Task
|
|
2
|
+
|
|
3
|
+
Parse user task -> detect testing capabilities -> select pipeline -> design roles.
|
|
4
|
+
|
|
5
|
+
**CONSTRAINT**: Text-level analysis only. NO source code reading, NO codebase exploration.
|
|
6
|
+
|
|
7
|
+
## Signal Detection
|
|
8
|
+
|
|
9
|
+
| Keywords | Capability | Prefix |
|
|
10
|
+
|----------|------------|--------|
|
|
11
|
+
| strategy, plan, layers, scope | strategist | STRATEGY |
|
|
12
|
+
| generate tests, write tests, create tests | generator | TESTGEN |
|
|
13
|
+
| run tests, execute, coverage | executor | TESTRUN |
|
|
14
|
+
| analyze, report, quality, defects | analyst | TESTANA |
|
|
15
|
+
|
|
16
|
+
## Pipeline Mode Detection
|
|
17
|
+
|
|
18
|
+
| Condition | Pipeline |
|
|
19
|
+
|-----------|----------|
|
|
20
|
+
| fileCount <= 3 AND moduleCount <= 1 | targeted |
|
|
21
|
+
| fileCount <= 10 AND moduleCount <= 3 | standard |
|
|
22
|
+
| Otherwise | comprehensive |
|
|
23
|
+
|
|
24
|
+
## Dependency Graph
|
|
25
|
+
|
|
26
|
+
Natural ordering for testing pipeline:
|
|
27
|
+
- Tier 0: strategist (change analysis, no upstream dependency)
|
|
28
|
+
- Tier 1: generator (requires strategy)
|
|
29
|
+
- Tier 2: executor (requires generated tests; GC loop with generator)
|
|
30
|
+
- Tier 3: analyst (requires execution results)
|
|
31
|
+
|
|
32
|
+
## Pipeline Definitions
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
Targeted: STRATEGY -> TESTGEN(L1) -> TESTRUN(L1)
|
|
36
|
+
Standard: STRATEGY -> TESTGEN(L1) -> TESTRUN(L1) -> TESTGEN(L2) -> TESTRUN(L2) -> TESTANA
|
|
37
|
+
Comprehensive: STRATEGY -> [TESTGEN(L1) || TESTGEN(L2)] -> [TESTRUN(L1) || TESTRUN(L2)] -> TESTGEN(L3) -> TESTRUN(L3) -> TESTANA
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Complexity Scoring
|
|
41
|
+
|
|
42
|
+
| Factor | Points |
|
|
43
|
+
|--------|--------|
|
|
44
|
+
| Per test layer | +1 |
|
|
45
|
+
| Parallel tracks | +1 per track |
|
|
46
|
+
| GC loop enabled | +1 |
|
|
47
|
+
| Serial depth > 3 | +1 |
|
|
48
|
+
|
|
49
|
+
Results: 1-2 Low, 3-5 Medium, 6+ High
|
|
50
|
+
|
|
51
|
+
## Role Minimization
|
|
52
|
+
|
|
53
|
+
- Cap at 5 roles (coordinator + 4 workers)
|
|
54
|
+
- GC loop: generator <-> executor iterate up to 3 rounds per layer
|
|
55
|
+
|
|
56
|
+
## Output
|
|
57
|
+
|
|
58
|
+
Write <session>/task-analysis.json:
|
|
59
|
+
```json
|
|
60
|
+
{
|
|
61
|
+
"task_description": "<original>",
|
|
62
|
+
"pipeline_mode": "<targeted|standard|comprehensive>",
|
|
63
|
+
"capabilities": [{ "name": "<cap>", "prefix": "<PREFIX>", "keywords": ["..."] }],
|
|
64
|
+
"dependency_graph": { "<TASK-ID>": { "role": "<role>", "blockedBy": ["..."], "layer": "L1|L2|L3" } },
|
|
65
|
+
"roles": [{ "name": "<role>", "prefix": "<PREFIX>", "inner_loop": true }],
|
|
66
|
+
"complexity": { "score": 0, "level": "Low|Medium|High" },
|
|
67
|
+
"coverage_targets": { "L1": 80, "L2": 60, "L3": 40 },
|
|
68
|
+
"gc_loop_enabled": true
|
|
69
|
+
}
|
|
70
|
+
```
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# Dispatch Tasks
|
|
2
|
+
|
|
3
|
+
Create testing task chains with correct dependencies. Supports targeted, standard, and comprehensive pipelines.
|
|
4
|
+
|
|
5
|
+
## Workflow
|
|
6
|
+
|
|
7
|
+
1. Read task-analysis.json -> extract pipeline_mode and dependency_graph
|
|
8
|
+
2. Read specs/pipelines.md -> get task registry for selected pipeline
|
|
9
|
+
3. Topological sort tasks (respect blockedBy)
|
|
10
|
+
4. Validate all owners exist in role registry (SKILL.md)
|
|
11
|
+
5. For each task (in order):
|
|
12
|
+
- create_task with structured description (see template below)
|
|
13
|
+
- update_task with blockedBy + owner assignment
|
|
14
|
+
6. Update session.json with pipeline.tasks_total
|
|
15
|
+
7. Validate chain (no orphans, no cycles, all refs valid)
|
|
16
|
+
|
|
17
|
+
## Task Description Template
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
PURPOSE: <goal> | Success: <criteria>
|
|
21
|
+
TASK:
|
|
22
|
+
- <step 1>
|
|
23
|
+
- <step 2>
|
|
24
|
+
CONTEXT:
|
|
25
|
+
- Session: <session-folder>
|
|
26
|
+
- Scope: <scope>
|
|
27
|
+
- Layer: <L1-unit|L2-integration|L3-e2e>
|
|
28
|
+
- Upstream artifacts: <artifact-1>, <artifact-2>
|
|
29
|
+
- Shared memory: <session>/wisdom/.msg/meta.json
|
|
30
|
+
EXPECTED: <deliverable path> + <quality criteria>
|
|
31
|
+
CONSTRAINTS: <scope limits, focus areas>
|
|
32
|
+
---
|
|
33
|
+
InnerLoop: <true|false>
|
|
34
|
+
RoleSpec: ~ or <project>/.claude/skills/team-testing/roles/<role>/role.md
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Pipeline Task Registry
|
|
38
|
+
|
|
39
|
+
### Targeted Pipeline
|
|
40
|
+
```
|
|
41
|
+
STRATEGY-001 (strategist): Analyze change scope, define test strategy
|
|
42
|
+
blockedBy: []
|
|
43
|
+
TESTGEN-001 (generator): Generate L1 unit tests
|
|
44
|
+
blockedBy: [STRATEGY-001], meta: layer=L1-unit
|
|
45
|
+
TESTRUN-001 (executor): Execute L1 tests, collect coverage
|
|
46
|
+
blockedBy: [TESTGEN-001], inner_loop: true, meta: layer=L1-unit, coverage_target=80%
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Standard Pipeline
|
|
50
|
+
```
|
|
51
|
+
STRATEGY-001 (strategist): Analyze change scope, define test strategy
|
|
52
|
+
blockedBy: []
|
|
53
|
+
TESTGEN-001 (generator): Generate L1 unit tests
|
|
54
|
+
blockedBy: [STRATEGY-001], meta: layer=L1-unit
|
|
55
|
+
TESTRUN-001 (executor): Execute L1 tests, collect coverage
|
|
56
|
+
blockedBy: [TESTGEN-001], inner_loop: true, meta: layer=L1-unit, coverage_target=80%
|
|
57
|
+
TESTGEN-002 (generator): Generate L2 integration tests
|
|
58
|
+
blockedBy: [TESTRUN-001], meta: layer=L2-integration
|
|
59
|
+
TESTRUN-002 (executor): Execute L2 tests, collect coverage
|
|
60
|
+
blockedBy: [TESTGEN-002], inner_loop: true, meta: layer=L2-integration, coverage_target=60%
|
|
61
|
+
TESTANA-001 (analyst): Defect pattern analysis, quality report
|
|
62
|
+
blockedBy: [TESTRUN-002]
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Comprehensive Pipeline
|
|
66
|
+
```
|
|
67
|
+
STRATEGY-001 (strategist): Analyze change scope, define test strategy
|
|
68
|
+
blockedBy: []
|
|
69
|
+
TESTGEN-001 (generator-1): Generate L1 unit tests
|
|
70
|
+
blockedBy: [STRATEGY-001], meta: layer=L1-unit
|
|
71
|
+
TESTGEN-002 (generator-2): Generate L2 integration tests
|
|
72
|
+
blockedBy: [STRATEGY-001], meta: layer=L2-integration
|
|
73
|
+
TESTRUN-001 (executor-1): Execute L1 tests, collect coverage
|
|
74
|
+
blockedBy: [TESTGEN-001], inner_loop: true, meta: layer=L1-unit, coverage_target=80%
|
|
75
|
+
TESTRUN-002 (executor-2): Execute L2 tests, collect coverage
|
|
76
|
+
blockedBy: [TESTGEN-002], inner_loop: true, meta: layer=L2-integration, coverage_target=60%
|
|
77
|
+
TESTGEN-003 (generator): Generate L3 E2E tests
|
|
78
|
+
blockedBy: [TESTRUN-001, TESTRUN-002], meta: layer=L3-e2e
|
|
79
|
+
TESTRUN-003 (executor): Execute L3 tests, collect coverage
|
|
80
|
+
blockedBy: [TESTGEN-003], inner_loop: true, meta: layer=L3-e2e, coverage_target=40%
|
|
81
|
+
TESTANA-001 (analyst): Defect pattern analysis, quality report
|
|
82
|
+
blockedBy: [TESTRUN-003]
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## InnerLoop Flag Rules
|
|
86
|
+
|
|
87
|
+
- true: generator, executor roles (GC loop iterations)
|
|
88
|
+
- false: strategist, analyst roles
|
|
89
|
+
|
|
90
|
+
## Dependency Validation
|
|
91
|
+
|
|
92
|
+
- No orphan tasks (all tasks have valid owner)
|
|
93
|
+
- No circular dependencies
|
|
94
|
+
- All blockedBy references exist
|
|
95
|
+
- Session reference in every task description
|
|
96
|
+
- RoleSpec reference in every task description
|
|
97
|
+
|
|
98
|
+
## Log After Creation
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
mcp__ccw-tools__team_msg({
|
|
102
|
+
operation: "log",
|
|
103
|
+
session_id: <session-id>,
|
|
104
|
+
from: "coordinator",
|
|
105
|
+
type: "pipeline_selected",
|
|
106
|
+
data: { pipeline: "<mode>", task_count: <N> }
|
|
107
|
+
})
|
|
108
|
+
```
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
# monitor_process Pipeline
|
|
2
|
+
|
|
3
|
+
Event-driven pipeline coordination. Beat model: coordinator wake -> process -> spawn -> STOP.
|
|
4
|
+
|
|
5
|
+
## Constants
|
|
6
|
+
|
|
7
|
+
- SPAWN_MODE: background
|
|
8
|
+
- ONE_STEP_PER_INVOCATION: true
|
|
9
|
+
- FAST_ADVANCE_AWARE: true
|
|
10
|
+
- WORKER_AGENT: team-worker
|
|
11
|
+
- MAX_GC_ROUNDS: 3
|
|
12
|
+
|
|
13
|
+
## Handler Router
|
|
14
|
+
|
|
15
|
+
| Source | Handler |
|
|
16
|
+
|--------|---------|
|
|
17
|
+
| Message contains [strategist], [generator], [executor], [analyst] | handleCallback |
|
|
18
|
+
| "capability_gap" | handleAdapt |
|
|
19
|
+
| "check" or "status" | handleCheck |
|
|
20
|
+
| "resume" or "continue" | handleResume |
|
|
21
|
+
| All tasks completed | handleComplete |
|
|
22
|
+
| Default | handleSpawnNext |
|
|
23
|
+
|
|
24
|
+
## Role-Worker Map
|
|
25
|
+
|
|
26
|
+
| Prefix | Role | Role Spec | inner_loop |
|
|
27
|
+
|--------|------|-----------|------------|
|
|
28
|
+
| STRATEGY-* | strategist | `~ or <project>/.claude/skills/team-testing/roles/strategist/role.md` | false |
|
|
29
|
+
| TESTGEN-* | generator | `~ or <project>/.claude/skills/team-testing/roles/generator/role.md` | true |
|
|
30
|
+
| TESTRUN-* | executor | `~ or <project>/.claude/skills/team-testing/roles/executor/role.md` | true |
|
|
31
|
+
| TESTANA-* | analyst | `~ or <project>/.claude/skills/team-testing/roles/analyst/role.md` | false |
|
|
32
|
+
|
|
33
|
+
## handleCallback
|
|
34
|
+
|
|
35
|
+
Worker completed. Process and advance.
|
|
36
|
+
|
|
37
|
+
1. Parse message to identify role and task ID:
|
|
38
|
+
|
|
39
|
+
| Message Pattern | Role Detection |
|
|
40
|
+
|----------------|---------------|
|
|
41
|
+
| `[strategist]` or task ID `STRATEGY-*` | strategist |
|
|
42
|
+
| `[generator]` or task ID `TESTGEN-*` | generator |
|
|
43
|
+
| `[executor]` or task ID `TESTRUN-*` | executor |
|
|
44
|
+
| `[analyst]` or task ID `TESTANA-*` | analyst |
|
|
45
|
+
|
|
46
|
+
2. Check if progress update (inner loop) or final completion
|
|
47
|
+
3. Progress -> update session state, STOP
|
|
48
|
+
4. Completion -> mark task done via update_task(status="completed"), remove from active_workers
|
|
49
|
+
5. Check for checkpoints:
|
|
50
|
+
- TESTRUN-* completes -> read meta.json for executor.pass_rate and executor.coverage:
|
|
51
|
+
- (pass_rate >= 0.95 AND coverage >= target) OR gc_rounds[layer] >= MAX_GC_ROUNDS -> proceed to handleSpawnNext
|
|
52
|
+
- (pass_rate < 0.95 OR coverage < target) AND gc_rounds[layer] < MAX_GC_ROUNDS -> create GC fix tasks, increment gc_rounds[layer]
|
|
53
|
+
|
|
54
|
+
**GC Fix Task Creation** (when coverage below target):
|
|
55
|
+
```
|
|
56
|
+
create_task({
|
|
57
|
+
subject: "TESTGEN-<layer>-fix-<round>: Revise <layer> tests (GC #<round>)",
|
|
58
|
+
description: "PURPOSE: Revise tests to fix failures and improve coverage | Success: pass_rate >= 0.95 AND coverage >= target
|
|
59
|
+
TASK:
|
|
60
|
+
- Read previous test results and failure details
|
|
61
|
+
- Revise tests to address failures
|
|
62
|
+
- Improve coverage for uncovered areas
|
|
63
|
+
CONTEXT:
|
|
64
|
+
- Session: <session-folder>
|
|
65
|
+
- Layer: <layer>
|
|
66
|
+
- Previous results: <session>/results/run-<N>.json
|
|
67
|
+
EXPECTED: Revised test files in <session>/tests/<layer>/
|
|
68
|
+
CONSTRAINTS: Only modify test files
|
|
69
|
+
---
|
|
70
|
+
InnerLoop: true
|
|
71
|
+
RoleSpec: ~ or <project>/.claude/skills/team-testing/roles/generator/role.md"
|
|
72
|
+
})
|
|
73
|
+
create_task({
|
|
74
|
+
subject: "TESTRUN-<layer>-fix-<round>: Re-execute <layer> (GC #<round>)",
|
|
75
|
+
description: "PURPOSE: Re-execute tests after revision | Success: pass_rate >= 0.95
|
|
76
|
+
CONTEXT:
|
|
77
|
+
- Session: <session-folder>
|
|
78
|
+
- Layer: <layer>
|
|
79
|
+
- Input: tests/<layer>
|
|
80
|
+
EXPECTED: <session>/results/run-<N>-gc.json
|
|
81
|
+
---
|
|
82
|
+
InnerLoop: true
|
|
83
|
+
RoleSpec: ~ or <project>/.claude/skills/team-testing/roles/executor/role.md",
|
|
84
|
+
blockedBy: ["TESTGEN-<layer>-fix-<round>"]
|
|
85
|
+
})
|
|
86
|
+
```
|
|
87
|
+
Update session.gc_rounds[layer]++
|
|
88
|
+
|
|
89
|
+
6. -> handleSpawnNext
|
|
90
|
+
|
|
91
|
+
## handleCheck
|
|
92
|
+
|
|
93
|
+
Read-only status report, then STOP.
|
|
94
|
+
|
|
95
|
+
**Worker Progress** (from message bus):
|
|
96
|
+
|
|
97
|
+
Before generating status output, read worker milestones:
|
|
98
|
+
|
|
99
|
+
```javascript
|
|
100
|
+
const progressMsgs = mcp__ccw-tools__team_msg({
|
|
101
|
+
operation: "list", session_id: sessionId, type: "progress", last: 50
|
|
102
|
+
})
|
|
103
|
+
const blockerMsgs = mcp__ccw-tools__team_msg({
|
|
104
|
+
operation: "list", session_id: sessionId, type: "blocker", last: 10
|
|
105
|
+
})
|
|
106
|
+
|
|
107
|
+
// Aggregate latest milestone per task
|
|
108
|
+
const taskProgress = {}
|
|
109
|
+
for (const msg of (progressMsgs.result?.messages || [])) {
|
|
110
|
+
const tid = msg.data?.task_id
|
|
111
|
+
if (tid && (!taskProgress[tid] || msg.ts > taskProgress[tid].ts)) {
|
|
112
|
+
taskProgress[tid] = { phase: msg.data.phase, pct: msg.data.progress_pct, ts: msg.ts }
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Include in status output:
|
|
118
|
+
- Per-worker latest milestone (phase + progress_pct) next to task status
|
|
119
|
+
- Active blockers section (if any blockerMsgs found)
|
|
120
|
+
|
|
121
|
+
Output:
|
|
122
|
+
```
|
|
123
|
+
[coordinator] Testing Pipeline Status
|
|
124
|
+
[coordinator] Mode: <pipeline_mode>
|
|
125
|
+
[coordinator] Progress: <done>/<total> (<pct>%)
|
|
126
|
+
[coordinator] GC Rounds: L1: <n>/3, L2: <n>/3
|
|
127
|
+
|
|
128
|
+
[coordinator] Pipeline Graph:
|
|
129
|
+
STRATEGY-001: <done|run|wait> test-strategy.md
|
|
130
|
+
TESTGEN-001: <done|run|wait> generating L1...
|
|
131
|
+
TESTRUN-001: <done|run|wait> blocked by TESTGEN-001
|
|
132
|
+
TESTGEN-002: <done|run|wait> blocked by TESTRUN-001
|
|
133
|
+
TESTRUN-002: <done|run|wait> blocked by TESTGEN-002
|
|
134
|
+
TESTANA-001: <done|run|wait> blocked by TESTRUN-*
|
|
135
|
+
|
|
136
|
+
[coordinator] Active Workers: <list with elapsed time>
|
|
137
|
+
[coordinator] Ready: <pending tasks with resolved deps>
|
|
138
|
+
[coordinator] Commands: 'resume' to advance | 'check' to refresh
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Then STOP.
|
|
142
|
+
|
|
143
|
+
## handleResume
|
|
144
|
+
|
|
145
|
+
1. No active workers -> handleSpawnNext
|
|
146
|
+
2. Has active -> check each status
|
|
147
|
+
- completed -> mark done via update_task
|
|
148
|
+
- in_progress -> still running
|
|
149
|
+
3. Some completed -> handleSpawnNext
|
|
150
|
+
4. All running -> report status, STOP
|
|
151
|
+
|
|
152
|
+
## handleSpawnNext
|
|
153
|
+
|
|
154
|
+
Find ready tasks, spawn workers, STOP.
|
|
155
|
+
|
|
156
|
+
1. Collect from list_tasks():
|
|
157
|
+
- completedSubjects: status = completed
|
|
158
|
+
- inProgressSubjects: status = in_progress
|
|
159
|
+
- readySubjects: status = pending AND all blockedBy in completedSubjects
|
|
160
|
+
|
|
161
|
+
2. No ready + work in progress -> report waiting, STOP
|
|
162
|
+
3. No ready + nothing in progress -> handleComplete
|
|
163
|
+
4. Has ready -> for each ready task:
|
|
164
|
+
a. Determine role from prefix (use Role-Worker Map)
|
|
165
|
+
b. Check if inner loop role (generator/executor) with active worker -> skip (worker picks up next task)
|
|
166
|
+
c. update_task -> in_progress
|
|
167
|
+
d. team_msg log -> task_unblocked
|
|
168
|
+
e. Spawn team-worker:
|
|
169
|
+
|
|
170
|
+
```
|
|
171
|
+
delegate_subagent({
|
|
172
|
+
subagent_type: "team-worker",
|
|
173
|
+
description: "Spawn <role> worker for <subject>",
|
|
174
|
+
team_name: "testing",
|
|
175
|
+
name: "<role>",
|
|
176
|
+
run_in_background: true,
|
|
177
|
+
prompt: `## Role Assignment
|
|
178
|
+
role: <role>
|
|
179
|
+
role_spec: ~ or <project>/.claude/skills/team-testing/roles/<role>/role.md
|
|
180
|
+
session: <session-folder>
|
|
181
|
+
session_id: <session-id>
|
|
182
|
+
team_name: testing
|
|
183
|
+
requirement: <task-description>
|
|
184
|
+
inner_loop: <true|false>
|
|
185
|
+
|
|
186
|
+
## Current Task
|
|
187
|
+
- Task ID: <task-id>
|
|
188
|
+
- Task: <subject>
|
|
189
|
+
|
|
190
|
+
## Progress Milestones
|
|
191
|
+
session_id: <session-id>
|
|
192
|
+
Report progress via team_msg at natural phase boundaries (context loaded -> core work done -> verification).
|
|
193
|
+
Report blockers immediately via team_msg type="blocker".
|
|
194
|
+
Report completion via team_msg type="task_complete" after final send_message.
|
|
195
|
+
|
|
196
|
+
Read role_spec file to load Phase 2-4 domain instructions.
|
|
197
|
+
Execute built-in Phase 1 (task discovery) -> role Phase 2-4 -> built-in Phase 5 (report).`
|
|
198
|
+
})
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
f. Add to active_workers
|
|
202
|
+
|
|
203
|
+
5. **Parallel spawn** (comprehensive pipeline):
|
|
204
|
+
- TESTGEN-001 + TESTGEN-002 both unblocked -> spawn both in parallel (name: "generator-1", "generator-2")
|
|
205
|
+
- TESTRUN-001 + TESTRUN-002 both unblocked -> spawn both in parallel (name: "executor-1", "executor-2")
|
|
206
|
+
|
|
207
|
+
6. Update session.json, output summary, STOP
|
|
208
|
+
|
|
209
|
+
## handleComplete
|
|
210
|
+
|
|
211
|
+
Pipeline done. Generate report and completion action.
|
|
212
|
+
|
|
213
|
+
1. Verify all tasks (including any GC fix tasks) have status "completed" or "deleted"
|
|
214
|
+
2. If any tasks incomplete -> return to handleSpawnNext
|
|
215
|
+
3. If all complete:
|
|
216
|
+
- Read final state from meta.json (analyst.quality_score, executor.coverage, gc_rounds)
|
|
217
|
+
- Generate summary (deliverables, task count, GC rounds, coverage metrics)
|
|
218
|
+
4. Read session.completion_action:
|
|
219
|
+
- interactive -> ask_user (Archive/Keep/Deepen Coverage)
|
|
220
|
+
- auto_archive -> Archive & Clean (status=completed, delete_team)
|
|
221
|
+
- auto_keep -> Keep Active (status=paused)
|
|
222
|
+
|
|
223
|
+
## handleAdapt
|
|
224
|
+
|
|
225
|
+
Capability gap reported mid-pipeline.
|
|
226
|
+
|
|
227
|
+
1. Parse gap description
|
|
228
|
+
2. Check if existing role covers it -> redirect
|
|
229
|
+
3. Role count < 5 -> generate dynamic role-spec in <session>/role-specs/
|
|
230
|
+
4. Create new task, spawn worker
|
|
231
|
+
5. Role count >= 5 -> merge or pause
|
|
232
|
+
|
|
233
|
+
## Fast-Advance Reconciliation
|
|
234
|
+
|
|
235
|
+
On every coordinator wake:
|
|
236
|
+
1. Read team_msg entries with type="fast_advance"
|
|
237
|
+
2. Sync active_workers with spawned successors
|
|
238
|
+
3. No duplicate spawns
|
|
239
|
+
|
|
240
|
+
## Phase 4: State Persistence
|
|
241
|
+
|
|
242
|
+
After every handler execution:
|
|
243
|
+
1. Reconcile active_workers with actual list_tasks states
|
|
244
|
+
2. Remove entries for completed/deleted tasks
|
|
245
|
+
3. Write updated session.json
|
|
246
|
+
4. STOP (wait for next callback)
|
|
247
|
+
|
|
248
|
+
## Error Handling
|
|
249
|
+
|
|
250
|
+
| Scenario | Resolution |
|
|
251
|
+
|----------|------------|
|
|
252
|
+
| Session file not found | Error, suggest re-initialization |
|
|
253
|
+
| Worker callback from unknown role | Log info, scan for other completions |
|
|
254
|
+
| GC loop exceeded (3 rounds) | Accept current coverage with warning, proceed |
|
|
255
|
+
| Pipeline stall | Check blockedBy chains, report to user |
|
|
256
|
+
| Coverage tool unavailable | Degrade to pass rate judgment |
|
|
257
|
+
| Worker crash | Reset task to pending, respawn |
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
# Coordinator Role
|
|
2
|
+
|
|
3
|
+
Orchestrate team-testing: analyze -> dispatch -> spawn -> monitor -> report.
|
|
4
|
+
|
|
5
|
+
## Identity
|
|
6
|
+
- Name: coordinator | Tag: [coordinator]
|
|
7
|
+
- Responsibility: Change scope analysis -> Create team -> Dispatch tasks -> monitor_process progress -> Report results
|
|
8
|
+
|
|
9
|
+
## Boundaries
|
|
10
|
+
|
|
11
|
+
### MUST
|
|
12
|
+
- Use `team-worker` agent type for all worker spawns (NOT `general-purpose`)
|
|
13
|
+
- Follow Command Execution Protocol for dispatch and monitor commands
|
|
14
|
+
- Respect pipeline stage dependencies (blockedBy)
|
|
15
|
+
- Stop after spawning workers -- wait for callbacks
|
|
16
|
+
- Handle Generator-Critic cycles with max 3 iterations per layer
|
|
17
|
+
- Execute completion action in Phase 5
|
|
18
|
+
|
|
19
|
+
### MUST NOT
|
|
20
|
+
- Implement domain logic (test generation, execution, analysis) -- workers handle this
|
|
21
|
+
- Spawn workers without creating tasks first
|
|
22
|
+
- Skip quality gates when coverage is below target
|
|
23
|
+
- Modify test files or source code directly -- delegate to workers
|
|
24
|
+
- Force-advance pipeline past failed GC loops
|
|
25
|
+
|
|
26
|
+
## Command Execution Protocol
|
|
27
|
+
When coordinator needs to execute a specific phase:
|
|
28
|
+
1. Read `commands/<command>.md`
|
|
29
|
+
2. Follow the workflow defined in the command
|
|
30
|
+
3. Commands are inline execution guides, NOT separate agents
|
|
31
|
+
4. Execute synchronously, complete before proceeding
|
|
32
|
+
|
|
33
|
+
## Entry Router
|
|
34
|
+
|
|
35
|
+
| Detection | Condition | Handler |
|
|
36
|
+
|-----------|-----------|---------|
|
|
37
|
+
| Worker callback | Message contains [strategist], [generator], [executor], [analyst] | -> handleCallback (monitor.md) |
|
|
38
|
+
| Status check | Args contain "check" or "status" | -> handleCheck (monitor.md) |
|
|
39
|
+
| Manual resume | Args contain "resume" or "continue" | -> handleResume (monitor.md) |
|
|
40
|
+
| Capability gap | Message contains "capability_gap" | -> handleAdapt (monitor.md) |
|
|
41
|
+
| Pipeline complete | All tasks completed | -> handleComplete (monitor.md) |
|
|
42
|
+
| Interrupted session | Active session in .workflow/.team/TST-* | -> Phase 0 |
|
|
43
|
+
| New session | None of above | -> Phase 1 |
|
|
44
|
+
|
|
45
|
+
For callback/check/resume/adapt/complete: load @commands/monitor.md, execute handler, STOP.
|
|
46
|
+
|
|
47
|
+
## Phase 0: Session Resume Check
|
|
48
|
+
|
|
49
|
+
1. Scan .workflow/.team/TST-*/session.json for active/paused sessions
|
|
50
|
+
2. No sessions -> Phase 1
|
|
51
|
+
3. Single session -> reconcile (audit list_tasks, reset in_progress->pending, rebuild team, kick first ready task)
|
|
52
|
+
4. Multiple -> ask_user for selection
|
|
53
|
+
|
|
54
|
+
## Phase 1: Requirement Clarification
|
|
55
|
+
|
|
56
|
+
TEXT-LEVEL ONLY. No source code reading.
|
|
57
|
+
|
|
58
|
+
1. Parse task description from $ARGUMENTS
|
|
59
|
+
2. Analyze change scope:
|
|
60
|
+
```
|
|
61
|
+
shell("git diff --name-only HEAD~1 2>/dev/null || git diff --name-only --cached")
|
|
62
|
+
```
|
|
63
|
+
3. Select pipeline:
|
|
64
|
+
|
|
65
|
+
| Condition | Pipeline |
|
|
66
|
+
|-----------|----------|
|
|
67
|
+
| fileCount <= 3 AND moduleCount <= 1 | targeted |
|
|
68
|
+
| fileCount <= 10 AND moduleCount <= 3 | standard |
|
|
69
|
+
| Otherwise | comprehensive |
|
|
70
|
+
|
|
71
|
+
4. Clarify if ambiguous (ask_user for scope)
|
|
72
|
+
5. Delegate to @commands/analyze.md
|
|
73
|
+
6. Output: task-analysis.json
|
|
74
|
+
7. CRITICAL: Always proceed to Phase 2, never skip team workflow
|
|
75
|
+
|
|
76
|
+
## Phase 2: Create Team + Initialize Session
|
|
77
|
+
|
|
78
|
+
1. Resolve workspace paths (MUST do first):
|
|
79
|
+
- `project_root` = result of `shell({ command: "pwd" })`
|
|
80
|
+
- `skill_root` = `<project_root>/.claude/skills/team-testing`
|
|
81
|
+
2. Generate session ID: TST-<slug>-<date>
|
|
82
|
+
3. Create session folder structure (strategy/, tests/L1-unit/, tests/L2-integration/, tests/L3-e2e/, results/, analysis/, wisdom/)
|
|
83
|
+
4. create_team with team name "testing"
|
|
84
|
+
5. Read specs/pipelines.md -> select pipeline based on mode
|
|
85
|
+
6. Initialize pipeline via team_msg state_update:
|
|
86
|
+
```
|
|
87
|
+
mcp__ccw-tools__team_msg({
|
|
88
|
+
operation: "log", session_id: "<id>", from: "coordinator",
|
|
89
|
+
type: "state_update", summary: "Session initialized",
|
|
90
|
+
data: {
|
|
91
|
+
pipeline_mode: "<targeted|standard|comprehensive>",
|
|
92
|
+
pipeline_stages: ["strategist", "generator", "executor", "analyst"],
|
|
93
|
+
team_name: "testing",
|
|
94
|
+
coverage_targets: { "L1": 80, "L2": 60, "L3": 40 },
|
|
95
|
+
gc_rounds: {}
|
|
96
|
+
}
|
|
97
|
+
})
|
|
98
|
+
```
|
|
99
|
+
7. Write session.json
|
|
100
|
+
|
|
101
|
+
## Phase 3: Create Task Chain
|
|
102
|
+
|
|
103
|
+
Delegate to @commands/dispatch.md:
|
|
104
|
+
1. Read specs/pipelines.md for selected pipeline's task registry
|
|
105
|
+
2. Topological sort tasks
|
|
106
|
+
3. Create tasks via create_task with blockedBy
|
|
107
|
+
4. Update session.json
|
|
108
|
+
|
|
109
|
+
## Phase 4: Spawn-and-Stop
|
|
110
|
+
|
|
111
|
+
Delegate to @commands/monitor.md#handleSpawnNext:
|
|
112
|
+
1. Find ready tasks (pending + blockedBy resolved)
|
|
113
|
+
2. Spawn team-worker agents (see SKILL.md Spawn Template)
|
|
114
|
+
3. Output status summary
|
|
115
|
+
4. STOP
|
|
116
|
+
|
|
117
|
+
## Phase 5: Report + Completion Action
|
|
118
|
+
|
|
119
|
+
1. Generate summary (deliverables, pipeline stats, GC rounds, coverage metrics)
|
|
120
|
+
2. Execute completion action per session.completion_action:
|
|
121
|
+
- interactive -> ask_user (Archive/Keep/Deepen Coverage)
|
|
122
|
+
- auto_archive -> Archive & Clean
|
|
123
|
+
- auto_keep -> Keep Active
|
|
124
|
+
|
|
125
|
+
## Error Handling
|
|
126
|
+
|
|
127
|
+
| Error | Resolution |
|
|
128
|
+
|-------|------------|
|
|
129
|
+
| Task too vague | ask_user for clarification |
|
|
130
|
+
| Session corruption | Attempt recovery, fallback to manual |
|
|
131
|
+
| Worker crash | Reset task to pending, respawn |
|
|
132
|
+
| Dependency cycle | Detect in analysis, halt |
|
|
133
|
+
| GC loop exceeded (3 rounds) | Accept current coverage, log to wisdom, proceed |
|
|
134
|
+
| Coverage tool unavailable | Degrade to pass rate judgment |
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
---
|
|
2
|
+
role: executor
|
|
3
|
+
prefix: TESTRUN
|
|
4
|
+
inner_loop: true
|
|
5
|
+
message_types:
|
|
6
|
+
success: tests_passed
|
|
7
|
+
failure: tests_failed
|
|
8
|
+
coverage: coverage_report
|
|
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
|
+
# Test Executor
|
|
15
|
+
|
|
16
|
+
Execute tests, collect coverage, attempt auto-fix for failures. Acts as the Critic in the Generator-Critic loop. Reports pass rate and coverage for coordinator GC decisions.
|
|
17
|
+
|
|
18
|
+
## Phase 2: Context Loading
|
|
19
|
+
|
|
20
|
+
| Input | Source | Required |
|
|
21
|
+
|-------|--------|----------|
|
|
22
|
+
| Task description | From task subject/description | Yes |
|
|
23
|
+
| Session path | Extracted from task description | Yes |
|
|
24
|
+
| Test directory | Task description (Input: <path>) | Yes |
|
|
25
|
+
| Coverage target | Task description (default: 80%) | Yes |
|
|
26
|
+
| .msg/meta.json | <session>/wisdom/.msg/meta.json | No |
|
|
27
|
+
|
|
28
|
+
1. Extract session path and test directory from task description
|
|
29
|
+
2. Load test specs: Run `ccw spec load --category test` for test framework conventions and coverage targets
|
|
30
|
+
3. Extract coverage target (default: 80%)
|
|
31
|
+
3. Read .msg/meta.json for framework info (from strategist namespace)
|
|
32
|
+
4. Determine test framework:
|
|
33
|
+
|
|
34
|
+
| Framework | Run Command |
|
|
35
|
+
|-----------|-------------|
|
|
36
|
+
| Jest | `npx jest --coverage --json --outputFile=<session>/results/jest-output.json` |
|
|
37
|
+
| Pytest | `python -m pytest --cov --cov-report=json:<session>/results/coverage.json -v` |
|
|
38
|
+
| Vitest | `npx vitest run --coverage --reporter=json` |
|
|
39
|
+
|
|
40
|
+
5. Find test files to execute:
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
find_files("<session>/<test-dir>/**/*")
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Phase 3: Test Execution + Fix Cycle
|
|
47
|
+
|
|
48
|
+
**Iterative test-fix cycle** (max 3 iterations):
|
|
49
|
+
|
|
50
|
+
| Step | Action |
|
|
51
|
+
|------|--------|
|
|
52
|
+
| 1 | Run test command |
|
|
53
|
+
| 2 | Parse results: pass rate + coverage |
|
|
54
|
+
| 3 | pass_rate >= 0.95 AND coverage >= target -> success, exit |
|
|
55
|
+
| 4 | Extract failing test details |
|
|
56
|
+
| 5 | Delegate fix to CLI tool (gemini write mode) |
|
|
57
|
+
| 6 | Increment iteration; >= 3 -> exit with failures |
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
shell("<test-command> 2>&1 || true")
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
**Auto-fix delegation** (on failure):
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
shell({
|
|
67
|
+
command: `maestro delegate "PURPOSE: Fix test failures to achieve pass rate >= 0.95; success = all tests pass
|
|
68
|
+
TASK: • Analyze test failure output • Identify root causes • Fix test code only (not source) • Preserve test intent
|
|
69
|
+
MODE: write
|
|
70
|
+
CONTEXT: @<session>/<test-dir>/**/* | Memory: Test framework: <framework>, iteration <N>/3
|
|
71
|
+
EXPECTED: Fixed test files with: corrected assertions, proper async handling, fixed imports, maintained coverage
|
|
72
|
+
CONSTRAINTS: Only modify test files | Preserve test structure | No source code changes
|
|
73
|
+
Test failures:
|
|
74
|
+
<test-output>" --tool gemini --mode write --cd <session>`,
|
|
75
|
+
run_in_background: false
|
|
76
|
+
})
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
**Save results**: `<session>/results/run-<N>.json`
|
|
80
|
+
|
|
81
|
+
## Phase 4: Defect Pattern Extraction & State Update
|
|
82
|
+
|
|
83
|
+
**Extract defect patterns from failures**:
|
|
84
|
+
|
|
85
|
+
| Pattern Type | Detection Keywords |
|
|
86
|
+
|--------------|-------------------|
|
|
87
|
+
| Null reference | "null", "undefined", "Cannot read property" |
|
|
88
|
+
| Async timing | "timeout", "async", "await", "promise" |
|
|
89
|
+
| Import errors | "Cannot find module", "import" |
|
|
90
|
+
| Type mismatches | "type", "expected", "received" |
|
|
91
|
+
|
|
92
|
+
**Record effective test patterns** (if pass_rate > 0.8):
|
|
93
|
+
|
|
94
|
+
| Pattern | Detection |
|
|
95
|
+
|---------|-----------|
|
|
96
|
+
| Happy path | "should succeed", "valid input" |
|
|
97
|
+
| Edge cases | "edge", "boundary", "limit" |
|
|
98
|
+
| Error handling | "should fail", "error", "throw" |
|
|
99
|
+
|
|
100
|
+
Update `<session>/wisdom/.msg/meta.json` under `executor` namespace:
|
|
101
|
+
- Merge `{ "executor": { pass_rate, coverage, defect_patterns, effective_patterns, coverage_history_entry } }`
|