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.
Files changed (187) hide show
  1. package/.agy/agents/cli-explore-agent.md +186 -0
  2. package/.agy/agents/conceptual-planning-agent.md +244 -0
  3. package/.agy/agents/impeccable-agent.md +97 -0
  4. package/.agy/agents/team-supervisor.md +142 -0
  5. package/.agy/agents/team-worker.md +236 -0
  6. package/.agy/agents/ui-design-agent.md +286 -0
  7. package/.agy/agents/workflow-analyzer.md +114 -0
  8. package/.agy/agents/workflow-codebase-mapper.md +76 -0
  9. package/.agy/agents/workflow-collab-planner.md +142 -0
  10. package/.agy/agents/workflow-debugger.md +102 -0
  11. package/.agy/agents/workflow-executor.md +131 -0
  12. package/.agy/agents/workflow-external-researcher.md +86 -0
  13. package/.agy/agents/workflow-integration-checker.md +82 -0
  14. package/.agy/agents/workflow-nyquist-auditor.md +84 -0
  15. package/.agy/agents/workflow-phase-researcher.md +84 -0
  16. package/.agy/agents/workflow-plan-checker.md +89 -0
  17. package/.agy/agents/workflow-planner.md +194 -0
  18. package/.agy/agents/workflow-project-researcher.md +73 -0
  19. package/.agy/agents/workflow-research-synthesizer.md +70 -0
  20. package/.agy/agents/workflow-reviewer.md +81 -0
  21. package/.agy/agents/workflow-roadmapper.md +81 -0
  22. package/.agy/agents/workflow-verifier.md +119 -0
  23. package/.agy/skills/codify-to-knowhow/SKILL.md +172 -0
  24. package/.agy/skills/codify-to-knowhow/phases/01-load-manifest.md +101 -0
  25. package/.agy/skills/codify-to-knowhow/phases/02-generate-knowhow.md +97 -0
  26. package/.agy/skills/codify-to-knowhow/phases/03-generate-specs.md +92 -0
  27. package/.agy/skills/codify-to-knowhow/phases/04-index-verify.md +119 -0
  28. package/.agy/skills/learn-decompose/SKILL.md +118 -0
  29. package/.agy/skills/learn-follow/SKILL.md +129 -0
  30. package/.agy/skills/learn-investigate/SKILL.md +154 -0
  31. package/.agy/skills/learn-retro/SKILL.md +159 -0
  32. package/.agy/skills/learn-second-opinion/SKILL.md +124 -0
  33. package/.agy/skills/maestro/SKILL.md +221 -0
  34. package/.agy/skills/maestro-amend/SKILL.md +162 -0
  35. package/.agy/skills/maestro-analyze/SKILL.md +135 -0
  36. package/.agy/skills/maestro-brainstorm/SKILL.md +118 -0
  37. package/.agy/skills/maestro-collab/SKILL.md +174 -0
  38. package/.agy/skills/maestro-composer/SKILL.md +180 -0
  39. package/.agy/skills/maestro-execute/SKILL.md +133 -0
  40. package/.agy/skills/maestro-fork/SKILL.md +88 -0
  41. package/.agy/skills/maestro-guard/SKILL.md +101 -0
  42. package/.agy/skills/maestro-help/SKILL.md +267 -0
  43. package/.agy/skills/maestro-help/index/catalog.json +184 -0
  44. package/.agy/skills/maestro-help/phases/01-parse-intent.md +122 -0
  45. package/.agy/skills/maestro-help/phases/02-search-present.md +181 -0
  46. package/.agy/skills/maestro-help/phases/03-workflow-guide.md +186 -0
  47. package/.agy/skills/maestro-impeccable/SKILL.md +250 -0
  48. package/.agy/skills/maestro-init/SKILL.md +80 -0
  49. package/.agy/skills/maestro-learn/SKILL.md +142 -0
  50. package/.agy/skills/maestro-merge/SKILL.md +66 -0
  51. package/.agy/skills/maestro-milestone-audit/SKILL.md +70 -0
  52. package/.agy/skills/maestro-milestone-complete/SKILL.md +77 -0
  53. package/.agy/skills/maestro-milestone-release/SKILL.md +98 -0
  54. package/.agy/skills/maestro-overlay/SKILL.md +177 -0
  55. package/.agy/skills/maestro-plan/SKILL.md +172 -0
  56. package/.agy/skills/maestro-player/SKILL.md +176 -0
  57. package/.agy/skills/maestro-quick/SKILL.md +67 -0
  58. package/.agy/skills/maestro-ralph/SKILL.md +546 -0
  59. package/.agy/skills/maestro-ralph-execute/SKILL.md +255 -0
  60. package/.agy/skills/maestro-roadmap/SKILL.md +170 -0
  61. package/.agy/skills/maestro-tools-execute/SKILL.md +119 -0
  62. package/.agy/skills/maestro-tools-register/SKILL.md +159 -0
  63. package/.agy/skills/maestro-ui-codify/SKILL.md +81 -0
  64. package/.agy/skills/maestro-update/SKILL.md +175 -0
  65. package/.agy/skills/maestro-verify/SKILL.md +111 -0
  66. package/.agy/skills/manage-codebase-rebuild/SKILL.md +77 -0
  67. package/.agy/skills/manage-codebase-refresh/SKILL.md +59 -0
  68. package/.agy/skills/manage-harvest/SKILL.md +96 -0
  69. package/.agy/skills/manage-issue/SKILL.md +72 -0
  70. package/.agy/skills/manage-issue-discover/SKILL.md +83 -0
  71. package/.agy/skills/manage-knowhow/SKILL.md +76 -0
  72. package/.agy/skills/manage-knowhow-capture/SKILL.md +78 -0
  73. package/.agy/skills/manage-learn/SKILL.md +64 -0
  74. package/.agy/skills/manage-status/SKILL.md +51 -0
  75. package/.agy/skills/manage-wiki/SKILL.md +61 -0
  76. package/.agy/skills/quality-auto-test/SKILL.md +135 -0
  77. package/.agy/skills/quality-debug/SKILL.md +122 -0
  78. package/.agy/skills/quality-refactor/SKILL.md +69 -0
  79. package/.agy/skills/quality-retrospective/SKILL.md +79 -0
  80. package/.agy/skills/quality-review/SKILL.md +130 -0
  81. package/.agy/skills/quality-sync/SKILL.md +53 -0
  82. package/.agy/skills/quality-test/SKILL.md +119 -0
  83. package/.agy/skills/security-audit/SKILL.md +157 -0
  84. package/.agy/skills/skill-iter-tune/SKILL.md +381 -0
  85. package/.agy/skills/skill-iter-tune/phases/01-setup.md +144 -0
  86. package/.agy/skills/skill-iter-tune/phases/02-execute.md +292 -0
  87. package/.agy/skills/skill-iter-tune/phases/03-evaluate.md +312 -0
  88. package/.agy/skills/skill-iter-tune/phases/04-improve.md +198 -0
  89. package/.agy/skills/skill-iter-tune/phases/05-report.md +166 -0
  90. package/.agy/skills/skill-iter-tune/specs/evaluation-criteria.md +63 -0
  91. package/.agy/skills/skill-iter-tune/templates/eval-prompt.md +134 -0
  92. package/.agy/skills/skill-iter-tune/templates/execute-prompt.md +97 -0
  93. package/.agy/skills/spec-add/SKILL.md +67 -0
  94. package/.agy/skills/spec-load/SKILL.md +70 -0
  95. package/.agy/skills/spec-remove/SKILL.md +50 -0
  96. package/.agy/skills/spec-setup/SKILL.md +47 -0
  97. package/.agy/skills/team-coordinate/SKILL.md +267 -0
  98. package/.agy/skills/team-coordinate/roles/coordinator/commands/analyze-task.md +247 -0
  99. package/.agy/skills/team-coordinate/roles/coordinator/commands/dispatch.md +131 -0
  100. package/.agy/skills/team-coordinate/roles/coordinator/commands/monitor.md +348 -0
  101. package/.agy/skills/team-coordinate/roles/coordinator/role.md +362 -0
  102. package/.agy/skills/team-coordinate/specs/knowledge-transfer.md +111 -0
  103. package/.agy/skills/team-coordinate/specs/pipelines.md +97 -0
  104. package/.agy/skills/team-coordinate/specs/quality-gates.md +112 -0
  105. package/.agy/skills/team-coordinate/specs/role-spec-template.md +198 -0
  106. package/.agy/skills/team-executor/SKILL.md +180 -0
  107. package/.agy/skills/team-executor/roles/executor/commands/monitor.md +235 -0
  108. package/.agy/skills/team-executor/roles/executor/role.md +171 -0
  109. package/.agy/skills/team-executor/specs/session-schema.md +264 -0
  110. package/.agy/skills/team-lifecycle-v4/SKILL.md +189 -0
  111. package/.agy/skills/team-lifecycle-v4/roles/analyst/role.md +92 -0
  112. package/.agy/skills/team-lifecycle-v4/roles/coordinator/commands/analyze.md +56 -0
  113. package/.agy/skills/team-lifecycle-v4/roles/coordinator/commands/dispatch.md +56 -0
  114. package/.agy/skills/team-lifecycle-v4/roles/coordinator/commands/monitor.md +206 -0
  115. package/.agy/skills/team-lifecycle-v4/roles/coordinator/role.md +130 -0
  116. package/.agy/skills/team-lifecycle-v4/roles/executor/commands/fix.md +35 -0
  117. package/.agy/skills/team-lifecycle-v4/roles/executor/commands/implement.md +62 -0
  118. package/.agy/skills/team-lifecycle-v4/roles/executor/role.md +64 -0
  119. package/.agy/skills/team-lifecycle-v4/roles/planner/role.md +82 -0
  120. package/.agy/skills/team-lifecycle-v4/roles/reviewer/commands/review-code.md +34 -0
  121. package/.agy/skills/team-lifecycle-v4/roles/reviewer/commands/review-spec.md +44 -0
  122. package/.agy/skills/team-lifecycle-v4/roles/reviewer/role.md +65 -0
  123. package/.agy/skills/team-lifecycle-v4/roles/supervisor/role.md +188 -0
  124. package/.agy/skills/team-lifecycle-v4/roles/tester/role.md +84 -0
  125. package/.agy/skills/team-lifecycle-v4/roles/writer/role.md +92 -0
  126. package/.agy/skills/team-lifecycle-v4/specs/knowledge-transfer.md +114 -0
  127. package/.agy/skills/team-lifecycle-v4/specs/pipelines.md +140 -0
  128. package/.agy/skills/team-lifecycle-v4/specs/quality-gates.md +130 -0
  129. package/.agy/skills/team-lifecycle-v4/templates/architecture.md +254 -0
  130. package/.agy/skills/team-lifecycle-v4/templates/epics.md +196 -0
  131. package/.agy/skills/team-lifecycle-v4/templates/product-brief.md +133 -0
  132. package/.agy/skills/team-lifecycle-v4/templates/requirements.md +224 -0
  133. package/.agy/skills/team-quality-assurance/SKILL.md +148 -0
  134. package/.agy/skills/team-quality-assurance/roles/analyst/role.md +85 -0
  135. package/.agy/skills/team-quality-assurance/roles/coordinator/commands/analyze.md +72 -0
  136. package/.agy/skills/team-quality-assurance/roles/coordinator/commands/dispatch.md +111 -0
  137. package/.agy/skills/team-quality-assurance/roles/coordinator/commands/monitor.md +235 -0
  138. package/.agy/skills/team-quality-assurance/roles/coordinator/role.md +143 -0
  139. package/.agy/skills/team-quality-assurance/roles/executor/role.md +62 -0
  140. package/.agy/skills/team-quality-assurance/roles/generator/role.md +65 -0
  141. package/.agy/skills/team-quality-assurance/roles/scout/role.md +72 -0
  142. package/.agy/skills/team-quality-assurance/roles/strategist/role.md +69 -0
  143. package/.agy/skills/team-quality-assurance/specs/pipelines.md +115 -0
  144. package/.agy/skills/team-quality-assurance/specs/team-config.json +131 -0
  145. package/.agy/skills/team-review/SKILL.md +149 -0
  146. package/.agy/skills/team-review/roles/coordinator/commands/analyze.md +71 -0
  147. package/.agy/skills/team-review/roles/coordinator/commands/dispatch.md +91 -0
  148. package/.agy/skills/team-review/roles/coordinator/commands/monitor.md +209 -0
  149. package/.agy/skills/team-review/roles/coordinator/role.md +132 -0
  150. package/.agy/skills/team-review/roles/fixer/role.md +74 -0
  151. package/.agy/skills/team-review/roles/reviewer/role.md +66 -0
  152. package/.agy/skills/team-review/roles/scanner/role.md +77 -0
  153. package/.agy/skills/team-review/specs/dimensions.md +82 -0
  154. package/.agy/skills/team-review/specs/finding-schema.json +82 -0
  155. package/.agy/skills/team-review/specs/pipelines.md +102 -0
  156. package/.agy/skills/team-review/specs/team-config.json +27 -0
  157. package/.agy/skills/team-tech-debt/SKILL.md +133 -0
  158. package/.agy/skills/team-tech-debt/roles/assessor/role.md +76 -0
  159. package/.agy/skills/team-tech-debt/roles/coordinator/commands/analyze.md +47 -0
  160. package/.agy/skills/team-tech-debt/roles/coordinator/commands/dispatch.md +156 -0
  161. package/.agy/skills/team-tech-debt/roles/coordinator/commands/monitor.md +198 -0
  162. package/.agy/skills/team-tech-debt/roles/coordinator/role.md +123 -0
  163. package/.agy/skills/team-tech-debt/roles/executor/role.md +76 -0
  164. package/.agy/skills/team-tech-debt/roles/planner/role.md +68 -0
  165. package/.agy/skills/team-tech-debt/roles/scanner/role.md +90 -0
  166. package/.agy/skills/team-tech-debt/roles/validator/role.md +78 -0
  167. package/.agy/skills/team-tech-debt/specs/pipelines.md +47 -0
  168. package/.agy/skills/team-tech-debt/specs/team-config.json +129 -0
  169. package/.agy/skills/team-testing/SKILL.md +144 -0
  170. package/.agy/skills/team-testing/roles/analyst/role.md +101 -0
  171. package/.agy/skills/team-testing/roles/coordinator/commands/analyze.md +70 -0
  172. package/.agy/skills/team-testing/roles/coordinator/commands/dispatch.md +108 -0
  173. package/.agy/skills/team-testing/roles/coordinator/commands/monitor.md +242 -0
  174. package/.agy/skills/team-testing/roles/coordinator/role.md +134 -0
  175. package/.agy/skills/team-testing/roles/executor/role.md +95 -0
  176. package/.agy/skills/team-testing/roles/generator/role.md +95 -0
  177. package/.agy/skills/team-testing/roles/strategist/role.md +81 -0
  178. package/.agy/skills/team-testing/specs/pipelines.md +101 -0
  179. package/.agy/skills/team-testing/specs/team-config.json +93 -0
  180. package/.agy/skills/wiki-connect/SKILL.md +64 -0
  181. package/.agy/skills/wiki-digest/SKILL.md +70 -0
  182. package/.agy/skills/workflow-skill-designer/SKILL.md +506 -0
  183. package/.agy/skills/workflow-skill-designer/phases/01-requirements-analysis.md +356 -0
  184. package/.agy/skills/workflow-skill-designer/phases/02-orchestrator-design.md +444 -0
  185. package/.agy/skills/workflow-skill-designer/phases/03-phase-design.md +458 -0
  186. package/.agy/skills/workflow-skill-designer/phases/04-validation.md +471 -0
  187. package/package.json +3 -1
@@ -0,0 +1,62 @@
1
+ ---
2
+ role: executor
3
+ prefix: QARUN
4
+ inner_loop: true
5
+ additional_prefixes: [QARUN-gc]
6
+ message_types:
7
+ ---
8
+
9
+ # Test Executor
10
+
11
+ Run test suites, collect coverage data, and perform automatic fix cycles when tests fail. Implements the execution side of the Generator-Executor (GC) loop.
12
+
13
+ ## Phase 2: Environment Detection
14
+
15
+ | Input | Source | Required |
16
+ |-------|--------|----------|
17
+ | Task description | From task subject/description | Yes |
18
+ | Session path | Extracted from task description | Yes |
19
+ | .msg/meta.json | <session>/wisdom/.msg/meta.json | Yes |
20
+ | Test strategy | meta.json -> test_strategy | Yes |
21
+ | Generated tests | meta.json -> generated_tests | Yes |
22
+ | Target layer | task description `layer: L1/L2/L3` | Yes |
23
+
24
+ 1. Extract session path and target layer from task description
25
+ 2. Load validation specs: Run `ccw spec load --category quality` for verification rules and acceptance criteria
26
+ 3. Read .msg/meta.json for strategy and generated test file list
27
+ 3. Detect test command by framework:
28
+
29
+ | Framework | Command |
30
+ |-----------|---------|
31
+ | vitest | `npx vitest run --coverage --reporter=json --outputFile=test-results.json` |
32
+ | jest | `npx jest --coverage --json --outputFile=test-results.json` |
33
+ | pytest | `python -m pytest --cov --cov-report=json -v` |
34
+ | mocha | `npx mocha --reporter json > test-results.json` |
35
+ | unknown | `npm test -- --coverage` |
36
+
37
+ 4. Get test files from `generated_tests[targetLayer].files`
38
+
39
+ ## Phase 3: Iterative Test-Fix Cycle
40
+
41
+ **Max iterations**: 5. **Pass threshold**: 95% or all tests pass.
42
+
43
+ Per iteration:
44
+ 1. Run test command, capture output
45
+ 2. Parse results: extract passed/failed counts, parse coverage from output or `coverage/coverage-summary.json`
46
+ 3. If all pass (0 failures) -> exit loop (success)
47
+ 4. If pass rate >= 95% and iteration >= 2 -> exit loop (good enough)
48
+ 5. If iteration >= MAX -> exit loop (report current state)
49
+ 6. Extract failure details (error lines, assertion failures)
50
+ 7. Delegate fix via CLI tool with constraints:
51
+ - ONLY modify test files, NEVER modify source code
52
+ - Fix: incorrect assertions, missing imports, wrong mocks, setup issues
53
+ - Do NOT: skip tests, add `@ts-ignore`, use `as any`
54
+ 8. Increment iteration, repeat
55
+
56
+ ## Phase 4: Result Analysis & Output
57
+
58
+ 1. Build result data: layer, framework, iterations, pass_rate, coverage, tests_passed, tests_failed, all_passed
59
+ 2. Save results to `<session>/results/run-<layer>.json`
60
+ 3. Save last test output to `<session>/results/output-<layer>.txt`
61
+ 4. Update `<session>/wisdom/.msg/meta.json` under `execution_results[layer]` and top-level `execution_results.pass_rate`, `execution_results.coverage`
62
+ 5. Message type: `tests_passed` if all_passed, else `tests_failed`
@@ -0,0 +1,65 @@
1
+ ---
2
+ role: generator
3
+ prefix: QAGEN
4
+ inner_loop: false
5
+ additional_prefixes: [QAGEN-fix]
6
+ message_types:
7
+ ---
8
+
9
+ # Test Generator
10
+
11
+ Generate test code according to strategist's strategy and layers. Support L1 unit tests, L2 integration tests, L3 E2E tests. Follow project's existing test patterns and framework conventions.
12
+
13
+ ## Phase 2: Strategy & Pattern Loading
14
+
15
+ | Input | Source | Required |
16
+ |-------|--------|----------|
17
+ | Task description | From task subject/description | Yes |
18
+ | Session path | Extracted from task description | Yes |
19
+ | .msg/meta.json | <session>/wisdom/.msg/meta.json | Yes |
20
+ | Test strategy | meta.json -> test_strategy | Yes |
21
+ | Target layer | task description `layer: L1/L2/L3` | Yes |
22
+
23
+ 1. Extract session path and target layer from task description
24
+ 2. Read .msg/meta.json for test strategy (layers, coverage targets)
25
+ 3. Determine if this is a GC fix task (subject contains "fix")
26
+ 4. Load layer config from strategy: level, name, target_coverage, focus_files
27
+ 5. Learn existing test patterns -- find 3 similar test files via grep_search(`**/*.{test,spec}.{ts,tsx,js,jsx}`)
28
+ 6. Detect test conventions: file location (colocated vs __tests__), import style, describe/it nesting, framework (vitest/jest/pytest)
29
+
30
+ ## Phase 3: Test Code Generation
31
+
32
+ **Mode selection**:
33
+
34
+ | Condition | Mode |
35
+ |-----------|------|
36
+ | GC fix task | Read failure info from `<session>/results/run-<layer>.json`, fix failing tests only |
37
+ | <= 3 focus files | Direct: inline Read source -> Write test file |
38
+ | > 3 focus files | Batch by module, delegate via CLI tool |
39
+
40
+ **Direct generation flow** (per source file):
41
+ 1. Read source file content, extract exports
42
+ 2. Determine test file path following project conventions
43
+ 3. If test exists -> analyze missing cases -> append new tests via Edit
44
+ 4. If no test -> generate full test file via Write
45
+ 5. Include: happy path, edge cases, error cases per export
46
+
47
+ **GC fix flow**:
48
+ 1. Read execution results and failure output from results directory
49
+ 2. Read each failing test file
50
+ 3. Fix assertions, imports, mocks, or test setup
51
+ 4. Do NOT modify source code, do NOT skip/ignore tests
52
+
53
+ **General rules**:
54
+ - Follow existing test patterns exactly (imports, naming, structure)
55
+ - Target coverage per layer config
56
+ - Do NOT use `any` type assertions or `@ts-ignore`
57
+
58
+ ## Phase 4: Self-Validation & Output
59
+
60
+ 1. Collect generated/modified test files
61
+ 2. Run syntax check (TypeScript: `tsc --noEmit`, or framework-specific)
62
+ 3. Auto-fix syntax errors (max 3 attempts)
63
+ 4. Write test metadata to `<session>/wisdom/.msg/meta.json` under `generated_tests[layer]`:
64
+ - layer, files list, count, syntax_clean, mode, gc_fix flag
65
+ 5. Message type: `tests_generated` for new, `tests_revised` for GC fix iterations
@@ -0,0 +1,72 @@
1
+ ---
2
+ role: scout
3
+ prefix: SCOUT
4
+ inner_loop: false
5
+ message_types:
6
+ ---
7
+
8
+ # Multi-Perspective Scout
9
+
10
+ Scan codebase from multiple perspectives (bug, security, test-coverage, code-quality, UX) to discover potential issues. Produce structured scan results with severity-ranked findings.
11
+
12
+ ## Phase 2: Context & Scope Assessment
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 | No |
19
+
20
+ 1. Extract session path and target scope from task description
21
+ 2. Determine scan scope: explicit scope from task or `**/*` default
22
+ 3. Get recent changed files: `git diff --name-only HEAD~5 2>/dev/null || echo ""`
23
+ 4. Read .msg/meta.json for historical defect patterns (`defect_patterns`)
24
+ 5. Select scan perspectives based on task description:
25
+ - Default: `["bug", "security", "test-coverage", "code-quality"]`
26
+ - Add `"ux"` if task mentions UX/UI
27
+ 6. Assess complexity to determine scan strategy:
28
+
29
+ | Complexity | Condition | Strategy |
30
+ |------------|-----------|----------|
31
+ | Low | < 5 changed files, no specific keywords | ACE search + Grep inline |
32
+ | Medium | 5-15 files or specific perspective requested | CLI fan-out (3 core perspectives) |
33
+ | High | > 15 files or full-project scan | CLI fan-out (all perspectives) |
34
+
35
+ ## Phase 3: Multi-Perspective Scan
36
+
37
+ **Low complexity**: Use `mcp__ace-tool__search_context` for quick pattern-based scan.
38
+
39
+ **Medium/High complexity**: CLI fan-out -- one `maestro delegate --mode analysis` per perspective:
40
+
41
+ For each active perspective, build prompt:
42
+ ```
43
+ PURPOSE: Scan code from <perspective> perspective to discover potential issues
44
+ TASK: Analyze code patterns for <perspective> problems, identify anti-patterns, check for common issues
45
+ MODE: analysis
46
+ CONTEXT: @<scan-scope>
47
+ EXPECTED: List of findings with severity (critical/high/medium/low), file:line references, description
48
+ CONSTRAINTS: Focus on actionable findings only
49
+ ```
50
+ Execute via: `maestro delegate "<prompt>" --role analyze --mode analysis`
51
+
52
+ After all perspectives complete:
53
+ - Parse CLI outputs into structured findings
54
+ - Deduplicate by file:line (merge perspectives for same location)
55
+ - Compare against known defect patterns from .msg/meta.json
56
+ - Rank by severity: critical > high > medium > low
57
+
58
+ ### Tech Profile Scan
59
+
60
+ After scanning, emit context-aware trigger signals (based on detected codebase characteristics):
61
+
62
+ 1. Check scan findings → signals (`sql_detected`, `auth_detected`, `injection_risk`, `eval_usage`)
63
+ 2. Check quality issues → risk signals (`test_gap`, `legacy_patterns`, `perf_sensitive`)
64
+ 3. Include `tech_profile` in Phase 5 state_update data
65
+
66
+ ## Phase 4: Result Aggregation
67
+
68
+ 1. Build `discoveredIssues` array from critical + high findings (with id, severity, perspective, file, line, description)
69
+ 2. Write scan results to `<session>/scan/scan-results.json`:
70
+ - scan_date, perspectives scanned, total findings, by_severity counts, findings detail, issues_created count
71
+ 3. Update `<session>/wisdom/.msg/meta.json`: merge `discovered_issues` field
72
+ 4. Contribute to wisdom/issues.md if new patterns found
@@ -0,0 +1,69 @@
1
+ ---
2
+ role: strategist
3
+ prefix: QASTRAT
4
+ inner_loop: false
5
+ message_types:
6
+ ---
7
+
8
+ # Test Strategist
9
+
10
+ Analyze change scope, determine test layers (L1-L3), define coverage targets, and generate test strategy document. Create targeted test plans based on scout discoveries and code changes.
11
+
12
+ ## Phase 2: Context & Change Analysis
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
+ | Defect patterns | meta.json -> defect_patterns | No |
21
+
22
+ 1. Extract session path from task description
23
+ 2. Read .msg/meta.json for scout discoveries and historical patterns
24
+ 3. Analyze change scope: `git diff --name-only HEAD~5`
25
+ 4. Categorize changed files:
26
+
27
+ | Category | Pattern |
28
+ |----------|---------|
29
+ | Source | `\.(ts|tsx|js|jsx|py|java|go|rs)$` |
30
+ | Test | `\.(test|spec)\.(ts|tsx|js|jsx)$` or `test_` |
31
+ | Config | `\.(json|yaml|yml|toml|env)$` |
32
+
33
+ 5. Detect test framework from package.json / project files
34
+ 6. Check existing coverage baseline from `coverage/coverage-summary.json`
35
+ 7. Select analysis mode:
36
+
37
+ | Total Scope | Mode |
38
+ |-------------|------|
39
+ | <= 5 files + issues | Direct inline analysis |
40
+ | 6-15 | Single CLI analysis |
41
+ | > 15 | Multi-dimension CLI analysis |
42
+
43
+ ## Phase 3: Strategy Generation
44
+
45
+ **Layer Selection Logic**:
46
+
47
+ | Condition | Layer | Target |
48
+ |-----------|-------|--------|
49
+ | Has source file changes | L1: Unit Tests | 80% |
50
+ | >= 3 source files OR critical issues | L2: Integration Tests | 60% |
51
+ | >= 3 critical/high severity issues | L3: E2E Tests | 40% |
52
+ | No changes but has scout issues | L1 focused on issue files | 80% |
53
+
54
+ For CLI-assisted analysis, use:
55
+ ```
56
+ PURPOSE: Analyze code changes and scout findings to determine optimal test strategy
57
+ TASK: Classify changed files by risk, map issues to test requirements, identify integration points, recommend test layers with coverage targets
58
+ MODE: analysis
59
+ ```
60
+
61
+ Build strategy document with: scope analysis, layer configs (level, name, target_coverage, focus_files, rationale), priority issues list.
62
+
63
+ **Validation**: Verify strategy has layers, targets > 0, covers discovered issues, and framework detected.
64
+
65
+ ## Phase 4: Output & Persistence
66
+
67
+ 1. Write strategy to `<session>/strategy/test-strategy.md`
68
+ 2. Update `<session>/wisdom/.msg/meta.json`: merge `test_strategy` field with scope, layers, coverage_targets, test_framework
69
+ 3. Contribute to wisdom/decisions.md with layer selection rationale
@@ -0,0 +1,115 @@
1
+ # QA Pipelines
2
+
3
+ Pipeline definitions and task registry for team-quality-assurance.
4
+
5
+ ## Pipeline Modes
6
+
7
+ | Mode | Description | Entry Role |
8
+ |------|-------------|------------|
9
+ | discovery | Scout-first: issue discovery then testing | scout |
10
+ | testing | Skip scout, direct test pipeline | strategist |
11
+ | full | Complete QA closed loop + regression scan | scout |
12
+
13
+ ## Pipeline Definitions
14
+
15
+ ### Discovery Mode (5 tasks, serial)
16
+
17
+ ```
18
+ SCOUT-001 -> QASTRAT-001 -> QAGEN-001 -> QARUN-001 -> QAANA-001
19
+ ```
20
+
21
+ | Task ID | Role | Dependencies | Description |
22
+ |---------|------|-------------|-------------|
23
+ | SCOUT-001 | scout | (none) | Multi-perspective issue scanning |
24
+ | QASTRAT-001 | strategist | SCOUT-001 | Change scope analysis + test strategy |
25
+ | QAGEN-001 | generator | QASTRAT-001 | L1 unit test generation |
26
+ | QARUN-001 | executor | QAGEN-001 | L1 test execution + fix cycles |
27
+ | QAANA-001 | analyst | QARUN-001 | Defect pattern analysis + quality report |
28
+
29
+ ### Testing Mode (6 tasks, progressive layers)
30
+
31
+ ```
32
+ QASTRAT-001 -> QAGEN-L1-001 -> QARUN-L1-001 -> QAGEN-L2-001 -> QARUN-L2-001 -> QAANA-001
33
+ ```
34
+
35
+ | Task ID | Role | Dependencies | Layer | Description |
36
+ |---------|------|-------------|-------|-------------|
37
+ | QASTRAT-001 | strategist | (none) | — | Test strategy formulation |
38
+ | QAGEN-L1-001 | generator | QASTRAT-001 | L1 | L1 unit test generation |
39
+ | QARUN-L1-001 | executor | QAGEN-L1-001 | L1 | L1 test execution + fix cycles |
40
+ | QAGEN-L2-001 | generator | QARUN-L1-001 | L2 | L2 integration test generation |
41
+ | QARUN-L2-001 | executor | QAGEN-L2-001 | L2 | L2 test execution + fix cycles |
42
+ | QAANA-001 | analyst | QARUN-L2-001 | — | Quality analysis report |
43
+
44
+ ### Full Mode (8 tasks, parallel windows + regression)
45
+
46
+ ```
47
+ SCOUT-001 -> QASTRAT-001 -> [QAGEN-L1-001 || QAGEN-L2-001] -> [QARUN-L1-001 || QARUN-L2-001] -> QAANA-001 -> SCOUT-002
48
+ ```
49
+
50
+ | Task ID | Role | Dependencies | Layer | Description |
51
+ |---------|------|-------------|-------|-------------|
52
+ | SCOUT-001 | scout | (none) | — | Multi-perspective issue scanning |
53
+ | QASTRAT-001 | strategist | SCOUT-001 | — | Test strategy formulation |
54
+ | QAGEN-L1-001 | generator-1 | QASTRAT-001 | L1 | L1 unit test generation (parallel) |
55
+ | QAGEN-L2-001 | generator-2 | QASTRAT-001 | L2 | L2 integration test generation (parallel) |
56
+ | QARUN-L1-001 | executor-1 | QAGEN-L1-001 | L1 | L1 test execution + fix cycles (parallel) |
57
+ | QARUN-L2-001 | executor-2 | QAGEN-L2-001 | L2 | L2 test execution + fix cycles (parallel) |
58
+ | QAANA-001 | analyst | QARUN-L1-001, QARUN-L2-001 | — | Quality analysis report |
59
+ | SCOUT-002 | scout | QAANA-001 | — | Regression scan after fixes |
60
+
61
+ ## GC Loop
62
+
63
+ Generator-Executor iterate per test layer until coverage targets are met:
64
+
65
+ ```
66
+ QAGEN -> QARUN -> (if coverage < target) -> QAGEN-fix -> QARUN-gc
67
+ (if coverage >= target) -> next layer or QAANA
68
+ ```
69
+
70
+ - Max iterations: 3 per layer
71
+ - After 3 iterations: accept current coverage with warning
72
+
73
+ ## Coverage Targets
74
+
75
+ | Layer | Name | Default Target |
76
+ |-------|------|----------------|
77
+ | L1 | Unit Tests | 80% |
78
+ | L2 | Integration Tests | 60% |
79
+ | L3 | E2E Tests | 40% |
80
+
81
+ ## Scan Perspectives
82
+
83
+ | Perspective | Focus |
84
+ |-------------|-------|
85
+ | bug | Logic errors, crash paths, null references |
86
+ | security | Vulnerabilities, auth bypass, data exposure |
87
+ | test-coverage | Untested code paths, missing assertions |
88
+ | code-quality | Anti-patterns, complexity, maintainability |
89
+ | ux | User-facing issues, accessibility (optional) |
90
+
91
+ ## Session Directory
92
+
93
+ ```
94
+ .workflow/.team/QA-<slug>-<YYYY-MM-DD>/
95
+ ├── .msg/messages.jsonl # Message bus log
96
+ ├── .msg/meta.json # Session state + cross-role state
97
+ ├── wisdom/ # Cross-task knowledge
98
+ │ ├── learnings.md
99
+ │ ├── decisions.md
100
+ │ ├── conventions.md
101
+ │ └── issues.md
102
+ ├── scan/ # Scout output
103
+ │ └── scan-results.json
104
+ ├── strategy/ # Strategist output
105
+ │ └── test-strategy.md
106
+ ├── tests/ # Generator output
107
+ │ ├── L1-unit/
108
+ │ ├── L2-integration/
109
+ │ └── L3-e2e/
110
+ ├── results/ # Executor output
111
+ │ ├── run-001.json
112
+ │ └── coverage-001.json
113
+ └── analysis/ # Analyst output
114
+ └── quality-report.md
115
+ ```
@@ -0,0 +1,131 @@
1
+ {
2
+ "team_name": "quality-assurance",
3
+ "version": "1.0.0",
4
+ "description": "质量保障团队 - 融合\"软件测试\"和\"问题发现\"两大能力域,形成发现→验证→修复→回归的闭环",
5
+ "skill_entry": "team-quality-assurance",
6
+ "invocation": "Skill(skill=\"team-quality-assurance\", args=\"--role=coordinator ...\")",
7
+
8
+ "roles": {
9
+ "coordinator": {
10
+ "name": "coordinator",
11
+ "responsibility": "Orchestration",
12
+ "task_prefix": null,
13
+ "description": "QA 团队协调者。编排 pipeline:需求澄清 → 模式选择 → 团队创建 → 任务分发 → 监控协调 → 质量门控 → 结果汇报",
14
+ "message_types_sent": ["mode_selected", "gc_loop_trigger", "quality_gate", "task_unblocked", "error", "shutdown"],
15
+ "message_types_received": ["scan_ready", "issues_found", "strategy_ready", "tests_generated", "tests_revised", "tests_passed", "tests_failed", "analysis_ready", "quality_report", "error"],
16
+ "commands": ["dispatch", "monitor"]
17
+ },
18
+ "scout": {
19
+ "name": "scout",
20
+ "responsibility": "Orchestration (多视角扫描编排)",
21
+ "task_prefix": "SCOUT-*",
22
+ "description": "多视角问题侦察员。主动扫描代码库,从 bug、安全、UX、测试覆盖、代码质量等多个视角发现潜在问题",
23
+ "message_types_sent": ["scan_ready", "issues_found", "error"],
24
+ "message_types_received": [],
25
+ "commands": ["scan"],
26
+ "cli_tools": ["gemini"],
27
+ "cli_tools": ["gemini"]
28
+ },
29
+ "strategist": {
30
+ "name": "strategist",
31
+ "responsibility": "Orchestration (策略制定)",
32
+ "task_prefix": "QASTRAT-*",
33
+ "description": "测试策略师。分析变更范围,确定测试层级(L1-L3),定义覆盖率目标",
34
+ "message_types_sent": ["strategy_ready", "error"],
35
+ "message_types_received": [],
36
+ "commands": ["analyze-scope"],
37
+ "cli_tools": ["gemini"],
38
+ "cli_tools": ["gemini"]
39
+ },
40
+ "generator": {
41
+ "name": "generator",
42
+ "responsibility": "Code generation (测试代码生成)",
43
+ "task_prefix": "QAGEN-*",
44
+ "description": "测试用例生成器。按策略和层级生成测试代码,支持 L1/L2/L3",
45
+ "message_types_sent": ["tests_generated", "tests_revised", "error"],
46
+ "message_types_received": [],
47
+ "commands": ["generate-tests"],
48
+ "cli_tools": ["gemini"],
49
+ "cli_tools": ["gemini"]
50
+ },
51
+ "executor": {
52
+ "name": "executor",
53
+ "responsibility": "Validation (测试执行与修复)",
54
+ "task_prefix": "QARUN-*",
55
+ "description": "测试执行者。运行测试套件,收集覆盖率数据,失败时自动修复循环",
56
+ "message_types_sent": ["tests_passed", "tests_failed", "coverage_report", "error"],
57
+ "message_types_received": [],
58
+ "commands": ["run-fix-cycle"],
59
+ "cli_tools": ["gemini"]
60
+ },
61
+ "analyst": {
62
+ "name": "analyst",
63
+ "responsibility": "Read-only analysis (质量分析)",
64
+ "task_prefix": "QAANA-*",
65
+ "description": "质量分析师。分析缺陷模式、覆盖率差距、测试有效性,生成综合质量报告",
66
+ "message_types_sent": ["analysis_ready", "quality_report", "error"],
67
+ "message_types_received": [],
68
+ "commands": ["quality-report"],
69
+ "cli_tools": ["gemini"]
70
+ }
71
+ },
72
+
73
+ "pipeline_modes": {
74
+ "discovery": {
75
+ "description": "Scout先行扫描 → 全流程",
76
+ "stages": ["SCOUT", "QASTRAT", "QAGEN", "QARUN", "QAANA"],
77
+ "entry_role": "scout"
78
+ },
79
+ "testing": {
80
+ "description": "跳过 Scout → 直接测试",
81
+ "stages": ["QASTRAT", "QAGEN-L1", "QARUN-L1", "QAGEN-L2", "QARUN-L2", "QAANA"],
82
+ "entry_role": "strategist"
83
+ },
84
+ "full": {
85
+ "description": "完整 QA 闭环 + 回归扫描",
86
+ "stages": ["SCOUT", "QASTRAT", "QAGEN-L1", "QAGEN-L2", "QARUN-L1", "QARUN-L2", "QAANA", "SCOUT-REG"],
87
+ "entry_role": "scout",
88
+ "parallel_stages": [["QAGEN-L1", "QAGEN-L2"], ["QARUN-L1", "QARUN-L2"]]
89
+ }
90
+ },
91
+
92
+ "gc_loop": {
93
+ "max_iterations": 3,
94
+ "trigger": "coverage < target",
95
+ "participants": ["generator", "executor"],
96
+ "flow": "QAGEN-fix → QARUN-gc → evaluate"
97
+ },
98
+
99
+ "shared_memory": {
100
+ "file": "shared-memory.json",
101
+ "fields": {
102
+ "discovered_issues": { "owner": "scout", "type": "array" },
103
+ "test_strategy": { "owner": "strategist", "type": "object" },
104
+ "generated_tests": { "owner": "generator", "type": "object" },
105
+ "execution_results": { "owner": "executor", "type": "object" },
106
+ "defect_patterns": { "owner": "analyst", "type": "array" },
107
+ "coverage_history": { "owner": "analyst", "type": "array" },
108
+ "quality_score": { "owner": "analyst", "type": "number" }
109
+ }
110
+ },
111
+
112
+ "collaboration_patterns": [
113
+ "CP-1: Linear Pipeline (Discovery/Testing mode)",
114
+ "CP-2: Review-Fix Cycle (GC loop: Generator ↔ Executor)",
115
+ "CP-3: Fan-out (Scout multi-perspective scan)",
116
+ "CP-5: Escalation (Worker → Coordinator → User)",
117
+ "CP-9: Dual-Track (Full mode: L1 + L2 parallel)",
118
+ "CP-10: Post-Mortem (Analyst quality report)"
119
+ ],
120
+
121
+ "session_directory": {
122
+ "pattern": ".workflow/.team/QA-{slug}-{date}",
123
+ "subdirectories": ["scan", "strategy", "results", "analysis"]
124
+ },
125
+
126
+ "test_layers": {
127
+ "L1": { "name": "Unit Tests", "default_target": 80 },
128
+ "L2": { "name": "Integration Tests", "default_target": 60 },
129
+ "L3": { "name": "E2E Tests", "default_target": 40 }
130
+ }
131
+ }
@@ -0,0 +1,149 @@
1
+ ---
2
+ name: team-review
3
+ description: Unified team skill for code review. 3-role pipeline: scanner, reviewer, fixer. Triggers on team-review.
4
+ allowed-tools:
5
+ - ask_question
6
+ - define_subagent
7
+ - grep_search
8
+ - invoke_subagent
9
+ - manage_subagents
10
+ - mcp__ace-tool__search_context
11
+ - replace_file_content
12
+ - run_command
13
+ - send_message
14
+ - view_file
15
+ - write_to_file
16
+ agy-subagents:
17
+ - team-worker
18
+ ---
19
+
20
+ ## Sub-Agent Registration (Antigravity)
21
+
22
+ 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:
23
+ - global install: `~/.gemini/antigravity-cli/agents/`
24
+ - workspace install: `<project>/.agents/agents/`
25
+
26
+ - `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)`
27
+
28
+ **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.
29
+
30
+ ---
31
+
32
+ # Team Review
33
+
34
+ Orchestrate multi-agent code review: scanner -> reviewer -> fixer. Toolchain + LLM scan, deep analysis with root cause enrichment, and automated fix with rollback-on-failure.
35
+
36
+ ## Architecture
37
+
38
+ ```
39
+ view_file(AbsolutePath="<agy-skills-dir>/team-review/SKILL.md") + execute inline (args: "task description")
40
+ |
41
+ SKILL.md (this file) = Router
42
+ |
43
+ +--------------+--------------+
44
+ | |
45
+ no --role flag --role <name>
46
+ | |
47
+ Coordinator Worker
48
+ roles/coordinator/role.md roles/<name>/role.md
49
+ |
50
+ +-- analyze -> dispatch -> spawn workers -> STOP
51
+ |
52
+ +-------+-------+-------+
53
+ v v v
54
+ [scan] [review] [fix]
55
+ team-worker agents, each loads roles/<role>/role.md
56
+ ```
57
+
58
+ ## Role Registry
59
+
60
+ | Role | Path | Prefix | Inner Loop |
61
+ |------|------|--------|------------|
62
+ | coordinator | [roles/coordinator/role.md](roles/coordinator/role.md) | — | — |
63
+ | scanner | [roles/scanner/role.md](roles/scanner/role.md) | SCAN-* | false |
64
+ | reviewer | [roles/reviewer/role.md](roles/reviewer/role.md) | REV-* | false |
65
+ | fixer | [roles/fixer/role.md](roles/fixer/role.md) | FIX-* | true |
66
+
67
+ ## Role Router
68
+
69
+ Parse `$ARGUMENTS`:
70
+ - Has `--role <name>` -> Read `roles/<name>/role.md`, execute Phase 2-4
71
+ - No `--role` -> `@roles/coordinator/role.md`, execute entry router
72
+
73
+ ## Shared Constants
74
+
75
+ - **Session prefix**: `RV`
76
+ - **Session path**: `.workflow/.team/RV-<slug>-<date>/`
77
+ - **Team name**: `review`
78
+ - **CLI tools**: `maestro delegate --mode analysis` (read-only), `maestro delegate --mode write` (modifications)
79
+ - **Message bus**: `mcp__ccw-tools__team_msg(session_id=<session-id>, ...)`
80
+
81
+ ## Worker Spawn Template
82
+
83
+ Coordinator spawns workers using this template:
84
+
85
+ ```
86
+ invoke_subagent([{ TypeName: "team-worker", Role: "<role>", Prompt: "<Prompt>", Workspace: "inherit" }])
87
+ ```
88
+
89
+ ## User Commands
90
+
91
+ | Command | Action |
92
+ |---------|--------|
93
+ | `check` / `status` | View pipeline status graph |
94
+ | `resume` / `continue` | Advance to next step |
95
+ | `--full` | Enable scan + review + fix pipeline |
96
+ | `--fix` | Fix-only mode (skip scan/review) |
97
+ | `-q` / `--quick` | Quick scan only |
98
+ | `--dimensions=sec,cor,prf,mnt` | Custom dimensions |
99
+ | `-y` / `--yes` | Skip confirmations |
100
+
101
+ ## Completion Action
102
+
103
+ When pipeline completes, coordinator presents:
104
+
105
+ ```
106
+ ask_question({
107
+ questions: [{
108
+ question: "Review pipeline complete. What would you like to do?",
109
+ header: "Completion",
110
+ multiSelect: false,
111
+ options: [
112
+ { label: "Archive & Clean (Recommended)", description: "Archive session, clean up team" },
113
+ { label: "Keep Active", description: "Keep session for follow-up work" },
114
+ { label: "Export Results", description: "Export deliverables to target directory" }
115
+ ]
116
+ }]
117
+ })
118
+ ```
119
+
120
+ ## Session Directory
121
+
122
+ ```
123
+ .workflow/.team/RV-<slug>-<date>/
124
+ ├── .msg/messages.jsonl # Team message bus
125
+ ├── .msg/meta.json # Session state + cross-role state
126
+ ├── wisdom/ # Cross-task knowledge
127
+ ├── scan/ # Scanner output
128
+ ├── review/ # Reviewer output
129
+ └── fix/ # Fixer output
130
+ ```
131
+
132
+ ## Specs Reference
133
+
134
+ - [specs/pipelines.md](specs/pipelines.md) — Pipeline definitions and task registry
135
+ - [specs/dimensions.md](specs/dimensions.md) — Review dimension definitions (SEC/COR/PRF/MNT)
136
+ - [specs/finding-schema.json](specs/finding-schema.json) — Finding data schema
137
+ - [specs/team-config.json](specs/team-config.json) — Team configuration
138
+
139
+ ## Error Handling
140
+
141
+ | Scenario | Resolution |
142
+ |----------|------------|
143
+ | Unknown --role value | Error with available role list |
144
+ | Role not found | Error with expected path (roles/<name>/role.md) |
145
+ | CLI tool fails | Worker fallback to direct implementation |
146
+ | Scanner finds 0 findings | Report clean, skip review + fix |
147
+ | User declines fix | Delete FIX tasks, complete with review-only results |
148
+ | Fast-advance conflict | Coordinator reconciles on next callback |
149
+ | Completion action fails | Default to Keep Active |