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,65 @@
# Pipeline Definitions — Team Performance Optimization
## Pipeline Modes
### Single Mode (Linear with Review-Fix Cycle)
```
Stage 1 Stage 2 Stage 3 Stage 4
PROFILE-001 --> STRATEGY-001 --> IMPL-001 --> BENCH-001
[profiler] [strategist] [optimizer] [benchmarker]
^ |
+<--FIX-001---->+
| REVIEW-001
+<--------> [reviewer]
(max 3 iterations)
```
### Fan-out Mode (Shared stages 1-2, parallel branches 3-4)
```
Stage 1 Stage 2 CP-2.5 Stage 3+4 (per branch)
PROFILE-001 --> STRATEGY-001 --+-> IMPL-B01 --> BENCH-B01 + REVIEW-B01 (fix cycle)
+-> IMPL-B02 --> BENCH-B02 + REVIEW-B02 (fix cycle)
+-> IMPL-B0N --> BENCH-B0N + REVIEW-B0N (fix cycle)
|
AGGREGATE -> Phase 5
```
### Independent Mode (M fully independent pipelines)
```
Pipeline A: PROFILE-A01 --> STRATEGY-A01 --> IMPL-A01 --> BENCH-A01 + REVIEW-A01
Pipeline B: PROFILE-B01 --> STRATEGY-B01 --> IMPL-B01 --> BENCH-B01 + REVIEW-B01
|
AGGREGATE -> Phase 5
```
## Task Metadata Registry (Single Mode)
| Task ID | Role | Phase | Dependencies | Description |
|---------|------|-------|-------------|-------------|
| PROFILE-001 | profiler | Stage 1 | (none) | Profile application, identify bottlenecks |
| STRATEGY-001 | strategist | Stage 2 | PROFILE-001 | Design optimization plan from bottleneck report |
| IMPL-001 | optimizer | Stage 3 | STRATEGY-001 | Implement highest-priority optimizations |
| BENCH-001 | benchmarker | Stage 4 | IMPL-001 | Run benchmarks, compare vs baseline |
| REVIEW-001 | reviewer | Stage 4 | IMPL-001 | Review optimization code for correctness |
| FIX-001 | optimizer | Stage 3 (cycle) | REVIEW-001 or BENCH-001 | Fix issues found in review/benchmark |
## Checkpoints
| Checkpoint | Trigger | Behavior |
|------------|---------|----------|
| CP-1 | PROFILE-001 complete | User reviews bottleneck report, can refine scope |
| CP-2 | STRATEGY-001 complete | User reviews optimization plan, can adjust priorities |
| CP-2.5 | STRATEGY-001 complete (auto/fan-out) | Auto-create N branch tasks, spawn all IMPL-B* in parallel |
| CP-3 | REVIEW/BENCH fail | Auto-create FIX task for that branch only (max 3x per branch) |
| CP-4 | All tasks/branches complete | Aggregate results, interactive completion action |
## Task Naming Rules
| Mode | Stage 3 | Stage 4 | Fix | Retry |
|------|---------|---------|-----|-------|
| Single | IMPL-001 | BENCH-001, REVIEW-001 | FIX-001 | BENCH-001-R1, REVIEW-001-R1 |
| Fan-out | IMPL-B01 | BENCH-B01, REVIEW-B01 | FIX-B01-1 | BENCH-B01-R1, REVIEW-B01-R1 |
| Independent | IMPL-A01 | BENCH-A01, REVIEW-A01 | FIX-A01-1 | BENCH-A01-R1, REVIEW-A01-R1 |

View File

@@ -0,0 +1,246 @@
{
"version": "5.0.0",
"team_name": "perf-opt",
"team_display_name": "Performance Optimization",
"skill_name": "team-perf-opt",
"skill_path": "~ or <project>/.claude/skills/team-perf-opt/",
"worker_agent": "team-worker",
"pipeline_type": "Linear with Review-Fix Cycle (Parallel-Capable)",
"completion_action": "interactive",
"has_inline_discuss": true,
"has_shared_explore": true,
"has_checkpoint_feedback": true,
"has_session_resume": true,
"roles": [
{
"name": "coordinator",
"type": "orchestrator",
"description": "Orchestrates performance optimization pipeline, manages task chains, handles review-fix cycles",
"spec_path": "roles/coordinator/role.md",
"tools": ["Task", "TaskCreate", "TaskList", "TaskGet", "TaskUpdate", "TeamCreate", "TeamDelete", "SendMessage", "AskUserQuestion", "Read", "Write", "Bash", "Glob", "Grep"]
},
{
"name": "profiler",
"type": "orchestration",
"description": "Profiles application performance, identifies CPU/memory/IO/network/rendering bottlenecks",
"role_spec": "roles/profiler/role.md",
"inner_loop": false,
"frontmatter": {
"prefix": "PROFILE",
"inner_loop": false,
"additional_prefixes": [],
"discuss_rounds": [],
"delegates_to": [],
"message_types": {
"success": "profile_complete",
"error": "error"
}
},
"weight": 1,
"tools": ["Read", "Bash", "Glob", "Grep", "Task", "mcp__ace-tool__search_context"]
},
{
"name": "strategist",
"type": "orchestration",
"description": "Analyzes bottleneck reports, designs prioritized optimization plans with concrete strategies",
"role_spec": "roles/strategist/role.md",
"inner_loop": false,
"frontmatter": {
"prefix": "STRATEGY",
"inner_loop": false,
"additional_prefixes": [],
"discuss_rounds": ["DISCUSS-OPT"],
"delegates_to": [],
"message_types": {
"success": "strategy_complete",
"error": "error"
}
},
"weight": 2,
"tools": ["Read", "Bash", "Glob", "Grep", "Task", "mcp__ace-tool__search_context"]
},
{
"name": "optimizer",
"type": "code_generation",
"description": "Implements optimization changes following the strategy plan",
"role_spec": "roles/optimizer/role.md",
"inner_loop": true,
"frontmatter": {
"prefix": "IMPL",
"inner_loop": true,
"additional_prefixes": ["FIX"],
"discuss_rounds": [],
"delegates_to": [],
"message_types": {
"success": "impl_complete",
"error": "error",
"fix": "fix_required"
}
},
"weight": 3,
"tools": ["Read", "Write", "Edit", "Bash", "Glob", "Grep", "Task", "mcp__ace-tool__search_context"]
},
{
"name": "benchmarker",
"type": "validation",
"description": "Runs benchmarks, compares before/after metrics, validates performance improvements",
"role_spec": "roles/benchmarker/role.md",
"inner_loop": false,
"frontmatter": {
"prefix": "BENCH",
"inner_loop": false,
"additional_prefixes": [],
"discuss_rounds": [],
"delegates_to": [],
"message_types": {
"success": "bench_complete",
"error": "error",
"fix": "fix_required"
}
},
"weight": 4,
"tools": ["Read", "Bash", "Glob", "Grep", "Task"]
},
{
"name": "reviewer",
"type": "read_only_analysis",
"description": "Reviews optimization code for correctness, side effects, and regression risks",
"role_spec": "roles/reviewer/role.md",
"inner_loop": false,
"frontmatter": {
"prefix": "REVIEW",
"inner_loop": false,
"additional_prefixes": ["QUALITY"],
"discuss_rounds": ["DISCUSS-REVIEW"],
"delegates_to": [],
"message_types": {
"success": "review_complete",
"error": "error",
"fix": "fix_required"
}
},
"weight": 4,
"tools": ["Read", "Bash", "Glob", "Grep", "Task", "mcp__ace-tool__search_context"]
}
],
"parallel_config": {
"modes": ["single", "fan-out", "independent", "auto"],
"default_mode": "auto",
"max_branches": 5,
"auto_mode_rules": {
"single": "optimization_count <= 2",
"fan-out": "optimization_count >= 3"
}
},
"pipeline": {
"stages": [
{
"stage": 1,
"name": "Performance Profiling",
"roles": ["profiler"],
"blockedBy": [],
"fast_advance": true
},
{
"stage": 2,
"name": "Optimization Strategy",
"roles": ["strategist"],
"blockedBy": ["PROFILE"],
"fast_advance": true
},
{
"stage": 3,
"name": "Code Optimization",
"roles": ["optimizer"],
"blockedBy": ["STRATEGY"],
"fast_advance": false
},
{
"stage": 4,
"name": "Benchmark & Review",
"roles": ["benchmarker", "reviewer"],
"blockedBy": ["IMPL"],
"fast_advance": false,
"parallel": true,
"review_fix_cycle": {
"trigger": "REVIEW or BENCH finds issues",
"target_stage": 3,
"max_iterations": 3
}
}
],
"parallel_pipelines": {
"fan-out": {
"shared_stages": [1, 2],
"branch_stages": [3, 4],
"branch_prefix": "B",
"review_fix_cycle": {
"scope": "per_branch",
"max_iterations": 3
}
},
"independent": {
"pipeline_prefix_chars": "ABCDEFGHIJ",
"review_fix_cycle": {
"scope": "per_pipeline",
"max_iterations": 3
}
}
},
"diagram": "See pipeline-diagram section"
},
"shared_resources": [
{
"name": "Performance Baseline",
"path": "<session>/artifacts/baseline-metrics.json",
"usage": "Before-optimization metrics for comparison",
"scope": "shared (fan-out) / per-pipeline (independent)"
},
{
"name": "Bottleneck Report",
"path": "<session>/artifacts/bottleneck-report.md",
"usage": "Profiler output consumed by strategist",
"scope": "shared (fan-out) / per-pipeline (independent)"
},
{
"name": "Optimization Plan",
"path": "<session>/artifacts/optimization-plan.md",
"usage": "Strategist output consumed by optimizer",
"scope": "shared (fan-out) / per-pipeline (independent)"
},
{
"name": "Benchmark Results",
"path": "<session>/artifacts/benchmark-results.json",
"usage": "Benchmarker output consumed by reviewer",
"scope": "per-branch (fan-out) / per-pipeline (independent)"
}
],
"shared_memory_namespacing": {
"single": {
"profiler": "profiler",
"strategist": "strategist",
"optimizer": "optimizer",
"benchmarker": "benchmarker",
"reviewer": "reviewer"
},
"fan-out": {
"profiler": "profiler",
"strategist": "strategist",
"optimizer": "optimizer.B{NN}",
"benchmarker": "benchmarker.B{NN}",
"reviewer": "reviewer.B{NN}"
},
"independent": {
"profiler": "profiler.{P}",
"strategist": "strategist.{P}",
"optimizer": "optimizer.{P}",
"benchmarker": "benchmarker.{P}",
"reviewer": "reviewer.{P}"
}
}
}