kubefleet-dev/kubefleet/iterative-retrieval
- community
Checking that the SKILL.md file is still in the repository.
Max-3-cycle protocol for agent sub-tasks with WHY context and coordinator validation. Use when spawning sub-agents to complete scoped work.
Install
npx vskill@latest install kubefleet-dev/kubefleet/iterative-retrievalSKILL.md
The same SKILL.md was published earlier as dmauser/azure-virtualwan/iterative-retrieval.
Iterative Retrieval Skill
Squad agents frequently spawn sub-agents to complete scoped work. Without structure, these handoffs become vague, cycles multiply, and outputs land without being checked. The Iterative Retrieval Pattern caps cycles at 3, mandates WHY context in every spawn, and requires the coordinator to validate agent output before closing an issue.
Spawn Prompt Template
Every agent spawn must include the following four sections. Copy and fill in the template:
3-Cycle Protocol
| Cycle | Description | Exit condition | |
|---|---|---|---|
| 1 | Initial attempt | Done → coordinator validates. Incomplete → surface delta. | |
| 2 | Targeted retry with specific corrections | Done → coordinator validates. Incomplete → one more. | |
| 3 | Final attempt with all context from cycles 1–2 | Done or escalate — no cycle 4. |
Rules
- After each cycle, the coordinator evaluates the output against the success criteria
before accepting it or spawning the next cycle.
- Objective context forward: each subsequent spawn includes a summary of what was tried
and what is still missing — not just a repeat of the original task.
- Cycle 3 exhausted → escalate: write a summary to
.squad/decisions/inbox/, label the
issue status:needs-decision, and notify the user.
Coordinator Validation Checklist
Before accepting agent output and closing an issue, the coordinator must check:
- [ ] All success criteria from the spawn prompt are met
- [ ] PR exists and description matches the issue (if code work)
- [ ] No obvious regressions (grep for TODO/FIXME introduced, build passes)
- [ ] Agent did not silently skip parts of the task
- [ ] If the agent reported uncertainty — was it resolved or escalated?
If any item fails → do not accept. Spawn cycle N+1 (up to cycle 3) with specific deltas.
When to Escalate vs Retry
Retry (cycle N+1) when:
- Output is structurally correct but missing specific items
- Agent misunderstood scope (provide more context and re-run)
- Partial success — clearly identified remaining delta
Escalate when:
- Requirements are fundamentally unclear (decision needed)
- 3 cycles complete without convergence
- Agent returned conflicting results across cycles
- Task requires elevated permissions or external action
- The work depends on another issue that isn't done yet
Issue Dedup Check (Mandatory)
Before any agent creates a GitHub issue, it must search for existing open issues to avoid duplicates.
- If an open issue already covers the same problem → comment on it instead of creating a new one.
- If no duplicate → proceed to create the issue.
- Use 2–3 representative keywords from the planned issue title as the search query.
Mandatory Output Requirement (Research-Then-Execute)
Every research or analysis task completed under this protocol MUST end with at least one concrete action before the cycle is closed. Acceptable follow-up actions:
- GitHub issue created documenting the findings and next steps
- PR opened implementing a recommendation
- Decision recorded in
.squad/decisions/inbox/ - Documented recommendation with a named assignee and due date
Pure analysis reports without actionable follow-up will be rejected during triage. If no action is warranted, the agent must explicitly state why and get coordinator sign-off.
Anti-Patterns
- Spawning without WHY — agents can't prioritise trade-offs without motivation context.
- Accepting output without validating — one failed check avoids merging broken work.
- Cycle 4+ — if 3 cycles haven't converged, the problem is in the requirements, not the agent.
- Vague success criteria — "looks good" is not a criterion. Use checkboxes.
- Forwarding WHAT without delta — cycle 2+ prompts must include what cycle 1 got wrong.
- Creating issues without dedup check — always search before creating.
- Research without action — delivering analysis with no issue, PR, decision, or assignee is incomplete work.
Examples
Good spawn prompt
Bad spawn prompt (don't do this)
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryChecking.squad/templates/skills/iterative-retrieval/SKILL.md
Popularity
- Repository stars
- 151
- Repository forks
- 27
- 7-day trend score
- 25
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/kubefleet-dev/kubefleet/iterative-retrieval)