iterative-retrieval

Structures sub-agent spawning with a 3-cycle protocol, WHY context, and coordinator validation.

Updated Jun 2, 2026
One-click install
npx skills add https://github.com/codebytes/btt --skill iterative-retrieval-codebytes
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: iterative-retrieval
Source: https://github.com/codebytes/btt/tree/main/.squad/templates/skills/iterative-retrieval
Command: npx skills add https://github.com/codebytes/btt --skill iterative-retrieval-codebytes

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Sub-agent handoffs often become vague, retry cycles multiply without bound, and outputs land without being checked. This Skill caps delegation cycles at 3, mandates WHY context in every spawn prompt, and requires coordinator validation before any issue is closed. ## Core Features & Use Cases - Spawn Prompt Template: A four-section template (Task, WHY, Success criteria, Escalation path) that every agent spawn must include. - 3-Cycle Protocol: A defined retry ladder with objective context carried forward between cycles and mandatory escalation after cycle 3. - Coordinator Validation & Dedup: A pre-acceptance checklist plus a mandatory GitHub issue dedup search before creating new issues. - Use Case: A coordinator agent delegating a charter update to a sub-agent uses the template to define acceptance criteria, validates the returned PR against the checklist, and escalates to .squad/decisions/inbox/ if three cycles fail to converge. ## Quick Start Use the iterative-retrieval protocol to spawn a sub-agent for this task with WHY context, explicit success criteria, and a 3-cycle limit.

Frequently Asked Questions about iterative-retrieval

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure a prompt when spawning a sub-agent?

Use the four-section spawn template: Task (concrete and bounded), WHY this matters (motivation and context), Success criteria (explicit checkbox acceptance criteria), and Escalation path (what to do when stuck). Vague prompts without WHY context are an anti-pattern.

How many retry cycles should a sub-agent get before escalating?

The protocol caps retries at 3 cycles. Cycle 1 is the initial attempt, cycle 2 is a targeted retry with specific corrections, and cycle 3 is a final attempt with all prior context. After cycle 3, escalate to a decision inbox instead of spawning cycle 4.

How do I avoid creating duplicate GitHub issues with agents?

Run gh issue list --search with 2-3 representative keywords from the planned issue title before creating any issue. If an open issue already covers the problem, comment on it instead of creating a new one.

When should a coordinator retry versus escalate a failed agent task?

Retry when output is structurally correct but missing specific items or the agent misunderstood scope. Escalate when requirements are fundamentally unclear, 3 cycles complete without convergence, results conflict across cycles, or the work depends on unresolved blockers.

What should a coordinator check before accepting sub-agent output?

Validate that all success criteria are met, the PR exists and matches the issue, no regressions or new TODO/FIXME markers appear, no task parts were silently skipped, and any reported uncertainty was resolved or escalated.