[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6DAN6AXW7YCSKX0JAFAFD5E":3,"skill-same:01M6DAN6AXW7YCSKX0JAFAFD5E":53},{"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":18,"publishedAt":26,"linkOnly":27,"markdownContent":28,"markdownBody":29,"frontMatter":30,"refName":31,"commitSha":32,"skillDirectory":33,"forksCount":34,"repositoryHtmlUrl":35,"repositoryHomepageUrl":6,"ownerHtmlUrl":36,"ownerBlogUrl":37,"ownerDescription":6,"updatedAt":38,"install":39,"resources":52},"01M6DAN6AXW7YCSKX0JAFAFD5E","supervisor-spawn-worker",null,"Launch a worker agent for an assigned slice","dayvidpham\u002Fpasture","dayvidpham","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F22456875?v=4","01M6CHR0F6J2M4QEHFR85XRNSR","David Huu Pham","01M6DA7X1WB0MK7TTV46SRZK75",1,"MIT","https:\u002F\u002Fgithub.com\u002Fdayvidpham\u002Fpasture\u002Fblob\u002Fmain\u002Fskills\u002Fsupervisor-spawn-worker\u002FSKILL.md",[],[19,20,21,22,23,24,25],"supervisor","spawn","worker","supervisor spawn worker","launch","for","slice","2026-11-10 10:12:30",false,"---\nname: supervisor-spawn-worker\ndescription: Launch a worker agent for an assigned slice\n---\n\n# Supervisor Spawn Worker\n\n\u003C!-- BEGIN GENERATED FROM pasture schema -->\n\u003C!-- GENERATED FROM pasture v0.0.32 artifact v1 -->\n**Command:** `pasture:supervisor:spawn-worker` — Launch a worker agent for an assigned slice\n\nLaunch the wave of workers for parallel vertical slice implementation, reviewed by ephemeral reviewers.\n\n**-> [Full workflow in PROCESS.md](..\u002Fprotocol\u002FPROCESS.md#phase-9-worker-slices)** \u003C- Phase 9\n\n### Ride the Wave — Coordinated Phase 8-10 Execution\n\n```text\nPhase 8: PLAN\n  ├─ Read RATIFIED_PLAN + URD\n  ├─ Spawn ephemeral Explore subagents (Task tool, scoped queries)\n  ├─ Use Explore findings to map codebase\n  ├─ Decompose into vertical slices + integration points\n  └─ Create leaf tasks for every slice\n\nPhase 9: BUILD\n  ├─ Spawn N Workers for parallel slice implementation\n  ├─ Workers implement their slices in parallel\n  └─ Workers do NOT shut down when finished\n\nPhase 10: REVIEW + FIX CYCLES (up to the chosen review-effort budget — iterate until 0\u002F0\u002F0 clean, else surface to user)\n  ├─ Cycle 1:\n  │   ├─ Spawn ephemeral reviewers (Task tool, per-slice review)\n  │   ├─ Reviewers review ALL slices (severity tree: BLOCKER\u002FIMPORTANT\u002FMINOR)\n  │   ├─ Workers fix ALL findings (BLOCKER + IMPORTANT + MINOR) with atomic commits\n  │   └─ Spawn new ephemeral reviewers for re-review\n  ├─ Cycle 2 (if needed): same pattern\n  ├─ Cycle N (as many as needed): same pattern\n  └─ Continue until a fix-free clean round confirms 0 BLOCKER + 0 IMPORTANT + 0 MINOR\n\nDONE → Phase 11 (UAT)\n  ├─ Shut down Workers\n  └─ FOLLOWUP epic (if any) is created at UAT from user-DEFER'd items only\n\nCycle Exit Conditions:\n  Fix-free clean round: 0 BLOCKER + 0 IMPORTANT + 0 MINOR   → Proceed to Phase 11 (UAT)\n  ANY finding remains (BLOCKER\u002FIMPORTANT\u002FMINOR)             → Workers fix, spawn new ephemeral reviewers (up to chosen budget; on exhaustion, surface to user)\n  Genuinely stuck (cannot reach a clean round)             → Escalate to architect for re-planning\n\n```\n\n**[sup-spawn-task-tool]**\n- Given: implementation tasks\n- When: spawning\n- Then: use Task tool with `run_in_background: true`\n- Should not: block on worker completion\n\n**[sup-spawn-parallel-wave]**\n- Given: multiple workers\n- When: launching\n- Then: spawn all slices in parallel as a single wave\n- Should not: spawn sequentially\n\n**[sup-spawn-worker-context]**\n- Given: worker assignment\n- When: providing context\n- Then: include Pasture task ID, full context, and handoff document\n- Should not: omit checklist or criteria\n\n**[sup-spawn-handoff-doc]**\n- Given: worker handoff\n- When: creating\n- Then: author the supervisor→worker handoff in the slice (or a dedicated handoff) Pasture task body\n- Should not: skip the handoff or store it as a filesystem path\n\n**[sup-spawn-no-close-before-review]**\n- Given: workers complete their slices\n- When: first wave finishes\n- Then: do NOT close slices — ephemeral reviewers must review ALL slices first\n- Should not: close a slice that has not been reviewed at least once\n\n**[sup-spawn-fix-and-rereview]**\n- Given: reviewers finish reviewing\n- When: BLOCKERs or IMPORTANT findings exist\n- Then: send findings to workers for fixing, then spawn new ephemeral reviewers for re-review\n- Should not: skip re-review after fixes\n\n**[sup-spawn-max-cycles]**\n- Given: worker-reviewer cycle\n- When: counting iterations\n- Then: iterate review->fix->re-review up to the chosen review-effort budget until a fix-free clean round confirms 0 BLOCKER + 0 IMPORTANT + 0 MINOR within budget; on budget exhaustion without clean, surface outstanding findings to the user at a gate\n- Should not: hardcode the budget, proceed past the chosen budget without surfacing to the user, close a wave on a fix-applying round, or proceed with any finding silently outstanding\n\n**[sup-spawn-important-after-cycles]**\n- Given: IMPORTANT or MINOR findings remain\n- When: deciding next step\n- Then: keep iterating review->fix->re-review until ALL severity groups reach 0 — every severity must be resolved before the wave closes\n- Should not: proceed to UAT with non-zero findings or route any review severity (IMPORTANT\u002FMINOR) to the FOLLOWUP epic\n\n**[frag--review-clean-exit]**\n- Given: per-slice code review\n- When: evaluating review results\n- Then: iterate review -> fix -> re-review up to the chosen review-effort budget; clean = 0 BLOCKER + 0 IMPORTANT + 0 MINOR within budget; on budget exhaustion without clean, SURFACE the outstanding findings to the user at a gate for a decision\n- Should not: hardcode the budget; proceed past the chosen budget without surfacing outstanding findings to the user; loop forever when a finite budget was chosen\n\n## Task Recovery\n\nRecover from live Pasture state at session start and after compaction; never trust cached task rows.\n\nStore selection: an explicit --db overrides PASTURE_DB_PATH; otherwise use XDG_DATA_HOME\u002Fpasture\u002Fpasture.db, HOME\u002F.local\u002Fshare\u002Fpasture\u002Fpasture.db, then .pasture\u002Fpasture.db. Use the same selected store for every command. If a recovery query fails, report its actual store path, failed operation, impact, and permission\u002Fschema\u002Fconfiguration repair; failure is not an empty work queue.\n\nSet PASTURE_NAMESPACE to the repository's canonical namespace URI, for example https:\u002F\u002Fgithub.com\u002Fdayvidpham\u002Fpasture. The CLI reads it as the default for --namespace when the flag is omitted; an explicit --namespace always wins. task list, task ready, and task blocked are scoped to that effective namespace, and --all-namespaces ignores both sources. When neither source is set, those reads are unscoped. Creation still falls back to the git-remote-derived namespace, then file:\u002F\u002F of the working directory. Inspect the returned full URI before choosing repository work. Separate reads are not an atomic snapshot.\n\nRun pasture task ready, pasture task blocked, and pasture task list --status in_progress (all three use the effective namespace: PASTURE_NAMESPACE by default, an explicit --namespace, or --all-namespaces for every namespace). For each referenced active task, run pasture task show \"$TASK_URI\", pasture task comments \"$TASK_URI\", and pasture task timeline \"$TASK_URI\". All *_URI variables in examples are inputs bound to full task URIs from an assignment, a verified tracker read, or the actual JSON id returned by create; never use legacy short IDs. Resolve each variable before execution and quote it as one operand.\n\nCreate returns an object whose id is the task URI: capture it with --format json and python3 -c 'import json,sys; print(json.load(sys.stdin)[\"id\"])'. Persist that URI before label\u002Fcomment steps. Create-plus-label is non-atomic: on failure retain the URI and retry only the failed label\u002Fcomment operation, never create again. Only open, in_progress, and closed are statuses; blockage is represented by live dependencies and notes, not a blocked status.\n\nAssignment transfer is not initial allocation: before using pasture task assignment transfer, obtain the existing owner-responsibility assignment and its exact successor assignment ID, registered committing actor, and registered worker occupant from the supervisor. If the task is unassigned, stop and let the supervisor arrange allocation; no assignment-start command is implied. Never repeat an identical transfer as a substitute for allocating different workers.\n\nParent stays open and is blocked by child: pasture task dep add \"$PARENT_URI\" --blocked-by \"$CHILD_URI\". Reference documents belong in description frontmatter under references:, never fabricated blockers. Workers report evidence and handoffs without closing their slices or leaves; the supervisor closes only after independent review and satisfied gates. Use git agent-commit for local commits. Never install, enable, or modify Git hooks, Git hook path configuration, or pre-commit integration without explicit user approval. Tracker writes are durable; Git history lands separately.\n\n## Task Attribution\n\nSelect the current registered author with pasture task agents list and pasture task agents show ACTOR-ID. Never auto-register or guess an identity during recovery. Every comment supplies --author explicitly; machine examples use the pre-registered pasture-system\u002F00000000-0000-0000-0000-000000000000 actor. If it is absent, stop and request registration from the operator rather than claiming registration is fixed. Preserve human intent verbatim and quote historical attribution as evidence, not as a forged new author.\n\n## When to Use\n\nImplementation tasks ready. Ephemeral reviewers will be spawned per-slice during review phase.\n\n## Ride the Wave — Overview\n\nThe supervisor executes Phases 8-10 as a single coordinated cycle called **Ride the Wave**:\n\n```\n1. PLAN  → supervisor-plan-tasks: decompose into slices + integration points\n2. EXPLORE → Ephemeral Explore subagents (Task tool): map codebase, short-lived\n3. BUILD → N Workers: implement slices in parallel\n4. REVIEW → Ephemeral reviewers (Task tool): review per-slice\n5. FIX   → Workers fix BLOCKERs + IMPORTANTs with atomic commits\n6. RE-REVIEW → Spawn new ephemeral reviewers for re-review\n7. REPEAT → Steps 5-6 up to the chosen review-effort budget until a fix-free clean round confirms 0\u002F0\u002F0; on budget exhaustion without clean, surface to the user\n8. TRACK → ALL severities (BLOCKER\u002FIMPORTANT\u002FMINOR) must reach 0 — none route to FOLLOWUP\n9. NEXT  → When fix-free clean (0 BLOCKER + 0 IMPORTANT + 0 MINOR) → Phase 11 (UAT); escalate to architect only if genuinely stuck\n```\n\n**Key rules:**\n- Reviewers are ephemeral (spawned per review cycle via Task tool)\n- Slices are **never closed** until reviewed at least once\n- **Configurable review-effort budget** (chosen at Phase 8: 3 rounds \u002F 1 round \u002F 0 rounds \u002F unlimited \u002F custom) — iterate review→fix→re-review up to the budget until 0 BLOCKER + 0 IMPORTANT + 0 MINOR on a fix-free round; on budget exhaustion without clean, surface outstanding findings to the user at a gate; escalate to architect only if genuinely stuck\n- The FOLLOWUP epic is fed ONLY by user-DEFER'd UAT items, never by review severities\n\n## Handoff Template (Supervisor → Worker)\n\nBefore spawning each worker, author its handoff in the slice (or a dedicated handoff) Pasture task body:\n\n**Storage:** the Pasture task body IS the handoff — no filesystem path.\n\n```markdown\n# Handoff: Supervisor → Worker \u003CN>\n\n## Context\n- Request: ${REQUEST_ID_URI}\n- URD: ${URD_ID_URI}\n- IMPL_PLAN: ${IMPL_PLAN_ID_URI}\n- Ratified Proposal: ${PROPOSAL_ID_URI}\n\n## Your Slice\n- Slice: SLICE-\u003CN>\n- Task ID: ${SLICE_TASK_ID_URI}\n- Production Code Path: \u003Cwhat end users run>\n\n## Key Files\n| File | What You Own |\n|------|-------------|\n| pkg\u002Ffeature\u002Ftypes.go | ListOptions, ListEntry types |\n| cmd\u002Ffeature\u002Flist_test.go | List command tests |\n| pkg\u002Ffeature\u002Fservice.go | ListItems() method |\n| cmd\u002Ffeature\u002Flist.go | list subcommand wiring |\n\n## Implementation Order\n1. Layer 1: Types (your slice only)\n2. Layer 2: Tests (import production code — will FAIL, expected)\n3. Layer 3: Implementation + Wiring (make tests PASS)\n\n## Validation Checklist\n- [ ] Production code verified via code inspection\n- [ ] Tests import actual CLI (not test-only export)\n- [ ] No dual-export anti-pattern\n- [ ] No TODO placeholders\n- [ ] Service wired with real dependencies\n\n## Persistence\nDo NOT shut down after implementation. You will receive review feedback\nand may need to fix BLOCKERs and IMPORTANT findings. Stay alive for the\nfull Ride the Wave cycle.\n```\n\n## Task Call\n\n```\nTask({\n  description: \"Worker: implement SLICE-N\",\n  prompt: `Call Skill(\u002Fpasture:worker) and implement the assigned slice.\n\nPasture Task ID: \"${TASK_ID_URI}\"\nRead full requirements + handoff: pasture task show \"${TASK_ID_URI}\"\n\nDo NOT shut down after implementation. You will receive review feedback and may need to fix issues.`,\n  subagent_type: \"general-purpose\",\n  run_in_background: true\n})\n```\n\nPer [sup-spawn-workers], use `subagent_type: \"general-purpose\"`, not a custom agent type. The worker skill is invoked inside the agent via `Skill(\u002Fpasture:worker)`.\n\n## TeamCreate: SendMessage Assignment\n\nWhen workers are spawned via TeamCreate, they receive context through SendMessage instead of a Task prompt. The message MUST be self-contained — teammates have **no prior context**:\n\n```\nSendMessage({\n  type: \"message\",\n  recipient: \"worker-1\",\n  content: `You are assigned SLICE-1. Start by calling Skill(\u002Fpasture:worker).\n\nYour Pasture task ID: \"${SLICE_TASK_ID_URI}\"\nRun this to get full requirements + handoff: pasture task show \"${SLICE_TASK_ID_URI}\"\n\nKey references (run pasture task show on each for full context):\n- Request: \"${REQUEST_ID_URI}\"\n- URD: \"${URD_ID_URI}\"\n- IMPL_PLAN: \"${IMPL_PLAN_ID_URI}\"\n- Ratified Proposal: \"${PROPOSAL_ID_URI}\"\n\nRead the handoff doc and your Pasture task before starting implementation.\n\nIMPORTANT: Do NOT shut down after completing implementation. You will receive\nreview feedback from ephemeral reviewers and may need to fix BLOCKERs and IMPORTANT\nfindings. Stay alive for the full Ride the Wave cycle.`,\n  summary: \"SLICE-1 assignment with Pasture context\"\n})\n```\n\nPer [sup-teamcreate-msg], include Pasture task IDs and `pasture task show` commands in every assignment. Teammates cannot see your conversation or task tree.\n\n## Worker Persistence (Ride the Wave)\n\nPer [sup-worker-persistence], workers stay alive for the full review-fix cycle:\n\n1. Worker completes slice → notifies supervisor\n2. Supervisor does **NOT** close the slice or shut down the worker\n3. Ephemeral reviewers review the slice\n4. If ANY findings (BLOCKER\u002FIMPORTANT\u002FMINOR): supervisor sends fix assignment to worker\n5. Worker fixes issues → notifies supervisor\n6. New ephemeral reviewers re-review\n7. Repeat steps 4-6 up to the chosen review-effort budget until a fix-free clean round confirms 0\u002F0\u002F0; on budget exhaustion without clean, surface outstanding findings to the user at a gate\n8. After a fix-free clean round (0 BLOCKER + 0 IMPORTANT + 0 MINOR): supervisor shuts down worker\n\n### Fix Assignment Message Template\n\n```\nSendMessage({\n  type: \"message\",\n  recipient: \"worker-1\",\n  content: `Review cycle \u003CN> found issues in your slice (SLICE-1).\n\nBLOCKERs (must fix — blocks slice closure):\n- \"${FINDING_ID_URI}\": \u003Cdescription> (pasture task show \"${FINDING_ID_URI}\")\n\nIMPORTANT (must fix — must reach 0 before wave close):\n- \"${FINDING_ID_URI}\": \u003Cdescription> (pasture task show \"${FINDING_ID_URI}\")\n\nMINOR (must fix — must reach 0 before wave close):\n- \"${FINDING_ID_URI}\": \u003Cdescription> (pasture task show \"${FINDING_ID_URI}\")\n\nAfter fixing all items:\n  pasture task comment add --author pasture-system\u002F00000000-0000-0000-0000-000000000000 \"${SLICE_ID_URI}\" \"Fixes applied for review cycle \u003CN>\"\n\nDo NOT shut down. Ephemeral reviewers will re-review.`,\n  summary: \"Review cycle \u003CN> fixes for SLICE-1\"\n})\n```\n\n## Worker Should Update Pasture Status\n\n- On start: `pasture task update \"${TASK_ID_URI}\" --status=in_progress`\n- On implementation complete (NOT slice close): `pasture task comment add --author pasture-system\u002F00000000-0000-0000-0000-000000000000 \"${TASK_ID_URI}\" \"Implementation complete, awaiting review\"`\n- On blocked: `pasture task update \"${TASK_ID_URI}\" --notes=\"Blocked: \u003Creason>\"`\n- Slice closure: **only the supervisor** closes slices after review passes\n\n## Assign via Pasture\n\n```bash\npasture task assignment transfer \"${TASK_ID_URI}\" --slot owner-responsibility --assignment \"${SUCCESSOR_ASSIGNMENT_ID}\" --actor pasture-system\u002F00000000-0000-0000-0000-000000000000 --occupant \"${REGISTERED_WORKER_ACTOR}\"\npasture task update \"${TASK_ID_URI}\" --status=in_progress\n```\n\n## Follow-up Slice Handoff (FOLLOWUP_SLICE-N)\n\nFor follow-up slices, the handoff (authored in the Pasture task body — no filesystem path) extends with additional fields:\n\n```markdown\n# Handoff: Supervisor → Worker \u003CN> (Follow-up)\n\n## Context\n- Original Request: \"${REQUEST_ID_URI}\"\n- Follow-up Epic: \"${FOLLOWUP_EPIC_ID_URI}\"\n- FOLLOWUP_URD: \"${FOLLOWUP_URD_ID_URI}\"\n- FOLLOWUP_IMPL_PLAN: \"${FOLLOWUP_IMPL_PLAN_ID_URI}\"\n\n## Your Slice\n- Slice: FOLLOWUP_SLICE-\u003CN>\n- Task ID: \"${SLICE_TASK_ID_URI}\"\n\n## DEFER'd Items (from UAT)\n| Item Task ID | Source UAT | Description |\n|---|---|---|\n| \"${ITEM_ID_1_URI}\" | \"${UAT_ID_URI}\" | \u003Cuser-DEFER'd item description> |\n| \"${ITEM_ID_2_URI}\" | \"${UAT_ID_URI}\" | \u003Cuser-DEFER'd item description> |\n\n## Acceptance Criteria\n- All DEFER'd items in this slice resolved (tests pass, production code path verified)\n- See pasture task show \"${SLICE_TASK_ID_URI}\" for full validation_checklist\n```\n\u003C!-- END GENERATED FROM pasture schema -->\n","# Supervisor Spawn Worker\n\n\u003C!-- BEGIN GENERATED FROM pasture schema -->\n\u003C!-- GENERATED FROM pasture v0.0.32 artifact v1 -->\n**Command:** `pasture:supervisor:spawn-worker` — Launch a worker agent for an assigned slice\n\nLaunch the wave of workers for parallel vertical slice implementation, reviewed by ephemeral reviewers.\n\n**-> [Full workflow in PROCESS.md](..\u002Fprotocol\u002FPROCESS.md#phase-9-worker-slices)** \u003C- Phase 9\n\n### Ride the Wave — Coordinated Phase 8-10 Execution\n\n```text\nPhase 8: PLAN\n  ├─ Read RATIFIED_PLAN + URD\n  ├─ Spawn ephemeral Explore subagents (Task tool, scoped queries)\n  ├─ Use Explore findings to map codebase\n  ├─ Decompose into vertical slices + integration points\n  └─ Create leaf tasks for every slice\n\nPhase 9: BUILD\n  ├─ Spawn N Workers for parallel slice implementation\n  ├─ Workers implement their slices in parallel\n  └─ Workers do NOT shut down when finished\n\nPhase 10: REVIEW + FIX CYCLES (up to the chosen review-effort budget — iterate until 0\u002F0\u002F0 clean, else surface to user)\n  ├─ Cycle 1:\n  │   ├─ Spawn ephemeral reviewers (Task tool, per-slice review)\n  │   ├─ Reviewers review ALL slices (severity tree: BLOCKER\u002FIMPORTANT\u002FMINOR)\n  │   ├─ Workers fix ALL findings (BLOCKER + IMPORTANT + MINOR) with atomic commits\n  │   └─ Spawn new ephemeral reviewers for re-review\n  ├─ Cycle 2 (if needed): same pattern\n  ├─ Cycle N (as many as needed): same pattern\n  └─ Continue until a fix-free clean round confirms 0 BLOCKER + 0 IMPORTANT + 0 MINOR\n\nDONE → Phase 11 (UAT)\n  ├─ Shut down Workers\n  └─ FOLLOWUP epic (if any) is created at UAT from user-DEFER'd items only\n\nCycle Exit Conditions:\n  Fix-free clean round: 0 BLOCKER + 0 IMPORTANT + 0 MINOR   → Proceed to Phase 11 (UAT)\n  ANY finding remains (BLOCKER\u002FIMPORTANT\u002FMINOR)             → Workers fix, spawn new ephemeral reviewers (up to chosen budget; on exhaustion, surface to user)\n  Genuinely stuck (cannot reach a clean round)             → Escalate to architect for re-planning\n\n```\n\n**[sup-spawn-task-tool]**\n- Given: implementation tasks\n- When: spawning\n- Then: use Task tool with `run_in_background: true`\n- Should not: block on worker completion\n\n**[sup-spawn-parallel-wave]**\n- Given: multiple workers\n- When: launching\n- Then: spawn all slices in parallel as a single wave\n- Should not: spawn sequentially\n\n**[sup-spawn-worker-context]**\n- Given: worker assignment\n- When: providing context\n- Then: include Pasture task ID, full context, and handoff document\n- Should not: omit checklist or criteria\n\n**[sup-spawn-handoff-doc]**\n- Given: worker handoff\n- When: creating\n- Then: author the supervisor→worker handoff in the slice (or a dedicated handoff) Pasture task body\n- Should not: skip the handoff or store it as a filesystem path\n\n**[sup-spawn-no-close-before-review]**\n- Given: workers complete their slices\n- When: first wave finishes\n- Then: do NOT close slices — ephemeral reviewers must review ALL slices first\n- Should not: close a slice that has not been reviewed at least once\n\n**[sup-spawn-fix-and-rereview]**\n- Given: reviewers finish reviewing\n- When: BLOCKERs or IMPORTANT findings exist\n- Then: send findings to workers for fixing, then spawn new ephemeral reviewers for re-review\n- Should not: skip re-review after fixes\n\n**[sup-spawn-max-cycles]**\n- Given: worker-reviewer cycle\n- When: counting iterations\n- Then: iterate review->fix->re-review up to the chosen review-effort budget until a fix-free clean round confirms 0 BLOCKER + 0 IMPORTANT + 0 MINOR within budget; on budget exhaustion without clean, surface outstanding findings to the user at a gate\n- Should not: hardcode the budget, proceed past the chosen budget without surfacing to the user, close a wave on a fix-applying round, or proceed with any finding silently outstanding\n\n**[sup-spawn-important-after-cycles]**\n- Given: IMPORTANT or MINOR findings remain\n- When: deciding next step\n- Then: keep iterating review->fix->re-review until ALL severity groups reach 0 — every severity must be resolved before the wave closes\n- Should not: proceed to UAT with non-zero findings or route any review severity (IMPORTANT\u002FMINOR) to the FOLLOWUP epic\n\n**[frag--review-clean-exit]**\n- Given: per-slice code review\n- When: evaluating review results\n- Then: iterate review -> fix -> re-review up to the chosen review-effort budget; clean = 0 BLOCKER + 0 IMPORTANT + 0 MINOR within budget; on budget exhaustion without clean, SURFACE the outstanding findings to the user at a gate for a decision\n- Should not: hardcode the budget; proceed past the chosen budget without surfacing outstanding findings to the user; loop forever when a finite budget was chosen\n\n## Task Recovery\n\nRecover from live Pasture state at session start and after compaction; never trust cached task rows.\n\nStore selection: an explicit --db overrides PASTURE_DB_PATH; otherwise use XDG_DATA_HOME\u002Fpasture\u002Fpasture.db, HOME\u002F.local\u002Fshare\u002Fpasture\u002Fpasture.db, then .pasture\u002Fpasture.db. Use the same selected store for every command. If a recovery query fails, report its actual store path, failed operation, impact, and permission\u002Fschema\u002Fconfiguration repair; failure is not an empty work queue.\n\nSet PASTURE_NAMESPACE to the repository's canonical namespace URI, for example https:\u002F\u002Fgithub.com\u002Fdayvidpham\u002Fpasture. The CLI reads it as the default for --namespace when the flag is omitted; an explicit --namespace always wins. task list, task ready, and task blocked are scoped to that effective namespace, and --all-namespaces ignores both sources. When neither source is set, those reads are unscoped. Creation still falls back to the git-remote-derived namespace, then file:\u002F\u002F of the working directory. Inspect the returned full URI before choosing repository work. Separate reads are not an atomic snapshot.\n\nRun pasture task ready, pasture task blocked, and pasture task list --status in_progress (all three use the effective namespace: PASTURE_NAMESPACE by default, an explicit --namespace, or --all-namespaces for every namespace). For each referenced active task, run pasture task show \"$TASK_URI\", pasture task comments \"$TASK_URI\", and pasture task timeline \"$TASK_URI\". All *_URI variables in examples are inputs bound to full task URIs from an assignment, a verified tracker read, or the actual JSON id returned by create; never use legacy short IDs. Resolve each variable before execution and quote it as one operand.\n\nCreate returns an object whose id is the task URI: capture it with --format json and python3 -c 'import json,sys; print(json.load(sys.stdin)[\"id\"])'. Persist that URI before label\u002Fcomment steps. Create-plus-label is non-atomic: on failure retain the URI and retry only the failed label\u002Fcomment operation, never create again. Only open, in_progress, and closed are statuses; blockage is represented by live dependencies and notes, not a blocked status.\n\nAssignment transfer is not initial allocation: before using pasture task assignment transfer, obtain the existing owner-responsibility assignment and its exact successor assignment ID, registered committing actor, and registered worker occupant from the supervisor. If the task is unassigned, stop and let the supervisor arrange allocation; no assignment-start command is implied. Never repeat an identical transfer as a substitute for allocating different workers.\n\nParent stays open and is blocked by child: pasture task dep add \"$PARENT_URI\" --blocked-by \"$CHILD_URI\". Reference documents belong in description frontmatter under references:, never fabricated blockers. Workers report evidence and handoffs without closing their slices or leaves; the supervisor closes only after independent review and satisfied gates. Use git agent-commit for local commits. Never install, enable, or modify Git hooks, Git hook path configuration, or pre-commit integration without explicit user approval. Tracker writes are durable; Git history lands separately.\n\n## Task Attribution\n\nSelect the current registered author with pasture task agents list and pasture task agents show ACTOR-ID. Never auto-register or guess an identity during recovery. Every comment supplies --author explicitly; machine examples use the pre-registered pasture-system\u002F00000000-0000-0000-0000-000000000000 actor. If it is absent, stop and request registration from the operator rather than claiming registration is fixed. Preserve human intent verbatim and quote historical attribution as evidence, not as a forged new author.\n\n## When to Use\n\nImplementation tasks ready. Ephemeral reviewers will be spawned per-slice during review phase.\n\n## Ride the Wave — Overview\n\nThe supervisor executes Phases 8-10 as a single coordinated cycle called **Ride the Wave**:\n\n```\n1. PLAN  → supervisor-plan-tasks: decompose into slices + integration points\n2. EXPLORE → Ephemeral Explore subagents (Task tool): map codebase, short-lived\n3. BUILD → N Workers: implement slices in parallel\n4. REVIEW → Ephemeral reviewers (Task tool): review per-slice\n5. FIX   → Workers fix BLOCKERs + IMPORTANTs with atomic commits\n6. RE-REVIEW → Spawn new ephemeral reviewers for re-review\n7. REPEAT → Steps 5-6 up to the chosen review-effort budget until a fix-free clean round confirms 0\u002F0\u002F0; on budget exhaustion without clean, surface to the user\n8. TRACK → ALL severities (BLOCKER\u002FIMPORTANT\u002FMINOR) must reach 0 — none route to FOLLOWUP\n9. NEXT  → When fix-free clean (0 BLOCKER + 0 IMPORTANT + 0 MINOR) → Phase 11 (UAT); escalate to architect only if genuinely stuck\n```\n\n**Key rules:**\n- Reviewers are ephemeral (spawned per review cycle via Task tool)\n- Slices are **never closed** until reviewed at least once\n- **Configurable review-effort budget** (chosen at Phase 8: 3 rounds \u002F 1 round \u002F 0 rounds \u002F unlimited \u002F custom) — iterate review→fix→re-review up to the budget until 0 BLOCKER + 0 IMPORTANT + 0 MINOR on a fix-free round; on budget exhaustion without clean, surface outstanding findings to the user at a gate; escalate to architect only if genuinely stuck\n- The FOLLOWUP epic is fed ONLY by user-DEFER'd UAT items, never by review severities\n\n## Handoff Template (Supervisor → Worker)\n\nBefore spawning each worker, author its handoff in the slice (or a dedicated handoff) Pasture task body:\n\n**Storage:** the Pasture task body IS the handoff — no filesystem path.\n\n```markdown\n# Handoff: Supervisor → Worker \u003CN>\n\n## Context\n- Request: ${REQUEST_ID_URI}\n- URD: ${URD_ID_URI}\n- IMPL_PLAN: ${IMPL_PLAN_ID_URI}\n- Ratified Proposal: ${PROPOSAL_ID_URI}\n\n## Your Slice\n- Slice: SLICE-\u003CN>\n- Task ID: ${SLICE_TASK_ID_URI}\n- Production Code Path: \u003Cwhat end users run>\n\n## Key Files\n| File | What You Own |\n|------|-------------|\n| pkg\u002Ffeature\u002Ftypes.go | ListOptions, ListEntry types |\n| cmd\u002Ffeature\u002Flist_test.go | List command tests |\n| pkg\u002Ffeature\u002Fservice.go | ListItems() method |\n| cmd\u002Ffeature\u002Flist.go | list subcommand wiring |\n\n## Implementation Order\n1. Layer 1: Types (your slice only)\n2. Layer 2: Tests (import production code — will FAIL, expected)\n3. Layer 3: Implementation + Wiring (make tests PASS)\n\n## Validation Checklist\n- [ ] Production code verified via code inspection\n- [ ] Tests import actual CLI (not test-only export)\n- [ ] No dual-export anti-pattern\n- [ ] No TODO placeholders\n- [ ] Service wired with real dependencies\n\n## Persistence\nDo NOT shut down after implementation. You will receive review feedback\nand may need to fix BLOCKERs and IMPORTANT findings. Stay alive for the\nfull Ride the Wave cycle.\n```\n\n## Task Call\n\n```\nTask({\n  description: \"Worker: implement SLICE-N\",\n  prompt: `Call Skill(\u002Fpasture:worker) and implement the assigned slice.\n\nPasture Task ID: \"${TASK_ID_URI}\"\nRead full requirements + handoff: pasture task show \"${TASK_ID_URI}\"\n\nDo NOT shut down after implementation. You will receive review feedback and may need to fix issues.`,\n  subagent_type: \"general-purpose\",\n  run_in_background: true\n})\n```\n\nPer [sup-spawn-workers], use `subagent_type: \"general-purpose\"`, not a custom agent type. The worker skill is invoked inside the agent via `Skill(\u002Fpasture:worker)`.\n\n## TeamCreate: SendMessage Assignment\n\nWhen workers are spawned via TeamCreate, they receive context through SendMessage instead of a Task prompt. The message MUST be self-contained — teammates have **no prior context**:\n\n```\nSendMessage({\n  type: \"message\",\n  recipient: \"worker-1\",\n  content: `You are assigned SLICE-1. Start by calling Skill(\u002Fpasture:worker).\n\nYour Pasture task ID: \"${SLICE_TASK_ID_URI}\"\nRun this to get full requirements + handoff: pasture task show \"${SLICE_TASK_ID_URI}\"\n\nKey references (run pasture task show on each for full context):\n- Request: \"${REQUEST_ID_URI}\"\n- URD: \"${URD_ID_URI}\"\n- IMPL_PLAN: \"${IMPL_PLAN_ID_URI}\"\n- Ratified Proposal: \"${PROPOSAL_ID_URI}\"\n\nRead the handoff doc and your Pasture task before starting implementation.\n\nIMPORTANT: Do NOT shut down after completing implementation. You will receive\nreview feedback from ephemeral reviewers and may need to fix BLOCKERs and IMPORTANT\nfindings. Stay alive for the full Ride the Wave cycle.`,\n  summary: \"SLICE-1 assignment with Pasture context\"\n})\n```\n\nPer [sup-teamcreate-msg], include Pasture task IDs and `pasture task show` commands in every assignment. Teammates cannot see your conversation or task tree.\n\n## Worker Persistence (Ride the Wave)\n\nPer [sup-worker-persistence], workers stay alive for the full review-fix cycle:\n\n1. Worker completes slice → notifies supervisor\n2. Supervisor does **NOT** close the slice or shut down the worker\n3. Ephemeral reviewers review the slice\n4. If ANY findings (BLOCKER\u002FIMPORTANT\u002FMINOR): supervisor sends fix assignment to worker\n5. Worker fixes issues → notifies supervisor\n6. New ephemeral reviewers re-review\n7. Repeat steps 4-6 up to the chosen review-effort budget until a fix-free clean round confirms 0\u002F0\u002F0; on budget exhaustion without clean, surface outstanding findings to the user at a gate\n8. After a fix-free clean round (0 BLOCKER + 0 IMPORTANT + 0 MINOR): supervisor shuts down worker\n\n### Fix Assignment Message Template\n\n```\nSendMessage({\n  type: \"message\",\n  recipient: \"worker-1\",\n  content: `Review cycle \u003CN> found issues in your slice (SLICE-1).\n\nBLOCKERs (must fix — blocks slice closure):\n- \"${FINDING_ID_URI}\": \u003Cdescription> (pasture task show \"${FINDING_ID_URI}\")\n\nIMPORTANT (must fix — must reach 0 before wave close):\n- \"${FINDING_ID_URI}\": \u003Cdescription> (pasture task show \"${FINDING_ID_URI}\")\n\nMINOR (must fix — must reach 0 before wave close):\n- \"${FINDING_ID_URI}\": \u003Cdescription> (pasture task show \"${FINDING_ID_URI}\")\n\nAfter fixing all items:\n  pasture task comment add --author pasture-system\u002F00000000-0000-0000-0000-000000000000 \"${SLICE_ID_URI}\" \"Fixes applied for review cycle \u003CN>\"\n\nDo NOT shut down. Ephemeral reviewers will re-review.`,\n  summary: \"Review cycle \u003CN> fixes for SLICE-1\"\n})\n```\n\n## Worker Should Update Pasture Status\n\n- On start: `pasture task update \"${TASK_ID_URI}\" --status=in_progress`\n- On implementation complete (NOT slice close): `pasture task comment add --author pasture-system\u002F00000000-0000-0000-0000-000000000000 \"${TASK_ID_URI}\" \"Implementation complete, awaiting review\"`\n- On blocked: `pasture task update \"${TASK_ID_URI}\" --notes=\"Blocked: \u003Creason>\"`\n- Slice closure: **only the supervisor** closes slices after review passes\n\n## Assign via Pasture\n\n```bash\npasture task assignment transfer \"${TASK_ID_URI}\" --slot owner-responsibility --assignment \"${SUCCESSOR_ASSIGNMENT_ID}\" --actor pasture-system\u002F00000000-0000-0000-0000-000000000000 --occupant \"${REGISTERED_WORKER_ACTOR}\"\npasture task update \"${TASK_ID_URI}\" --status=in_progress\n```\n\n## Follow-up Slice Handoff (FOLLOWUP_SLICE-N)\n\nFor follow-up slices, the handoff (authored in the Pasture task body — no filesystem path) extends with additional fields:\n\n```markdown\n# Handoff: Supervisor → Worker \u003CN> (Follow-up)\n\n## Context\n- Original Request: \"${REQUEST_ID_URI}\"\n- Follow-up Epic: \"${FOLLOWUP_EPIC_ID_URI}\"\n- FOLLOWUP_URD: \"${FOLLOWUP_URD_ID_URI}\"\n- FOLLOWUP_IMPL_PLAN: \"${FOLLOWUP_IMPL_PLAN_ID_URI}\"\n\n## Your Slice\n- Slice: FOLLOWUP_SLICE-\u003CN>\n- Task ID: \"${SLICE_TASK_ID_URI}\"\n\n## DEFER'd Items (from UAT)\n| Item Task ID | Source UAT | Description |\n|---|---|---|\n| \"${ITEM_ID_1_URI}\" | \"${UAT_ID_URI}\" | \u003Cuser-DEFER'd item description> |\n| \"${ITEM_ID_2_URI}\" | \"${UAT_ID_URI}\" | \u003Cuser-DEFER'd item description> |\n\n## Acceptance Criteria\n- All DEFER'd items in this slice resolved (tests pass, production code path verified)\n- See pasture task show \"${SLICE_TASK_ID_URI}\" for full validation_checklist\n```\n\u003C!-- END GENERATED FROM pasture schema -->\n",{"name":5,"description":7},"main","f1cfd0067fe237fa61aab9bcd7123958e2351b07","skills\u002Fsupervisor-spawn-worker",0,"https:\u002F\u002Fgithub.com\u002Fdayvidpham\u002Fpasture","https:\u002F\u002Fgithub.com\u002Fdayvidpham","dhpham.com","2026-11-11 03:30:30",{"source":8,"skillName":5,"commands":40,"prompt":50,"zipAvailable":51},[41,44,47],{"tool":42,"command":43},"npx","npx skills add dayvidpham\u002Fpasture --skill supervisor-spawn-worker",{"tool":45,"command":46},"bunx","bunx skills add dayvidpham\u002Fpasture --skill supervisor-spawn-worker",{"tool":48,"command":49},"pnpm","pnpm dlx skills add dayvidpham\u002Fpasture --skill supervisor-spawn-worker","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fdayvidpham\u002Fpasture\u002Fblob\u002Fmain\u002Fskills\u002Fsupervisor-spawn-worker\u002FSKILL.md",true,[],[54,62,76,86,98,108],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":26},"01M6DAP7307B3JVZX5DSNAE08Y","fixture","Isolated fixture skill","https:\u002F\u002Fgithub.com\u002Fdayvidpham\u002Fpasture\u002Fblob\u002Fmain\u002Ftestdata\u002Finstall\u002Fglobal\u002Fclaude-code\u002Fnative-marketplace\u002Ffixture-plugin\u002Fskills\u002Ffixture\u002FSKILL.md",[],[56,61],"fixture skill",{"skillNo":63,"name":21,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":26},"01M6DAP48A4K365N83NBG0GFVC","Vertical slice implementer (full production code path)","https:\u002F\u002Fgithub.com\u002Fdayvidpham\u002Fpasture\u002Fblob\u002Fmain\u002Fskills\u002Fworker\u002FSKILL.md",[],[21,68,69,70,71,72,73,74,25,75],"complete","vertical slice","full","implementer","Production","path","code","implement",{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":26},"01M6DAP18QJM7P7N31TYGNJBCP","worker-implement","Implement assigned vertical slice following TDD layers","https:\u002F\u002Fgithub.com\u002Fdayvidpham\u002Fpasture\u002Fblob\u002Fmain\u002Fskills\u002Fworker-implement\u002FSKILL.md",[],[83,21,75,25,84,69,85],"worker implement","layers","tdd",{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":26},"01M6DANYHC7P63RFEN26F70MC2","worker-complete","Signal slice completion after quality gates pass","https:\u002F\u002Fgithub.com\u002Fdayvidpham\u002Fpasture\u002Fblob\u002Fmain\u002Fskills\u002Fworker-complete\u002FSKILL.md",[],[68,93,21,94,25,95,96,97],"worker complete","signal","gates","quality","quality gates",{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":26},"01M6DANWZ31TRP4NN4T1BFYKSR","worker-blocked","Report a blocker to supervisor via Pasture","https:\u002F\u002Fgithub.com\u002Fdayvidpham\u002Fpasture\u002Fblob\u002Fmain\u002Fskills\u002Fworker-blocked\u002FSKILL.md",[],[105,21,106,19,107],"worker blocked","via","report",{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":119,"publishedAt":26},"01M6DANSVDBXBFH93B6EX3H2QK","user-uat","User Acceptance Testing with demonstrative examples","https:\u002F\u002Fgithub.com\u002Fdayvidpham\u002Fpasture\u002Fblob\u002Fmain\u002Fskills\u002Fuser-uat\u002FSKILL.md",[114],{"categoryNo":115,"categoryName":116,"taxonomyType":117,"taxonomyTypeDesc":118},"01JBSEEDCAT000000000000008","测试与质量","SCENARIO","使用场景",[120,121,122,123,124,125,126,127,128],"uat","user uat","user","testing","acceptance testing","with","user acceptance testing","examples","acceptance"]