agentleFS
QuirkybrainQuirkybrain/claude-code-swe-framework/.claude/skills/failure-escalation/SKILL.md

failure-escalation

Skill1 starsChanged 53 days agoMITView on GitHub

Stop repeated local patching and move unresolved failure to root-cause review, higher-level analysis, or stage rollback. Use after repeated failed repair attempts, cross-layer evidence, exhausted diagnosis budget, or widening regressions.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run when the same failure persists after a bounded repair cycle, patches create new failures, diagnosis remains UNKNOWN, or evidence points …

    line 14
  2. Distinctive:

    Stop further local edits and preserve the failing workspace/evidence.

    line 25
  3. Distinctive:

    Do not repeat an attempt without new evidence or a falsifiable hypothesis.

    line 43
  4. Distinctive:

    No safe rollback point exists.

    line 57
  5. Very specific:

    Use Clarification Gate for product/risk/rollback authority.

    line 64
  6. Distinctive:

    Stop when local patching is halted and a bounded higher-level action is assigned, or when the work is explicitly blocked awaiting …

    line 68

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Failure Escalation

Purpose

Break unproductive repair loops and return the problem to the lowest higher layer capable of correcting its cause safely.

Trigger

Run when the same failure persists after a bounded repair cycle, patches create new failures, diagnosis remains UNKNOWN, or evidence points above the current implementation layer.

Inputs

  • Failure/RCA records, attempt history, diffs, test/build evidence, and current revision.
  • Classified or suspected responsible layers and confidence.
  • Current Stage, Minimum Necessary Path, Workflow Level, Checkpoint, and rollback points.
  • Affected Artifacts, Components, Contracts, assumptions, decisions, and risks.

Prerequisites

  • Stop further local edits and preserve the failing workspace/evidence.
  • Distinguish a genuinely new failure from recurrence of the same cause.

Procedure

  1. Declare STOP_LOCAL_PATCHING and record the escalation trigger.
  2. Summarize attempted repairs, outcomes, and why another local patch is unjustified.
  3. Review or refresh Root Cause Analysis across Requirement, Architecture, Detailed Design, Contract, Interface, Data, Implementation, Test, and Environment.
  4. Identify the earliest responsible layer with enough evidence to act.
  5. Determine whether to rework locally with a new bounded hypothesis, transfer to a specialist, or roll back Stage/Artifact decisions.
  6. Select a safe rollback/checkpoint or preserve current state for comparison.
  7. Mark affected Artifacts STALE/UNVERIFIED and Components UNVERIFIED/FAILED.
  8. Define higher-level analysis, clarification, repair owner, revalidation, and exit criteria.
  9. Reassess Workflow Level and risk.
  10. Recompute the Minimum Necessary Path after the escalation decision.

Decision Rules

  • Do not repeat an attempt without new evidence or a falsifiable hypothesis.
  • Roll back only far enough to reach the responsible decision layer.
  • Requirement/product rollback requires user authority; architecture rollback requires an explicit decision/ADR update.
  • Preserve history; do not erase failed evidence or pretend the previous Gate passed.
  • A changed repair layer invalidates downstream evidence based on the old decision.

Outputs

  • Escalation Record and STOP_LOCAL_PATCHING status.
  • Higher-level owner/layer, rollback decision/point, and rationale.
  • State invalidations, risk/workflow reassessment, revalidation scope, and recomputed path trigger.

Failure Cases

  • No safe rollback point exists.
  • Evidence cannot distinguish layers.
  • Required decision owner is unavailable.
  • Rollback/destructive action lacks authorization.

Escalation

Use Clarification Gate for product/risk/rollback authority. Use Architecture Decision for structural rollback. Pause the affected path when evidence or authority is unavailable rather than continuing speculative edits.

Stop Conditions

Stop when local patching is halted and a bounded higher-level action is assigned, or when the work is explicitly blocked awaiting evidence/authority. Do not perform the repair inside this Skill.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.