Phase 4 of the plan, plus the PLAN_COMPLETE decision and the gitea_forge
cleanup from Phase 5.
THE REVIEW UI
mission_plan and mission_roster have been complete and reachable by curl
since they shipped, with zero frontend. That matters more than a missing
screen usually would: the decide step is not a convenience, it IS the
safety mechanism. Approving a plan replaces the mission's phases; approving
a roster flips it to the composed engine. A gate nobody can reach is a gate
that is always open or always shut.
MissionProposalDrawer, modelled on LevelUpDrawer which already does
load → review → decide. Reached from a mission's SETUP tab. Verified end to
end against the live backend, not just compiled: a model proposed a roster,
approval flipped the mission to `composed`, and approval on a non-draft
mission was refused.
The plan view shows each phase's done_when, and says plainly when one is
absent — a phase without a completion condition is never judged and reports
completed whatever it did, so its absence is the thing worth seeing.
AND THE DEFECT BUILDING IT FOUND
Every refusal path computed a precise reason — "the mission is running, not
a draft", "no node can boot that backend any more" — logged it to stderr,
and returned a bare {"error":"bad request"}. The person who needed the
sentence was the one clicking Approve; they got two words, and the reason
went to a server log they cannot read.
ApiError::Refused(String) carries it now. Same argument ApiError::Unavailable
was added for ("a 500 with 'internal error' sent them looking for a bug that
was not there"), one status code down. Live: the 400 now reads "this mission
is completed — a roster can only be approved while it is a draft, because
approving one rewrites how the mission will run".
PLAN_COMPLETE, decided
The Skill-Use measurement found that int-xx-marker-protocol documents
PLAN_COMPLETE and task_card_parser never implemented it, so an agent
following the skill exactly was silently ignored. Implemented rather than
removed from the skill: the planner needs a way to say it is done
specifying, and agents already emit it.
Marker ids are now strictly INT-<digits>. `starts_with("INT-")` accepted the
range form `INT-01..02` — observed live — which parsed into an id matching
no real item, so a task card appeared for something that did not exist while
the two items it covered stayed open. Rejecting is right: an ignored marker
is visible, a plausible row is not.
GITEA_FORGE, REMOVED
Named in nine places, defined in none. Harmless while provision_claw ignored
the bundle list; once the list was honoured, an undefined name became a
capability an agent is told it has and does not. Removed from seven team
templates, a workflow recipe, the auto-provision path, and a dropdown a user
could pick it from.
A new test asserts every bundle a template names is defined in the runtime
config — and it immediately found `web_fetch` in two templates I had missed
removing by hand. Same shape as the skill-binding test, one layer up.
Agents reach the forge through git over HTTPS with the ambient GITEA_TOKEN,
which is why nothing ever broke.
Full workspace suite green (106 binaries); frontend builds clean.
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", "clawmates_skills"]
|
||
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 = ""
|