Skill — Human-in-the-Loop Design (Escalation & Supervision Architecture)
When this skill activates
When designing agent autonomy boundaries, building escalation gates, calibrating
confidence thresholds, or implementing approval workflows. Use for any system where
an AI agent must decide between acting autonomously and requesting human guidance.
Core principle: Maximum VALUE, not maximum autonomy — the goal is not to minimize
human involvement. The goal is to maximize the value delivered. Sometimes the highest-value
action is asking the human. The art is knowing WHEN.
Mandatory actions when this skill is active
Action Classification (Reversibility x Impact Matrix)
Classify every agent action:
| Impact \ Reversibility | Easily Reversible | Hard to Reverse | Irreversible |
|------------------------|------------------------|------------------------|------------------------|
| Low Impact | AUTONOMOUS | AUTONOMOUS | CONFIRM |
| Medium Impact | AUTONOMOUS | CONFIRM | APPROVE |
| High Impact | CONFIRM | APPROVE | APPROVE + WAIT |
Levels:
- AUTONOMOUS: Agent acts without asking (log for audit)
- CONFIRM: Agent acts but shows what it did (user can undo)
- APPROVE: Agent proposes, human approves before execution
- APPROVE + WAIT: Agent proposes, human approves, agent waits for explicit "go"
Per-action classification examples:
AUTONOMOUS (act freely):
- Reading files
- Running read-only queries
- Searching codebases
- Generating suggestions (not applying them)
CONFIRM (act, show, allow undo):
- Editing existing files
- Creating new files in expected locations
- Running tests
- Installing dev dependencies
APPROVE (propose, wait for yes):
- Deleting files
- Modifying configuration
- Running destructive commands
- Changing auth/security code
- Making API calls with side effects
APPROVE + WAIT (high ceremony):
- Deploying to production
- Modifying database schema
- Changing payment logic
- Force-pushing to shared branches
- Deleting user data
Escalation Triggers
When to escalate (confidence-based):
Always escalate when:
- Confidence < 0.7 on the correct approach
- Action is irreversible AND high-impact
- Multiple valid approaches exist with no clear winner
- Task contradicts prior user guidance
- Security-sensitive code is being modified
- User's intent is ambiguous
Escalation format:
"I need your input on [X].
Context: [what I understand about the situation]
Options: [A, B, C with tradeoffs]
My recommendation: [preferred option + why]
What I'm uncertain about: [specific uncertainty]"
Rules:
- ALWAYS explain WHY you're escalating (don't just say "I'm not sure")
- ALWAYS provide a recommendation (even when uncertain)
- ALWAYS state what additional context would resolve the uncertainty
- Never escalate without having done research first (don't be lazy)
Approval Gate Design
Designing low-friction approval UX:
Principles:
- Fast: approval should take <5 seconds for clear cases
- Informative: show WHAT will happen, not just ask "ok?"
- Defaulted: suggest the likely answer (approve/reject)
- Skippable: allow bulk-approve for repetitive low-risk items
- Auditable: log every approval decision with timestamp and rationale
Good approval request:
"I'd like to add an index on users.email (migration file ready).
This will lock the table for ~2 seconds during deploy.
[Approve] [Reject] [Show migration SQL first]"
Bad approval request:
"Can I make a database change?"
Rules:
- Show the EFFECT of the action, not just the action itself
- Provide enough context to decide without further research
- Offer a way to see more detail (for cautious reviewers)
- Default to the safe option (reject) for high-impact actions
- Time-box approvals: if no response in X hours, remind or escalate
Confidence Calibration
Ensuring confidence scores are meaningful:
Calibration goal:
When the agent says "I'm 90% confident" → it should be correct 90% of the time
When the agent says "I'm 50% confident" → it should be correct 50% of the time
Measuring calibration:
- Collect (confidence, actual_outcome) pairs from eval runs
- Plot calibration curve (expected accuracy vs actual accuracy)
- Perfect calibration = diagonal line
- Overconfident = curve below diagonal (says 90%, is right 70%)
- Underconfident = curve above diagonal (says 50%, is right 80%)
Fixing miscalibration:
- Overconfident: lower confidence thresholds (escalate more)
- Underconfident: raise thresholds (escalate less, trust yourself)
- Recalibrate after major model/prompt changes
Rules:
- Calibrate quarterly (or after any major agent change)
- If overconfident: the agent is making unescalated mistakes → tighten boundaries
- If underconfident: the agent is annoying users with unnecessary escalations → loosen
- Track calibration as a first-class metric (alongside accuracy)
Explanation Quality
- How to explain escalations effectively:
Explanation structure:
1. WHAT: what you're asking about (specific, concrete)
2. WHY: why you can't decide autonomously (the uncertainty)
3. OPTIONS: what the choices are (with tradeoffs)
4. RECOMMENDATION: what you'd do if forced to decide
5. CONTEXT_GAP: what information would let you decide next time
Good explanation:
"I found two approaches to implement caching (Redis vs in-memory).
Redis is more robust but adds infrastructure cost.
In-memory is simpler but won't survive restarts.
I'd lean toward Redis for production, but I don't know your infra budget.
If you tell me the acceptable monthly cost, I can decide this autonomously next time."
Bad explanation:
"Should I use Redis or in-memory caching?"
Trust Building (Progressive Autonomy)
- Earning autonomy over time:
Trust levels:
Level 1 — New agent (restrictive):
- APPROVE for any write operation
- CONFIRM for most read operations
- Escalation rate: high (~30% of actions)
Level 2 — Established (standard):
- AUTONOMOUS for reads and standard writes
- CONFIRM for destructive operations
- APPROVE for irreversible high-impact actions
- Escalation rate: moderate (~10%)
Level 3 — Trusted (permissive):
- AUTONOMOUS for most operations
- CONFIRM for irreversible actions
- APPROVE only for production deploys and security changes
- Escalation rate: low (~3%)
Level transitions:
- Promote: 20 consecutive successful autonomous actions without user correction
- Demote: 1 autonomous action that user explicitly reverses or flags as wrong
- Demotion is faster than promotion (trust is earned slowly, lost quickly)
Monitoring Escalation Health
Tracking escalation quality:
Metrics to monitor:
- Escalation rate: % of actions that require human input
- False escalation rate: % of escalations where human says "just do it"
- Missed escalation rate: % of autonomous actions that were wrong
- Approval latency: time between escalation and human response
- Rubber-stamp rate: % of approvals decided in <2 seconds (too fast = not reading)
Healthy ranges:
- Escalation rate: 5-15% (too low = risky, too high = annoying)
- False escalation rate: <20% (too high = boundaries too tight)
- Missed escalation rate: <2% (too high = boundaries too loose)
- Rubber-stamp rate: <30% (too high = approval fatigue, redesign needed)
Rules:
- If rubber-stamp rate is high: reduce approval friction or widen autonomy
- If missed escalation rate is high: tighten boundaries immediately
- Review escalation metrics weekly (don't let them drift)
- Treat high rubber-stamp rate as a UX bug (users are being annoyed, not helped)
Self-check before task completion
Before marking a task done when this skill was active:
1---2name: human-in-the-loop-design3description: Skill — Human-in-the-Loop Design (Escalation & Supervision Architecture)4---56# Skill — Human-in-the-Loop Design (Escalation & Supervision Architecture)78## When this skill activates9When designing agent autonomy boundaries, building escalation gates, calibrating10confidence thresholds, or implementing approval workflows. Use for any system where11an AI agent must decide between acting autonomously and requesting human guidance.1213Core principle: **Maximum VALUE, not maximum autonomy** — the goal is not to minimize14human involvement. The goal is to maximize the value delivered. Sometimes the highest-value15action is asking the human. The art is knowing WHEN.1617## Mandatory actions when this skill is active1819### Action Classification (Reversibility x Impact Matrix)20211. **Classify every agent action:**22 ```23 | Impact \ Reversibility | Easily Reversible | Hard to Reverse | Irreversible |24 |------------------------|------------------------|------------------------|------------------------|25 | Low Impact | AUTONOMOUS | AUTONOMOUS | CONFIRM |26 | Medium Impact | AUTONOMOUS | CONFIRM | APPROVE |27 | High Impact | CONFIRM | APPROVE | APPROVE + WAIT |2829 Levels:30 - AUTONOMOUS: Agent acts without asking (log for audit)31 - CONFIRM: Agent acts but shows what it did (user can undo)32 - APPROVE: Agent proposes, human approves before execution33 - APPROVE + WAIT: Agent proposes, human approves, agent waits for explicit "go"34 ```35362. **Per-action classification examples:**37 ```38 AUTONOMOUS (act freely):39 - Reading files40 - Running read-only queries41 - Searching codebases42 - Generating suggestions (not applying them)4344 CONFIRM (act, show, allow undo):45 - Editing existing files46 - Creating new files in expected locations47 - Running tests48 - Installing dev dependencies4950 APPROVE (propose, wait for yes):51 - Deleting files52 - Modifying configuration53 - Running destructive commands54 - Changing auth/security code55 - Making API calls with side effects5657 APPROVE + WAIT (high ceremony):58 - Deploying to production59 - Modifying database schema60 - Changing payment logic61 - Force-pushing to shared branches62 - Deleting user data63 ```6465### Escalation Triggers66673. **When to escalate (confidence-based):**68 ```69 Always escalate when:70 - Confidence < 0.7 on the correct approach71 - Action is irreversible AND high-impact72 - Multiple valid approaches exist with no clear winner73 - Task contradicts prior user guidance74 - Security-sensitive code is being modified75 - User's intent is ambiguous7677 Escalation format:78 "I need your input on [X].79 Context: [what I understand about the situation]80 Options: [A, B, C with tradeoffs]81 My recommendation: [preferred option + why]82 What I'm uncertain about: [specific uncertainty]"83 ```8485 Rules:86 - ALWAYS explain WHY you're escalating (don't just say "I'm not sure")87 - ALWAYS provide a recommendation (even when uncertain)88 - ALWAYS state what additional context would resolve the uncertainty89 - Never escalate without having done research first (don't be lazy)9091### Approval Gate Design92934. **Designing low-friction approval UX:**94 ```95 Principles:96 - Fast: approval should take <5 seconds for clear cases97 - Informative: show WHAT will happen, not just ask "ok?"98 - Defaulted: suggest the likely answer (approve/reject)99 - Skippable: allow bulk-approve for repetitive low-risk items100 - Auditable: log every approval decision with timestamp and rationale101102 Good approval request:103 "I'd like to add an index on users.email (migration file ready).104 This will lock the table for ~2 seconds during deploy.105 [Approve] [Reject] [Show migration SQL first]"106107 Bad approval request:108 "Can I make a database change?"109 ```110111 Rules:112 - Show the EFFECT of the action, not just the action itself113 - Provide enough context to decide without further research114 - Offer a way to see more detail (for cautious reviewers)115 - Default to the safe option (reject) for high-impact actions116 - Time-box approvals: if no response in X hours, remind or escalate117118### Confidence Calibration1191205. **Ensuring confidence scores are meaningful:**121 ```122 Calibration goal:123 When the agent says "I'm 90% confident" → it should be correct 90% of the time124 When the agent says "I'm 50% confident" → it should be correct 50% of the time125126 Measuring calibration:127 - Collect (confidence, actual_outcome) pairs from eval runs128 - Plot calibration curve (expected accuracy vs actual accuracy)129 - Perfect calibration = diagonal line130 - Overconfident = curve below diagonal (says 90%, is right 70%)131 - Underconfident = curve above diagonal (says 50%, is right 80%)132133 Fixing miscalibration:134 - Overconfident: lower confidence thresholds (escalate more)135 - Underconfident: raise thresholds (escalate less, trust yourself)136 - Recalibrate after major model/prompt changes137 ```138139 Rules:140 - Calibrate quarterly (or after any major agent change)141 - If overconfident: the agent is making unescalated mistakes → tighten boundaries142 - If underconfident: the agent is annoying users with unnecessary escalations → loosen143 - Track calibration as a first-class metric (alongside accuracy)144145### Explanation Quality1461476. **How to explain escalations effectively:**148 ```149 Explanation structure:150 1. WHAT: what you're asking about (specific, concrete)151 2. WHY: why you can't decide autonomously (the uncertainty)152 3. OPTIONS: what the choices are (with tradeoffs)153 4. RECOMMENDATION: what you'd do if forced to decide154 5. CONTEXT_GAP: what information would let you decide next time155156 Good explanation:157 "I found two approaches to implement caching (Redis vs in-memory).158 Redis is more robust but adds infrastructure cost.159 In-memory is simpler but won't survive restarts.160 I'd lean toward Redis for production, but I don't know your infra budget.161 If you tell me the acceptable monthly cost, I can decide this autonomously next time."162163 Bad explanation:164 "Should I use Redis or in-memory caching?"165 ```166167### Trust Building (Progressive Autonomy)1681697. **Earning autonomy over time:**170 ```171 Trust levels:172 Level 1 — New agent (restrictive):173 - APPROVE for any write operation174 - CONFIRM for most read operations175 - Escalation rate: high (~30% of actions)176177 Level 2 — Established (standard):178 - AUTONOMOUS for reads and standard writes179 - CONFIRM for destructive operations180 - APPROVE for irreversible high-impact actions181 - Escalation rate: moderate (~10%)182183 Level 3 — Trusted (permissive):184 - AUTONOMOUS for most operations185 - CONFIRM for irreversible actions186 - APPROVE only for production deploys and security changes187 - Escalation rate: low (~3%)188189 Level transitions:190 - Promote: 20 consecutive successful autonomous actions without user correction191 - Demote: 1 autonomous action that user explicitly reverses or flags as wrong192 - Demotion is faster than promotion (trust is earned slowly, lost quickly)193 ```194195### Monitoring Escalation Health1961978. **Tracking escalation quality:**198 ```199 Metrics to monitor:200 - Escalation rate: % of actions that require human input201 - False escalation rate: % of escalations where human says "just do it"202 - Missed escalation rate: % of autonomous actions that were wrong203 - Approval latency: time between escalation and human response204 - Rubber-stamp rate: % of approvals decided in <2 seconds (too fast = not reading)205206 Healthy ranges:207 - Escalation rate: 5-15% (too low = risky, too high = annoying)208 - False escalation rate: <20% (too high = boundaries too tight)209 - Missed escalation rate: <2% (too high = boundaries too loose)210 - Rubber-stamp rate: <30% (too high = approval fatigue, redesign needed)211 ```212213 Rules:214 - If rubber-stamp rate is high: reduce approval friction or widen autonomy215 - If missed escalation rate is high: tighten boundaries immediately216 - Review escalation metrics weekly (don't let them drift)217 - Treat high rubber-stamp rate as a UX bug (users are being annoyed, not helped)218219## Self-check before task completion220221Before marking a task done when this skill was active:222223- [ ] Are actions classified by reversibility x impact (autonomous/confirm/approve)?224- [ ] Do escalation triggers include: low confidence, irreversible actions, ambiguity?225- [ ] Is the approval UX low-friction (fast, informative, defaulted)?226- [ ] Are explanations structured (what, why, options, recommendation, context gap)?227- [ ] Is progressive autonomy designed (trust levels with promotion/demotion)?228- [ ] Are escalation health metrics defined (false escalation rate, rubber-stamp rate)?229- [ ] Is confidence calibration measured (says 90% → right 90%)?230- [ ] Does the guardrails-and-safety skill co-activate for safety-critical boundaries?