claude-code-workflow 7.2.23 → 7.2.25
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/.ccw/workflows/cli-tools-usage.md +123 -521
- package/.claude/skills/brainstorm/SKILL.md +408 -408
- package/.claude/skills/review-cycle/SKILL.md +132 -132
- package/.claude/skills/spec-generator/SKILL.md +1 -1
- package/.claude/skills/team-designer/phases/02-scaffold-generation.md +1 -1
- package/.claude/skills/team-lifecycle-v4/SKILL.md +1 -1
- package/.claude/skills/team-review/SKILL.md +1 -1
- package/.claude/skills/team-ultra-analyze/SKILL.md +1 -1
- package/.claude/skills/workflow-multi-cli-plan/SKILL.md +1 -1
- package/.claude/skills/workflow-plan/SKILL.md +1 -1
- package/.claude/skills/workflow-test-fix/SKILL.md +1 -1
- package/.codex/skills/analyze-with-file/SKILL.md +966 -966
- package/.codex/skills/issue-discover/SKILL.md +361 -361
- package/.codex/skills/review-cycle/SKILL.md +1 -1
- package/.codex/skills/roadmap-with-file/SKILL.md +901 -901
- package/.codex/skills/spec-generator/SKILL.md +425 -425
- package/.codex/skills/spec-setup/SKILL.md +669 -669
- package/.codex/skills/team-arch-opt/SKILL.md +242 -175
- package/.codex/skills/team-arch-opt/roles/analyzer/role.md +78 -78
- package/.codex/skills/team-arch-opt/roles/coordinator/commands/analyze.md +57 -57
- package/.codex/skills/team-arch-opt/roles/coordinator/commands/monitor.md +246 -204
- package/.codex/skills/team-arch-opt/roles/coordinator/role.md +196 -184
- package/.codex/skills/team-arch-opt/roles/designer/role.md +115 -115
- package/.codex/skills/team-arch-opt/roles/refactorer/role.md +102 -102
- package/.codex/skills/team-arch-opt/roles/reviewer/role.md +111 -111
- package/.codex/skills/team-arch-opt/roles/validator/role.md +115 -115
- package/.codex/skills/team-arch-opt/specs/pipelines.md +102 -102
- package/.codex/skills/team-brainstorm/SKILL.md +72 -4
- package/.codex/skills/team-brainstorm/roles/challenger/role.md +61 -61
- package/.codex/skills/team-brainstorm/roles/coordinator/commands/analyze.md +58 -58
- package/.codex/skills/team-brainstorm/roles/coordinator/commands/monitor.md +212 -171
- package/.codex/skills/team-brainstorm/roles/coordinator/role.md +172 -160
- package/.codex/skills/team-brainstorm/roles/evaluator/role.md +56 -56
- package/.codex/skills/team-brainstorm/roles/ideator/role.md +69 -69
- package/.codex/skills/team-brainstorm/roles/synthesizer/role.md +57 -57
- package/.codex/skills/team-brainstorm/specs/pipelines.md +72 -72
- package/.codex/skills/team-coordinate/SKILL.md +71 -3
- package/.codex/skills/team-coordinate/roles/coordinator/commands/monitor.md +45 -5
- package/.codex/skills/team-coordinate/roles/coordinator/role.md +402 -389
- package/.codex/skills/team-coordinate/specs/knowledge-transfer.md +111 -111
- package/.codex/skills/team-coordinate/specs/pipelines.md +97 -97
- package/.codex/skills/team-coordinate/specs/quality-gates.md +112 -112
- package/.codex/skills/team-designer/SKILL.md +153 -153
- package/.codex/skills/team-designer/phases/01-requirements-analysis.md +250 -250
- package/.codex/skills/team-designer/phases/02-scaffold-generation.md +228 -228
- package/.codex/skills/team-designer/phases/03-content-generation.md +330 -330
- package/.codex/skills/team-designer/phases/04-validation.md +320 -320
- package/.codex/skills/team-executor/SKILL.md +29 -2
- package/.codex/skills/team-executor/roles/executor/commands/monitor.md +23 -15
- package/.codex/skills/team-frontend/SKILL.md +77 -3
- package/.codex/skills/team-frontend/roles/analyst/role.md +92 -92
- package/.codex/skills/team-frontend/roles/architect/role.md +86 -86
- package/.codex/skills/team-frontend/roles/coordinator/commands/analyze.md +52 -52
- package/.codex/skills/team-frontend/roles/coordinator/commands/monitor.md +222 -188
- package/.codex/skills/team-frontend/roles/coordinator/role.md +189 -177
- package/.codex/skills/team-frontend/roles/developer/role.md +93 -93
- package/.codex/skills/team-frontend/roles/qa/role.md +79 -79
- package/.codex/skills/team-frontend/specs/pipelines.md +76 -76
- package/.codex/skills/team-frontend-debug/SKILL.md +66 -3
- package/.codex/skills/team-frontend-debug/roles/analyzer/role.md +208 -208
- package/.codex/skills/team-frontend-debug/roles/coordinator/commands/analyze.md +174 -174
- package/.codex/skills/team-frontend-debug/roles/coordinator/commands/dispatch.md +198 -198
- package/.codex/skills/team-frontend-debug/roles/coordinator/commands/monitor.md +177 -143
- package/.codex/skills/team-frontend-debug/roles/coordinator/role.md +164 -152
- package/.codex/skills/team-frontend-debug/roles/fixer/role.md +147 -147
- package/.codex/skills/team-frontend-debug/roles/reproducer/role.md +147 -147
- package/.codex/skills/team-frontend-debug/roles/tester/role.md +231 -231
- package/.codex/skills/team-frontend-debug/roles/verifier/role.md +172 -172
- package/.codex/skills/team-frontend-debug/specs/debug-tools.md +215 -215
- package/.codex/skills/team-frontend-debug/specs/pipelines.md +94 -94
- package/.codex/skills/team-issue/SKILL.md +83 -4
- package/.codex/skills/team-issue/roles/coordinator/commands/analyze.md +64 -64
- package/.codex/skills/team-issue/roles/coordinator/commands/dispatch.md +273 -273
- package/.codex/skills/team-issue/roles/coordinator/commands/monitor.md +235 -194
- package/.codex/skills/team-issue/roles/coordinator/role.md +206 -194
- package/.codex/skills/team-issue/roles/explorer/role.md +94 -94
- package/.codex/skills/team-issue/roles/implementer/role.md +87 -87
- package/.codex/skills/team-issue/roles/integrator/role.md +84 -84
- package/.codex/skills/team-issue/roles/planner/role.md +81 -81
- package/.codex/skills/team-issue/roles/reviewer/role.md +86 -86
- package/.codex/skills/team-issue/specs/pipelines.md +124 -124
- package/.codex/skills/team-lifecycle-v4/MIGRATION-PLAN.md +6 -6
- package/.codex/skills/team-lifecycle-v4/SKILL.md +305 -242
- package/.codex/skills/team-lifecycle-v4/roles/coordinator/commands/dispatch.md +1 -1
- package/.codex/skills/team-lifecycle-v4/roles/coordinator/commands/monitor.md +66 -24
- package/.codex/skills/team-lifecycle-v4/roles/coordinator/role.md +13 -1
- package/.codex/skills/team-lifecycle-v4/roles/supervisor/role.md +1 -1
- package/.codex/skills/team-lifecycle-v4/templates/architecture.md +254 -254
- package/.codex/skills/team-lifecycle-v4/templates/epics.md +196 -196
- package/.codex/skills/team-lifecycle-v4/templates/product-brief.md +133 -133
- package/.codex/skills/team-lifecycle-v4/templates/requirements.md +224 -224
- package/.codex/skills/team-perf-opt/SKILL.md +68 -3
- package/.codex/skills/team-perf-opt/roles/benchmarker/role.md +89 -89
- package/.codex/skills/team-perf-opt/roles/coordinator/commands/analyze.md +61 -61
- package/.codex/skills/team-perf-opt/roles/coordinator/commands/monitor.md +35 -1
- package/.codex/skills/team-perf-opt/roles/coordinator/role.md +179 -167
- package/.codex/skills/team-perf-opt/roles/optimizer/role.md +97 -97
- package/.codex/skills/team-perf-opt/roles/profiler/role.md +73 -73
- package/.codex/skills/team-perf-opt/roles/reviewer/role.md +75 -75
- package/.codex/skills/team-perf-opt/roles/strategist/role.md +94 -94
- package/.codex/skills/team-perf-opt/specs/pipelines.md +65 -65
- package/.codex/skills/team-planex/SKILL.md +65 -3
- package/.codex/skills/team-planex/roles/coordinator/commands/analyze.md +52 -52
- package/.codex/skills/team-planex/roles/coordinator/commands/monitor.md +210 -164
- package/.codex/skills/team-planex/roles/coordinator/role.md +171 -159
- package/.codex/skills/team-planex/roles/executor/role.md +91 -91
- package/.codex/skills/team-planex/roles/planner/role.md +112 -112
- package/.codex/skills/team-planex/specs/pipelines.md +93 -93
- package/.codex/skills/team-quality-assurance/SKILL.md +60 -3
- package/.codex/skills/team-quality-assurance/roles/analyst/role.md +80 -80
- package/.codex/skills/team-quality-assurance/roles/coordinator/commands/analyze.md +72 -72
- package/.codex/skills/team-quality-assurance/roles/coordinator/commands/dispatch.md +108 -108
- package/.codex/skills/team-quality-assurance/roles/coordinator/commands/monitor.md +243 -209
- package/.codex/skills/team-quality-assurance/roles/coordinator/role.md +176 -164
- package/.codex/skills/team-quality-assurance/roles/executor/role.md +66 -66
- package/.codex/skills/team-quality-assurance/roles/generator/role.md +68 -68
- package/.codex/skills/team-quality-assurance/roles/scout/role.md +67 -67
- package/.codex/skills/team-quality-assurance/roles/strategist/role.md +71 -71
- package/.codex/skills/team-quality-assurance/specs/pipelines.md +115 -115
- package/.codex/skills/team-review/SKILL.md +58 -3
- package/.codex/skills/team-review/roles/coordinator/commands/analyze.md +71 -71
- package/.codex/skills/team-review/roles/coordinator/commands/dispatch.md +90 -90
- package/.codex/skills/team-review/roles/coordinator/commands/monitor.md +225 -185
- package/.codex/skills/team-review/roles/coordinator/role.md +175 -163
- package/.codex/skills/team-review/roles/fixer/role.md +76 -76
- package/.codex/skills/team-review/roles/reviewer/role.md +68 -68
- package/.codex/skills/team-review/roles/scanner/role.md +71 -71
- package/.codex/skills/team-review/specs/pipelines.md +102 -102
- package/.codex/skills/team-roadmap-dev/SKILL.md +55 -3
- package/.codex/skills/team-roadmap-dev/roles/coordinator/commands/analyze.md +61 -61
- package/.codex/skills/team-roadmap-dev/roles/coordinator/commands/monitor.md +502 -468
- package/.codex/skills/team-roadmap-dev/roles/coordinator/role.md +335 -322
- package/.codex/skills/team-roadmap-dev/roles/executor/role.md +71 -71
- package/.codex/skills/team-roadmap-dev/roles/planner/role.md +76 -76
- package/.codex/skills/team-roadmap-dev/roles/verifier/role.md +74 -74
- package/.codex/skills/team-roadmap-dev/specs/pipelines.md +93 -93
- package/.codex/skills/team-tech-debt/SKILL.md +56 -3
- package/.codex/skills/team-tech-debt/roles/assessor/role.md +69 -69
- package/.codex/skills/team-tech-debt/roles/coordinator/commands/analyze.md +47 -47
- package/.codex/skills/team-tech-debt/roles/coordinator/commands/monitor.md +272 -231
- package/.codex/skills/team-tech-debt/roles/coordinator/role.md +172 -160
- package/.codex/skills/team-tech-debt/roles/executor/role.md +76 -76
- package/.codex/skills/team-tech-debt/roles/planner/role.md +69 -69
- package/.codex/skills/team-tech-debt/roles/scanner/role.md +82 -82
- package/.codex/skills/team-tech-debt/roles/validator/role.md +75 -75
- package/.codex/skills/team-tech-debt/specs/pipelines.md +47 -47
- package/.codex/skills/team-testing/SKILL.md +72 -3
- package/.codex/skills/team-testing/roles/analyst/role.md +95 -95
- package/.codex/skills/team-testing/roles/coordinator/commands/analyze.md +70 -70
- package/.codex/skills/team-testing/roles/coordinator/commands/dispatch.md +106 -106
- package/.codex/skills/team-testing/roles/coordinator/commands/monitor.md +283 -242
- package/.codex/skills/team-testing/roles/coordinator/role.md +184 -172
- package/.codex/skills/team-testing/roles/executor/role.md +96 -96
- package/.codex/skills/team-testing/roles/generator/role.md +95 -95
- package/.codex/skills/team-testing/roles/strategist/role.md +83 -83
- package/.codex/skills/team-testing/specs/pipelines.md +101 -101
- package/.codex/skills/team-uidesign/SKILL.md +65 -3
- package/.codex/skills/team-uidesign/roles/coordinator/commands/analyze.md +59 -59
- package/.codex/skills/team-uidesign/roles/coordinator/commands/dispatch.md +156 -156
- package/.codex/skills/team-uidesign/roles/coordinator/commands/monitor.md +234 -194
- package/.codex/skills/team-uidesign/roles/coordinator/role.md +211 -199
- package/.codex/skills/team-uidesign/roles/designer/role.md +69 -69
- package/.codex/skills/team-uidesign/roles/implementer/role.md +72 -72
- package/.codex/skills/team-uidesign/roles/researcher/role.md +82 -82
- package/.codex/skills/team-uidesign/roles/reviewer/role.md +67 -67
- package/.codex/skills/team-uidesign/specs/pipelines.md +76 -76
- package/.codex/skills/team-ultra-analyze/SKILL.md +73 -3
- package/.codex/skills/team-ultra-analyze/roles/analyst/role.md +90 -90
- package/.codex/skills/team-ultra-analyze/roles/coordinator/commands/analyze.md +73 -73
- package/.codex/skills/team-ultra-analyze/roles/coordinator/commands/monitor.md +50 -9
- package/.codex/skills/team-ultra-analyze/roles/coordinator/role.md +255 -243
- package/.codex/skills/team-ultra-analyze/roles/discussant/role.md +104 -104
- package/.codex/skills/team-ultra-analyze/roles/explorer/role.md +74 -74
- package/.codex/skills/team-ultra-analyze/roles/synthesizer/role.md +78 -78
- package/.codex/skills/team-ultra-analyze/specs/pipelines.md +64 -64
- package/.codex/skills/team-ux-improve/SKILL.md +64 -3
- package/.codex/skills/team-ux-improve/roles/coordinator/commands/analyze.md +62 -62
- package/.codex/skills/team-ux-improve/roles/coordinator/commands/dispatch.md +233 -233
- package/.codex/skills/team-ux-improve/roles/coordinator/commands/monitor.md +195 -160
- package/.codex/skills/team-ux-improve/roles/coordinator/role.md +170 -158
- package/.codex/skills/team-ux-improve/roles/designer/role.md +122 -122
- package/.codex/skills/team-ux-improve/roles/diagnoser/role.md +93 -93
- package/.codex/skills/team-ux-improve/roles/explorer/role.md +77 -77
- package/.codex/skills/team-ux-improve/roles/implementer/role.md +102 -102
- package/.codex/skills/team-ux-improve/roles/scanner/role.md +93 -93
- package/.codex/skills/team-ux-improve/roles/tester/role.md +84 -84
- package/.codex/skills/team-ux-improve/specs/pipelines.md +54 -54
- package/.codex/skills/workflow-test-fix-cycle/SKILL.md +402 -402
- package/README.md +1 -0
- package/package.json +1 -1
- package/.claude/skills/team-iterdev/SKILL.md +0 -127
- package/.claude/skills/team-iterdev/roles/architect/role.md +0 -65
- package/.claude/skills/team-iterdev/roles/coordinator/commands/analyze.md +0 -62
- package/.claude/skills/team-iterdev/roles/coordinator/commands/dispatch.md +0 -234
- package/.claude/skills/team-iterdev/roles/coordinator/commands/monitor.md +0 -182
- package/.claude/skills/team-iterdev/roles/coordinator/role.md +0 -153
- package/.claude/skills/team-iterdev/roles/developer/role.md +0 -74
- package/.claude/skills/team-iterdev/roles/reviewer/role.md +0 -66
- package/.claude/skills/team-iterdev/roles/tester/role.md +0 -88
- package/.claude/skills/team-iterdev/specs/pipelines.md +0 -94
- package/.claude/skills/team-iterdev/specs/team-config.json +0 -172
- package/.codex/skills/team-iterdev/SKILL.md +0 -158
- package/.codex/skills/team-iterdev/roles/architect/role.md +0 -65
- package/.codex/skills/team-iterdev/roles/coordinator/commands/analyze.md +0 -62
- package/.codex/skills/team-iterdev/roles/coordinator/commands/dispatch.md +0 -187
- package/.codex/skills/team-iterdev/roles/coordinator/commands/monitor.md +0 -186
- package/.codex/skills/team-iterdev/roles/coordinator/role.md +0 -181
- package/.codex/skills/team-iterdev/roles/developer/role.md +0 -74
- package/.codex/skills/team-iterdev/roles/reviewer/role.md +0 -66
- package/.codex/skills/team-iterdev/roles/tester/role.md +0 -88
- package/.codex/skills/team-iterdev/specs/pipelines.md +0 -94
- package/.codex/skills/team-iterdev/specs/team-config.json +0 -172
|
@@ -1,115 +1,115 @@
|
|
|
1
|
-
---
|
|
2
|
-
role: validator
|
|
3
|
-
prefix: VALIDATE
|
|
4
|
-
inner_loop: false
|
|
5
|
-
message_types: [state_update]
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Architecture Validator
|
|
9
|
-
|
|
10
|
-
Validate refactoring changes by running build checks, test suites, dependency metric comparisons, and API compatibility verification. Ensure refactoring improves architecture without breaking functionality.
|
|
11
|
-
|
|
12
|
-
## Phase 2: Environment & Baseline Loading
|
|
13
|
-
|
|
14
|
-
| Input | Source | Required |
|
|
15
|
-
|-------|--------|----------|
|
|
16
|
-
| Architecture baseline | <session>/artifacts/architecture-baseline.json (shared) | Yes |
|
|
17
|
-
| Refactoring plan / detail | Varies by mode (see below) | Yes |
|
|
18
|
-
| .msg/meta.json | <session>/wisdom/.msg/meta.json | Yes |
|
|
19
|
-
|
|
20
|
-
1. Extract session path from task description
|
|
21
|
-
2. **Detect branch/pipeline context** from task description:
|
|
22
|
-
|
|
23
|
-
| Task Description Field | Value | Context |
|
|
24
|
-
|----------------------|-------|---------|
|
|
25
|
-
| `BranchId: B{NN}` | Present | Fan-out branch -- validate only this branch's changes |
|
|
26
|
-
| `PipelineId: {P}` | Present | Independent pipeline -- use pipeline-scoped baseline |
|
|
27
|
-
| Neither present | - | Single mode -- full validation |
|
|
28
|
-
|
|
29
|
-
3. **Load architecture baseline**:
|
|
30
|
-
- Single / Fan-out: Read `<session>/artifacts/architecture-baseline.json` (shared baseline)
|
|
31
|
-
- Independent: Read `<session>/artifacts/pipelines/{P}/architecture-baseline.json`
|
|
32
|
-
|
|
33
|
-
4. **Load refactoring context**:
|
|
34
|
-
- Single: Read `<session>/artifacts/refactoring-plan.md` -- all success criteria
|
|
35
|
-
- Fan-out branch: Read `<session>/artifacts/branches/B{NN}/refactoring-detail.md` -- only this branch's criteria
|
|
36
|
-
- Independent: Read `<session>/artifacts/pipelines/{P}/refactoring-plan.md`
|
|
37
|
-
|
|
38
|
-
5. Load .msg/meta.json for project type and refactoring scope
|
|
39
|
-
6. Detect available validation tools from project:
|
|
40
|
-
|
|
41
|
-
| Signal | Validation Tool | Method |
|
|
42
|
-
|--------|----------------|--------|
|
|
43
|
-
| package.json + tsc | TypeScript compiler | Type-check entire project |
|
|
44
|
-
| package.json + vitest/jest | Test runner | Run existing test suite |
|
|
45
|
-
| package.json + eslint | Linter | Run lint checks for import/export issues |
|
|
46
|
-
| Cargo.toml | Rust compiler | cargo check + cargo test |
|
|
47
|
-
| go.mod | Go tools | go build + go test |
|
|
48
|
-
| Makefile with test target | Custom tests | make test |
|
|
49
|
-
| No tooling detected | Manual validation | File existence + import grep checks |
|
|
50
|
-
|
|
51
|
-
7. Get changed files scope from .msg/meta.json:
|
|
52
|
-
- Single: `refactorer` namespace
|
|
53
|
-
- Fan-out: `refactorer.B{NN}` namespace
|
|
54
|
-
- Independent: `refactorer.{P}` namespace
|
|
55
|
-
|
|
56
|
-
## Phase 3: Validation Execution
|
|
57
|
-
|
|
58
|
-
Run validations across four dimensions:
|
|
59
|
-
|
|
60
|
-
**Build validation**:
|
|
61
|
-
- Compile/type-check the project -- zero new errors allowed
|
|
62
|
-
- Verify all moved/renamed files are correctly referenced
|
|
63
|
-
- Check for missing imports or unresolved modules
|
|
64
|
-
|
|
65
|
-
**Test validation**:
|
|
66
|
-
- Run existing test suite -- all previously passing tests must still pass
|
|
67
|
-
- Identify any tests that need updating due to module moves (update, don't skip)
|
|
68
|
-
- Check for test file imports that reference old paths
|
|
69
|
-
|
|
70
|
-
**Dependency metric validation**:
|
|
71
|
-
- Recalculate architecture metrics post-refactoring
|
|
72
|
-
- Compare coupling scores against baseline (must improve or stay neutral)
|
|
73
|
-
- Verify no new circular dependencies introduced
|
|
74
|
-
- Check cohesion metrics for affected modules
|
|
75
|
-
|
|
76
|
-
**API compatibility validation**:
|
|
77
|
-
- Verify public API signatures are preserved (exported function/class/type names)
|
|
78
|
-
- Check for dangling references (imports pointing to removed/moved files)
|
|
79
|
-
- Verify no new dead exports introduced by the refactoring
|
|
80
|
-
- Check that re-exports maintain backward compatibility where needed
|
|
81
|
-
|
|
82
|
-
**Branch-scoped validation** (fan-out mode):
|
|
83
|
-
- Only validate metrics relevant to this branch's refactoring (from refactoring-detail.md)
|
|
84
|
-
- Still check for regressions across all metrics (not just branch-specific ones)
|
|
85
|
-
|
|
86
|
-
## Phase 4: Result Analysis
|
|
87
|
-
|
|
88
|
-
Compare against baseline and plan criteria:
|
|
89
|
-
|
|
90
|
-
| Metric | Threshold | Verdict |
|
|
91
|
-
|--------|-----------|---------|
|
|
92
|
-
| Build passes | Zero compilation errors | PASS |
|
|
93
|
-
| All tests pass | No new test failures | PASS |
|
|
94
|
-
| Coupling improved or neutral | No metric degradation > 5% | PASS |
|
|
95
|
-
| No new cycles introduced | Cycle count <= baseline | PASS |
|
|
96
|
-
| All plan success criteria met | Every criterion satisfied | PASS |
|
|
97
|
-
| Partial improvement | Some metrics improved, none degraded | WARN |
|
|
98
|
-
| Build fails | Compilation errors detected | FAIL -> fix_required |
|
|
99
|
-
| Test failures | Previously passing tests now fail | FAIL -> fix_required |
|
|
100
|
-
| New cycles introduced | Cycle count > baseline | FAIL -> fix_required |
|
|
101
|
-
| Dangling references | Unresolved imports detected | FAIL -> fix_required |
|
|
102
|
-
|
|
103
|
-
1. Write validation results to output path:
|
|
104
|
-
- Single: `<session>/artifacts/validation-results.json`
|
|
105
|
-
- Fan-out: `<session>/artifacts/branches/B{NN}/validation-results.json`
|
|
106
|
-
- Independent: `<session>/artifacts/pipelines/{P}/validation-results.json`
|
|
107
|
-
- Content: Per-dimension: name, baseline value, current value, improvement/regression, verdict; Overall verdict: PASS / WARN / FAIL; Failure details (if any)
|
|
108
|
-
|
|
109
|
-
2. Update `<session>/wisdom/.msg/meta.json` under scoped namespace:
|
|
110
|
-
- Single: merge `{ "validator": { verdict, improvements, regressions, build_pass, test_pass } }`
|
|
111
|
-
- Fan-out: merge `{ "validator.B{NN}": { verdict, improvements, regressions, build_pass, test_pass } }`
|
|
112
|
-
- Independent: merge `{ "validator.{P}": { verdict, improvements, regressions, build_pass, test_pass } }`
|
|
113
|
-
|
|
114
|
-
3. If verdict is FAIL, include detailed feedback in message for FIX task creation:
|
|
115
|
-
- Which validations failed, specific errors, suggested investigation areas
|
|
1
|
+
---
|
|
2
|
+
role: validator
|
|
3
|
+
prefix: VALIDATE
|
|
4
|
+
inner_loop: false
|
|
5
|
+
message_types: [state_update]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Architecture Validator
|
|
9
|
+
|
|
10
|
+
Validate refactoring changes by running build checks, test suites, dependency metric comparisons, and API compatibility verification. Ensure refactoring improves architecture without breaking functionality.
|
|
11
|
+
|
|
12
|
+
## Phase 2: Environment & Baseline Loading
|
|
13
|
+
|
|
14
|
+
| Input | Source | Required |
|
|
15
|
+
|-------|--------|----------|
|
|
16
|
+
| Architecture baseline | <session>/artifacts/architecture-baseline.json (shared) | Yes |
|
|
17
|
+
| Refactoring plan / detail | Varies by mode (see below) | Yes |
|
|
18
|
+
| .msg/meta.json | <session>/wisdom/.msg/meta.json | Yes |
|
|
19
|
+
|
|
20
|
+
1. Extract session path from task description
|
|
21
|
+
2. **Detect branch/pipeline context** from task description:
|
|
22
|
+
|
|
23
|
+
| Task Description Field | Value | Context |
|
|
24
|
+
|----------------------|-------|---------|
|
|
25
|
+
| `BranchId: B{NN}` | Present | Fan-out branch -- validate only this branch's changes |
|
|
26
|
+
| `PipelineId: {P}` | Present | Independent pipeline -- use pipeline-scoped baseline |
|
|
27
|
+
| Neither present | - | Single mode -- full validation |
|
|
28
|
+
|
|
29
|
+
3. **Load architecture baseline**:
|
|
30
|
+
- Single / Fan-out: Read `<session>/artifacts/architecture-baseline.json` (shared baseline)
|
|
31
|
+
- Independent: Read `<session>/artifacts/pipelines/{P}/architecture-baseline.json`
|
|
32
|
+
|
|
33
|
+
4. **Load refactoring context**:
|
|
34
|
+
- Single: Read `<session>/artifacts/refactoring-plan.md` -- all success criteria
|
|
35
|
+
- Fan-out branch: Read `<session>/artifacts/branches/B{NN}/refactoring-detail.md` -- only this branch's criteria
|
|
36
|
+
- Independent: Read `<session>/artifacts/pipelines/{P}/refactoring-plan.md`
|
|
37
|
+
|
|
38
|
+
5. Load .msg/meta.json for project type and refactoring scope
|
|
39
|
+
6. Detect available validation tools from project:
|
|
40
|
+
|
|
41
|
+
| Signal | Validation Tool | Method |
|
|
42
|
+
|--------|----------------|--------|
|
|
43
|
+
| package.json + tsc | TypeScript compiler | Type-check entire project |
|
|
44
|
+
| package.json + vitest/jest | Test runner | Run existing test suite |
|
|
45
|
+
| package.json + eslint | Linter | Run lint checks for import/export issues |
|
|
46
|
+
| Cargo.toml | Rust compiler | cargo check + cargo test |
|
|
47
|
+
| go.mod | Go tools | go build + go test |
|
|
48
|
+
| Makefile with test target | Custom tests | make test |
|
|
49
|
+
| No tooling detected | Manual validation | File existence + import grep checks |
|
|
50
|
+
|
|
51
|
+
7. Get changed files scope from .msg/meta.json:
|
|
52
|
+
- Single: `refactorer` namespace
|
|
53
|
+
- Fan-out: `refactorer.B{NN}` namespace
|
|
54
|
+
- Independent: `refactorer.{P}` namespace
|
|
55
|
+
|
|
56
|
+
## Phase 3: Validation Execution
|
|
57
|
+
|
|
58
|
+
Run validations across four dimensions:
|
|
59
|
+
|
|
60
|
+
**Build validation**:
|
|
61
|
+
- Compile/type-check the project -- zero new errors allowed
|
|
62
|
+
- Verify all moved/renamed files are correctly referenced
|
|
63
|
+
- Check for missing imports or unresolved modules
|
|
64
|
+
|
|
65
|
+
**Test validation**:
|
|
66
|
+
- Run existing test suite -- all previously passing tests must still pass
|
|
67
|
+
- Identify any tests that need updating due to module moves (update, don't skip)
|
|
68
|
+
- Check for test file imports that reference old paths
|
|
69
|
+
|
|
70
|
+
**Dependency metric validation**:
|
|
71
|
+
- Recalculate architecture metrics post-refactoring
|
|
72
|
+
- Compare coupling scores against baseline (must improve or stay neutral)
|
|
73
|
+
- Verify no new circular dependencies introduced
|
|
74
|
+
- Check cohesion metrics for affected modules
|
|
75
|
+
|
|
76
|
+
**API compatibility validation**:
|
|
77
|
+
- Verify public API signatures are preserved (exported function/class/type names)
|
|
78
|
+
- Check for dangling references (imports pointing to removed/moved files)
|
|
79
|
+
- Verify no new dead exports introduced by the refactoring
|
|
80
|
+
- Check that re-exports maintain backward compatibility where needed
|
|
81
|
+
|
|
82
|
+
**Branch-scoped validation** (fan-out mode):
|
|
83
|
+
- Only validate metrics relevant to this branch's refactoring (from refactoring-detail.md)
|
|
84
|
+
- Still check for regressions across all metrics (not just branch-specific ones)
|
|
85
|
+
|
|
86
|
+
## Phase 4: Result Analysis
|
|
87
|
+
|
|
88
|
+
Compare against baseline and plan criteria:
|
|
89
|
+
|
|
90
|
+
| Metric | Threshold | Verdict |
|
|
91
|
+
|--------|-----------|---------|
|
|
92
|
+
| Build passes | Zero compilation errors | PASS |
|
|
93
|
+
| All tests pass | No new test failures | PASS |
|
|
94
|
+
| Coupling improved or neutral | No metric degradation > 5% | PASS |
|
|
95
|
+
| No new cycles introduced | Cycle count <= baseline | PASS |
|
|
96
|
+
| All plan success criteria met | Every criterion satisfied | PASS |
|
|
97
|
+
| Partial improvement | Some metrics improved, none degraded | WARN |
|
|
98
|
+
| Build fails | Compilation errors detected | FAIL -> fix_required |
|
|
99
|
+
| Test failures | Previously passing tests now fail | FAIL -> fix_required |
|
|
100
|
+
| New cycles introduced | Cycle count > baseline | FAIL -> fix_required |
|
|
101
|
+
| Dangling references | Unresolved imports detected | FAIL -> fix_required |
|
|
102
|
+
|
|
103
|
+
1. Write validation results to output path:
|
|
104
|
+
- Single: `<session>/artifacts/validation-results.json`
|
|
105
|
+
- Fan-out: `<session>/artifacts/branches/B{NN}/validation-results.json`
|
|
106
|
+
- Independent: `<session>/artifacts/pipelines/{P}/validation-results.json`
|
|
107
|
+
- Content: Per-dimension: name, baseline value, current value, improvement/regression, verdict; Overall verdict: PASS / WARN / FAIL; Failure details (if any)
|
|
108
|
+
|
|
109
|
+
2. Update `<session>/wisdom/.msg/meta.json` under scoped namespace:
|
|
110
|
+
- Single: merge `{ "validator": { verdict, improvements, regressions, build_pass, test_pass } }`
|
|
111
|
+
- Fan-out: merge `{ "validator.B{NN}": { verdict, improvements, regressions, build_pass, test_pass } }`
|
|
112
|
+
- Independent: merge `{ "validator.{P}": { verdict, improvements, regressions, build_pass, test_pass } }`
|
|
113
|
+
|
|
114
|
+
3. If verdict is FAIL, include detailed feedback in message for FIX task creation:
|
|
115
|
+
- Which validations failed, specific errors, suggested investigation areas
|
|
@@ -1,102 +1,102 @@
|
|
|
1
|
-
# Pipeline Definitions — team-arch-opt
|
|
2
|
-
|
|
3
|
-
## Available Pipelines
|
|
4
|
-
|
|
5
|
-
### Single Mode (Linear)
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
ANALYZE-001 → DESIGN-001 → REFACTOR-001 → VALIDATE-001 + REVIEW-001
|
|
9
|
-
[analyzer] [designer] [refactorer] [validator] [reviewer]
|
|
10
|
-
^ |
|
|
11
|
-
+<-- FIX-001 ----+
|
|
12
|
-
(max 3 iterations)
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
### Fan-out Mode (Shared Stages + Parallel Branches)
|
|
16
|
-
|
|
17
|
-
```
|
|
18
|
-
ANALYZE-001 → DESIGN-001 --+→ REFACTOR-B01 → VALIDATE-B01 + REVIEW-B01
|
|
19
|
-
[analyzer] [designer] | [refactorer] [validator] [reviewer]
|
|
20
|
-
+→ REFACTOR-B02 → VALIDATE-B02 + REVIEW-B02
|
|
21
|
-
+→ REFACTOR-B0N → VALIDATE-B0N + REVIEW-B0N
|
|
22
|
-
|
|
|
23
|
-
AGGREGATE → Phase 5
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
Branch tasks created at CP-2.5 after DESIGN-001 completes.
|
|
27
|
-
|
|
28
|
-
### Independent Mode (M Complete Pipelines)
|
|
29
|
-
|
|
30
|
-
```
|
|
31
|
-
Pipeline A: ANALYZE-A01 → DESIGN-A01 → REFACTOR-A01 → VALIDATE-A01 + REVIEW-A01
|
|
32
|
-
Pipeline B: ANALYZE-B01 → DESIGN-B01 → REFACTOR-B01 → VALIDATE-B01 + REVIEW-B01
|
|
33
|
-
... |
|
|
34
|
-
AGGREGATE → Phase 5
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
### Auto Mode
|
|
38
|
-
|
|
39
|
-
Auto-detects based on refactoring count at CP-2.5:
|
|
40
|
-
- count <= 2 → switch to single mode
|
|
41
|
-
- count >= 3 → switch to fan-out mode
|
|
42
|
-
|
|
43
|
-
## Task Metadata Registry
|
|
44
|
-
|
|
45
|
-
### Single Mode
|
|
46
|
-
|
|
47
|
-
| Task ID | Role | Phase | Dependencies | Description |
|
|
48
|
-
|---------|------|-------|-------------|-------------|
|
|
49
|
-
| ANALYZE-001 | analyzer | Stage 1 | (none) | Analyze architecture, identify structural issues |
|
|
50
|
-
| DESIGN-001 | designer | Stage 2 | ANALYZE-001 | Design refactoring plan from architecture report |
|
|
51
|
-
| REFACTOR-001 | refactorer | Stage 3 | DESIGN-001 | Implement highest-priority refactorings |
|
|
52
|
-
| VALIDATE-001 | validator | Stage 4 | REFACTOR-001 | Validate build, tests, metrics, API compatibility |
|
|
53
|
-
| REVIEW-001 | reviewer | Stage 4 | REFACTOR-001 | Review refactoring code for correctness |
|
|
54
|
-
| FIX-001 | refactorer | Stage 3 (cycle) | REVIEW-001 or VALIDATE-001 | Fix issues found in review/validation |
|
|
55
|
-
|
|
56
|
-
### Fan-out Mode (Branch Tasks at CP-2.5)
|
|
57
|
-
|
|
58
|
-
| Task ID | Role | Phase | Dependencies | Description |
|
|
59
|
-
|---------|------|-------|-------------|-------------|
|
|
60
|
-
| ANALYZE-001 | analyzer | Stage 1 (shared) | (none) | Analyze architecture |
|
|
61
|
-
| DESIGN-001 | designer | Stage 2 (shared) | ANALYZE-001 | Design plan with discrete REFACTOR-IDs |
|
|
62
|
-
| REFACTOR-B{NN} | refactorer | Stage 3 (branch) | DESIGN-001 | Implement REFACTOR-{NNN} only |
|
|
63
|
-
| VALIDATE-B{NN} | validator | Stage 4 (branch) | REFACTOR-B{NN} | Validate branch B{NN} |
|
|
64
|
-
| REVIEW-B{NN} | reviewer | Stage 4 (branch) | REFACTOR-B{NN} | Review branch B{NN} |
|
|
65
|
-
| FIX-B{NN}-{cycle} | refactorer | Fix (branch) | (none) | Fix issues in branch B{NN} |
|
|
66
|
-
|
|
67
|
-
### Independent Mode
|
|
68
|
-
|
|
69
|
-
| Task ID | Role | Phase | Dependencies | Description |
|
|
70
|
-
|---------|------|-------|-------------|-------------|
|
|
71
|
-
| ANALYZE-{P}01 | analyzer | Stage 1 | (none) | Analyze for pipeline {P} target |
|
|
72
|
-
| DESIGN-{P}01 | designer | Stage 2 | ANALYZE-{P}01 | Design for pipeline {P} |
|
|
73
|
-
| REFACTOR-{P}01 | refactorer | Stage 3 | DESIGN-{P}01 | Implement pipeline {P} refactorings |
|
|
74
|
-
| VALIDATE-{P}01 | validator | Stage 4 | REFACTOR-{P}01 | Validate pipeline {P} |
|
|
75
|
-
| REVIEW-{P}01 | reviewer | Stage 4 | REFACTOR-{P}01 | Review pipeline {P} |
|
|
76
|
-
|
|
77
|
-
## Checkpoints
|
|
78
|
-
|
|
79
|
-
| Checkpoint | Trigger | Location | Behavior |
|
|
80
|
-
|------------|---------|----------|----------|
|
|
81
|
-
| CP-1 | ANALYZE-001 complete | After Stage 1 | User reviews architecture report, can refine scope |
|
|
82
|
-
| CP-2 | DESIGN-001 complete | After Stage 2 | User reviews refactoring plan, can adjust priorities |
|
|
83
|
-
| CP-2.5 | DESIGN-001 complete (auto/fan-out) | After Stage 2 | Auto-create N branch tasks, spawn all REFACTOR-B* in parallel |
|
|
84
|
-
| CP-3 | REVIEW/VALIDATE fail | Stage 4 (per-branch) | Auto-create FIX task for that branch only (max 3x per branch) |
|
|
85
|
-
| CP-4 | All tasks/branches complete | Phase 5 | Aggregate results, interactive completion action |
|
|
86
|
-
|
|
87
|
-
## Task Naming Rules
|
|
88
|
-
|
|
89
|
-
| Mode | Stage 3 | Stage 4 | Fix | Retry |
|
|
90
|
-
|------|---------|---------|-----|-------|
|
|
91
|
-
| Single | REFACTOR-001 | VALIDATE-001, REVIEW-001 | FIX-001 | VALIDATE-001-R1, REVIEW-001-R1 |
|
|
92
|
-
| Fan-out | REFACTOR-B01 | VALIDATE-B01, REVIEW-B01 | FIX-B01-1 | VALIDATE-B01-R1, REVIEW-B01-R1 |
|
|
93
|
-
| Independent | REFACTOR-A01 | VALIDATE-A01, REVIEW-A01 | FIX-A01-1 | VALIDATE-A01-R1, REVIEW-A01-R1 |
|
|
94
|
-
|
|
95
|
-
## Parallel Mode Invocation
|
|
96
|
-
|
|
97
|
-
```bash
|
|
98
|
-
Skill(skill="team-arch-opt", args="<task-description>") # auto mode
|
|
99
|
-
Skill(skill="team-arch-opt", args="--parallel-mode=fan-out <task-description>") # force fan-out
|
|
100
|
-
Skill(skill="team-arch-opt", args='--parallel-mode=independent "target1" "target2"') # independent
|
|
101
|
-
Skill(skill="team-arch-opt", args="--max-branches=3 <task-description>") # limit branches
|
|
102
|
-
```
|
|
1
|
+
# Pipeline Definitions — team-arch-opt
|
|
2
|
+
|
|
3
|
+
## Available Pipelines
|
|
4
|
+
|
|
5
|
+
### Single Mode (Linear)
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
ANALYZE-001 → DESIGN-001 → REFACTOR-001 → VALIDATE-001 + REVIEW-001
|
|
9
|
+
[analyzer] [designer] [refactorer] [validator] [reviewer]
|
|
10
|
+
^ |
|
|
11
|
+
+<-- FIX-001 ----+
|
|
12
|
+
(max 3 iterations)
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
### Fan-out Mode (Shared Stages + Parallel Branches)
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
ANALYZE-001 → DESIGN-001 --+→ REFACTOR-B01 → VALIDATE-B01 + REVIEW-B01
|
|
19
|
+
[analyzer] [designer] | [refactorer] [validator] [reviewer]
|
|
20
|
+
+→ REFACTOR-B02 → VALIDATE-B02 + REVIEW-B02
|
|
21
|
+
+→ REFACTOR-B0N → VALIDATE-B0N + REVIEW-B0N
|
|
22
|
+
|
|
|
23
|
+
AGGREGATE → Phase 5
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Branch tasks created at CP-2.5 after DESIGN-001 completes.
|
|
27
|
+
|
|
28
|
+
### Independent Mode (M Complete Pipelines)
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
Pipeline A: ANALYZE-A01 → DESIGN-A01 → REFACTOR-A01 → VALIDATE-A01 + REVIEW-A01
|
|
32
|
+
Pipeline B: ANALYZE-B01 → DESIGN-B01 → REFACTOR-B01 → VALIDATE-B01 + REVIEW-B01
|
|
33
|
+
... |
|
|
34
|
+
AGGREGATE → Phase 5
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Auto Mode
|
|
38
|
+
|
|
39
|
+
Auto-detects based on refactoring count at CP-2.5:
|
|
40
|
+
- count <= 2 → switch to single mode
|
|
41
|
+
- count >= 3 → switch to fan-out mode
|
|
42
|
+
|
|
43
|
+
## Task Metadata Registry
|
|
44
|
+
|
|
45
|
+
### Single Mode
|
|
46
|
+
|
|
47
|
+
| Task ID | Role | Phase | Dependencies | Description |
|
|
48
|
+
|---------|------|-------|-------------|-------------|
|
|
49
|
+
| ANALYZE-001 | analyzer | Stage 1 | (none) | Analyze architecture, identify structural issues |
|
|
50
|
+
| DESIGN-001 | designer | Stage 2 | ANALYZE-001 | Design refactoring plan from architecture report |
|
|
51
|
+
| REFACTOR-001 | refactorer | Stage 3 | DESIGN-001 | Implement highest-priority refactorings |
|
|
52
|
+
| VALIDATE-001 | validator | Stage 4 | REFACTOR-001 | Validate build, tests, metrics, API compatibility |
|
|
53
|
+
| REVIEW-001 | reviewer | Stage 4 | REFACTOR-001 | Review refactoring code for correctness |
|
|
54
|
+
| FIX-001 | refactorer | Stage 3 (cycle) | REVIEW-001 or VALIDATE-001 | Fix issues found in review/validation |
|
|
55
|
+
|
|
56
|
+
### Fan-out Mode (Branch Tasks at CP-2.5)
|
|
57
|
+
|
|
58
|
+
| Task ID | Role | Phase | Dependencies | Description |
|
|
59
|
+
|---------|------|-------|-------------|-------------|
|
|
60
|
+
| ANALYZE-001 | analyzer | Stage 1 (shared) | (none) | Analyze architecture |
|
|
61
|
+
| DESIGN-001 | designer | Stage 2 (shared) | ANALYZE-001 | Design plan with discrete REFACTOR-IDs |
|
|
62
|
+
| REFACTOR-B{NN} | refactorer | Stage 3 (branch) | DESIGN-001 | Implement REFACTOR-{NNN} only |
|
|
63
|
+
| VALIDATE-B{NN} | validator | Stage 4 (branch) | REFACTOR-B{NN} | Validate branch B{NN} |
|
|
64
|
+
| REVIEW-B{NN} | reviewer | Stage 4 (branch) | REFACTOR-B{NN} | Review branch B{NN} |
|
|
65
|
+
| FIX-B{NN}-{cycle} | refactorer | Fix (branch) | (none) | Fix issues in branch B{NN} |
|
|
66
|
+
|
|
67
|
+
### Independent Mode
|
|
68
|
+
|
|
69
|
+
| Task ID | Role | Phase | Dependencies | Description |
|
|
70
|
+
|---------|------|-------|-------------|-------------|
|
|
71
|
+
| ANALYZE-{P}01 | analyzer | Stage 1 | (none) | Analyze for pipeline {P} target |
|
|
72
|
+
| DESIGN-{P}01 | designer | Stage 2 | ANALYZE-{P}01 | Design for pipeline {P} |
|
|
73
|
+
| REFACTOR-{P}01 | refactorer | Stage 3 | DESIGN-{P}01 | Implement pipeline {P} refactorings |
|
|
74
|
+
| VALIDATE-{P}01 | validator | Stage 4 | REFACTOR-{P}01 | Validate pipeline {P} |
|
|
75
|
+
| REVIEW-{P}01 | reviewer | Stage 4 | REFACTOR-{P}01 | Review pipeline {P} |
|
|
76
|
+
|
|
77
|
+
## Checkpoints
|
|
78
|
+
|
|
79
|
+
| Checkpoint | Trigger | Location | Behavior |
|
|
80
|
+
|------------|---------|----------|----------|
|
|
81
|
+
| CP-1 | ANALYZE-001 complete | After Stage 1 | User reviews architecture report, can refine scope |
|
|
82
|
+
| CP-2 | DESIGN-001 complete | After Stage 2 | User reviews refactoring plan, can adjust priorities |
|
|
83
|
+
| CP-2.5 | DESIGN-001 complete (auto/fan-out) | After Stage 2 | Auto-create N branch tasks, spawn all REFACTOR-B* in parallel |
|
|
84
|
+
| CP-3 | REVIEW/VALIDATE fail | Stage 4 (per-branch) | Auto-create FIX task for that branch only (max 3x per branch) |
|
|
85
|
+
| CP-4 | All tasks/branches complete | Phase 5 | Aggregate results, interactive completion action |
|
|
86
|
+
|
|
87
|
+
## Task Naming Rules
|
|
88
|
+
|
|
89
|
+
| Mode | Stage 3 | Stage 4 | Fix | Retry |
|
|
90
|
+
|------|---------|---------|-----|-------|
|
|
91
|
+
| Single | REFACTOR-001 | VALIDATE-001, REVIEW-001 | FIX-001 | VALIDATE-001-R1, REVIEW-001-R1 |
|
|
92
|
+
| Fan-out | REFACTOR-B01 | VALIDATE-B01, REVIEW-B01 | FIX-B01-1 | VALIDATE-B01-R1, REVIEW-B01-R1 |
|
|
93
|
+
| Independent | REFACTOR-A01 | VALIDATE-A01, REVIEW-A01 | FIX-A01-1 | VALIDATE-A01-R1, REVIEW-A01-R1 |
|
|
94
|
+
|
|
95
|
+
## Parallel Mode Invocation
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
Skill(skill="team-arch-opt", args="<task-description>") # auto mode
|
|
99
|
+
Skill(skill="team-arch-opt", args="--parallel-mode=fan-out <task-description>") # force fan-out
|
|
100
|
+
Skill(skill="team-arch-opt", args='--parallel-mode=independent "target1" "target2"') # independent
|
|
101
|
+
Skill(skill="team-arch-opt", args="--max-branches=3 <task-description>") # limit branches
|
|
102
|
+
```
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: team-brainstorm
|
|
3
3
|
description: Unified team skill for brainstorming team. Uses team-worker agent architecture with role directories for domain logic. Coordinator orchestrates pipeline, workers are team-worker agents. Triggers on "team brainstorm".
|
|
4
|
-
allowed-tools: spawn_agent(*), wait_agent(*),
|
|
4
|
+
allowed-tools: spawn_agent(*), wait_agent(*), send_message(*), assign_task(*), close_agent(*), list_agents(*), report_agent_job_result(*), request_user_input(*), Read(*), Write(*), Edit(*), Bash(*), Glob(*), Grep(*)
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Team Brainstorm
|
|
@@ -53,7 +53,8 @@ Before calling ANY tool, apply this check:
|
|
|
53
53
|
|
|
54
54
|
| Tool Call | Verdict | Reason |
|
|
55
55
|
|-----------|---------|--------|
|
|
56
|
-
| `spawn_agent`, `wait_agent`, `close_agent`, `
|
|
56
|
+
| `spawn_agent`, `wait_agent`, `close_agent`, `send_message`, `assign_task` | ALLOWED | Orchestration |
|
|
57
|
+
| `list_agents` | ALLOWED | Agent health check |
|
|
57
58
|
| `request_user_input` | ALLOWED | User interaction |
|
|
58
59
|
| `mcp__ccw-tools__team_msg` | ALLOWED | Message bus |
|
|
59
60
|
| `Read/Write` on `.workflow/.team/` files | ALLOWED | Session state |
|
|
@@ -83,6 +84,8 @@ Coordinator spawns workers using this template:
|
|
|
83
84
|
```
|
|
84
85
|
spawn_agent({
|
|
85
86
|
agent_type: "team_worker",
|
|
87
|
+
task_name: "<task-id>",
|
|
88
|
+
fork_context: false,
|
|
86
89
|
items: [
|
|
87
90
|
{ type: "text", text: `## Role Assignment
|
|
88
91
|
role: <role>
|
|
@@ -106,7 +109,7 @@ pipeline_phase: <pipeline-phase>` },
|
|
|
106
109
|
})
|
|
107
110
|
```
|
|
108
111
|
|
|
109
|
-
After spawning, use `wait_agent({
|
|
112
|
+
After spawning, use `wait_agent({ targets: [...], timeout_ms: 900000 })` to collect results, then `close_agent({ target: <name> })` each worker.
|
|
110
113
|
|
|
111
114
|
**Parallel ideator spawn** (Full pipeline with N angles):
|
|
112
115
|
|
|
@@ -115,6 +118,8 @@ When Full pipeline has N parallel IDEA tasks, spawn N distinct team-worker agent
|
|
|
115
118
|
```
|
|
116
119
|
spawn_agent({
|
|
117
120
|
agent_type: "team_worker",
|
|
121
|
+
task_name: "ideator-<N>",
|
|
122
|
+
fork_context: false,
|
|
118
123
|
items: [
|
|
119
124
|
{ type: "text", text: `## Role Assignment
|
|
120
125
|
role: ideator
|
|
@@ -139,7 +144,29 @@ pipeline_phase: <pipeline-phase>` },
|
|
|
139
144
|
})
|
|
140
145
|
```
|
|
141
146
|
|
|
142
|
-
After spawning, use `wait_agent({
|
|
147
|
+
After spawning, use `wait_agent({ targets: [...], timeout_ms: 900000 })` to collect results, then `close_agent({ target: <name> })` each worker.
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
### Model Selection Guide
|
|
151
|
+
|
|
152
|
+
| Role | model | reasoning_effort | Rationale |
|
|
153
|
+
|------|-------|-------------------|-----------|
|
|
154
|
+
| Ideator (IDEA-*) | (default) | high | Creative divergent thinking requires full reasoning |
|
|
155
|
+
| Challenger (CHALLENGE-*) | (default) | high | Critical analysis of ideas needs deep reasoning |
|
|
156
|
+
| Synthesizer (SYNTH-*) | (default) | medium | Aggregation and convergence over generation |
|
|
157
|
+
| Evaluator (EVAL-*) | (default) | medium | Scoring and ranking against criteria |
|
|
158
|
+
|
|
159
|
+
Override model/reasoning_effort in spawn_agent when cost optimization is needed:
|
|
160
|
+
```
|
|
161
|
+
spawn_agent({
|
|
162
|
+
agent_type: "team_worker",
|
|
163
|
+
task_name: "<task-id>",
|
|
164
|
+
fork_context: false,
|
|
165
|
+
model: "<model-override>",
|
|
166
|
+
reasoning_effort: "<effort-level>",
|
|
167
|
+
items: [...]
|
|
168
|
+
})
|
|
169
|
+
```
|
|
143
170
|
|
|
144
171
|
## User Commands
|
|
145
172
|
|
|
@@ -178,6 +205,47 @@ After spawning, use `wait_agent({ ids: [...], timeout_ms: 900000 })` to collect
|
|
|
178
205
|
|
|
179
206
|
- [specs/pipelines.md](specs/pipelines.md) — Pipeline definitions and task registry
|
|
180
207
|
|
|
208
|
+
## v4 Agent Coordination
|
|
209
|
+
|
|
210
|
+
### Message Semantics
|
|
211
|
+
|
|
212
|
+
| Intent | API | Example |
|
|
213
|
+
|--------|-----|---------|
|
|
214
|
+
| Share idea context across ideators | `send_message` | Send seed ideas to running ideator for cross-pollination |
|
|
215
|
+
| Not used in this skill | `assign_task` | No resident agents -- all workers are one-shot |
|
|
216
|
+
| Check running agents | `list_agents` | Verify parallel ideator health during Full pipeline |
|
|
217
|
+
|
|
218
|
+
### Parallel Ideator Coordination (Full Pipeline)
|
|
219
|
+
|
|
220
|
+
Full pipeline spawns N parallel ideators for different brainstorming angles. Use batch spawn + wait:
|
|
221
|
+
|
|
222
|
+
```
|
|
223
|
+
// Spawn N ideators in parallel, each with a different angle
|
|
224
|
+
const ideatorNames = ["IDEA-001", "IDEA-002", "IDEA-003"]
|
|
225
|
+
for (const name of ideatorNames) {
|
|
226
|
+
spawn_agent({ agent_type: "team_worker", task_name: name, fork_context: false, ... })
|
|
227
|
+
}
|
|
228
|
+
wait_agent({ targets: ideatorNames, timeout_ms: 900000 })
|
|
229
|
+
// Collect all idea outputs, feed to challenger as upstream context
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
### Agent Health Check
|
|
233
|
+
|
|
234
|
+
Use `list_agents({})` in handleResume and handleComplete:
|
|
235
|
+
|
|
236
|
+
```
|
|
237
|
+
// Reconcile session state with actual running agents
|
|
238
|
+
const running = list_agents({})
|
|
239
|
+
// Compare with tasks.json active_agents
|
|
240
|
+
// Reset orphaned tasks (in_progress but agent gone) to pending
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
### Named Agent Targeting
|
|
244
|
+
|
|
245
|
+
Workers are spawned with `task_name: "<task-id>"` enabling direct addressing:
|
|
246
|
+
- `send_message({ target: "IDEA-002", items: [...] })` -- share context from another ideator
|
|
247
|
+
- `close_agent({ target: "IDEA-001" })` -- cleanup by name after wait_agent returns
|
|
248
|
+
|
|
181
249
|
## Error Handling
|
|
182
250
|
|
|
183
251
|
| Scenario | Resolution |
|