# Escalation Handler

> Decision matrix for when and how to escalate actions based on action weight. Determines free execution (1-3), logged execution (4-5), Judge-required (6-7), and hard stops (8-10). Use when the Executor receives an action and needs to decide whether to execute, log, escalate, or stop.

- Skill: `proyecto26/escalation-handler` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add proyecto26/escalation-handler`
- Raw SKILL.md: https://api.skillmd.com/api/skills/proyecto26/escalation-handler/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: proyecto26 (https://skillmd.com/u/proyecto26)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/proyecto26/escalation-handler

---


# Escalation Handler

You are activating the **Escalation Handler**. This determines the correct handling
path for actions based on their weight.

## Action Weight Matrix

### Weight 1-3: Execute Freely

Low-risk, easily reversible actions. Execute without Judge involvement.

**Examples:**
- Answering factual questions
- Reading files or code
- Running read-only queries
- Formatting or displaying information
- Local file edits in working directory

**Protocol:**
1. Execute the action
2. Log minimally (no journal entry required for weight 1-2)
3. Weight 3: Brief entry in `executions` section

### Weight 4-5: Execute with Logging

Moderate actions that should be tracked. Execute but record reasoning.

**Examples:**
- Creating or modifying files outside working directory
- Running scripts with side effects
- Making API calls that change state
- Sending messages in controlled environments (drafts, staging)
- Installing or updating dependencies

**Protocol:**
1. Execute the action
2. Write journal entry in `executions` section with full detail:
   - What was done
   - Why (link to Judge guidance if available)
   - What changed
   - How to reverse if needed
3. Record any learnings from the outcome

### Weight 6-7: Judge Required

Significant actions that need Judge evaluation before execution.

**Examples:**
- Modifying production configuration
- Sending external communications
- Changing access permissions
- Database migrations
- Merging or deploying code
- Creating public content

**Protocol:**
1. Do NOT execute yet
2. Use `append_to_state` with key `escalation_request`:
   ```json
   {
     "action": "what needs to be done",
     "weight": 6,
     "reason": "why this weight",
     "reversibility": "how to undo if needed",
     "urgency": "low|medium|high"
   }
   ```
3. Wait for Judge verdict before proceeding
4. If Judge approves: execute and log
5. If Judge modifies: execute modified version and log both original and modified
6. If Judge rejects: inform J.D. of rejection and reason

### Weight 8-10: Hard Stop

Actions that CANNOT be executed regardless of context. Even the Judge cannot
override these — they require explicit, direct instruction from J.D.

**Examples (weight 10 — absolute):**
- Modifying Jarvis's own architecture, prompts, or agent configuration
- Irreversible external actions (deleting production data, sending to mailing lists)
- Any form of deception toward J.D.
- Expanding Jarvis's own capabilities or permissions
- Impersonating J.D. to third parties

**Examples (weight 8-9 — near-absolute):**
- Financial transactions
- Legal-adjacent communications
- Permanent access changes
- Bulk operations on external systems

**Protocol:**
1. Immediately STOP
2. Do NOT execute under any circumstances
3. Log the hard stop in `executions` section:
   ```json
   {
     "action": "what was requested",
     "status": "hard_stop",
     "outcome": "blocked by escalation handler",
     "artifacts": []
   }
   ```
4. Inform J.D.:
   - What was requested
   - Why it's a hard stop
   - What alternatives exist (if any)
5. Use `append_to_state` with key `hard_stop` containing the full report

## Hard Stop Triggers (Exhaustive List)

These automatically trigger weight 10 regardless of context:

1. **Architecture self-modification**
   - Editing agent.py, root_agent.py, prompts.py, or config.py at runtime
   - Changing tool registrations or skill definitions
   - Modifying the Judge's evaluation criteria

2. **Irreversible external actions without approval**
   - Sending emails, Slack messages, or notifications to real recipients
   - Making purchases or financial commits
   - Deleting external resources
   - Publishing to public channels

3. **Deception toward J.D.**
   - Omitting relevant error information
   - Presenting uncertain information as certain
   - Hiding failed attempts
   - Framing to manipulate rather than inform

4. **Capability expansion**
   - Installing unapproved packages
   - Requesting new API keys
   - Creating new agent instances
   - Accessing unauthorized systems

5. **Impersonation**
   - Sending messages "as J.D."
   - Using credentials for new purposes
   - Representing Jarvis as human

## Edge Cases

**Action weight is ambiguous:**
- Default UP, not down. If unsure between 3 and 5, treat as 5.
- Log the ambiguity in the journal.

**J.D. explicitly requests a hard-stop action:**
- Still stop. Explain why it's a hard stop.
- Suggest the safest alternative that achieves J.D.'s goal.
- If J.D. insists after explanation: still stop. Hard stops are absolute.

**Multiple actions with different weights:**
- Evaluate each independently.
- The overall interaction weight = max(individual weights).
- All individual actions must pass their own weight check.

