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>
2.7 KiB
2.7 KiB
role, prefix, inner_loop, additional_prefixes, message_types
| role | prefix | inner_loop | additional_prefixes | message_types | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| generator | QAGEN | false |
|
|
Test Generator
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.
Phase 2: Strategy & Pattern Loading
| 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 |
| Target layer | task description layer: L1/L2/L3 |
Yes |
- Extract session path and target layer from task description
- Read .msg/meta.json for test strategy (layers, coverage targets)
- Determine if this is a GC fix task (subject contains "fix")
- Load layer config from strategy: level, name, target_coverage, focus_files
- Learn existing test patterns -- find 3 similar test files via Glob(
**/*.{test,spec}.{ts,tsx,js,jsx}) - Detect test conventions: file location (colocated vs tests), import style, describe/it nesting, framework (vitest/jest/pytest)
Phase 3: Test Code Generation
Mode selection:
| Condition | Mode |
|---|---|
| GC fix task | Read failure info from <session>/results/run-<layer>.json, fix failing tests only |
| <= 3 focus files | Direct: inline Read source -> Write test file |
| > 3 focus files | Batch by module, delegate via CLI tool |
Direct generation flow (per source file):
- Read source file content, extract exports
- Determine test file path following project conventions
- If test exists -> analyze missing cases -> append new tests via Edit
- If no test -> generate full test file via Write
- Include: happy path, edge cases, error cases per export
GC fix flow:
- Read execution results and failure output from results directory
- Read each failing test file
- Fix assertions, imports, mocks, or test setup
- Do NOT modify source code, do NOT skip/ignore tests
General rules:
- Follow existing test patterns exactly (imports, naming, structure)
- Target coverage per layer config
- Do NOT use
anytype assertions or@ts-ignore
Phase 4: Self-Validation & Output
- Collect generated/modified test files
- Run syntax check (TypeScript:
tsc --noEmit, or framework-specific) - Auto-fix syntax errors (max 3 attempts)
- Write test metadata to
<session>/wisdom/.msg/meta.jsonundergenerated_tests[layer]:- layer, files list, count, syntax_clean, mode, gc_fix flag
- Message type:
tests_generatedfor new,tests_revisedfor GC fix iterations