本文へ移動
cccskills
無料GitHub で公開

dynamic-routing

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.

インストール方法を見る

含まれるファイル(3)

  • SKILL.md4.9 KB
  • references/examples.md2.5 KB
  • references/ROUTE-PATTERNS.md1.6 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Dynamic Routing

When a step fails or observation ≠ expected, you reflect, branch, and revise the plan — never blind-retry the same action. Output is an updated plan delta + chosen alternate path.

Hard Rules

Ground reflection in step evidence — cite tool output, error message, or test failure. Blind retry of the identical action is forbidden unless the reflection identifies a transient cause (network, rate limit) with a documented backoff. Every route decision appends to the plan's Plan delta log in .agent-loom/plans/<task-id>.md. Prefer path recombination (insert/replace remaining steps) over full replan when <50% of steps remain. If failure is a bug in existing code, route to debug-and-fix before resuming the plan.


Workflow

Step 1 — Capture failure context

From the failed step: step_id, expected vs actual, error text, layer (tool/env/code/plan).

Step 2 — Structured reflection (3 lines max)

Hypothesis: [cause grounded in evidence]
Layer: [plan | tooling | code | environment]
Actionability: [plan revision | debug-and-fix | escalate user]

Step 3 — Select route

Read references/ROUTE-PATTERNS.md. Pick one:

RouteWhen
Alternate toolSame goal, different tool/path
DecomposeStep too large — split into Sx.1, Sx.2
Rollback + revisePrior step assumption wrong — mark prior revised, insert fix step
Escalate model tierExecuting model tripped a model-selection tripwire (same test failed 2x, 3 attempts at one fix, unscoped design question) — announce the tier switch; the HUMAN changes models (advisory, per model-selection)
AbortGoal infeasible with current constraints — mark aborted, stop
Debug handoffRoot cause unclear — debug-and-fix, resume plan after fix

Step 4 — Update plan

  1. Mark failed step failed or revised.
  2. Insert/replace pending steps.
  3. Append delta log row.
  4. Run structured-planning lint via plan_lint.py.

Step 5 — Resume

Return control to structured-planning at the new first pending step.


Gotchas

  • Retrying without changing inputs is not routing — it's a loop.
  • Full replan discards useful done steps — patch the remainder.
  • Environment flakes need explicit transient tag + max 1 retry with backoff.
  • Tier escalation is advisory: announce switch to [tier/model] and WAIT — never assume the harness can switch models itself. Tier escalation (who executes) and path revision (what to do) are separate decisions; they can combine.

Output Format

## Dynamic route — [task_id] / [step_id]

Reflection:
- Hypothesis: [...]
- Layer: [...]

Route chosen: [alternate tool | decompose | rollback+revise | abort | debug handoff]

Plan delta:
| at | step_id | from | to | reason |
|----|---------|------|-----|--------|
| [...] |

Resume at: **Sx** | Handoff: debug-and-fix | Aborted

Examples

Teaser: S2 migration fails (table exists) → route decompose → S2.1 check schema, S2.2 apply delta only.

Full pairs: references/examples.md


Common Rationalizations

ExcuseReality
"Retry might work"Same inputs → same failure. Change the path.
"Replan from scratch is faster"Loses done-step evidence and trace links.
"Error is obvious"Write the hypothesis anyway — audit trail.
"Skip delta log"Next agent won't know why the plan changed.
"Debug later"If layer=code, debug now before continuing plan.

Verification

  • Reflection cites step evidence
  • Plan delta log updated
  • No identical blind retry
  • plan_lint.py passes after revision

Red Flags

  • Same action repeated after failure
  • Plan revised without delta log entry
  • Code bug worked around in plan without debug-and-fix

Prune Log

Last pruned: 2026-07-08

  • Added Escalate-model-tier route wired to model-selection tripwires (agent-loom upgrade Phase 2)

Impact Report

Route: [task_id]/[step_id] | Decision: [route type] | Resume: [step or handoff]

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Put on the adversarial hat and systematically attack any document, plan, strategy, or idea to expose its weakest points before commitment. Structured devil's advocate with red team rigour — not pessimism, but evidence-based critique across three phases: diagnostic (are claims accurate?), creative (is the problem artificially constrained?), challenge (are solutions robust?). Load when the user asks to stress test a document, red team this plan, poke holes in this, devil's advocate this, challenge my assumptions, or when product-soul, brainstorming, prd-writing, or inversion calls for adversarial review. Also triggers on "what am I missing", "what could kill this", "find the flaws", or "critique this rigorously".

日本語の概要は準備中です。原文の説明を表示しています。

dvy1987/agent-loom32026年8月8日 更新

Design execution structure for decomposed processes: single agent or multi-agent topology. Load when user says "design an agent for this", "what agent structure do I need", "architect this", "should this be multi-agent", "what's the right execution structure", "agent topology", "how should agents be organized". Takes process-decomposer output as primary input. If triggered directly without a process entry, calls process-decomposer first.

日本語の概要は準備中です。原文の説明を表示しています。

dvy1987/agent-loom32026年8月8日 更新

Internal skill. Called by setup-evaluation after a PASS. Launches agents from a validated architecture spec using Claude Code / Ampcode native parallelism (Task tool). Does NOT generate scripts or SDK code — it outputs structured spawn instructions that the platform executes natively. Never invoked directly by the user. Never launches without a setup-evaluation PASS.

日本語の概要は準備中です。原文の説明を表示しています。

dvy1987/agent-loom32026年8月8日 更新

Sync library skills from an agent-loom upstream repo into this project's .agents/skills while preserving project-local and forked skills. Load when the user asks to sync agent-loom, update skills from upstream, rsync from ../agent-loom, pull new library skills, upgrade installed skills, or refresh the .agents folder without losing custom project skills. Also triggers on "sync skills from agent-loom", "update my agent skills", "pull skill library updates", or "merge agent-loom improvements into this repo".

日本語の概要は準備中です。原文の説明を表示しています。

dvy1987/agent-loom32026年8月8日 更新

Instrument a shipped product's AI agents with tracing and observability so you can see what they did, why outputs happened, and what each run cost. Plain-language primer plus free-tier-first backend selection (Langfuse, Phoenix, LangSmith, Braintrust) and OpenTelemetry/OpenInference instrumentation. Load when the user asks to add observability, add tracing, instrument my agents, see what my agent is doing in production, set up Langfuse or Phoenix or LangSmith, debug why my agent gave a bad answer, or track LLM cost per request. Also fires when agent-system-architecture or setup-evaluation requires an observability plan for an agent-chain product. NOT for tracing the coding agent itself — that is run-trace. Precondition for runtime-learning-loop.

日本語の概要は準備中です。原文の説明を表示しています。

dvy1987/agent-loom32026年8月8日 更新

Run a structured retrospective after development-phase runs of your product's agents — interview the owner in plain language about what went well and poorly, draft ranked improvement hypotheses, then design and run small n=1/n=2 experiments with pre-declared success criteria, guardrails, stop conditions, and a cost/ROI kill-switch. Load when the user says how did that run go, retro this run, the agent output was bad, what should we improve, draft hypotheses, run a small experiment, or after repeated dev runs of an agentic system produce uneven quality. Priority: output quality over performance over cost, each with diminishing-returns stops. NOT a product A/B test (experimentation), NOT coding-agent harness repair (harness-evolution), NOT production-scale learning (runtime-learning-loop).

日本語の概要は準備中です。原文の説明を表示しています。

dvy1987/agent-loom32026年8月8日 更新

dvy1987 のスキルをすべて見る

このスキルの問題を報告する