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.3 KiB
3.3 KiB
role, prefix, inner_loop, message_types
| role | prefix | inner_loop | message_types | ||||
|---|---|---|---|---|---|---|---|
| fixer | FIX | true |
|
Code Fixer
Fix code based on reviewed findings. Load manifest, plan fix groups, apply with rollback-on-failure, verify. Code-generation role -- modifies source files.
Phase 2: Context & Scope Resolution
| Input | Source | Required |
|---|---|---|
| Task description | From task subject/description | Yes |
| Session path | Extracted from task description | Yes |
| Fix manifest | /fix/fix-manifest.json | Yes |
| Review report | /review/review-report.json | Yes |
| .msg/meta.json | /.msg/meta.json | No |
- Extract session path, input path from task description
- Load manifest (scope, source report path) and review report (findings with enrichment)
- Filter fixable findings: severity in scope AND fix_strategy !== 'skip'
- If 0 fixable -> report complete immediately
- Detect quick path: findings <= 5 AND no cross-file dependencies
- Detect verification tools: tsc (tsconfig.json), eslint (package.json), jest (package.json), pytest (pyproject.toml), semgrep (semgrep available)
- Load wisdom files from
<session>/wisdom/
Phase 3: Plan + Execute
3A: Plan Fixes (deterministic, no CLI)
- Group findings by primary file
- Merge groups with cross-file dependencies (union-find)
- Topological sort within each group (respect fix_dependencies, append cycles at end)
- Sort groups by max severity (critical first)
- Determine execution path: quick_path (<=5 findings, <=1 group) or standard
- Write
<session>/fix/fix-plan.json:{plan_id, quick_path, groups[{id, files[], findings[], max_severity}], execution_order[], total_findings, total_groups}
3B: Execute Fixes
Quick path: Single code-developer agent for all findings. Standard path: One code-developer agent per group, in execution_order.
Agent prompt includes: finding list (dependency-sorted), file contents (truncated 8K), critical rules:
- Apply each fix using Edit tool in order
- After each fix, run related tests
- Tests PASS -> finding is "fixed"
- Tests FAIL ->
git checkout -- {file}-> mark "failed" -> continue - No retry on failure. Rollback and move on
- If finding depends on previously failed finding -> mark "skipped"
Agent returns JSON: {results:[{id, status: fixed|failed|skipped, file, error?}]}
Fallback: check git diff per file if no structured output.
Write <session>/fix/execution-results.json: {fixed[], failed[], skipped[]}
Phase 4: Post-Fix Verification
- Run available verification tools on modified files:
| Tool | Command | Pass Criteria |
|---|---|---|
| tsc | npx tsc --noEmit |
0 errors |
| eslint | npx eslint <files> |
0 errors |
| jest | npx jest --passWithNoTests |
Tests pass |
| pytest | pytest --tb=short |
Tests pass |
| semgrep | semgrep --config auto <files> --json |
0 results |
- If verification fails critically -> rollback last batch
- Write
<session>/fix/verify-results.json - Generate
<session>/fix/fix-summary.json:{fix_id, fix_date, scope, total, fixed, failed, skipped, fix_rate, verification} - Generate
<session>/fix/fix-summary.md(human-readable) - Update
<session>/.msg/meta.jsonwith fix results - Contribute discoveries to
<session>/wisdom/files