pub fn render_artifact(agent: AgentId, capability: Capability) -> StringExpand description
Compose the full file contents for agent: per-agent frontmatter (if any)
followed by the managed-section delimiters wrapping BODY, plus a
trailing newline.
Centralizes the wrapping logic so every install path produces byte-stable, deterministic output (no timestamps, no host-specific strings).
ยงPanics
Panics with unreachable! if called for AgentId::Copilot. Callers MUST
gate on has_artifact_writer first; reaching this branch is a logic bug.