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
-22
View File
@@ -294,28 +294,6 @@ impl ClawBrain {
.count()
}
/// Render identity + skills as Markdown (for ZeroClaw workspace hydration).
pub fn export_markdown(&self) -> String {
let mut s = String::new();
if let Some(sp) = self.system_prompt() {
s.push_str("# System Prompt\n\n");
s.push_str(&sp);
s.push_str("\n\n");
}
if let Some(p) = self.personality() {
s.push_str("# Personality\n\n");
s.push_str(&p);
s.push_str("\n\n");
}
let skills = self.skills();
if !skills.is_empty() {
s.push_str("# Skills\n\n");
for (name, body) in skills {
s.push_str(&format!("## {name}\n\n{body}\n\n"));
}
}
s
}
}
/// Split a `skills_md` doc into `(name, body)` by its `## <name>` headings.