Skip to content

dvy1987/agent-loom / .agents/skills/dynamic-routing

dynamic-routing

Verified

Select alternative execution paths when a plan step fails — branch on outcomes instead of blind retry. Load when a structured plan step fails, an unexpected observation arrives, or the user asks what to try next after an error. Also triggers on "try another approach", "route around this failure", "replan on failure", "if X fails try Y", or outcome-based branching during multi-step work. Pairs with structured-planning and debug-and-fix. Does not replace root-cause debugging — adds plan-level path selection.

FileKindSize
SKILL.mdskill md4.9 KB
references/ROUTE-PATTERNS.mdmarkdown1.6 KB
references/examples.mdmarkdown2.5 KB

references/ROUTE-PATTERNS.md

View on GitHub
# Route Patterns

Outcome-based branching for failed or divergent plan steps. DyFlow + GAP + NaviAgent synthesis.

---

## Alternate tool

**When:** Same goal, current tool/path blocked.

**Action:** Insert step `Sx.a` with different tool or API. Example: WebFetch 404 → Shell curl with corrected raw URL.

**Delta:** `failed → revised`; add `Sx.1` pending.

---

## Decompose

**When:** Step failed because scope too large or precondition unmet.

**Action:** Replace `Sx` with `Sx.1`, `Sx.2`, … smaller steps. Mark original `revised`.

**Example:** "Run full test suite" fails at env setup → Sx.1 install deps, Sx.2 run targeted tests.

---

## Rollback + revise

**When:** A **done** step's assumption was wrong (observation downstream contradicts it).

**Action:**
1. Mark conflicting done step `revised` in delta log (do not delete history).
2. Insert fix step before current failure.
3. Re-run from fix step.

**Example:** S1 assumed API v1 — S3 discovers v2 only → insert S1.1 migrate client.

---

## Abort

**When:** Goal infeasible (missing credentials, out-of-scope, user constraint).

**Action:** Mark remaining `pending` steps `aborted` in delta log. Escalate user with evidence.

---

## Debug handoff

**When:** `Layer: code` and hypothesis points to defect in existing codebase.

**Action:** Pause plan. Invoke `debug-and-fix`. On fix verified, resume plan at failed step with updated precondition.

---

## Transient retry (narrow exception)

**When:** Rate limit, network timeout, lock contention — **transient only**.

**Action:** Max **one** retry with backoff. Delta log must say `transient retry`. Not valid for logic errors.
finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 322kUpdated Claude CodeCodexVerifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 322kUpdated Claude CodeCodexVerifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 322kUpdated Claude CodeCodexVerifiedInstall
skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.Stars: 198kUpdated Claude CodeCodexVerifiedInstall