[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M719KTMCHHZ8ECTD0PBFPQKH":3,"skill-same:01M719KTMCHHZ8ECTD0PBFPQKH":69},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":22,"publishedAt":42,"linkOnly":43,"markdownContent":44,"markdownBody":45,"frontMatter":46,"refName":48,"commitSha":49,"skillDirectory":50,"forksCount":51,"repositoryHtmlUrl":52,"repositoryHomepageUrl":6,"ownerHtmlUrl":53,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":54,"install":55,"resources":68},"01M719KTMCHHZ8ECTD0PBFPQKH","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.","DeDuva\u002Fsquad","DeDuva","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F8153108?v=4","01M719BQB25861D0TKS3RVHMN2","01M719BQBSWR380PSYDD5M9YD4",1,"MIT","https:\u002F\u002Fgithub.com\u002FDeDuva\u002Fsquad\u002Fblob\u002Fdev\u002Fpackages\u002Fsquad-sdk\u002Ftemplates\u002Fskills\u002Fiterative-retrieval\u002FSKILL.md",[17],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41],"retrieval","iterative retrieval","context","protocol","validation","max","why","high","work","with","coordination","tasks","when","use","coordinator","scoped","complete","cycle","for","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":47,"license":14,"confidence":30,"description":7},"agent-coordination","dev","4ffda80d1bb1043d9169688cf161e53097345c72","packages\u002Fsquad-sdk\u002Ftemplates\u002Fskills\u002Fiterative-retrieval",0,"https:\u002F\u002Fgithub.com\u002FDeDuva\u002Fsquad","https:\u002F\u002Fgithub.com\u002FDeDuva","2026-11-09 20:24:44",{"source":8,"skillName":5,"commands":56,"prompt":66,"zipAvailable":67},[57,60,63],{"tool":58,"command":59},"npx","npx skills add DeDuva\u002Fsquad --skill iterative-retrieval",{"tool":61,"command":62},"bunx","bunx skills add DeDuva\u002Fsquad --skill iterative-retrieval",{"tool":64,"command":65},"pnpm","pnpm dlx skills add DeDuva\u002Fsquad --skill iterative-retrieval","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FDeDuva\u002Fsquad\u002Fblob\u002Fdev\u002Fpackages\u002Fsquad-sdk\u002Ftemplates\u002Fskills\u002Fiterative-retrieval\u002FSKILL.md",true,[],[70,82,90,106,129,143],{"skillNo":71,"name":72,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":76,"publishedAt":42},"01M719NE6ZPZT80MKVWFDECJZ3","My Skill","https:\u002F\u002Fgithub.com\u002FDeDuva\u002Fsquad\u002Fblob\u002Fdev\u002Ftest-fixtures\u002Fskills-test-abb30454\u002Fmy-skill\u002FSKILL.md",[75],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},[77,78,79,80,81],"my","my skill","testing","vitest","tester",{"skillNo":83,"name":84,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":42},"01M719NDJAMEWM8D9H355SCNA8","bad-skill","https:\u002F\u002Fgithub.com\u002FDeDuva\u002Fsquad\u002Fblob\u002Fdev\u002Ftest-fixtures\u002Fskills-test-abb30454\u002Fbad-skill\u002FSKILL.md",[],[88,89],"bad skill","bad",{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":42},"01M719NCC1AZ02GHZ1V71YPEV7","squad-conventions","Core conventions and patterns used in the Squad codebase","https:\u002F\u002Fgithub.com\u002FDeDuva\u002Fsquad\u002Fblob\u002Fdev\u002Ftemplates\u002Fskills\u002Fsquad-conventions\u002FSKILL.md",[],[97,98,99,100,101,102,103,30,104,105],"conventions","squad","squad conventions","project-conventions","core","project","manual","codebase","patterns",{"skillNo":107,"name":108,"nameZh":6,"description":109,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":42},"01M719NAYM17B7X8MGP681EHKQ","rework-rate","Measure and interpret PR rework rate — the emerging 5th DORA metric","https:\u002F\u002Fgithub.com\u002FDeDuva\u002Fsquad\u002Fblob\u002Fdev\u002Ftemplates\u002Fskills\u002Frework-rate\u002FSKILL.md",[],[113,114,115,116,30,117,118,119,98,120,121,122,123,103,124,35,125,126,127,128],"rate","rework rate","health","analyze","review efficiency","quality","metric","metrics","efficiency","code quality","pr","prs","code","team","code-review","review",{"skillNo":130,"name":131,"nameZh":6,"description":132,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":133,"categories":134,"keywords":135,"publishedAt":42},"01M719NA136PDC3SQ10R4R88TH","nap","Context hygiene — compress, prune, archive .squad\u002F state","https:\u002F\u002Fgithub.com\u002FDeDuva\u002Fsquad\u002Fblob\u002Fdev\u002Ftemplates\u002Fskills\u002Fnap\u002FSKILL.md",[],[131,136,137,138,139,140,141,142,98,25],"prune","state","maintenance","context hygiene","archive","hygiene","compress",{"skillNo":144,"name":145,"nameZh":6,"description":146,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":147,"categories":148,"keywords":153,"publishedAt":42},"01M719N7B4PBQPNXW78TEJY4HQ","e2e-template-testing","End-to-end validation of coordinator and agent template changes","https:\u002F\u002Fgithub.com\u002FDeDuva\u002Fsquad\u002Fblob\u002Fdev\u002Ftemplates\u002Fskills\u002Fe2e-template-testing\u002FSKILL.md",[149,152],{"categoryNo":150,"categoryName":151,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000008","测试与质量",{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},[79,154,155,156,157,37,158,103,159,30,27],"e2e template testing","e2e","template","end","development","changes"]