| name | dcg |
| user-invocable | false |
| skill_api_version | 1 |
| hexagonal_role | supporting |
| consumes | [] |
| produces | [] |
| context_rel | [] |
| metadata | {"dependencies":[],"capabilities":["dcg"],"effects":["write_dcg_config"],"canonical_status":"canonical","disposition":"keep_specialist","tier":"execution"} |
| description | Handle blocked destructive commands and configure agent safety guardrails. Triggers: "dcg", "handle a DCG block", "configure agent safety guardrails". |
| practices | ["pragmatic-programmer"] |
| output_contract | the blocked command, matched rule, surviving risk, and validated safe alternative; config writes only when explicitly requested |
DCG: When You Get Blocked
Core Insight: Blocks are checkpoints, not errors. A safe alternative almost always exists. Find it before mentioning override.
Constraints
- Never request, generate, or run an allow-once bypass because only the human may authorize and execute the exact blocked command.
- Preserve the user's intended outcome with the narrowest reversible alternative because the guard protects state, not merely command spelling.
- Explain the matched rule and surviving risk before asking for judgment; never retry, obfuscate, or route around a DCG block.
Quick Navigation
THE EXACT WORKFLOW
When blocked, follow this sequence every time:
1. Run `dcg explain "cmd"` → Understand why (see trace)
2. Check Safe Alternatives table → Use if exists (DON'T mention override)
3. No alternative? → Explain risk clearly, let human decide
4. Human approves? → THEY run: dcg allow-once CODE
Never: Ask for override first. Never retry silently. Never circumvent.
Risk-tiered approval counts
When no safe alternative exists and the human must decide, the number of
distinct human approvals scales with what the command can destroy:
| Tier | Blast radius | Approvals required |
|---|
| Recoverable | undoable via reflog/stash/trash/backup | 1 allow-once for this exact command |
| Destructive-local | permanently deletes local, uncommitted, or unbacked state | 1 allow-once, granted only after you name the exact state lost and confirm no backup exists |
| Destructive-shared |