feat: migrate all codex team skills from spawn_agents_on_csv to spawn_agent + wait_agent architecture

- 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>
This commit is contained in:
catlog22
2026-03-24 16:54:48 +08:00
parent 54283e5dbb
commit 1e560ab8e8
334 changed files with 28996 additions and 35516 deletions

View File

@@ -0,0 +1,47 @@
# Pipeline Definitions
Tech debt pipeline modes and task registry.
## Pipeline Modes
| Mode | Description | Task Chain |
|------|-------------|------------|
| scan | Scan and assess only, no fixes | TDSCAN-001 -> TDEVAL-001 |
| remediate | Full pipeline: scan -> assess -> plan -> fix -> validate | TDSCAN-001 -> TDEVAL-001 -> TDPLAN-001 -> TDFIX-001 -> TDVAL-001 |
| targeted | Skip scan/assess, direct fix path | TDPLAN-001 -> TDFIX-001 -> TDVAL-001 |
## Task Registry
| Task ID | Role | Prefix | blockedBy | Description |
|---------|------|--------|-----------|-------------|
| TDSCAN-001 | scanner | TDSCAN | [] | Fan-out multi-dimension codebase scan (code, architecture, testing, dependency, documentation) |
| TDEVAL-001 | assessor | TDEVAL | [TDSCAN-001] | Severity assessment with priority quadrant matrix |
| TDPLAN-001 | planner | TDPLAN | [TDEVAL-001] | 3-phase remediation plan with effort estimates |
| TDFIX-001 | executor | TDFIX | [TDPLAN-001] | Worktree-based incremental fixes (inner_loop: true) |
| TDVAL-001 | validator | TDVAL | [TDFIX-001] | 4-layer validation: syntax, tests, integration, regression |
## Checkpoints
| Checkpoint | Trigger | Condition | Action |
|------------|---------|-----------|--------|
| Plan Approval Gate | TDPLAN-001 completes | Always | request_user_input: Approve / Revise / Abort |
| Worktree Creation | Plan approved | Before TDFIX | git worktree add .worktrees/TD-<slug>-<date> |
| Fix-Verify GC Loop | TDVAL-* completes | Regressions found | Create TDFIX-fix-<round> + TDVAL-recheck-<round> (max 3 rounds) |
## GC Loop Behavior
| Condition | Action |
|-----------|--------|
| No regressions | Pipeline complete |
| Regressions AND gc_rounds < 3 | Create fix-verify tasks, increment gc_rounds |
| Regressions AND gc_rounds >= 3 | Accept current state, handleComplete |
## Output Artifacts
| Task | Output Path |
|------|-------------|
| TDSCAN-001 | <session>/scan/scan-report.json |
| TDEVAL-001 | <session>/assessment/debt-assessment.json |
| TDPLAN-001 | <session>/plan/remediation-plan.md |
| TDFIX-001 | <session>/fixes/ (worktree) |
| TDVAL-001 | <session>/validation/validation-report.md |

View File

@@ -0,0 +1,129 @@
{
"team_name": "tech-debt",
"version": "1.0.0",
"description": "技术债务识别与清理团队 - 融合\"债务扫描\"、\"量化评估\"、\"治理规划\"、\"清理执行\"、\"验证回归\"五大能力域,形成扫描→评估→规划→清理→验证的闭环",
"skill_entry": "team-tech-debt",
"invocation": "Skill(skill=\"team-tech-debt\", args=\"--role=coordinator ...\")",
"roles": {
"coordinator": {
"name": "coordinator",
"responsibility": "Orchestration",
"task_prefix": null,
"description": "技术债务治理协调者。编排 pipeline需求澄清 → 模式选择 → 团队创建 → 任务分发 → 监控协调 → 质量门控 → 结果汇报",
"message_types_sent": ["mode_selected", "quality_gate", "task_unblocked", "error", "shutdown"],
"message_types_received": ["scan_complete", "assessment_complete", "plan_ready", "fix_complete", "validation_complete", "regression_found", "error"],
"commands": ["dispatch", "monitor"]
},
"scanner": {
"name": "scanner",
"responsibility": "Orchestration (多维度债务扫描)",
"task_prefix": "TDSCAN",
"description": "技术债务扫描员。多维度扫描代码库:代码债务、架构债务、测试债务、依赖债务、文档债务,生成债务清单",
"message_types_sent": ["scan_complete", "debt_items_found", "error"],
"message_types_received": [],
"commands": ["scan-debt"],
"cli_tools": ["gemini"]
},
"assessor": {
"name": "assessor",
"responsibility": "Read-only analysis (量化评估)",
"task_prefix": "TDEVAL",
"description": "技术债务评估师。量化评估债务项的影响和修复成本,按优先级矩阵排序,生成评估报告",
"message_types_sent": ["assessment_complete", "error"],
"message_types_received": [],
"commands": ["evaluate"],
"cli_tools": ["gemini"]
},
"planner": {
"name": "planner",
"responsibility": "Orchestration (治理规划)",
"task_prefix": "TDPLAN",
"description": "技术债务治理规划师。制定分阶段治理方案:短期速赢、中期系统性治理、长期预防机制",
"message_types_sent": ["plan_ready", "plan_revision", "error"],
"message_types_received": [],
"commands": ["create-plan"],
"cli_tools": ["gemini"]
},
"executor": {
"name": "executor",
"responsibility": "Code generation (债务清理执行)",
"task_prefix": "TDFIX",
"description": "技术债务清理执行者。按优先级执行重构、依赖更新、代码清理、测试补充等治理动作",
"message_types_sent": ["fix_complete", "fix_progress", "error"],
"message_types_received": [],
"commands": ["remediate"],
"cli_tools": [{"tool": "gemini", "mode": "write"}]
},
"validator": {
"name": "validator",
"responsibility": "Validation (清理验证)",
"task_prefix": "TDVAL",
"description": "技术债务清理验证者。验证清理后无回归、质量指标提升、债务确实消除",
"message_types_sent": ["validation_complete", "regression_found", "error"],
"message_types_received": [],
"commands": ["verify"],
"cli_tools": [{"tool": "gemini", "mode": "write"}]
}
},
"pipeline_modes": {
"scan": {
"description": "仅扫描评估,不执行修复(审计模式)",
"stages": ["TDSCAN", "TDEVAL"],
"entry_role": "scanner"
},
"remediate": {
"description": "完整闭环:扫描 → 评估 → 规划 → 修复 → 验证",
"stages": ["TDSCAN", "TDEVAL", "TDPLAN", "TDFIX", "TDVAL"],
"entry_role": "scanner"
},
"targeted": {
"description": "定向修复:用户已知债务项,直接规划执行",
"stages": ["TDPLAN", "TDFIX", "TDVAL"],
"entry_role": "planner"
}
},
"fix_verify_loop": {
"max_iterations": 3,
"trigger": "validation fails or regression found",
"participants": ["executor", "validator"],
"flow": "TDFIX-fix → TDVAL-verify → evaluate"
},
"shared_memory": {
"file": ".msg/meta.json",
"fields": {
"debt_inventory": { "owner": "scanner", "type": "array" },
"assessment_matrix": { "owner": "assessor", "type": "object" },
"remediation_plan": { "owner": "planner", "type": "object" },
"fix_results": { "owner": "executor", "type": "object" },
"validation_results": { "owner": "validator", "type": "object" },
"debt_score_before": { "owner": "assessor", "type": "number" },
"debt_score_after": { "owner": "validator", "type": "number" }
}
},
"collaboration_patterns": [
"CP-1: Linear Pipeline (scan/remediate/targeted mode)",
"CP-2: Review-Fix Cycle (Executor ↔ Validator loop)",
"CP-3: Fan-out (Scanner multi-dimension scan)",
"CP-5: Escalation (Worker → Coordinator → User)",
"CP-6: Incremental Delivery (batch remediation)",
"CP-10: Post-Mortem (debt reduction report)"
],
"debt_dimensions": {
"code": { "name": "代码债务", "tools": ["static-analysis", "complexity-metrics"] },
"architecture": { "name": "架构债务", "tools": ["dependency-graph", "coupling-analysis"] },
"testing": { "name": "测试债务", "tools": ["coverage-analysis", "test-quality"] },
"dependency": { "name": "依赖债务", "tools": ["outdated-check", "vulnerability-scan"] },
"documentation": { "name": "文档债务", "tools": ["doc-coverage", "api-doc-check"] }
},
"session_directory": {
"pattern": ".workflow/.team/TD-{slug}-{date}",
"subdirectories": ["scan", "assessment", "plan", "fixes", "validation"]
}
}