maestro-flow 0.4.9 → 0.4.10
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/.agy/agents/cli-explore-agent.md +186 -0
- package/.agy/agents/conceptual-planning-agent.md +244 -0
- package/.agy/agents/impeccable-agent.md +97 -0
- package/.agy/agents/team-supervisor.md +142 -0
- package/.agy/agents/team-worker.md +236 -0
- package/.agy/agents/ui-design-agent.md +286 -0
- package/.agy/agents/workflow-analyzer.md +114 -0
- package/.agy/agents/workflow-codebase-mapper.md +76 -0
- package/.agy/agents/workflow-collab-planner.md +142 -0
- package/.agy/agents/workflow-debugger.md +102 -0
- package/.agy/agents/workflow-executor.md +131 -0
- package/.agy/agents/workflow-external-researcher.md +86 -0
- package/.agy/agents/workflow-integration-checker.md +82 -0
- package/.agy/agents/workflow-nyquist-auditor.md +84 -0
- package/.agy/agents/workflow-phase-researcher.md +84 -0
- package/.agy/agents/workflow-plan-checker.md +89 -0
- package/.agy/agents/workflow-planner.md +194 -0
- package/.agy/agents/workflow-project-researcher.md +73 -0
- package/.agy/agents/workflow-research-synthesizer.md +70 -0
- package/.agy/agents/workflow-reviewer.md +81 -0
- package/.agy/agents/workflow-roadmapper.md +81 -0
- package/.agy/agents/workflow-verifier.md +119 -0
- package/.agy/skills/codify-to-knowhow/SKILL.md +172 -0
- package/.agy/skills/codify-to-knowhow/phases/01-load-manifest.md +101 -0
- package/.agy/skills/codify-to-knowhow/phases/02-generate-knowhow.md +97 -0
- package/.agy/skills/codify-to-knowhow/phases/03-generate-specs.md +92 -0
- package/.agy/skills/codify-to-knowhow/phases/04-index-verify.md +119 -0
- package/.agy/skills/learn-decompose/SKILL.md +118 -0
- package/.agy/skills/learn-follow/SKILL.md +129 -0
- package/.agy/skills/learn-investigate/SKILL.md +154 -0
- package/.agy/skills/learn-retro/SKILL.md +159 -0
- package/.agy/skills/learn-second-opinion/SKILL.md +124 -0
- package/.agy/skills/maestro/SKILL.md +221 -0
- package/.agy/skills/maestro-amend/SKILL.md +162 -0
- package/.agy/skills/maestro-analyze/SKILL.md +135 -0
- package/.agy/skills/maestro-brainstorm/SKILL.md +118 -0
- package/.agy/skills/maestro-collab/SKILL.md +174 -0
- package/.agy/skills/maestro-composer/SKILL.md +180 -0
- package/.agy/skills/maestro-execute/SKILL.md +133 -0
- package/.agy/skills/maestro-fork/SKILL.md +88 -0
- package/.agy/skills/maestro-guard/SKILL.md +101 -0
- package/.agy/skills/maestro-help/SKILL.md +267 -0
- package/.agy/skills/maestro-help/index/catalog.json +184 -0
- package/.agy/skills/maestro-help/phases/01-parse-intent.md +122 -0
- package/.agy/skills/maestro-help/phases/02-search-present.md +181 -0
- package/.agy/skills/maestro-help/phases/03-workflow-guide.md +186 -0
- package/.agy/skills/maestro-impeccable/SKILL.md +250 -0
- package/.agy/skills/maestro-init/SKILL.md +80 -0
- package/.agy/skills/maestro-learn/SKILL.md +142 -0
- package/.agy/skills/maestro-merge/SKILL.md +66 -0
- package/.agy/skills/maestro-milestone-audit/SKILL.md +70 -0
- package/.agy/skills/maestro-milestone-complete/SKILL.md +77 -0
- package/.agy/skills/maestro-milestone-release/SKILL.md +98 -0
- package/.agy/skills/maestro-overlay/SKILL.md +177 -0
- package/.agy/skills/maestro-plan/SKILL.md +172 -0
- package/.agy/skills/maestro-player/SKILL.md +176 -0
- package/.agy/skills/maestro-quick/SKILL.md +67 -0
- package/.agy/skills/maestro-ralph/SKILL.md +546 -0
- package/.agy/skills/maestro-ralph-execute/SKILL.md +255 -0
- package/.agy/skills/maestro-roadmap/SKILL.md +170 -0
- package/.agy/skills/maestro-tools-execute/SKILL.md +119 -0
- package/.agy/skills/maestro-tools-register/SKILL.md +159 -0
- package/.agy/skills/maestro-ui-codify/SKILL.md +81 -0
- package/.agy/skills/maestro-update/SKILL.md +175 -0
- package/.agy/skills/maestro-verify/SKILL.md +111 -0
- package/.agy/skills/manage-codebase-rebuild/SKILL.md +77 -0
- package/.agy/skills/manage-codebase-refresh/SKILL.md +59 -0
- package/.agy/skills/manage-harvest/SKILL.md +96 -0
- package/.agy/skills/manage-issue/SKILL.md +72 -0
- package/.agy/skills/manage-issue-discover/SKILL.md +83 -0
- package/.agy/skills/manage-knowhow/SKILL.md +76 -0
- package/.agy/skills/manage-knowhow-capture/SKILL.md +78 -0
- package/.agy/skills/manage-learn/SKILL.md +64 -0
- package/.agy/skills/manage-status/SKILL.md +51 -0
- package/.agy/skills/manage-wiki/SKILL.md +61 -0
- package/.agy/skills/quality-auto-test/SKILL.md +135 -0
- package/.agy/skills/quality-debug/SKILL.md +122 -0
- package/.agy/skills/quality-refactor/SKILL.md +69 -0
- package/.agy/skills/quality-retrospective/SKILL.md +79 -0
- package/.agy/skills/quality-review/SKILL.md +130 -0
- package/.agy/skills/quality-sync/SKILL.md +53 -0
- package/.agy/skills/quality-test/SKILL.md +119 -0
- package/.agy/skills/security-audit/SKILL.md +157 -0
- package/.agy/skills/skill-iter-tune/SKILL.md +381 -0
- package/.agy/skills/skill-iter-tune/phases/01-setup.md +144 -0
- package/.agy/skills/skill-iter-tune/phases/02-execute.md +292 -0
- package/.agy/skills/skill-iter-tune/phases/03-evaluate.md +312 -0
- package/.agy/skills/skill-iter-tune/phases/04-improve.md +198 -0
- package/.agy/skills/skill-iter-tune/phases/05-report.md +166 -0
- package/.agy/skills/skill-iter-tune/specs/evaluation-criteria.md +63 -0
- package/.agy/skills/skill-iter-tune/templates/eval-prompt.md +134 -0
- package/.agy/skills/skill-iter-tune/templates/execute-prompt.md +97 -0
- package/.agy/skills/spec-add/SKILL.md +67 -0
- package/.agy/skills/spec-load/SKILL.md +70 -0
- package/.agy/skills/spec-remove/SKILL.md +50 -0
- package/.agy/skills/spec-setup/SKILL.md +47 -0
- package/.agy/skills/team-coordinate/SKILL.md +267 -0
- package/.agy/skills/team-coordinate/roles/coordinator/commands/analyze-task.md +247 -0
- package/.agy/skills/team-coordinate/roles/coordinator/commands/dispatch.md +131 -0
- package/.agy/skills/team-coordinate/roles/coordinator/commands/monitor.md +348 -0
- package/.agy/skills/team-coordinate/roles/coordinator/role.md +362 -0
- package/.agy/skills/team-coordinate/specs/knowledge-transfer.md +111 -0
- package/.agy/skills/team-coordinate/specs/pipelines.md +97 -0
- package/.agy/skills/team-coordinate/specs/quality-gates.md +112 -0
- package/.agy/skills/team-coordinate/specs/role-spec-template.md +198 -0
- package/.agy/skills/team-executor/SKILL.md +180 -0
- package/.agy/skills/team-executor/roles/executor/commands/monitor.md +235 -0
- package/.agy/skills/team-executor/roles/executor/role.md +171 -0
- package/.agy/skills/team-executor/specs/session-schema.md +264 -0
- package/.agy/skills/team-lifecycle-v4/SKILL.md +189 -0
- package/.agy/skills/team-lifecycle-v4/roles/analyst/role.md +92 -0
- package/.agy/skills/team-lifecycle-v4/roles/coordinator/commands/analyze.md +56 -0
- package/.agy/skills/team-lifecycle-v4/roles/coordinator/commands/dispatch.md +56 -0
- package/.agy/skills/team-lifecycle-v4/roles/coordinator/commands/monitor.md +206 -0
- package/.agy/skills/team-lifecycle-v4/roles/coordinator/role.md +130 -0
- package/.agy/skills/team-lifecycle-v4/roles/executor/commands/fix.md +35 -0
- package/.agy/skills/team-lifecycle-v4/roles/executor/commands/implement.md +62 -0
- package/.agy/skills/team-lifecycle-v4/roles/executor/role.md +64 -0
- package/.agy/skills/team-lifecycle-v4/roles/planner/role.md +82 -0
- package/.agy/skills/team-lifecycle-v4/roles/reviewer/commands/review-code.md +34 -0
- package/.agy/skills/team-lifecycle-v4/roles/reviewer/commands/review-spec.md +44 -0
- package/.agy/skills/team-lifecycle-v4/roles/reviewer/role.md +65 -0
- package/.agy/skills/team-lifecycle-v4/roles/supervisor/role.md +188 -0
- package/.agy/skills/team-lifecycle-v4/roles/tester/role.md +84 -0
- package/.agy/skills/team-lifecycle-v4/roles/writer/role.md +92 -0
- package/.agy/skills/team-lifecycle-v4/specs/knowledge-transfer.md +114 -0
- package/.agy/skills/team-lifecycle-v4/specs/pipelines.md +140 -0
- package/.agy/skills/team-lifecycle-v4/specs/quality-gates.md +130 -0
- package/.agy/skills/team-lifecycle-v4/templates/architecture.md +254 -0
- package/.agy/skills/team-lifecycle-v4/templates/epics.md +196 -0
- package/.agy/skills/team-lifecycle-v4/templates/product-brief.md +133 -0
- package/.agy/skills/team-lifecycle-v4/templates/requirements.md +224 -0
- package/.agy/skills/team-quality-assurance/SKILL.md +148 -0
- package/.agy/skills/team-quality-assurance/roles/analyst/role.md +85 -0
- package/.agy/skills/team-quality-assurance/roles/coordinator/commands/analyze.md +72 -0
- package/.agy/skills/team-quality-assurance/roles/coordinator/commands/dispatch.md +111 -0
- package/.agy/skills/team-quality-assurance/roles/coordinator/commands/monitor.md +235 -0
- package/.agy/skills/team-quality-assurance/roles/coordinator/role.md +143 -0
- package/.agy/skills/team-quality-assurance/roles/executor/role.md +62 -0
- package/.agy/skills/team-quality-assurance/roles/generator/role.md +65 -0
- package/.agy/skills/team-quality-assurance/roles/scout/role.md +72 -0
- package/.agy/skills/team-quality-assurance/roles/strategist/role.md +69 -0
- package/.agy/skills/team-quality-assurance/specs/pipelines.md +115 -0
- package/.agy/skills/team-quality-assurance/specs/team-config.json +131 -0
- package/.agy/skills/team-review/SKILL.md +149 -0
- package/.agy/skills/team-review/roles/coordinator/commands/analyze.md +71 -0
- package/.agy/skills/team-review/roles/coordinator/commands/dispatch.md +91 -0
- package/.agy/skills/team-review/roles/coordinator/commands/monitor.md +209 -0
- package/.agy/skills/team-review/roles/coordinator/role.md +132 -0
- package/.agy/skills/team-review/roles/fixer/role.md +74 -0
- package/.agy/skills/team-review/roles/reviewer/role.md +66 -0
- package/.agy/skills/team-review/roles/scanner/role.md +77 -0
- package/.agy/skills/team-review/specs/dimensions.md +82 -0
- package/.agy/skills/team-review/specs/finding-schema.json +82 -0
- package/.agy/skills/team-review/specs/pipelines.md +102 -0
- package/.agy/skills/team-review/specs/team-config.json +27 -0
- package/.agy/skills/team-tech-debt/SKILL.md +133 -0
- package/.agy/skills/team-tech-debt/roles/assessor/role.md +76 -0
- package/.agy/skills/team-tech-debt/roles/coordinator/commands/analyze.md +47 -0
- package/.agy/skills/team-tech-debt/roles/coordinator/commands/dispatch.md +156 -0
- package/.agy/skills/team-tech-debt/roles/coordinator/commands/monitor.md +198 -0
- package/.agy/skills/team-tech-debt/roles/coordinator/role.md +123 -0
- package/.agy/skills/team-tech-debt/roles/executor/role.md +76 -0
- package/.agy/skills/team-tech-debt/roles/planner/role.md +68 -0
- package/.agy/skills/team-tech-debt/roles/scanner/role.md +90 -0
- package/.agy/skills/team-tech-debt/roles/validator/role.md +78 -0
- package/.agy/skills/team-tech-debt/specs/pipelines.md +47 -0
- package/.agy/skills/team-tech-debt/specs/team-config.json +129 -0
- package/.agy/skills/team-testing/SKILL.md +144 -0
- package/.agy/skills/team-testing/roles/analyst/role.md +101 -0
- package/.agy/skills/team-testing/roles/coordinator/commands/analyze.md +70 -0
- package/.agy/skills/team-testing/roles/coordinator/commands/dispatch.md +108 -0
- package/.agy/skills/team-testing/roles/coordinator/commands/monitor.md +242 -0
- package/.agy/skills/team-testing/roles/coordinator/role.md +134 -0
- package/.agy/skills/team-testing/roles/executor/role.md +95 -0
- package/.agy/skills/team-testing/roles/generator/role.md +95 -0
- package/.agy/skills/team-testing/roles/strategist/role.md +81 -0
- package/.agy/skills/team-testing/specs/pipelines.md +101 -0
- package/.agy/skills/team-testing/specs/team-config.json +93 -0
- package/.agy/skills/wiki-connect/SKILL.md +64 -0
- package/.agy/skills/wiki-digest/SKILL.md +70 -0
- package/.agy/skills/workflow-skill-designer/SKILL.md +506 -0
- package/.agy/skills/workflow-skill-designer/phases/01-requirements-analysis.md +356 -0
- package/.agy/skills/workflow-skill-designer/phases/02-orchestrator-design.md +444 -0
- package/.agy/skills/workflow-skill-designer/phases/03-phase-design.md +458 -0
- package/.agy/skills/workflow-skill-designer/phases/04-validation.md +471 -0
- package/package.json +3 -1
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
---
|
|
2
|
+
role: analyst
|
|
3
|
+
prefix: QAANA
|
|
4
|
+
inner_loop: false
|
|
5
|
+
message_types:
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Quality Analyst
|
|
9
|
+
|
|
10
|
+
Analyze defect patterns, coverage gaps, test effectiveness, and generate comprehensive quality reports. Maintain defect pattern database and provide quality scoring.
|
|
11
|
+
|
|
12
|
+
## Phase 2: Context Loading
|
|
13
|
+
|
|
14
|
+
| Input | Source | Required |
|
|
15
|
+
|-------|--------|----------|
|
|
16
|
+
| Task description | From task subject/description | Yes |
|
|
17
|
+
| Session path | Extracted from task description | Yes |
|
|
18
|
+
| .msg/meta.json | <session>/wisdom/.msg/meta.json | Yes |
|
|
19
|
+
| Discovered issues | meta.json -> discovered_issues | No |
|
|
20
|
+
| Test strategy | meta.json -> test_strategy | No |
|
|
21
|
+
| Generated tests | meta.json -> generated_tests | No |
|
|
22
|
+
| Execution results | meta.json -> execution_results | No |
|
|
23
|
+
| Historical patterns | meta.json -> defect_patterns | No |
|
|
24
|
+
|
|
25
|
+
1. Extract session path from task description
|
|
26
|
+
2. Read .msg/meta.json for all accumulated QA data
|
|
27
|
+
3. Read coverage data from `coverage/coverage-summary.json` if available
|
|
28
|
+
4. Read layer execution results from `<session>/results/run-*.json`
|
|
29
|
+
5. Select analysis mode:
|
|
30
|
+
|
|
31
|
+
| Data Points | Mode |
|
|
32
|
+
|-------------|------|
|
|
33
|
+
| <= 5 issues + results | Direct inline analysis |
|
|
34
|
+
| > 5 | CLI-assisted deep analysis via gemini |
|
|
35
|
+
|
|
36
|
+
## Phase 3: Multi-Dimensional Analysis
|
|
37
|
+
|
|
38
|
+
**Five analysis dimensions**:
|
|
39
|
+
|
|
40
|
+
1. **Defect Pattern Analysis**: Group issues by type/perspective, identify patterns with >= 2 occurrences, record type/count/files/description
|
|
41
|
+
2. **Coverage Gap Analysis**: Compare actual coverage vs layer targets, identify per-file gaps (< 50% coverage), severity: critical (< 20%) / high (< 50%)
|
|
42
|
+
3. **Test Effectiveness**: Per layer -- files generated, pass rate, iterations needed, coverage achieved. Effective = pass_rate >= 95% AND iterations <= 2
|
|
43
|
+
4. **Quality Trend**: Compare against coverage_history. Trend: improving (delta > 5%), declining (delta < -5%), stable
|
|
44
|
+
5. **Quality Score** (0-100 starting from 100):
|
|
45
|
+
|
|
46
|
+
| Factor | Impact |
|
|
47
|
+
|--------|--------|
|
|
48
|
+
| Security issues | -10 per issue |
|
|
49
|
+
| Bug issues | -5 per issue |
|
|
50
|
+
| Coverage gap | -0.5 per gap percentage |
|
|
51
|
+
| Test failures | -(100 - pass_rate) * 0.3 per layer |
|
|
52
|
+
| Effective test layers | +5 per layer |
|
|
53
|
+
| Improving trend | +3 |
|
|
54
|
+
|
|
55
|
+
For CLI-assisted mode:
|
|
56
|
+
```
|
|
57
|
+
PURPOSE: Deep quality analysis on QA results to identify defect patterns and improvement opportunities
|
|
58
|
+
TASK: Classify defects by root cause, identify high-density files, analyze coverage gaps vs risk, generate recommendations
|
|
59
|
+
MODE: analysis
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Tech Profile Scan
|
|
63
|
+
|
|
64
|
+
After quality analysis, emit context-aware trigger signals (based on detected codebase characteristics):
|
|
65
|
+
|
|
66
|
+
1. Check defect patterns → signals (`injection_risk`, `auth_detected`, `sql_detected`)
|
|
67
|
+
2. Check coverage data → risk signals (`test_gap`, `perf_sensitive`, `legacy_patterns`)
|
|
68
|
+
3. Include `tech_profile` in Phase 5 state_update data
|
|
69
|
+
|
|
70
|
+
## Phase 4: Report Generation & Output
|
|
71
|
+
|
|
72
|
+
1. Generate quality report markdown with: score, defect patterns, coverage analysis, test effectiveness, quality trend, recommendations
|
|
73
|
+
2. Write report to `<session>/analysis/quality-report.md`
|
|
74
|
+
3. Update `<session>/wisdom/.msg/meta.json`:
|
|
75
|
+
- `defect_patterns`: identified patterns array
|
|
76
|
+
- `quality_score`: calculated score
|
|
77
|
+
- `coverage_history`: append new data point (date, coverage, quality_score, issues)
|
|
78
|
+
|
|
79
|
+
**Score-based recommendations**:
|
|
80
|
+
|
|
81
|
+
| Score | Recommendation |
|
|
82
|
+
|-------|----------------|
|
|
83
|
+
| >= 80 | Quality is GOOD. Maintain current testing practices. |
|
|
84
|
+
| 60-79 | Quality needs IMPROVEMENT. Focus on coverage gaps and recurring patterns. |
|
|
85
|
+
| < 60 | Quality is CONCERNING. Recommend comprehensive review and testing effort. |
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Analyze Task
|
|
2
|
+
|
|
3
|
+
Parse user task -> detect QA capabilities -> build dependency graph -> 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
|
+
| scan, discover, find issues, audit | scout | SCOUT |
|
|
12
|
+
| strategy, plan, test layers, coverage | strategist | QASTRAT |
|
|
13
|
+
| generate tests, write tests, create tests | generator | QAGEN |
|
|
14
|
+
| run tests, execute, fix tests | executor | QARUN |
|
|
15
|
+
| analyze, report, quality score | analyst | QAANA |
|
|
16
|
+
|
|
17
|
+
## QA Mode Detection
|
|
18
|
+
|
|
19
|
+
| Condition | Mode |
|
|
20
|
+
|-----------|------|
|
|
21
|
+
| Keywords: discovery, scan, issues, bug-finding | discovery |
|
|
22
|
+
| Keywords: test, coverage, TDD, unit, integration | testing |
|
|
23
|
+
| Both keyword types OR no clear match | full |
|
|
24
|
+
|
|
25
|
+
## Dependency Graph
|
|
26
|
+
|
|
27
|
+
Natural ordering tiers for QA pipeline:
|
|
28
|
+
- Tier 0: scout (issue discovery)
|
|
29
|
+
- Tier 1: strategist (strategy requires scout discoveries)
|
|
30
|
+
- Tier 2: generator (generation requires strategy)
|
|
31
|
+
- Tier 3: executor (execution requires generated tests)
|
|
32
|
+
- Tier 4: analyst (analysis requires execution results)
|
|
33
|
+
|
|
34
|
+
## Pipeline Definitions
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
Discovery Mode: SCOUT -> QASTRAT -> QAGEN(L1) -> QARUN(L1) -> QAANA
|
|
38
|
+
Testing Mode: QASTRAT -> QAGEN(L1) -> QARUN(L1) -> QAGEN(L2) -> QARUN(L2) -> QAANA
|
|
39
|
+
Full Mode: SCOUT -> QASTRAT -> [QAGEN(L1) || QAGEN(L2)] -> [QARUN(L1) || QARUN(L2)] -> QAANA -> SCOUT(regression)
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Complexity Scoring
|
|
43
|
+
|
|
44
|
+
| Factor | Points |
|
|
45
|
+
|--------|--------|
|
|
46
|
+
| Per capability | +1 |
|
|
47
|
+
| Cross-domain (test + discovery) | +2 |
|
|
48
|
+
| Parallel tracks | +1 per track |
|
|
49
|
+
| Serial depth > 3 | +1 |
|
|
50
|
+
|
|
51
|
+
Results: 1-3 Low, 4-6 Medium, 7+ High
|
|
52
|
+
|
|
53
|
+
## Role Minimization
|
|
54
|
+
|
|
55
|
+
- Cap at 6 roles (coordinator + 5 workers)
|
|
56
|
+
- Merge overlapping capabilities
|
|
57
|
+
- Absorb trivial single-step roles
|
|
58
|
+
|
|
59
|
+
## Output
|
|
60
|
+
|
|
61
|
+
Write <session>/task-analysis.json:
|
|
62
|
+
```json
|
|
63
|
+
{
|
|
64
|
+
"task_description": "<original>",
|
|
65
|
+
"pipeline_mode": "<discovery|testing|full>",
|
|
66
|
+
"capabilities": [{ "name": "<cap>", "prefix": "<PREFIX>", "keywords": ["..."] }],
|
|
67
|
+
"dependency_graph": { "<TASK-ID>": { "role": "<role>", "addBlockedBy": ["..."], "priority": "P0|P1|P2" } },
|
|
68
|
+
"roles": [{ "name": "<role>", "prefix": "<PREFIX>", "inner_loop": false }],
|
|
69
|
+
"complexity": { "score": 0, "level": "Low|Medium|High" },
|
|
70
|
+
"gc_loop_enabled": true
|
|
71
|
+
}
|
|
72
|
+
```
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# Dispatch Tasks
|
|
2
|
+
|
|
3
|
+
Create task chains from dependency graph with proper addBlockedBy relationships.
|
|
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 addBlockedBy)
|
|
10
|
+
4. Validate all owners exist in role registry (SKILL.md)
|
|
11
|
+
5. For each task (in order):
|
|
12
|
+
- TaskCreate with structured description (see template below)
|
|
13
|
+
- TaskUpdate with addBlockedBy + 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
|
+
- Layer: <L1-unit|L2-integration|L3-e2e> (if applicable)
|
|
27
|
+
- Upstream artifacts: <list>
|
|
28
|
+
- Shared memory: <session>/wisdom/.msg/meta.json
|
|
29
|
+
EXPECTED: <artifact path> + <quality criteria>
|
|
30
|
+
CONSTRAINTS: <scope limits>
|
|
31
|
+
---
|
|
32
|
+
InnerLoop: <true|false>
|
|
33
|
+
RoleSpec: ~ or <project>/.claude/skills/team-quality-assurance/roles/<role>/role.md
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Pipeline Task Registry
|
|
37
|
+
|
|
38
|
+
### Discovery Mode
|
|
39
|
+
```
|
|
40
|
+
SCOUT-001 (scout): Multi-perspective issue scanning
|
|
41
|
+
addBlockedBy: []
|
|
42
|
+
QASTRAT-001 (strategist): Test strategy formulation
|
|
43
|
+
addBlockedBy: [SCOUT-001]
|
|
44
|
+
QAGEN-001 (generator): L1 unit test generation
|
|
45
|
+
addBlockedBy: [QASTRAT-001], meta: layer=L1
|
|
46
|
+
QARUN-001 (executor): L1 test execution + fix cycles
|
|
47
|
+
addBlockedBy: [QAGEN-001], inner_loop: true, meta: layer=L1
|
|
48
|
+
QAANA-001 (analyst): Quality analysis report
|
|
49
|
+
addBlockedBy: [QARUN-001]
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Testing Mode
|
|
53
|
+
```
|
|
54
|
+
QASTRAT-001 (strategist): Test strategy formulation
|
|
55
|
+
addBlockedBy: []
|
|
56
|
+
QAGEN-L1-001 (generator): L1 unit test generation
|
|
57
|
+
addBlockedBy: [QASTRAT-001], meta: layer=L1
|
|
58
|
+
QARUN-L1-001 (executor): L1 test execution + fix cycles
|
|
59
|
+
addBlockedBy: [QAGEN-L1-001], inner_loop: true, meta: layer=L1
|
|
60
|
+
QAGEN-L2-001 (generator): L2 integration test generation
|
|
61
|
+
addBlockedBy: [QARUN-L1-001], meta: layer=L2
|
|
62
|
+
QARUN-L2-001 (executor): L2 test execution + fix cycles
|
|
63
|
+
addBlockedBy: [QAGEN-L2-001], inner_loop: true, meta: layer=L2
|
|
64
|
+
QAANA-001 (analyst): Quality analysis report
|
|
65
|
+
addBlockedBy: [QARUN-L2-001]
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Full Mode
|
|
69
|
+
```
|
|
70
|
+
SCOUT-001 (scout): Multi-perspective issue scanning
|
|
71
|
+
addBlockedBy: []
|
|
72
|
+
QASTRAT-001 (strategist): Test strategy formulation
|
|
73
|
+
addBlockedBy: [SCOUT-001]
|
|
74
|
+
QAGEN-L1-001 (generator-1): L1 unit test generation
|
|
75
|
+
addBlockedBy: [QASTRAT-001], meta: layer=L1
|
|
76
|
+
QAGEN-L2-001 (generator-2): L2 integration test generation
|
|
77
|
+
addBlockedBy: [QASTRAT-001], meta: layer=L2
|
|
78
|
+
QARUN-L1-001 (executor-1): L1 test execution + fix cycles
|
|
79
|
+
addBlockedBy: [QAGEN-L1-001], inner_loop: true, meta: layer=L1
|
|
80
|
+
QARUN-L2-001 (executor-2): L2 test execution + fix cycles
|
|
81
|
+
addBlockedBy: [QAGEN-L2-001], inner_loop: true, meta: layer=L2
|
|
82
|
+
QAANA-001 (analyst): Quality analysis report
|
|
83
|
+
addBlockedBy: [QARUN-L1-001, QARUN-L2-001]
|
|
84
|
+
SCOUT-002 (scout): Regression scan after fixes
|
|
85
|
+
addBlockedBy: [QAANA-001]
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## InnerLoop Flag Rules
|
|
89
|
+
|
|
90
|
+
- true: executor roles (run-fix cycles)
|
|
91
|
+
- false: scout, strategist, generator, analyst roles
|
|
92
|
+
|
|
93
|
+
## Dependency Validation
|
|
94
|
+
|
|
95
|
+
- No orphan tasks (all tasks have valid owner)
|
|
96
|
+
- No circular dependencies
|
|
97
|
+
- All addBlockedBy references exist
|
|
98
|
+
- Session reference in every task description
|
|
99
|
+
- RoleSpec reference in every task description
|
|
100
|
+
|
|
101
|
+
## Log After Creation
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
mcp__ccw-tools__team_msg({
|
|
105
|
+
operation: "log",
|
|
106
|
+
session_id: <session-id>,
|
|
107
|
+
from: "coordinator",
|
|
108
|
+
type: "pipeline_selected",
|
|
109
|
+
data: { pipeline: "<mode>", task_count: <N> }
|
|
110
|
+
})
|
|
111
|
+
```
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
|
|
2
|
+
## Sub-Agent Registration (Antigravity)
|
|
3
|
+
|
|
4
|
+
Before any `invoke_subagent` call below, register each sub-agent type once per session by reading the system_prompt from `<agy-agents-dir>/<name>.md` and passing it to `define_subagent`. The `<agy-agents-dir>` is:
|
|
5
|
+
- global install: `~/.gemini/antigravity-cli/agents/`
|
|
6
|
+
- workspace install: `<project>/.agents/agents/`
|
|
7
|
+
|
|
8
|
+
- `define_subagent(name="team-worker", description="<from agents/team-worker.md frontmatter>", system_prompt=<contents of agents/team-worker.md body>, enable_write_tools=true, enable_mcp_tools=true, enable_subagent_tools=false)`
|
|
9
|
+
|
|
10
|
+
**ConversationId tracking**: `invoke_subagent` returns a ConversationId per spawned instance. Subsequent `send_message(Recipient=<ConversationId>, Message=...)` calls require that ConversationId — never use the role name as the recipient.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
# Monitor Pipeline
|
|
14
|
+
|
|
15
|
+
Event-driven pipeline coordination. Beat model: coordinator wake -> process -> spawn -> STOP.
|
|
16
|
+
|
|
17
|
+
## Constants
|
|
18
|
+
|
|
19
|
+
- SPAWN_MODE: background
|
|
20
|
+
- ONE_STEP_PER_INVOCATION: true
|
|
21
|
+
- FAST_ADVANCE_AWARE: true
|
|
22
|
+
- WORKER_AGENT: team-worker
|
|
23
|
+
- MAX_GC_ROUNDS: 3
|
|
24
|
+
|
|
25
|
+
## Handler Router
|
|
26
|
+
|
|
27
|
+
| Source | Handler |
|
|
28
|
+
|--------|---------|
|
|
29
|
+
| Message contains [scout], [strategist], [generator], [executor], [analyst] | handleCallback |
|
|
30
|
+
| "capability_gap" | handleAdapt |
|
|
31
|
+
| "check" or "status" | handleCheck |
|
|
32
|
+
| "resume" or "continue" | handleResume |
|
|
33
|
+
| All tasks completed | handleComplete |
|
|
34
|
+
| Default | handleSpawnNext |
|
|
35
|
+
|
|
36
|
+
## handleCallback
|
|
37
|
+
|
|
38
|
+
Worker completed. Process and advance.
|
|
39
|
+
|
|
40
|
+
1. Parse message to identify role and task ID:
|
|
41
|
+
|
|
42
|
+
| Message Pattern | Role Detection |
|
|
43
|
+
|----------------|---------------|
|
|
44
|
+
| `[scout]` or task ID `SCOUT-*` | scout |
|
|
45
|
+
| `[strategist]` or task ID `QASTRAT-*` | strategist |
|
|
46
|
+
| `[generator]` or task ID `QAGEN-*` | generator |
|
|
47
|
+
| `[executor]` or task ID `QARUN-*` | executor |
|
|
48
|
+
| `[analyst]` or task ID `QAANA-*` | analyst |
|
|
49
|
+
|
|
50
|
+
2. Check if progress update (inner loop) or final completion
|
|
51
|
+
3. Progress -> update session state, STOP
|
|
52
|
+
4. Completion -> mark task done via TaskUpdate(status="completed"), remove from active_workers
|
|
53
|
+
5. Check for checkpoints:
|
|
54
|
+
- QARUN-* completes -> read meta.json for coverage:
|
|
55
|
+
- coverage >= target OR gc_rounds >= MAX_GC_ROUNDS -> proceed to handleSpawnNext
|
|
56
|
+
- coverage < target AND gc_rounds < MAX_GC_ROUNDS -> create GC fix tasks, increment gc_rounds
|
|
57
|
+
|
|
58
|
+
**GC Fix Task Creation** (when coverage below target):
|
|
59
|
+
```
|
|
60
|
+
TaskCreate({
|
|
61
|
+
subject: "QAGEN-fix-<round>: Fix tests for <layer> (GC #<round>)",
|
|
62
|
+
description: "PURPOSE: Fix failing tests and improve coverage | Success: Coverage meets target
|
|
63
|
+
TASK:
|
|
64
|
+
- Load execution results and failing test details
|
|
65
|
+
- Fix broken tests and add missing coverage
|
|
66
|
+
CONTEXT:
|
|
67
|
+
- Session: <session-folder>
|
|
68
|
+
- Layer: <layer>
|
|
69
|
+
- Previous results: <session>/results/run-<layer>.json
|
|
70
|
+
EXPECTED: Fixed test files | Improved coverage
|
|
71
|
+
CONSTRAINTS: Only modify test files | No source changes
|
|
72
|
+
---
|
|
73
|
+
InnerLoop: false
|
|
74
|
+
RoleSpec: ~ or <project>/.claude/skills/team-quality-assurance/roles/generator/role.md"
|
|
75
|
+
})
|
|
76
|
+
TaskCreate({
|
|
77
|
+
subject: "QARUN-gc-<round>: Re-execute <layer> (GC #<round>)",
|
|
78
|
+
description: "PURPOSE: Re-execute tests after fixes | Success: Coverage >= target
|
|
79
|
+
TASK: Execute test suite, measure coverage, report results
|
|
80
|
+
CONTEXT:
|
|
81
|
+
- Session: <session-folder>
|
|
82
|
+
- Layer: <layer>
|
|
83
|
+
EXPECTED: <session>/results/run-<layer>-gc-<round>.json
|
|
84
|
+
CONSTRAINTS: Read-only execution
|
|
85
|
+
---
|
|
86
|
+
InnerLoop: false
|
|
87
|
+
RoleSpec: ~ or <project>/.claude/skills/team-quality-assurance/roles/executor/role.md"
|
|
88
|
+
})
|
|
89
|
+
TaskUpdate({ taskId: "QARUN-gc-<round>", addBlockedBy: ["QAGEN-fix-<round>"] })
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
6. -> handleSpawnNext
|
|
93
|
+
|
|
94
|
+
## handleCheck
|
|
95
|
+
|
|
96
|
+
Read-only status report, then STOP.
|
|
97
|
+
|
|
98
|
+
**Worker Progress** (from message bus):
|
|
99
|
+
|
|
100
|
+
Before generating status output, read worker milestones:
|
|
101
|
+
|
|
102
|
+
```javascript
|
|
103
|
+
const progressMsgs = mcp__ccw-tools__team_msg({
|
|
104
|
+
operation: "list", session_id: sessionId, type: "progress", last: 50
|
|
105
|
+
})
|
|
106
|
+
const blockerMsgs = mcp__ccw-tools__team_msg({
|
|
107
|
+
operation: "list", session_id: sessionId, type: "blocker", last: 10
|
|
108
|
+
})
|
|
109
|
+
|
|
110
|
+
// Aggregate latest milestone per task
|
|
111
|
+
const taskProgress = {}
|
|
112
|
+
for (const msg of (progressMsgs.result?.messages || [])) {
|
|
113
|
+
const tid = msg.data?.task_id
|
|
114
|
+
if (tid && (!taskProgress[tid] || msg.ts > taskProgress[tid].ts)) {
|
|
115
|
+
taskProgress[tid] = { phase: msg.data.phase, pct: msg.data.progress_pct, ts: msg.ts }
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Include in status output:
|
|
121
|
+
- Per-worker latest milestone (phase + progress_pct) next to task status
|
|
122
|
+
- Active blockers section (if any blockerMsgs found)
|
|
123
|
+
|
|
124
|
+
Output:
|
|
125
|
+
```
|
|
126
|
+
[coordinator] QA Pipeline Status
|
|
127
|
+
[coordinator] Mode: <pipeline_mode>
|
|
128
|
+
[coordinator] Progress: <done>/<total> (<pct>%)
|
|
129
|
+
[coordinator] GC Rounds: <gc_rounds>/3
|
|
130
|
+
|
|
131
|
+
[coordinator] Pipeline Graph:
|
|
132
|
+
SCOUT-001: <done|run|wait> <summary>
|
|
133
|
+
QASTRAT-001: <done|run|wait> <summary>
|
|
134
|
+
QAGEN-001: <done|run|wait> <summary>
|
|
135
|
+
QARUN-001: <done|run|wait> <summary>
|
|
136
|
+
QAANA-001: <done|run|wait> <summary>
|
|
137
|
+
|
|
138
|
+
[coordinator] Active Workers: <list with elapsed time>
|
|
139
|
+
[coordinator] Ready: <pending tasks with resolved deps>
|
|
140
|
+
[coordinator] Commands: 'resume' to advance | 'check' to refresh
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
Then STOP.
|
|
144
|
+
|
|
145
|
+
## handleResume
|
|
146
|
+
|
|
147
|
+
1. No active workers -> handleSpawnNext
|
|
148
|
+
2. Has active -> check each status
|
|
149
|
+
- completed -> mark done via TaskUpdate
|
|
150
|
+
- in_progress -> still running
|
|
151
|
+
3. Some completed -> handleSpawnNext
|
|
152
|
+
4. All running -> report status, STOP
|
|
153
|
+
|
|
154
|
+
## handleSpawnNext
|
|
155
|
+
|
|
156
|
+
Find ready tasks, spawn workers, STOP.
|
|
157
|
+
|
|
158
|
+
1. Collect from TaskList():
|
|
159
|
+
- completedSubjects: status = completed
|
|
160
|
+
- inProgressSubjects: status = in_progress
|
|
161
|
+
- readySubjects: status = pending AND all blockedBy in completedSubjects
|
|
162
|
+
|
|
163
|
+
2. No ready + work in progress -> report waiting, STOP
|
|
164
|
+
3. No ready + nothing in progress -> handleComplete
|
|
165
|
+
4. Has ready -> for each:
|
|
166
|
+
a. Determine role from task prefix:
|
|
167
|
+
|
|
168
|
+
| Prefix | Role | inner_loop |
|
|
169
|
+
|--------|------|------------|
|
|
170
|
+
| SCOUT-* | scout | false |
|
|
171
|
+
| QASTRAT-* | strategist | false |
|
|
172
|
+
| QAGEN-* | generator | false |
|
|
173
|
+
| QARUN-* | executor | true |
|
|
174
|
+
| QAANA-* | analyst | false |
|
|
175
|
+
|
|
176
|
+
b. Check if inner loop role with active worker -> skip (worker picks up next task)
|
|
177
|
+
c. TaskUpdate -> in_progress
|
|
178
|
+
d. team_msg log -> task_unblocked
|
|
179
|
+
e. Spawn team-worker:
|
|
180
|
+
|
|
181
|
+
```
|
|
182
|
+
invoke_subagent([{ TypeName: "team-worker", Role: "<role>", Prompt: "<Prompt>", Workspace: "inherit" }])
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
f. Add to active_workers
|
|
186
|
+
5. Update session, output summary, STOP
|
|
187
|
+
|
|
188
|
+
## handleComplete
|
|
189
|
+
|
|
190
|
+
Pipeline done. Generate report and completion action.
|
|
191
|
+
|
|
192
|
+
1. Verify all tasks (including GC fix/recheck tasks) have status "completed" or "deleted"
|
|
193
|
+
2. If any tasks incomplete -> return to handleSpawnNext
|
|
194
|
+
3. If all complete:
|
|
195
|
+
- Read final state from meta.json (quality_score, coverage, gc_rounds)
|
|
196
|
+
- Generate summary (deliverables, stats, discussions)
|
|
197
|
+
4. Read session.completion_action:
|
|
198
|
+
- interactive -> ask_question (Archive/Keep/Export)
|
|
199
|
+
- auto_archive -> Archive & Clean (status=completed, TeamDelete)
|
|
200
|
+
- auto_keep -> Keep Active (status=paused)
|
|
201
|
+
|
|
202
|
+
## handleAdapt
|
|
203
|
+
|
|
204
|
+
Capability gap reported mid-pipeline.
|
|
205
|
+
|
|
206
|
+
1. Parse gap description
|
|
207
|
+
2. Check if existing role covers it -> redirect
|
|
208
|
+
3. Role count < 6 -> generate dynamic role-spec in <session>/role-specs/
|
|
209
|
+
4. Create new task, spawn worker
|
|
210
|
+
5. Role count >= 6 -> merge or pause
|
|
211
|
+
|
|
212
|
+
## Fast-Advance Reconciliation
|
|
213
|
+
|
|
214
|
+
On every coordinator wake:
|
|
215
|
+
1. Read team_msg entries with type="fast_advance"
|
|
216
|
+
2. Sync active_workers with spawned successors
|
|
217
|
+
3. No duplicate spawns
|
|
218
|
+
|
|
219
|
+
## Phase 4: State Persistence
|
|
220
|
+
|
|
221
|
+
After every handler execution:
|
|
222
|
+
1. Reconcile active_workers with actual TaskList states
|
|
223
|
+
2. Remove entries for completed/deleted tasks
|
|
224
|
+
3. Write updated meta.json
|
|
225
|
+
4. STOP (wait for next callback)
|
|
226
|
+
|
|
227
|
+
## Error Handling
|
|
228
|
+
|
|
229
|
+
| Scenario | Resolution |
|
|
230
|
+
|----------|------------|
|
|
231
|
+
| Session file not found | Error, suggest re-initialization |
|
|
232
|
+
| Worker callback from unknown role | Log info, scan for other completions |
|
|
233
|
+
| Pipeline stall (no ready, no running, has pending) | Check blockedBy chains, report to user |
|
|
234
|
+
| GC loop exceeded | Accept current coverage with warning, proceed |
|
|
235
|
+
| Scout finds 0 issues | Skip to testing mode, proceed to QASTRAT |
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
# Coordinator Role
|
|
2
|
+
|
|
3
|
+
Orchestrate team-quality-assurance: analyze -> dispatch -> spawn -> monitor -> report.
|
|
4
|
+
|
|
5
|
+
## Identity
|
|
6
|
+
- Name: coordinator | Tag: [coordinator]
|
|
7
|
+
- Responsibility: Parse requirements -> Mode selection -> Create team -> Dispatch tasks -> Monitor progress -> Report results
|
|
8
|
+
|
|
9
|
+
## Boundaries
|
|
10
|
+
|
|
11
|
+
### MUST
|
|
12
|
+
- Parse task description and detect QA mode
|
|
13
|
+
- Create team and spawn team-worker agents in background
|
|
14
|
+
- Dispatch tasks with proper dependency chains
|
|
15
|
+
- Monitor progress via callbacks and route messages
|
|
16
|
+
- Maintain session state
|
|
17
|
+
- Handle GC loop (generator-executor coverage cycles)
|
|
18
|
+
- Execute completion action when pipeline finishes
|
|
19
|
+
|
|
20
|
+
### MUST NOT
|
|
21
|
+
- Read source code or explore codebase (delegate to workers)
|
|
22
|
+
- Execute scan, test, or analysis work directly
|
|
23
|
+
- Modify test files or source code
|
|
24
|
+
- Spawn workers with general-purpose agent (MUST use team-worker)
|
|
25
|
+
- Generate more than 6 worker roles
|
|
26
|
+
|
|
27
|
+
## Command Execution Protocol
|
|
28
|
+
When coordinator needs to execute a specific phase:
|
|
29
|
+
1. Read `commands/<command>.md`
|
|
30
|
+
2. Follow the workflow defined in the command
|
|
31
|
+
3. Commands are inline execution guides, NOT separate agents
|
|
32
|
+
4. Execute synchronously, complete before proceeding
|
|
33
|
+
|
|
34
|
+
## Entry Router
|
|
35
|
+
|
|
36
|
+
| Detection | Condition | Handler |
|
|
37
|
+
|-----------|-----------|---------|
|
|
38
|
+
| Worker callback | Message contains [scout], [strategist], [generator], [executor], [analyst] | -> handleCallback (monitor.md) |
|
|
39
|
+
| Status check | Args contain "check" or "status" | -> handleCheck (monitor.md) |
|
|
40
|
+
| Manual resume | Args contain "resume" or "continue" | -> handleResume (monitor.md) |
|
|
41
|
+
| Capability gap | Message contains "capability_gap" | -> handleAdapt (monitor.md) |
|
|
42
|
+
| Pipeline complete | All tasks completed | -> handleComplete (monitor.md) |
|
|
43
|
+
| Interrupted session | Active session in .workflow/.team/QA-* | -> Phase 0 |
|
|
44
|
+
| New session | None of above | -> Phase 1 |
|
|
45
|
+
|
|
46
|
+
For callback/check/resume/adapt/complete: load @commands/monitor.md, execute handler, STOP.
|
|
47
|
+
|
|
48
|
+
## Phase 0: Session Resume Check
|
|
49
|
+
|
|
50
|
+
1. Scan .workflow/.team/QA-*/session.json for active/paused sessions
|
|
51
|
+
2. No sessions -> Phase 1
|
|
52
|
+
3. Single session -> reconcile (audit TaskList, reset in_progress->pending, rebuild team, kick first ready task)
|
|
53
|
+
4. Multiple -> ask_question for selection
|
|
54
|
+
|
|
55
|
+
## Phase 1: Requirement Clarification
|
|
56
|
+
|
|
57
|
+
TEXT-LEVEL ONLY. No source code reading.
|
|
58
|
+
|
|
59
|
+
1. Parse task description and extract flags
|
|
60
|
+
2. **QA Mode Selection**:
|
|
61
|
+
|
|
62
|
+
| Condition | Mode |
|
|
63
|
+
|-----------|------|
|
|
64
|
+
| Explicit `--mode=discovery` flag | discovery |
|
|
65
|
+
| Explicit `--mode=testing` flag | testing |
|
|
66
|
+
| Explicit `--mode=full` flag | full |
|
|
67
|
+
| Task description contains: discovery/scan/issue keywords | discovery |
|
|
68
|
+
| Task description contains: test/coverage/TDD keywords | testing |
|
|
69
|
+
| No explicit flag and no keyword match | full (default) |
|
|
70
|
+
|
|
71
|
+
3. Clarify if ambiguous (ask_question: scope, deliverables, constraints)
|
|
72
|
+
4. Delegate to @commands/analyze.md
|
|
73
|
+
5. Output: task-analysis.json
|
|
74
|
+
6. 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 `run_command({ command: "pwd" })`
|
|
80
|
+
- `skill_root` = `<project_root>/.claude/skills/team-quality-assurance`
|
|
81
|
+
2. Generate session ID: QA-<slug>-<date>
|
|
82
|
+
3. Create session folder structure
|
|
83
|
+
4. TeamCreate with team name "quality-assurance"
|
|
84
|
+
5. Read specs/pipelines.md -> select pipeline based on mode
|
|
85
|
+
6. Register roles in session.json
|
|
86
|
+
7. Initialize shared infrastructure (wisdom/*.md)
|
|
87
|
+
8. Initialize pipeline via team_msg state_update:
|
|
88
|
+
```
|
|
89
|
+
mcp__ccw-tools__team_msg({
|
|
90
|
+
operation: "log", session_id: "<id>", from: "coordinator",
|
|
91
|
+
type: "state_update", summary: "Session initialized",
|
|
92
|
+
data: {
|
|
93
|
+
pipeline_mode: "<discovery|testing|full>",
|
|
94
|
+
pipeline_stages: [...],
|
|
95
|
+
team_name: "quality-assurance",
|
|
96
|
+
discovered_issues: [],
|
|
97
|
+
test_strategy: {},
|
|
98
|
+
generated_tests: {},
|
|
99
|
+
execution_results: {},
|
|
100
|
+
defect_patterns: [],
|
|
101
|
+
coverage_history: [],
|
|
102
|
+
quality_score: null
|
|
103
|
+
}
|
|
104
|
+
})
|
|
105
|
+
```
|
|
106
|
+
9. Write session.json
|
|
107
|
+
|
|
108
|
+
## Phase 3: Create Task Chain
|
|
109
|
+
|
|
110
|
+
Delegate to @commands/dispatch.md:
|
|
111
|
+
1. Read dependency graph from task-analysis.json
|
|
112
|
+
2. Read specs/pipelines.md for selected pipeline's task registry
|
|
113
|
+
3. Topological sort tasks
|
|
114
|
+
4. Create tasks via TaskCreate, then TaskUpdate with addBlockedBy
|
|
115
|
+
5. Update session.json
|
|
116
|
+
|
|
117
|
+
## Phase 4: Spawn-and-Stop
|
|
118
|
+
|
|
119
|
+
Delegate to @commands/monitor.md#handleSpawnNext:
|
|
120
|
+
1. Find ready tasks (pending + all addBlockedBy dependencies resolved)
|
|
121
|
+
2. Spawn team-worker agents (see SKILL.md Spawn Template)
|
|
122
|
+
3. Output status summary
|
|
123
|
+
4. STOP
|
|
124
|
+
|
|
125
|
+
## Phase 5: Report + Completion Action
|
|
126
|
+
|
|
127
|
+
1. Generate summary (deliverables, pipeline stats, quality score, GC rounds)
|
|
128
|
+
2. Execute completion action per session.completion_action:
|
|
129
|
+
- interactive -> ask_question (Archive/Keep/Export)
|
|
130
|
+
- auto_archive -> Archive & Clean
|
|
131
|
+
- auto_keep -> Keep Active
|
|
132
|
+
|
|
133
|
+
## Error Handling
|
|
134
|
+
|
|
135
|
+
| Error | Resolution |
|
|
136
|
+
|-------|------------|
|
|
137
|
+
| Task too vague | ask_question for clarification |
|
|
138
|
+
| Session corruption | Attempt recovery, fallback to manual |
|
|
139
|
+
| Worker crash | Reset task to pending, respawn |
|
|
140
|
+
| Dependency cycle | Detect in analysis, halt |
|
|
141
|
+
| Scout finds nothing | Skip to testing mode |
|
|
142
|
+
| GC loop stuck > 3 | Accept current coverage with warning |
|
|
143
|
+
| quality_score < 60 | Report with WARNING, suggest re-run |
|