chore: delete dead scaffolding and stop fabricating claw capability cards

Tier 0 of the prompt-ablation pass -- subtraction only, none of this
reached a model.

- cm-brain: drop ClawBrain::export_markdown (zero callers).
- workflows: drop the `task_preamble` keys. No Rust code ever read them --
  WorkflowPhase.config is an opaque serde_json::Value -- so the comment
  calling the preamble "the belt, the skill the suspenders" described a belt
  that was never implemented. (`commit_policy` is unread for the same reason;
  left in place as documentation pending a decision.)
- mcp_door: derive the unknown-tool error from EXPOSED_TOOLS. The literal had
  drifted to naming one of the three tools the door exposes.
- Dashboard.tsx: drop TEAM_TEMPLATES/COMPANY_TEMPLATES, defined and never
  referenced, and disconnected from the real templates/teams/*.toml.

The substantive one: GET /api/claws/{id}/compartments returned hardcoded
strings for tools/capabilities/safety, identical for every claw. Every card
read "Network: none" and "Shell . blocked" regardless of the claw's real
risk_profile -- which is the actual capability boundary, so the card was
most wrong exactly where it mattered, on a coding_readwrite claw that does
have shell. Now derived from the claw's effective risk_profile (its team's
setting, else the same role-derived default the provisioner applies), with
the allowlists mirroring [risk_profiles.*] in the runtime config.

Note: cm-topology/src/heuristics.rs was slated for deletion here as unused.
It is not -- routes/topology.rs:43 serves it and p0_endpoints.rs:302 asserts
it. Left alone.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
This commit is contained in:
Omar Sobh
2026-07-30 10:44:33 -07:00
co-authored by Claude Opus 5
parent c573480955
commit 285d0c82f2
7 changed files with 136 additions and 62 deletions
+11 -1
View File
@@ -468,7 +468,17 @@ pub async fn mcp(
return tool_result(
req.id,
true,
format!("unknown tool {mcp_name:?} (this door exposes: email_send)"),
// Derived from EXPOSED_TOOLS rather than hand-written: the
// literal list here had already drifted to name only one of
// the three tools the door actually exposes.
format!(
"unknown tool {mcp_name:?} (this door exposes: {})",
EXPOSED_TOOLS
.iter()
.map(|(m, _)| *m)
.collect::<Vec<_>>()
.join(", ")
),
);
};