[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6X1102A2T910VY25Q0MMF3M":3,"skill-same:01M6X1102A2T910VY25Q0MMF3M":73},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":43,"linkOnly":44,"markdownContent":45,"markdownBody":46,"frontMatter":47,"refName":49,"commitSha":50,"skillDirectory":51,"forksCount":52,"repositoryHtmlUrl":53,"repositoryHomepageUrl":54,"ownerHtmlUrl":55,"ownerBlogUrl":56,"ownerDescription":57,"updatedAt":58,"install":59,"resources":72},"01M6X1102A2T910VY25Q0MMF3M","iterative-retrieval",null,"Max-3-cycle protocol for agent sub-tasks with WHY context and coordinator validation. Use when spawning sub-agents to complete scoped work.","github\u002Fsquad","github","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F9919?v=4","01M6AC83DS133TPXFSP1DHNCC6","GitHub","01M6X0MZ6B0WYMMDPK3Q61KER6",3391,"MIT","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fsquad\u002Fblob\u002Fdev\u002F.squad-templates\u002Fskills\u002Fiterative-retrieval\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42],"retrieval","iterative retrieval","max","when","scoped","for","high","with","coordinator","complete","cycle","use","context","work","coordination","why","protocol","validation","tasks","2026-11-10 10:12:30",false,"---\nname: \"iterative-retrieval\"\ndescription: \"Max-3-cycle protocol for agent sub-tasks with WHY context and coordinator validation. Use when spawning sub-agents to complete scoped work.\"\ndomain: \"agent-coordination\"\nconfidence: \"high\"\nlicense: MIT\n---\n\n# Iterative Retrieval Skill\n\nSquad agents frequently spawn sub-agents to complete scoped work. Without structure, these\nhandoffs become vague, cycles multiply, and outputs land without being checked. The\n**Iterative Retrieval Pattern** caps cycles at 3, mandates WHY context in every spawn, and\nrequires the coordinator to validate agent output before closing an issue.\n\n---\n\n## Spawn Prompt Template\n\nEvery agent spawn must include the following four sections. Copy and fill in the template:\n\n```\n## Task\n{What you need done — concrete and bounded}\n\n## WHY this matters\n{The motivation and context. What system or user goal does this serve? What breaks if skipped?}\n\n## Success criteria\n{How you will know the output is correct. Be explicit — list acceptance criteria, not vibes.}\nExample:\n- [ ] File X exists and contains Y\n- [ ] No regressions in existing tests\n- [ ] PR is open targeting main with description matching the issue\n\n## Escalation path\n{What the agent should do if uncertain or stuck. \"Stop and ask me\" is valid.}\nExample:\n- If requirements are ambiguous → stop, comment on the issue, set label status:needs-decision\n- If blocked by a dependency → label status:blocked, explain in a comment\n- If 3 cycles exhausted without resolution → write a summary to inbox and surface to coordinator\n```\n\n---\n\n## 3-Cycle Protocol\n\n| Cycle | Description | Exit condition |\n|-------|-------------|----------------|\n| **1** | Initial attempt | Done → coordinator validates. Incomplete → surface delta. |\n| **2** | Targeted retry with specific corrections | Done → coordinator validates. Incomplete → one more. |\n| **3** | Final attempt with all context from cycles 1–2 | Done or escalate — no cycle 4. |\n\n### Rules\n\n1. **After each cycle**, the coordinator evaluates the output against the success criteria\n   before accepting it or spawning the next cycle.\n2. **Objective context forward**: each subsequent spawn includes a summary of what was tried\n   and what is still missing — not just a repeat of the original task.\n3. **Cycle 3 exhausted** → escalate: write a summary to `.squad\u002Fdecisions\u002Finbox\u002F`, label the\n   issue `status:needs-decision`, and notify the user.\n\n---\n\n## Coordinator Validation Checklist\n\nBefore accepting agent output and closing an issue, the coordinator must check:\n\n- [ ] All success criteria from the spawn prompt are met\n- [ ] PR exists and description matches the issue (if code work)\n- [ ] No obvious regressions (grep for TODO\u002FFIXME introduced, build passes)\n- [ ] Agent did not silently skip parts of the task\n- [ ] If the agent reported uncertainty — was it resolved or escalated?\n\nIf any item fails → do **not** accept. Spawn cycle N+1 (up to cycle 3) with specific deltas.\n\n---\n\n## When to Escalate vs Retry\n\n**Retry (cycle N+1)** when:\n- Output is structurally correct but missing specific items\n- Agent misunderstood scope (provide more context and re-run)\n- Partial success — clearly identified remaining delta\n\n**Escalate** when:\n- Requirements are fundamentally unclear (decision needed)\n- 3 cycles complete without convergence\n- Agent returned conflicting results across cycles\n- Task requires elevated permissions or external action\n- The work depends on another issue that isn't done yet\n\n---\n\n## Issue Dedup Check (Mandatory)\n\nBefore any agent creates a GitHub issue, it **must** search for existing open issues to avoid\nduplicates.\n\n```bash\n# Check for existing open issues before creating a new one\ngh issue list --search \"\u003Ckeywords from your issue title>\" --state open\n```\n\n- If an open issue already covers the same problem → **comment on it** instead of creating a new one.\n- If no duplicate → proceed to create the issue.\n- Use 2–3 representative keywords from the planned issue title as the search query.\n\n---\n\n## Mandatory Output Requirement (Research-Then-Execute)\n\nEvery research or analysis task completed under this protocol **MUST** end with at least one\nconcrete action before the cycle is closed. Acceptable follow-up actions:\n\n- GitHub issue created documenting the findings and next steps\n- PR opened implementing a recommendation\n- Decision recorded in `.squad\u002Fdecisions\u002Finbox\u002F`\n- Documented recommendation with a named assignee and due date\n\n**Pure analysis reports without actionable follow-up will be rejected during triage.**\nIf no action is warranted, the agent must explicitly state why and get coordinator sign-off.\n\n---\n\n## Anti-Patterns\n\n- **Spawning without WHY** — agents can't prioritise trade-offs without motivation context.\n- **Accepting output without validating** — one failed check avoids merging broken work.\n- **Cycle 4+** — if 3 cycles haven't converged, the problem is in the requirements, not the agent.\n- **Vague success criteria** — \"looks good\" is not a criterion. Use checkboxes.\n- **Forwarding WHAT without delta** — cycle 2+ prompts must include what cycle 1 got wrong.\n- **Creating issues without dedup check** — always search before creating.\n- **Research without action** — delivering analysis with no issue, PR, decision, or assignee is incomplete work.\n\n---\n\n## Examples\n\n### Good spawn prompt\n```\n## Task\nAdd an \"Iterative Retrieval Protocol\" section to `.squad\u002Fagents\u002Fcoordinator\u002Fcharter.md` explaining\nthe 3-cycle rule, WHY format, and validation checklist.\n\n## WHY this matters\nThe coordinator spawns sub-agents on every round. Without a documented protocol, agents run unbounded\ncycles and outputs go unvalidated — leading to stale issues and silent failures.\n\n## Success criteria\n- [ ] Section \"Iterative Retrieval Protocol\" exists in charter.md\n- [ ] Section documents max-3-cycles rule\n- [ ] Section documents WHY format requirement\n- [ ] Section contains validation checklist (at least 4 items)\n- [ ] No other sections of charter.md are modified\n\n## Escalation path\nIf the charter.md format is unclear, check another agent charter as a reference.\nIf uncertain about content, stop and surface to coordinator.\n```\n\n### Bad spawn prompt (don't do this)\n```\nUpdate the coordinator charter with the iterative retrieval stuff.\n```\n","# Iterative Retrieval Skill\n\nSquad agents frequently spawn sub-agents to complete scoped work. Without structure, these\nhandoffs become vague, cycles multiply, and outputs land without being checked. The\n**Iterative Retrieval Pattern** caps cycles at 3, mandates WHY context in every spawn, and\nrequires the coordinator to validate agent output before closing an issue.\n\n---\n\n## Spawn Prompt Template\n\nEvery agent spawn must include the following four sections. Copy and fill in the template:\n\n```\n## Task\n{What you need done — concrete and bounded}\n\n## WHY this matters\n{The motivation and context. What system or user goal does this serve? What breaks if skipped?}\n\n## Success criteria\n{How you will know the output is correct. Be explicit — list acceptance criteria, not vibes.}\nExample:\n- [ ] File X exists and contains Y\n- [ ] No regressions in existing tests\n- [ ] PR is open targeting main with description matching the issue\n\n## Escalation path\n{What the agent should do if uncertain or stuck. \"Stop and ask me\" is valid.}\nExample:\n- If requirements are ambiguous → stop, comment on the issue, set label status:needs-decision\n- If blocked by a dependency → label status:blocked, explain in a comment\n- If 3 cycles exhausted without resolution → write a summary to inbox and surface to coordinator\n```\n\n---\n\n## 3-Cycle Protocol\n\n| Cycle | Description | Exit condition |\n|-------|-------------|----------------|\n| **1** | Initial attempt | Done → coordinator validates. Incomplete → surface delta. |\n| **2** | Targeted retry with specific corrections | Done → coordinator validates. Incomplete → one more. |\n| **3** | Final attempt with all context from cycles 1–2 | Done or escalate — no cycle 4. |\n\n### Rules\n\n1. **After each cycle**, the coordinator evaluates the output against the success criteria\n   before accepting it or spawning the next cycle.\n2. **Objective context forward**: each subsequent spawn includes a summary of what was tried\n   and what is still missing — not just a repeat of the original task.\n3. **Cycle 3 exhausted** → escalate: write a summary to `.squad\u002Fdecisions\u002Finbox\u002F`, label the\n   issue `status:needs-decision`, and notify the user.\n\n---\n\n## Coordinator Validation Checklist\n\nBefore accepting agent output and closing an issue, the coordinator must check:\n\n- [ ] All success criteria from the spawn prompt are met\n- [ ] PR exists and description matches the issue (if code work)\n- [ ] No obvious regressions (grep for TODO\u002FFIXME introduced, build passes)\n- [ ] Agent did not silently skip parts of the task\n- [ ] If the agent reported uncertainty — was it resolved or escalated?\n\nIf any item fails → do **not** accept. Spawn cycle N+1 (up to cycle 3) with specific deltas.\n\n---\n\n## When to Escalate vs Retry\n\n**Retry (cycle N+1)** when:\n- Output is structurally correct but missing specific items\n- Agent misunderstood scope (provide more context and re-run)\n- Partial success — clearly identified remaining delta\n\n**Escalate** when:\n- Requirements are fundamentally unclear (decision needed)\n- 3 cycles complete without convergence\n- Agent returned conflicting results across cycles\n- Task requires elevated permissions or external action\n- The work depends on another issue that isn't done yet\n\n---\n\n## Issue Dedup Check (Mandatory)\n\nBefore any agent creates a GitHub issue, it **must** search for existing open issues to avoid\nduplicates.\n\n```bash\n# Check for existing open issues before creating a new one\ngh issue list --search \"\u003Ckeywords from your issue title>\" --state open\n```\n\n- If an open issue already covers the same problem → **comment on it** instead of creating a new one.\n- If no duplicate → proceed to create the issue.\n- Use 2–3 representative keywords from the planned issue title as the search query.\n\n---\n\n## Mandatory Output Requirement (Research-Then-Execute)\n\nEvery research or analysis task completed under this protocol **MUST** end with at least one\nconcrete action before the cycle is closed. Acceptable follow-up actions:\n\n- GitHub issue created documenting the findings and next steps\n- PR opened implementing a recommendation\n- Decision recorded in `.squad\u002Fdecisions\u002Finbox\u002F`\n- Documented recommendation with a named assignee and due date\n\n**Pure analysis reports without actionable follow-up will be rejected during triage.**\nIf no action is warranted, the agent must explicitly state why and get coordinator sign-off.\n\n---\n\n## Anti-Patterns\n\n- **Spawning without WHY** — agents can't prioritise trade-offs without motivation context.\n- **Accepting output without validating** — one failed check avoids merging broken work.\n- **Cycle 4+** — if 3 cycles haven't converged, the problem is in the requirements, not the agent.\n- **Vague success criteria** — \"looks good\" is not a criterion. Use checkboxes.\n- **Forwarding WHAT without delta** — cycle 2+ prompts must include what cycle 1 got wrong.\n- **Creating issues without dedup check** — always search before creating.\n- **Research without action** — delivering analysis with no issue, PR, decision, or assignee is incomplete work.\n\n---\n\n## Examples\n\n### Good spawn prompt\n```\n## Task\nAdd an \"Iterative Retrieval Protocol\" section to `.squad\u002Fagents\u002Fcoordinator\u002Fcharter.md` explaining\nthe 3-cycle rule, WHY format, and validation checklist.\n\n## WHY this matters\nThe coordinator spawns sub-agents on every round. Without a documented protocol, agents run unbounded\ncycles and outputs go unvalidated — leading to stale issues and silent failures.\n\n## Success criteria\n- [ ] Section \"Iterative Retrieval Protocol\" exists in charter.md\n- [ ] Section documents max-3-cycles rule\n- [ ] Section documents WHY format requirement\n- [ ] Section contains validation checklist (at least 4 items)\n- [ ] No other sections of charter.md are modified\n\n## Escalation path\nIf the charter.md format is unclear, check another agent charter as a reference.\nIf uncertain about content, stop and surface to coordinator.\n```\n\n### Bad spawn prompt (don't do this)\n```\nUpdate the coordinator charter with the iterative retrieval stuff.\n```\n",{"name":5,"domain":48,"license":15,"confidence":30,"description":7},"agent-coordination","dev","7b731ec97f35346bdc4fa87c3edaf16b808fc0ae",".squad-templates\u002Fskills\u002Fiterative-retrieval",520,"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fsquad","https:\u002F\u002Fgithub.github.io\u002Fsquad\u002F","https:\u002F\u002Fgithub.com\u002Fgithub","https:\u002F\u002Fgithub.com\u002Fabout","How people build software.","2026-11-15 02:13:59",{"source":8,"skillName":5,"commands":60,"prompt":70,"zipAvailable":71},[61,64,67],{"tool":62,"command":63},"npx","npx skills add github\u002Fsquad --skill iterative-retrieval",{"tool":65,"command":66},"bunx","bunx skills add github\u002Fsquad --skill iterative-retrieval",{"tool":68,"command":69},"pnpm","pnpm dlx skills add github\u002Fsquad --skill iterative-retrieval","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgithub\u002Fsquad\u002Fblob\u002Fdev\u002F.squad-templates\u002Fskills\u002Fiterative-retrieval\u002FSKILL.md",true,[],[74,82,89,96,103,110],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":81},"01M76752CVNE7K6NWD59CRAYNJ","windows-compatibility","Cross-platform path handling and command patterns","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fsquad\u002Fblob\u002Fdev\u002Fplugins\u002Fsquad\u002Fskills\u002Fwindows-compatibility\u002FSKILL.md",[],[],"2026-11-12 13:55:43",{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":81},"01M767508W8A4G83NX1FKEW5VN","versioning-policy","SemVer rules for Squad's stable, preview, insider, and local package versions","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fsquad\u002Fblob\u002Fdev\u002Fplugins\u002Fsquad\u002Fskills\u002Fversioning-policy\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":81},"01M7674X5JJKNJ74B3SS8PGXG2","tiered-memory","Three-tier agent memory model (hot\u002Fcold\u002Fwiki) for context reduction per spawn","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fsquad\u002Fblob\u002Fdev\u002Fplugins\u002Fsquad\u002Fskills\u002Ftiered-memory\u002FSKILL.md",[],[],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":81},"01M7674V3S9H03A76H75M1KSAF","test-discipline","Design assertions that prove the actual contract and fail on realistic regressions","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fsquad\u002Fblob\u002Fdev\u002Fplugins\u002Fsquad\u002Fskills\u002Ftest-discipline\u002FSKILL.md",[],[],{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":81},"01M7674QB8CA61RNDX2Z0NAK71","squad","Squad's command catalog and interactive menu. Invoke via \u002Fsquad (slash command) or natural language (\"squad commands\", \"what can squad do\", \"show me squad options\"). Presents categorized operations (Install & Upgrade, Team Management, Issues & PRs, Plugins & Skills, Model & Cost, Sessions & State) as an interactive picker. Routes to the right squad CLI command or the Squad coordinator agent.","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fsquad\u002Fblob\u002Fdev\u002Fplugins\u002Fsquad\u002Fskills\u002Fsquad\u002FSKILL.md",[],[],{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":114,"categories":115,"keywords":116,"publishedAt":81},"01M7674KTQ632N30HQB1TP7TXH","squad-version-check","Internals of how @bradygaster\u002Fsquad-cli stamps its version, how `squad upgrade` works (what it preserves vs overwrites), and how to probe the npm registry for the latest version from a coordinator prompt.","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fsquad\u002Fblob\u002Fdev\u002Fplugins\u002Fsquad\u002Fskills\u002Fsquad-version-check\u002FSKILL.md",[],[]]