mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-03-25 19:48:33 +08:00
- Delete 21 old team skill directories using CSV-wave pipeline pattern (~100+ files) - Delete old team-lifecycle (v3) and team-planex-v2 - Create generic team-worker.toml and team-supervisor.toml (replacing tlv4-specific TOMLs) - Convert 19 team skills from Claude Code format (Agent/SendMessage/TaskCreate) to Codex format (spawn_agent/wait_agent/tasks.json/request_user_input) - Update team-lifecycle-v4 to use generic agent types (team_worker/team_supervisor) - Convert all coordinator role files: dispatch.md, monitor.md, role.md - Convert all worker role files: remove run_in_background, fix Bash syntax - Convert all specs/pipelines.md references - Final state: 20 team skills, 217 .md files, zero Claude Code API residuals Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
3.2 KiB
3.2 KiB
role, prefix, inner_loop, message_types
| role | prefix | inner_loop | message_types | ||||||
|---|---|---|---|---|---|---|---|---|---|
| generator | TESTGEN | true |
|
Test Generator
Generate test code by layer (L1 unit / L2 integration / L3 E2E). Acts as the Generator in the Generator-Critic loop. Supports revision mode for GC loop iterations.
Phase 2: Context Loading
| Input | Source | Required |
|---|---|---|
| Task description | From task subject/description | Yes |
| Session path | Extracted from task description | Yes |
| Test strategy | /strategy/test-strategy.md | Yes |
| .msg/meta.json | /wisdom/.msg/meta.json | No |
- Extract session path and layer from task description
- Load test specs: Run
ccw spec load --category testfor test framework conventions and coverage targets - Read test strategy:
Read("<session>/strategy/test-strategy.md")
-
Read source files to test (from strategy priority_files, limit 20)
-
Read .msg/meta.json for framework and scope context
-
Detect revision mode:
| Condition | Mode |
|---|---|
| Task subject contains "fix" or "revised" | Revision -- load previous failures |
| Otherwise | Fresh generation |
For revision mode:
- Read latest result file for failure details
- Read effective test patterns from .msg/meta.json
- Read wisdom files if available
Phase 3: Test Generation
Strategy selection by complexity:
| File Count | Strategy |
|---|---|
| <= 3 files | Direct: inline Write/Edit |
| 3-5 files | Single code-developer agent |
| > 5 files | Batch: group by module, one agent per batch |
Direct generation (per source file):
- Generate test path:
<session>/tests/<layer>/<test-file> - Generate test code: happy path, edge cases, error handling
- Write test file
CLI delegation (medium/high complexity):
Bash(`ccw cli -p "PURPOSE: Generate <layer> tests using <framework> to achieve coverage target; success = all priority files covered with quality tests
TASK: • Analyze source files • Generate test cases (happy path, edge cases, errors) • Write test files with proper structure • Ensure import resolution
MODE: write
CONTEXT: @<source-files> @<session>/strategy/test-strategy.md | Memory: Framework: <framework>, Layer: <layer>, Round: <round>
<if-revision: Previous failures: <failure-details>
Effective patterns: <patterns-from-meta>>
EXPECTED: Test files in <session>/tests/<layer>/ with: proper test structure, comprehensive coverage, correct imports, framework conventions
CONSTRAINTS: Follow test strategy priorities | Use framework best practices | <layer>-appropriate assertions
Source files to test:
<file-list-with-content>" --tool gemini --mode write --cd <session>`)
Output verification:
Glob("<session>/tests/<layer>/**/*")
Phase 4: Self-Validation & State Update
Validation checks:
| Check | Method | Action on Fail |
|---|---|---|
| Syntax | tsc --noEmit or equivalent |
Auto-fix imports/types |
| File count | Count generated files | Report issue |
| Import resolution | Check broken imports | Fix import paths |
Update <session>/wisdom/.msg/meta.json under generator namespace:
- Merge
{ "generator": { test_files, layer, round, is_revision } }