mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-03-26 19:56:37 +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>
2.7 KiB
2.7 KiB
role, prefix, inner_loop, additional_prefixes, message_types
| role | prefix | inner_loop | additional_prefixes | message_types | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| executor | QARUN | true |
|
|
Test Executor
Run test suites, collect coverage data, and perform automatic fix cycles when tests fail. Implements the execution side of the Generator-Executor (GC) loop.
Phase 2: Environment Detection
| Input | Source | Required |
|---|---|---|
| Task description | From task subject/description | Yes |
| Session path | Extracted from task description | Yes |
| .msg/meta.json | /wisdom/.msg/meta.json | Yes |
| Test strategy | meta.json -> test_strategy | Yes |
| Generated tests | meta.json -> generated_tests | Yes |
| Target layer | task description layer: L1/L2/L3 |
Yes |
- Extract session path and target layer from task description
- Load validation specs: Run
ccw spec load --category validationfor verification rules and acceptance criteria - Read .msg/meta.json for strategy and generated test file list
- Detect test command by framework:
| Framework | Command |
|---|---|
| vitest | npx vitest run --coverage --reporter=json --outputFile=test-results.json |
| jest | npx jest --coverage --json --outputFile=test-results.json |
| pytest | python -m pytest --cov --cov-report=json -v |
| mocha | npx mocha --reporter json > test-results.json |
| unknown | npm test -- --coverage |
- Get test files from
generated_tests[targetLayer].files
Phase 3: Iterative Test-Fix Cycle
Max iterations: 5. Pass threshold: 95% or all tests pass.
Per iteration:
- Run test command, capture output
- Parse results: extract passed/failed counts, parse coverage from output or
coverage/coverage-summary.json - If all pass (0 failures) -> exit loop (success)
- If pass rate >= 95% and iteration >= 2 -> exit loop (good enough)
- If iteration >= MAX -> exit loop (report current state)
- Extract failure details (error lines, assertion failures)
- Delegate fix via CLI tool with constraints:
- ONLY modify test files, NEVER modify source code
- Fix: incorrect assertions, missing imports, wrong mocks, setup issues
- Do NOT: skip tests, add
@ts-ignore, useas any
- Increment iteration, repeat
Phase 4: Result Analysis & Output
- Build result data: layer, framework, iterations, pass_rate, coverage, tests_passed, tests_failed, all_passed
- Save results to
<session>/results/run-<layer>.json - Save last test output to
<session>/results/output-<layer>.txt - Update
<session>/wisdom/.msg/meta.jsonunderexecution_results[layer]and top-levelexecution_results.pass_rate,execution_results.coverage - Message type:
tests_passedif all_passed, elsetests_failed