AgentStack
SKILL verified MIT Self-run

Loop Pipeline Router

skill-anthonyalcaraz-agentic-graph-rag-skills-loop-pipeline-router · by AnthonyAlcaraz

|

No reviews yet
0 installs
3 views
0.0% view→install

Install

$ agentstack add skill-anthonyalcaraz-agentic-graph-rag-skills-loop-pipeline-router

✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

Are you the author of Loop Pipeline Router? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Loop Pipeline Router

Overview

Loop pipelines introduce feedback for self-correction when perfect first-attempt reasoning is unrealistic. The decision that makes a loop a loop is the conditional edge after the validate node. Naively this is "valid -> proceed, else -> retry" (Example 5-6), but production needs the nuance of Example 5-9: distinguish correctable errors (refine) from fundamental ones (stop), and handle the retries-exhausted case (fall back to an alternative strategy) so the loop neither terminates prematurely nor spins forever.

The unified decision table:

valid                            -> proceed
correctable + retries remaining  -> refine (retry_count += 1, loop back)
correctable + retries exhausted  -> fallback_strategy
fundamental                      -> terminate_with_partial

The finite retry budget (Example 5-6's retry_count proceed; correctable+budget->refine(+1); correctable+exhausted->fallback; fundamental->terminate | | 2 | attempt_fn, validate_fn, max_retries, fallback_fn | lib.runloop(...)` | dict (decision, candidate, iterations, trace) | loop always terminates; iterations proceed; fundamental -> terminatewith_partial

  • correctable with budget -> refine and increments retry_count
  • correctable with budget exhausted -> fallback_strategy
  • invalid-with-no-error -> terminatewithpartial
  • run_loop terminates and never exceeds max_retries iterations
  • a candidate that becomes valid after N refines yields proceed at N
  1. Verify CLI help. Exits 0 and prints the SKILL.md description.

Security Posture

  • Prompt injection. Validation results and error diagnostics are untrusted

input (often produced by an LLM validator over untrusted content). The router only maps them onto a fixed decision table; a spoofed severity can bias routing - mislabeling "fundamental" as "correctable" burns retries, the reverse suppresses recovery - but nothing is executed.

  • Data exfiltration. No network calls, no file writes. Candidates and

error details pass through in-process; the routing trace goes to stdout and the caller owns downstream piping.

  • Privilege escalation. No shell invocation, no eval. The bounded retry

budget is also a resource-abuse guard: an adversary who can keep validation failing cannot force an infinite loop, and the fallback path must not carry more privilege than the primary path.

Source Attribution

Distilled from Agentic GraphRAG (O'Reilly, by Anthony Alcaraz and Sam Julien) Ch5 — Reasoning & Planning: "Loop Pipeline: Iterative Refinement" (Example 5-6, check_plan_validity) and "Error-handling strategies" (Example 5-9, route_after_validation). The bounded-loop / recursion_limit guarantee is from Example 5-6.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet — be the first.

Versions

  • v0.1.0 Imported from the upstream source.