feat(skills): add iterative-retrieval skill -- max-3-cycle agent spawn protocol#622
Conversation
chore: promote dev to main (docs dark mode fix)
… protocol Structured protocol for sub-agent spawning: - Mandates WHY context in every spawn prompt - Caps cycles at 3 before escalation - Coordinator validation checklist before accepting output - Issue dedup check to prevent duplicate GitHub issues - Research-then-execute mandate (no pure analysis reports) Battle-tested across 6+ months of production multi-agent orchestration. Zero breaking changes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
🔍 Squad Team ReviewReviewed by: Procedures (Prompt Architect) — Pass 3 of consensus ceremony Review SummaryThis PR introduces iterative-retrieval patterns for skills, enabling multi-step information gathering workflows. Process NotePer our team's documented proposal-first policy (.squad/decisions.md): "Meaningful changes require a proposal in docs/proposals/ before execution." This is a feature-class change that needs a proposal document before merge. What's Needed
Thank you for the contribution! The implementation looks solid — we just need the process alignment. 🙏 ⏸️ Action: HOLD — awaiting proposal + retarget to dev |
bradygaster
left a comment
There was a problem hiding this comment.
FIDO Quality Review — PR #622: iterative-retrieval skill
Verdict:
Blocking Issue
❌ Wrong package names in changeset: The .changeset/iterative-retrieval-skill.md uses squad-cli and squad-sdk instead of @bradygaster/squad-cli and @bradygaster/squad-sdk. This will cause changeset resolution to fail.
Fix: Change the changeset frontmatter to:
\\yaml
"@bradygaster/squad-cli": minor
"@bradygaster/squad-sdk": minor
\\
Non-Blocking Notes
- Target branch: Targets
main— considerdevfor consistency with #625. - Frontmatter deviations: Has
license: MIT(not in template), missingsourcefield. Minor. - Content quality: Strong. The 3-cycle protocol, spawn prompt template, coordinator validation checklist, and issue dedup check are all well-thought-out. The good/bad spawn prompt examples are particularly useful.
- File paths: Correct —
packages/squad-cli/templates/skills/andpackages/squad-sdk/templates/skills/.
Fix the changeset package names and this is merge-ready.
|
Fixed per FIDO review: corrected changeset package names from squad-cli/squad-sdk to @bradygaster/squad-cli/@bradygaster/squad-sdk. Also retargeting to dev branch. |
|
Thank you for this work, Tamir! 🚀 To get this PR ready for team review and merge, we need two quick adjustments:
Once those are in place, the team will take another look and we can get this merged! Thanks for your continued contributions to Squad 👍 |
9a98215 to
511b0f5
Compare
|
Fixed per FIDO review: corrected changeset package names from |
|
Addressed both review items: (1) Fixed changeset package names to @bradygaster/squad-cli and @bradygaster/squad-sdk. (2) Added docs/proposals/iterative-retrieval.md proposal document. PR already retargeted to dev. |
There was a problem hiding this comment.
Pull request overview
Adds a new “iterative-retrieval” skill that standardizes coordinator → sub-agent handoffs with required WHY context, a max-3-cycle loop cap, and coordinator validation steps, plus accompanying proposal doc and version bumps via changesets.
Changes:
- Add the
iterative-retrievalskill template to both CLI and SDK template bundles. - Add a written proposal describing the protocol and its intended fit with Squad.
- Add a changeset to publish the new skill in both packages.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| packages/squad-sdk/templates/skills/iterative-retrieval/SKILL.md | New skill documentation shipped with the SDK templates. |
| packages/squad-cli/templates/skills/iterative-retrieval/SKILL.md | New skill documentation shipped with the CLI templates. |
| docs/proposals/iterative-retrieval.md | Proposal doc describing the protocol and rationale. |
| .changeset/iterative-retrieval-skill.md | Changeset to bump CLI/SDK for the new skill addition. |
| description: "Max-3-cycle protocol for agent sub-tasks with WHY context and coordinator validation. Use when spawning sub-agents to complete scoped work." | ||
| domain: "agent-coordination" | ||
| confidence: "high" | ||
| license: MIT |
There was a problem hiding this comment.
Skill frontmatter deviates from the repo’s documented skill schema (see .squad/skill.md), which expects fields like source and does not mention license. To keep parsing/conventions consistent, add a source: entry (and optional tools: if relevant) and avoid introducing nonstandard keys unless they’re used elsewhere.
| license: MIT | |
| source: "packages/squad-sdk/templates/skills/iterative-retrieval" |
| Example: | ||
| - [ ] File X exists and contains Y | ||
| - [ ] No regressions in existing tests | ||
| - [ ] PR is open targeting main with description matching the issue |
There was a problem hiding this comment.
The success-criteria example says the PR should target main, but this repo’s contributing process uses --base dev (CONTRIBUTING.md). Consider changing this to dev or wording it generically as “default branch” so the template matches the project’s workflow.
| - [ ] PR is open targeting main with description matching the issue | |
| - [ ] PR is open targeting the project's default branch with description matching the issue |
| description: "Max-3-cycle protocol for agent sub-tasks with WHY context and coordinator validation. Use when spawning sub-agents to complete scoped work." | ||
| domain: "agent-coordination" | ||
| confidence: "high" | ||
| license: MIT |
There was a problem hiding this comment.
Skill frontmatter deviates from the repo’s documented skill schema (see .squad/skill.md), which expects fields like source and does not mention license. To keep parsing/conventions consistent, add a source: entry (and optional tools: if relevant) and avoid introducing nonstandard keys unless they’re used elsewhere.
| license: MIT | |
| source: "templates/skills/iterative-retrieval" |
| Example: | ||
| - [ ] File X exists and contains Y | ||
| - [ ] No regressions in existing tests | ||
| - [ ] PR is open targeting main with description matching the issue |
There was a problem hiding this comment.
The success-criteria example says the PR should target main, but this repo’s contributing process uses --base dev (CONTRIBUTING.md). Consider changing this to dev or wording it generically as “default branch” so the template matches the project’s workflow.
| - [ ] PR is open targeting main with description matching the issue | |
| - [ ] PR is open targeting dev with description matching the issue |
|
|
||
| | Risk | Likelihood | Impact | Mitigation | | ||
| |------|-----------|--------|------------| | ||
| | 3-cycle limit is too restrictive for complex tasks | Low | Medium | Skill explicitly allows coordinator to extend with justification | |
There was a problem hiding this comment.
The Risks/Mitigations table says the skill “explicitly allows coordinator to extend with justification,” but the skill text states “no cycle 4.” Please align these (either document the extension mechanism in the skill, or update this mitigation to reflect a strict cap).
| | 3-cycle limit is too restrictive for complex tasks | Low | Medium | Skill explicitly allows coordinator to extend with justification | | |
| | 3-cycle limit is too restrictive for complex tasks | Low | Medium | Strict 3-cycle cap; coordinator must escalate or stop at cycle 3 (no extension) | |
| "@bradygaster/squad-cli": minor | ||
| "@bradygaster/squad-sdk": minor | ||
| --- | ||
| feat: add iterative-retrieval skill for structured max-3-cycle agent spawning No newline at end of file |
There was a problem hiding this comment.
Most changesets in this repo use an imperative sentence without a feat: prefix (e.g. .changeset/cross-squad-orchestration.md). Consider dropping the feat: prefix here so the generated changelog stays consistent.
| feat: add iterative-retrieval skill for structured max-3-cycle agent spawning | |
| add iterative-retrieval skill for structured max-3-cycle agent spawning |
Summary
Adds the \iterative-retrieval\ skill — a structured protocol for coordinator → sub-agent handoffs that prevents unbounded cycles and silent failures.
Battle-tested in a 13-agent production deployment across 6 months of daily multi-agent orchestration.
What it does
Design
Zero breaking changes.