55 of 85 role skill bindings pointed at skills that were never authored,
so 10 of 11 team templates bound a smaller context bundle than their role
prompts assumed. Three roles bound nothing at all (gpu.bench_engineer,
threejs.shader_author, threejs.perf_engineer) while their prompts described
procedures they had no way to read.
The loader comment at team_template_loader.rs:167 already diagnosed this —
snake_case slugs in TOML against kebab-case skill files — and it was
half-fixed: the kebab names were corrected, the snake_case ones left.
It was invisible because both existing tests assert authored ⊆ referenced
(30/30, green) and the second explicitly declines to check the other
direction. So the failing half was the half nobody asserted.
Resolved every name by one of three explicit choices:
- 23 skills authored where the role genuinely needed the procedure
(gpu, threejs, research, analysis, frontend, mobile, backend, platform)
- renames onto authored skills where one existed in substance, including
the four-near-duplicate cases that collapse onto one real skill
- 22 aspirational references deleted — a binding an agent cannot read is
a promise, not a capability
Two tests now hold it. The unit test checks referenced ⊆ authored against
the files. The new integration test runs both loaders in boot order and
asserts the bindings survive the trip through the database, which is a
different question: resolution goes through skills_catalog rows, so a skill
file that exists but fails to ingest still leaves the role empty.
Negative controls: the unit test failed naming all 55; the integration test
fails naming the exact role when one name is reverted.
threejs.shader_author and .perf_engineer gained a second and third skill
after the collapse — pin_in_context pins idx < 2, so a role left with one
skill silently pins less than the policy intends.
Co-Authored-By: Claude Opus 5 <[email protected]>
86 lines
3.0 KiB
TOML
86 lines
3.0 KiB
TOML
key = "gpu"
|
||
name = "GPU Programming"
|
||
description = "CUDA, Metal, ROCm from Rust — low-level GPU application development, kernel authoring, memory hierarchy tuning."
|
||
stack = ["rust", "cuda", "metal", "rocm", "gpu"]
|
||
default_topology = "pipeline"
|
||
risk_profile = "coding_readwrite"
|
||
mcp_bundles = ["clawmates_door", "gitea_forge"]
|
||
version = 1
|
||
|
||
[[roles]]
|
||
slot = "arch_analyst"
|
||
order_idx = 0
|
||
skills = ["decompose-int-items", "gpu-coalescing-and-occupancy", "roofline-model"]
|
||
system_prompt = """
|
||
You are the ARCHITECTURE ANALYST of a GPU team.
|
||
|
||
For each INT item: identify the target architectures (SM_XX, Metal
|
||
version, GCN/RDNA gen), the compute-vs-memory-bound profile via a
|
||
rough roofline estimate, and the memory hierarchy strategy (shared,
|
||
constant, texture, unified). Hand off with target occupancy + tile
|
||
shape recommendations.
|
||
"""
|
||
brain_seed = """
|
||
# GPU arch seed
|
||
- CUDA: prefer warp-level primitives (shfl_sync) over shared mem when
|
||
data fits.
|
||
- Metal: threadgroup memory is 32KB on Apple7+; plan tiles around it.
|
||
- ROCm: LDS is 64KB; wavefront is 64 threads (vs CUDA's 32).
|
||
- Always check bandwidth-bound vs compute-bound BEFORE optimizing.
|
||
"""
|
||
|
||
[[roles]]
|
||
slot = "kernel_author"
|
||
order_idx = 1
|
||
skills = ["gpu-kernel-authoring", "workspace-repo-commit-protocol"]
|
||
system_prompt = """
|
||
You are the KERNEL AUTHOR of a GPU team.
|
||
|
||
Author the actual kernel(s) in the appropriate DSL (CUDA C++, MSL,
|
||
HIP), plus the Rust FFI wrapper. Coalesced global loads, no bank
|
||
conflicts in shared/threadgroup memory, no divergent branches on hot
|
||
paths. Prove each of those in a comment.
|
||
"""
|
||
brain_seed = """
|
||
# Kernel seed
|
||
- Coalescing rule: consecutive threads read consecutive 32/64/128-bit
|
||
words. Violating it = 10× slowdown.
|
||
- Occupancy > 50% for memory-bound kernels; can drop to 25% for
|
||
compute-bound with high ILP.
|
||
"""
|
||
|
||
[[roles]]
|
||
slot = "bench_engineer"
|
||
order_idx = 2
|
||
skills = ["gpu-profiling-workflow", "criterion-benchmarking"]
|
||
system_prompt = """
|
||
You are the BENCH ENGINEER of a GPU team.
|
||
|
||
Run Nsight Compute / Xcode GPU Frame Capture / rocprof on the target
|
||
kernel. Report: achieved bandwidth vs peak, achieved GFLOPS vs peak,
|
||
occupancy, and the ONE bottleneck to attack next.
|
||
"""
|
||
brain_seed = ""
|
||
|
||
[[roles]]
|
||
slot = "coder"
|
||
order_idx = 3
|
||
skills = ["write-rust-current-edition", "cargo-test-driven-development", "workspace-repo-commit-protocol", "int-xx-marker-protocol"]
|
||
system_prompt = """
|
||
You are the RUST-SIDE CODER. Integrate the kernel + FFI into the Rust
|
||
library, add safe wrappers, and expose ergonomic APIs. Own the
|
||
error-conversion path from GPU-side status codes to Rust `Result`s.
|
||
"""
|
||
brain_seed = ""
|
||
|
||
[[roles]]
|
||
slot = "committer"
|
||
order_idx = 4
|
||
skills = ["workspace-repo-commit-protocol", "small-focused-commits"]
|
||
system_prompt = """
|
||
You are the COMMITTER. Only run when the kernel meets the roofline
|
||
target OR a specific reason to defer is documented.
|
||
Emit COMPLETED: INT-<NN>.
|
||
"""
|
||
brain_seed = ""
|