|
| 1 | +--- |
| 2 | +description: Spawn ClawTeam parallel workers for the current development phase |
| 3 | +argument-hint: Optional phase override (foundation, algorithms, advanced, finetune) |
| 4 | +--- |
| 5 | + |
| 6 | +# Spawn Team |
| 7 | + |
| 8 | +Spawn a team of parallel ClawTeam workers, each in an isolated git worktree, to work on independent modules simultaneously. |
| 9 | + |
| 10 | +## Steps |
| 11 | + |
| 12 | +### Step 1: Determine current phase |
| 13 | + |
| 14 | +Run `bash score.sh --quick` and read `.score` to determine the phase. |
| 15 | + |
| 16 | +If user specified a phase ($ARGUMENTS), use that instead. |
| 17 | + |
| 18 | +### Step 2: Spawn workers based on phase |
| 19 | + |
| 20 | +Execute the appropriate clawteam commands: |
| 21 | + |
| 22 | +#### Phase: foundation (score < 0.05) |
| 23 | +Do NOT spawn workers. Tell the user: "Foundation phase should be done with `/develop foundation` (single agent). The project needs CMakeLists.txt, headers, and type definitions before parallel work can begin." |
| 24 | + |
| 25 | +#### Phase: algorithms (score 0.05 ~ 0.30) |
| 26 | +```bash |
| 27 | +clawteam team spawn-team tq-alg -d "TurboQuant core algorithms" |
| 28 | + |
| 29 | +clawteam spawn --team tq-alg --agent-name polar --workspace --repo . \ |
| 30 | + --task "Implement PolarQuant algorithm. Read CLAUDE.md for full context. Read refs/PolarQuant/models/modeling_llama_polar.py lines 135-157 and refs/PolarQuant/models/kernel4group.py lines 14-81 for the algorithm. Create src/core/tq_polar.c with tq_polar_quantize_ref(), tq_polar_dequantize_ref(), tq_polar_attention_ref(). Create tests/test_polar.cpp with Google Test. Run bash score.sh --quick to verify. ONLY modify: src/core/tq_polar.*, tests/test_polar.*" |
| 31 | + |
| 32 | +clawteam spawn --team tq-alg --agent-name qjl --workspace --repo . \ |
| 33 | + --task "Implement QJL algorithm. Read CLAUDE.md for full context. Read refs/QJL/models/llama2_utils_qjl.py lines 7-185 for the algorithm. Create src/core/tq_qjl.c with tq_qjl_init_projection(), tq_qjl_quantize_ref(), tq_qjl_detect_outliers(), tq_qjl_attention_ref(). Create tests/test_qjl.cpp with Google Test. Run bash score.sh --quick to verify. ONLY modify: src/core/tq_qjl.*, tests/test_qjl.*" |
| 34 | + |
| 35 | +clawteam spawn --team tq-alg --agent-name uniform --workspace --repo . \ |
| 36 | + --task "Implement uniform baseline and value quantization. Read CLAUDE.md for full context. Create src/core/tq_uniform.c (min-max 2/4-bit), src/core/tq_value_quant.c (value cache quantization). Create tests/test_uniform.cpp and tests/test_value.cpp. Run bash score.sh --quick to verify. ONLY modify: src/core/tq_uniform.*, src/core/tq_value_quant.*, tests/test_uniform.*, tests/test_value.*" |
| 37 | +``` |
| 38 | + |
| 39 | +#### Phase: advanced (score 0.30 ~ 0.60) |
| 40 | +```bash |
| 41 | +clawteam team spawn-team tq-adv -d "TurboQuant advanced features" |
| 42 | + |
| 43 | +clawteam spawn --team tq-adv --agent-name turbo --workspace --repo . \ |
| 44 | + --task "Implement TurboQuant composite (PolarQuant + QJL). Read CLAUDE.md. Create src/core/tq_turbo.c combining polar stage 1 + qjl residual stage 2. Create tests/test_turbo.cpp. ONLY modify: src/core/tq_turbo.*, tests/test_turbo.*" |
| 45 | + |
| 46 | +clawteam spawn --team tq-adv --agent-name cache --workspace --repo . \ |
| 47 | + --task "Implement paged cache and progressive compression. Read CLAUDE.md. Read refs/vllm/csrc/cache_kernels.cu for patterns. Create src/cache/tq_paged_cache.c and src/cache/tq_progressive.c with tests. ONLY modify: src/cache/**, tests/test_paged_cache.*, tests/test_progressive.*" |
| 48 | + |
| 49 | +clawteam spawn --team tq-adv --agent-name simd --workspace --repo . \ |
| 50 | + --task "Implement NEON and AVX2 optimized kernels. Read CLAUDE.md. Read refs/llama.cpp/ggml/src/ggml-cpu/arch/arm/quants.c for NEON patterns. Create src/backend/cpu/tq_generic.c, tq_neon.c, tq_avx2.c, tq_cpu_dispatch.c. ONLY modify: src/backend/cpu/**" |
| 51 | + |
| 52 | +clawteam spawn --team tq-adv --agent-name bench --workspace --repo . \ |
| 53 | + --task "Create benchmarks and specs. Read CLAUDE.md. Create bench/tq_bench.cpp (output: quantize_throughput=N, attention_throughput=N, compression_ratio=N, simd_speedup=N). Create bench/tq_quality.cpp (output: roundtrip_mse=N, attention_cosine=N, cross_platform=pass/fail). Create spec/tq_format_v1.md and spec/tq_operators_v1.md. ONLY modify: bench/**, spec/**" |
| 54 | +``` |
| 55 | + |
| 56 | +#### Phase: finetune (score > 0.60) |
| 57 | +Do NOT spawn workers. Tell the user: "Fine-tuning phase is best done with `/develop` (single agent) for precision. Focus on the lowest-scoring dimension." |
| 58 | + |
| 59 | +### Step 3: Monitor |
| 60 | + |
| 61 | +Tell the user how to monitor: |
| 62 | +```bash |
| 63 | +clawteam board attach <team-name> # Live tmux view |
| 64 | +clawteam task list <team-name> # Task status |
| 65 | +watch -n 30 bash score.sh --quick # Score tracking |
| 66 | +``` |
| 67 | + |
| 68 | +### Step 4: After workers complete |
| 69 | + |
| 70 | +Tell the user to run the merge gate: |
| 71 | +```bash |
| 72 | +# Wait for completion |
| 73 | +clawteam task wait <team-name> --timeout 1800 |
| 74 | + |
| 75 | +# Then merge each worker's branch one-by-one: |
| 76 | +# git merge clawteam/<team>/<worker> --no-edit |
| 77 | +# bash score.sh --quick |
| 78 | +# If score dropped: git reset --hard HEAD~1 |
| 79 | +``` |
| 80 | + |
| 81 | +Or suggest running `/harness` which automates the merge gate. |
0 commit comments