/rexymcp:escalate <phase>from RexyMCP
Handles escalation decisions when an executor returns hard_fail or budget_exceeded results. Reads briefings, phase docs, and session logs to choose between re-dispatch, session takeover, or resume.
Ships in RexyMCP. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
This skill handles escalation decisions when the executor returns a
hard_fail or budget_exceeded result. Given the briefing, you choose a
lever: refined re-dispatch (default for weak models), session takeover (last
resort), or resume. The decision is judgment-heavy — wrong defaults burn the
architect-executor split.
Before any action:
PhaseResult.briefing. This is
your primary input — it contains one_line, current_blocker,
what_was_tried, and diagnostics.<phase> from the argument) to
understand the original spec, its acceptance criteria, and what the
executor was attempting.<repo>/docs/dev/STANDARDS.md for context on the engineering
contract the executor was held to.executor_log_tail + get_turn MCP tools using the phase's log_path.bugs/ directory that
reference this phase.The repo root is <repo> — resolve it from CLAUDE_PROJECT_DIR, ANTIGRAVITY_PROJECT_DIR, or the
nearest directory containing the milestone layout.
Check PhaseResult.status:
"complete": this is a review, not an escalation. Point the user at
/rexymcp:review <phase> and stop. Escalate is not for clean results."hard_fail" or "budget_exceeded": proceed to §2."cancelled": proceed to §2 — a deliberately-stopped run is the clearest
resume candidate (its partial work is already on disk). See the Resume lever.A hard_fail briefing is a signal: the executor reached the budget, hit a
diagnostic it couldn't resolve, lost track of state, or otherwise stopped
without producing a clean PhaseResult. The escalation question is what
changes so the next attempt succeeds.
On a NoProgressStall, run the project's gates against the partial tree
yourself before picking a lever — build, lint, tests. A stall is usually a
nearly-finished phase: the executor writes most of the work, then loops
re-reading instead of running a gate. The minute of gate-running decides the
lever (if the missing piece is small, resume with the diagnosis; if the
missing piece is the very edit it stalled on, the stall itself is the wall)
and it finds defects nothing else will — the executor stalled before running
any gate, so its partial work is unverified by construction and the briefing
cannot show what's broken in it. Do not treat the stall as evidence the work
is bad; the design is typically right and what's missing is integration.
Three levers, in order of preference:
The local executor is a smaller LLM than you are; it lacks web access; it
cannot ask clarifying questions mid-phase. Most hard_fails trace back to
a spec gap the executor couldn't bridge, not to an executor mistake the
executor should have avoided.
Diagnostic: read the briefing's what_was_tried list and ask "would a
tighter spec have prevented this?" If yes (and most of the time, yes),
refine and re-dispatch.
Common refinements that turn hard_fail into approved_first_try:
WORKFLOW.md "Pin negative cases") — the
executor satisfied the positive examples but tripped the boundary case.WORKFLOW.md "Anticipate cross-boundary trait bounds").WORKFLOW.md "Verify external APIs
against live docs") — the architect's sketch was stale and the executor
lost time trying to make it work.This lever is cheap (one model call) and produces telemetry
(PhaseRun.bounces_to_approval increments by 1). The architect learns; the
executor learns by re-trying with better inputs; the model_scorecard
accumulates a real data point on bug-class-to-fix ratios.
A phase bounced on test quality, coverage, or a standards violation rather
than a broken behavior has four green gates and a clean tree. The executor's
"is there work to do?" heuristic keys off a dirty tree or a red gate, finds
neither, and reports complete with an empty diff — never engaging the bug doc.
This is not a hard_fail path, so it arrives through /rexymcp:review rather
than a briefing, but the lever is the same: refined re-dispatch, always.
The treatment, all four parts load-bearing:
WORKFLOW.md § "Derive every spec fact from its source" — a worked block
citing a symbol that no longer exists is worse than none, because it is
trusted.cargo test must report 633, not 632."Invert the finish condition when the fix should add nothing. A pure correctness or standards fix adds no tests, so state the count that must not change — "647, not 648" makes a rising count the signal for scope creep. "Tests pass" would have been satisfied either way.
Ask the executor to mutation-check its own fix before reporting: break the line the fix touches, confirm the new test fails, revert, and state the result. Then verify that independently at review — a claimed mutation check is not one.
(Folded 2026-07-24 after four occurrences. M30 phase-01 was the uncountered
case: a plain re-dispatch returned complete with an empty diff. M38 phase-01
and phase-02 (twice) applied the treatment and landed in 40, 59 and 32 turns.)
You (Claude) take over and implement the phase directly. Use this when:
Tradeoff: the telemetry gap. When you implement the phase, the
PhaseRun.architect_verdict records escalated instead of an approved_*
from a model — you produce a successful artifact but no model-vs-spec data
point. The model_scorecard is blind to the run. Use sparingly.
When you do take over:
Status: to in-progress (architect takeover) with a
one-line note.Executor: Claude (direct)
and Verdict: escalated.done.Anti-pattern: skipping refined re-dispatch because "this case feels
special." Every hard_fail feels special to the architect reading the
briefing. That's exactly why the discipline matters most when it feels least
convenient. If you find yourself jumping to takeover on the first failure,
slow down: read the briefing's what_was_tried carefully, ask "what
would a tighter spec change?", try the refinement once. The data is what
makes the model scorecard real over time.
Call continue_phase to resume a phase when the failure reads as "we were
most of the way done and hit one specific wall" — a late budget_exceeded, or
a single diagnostic the executor couldn't clear — where the completed work is
worth preserving. The resumed run gets a fresh context seeded with the phase
doc, architect guidance, the current on-disk diff, and restored task states
from the prior session log.
Choose resume over re-dispatch when the spec was fine but the executor just didn't finish (budget, a transient error, one stubborn lint). Re-dispatch is better when the spec was the problem — the resumed context would carry the same gap forward.
Choose resume over takeover when the executor can reach the work but just needs more turns or a hint about what to fix.
A cancelled result is the clearest resume case. When a phase was
deliberately stopped mid-run (rexymcp stop → user_stop, or stop_phase →
claude_stop), its partial work is already on the (dirty) working tree and the
cancellation record says which stage/turns_done it reached. continue_phase
re-enters from that diff with a briefing of what was interrupted — nothing was
lost, so resume (not re-dispatch) is almost always right unless the interrupt was
itself a signal the phase was mis-scoped.
Execution steps:
continue_phase with:
phase_doc_path: the phase doc path (same as the failed run).repo_path: the target repository path.guidance: a distilled string from the briefing — what to fix, what is
already done, what to avoid re-doing.prior_log_path: the failed PhaseResult.log_path, used to restore task
states.PhaseResult like any dispatch result: review on
complete, escalate again on failure.| Failure shape | First-attempt lever |
|---|---|
| Spec gap (missing example, unclear acceptance, missed authorization) | Refined re-dispatch |
| External API drift (architect's sketch was stale) | Refined re-dispatch with verified docs |
| Boundary / negative case the spec didn't pin | Refined re-dispatch with pinned negative |
| Most of the phase done, hit one wall | Resume |
| Repeated same-class failure after one refinement | Session takeover |
| Context-budget exhaustion on a phase that's already minimal | Session takeover (or re-split into two phases) |
| Anything that feels special | Refined re-dispatch — feeling-special is not a lever |
Amend the phase doc's Spec or Pre-flight based on the briefing's
what_was_tried + current_blocker + diagnostics.
Add a Notes for executor block at the top of the Update Log explaining
the refinement:
### Notes for executor — YYYY-MM-DD
<One paragraph: what was refined and why, referencing the briefing's
specific fields.>
Tell the user: "Refinement applied. Re-dispatch via /rexymcp:dispatch <phase>."
Leave the phase's Status: as in-progress (the executor was mid-phase
and is now refining; dispatch accepts both todo and in-progress).
Follow the steps in §2 under "Session takeover — last resort."
Follow the steps in §2 under "Resume — resume from a fresh briefing-seeded context."
Always write an escalation entry to the phase doc's Update Log:
### Update — YYYY-MM-DD HH:MM (escalation)
**Chosen lever:** refined re-dispatch | session takeover | resume (deferred)
**Rationale:** <one sentence: why this lever over the others>
Append this after the <!-- entries appended below this line --> comment.
complete results — those go to /rexymcp:review./rexymcp:dispatch <phase>.STANDARDS.md or WORKFLOW.md without explicit
user approval and a recurring-pattern fold.What SKILL.md sets; muted values are Claude Code's defaults
opusnpx claudepluginhub ryanczak/rexymcp --plugin rexymcp5 skills in this plugin
/architectBootstrap a rexyMCP project, design the work, and author phase docs for the local-LLM executor. Use when the user wants to set up architect/executor workflow on a target repo, draft the next phase, or review milestone progress.
/autoRun the architect/executor loop hands-off across a milestone — draft, dispatch, review, escalate/re-dispatch — with full review rigor and no per-phase pause. Opt-in per run; stops at a milestone boundary, a blocker, assist-budget exhaustion, or the runaway backstop.
/dispatchDispatch a phase to the local-LLM executor via execute_phase. Use after /rexymcp:architect has drafted a phase doc and the user is ready to run it.
/reviewReview a completed phase against STANDARDS.md DoD, rerun the project's commands, and either approve (flip to done) or file a bug.
Other plugins' skills for the same job