[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75FHNBAVBP0N6EFXG6Z0S2J":3,"skill-same:01M75FHNBAVBP0N6EFXG6Z0S2J":43},{"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":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":13,"repositoryHtmlUrl":26,"repositoryHomepageUrl":6,"ownerHtmlUrl":27,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":28,"install":29,"resources":42},"01M75FHNBAVBP0N6EFXG6Z0S2J","implement-tasks",null,"Batch-implement all approved tasks in dependency order, then auto-transition to quality-gate when every task reaches Implementation Complete. Use after sdd-bootstrap-interviewer and before quality-gate.","aharada54914\u002Fsdd-forge","aharada54914","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F40755043?v=4","01M75FFC4V7WXZF0PK9RYWHNGF","01M75FFC5YJJ11B7MDCRVWB9Z6",0,"MIT","https:\u002F\u002Fgithub.com\u002Faharada54914\u002Fsdd-forge\u002Fblob\u002Fmain\u002Fplugins\u002Fsdd-implementation\u002Fskills\u002Fimplement-tasks\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: implement-tasks\ndescription: Batch-implement all approved tasks in dependency order, then auto-transition to quality-gate when every task reaches Implementation Complete. Use after sdd-bootstrap-interviewer and before quality-gate.\ndisable-model-invocation: false\nuser-invocable: false\n---\n\n> **Caller**: This skill is invoked by `sdd-ship`. Do not invoke directly.\n> Results are returned to the caller; no downstream skill is auto-invoked.\n\n# Implement Tasks (Batch)\n\nImplement all approved tasks for a feature in dependency order.\nAfter every approved task reaches `Implementation Complete`, automatically\ninvoke `quality-gate` for the feature.\n\n## Managed allocation boundary\n\nAffected policy roles: `implementer`.\n\nApply this boundary only when the caller explicitly selects managed routing\nwith a policy request or model controls, or this allocation continues that\nmanaged workflow. With no managed input, retain the legacy invocation and model\nhints below. Once managed is selected, do not switch that workflow to legacy\nbecause selection, validation or launch fails. No new environment toggle is\nrequired, and this boundary does not grant delegation or execution permission.\n\nFor a managed allocation, apply in the allocating parent before an unbound\nforked Skill\u002FAgent, native role, or fresh context receives work, and before any\nidentity reservation. This\nboundary takes precedence over later native\u002Fdefault launch guidance for these\nroles. It does not add an availability or authority gate.\n\nKeep an already admitted managed entry with its validated selection\u002Fcontrols and\nmatching role, host, run\u002Fsession and workload. Keep a concretely known matching\nbatch startup and fixed generated Codex configuration under their original\ncontracts. An already bound worker continues its original procedure: do not\nselect again, allocate again, or run this refusal inside that same worker.\nA bound parent does not bind a new child, role or session: each new allocation\nneeds its own admitted selection\u002Fcarrier binding or takes the refusal below.\n\nWhen this operation has no admitted binding of the selected model and effort to\nits actual native carrier, substitute the next affected policy role and actual\nhost (`claude-code`, `codex-cli`, `copilot-cli`, or `gemini-cli`) and execute:\n\n```bash\npython3 -I -B \"\u003Cinstalled-root>\"\u002Fplugins\u002Fsdd-implementation\u002Fscripts\u002Fmanaged-model-entry.py unsupported-entry \\\n  --role \"\u003Cpolicy-role>\" --host \"\u003Chost>\"\n```\n\nExit 2 with `model-policy-error\u002Fv1` \u002F `model-unavailable` stops that allocation\nbefore work or reservation. Do not fall through to an old model hint, alias,\nunbound native default or another parent session; do not count allocation alone\nas selection proof. This refusal does not assert host incapability and never\nauthorizes same-session reload. Original host-incapable-only implementation\nfallback evidence and all review isolation requirements remain unchanged.\n\nKeep the concretely known matching startup definition route below and every original batch manifest\u002Fsnapshot\u002Fidentity\u002Foutput admission, cap, barrier and fail-fast rule. This boundary cannot turn a capable host into an incapable one or change the exact incapable-host-only same-session reload exception.\n\n\n## Invocation\n\nClaude Code — internal skill, not directly invocable. Reached by following\nthis file from its entry command:\n\n```\n\u002Fsdd-ship:ship\n```\n\nCodex:\n\n```txt\nUse the implement-tasks skill for specs\u002F\u003Cfeature>\u002Ftasks.md\n```\n\n## Preconditions\n\nBefore reading any specification, verify that `AGENTS.md` exists at the\nrepository root and that `scripts\u002Fcheck-sdd-structure.sh` (or `.ps1`) reports\nno `missing:` items. If either check fails, stop immediately and direct the\nuser to run `\u002Fsdd-bootstrap:sdd-adopt`. Do not improvise project rules or\ninfer missing structure from context.\n\n## Required Reading\n\nRead `AGENTS.md`, the target feature requirements, design, tasks, acceptance\ntests, traceability, relevant ADRs and contracts,\n`references\u002Fimplementation-policy.md`, and\n`references\u002Fagent-delegation-policy.md`.\n\n### Sudo Mode\n\nIf a valid `SDD_SUDO` flag file exists at the project root (see\n`plugins\u002Fsdd-quality-loop\u002Freferences\u002Fsudo-mode-policy.md`), the per-task\napproval checkpoint auto-passes. Record\n`Approval: Approved (sudo \u003CISO8601 UTC>)` in tasks.md for each auto-passed\ntask.\n\nSudo does **not** bypass Block-and-Stop decisions: requirement, architecture,\nauthentication, authorization, breaking-API, or security decisions still\nrequire a human. Set the task to `Blocked` and defer to the human even under\nsudo.\n\n## Task Selection Algorithm\n\nExecute this algorithm before each implementation pass:\n\n1. Read `tasks.md` and collect all tasks.\n2. **Eligible set**: tasks where both of these hold:\n   - `Approval: Approved`\n   - `Status: Planned` or `Status: In Progress`\n   A task previously blocked with `terminal-tier-recurrence` is not eligible\n   until `check-terminal-tier-resume.sh` or `.ps1` validates a persisted\n   `terminal-tier-resume\u002Fv1` evidence file. Missing or forged diagnosis,\n   contract-revision, or human-reapproval evidence keeps it Blocked.\n3. **Dependency filter**: for each eligible task, parse its `### Blockers`\n   section.\n   - Scan for task-ID references matching the pattern `T-\\d+`.\n   - For each referenced task ID, check its `Status` in `tasks.md`.\n   - If the referenced task's `Status` is **not** `Implementation Complete`\n     or `Done`, remove the current task from the eligible set for this pass.\n   - A task with `### Blockers\\nNone` or a blank `### Blockers` section has\n     no dependencies and remains eligible once approved.\n4. **Independent set (parallel-eligible).** From the eligible set, take the\n   largest subset whose tasks each have a `### Blockers` section of `None` (or\n   empty) **and** whose `Scope` file lists are mutually disjoint — no two\n   selected tasks name the same implementation file. Use the same overlap test\n   as `SCOPE-DISJOINT` in\n   `plugins\u002Fsdd-review-loop\u002Fagents\u002Ftask-reviewer-b.md`: tasks that would modify\n   the same file for the same purpose must not share a set. Order the set by\n   appearance in `tasks.md`; if Scope overlap forces a choice, keep the earliest\n   task and defer the overlapping one to a later pass (sequential fallback).\n5. If no eligible task exists, report which tasks remain and why\n   (unapproved \u002F dependency-blocked \u002F all done), then stop and go to\n   **Completion Check**.\n\n## Implementation Loop\n\n### Managed Claude batch model routing\n\nUse this route only when managed routing was explicitly selected. Without\nmanaged inputs, retain the legacy procedure; never use it after a managed failure.\n\nFor a managed Claude batch, keep the original task selection, risk check,\nmanifest\u002Fsnapshot preparation, host-capability decision and complete persisted\nmanifest-set validation below. Before Agent dispatch, prepare each selected\nimplementer's native definition through the installed entry. This is configuration\npreparation and launches no task. Its selection\u002Fcontrols\u002Fvalidation retain the\noriginal T-007 validation; its stdout is one native `--agents` definition object.\n\n```bash\npython3 -I -B \"\u003Cinstalled-root>\"\u002Fplugins\u002Fsdd-implementation\u002Fscripts\u002Fmanaged-model-entry.py claude-batch-definition \\\n  --request \"\u003Cpolicy-request>\" --registry \"\u003Cregistry>\" --role implementer --host claude-code \\\n  --run-id \"\u003Crun-id>\" --session-id \"\u003Csession-id>\" --attempt \"\u003Cattempt>\" \\\n  --output-dir \"\u003Coutput-dir>\" --require-actual-id false\n```\n\nBind each generated definition to that exact validated selection. Use a native\nparent only when its actual startup loaded the identical definitions; retain the\npinned startup bytes as configuration evidence. A successful call to a custom\nname, or writing an agent file after startup, does not prove the loaded model and\neffort. Unknown or stale startup configuration must take this executable branch\nand stop the batch before any implementation:\n\n```bash\npython3 -I -B \"\u003Cinstalled-root>\"\u002Fplugins\u002Fsdd-implementation\u002Fscripts\u002Fmanaged-model-entry.py unsupported-entry --role implementer --host claude-code\n```\n\nThis is a typed unsupported routing result. It does not assert that the host\ncannot create implementation subagents, and cannot authorize same-session reload.\nSchema, selection, model, configuration and native allocation failures also stop;\nthey never authorize that fallback. A known matching startup remains eligible for\nthe original fresh-Agent path, subject to every original handoff admission below.\nDo not inspect an unknown parent's argv, credentials, profiles or session stores.\nIf an owned fresh CLI parent is used to load these definitions, it runs this same\norchestrator with ordinary settings, hooks, tools and permissions preserved; no\nsingle-task `claude-entry` worker replaces batch children.\n\nFor each task admitted by the original manifest\u002Fsnapshot checks, make the original\nnative Agent call with its generated name and file-backed input only:\n\n```json\n{\"subagent_type\":\"\u003Cmanaged-definition-name>\",\"prompt\":\"Manifest: \u003Cvalidated-manifest-path>; immutable snapshot: \u003Cvalidated-snapshot-root>; writable outputs: \u003Cdeclared-output-roots>. Follow the original one-task worker procedure; return file-backed artifacts only.\"}\n```\n\nThe exact full native model and effort live in the startup definition. Omit\nper-call `model` and `effort`; their alias\u002Fdefault interpretation cannot replace\nthat selection. Do not infer backend identity from successful allocation. Preserve\nthe existing manifest `session_id` and `agent_instance_id` admission, whose grammar\nis nonempty identifiers rather than UUID-only. Neither a tool-use ID nor a returned\nAgent ID automatically proves both fields; if the original pre-work identity and\noutput-root admission cannot be established, stop before work as already required.\n\nKeep the up-to-4 concurrent Claude cap, earliest-four then deferred remainder,\ncomplete persisted manifest set across passes, immutable snapshot per child,\nnon-reuse across all tasks, parent-only shared status\u002Freport acceptance,\nbarrier and Blocked fail-fast rules below unchanged. Generated definitions and\ncall-shape fixtures prove configuration, not actual model\u002Feffort or full native\nbatch execution. Native batch acceptance remains unproven until those original\nadmission requirements and the actual batch behavior are demonstrated.\n\n\n\n`implement-tasks` is an orchestrator. It selects work, creates and validates\nthe file-backed handoff, launches the implementation context, and consumes the\npersisted result. It does not implement a selected task in the batch\norchestrator's accumulated conversation.\n\nBefore the first launch, detect whether the host can create implementation\nsubagents and persist one capability decision for the complete batch. Every\nmanifest in the batch MUST use the mode selected by that decision; mixed\n`fresh-agent` and `same-session-file-reload` batches are invalid. A capable\nhost MUST use the fresh-agent path. The fallback path is permitted only when\nthe host explicitly reports that implementation subagents are unavailable\nwith reason `host-does-not-support-implementation-subagents`.\n\n**Parallel dispatch of the independent set.** Launch every task in the current\nindependent set (Task Selection step 4) concurrently — their `Scope` file lists\nare disjoint, so the fresh-agent handoffs never write the same file. Concurrency\ncaps: **Claude Code — up to 4 fresh agents per pass**, dispatched in a single\nassistant message; **Codex — up to (CPU count − 2)**, each launched as a parallel\nprocess and joined with `wait`. If the set exceeds the cap, take the earliest N\nand defer the rest. A set of size 1, or any Scope-overlapping remainder, runs\nsequentially.\n\n**The orchestrator is the only writer of shared state.** Launched agents return\nonly their file-backed artifacts (manifest, snapshot outputs, implementation\nreport); they never mutate `tasks.md` or another task's\n`reports\u002Fimplementation\u002F` entry. The orchestrator serializes every `tasks.md`\nstatus transition and report acceptance after a worker returns, so concurrent\ntasks cannot interleave shared writes. **Fail fast:** the moment any task in the\nset returns `Blocked`, stop dispatching further passes and follow **Block And\nStop** for the batch (in-flight siblings may finish, but no new pass starts).\n\nFor each task in the set (run these concurrently across the set):\n\n1. Inspect `git status` and `git diff`. Preserve unrelated existing changes.\n   If they conflict with the task scope, set the task to `Blocked` and stop.\n2. Use the checked-in routing, risk, snapshot, and manifest scripts to select\n   the model, allocate a new task\u002Frun identity, build a hash-bound task input\n   manifest, publish the immutable snapshot, and validate it with\n   `plugins\u002Fsdd-implementation\u002Fscripts\u002Fprepare-task-snapshot.sh` or `.ps1`\n   and `validate-task-input-manifest.sh` or `.ps1`. Keep every manifest in the\n   persisted batch manifest set and run the validator's batch mode over the\n   complete set before launch. For fallback batches, pass the persisted\n   evidence root to `--evidence-root` or `-EvidenceRoot`; the validator rereads\n   the evidence file from disk and binds it to the complete manifest set.\n   Deterministic parsing, validation, hashing, identity checks, and state\n   transitions are performed by checked-in scripts rather than by model\n   judgment.\n3. On a subagent-capable host, launch exactly one fresh implementation agent\n   for the selected T-NNN. Give it only the validated immutable snapshot,\n   manifest, and declared writable output roots. Do not pass chat history,\n   conversation summaries, or the orchestrator's working context. Never reuse\n   a run, session, or `agent_instance_id` from any earlier batch task, whether\n   adjacent or nonadjacent, and never assign the launched agent another task.\n4. On a host that explicitly cannot create implementation subagents, use\n   `same-session-file-reload` only after all of the following hold:\n   - Persist the manifest, immutable snapshot, implementation report location,\n     explicit host-capability fallback reason, unique task ID, and unique run\n     ID.\n   - Record the reused physical session and agent IDs. Reuse of a task or run\n     ID is forbidden.\n   - Save the closed JSON evidence artifact at\n     `handoffs\u002Freload-evidence.txt`. It MUST use schema\n     `implementation-host-capability\u002Fv1`, record\n     `implementation_subagents_available: false`, the exact incapable-host\n     reason, reused physical session\u002Fagent IDs, and the complete batch's\n     task\u002Frun pairs.\n   - Include that evidence path and lowercase SHA-256 in every manifest's\n     `allowed_inputs`, set the same SHA-256 as\n     `handoff_reload_evidence_hash`, then use the checked-in validator to\n     reread and rehash the artifact and revalidate the manifest and snapshot\n     from disk before implementation. Fabricated hashes, missing files,\n     altered evidence content, or evidence task\u002Frun pairs that differ from the\n     complete batch fail closed.\n   - Record the fallback reason, reused physical IDs, unique run ID, evidence\n     path\u002Fhash, and reload validation result in the implementation report.\n   Chat history or compaction summaries alone are forbidden handoff input and\n   cannot satisfy any reload step.\n   - **On resuming an interrupted task (WFI-044).** A provider quota limit,\n     rate limit, or any other interruption ends the implementing agent's turn,\n     so the agent that recorded `Isolation Mode: fresh-agent` is no longer the\n     one that knows what happened. Whenever you resume a task from a handoff\n     file after such an interruption, update that task's implementation report\n     isolation fields — mode, fallback reason, and reload evidence hash — to\n     the values that are now true, BEFORE continuing implementation. Leaving a\n     stale `fresh-agent` declaration over an interrupted-and-resumed run is the\n     RT-20260821-016 defect; `validate-implementation-report` now rejects that\n     contradiction, and the fix is always to make the declaration truthful,\n     never to remove the narrative that revealed it.\n5. The persisted manifest and immutable snapshot are the only task handoff in\n   either host path. If launch identity, snapshot validation, saved reload\n   evidence, or output-root enforcement cannot be established, fail closed\n   before implementation.\n6. Reviewer and evaluator fallback is forbidden. This implementation-only\n   fallback does not relax their distinct fresh, read-only, file-backed\n   context requirements.\n7. Set the selected task to `In Progress`.\n8. In the launched fresh agent, or the proven same-session file-reload\n   fallback, implement only the task's `Scope` and `Done When`, following\n   `references\u002Fimplementation-policy.md` in full.\n9. Add or update the task-required tests. When `Required Workflow: tdd`\n   (`high`\u002F`critical` risk), follow Red→Green: write the failing test first\n   and save its output, then implement until it passes and save the passing\n   output.\n10. Run related existing regression tests.\n11. Perform a scoped self-review against the approved specification.\n12. Delegate large-scope surveys following\n   `references\u002Fagent-delegation-policy.md`. Record delegation conclusions in\n   the Working Notes section of the implementation report immediately.\n13. Persist `reports\u002Fimplementation\u002F\u003Cfeature>\u002F\u003Ctask-id>.md` from the bundled template,\n    validate that all produced files are inside `allowed_outputs`, and return\n    only those file-backed artifacts to the batch orchestrator.\n14. Set the task to `Implementation Complete` only when implementation,\n   required tests, related regression tests, and the report are all complete.\nAfter the whole independent set finishes (barrier — the orchestrator waits for\nevery launched task to return `Implementation Complete` or `Blocked` before\ntouching shared state again):\n\n15. Re-evaluate the eligible set (Task Selection steps 1–4) — completed tasks may\n    unblock previously dependency-blocked tasks, forming the next independent set.\n16. If a new eligible set exists, loop back to the start of the Implementation\n    Loop and dispatch it. Otherwise proceed to **Completion Check**.\n\n## Block And Stop\n\nSet the current task to `Blocked`, record the blocker, and stop the entire\nbatch when:\n\n- Requirements or design are ambiguous.\n- Requirement, architecture, authentication, authorization, breaking-API, or\n  security decisions are required.\n- Unrelated changes conflict with the task.\n- Required tests cannot be run.\n- The requested work exceeds the approved scope.\n\nReturn specification gaps to `sdd-bootstrap-interviewer`. Do not resolve them\nby guessing. On resumption, re-invoke this skill — it re-evaluates eligibility\nand picks up from the first incomplete eligible task automatically.\n\n## Completion Check and Auto Quality-Gate Transition\n\nAfter each task reaches `Implementation Complete`, evaluate:\n\n**All-done condition**: every task in `tasks.md` with `Approval: Approved`\nhas `Status: Implementation Complete` or `Status: Done`.\n\n### If the all-done condition IS met\n\n1. Report to the user: list all tasks now at `Implementation Complete`.\n2. **Automatically start `quality-gate`** for the feature, processing tasks\n   in `tasks.md` order, beginning with the first `Implementation Complete`\n   task. Follow the `quality-gate` skill (in `plugins\u002Fsdd-quality-loop`)\n   in full for each task.\n\n### If the all-done condition is NOT met\n\nReport which approved tasks remain and their current blocking reason\n(dependency-blocked, still `Blocked`, or pending approval), then stop.\nDo not start quality-gate until the all-done condition is satisfied.\n\n## Boundaries\n\n- Do not start quality-gate mid-batch for individual tasks; only start it\n  when **all** approved tasks are `Implementation Complete`.\n- Do not set any task to `Done`; only `quality-gate` may do that.\n- Do not commit, push, or create a PR\u002FMR unless explicitly requested.\n- Do not start a task whose `Approval` is not `Approved`.\n- Do not run the full repository quality gate unless required by a task.\n- Do not perform independent critical review or Playwright visual verification\n  during the implementation loop (those happen in quality-gate).\n","> **Caller**: This skill is invoked by `sdd-ship`. Do not invoke directly.\n> Results are returned to the caller; no downstream skill is auto-invoked.\n\n# Implement Tasks (Batch)\n\nImplement all approved tasks for a feature in dependency order.\nAfter every approved task reaches `Implementation Complete`, automatically\ninvoke `quality-gate` for the feature.\n\n## Managed allocation boundary\n\nAffected policy roles: `implementer`.\n\nApply this boundary only when the caller explicitly selects managed routing\nwith a policy request or model controls, or this allocation continues that\nmanaged workflow. With no managed input, retain the legacy invocation and model\nhints below. Once managed is selected, do not switch that workflow to legacy\nbecause selection, validation or launch fails. No new environment toggle is\nrequired, and this boundary does not grant delegation or execution permission.\n\nFor a managed allocation, apply in the allocating parent before an unbound\nforked Skill\u002FAgent, native role, or fresh context receives work, and before any\nidentity reservation. This\nboundary takes precedence over later native\u002Fdefault launch guidance for these\nroles. It does not add an availability or authority gate.\n\nKeep an already admitted managed entry with its validated selection\u002Fcontrols and\nmatching role, host, run\u002Fsession and workload. Keep a concretely known matching\nbatch startup and fixed generated Codex configuration under their original\ncontracts. An already bound worker continues its original procedure: do not\nselect again, allocate again, or run this refusal inside that same worker.\nA bound parent does not bind a new child, role or session: each new allocation\nneeds its own admitted selection\u002Fcarrier binding or takes the refusal below.\n\nWhen this operation has no admitted binding of the selected model and effort to\nits actual native carrier, substitute the next affected policy role and actual\nhost (`claude-code`, `codex-cli`, `copilot-cli`, or `gemini-cli`) and execute:\n\n```bash\npython3 -I -B \"\u003Cinstalled-root>\"\u002Fplugins\u002Fsdd-implementation\u002Fscripts\u002Fmanaged-model-entry.py unsupported-entry \\\n  --role \"\u003Cpolicy-role>\" --host \"\u003Chost>\"\n```\n\nExit 2 with `model-policy-error\u002Fv1` \u002F `model-unavailable` stops that allocation\nbefore work or reservation. Do not fall through to an old model hint, alias,\nunbound native default or another parent session; do not count allocation alone\nas selection proof. This refusal does not assert host incapability and never\nauthorizes same-session reload. Original host-incapable-only implementation\nfallback evidence and all review isolation requirements remain unchanged.\n\nKeep the concretely known matching startup definition route below and every original batch manifest\u002Fsnapshot\u002Fidentity\u002Foutput admission, cap, barrier and fail-fast rule. This boundary cannot turn a capable host into an incapable one or change the exact incapable-host-only same-session reload exception.\n\n\n## Invocation\n\nClaude Code — internal skill, not directly invocable. Reached by following\nthis file from its entry command:\n\n```\n\u002Fsdd-ship:ship\n```\n\nCodex:\n\n```txt\nUse the implement-tasks skill for specs\u002F\u003Cfeature>\u002Ftasks.md\n```\n\n## Preconditions\n\nBefore reading any specification, verify that `AGENTS.md` exists at the\nrepository root and that `scripts\u002Fcheck-sdd-structure.sh` (or `.ps1`) reports\nno `missing:` items. If either check fails, stop immediately and direct the\nuser to run `\u002Fsdd-bootstrap:sdd-adopt`. Do not improvise project rules or\ninfer missing structure from context.\n\n## Required Reading\n\nRead `AGENTS.md`, the target feature requirements, design, tasks, acceptance\ntests, traceability, relevant ADRs and contracts,\n`references\u002Fimplementation-policy.md`, and\n`references\u002Fagent-delegation-policy.md`.\n\n### Sudo Mode\n\nIf a valid `SDD_SUDO` flag file exists at the project root (see\n`plugins\u002Fsdd-quality-loop\u002Freferences\u002Fsudo-mode-policy.md`), the per-task\napproval checkpoint auto-passes. Record\n`Approval: Approved (sudo \u003CISO8601 UTC>)` in tasks.md for each auto-passed\ntask.\n\nSudo does **not** bypass Block-and-Stop decisions: requirement, architecture,\nauthentication, authorization, breaking-API, or security decisions still\nrequire a human. Set the task to `Blocked` and defer to the human even under\nsudo.\n\n## Task Selection Algorithm\n\nExecute this algorithm before each implementation pass:\n\n1. Read `tasks.md` and collect all tasks.\n2. **Eligible set**: tasks where both of these hold:\n   - `Approval: Approved`\n   - `Status: Planned` or `Status: In Progress`\n   A task previously blocked with `terminal-tier-recurrence` is not eligible\n   until `check-terminal-tier-resume.sh` or `.ps1` validates a persisted\n   `terminal-tier-resume\u002Fv1` evidence file. Missing or forged diagnosis,\n   contract-revision, or human-reapproval evidence keeps it Blocked.\n3. **Dependency filter**: for each eligible task, parse its `### Blockers`\n   section.\n   - Scan for task-ID references matching the pattern `T-\\d+`.\n   - For each referenced task ID, check its `Status` in `tasks.md`.\n   - If the referenced task's `Status` is **not** `Implementation Complete`\n     or `Done`, remove the current task from the eligible set for this pass.\n   - A task with `### Blockers\\nNone` or a blank `### Blockers` section has\n     no dependencies and remains eligible once approved.\n4. **Independent set (parallel-eligible).** From the eligible set, take the\n   largest subset whose tasks each have a `### Blockers` section of `None` (or\n   empty) **and** whose `Scope` file lists are mutually disjoint — no two\n   selected tasks name the same implementation file. Use the same overlap test\n   as `SCOPE-DISJOINT` in\n   `plugins\u002Fsdd-review-loop\u002Fagents\u002Ftask-reviewer-b.md`: tasks that would modify\n   the same file for the same purpose must not share a set. Order the set by\n   appearance in `tasks.md`; if Scope overlap forces a choice, keep the earliest\n   task and defer the overlapping one to a later pass (sequential fallback).\n5. If no eligible task exists, report which tasks remain and why\n   (unapproved \u002F dependency-blocked \u002F all done), then stop and go to\n   **Completion Check**.\n\n## Implementation Loop\n\n### Managed Claude batch model routing\n\nUse this route only when managed routing was explicitly selected. Without\nmanaged inputs, retain the legacy procedure; never use it after a managed failure.\n\nFor a managed Claude batch, keep the original task selection, risk check,\nmanifest\u002Fsnapshot preparation, host-capability decision and complete persisted\nmanifest-set validation below. Before Agent dispatch, prepare each selected\nimplementer's native definition through the installed entry. This is configuration\npreparation and launches no task. Its selection\u002Fcontrols\u002Fvalidation retain the\noriginal T-007 validation; its stdout is one native `--agents` definition object.\n\n```bash\npython3 -I -B \"\u003Cinstalled-root>\"\u002Fplugins\u002Fsdd-implementation\u002Fscripts\u002Fmanaged-model-entry.py claude-batch-definition \\\n  --request \"\u003Cpolicy-request>\" --registry \"\u003Cregistry>\" --role implementer --host claude-code \\\n  --run-id \"\u003Crun-id>\" --session-id \"\u003Csession-id>\" --attempt \"\u003Cattempt>\" \\\n  --output-dir \"\u003Coutput-dir>\" --require-actual-id false\n```\n\nBind each generated definition to that exact validated selection. Use a native\nparent only when its actual startup loaded the identical definitions; retain the\npinned startup bytes as configuration evidence. A successful call to a custom\nname, or writing an agent file after startup, does not prove the loaded model and\neffort. Unknown or stale startup configuration must take this executable branch\nand stop the batch before any implementation:\n\n```bash\npython3 -I -B \"\u003Cinstalled-root>\"\u002Fplugins\u002Fsdd-implementation\u002Fscripts\u002Fmanaged-model-entry.py unsupported-entry --role implementer --host claude-code\n```\n\nThis is a typed unsupported routing result. It does not assert that the host\ncannot create implementation subagents, and cannot authorize same-session reload.\nSchema, selection, model, configuration and native allocation failures also stop;\nthey never authorize that fallback. A known matching startup remains eligible for\nthe original fresh-Agent path, subject to every original handoff admission below.\nDo not inspect an unknown parent's argv, credentials, profiles or session stores.\nIf an owned fresh CLI parent is used to load these definitions, it runs this same\norchestrator with ordinary settings, hooks, tools and permissions preserved; no\nsingle-task `claude-entry` worker replaces batch children.\n\nFor each task admitted by the original manifest\u002Fsnapshot checks, make the original\nnative Agent call with its generated name and file-backed input only:\n\n```json\n{\"subagent_type\":\"\u003Cmanaged-definition-name>\",\"prompt\":\"Manifest: \u003Cvalidated-manifest-path>; immutable snapshot: \u003Cvalidated-snapshot-root>; writable outputs: \u003Cdeclared-output-roots>. Follow the original one-task worker procedure; return file-backed artifacts only.\"}\n```\n\nThe exact full native model and effort live in the startup definition. Omit\nper-call `model` and `effort`; their alias\u002Fdefault interpretation cannot replace\nthat selection. Do not infer backend identity from successful allocation. Preserve\nthe existing manifest `session_id` and `agent_instance_id` admission, whose grammar\nis nonempty identifiers rather than UUID-only. Neither a tool-use ID nor a returned\nAgent ID automatically proves both fields; if the original pre-work identity and\noutput-root admission cannot be established, stop before work as already required.\n\nKeep the up-to-4 concurrent Claude cap, earliest-four then deferred remainder,\ncomplete persisted manifest set across passes, immutable snapshot per child,\nnon-reuse across all tasks, parent-only shared status\u002Freport acceptance,\nbarrier and Blocked fail-fast rules below unchanged. Generated definitions and\ncall-shape fixtures prove configuration, not actual model\u002Feffort or full native\nbatch execution. Native batch acceptance remains unproven until those original\nadmission requirements and the actual batch behavior are demonstrated.\n\n\n\n`implement-tasks` is an orchestrator. It selects work, creates and validates\nthe file-backed handoff, launches the implementation context, and consumes the\npersisted result. It does not implement a selected task in the batch\norchestrator's accumulated conversation.\n\nBefore the first launch, detect whether the host can create implementation\nsubagents and persist one capability decision for the complete batch. Every\nmanifest in the batch MUST use the mode selected by that decision; mixed\n`fresh-agent` and `same-session-file-reload` batches are invalid. A capable\nhost MUST use the fresh-agent path. The fallback path is permitted only when\nthe host explicitly reports that implementation subagents are unavailable\nwith reason `host-does-not-support-implementation-subagents`.\n\n**Parallel dispatch of the independent set.** Launch every task in the current\nindependent set (Task Selection step 4) concurrently — their `Scope` file lists\nare disjoint, so the fresh-agent handoffs never write the same file. Concurrency\ncaps: **Claude Code — up to 4 fresh agents per pass**, dispatched in a single\nassistant message; **Codex — up to (CPU count − 2)**, each launched as a parallel\nprocess and joined with `wait`. If the set exceeds the cap, take the earliest N\nand defer the rest. A set of size 1, or any Scope-overlapping remainder, runs\nsequentially.\n\n**The orchestrator is the only writer of shared state.** Launched agents return\nonly their file-backed artifacts (manifest, snapshot outputs, implementation\nreport); they never mutate `tasks.md` or another task's\n`reports\u002Fimplementation\u002F` entry. The orchestrator serializes every `tasks.md`\nstatus transition and report acceptance after a worker returns, so concurrent\ntasks cannot interleave shared writes. **Fail fast:** the moment any task in the\nset returns `Blocked`, stop dispatching further passes and follow **Block And\nStop** for the batch (in-flight siblings may finish, but no new pass starts).\n\nFor each task in the set (run these concurrently across the set):\n\n1. Inspect `git status` and `git diff`. Preserve unrelated existing changes.\n   If they conflict with the task scope, set the task to `Blocked` and stop.\n2. Use the checked-in routing, risk, snapshot, and manifest scripts to select\n   the model, allocate a new task\u002Frun identity, build a hash-bound task input\n   manifest, publish the immutable snapshot, and validate it with\n   `plugins\u002Fsdd-implementation\u002Fscripts\u002Fprepare-task-snapshot.sh` or `.ps1`\n   and `validate-task-input-manifest.sh` or `.ps1`. Keep every manifest in the\n   persisted batch manifest set and run the validator's batch mode over the\n   complete set before launch. For fallback batches, pass the persisted\n   evidence root to `--evidence-root` or `-EvidenceRoot`; the validator rereads\n   the evidence file from disk and binds it to the complete manifest set.\n   Deterministic parsing, validation, hashing, identity checks, and state\n   transitions are performed by checked-in scripts rather than by model\n   judgment.\n3. On a subagent-capable host, launch exactly one fresh implementation agent\n   for the selected T-NNN. Give it only the validated immutable snapshot,\n   manifest, and declared writable output roots. Do not pass chat history,\n   conversation summaries, or the orchestrator's working context. Never reuse\n   a run, session, or `agent_instance_id` from any earlier batch task, whether\n   adjacent or nonadjacent, and never assign the launched agent another task.\n4. On a host that explicitly cannot create implementation subagents, use\n   `same-session-file-reload` only after all of the following hold:\n   - Persist the manifest, immutable snapshot, implementation report location,\n     explicit host-capability fallback reason, unique task ID, and unique run\n     ID.\n   - Record the reused physical session and agent IDs. Reuse of a task or run\n     ID is forbidden.\n   - Save the closed JSON evidence artifact at\n     `handoffs\u002Freload-evidence.txt`. It MUST use schema\n     `implementation-host-capability\u002Fv1`, record\n     `implementation_subagents_available: false`, the exact incapable-host\n     reason, reused physical session\u002Fagent IDs, and the complete batch's\n     task\u002Frun pairs.\n   - Include that evidence path and lowercase SHA-256 in every manifest's\n     `allowed_inputs`, set the same SHA-256 as\n     `handoff_reload_evidence_hash`, then use the checked-in validator to\n     reread and rehash the artifact and revalidate the manifest and snapshot\n     from disk before implementation. Fabricated hashes, missing files,\n     altered evidence content, or evidence task\u002Frun pairs that differ from the\n     complete batch fail closed.\n   - Record the fallback reason, reused physical IDs, unique run ID, evidence\n     path\u002Fhash, and reload validation result in the implementation report.\n   Chat history or compaction summaries alone are forbidden handoff input and\n   cannot satisfy any reload step.\n   - **On resuming an interrupted task (WFI-044).** A provider quota limit,\n     rate limit, or any other interruption ends the implementing agent's turn,\n     so the agent that recorded `Isolation Mode: fresh-agent` is no longer the\n     one that knows what happened. Whenever you resume a task from a handoff\n     file after such an interruption, update that task's implementation report\n     isolation fields — mode, fallback reason, and reload evidence hash — to\n     the values that are now true, BEFORE continuing implementation. Leaving a\n     stale `fresh-agent` declaration over an interrupted-and-resumed run is the\n     RT-20260821-016 defect; `validate-implementation-report` now rejects that\n     contradiction, and the fix is always to make the declaration truthful,\n     never to remove the narrative that revealed it.\n5. The persisted manifest and immutable snapshot are the only task handoff in\n   either host path. If launch identity, snapshot validation, saved reload\n   evidence, or output-root enforcement cannot be established, fail closed\n   before implementation.\n6. Reviewer and evaluator fallback is forbidden. This implementation-only\n   fallback does not relax their distinct fresh, read-only, file-backed\n   context requirements.\n7. Set the selected task to `In Progress`.\n8. In the launched fresh agent, or the proven same-session file-reload\n   fallback, implement only the task's `Scope` and `Done When`, following\n   `references\u002Fimplementation-policy.md` in full.\n9. Add or update the task-required tests. When `Required Workflow: tdd`\n   (`high`\u002F`critical` risk), follow Red→Green: write the failing test first\n   and save its output, then implement until it passes and save the passing\n   output.\n10. Run related existing regression tests.\n11. Perform a scoped self-review against the approved specification.\n12. Delegate large-scope surveys following\n   `references\u002Fagent-delegation-policy.md`. Record delegation conclusions in\n   the Working Notes section of the implementation report immediately.\n13. Persist `reports\u002Fimplementation\u002F\u003Cfeature>\u002F\u003Ctask-id>.md` from the bundled template,\n    validate that all produced files are inside `allowed_outputs`, and return\n    only those file-backed artifacts to the batch orchestrator.\n14. Set the task to `Implementation Complete` only when implementation,\n   required tests, related regression tests, and the report are all complete.\nAfter the whole independent set finishes (barrier — the orchestrator waits for\nevery launched task to return `Implementation Complete` or `Blocked` before\ntouching shared state again):\n\n15. Re-evaluate the eligible set (Task Selection steps 1–4) — completed tasks may\n    unblock previously dependency-blocked tasks, forming the next independent set.\n16. If a new eligible set exists, loop back to the start of the Implementation\n    Loop and dispatch it. Otherwise proceed to **Completion Check**.\n\n## Block And Stop\n\nSet the current task to `Blocked`, record the blocker, and stop the entire\nbatch when:\n\n- Requirements or design are ambiguous.\n- Requirement, architecture, authentication, authorization, breaking-API, or\n  security decisions are required.\n- Unrelated changes conflict with the task.\n- Required tests cannot be run.\n- The requested work exceeds the approved scope.\n\nReturn specification gaps to `sdd-bootstrap-interviewer`. Do not resolve them\nby guessing. On resumption, re-invoke this skill — it re-evaluates eligibility\nand picks up from the first incomplete eligible task automatically.\n\n## Completion Check and Auto Quality-Gate Transition\n\nAfter each task reaches `Implementation Complete`, evaluate:\n\n**All-done condition**: every task in `tasks.md` with `Approval: Approved`\nhas `Status: Implementation Complete` or `Status: Done`.\n\n### If the all-done condition IS met\n\n1. Report to the user: list all tasks now at `Implementation Complete`.\n2. **Automatically start `quality-gate`** for the feature, processing tasks\n   in `tasks.md` order, beginning with the first `Implementation Complete`\n   task. Follow the `quality-gate` skill (in `plugins\u002Fsdd-quality-loop`)\n   in full for each task.\n\n### If the all-done condition is NOT met\n\nReport which approved tasks remain and their current blocking reason\n(dependency-blocked, still `Blocked`, or pending approval), then stop.\nDo not start quality-gate until the all-done condition is satisfied.\n\n## Boundaries\n\n- Do not start quality-gate mid-batch for individual tasks; only start it\n  when **all** approved tasks are `Implementation Complete`.\n- Do not set any task to `Done`; only `quality-gate` may do that.\n- Do not commit, push, or create a PR\u002FMR unless explicitly requested.\n- Do not start a task whose `Approval` is not `Approved`.\n- Do not run the full repository quality gate unless required by a task.\n- Do not perform independent critical review or Playwright visual verification\n  during the implementation loop (those happen in quality-gate).\n",{"name":5,"description":7,"user-invocable":19,"disable-model-invocation":19},"main","0f4e3268b5403855008ae089d3c1611430a41987","plugins\u002Fsdd-implementation\u002Fskills\u002Fimplement-tasks","https:\u002F\u002Fgithub.com\u002Faharada54914\u002Fsdd-forge","https:\u002F\u002Fgithub.com\u002Faharada54914","2026-11-15 02:49:38",{"source":8,"skillName":5,"commands":30,"prompt":40,"zipAvailable":41},[31,34,37],{"tool":32,"command":33},"npx","npx skills add aharada54914\u002Fsdd-forge --skill implement-tasks",{"tool":35,"command":36},"bunx","bunx skills add aharada54914\u002Fsdd-forge --skill implement-tasks",{"tool":38,"command":39},"pnpm","pnpm dlx skills add aharada54914\u002Fsdd-forge --skill implement-tasks","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Faharada54914\u002Fsdd-forge\u002Fblob\u002Fmain\u002Fplugins\u002Fsdd-implementation\u002Fskills\u002Fimplement-tasks\u002FSKILL.md",true,[],[44,52,59,66,73,80],{"skillNo":45,"name":46,"nameZh":6,"description":47,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":48,"categories":49,"keywords":50,"publishedAt":51},"01M7DY6PWMGRM0GFNBXAE2RP3K","status","Show a read-only Jira-style six-view SDD dashboard in the initiating parent's Sites or Claude Artifacts, with source freshness and failure visibility.","https:\u002F\u002Fgithub.com\u002Faharada54914\u002Fsdd-forge\u002Fblob\u002Fmain\u002Fplugins\u002Fsdd-ship\u002Fskills\u002Fstatus\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":53,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":58,"publishedAt":18},"01M75FN16WRENJ2A9CXZCXVKBQ","verify-review-reservation","Recheck the bounded identity-ledger reservation invariant after lock, hash-check or publication changes.","https:\u002F\u002Fgithub.com\u002Faharada54914\u002Fsdd-forge\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fproject-skills\u002Fformal-review-reservation\u002FSKILL.md",[],[],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":18},"01M75FMW90YZDCB7QNJ8K5KGKG","aws-cdk","Authors, deploys, and troubleshoots AWS infrastructure using CDK with TypeScript or Python. Covers best practices, stack architecture, and construct patterns. Applies when writing CDK constructs, bootstrapping environments, running cdk deploy\u002Fsynth\u002Fdiff, fixing CDK or CloudFormation errors, planning stack structure, importing existing resources, resolving drift, or refactoring stacks without resource replacement.","https:\u002F\u002Fgithub.com\u002Faharada54914\u002Fsdd-forge\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fcloud-orchestration\u002Faws-bundle\u002Fupstream\u002Fplugins\u002Faws-core\u002Fskills\u002Faws-cdk\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":18},"01M75FMSTFNT7EQSZY81T4WRHN","quality-gate","Independently verify an Implementation Complete task with a Default-FAIL verification contract, deterministic checks, and an isolated critical reviewer, then decide whether it is Done.","https:\u002F\u002Fgithub.com\u002Faharada54914\u002Fsdd-forge\u002Fblob\u002Fmain\u002Fspecs\u002Fsdd-domain-multitarget\u002Fverification\u002FT-003\u002Fattempt10-20261016\u002Fbaseline\u002Fplugins\u002Fsdd-quality-loop\u002Fskills\u002Fquality-gate\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":18},"01M75FMPM8FDE4NQ6FFY7KB83Y","ship","Implement approved SDD tasks through the quality gate to Done — the second of the two-command workflow. Run after \u002Fsdd-bootstrap:bootstrap and human task approval.","https:\u002F\u002Fgithub.com\u002Faharada54914\u002Fsdd-forge\u002Fblob\u002Fmain\u002Fspecs\u002Fquality-loop-fixes\u002Fhuman-copy\u002Fplugins\u002Fsdd-ship\u002Fskills\u002Fship\u002FSKILL.md",[],[],{"skillNo":81,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":18},"01M75FMK3G0EPXW77XK8ED3F2E","https:\u002F\u002Fgithub.com\u002Faharada54914\u002Fsdd-forge\u002Fblob\u002Fmain\u002Fspecs\u002Fmcp-readonly-preflight\u002Fhuman-copy\u002Fplugins\u002Fsdd-ship\u002Fskills\u002Fship\u002FSKILL.md",[],[]]