[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6CZRP2SHFEQ2B7WD9SD68KV":3,"skill-same:01M6CZRP2SHFEQ2B7WD9SD68KV":78},{"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":34,"linkOnly":35,"markdownContent":36,"markdownBody":37,"frontMatter":38,"refName":42,"commitSha":43,"skillDirectory":44,"forksCount":45,"repositoryHtmlUrl":46,"repositoryHomepageUrl":6,"ownerHtmlUrl":47,"ownerBlogUrl":48,"ownerDescription":49,"updatedAt":50,"install":51,"resources":63},"01M6CZRP2SHFEQ2B7WD9SD68KV","kiro-impl",null,"Implement approved tasks using TDD with native subagent dispatch. Runs all pending tasks autonomously or selected tasks manually.","j5ik2o\u002Fai-tools","j5ik2o","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F461711?v=4","01M6CR6HZJM242J0HDRJT5GY6J","Junichi Kato","01M6CZP6PXKYDDNX5A7PZ3P4DY",28,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fj5ik2o\u002Fai-tools\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fkiro-impl\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33],"kiro","kiro impl","implement","tdd","tasks","Bash","subagent","grep","read","write","edit","webfetch","dispatch","task","feature","2026-11-10 10:12:30",false,"---\nname: kiro-impl\ndescription: Implement approved tasks using TDD with native subagent dispatch. Runs all pending tasks autonomously or selected tasks manually.\ndisable-model-invocation: true\nallowed-tools: Read, Write, Edit, MultiEdit, Bash, Glob, Grep, Agent, WebSearch, WebFetch\nargument-hint: \u003Cfeature-name> [task-numbers]\n---\n\n# kiro-impl Skill\n\n## Role\nYou operate in two modes:\n- **Autonomous mode** (no task numbers): Dispatch a fresh subagent per task, with independent review after each\n- **Manual mode** (task numbers provided): Execute selected tasks directly in the main context\n\n## Core Mission\n- **Success Criteria**:\n  - All tests written before implementation code\n  - Code passes all tests with no regressions\n  - Tasks marked as completed in tasks.md\n  - Implementation aligns with design and requirements\n  - Independent reviewer approves each task before completion\n\n## Execution Steps\n\n### Step 1: Gather Context\n\nIf steering\u002Fspec context is already available from conversation, skip redundant file reads.\nOtherwise, load all necessary context:\n- `.kiro\u002Fspecs\u002F{feature}\u002Fspec.json`, `requirements.md`, `design.md`, `tasks.md`\n- Core steering context: `product.md`, `tech.md`, `structure.md`\n- Additional steering files only when directly relevant to the selected task's boundary, runtime prerequisites, integrations, domain rules, security\u002Fperformance constraints, or team conventions that affect implementation or validation\n- Relevant local agent skills or playbooks only when they clearly match the task's host environment or use case; read the specific artifact(s) you need, not entire directories\n\n#### Parallel Research\n\nThe following research areas are independent and can be executed in parallel:\n1. **Spec context loading**: spec.json, requirements.md, design.md, tasks.md\n2. **Steering, playbooks, & patterns**: Core steering, task-relevant extra steering, matching local agent skills\u002Fplaybooks, and existing code patterns\n\nAfter all parallel research completes, synthesize implementation brief before starting.\n\n#### Preflight\n\n**Validate approvals**:\n- Verify tasks are approved in spec.json (stop if not, see Safety & Fallback)\n\n**Discover validation commands**:\n- Inspect repository-local sources of truth in this order: project scripts\u002Fmanifests (`package.json`, `pyproject.toml`, `go.mod`, `Cargo.toml`, app manifests), task runners (`Makefile`, `justfile`), CI\u002Fworkflow files, existing e2e\u002Fintegration configs, then `README*`\n- Derive a canonical validation set for this repo: `TEST_COMMANDS`, `BUILD_COMMANDS`, and `SMOKE_COMMANDS`\n- Prefer commands already used by repo automation over ad hoc shell pipelines\n- For `SMOKE_COMMANDS`, choose the lightest trustworthy runtime-liveness check for the app shape (for example: root URL load, Electron launch, CLI `--help`, service health endpoint, mobile simulator\u002Fe2e harness if one already exists)\n- Keep the full command set in the parent context, and pass only the task-relevant subset to implementer and reviewer subagents\n\n**Establish repo baseline**:\n- Run `git status --porcelain` and note any pre-existing uncommitted changes\n\n### Step 2: Select Tasks & Determine Mode\n\n**Parse arguments**:\n- Extract feature name from first argument\n- If task numbers provided (e.g., \"1.1\" or \"1,2,3\"): **manual mode**\n- If no task numbers: **autonomous mode** (all pending tasks)\n\n**Build task queue**:\n- Read tasks.md, identify actionable sub-tasks (X.Y numbering like 1.1, 2.3)\n- Major tasks (1., 2.) are grouping headers, not execution units\n- Skip tasks with `_Blocked:_` annotation\n- For each selected task, check `_Depends:_` annotations -- verify referenced tasks are `[x]`\n- If prerequisites incomplete, execute them first or warn the user\n- Use `_Boundary:_` annotations to understand the task's component scope\n\n### Step 3: Execute Implementation\n\n#### Autonomous Mode (subagent dispatch)\n\n**Iteration discipline**: Process exactly ONE sub-task (e.g., 1.1) per iteration. Do NOT batch multiple sub-tasks into a single subagent dispatch. Each iteration follows the full cycle: dispatch implementer → review → commit → re-read tasks.md → next.\n\n**Context management**: At the start of each iteration, re-read `tasks.md` to determine the next actionable sub-task. Do NOT rely on accumulated memory of previous iterations. After completing each iteration, retain only a one-line summary (e.g., \"1.1: READY_FOR_REVIEW, 3 files changed\") and discard the full status report and reviewer details.\n\nFor each task (one at a time):\n\n**a) Dispatch implementer**:\n- Read `templates\u002Fimplementer-prompt.md` from this skill's directory\n- Construct a prompt by combining the template with task-specific context:\n  - Task description and boundary scope\n  - Paths to spec files: requirements.md, design.md, tasks.md\n  - Exact requirement and design section numbers this task must satisfy (using source numbering, NOT invented `REQ-*` aliases)\n  - Task-relevant steering context and parent-discovered validation commands (tests\u002Fbuild\u002Fsmoke as relevant)\n  - Whether the task is behavioral (Feature Flag Protocol) or non-behavioral\n  - **Previous learnings**: Include any `## Implementation Notes` entries from tasks.md that are relevant to this task's boundary or dependencies (e.g., \"better-sqlite3 requires separate rebuild for Electron\"). This prevents the same mistakes from recurring.\n- The implementer subagent will read the spec files and build its own Task Brief (acceptance criteria, completion definition, design constraints, verification method) before implementation\n- Dispatch via **Agent tool** as a fresh subagent\n\n**b) Handle implementer status**:\n- Parse implementer status only from the exact `## Status Report` block and `- STATUS:` field.\n- If `STATUS` is missing, ambiguous, or replaced with prose, re-dispatch the implementer once requesting the exact structured status block only. Do NOT proceed to review without a parseable `READY_FOR_REVIEW | BLOCKED | NEEDS_CONTEXT` value.\n- **READY_FOR_REVIEW** → proceed to review\n- **BLOCKED** → dispatch debug subagent (see section below); do NOT immediately skip\n- **NEEDS_CONTEXT** → re-dispatch once with the requested additional context; if still unresolved → dispatch debug subagent\n\n**c) Dispatch reviewer**:\n- Read `templates\u002Freviewer-prompt.md` from this skill's directory\n- Construct a review prompt with:\n  - The task description and relevant spec section numbers\n  - Paths to spec files (requirements.md, design.md) so the reviewer can read them directly\n  - The implementer's status report (for reference only — reviewer must verify independently)\n- The reviewer must apply the `kiro-review` protocol to this task-local review.\n- Preserve the existing task-specific context: task text, spec refs, `_Boundary:_` scope, validation commands, implementer report, and the actual `git diff` as the primary source of truth.\n- The reviewer subagent will run `git diff` itself to read the actual code changes and verify against the spec\n- Dispatch via **Agent tool** as a fresh subagent\n\n**d) Handle reviewer verdict**:\n- Parse reviewer verdict only from the exact `## Review Verdict` block and `- VERDICT:` field.\n- If `VERDICT` is missing, ambiguous, or replaced with prose, re-dispatch the reviewer once requesting the exact structured verdict only. Do NOT mark the task complete, commit, or continue to the next task without a parseable `APPROVED | REJECTED` value.\n- **APPROVED** → before marking the task `[x]` or making any success claim, apply `kiro-verify-completion` using fresh evidence from the current code state; then mark task `[x]` in tasks.md and perform selective git commit\n- **REJECTED (round 1-2)** → re-dispatch implementer with review feedback\n- **REJECTED (round 3)** → dispatch debug subagent (see section below)\n\n**e) Commit** (parent-only, selective staging):\n- Stage only the files actually changed for this task, plus tasks.md\n- **NEVER** use `git add -A` or `git add .`\n- Use `git add \u003Cfile1> \u003Cfile2> ...` with explicit file paths\n- Commit message format: `feat(\u003Cfeature-name>): \u003Ctask description>`\n\n**f) Record learnings**:\n- If this task revealed cross-cutting insights, append a one-line note to the `## Implementation Notes` section at the bottom of tasks.md\n\n**g) Debug subagent** (triggered by BLOCKED, NEEDS_CONTEXT unresolved, or REJECTED after 2 remediation rounds):\n\nThe debug subagent runs in a **fresh context** — it receives only the error information, not the failed implementation history. This avoids the context pollution that causes infinite retry loops.\n\n- Read `templates\u002Fdebugger-prompt.md` from this skill's directory\n- Construct a debug prompt with:\n  - The error description \u002F blocker reason \u002F reviewer rejection findings\n  - `git diff` of the current uncommitted changes\n  - The task description and relevant spec section numbers\n  - Paths to spec files so the debugger can read them\n- The debugger must apply the `kiro-debug` protocol to this failure investigation.\n- Preserve rich failure context: error output, reviewer findings, current `git diff`, task\u002Fspec refs, and any relevant Implementation Notes.\n- When available, the debugger should inspect runtime\u002Fconfig state and use web or official documentation research to validate root-cause hypotheses before proposing a fix plan.\n- Dispatch via **Agent tool** as a fresh subagent\n\n**Handle debug report**:\n- Parse `NEXT_ACTION` from the debug report's exact structured field.\n- If `NEXT_ACTION: STOP_FOR_HUMAN` → append `_Blocked: \u003CROOT_CAUSE>_` to tasks.md, stop the feature run, and report that human review is required before continuing\n- If `NEXT_ACTION: BLOCK_TASK` → append `_Blocked: \u003CROOT_CAUSE>_` to tasks.md, skip to next task\n- If `NEXT_ACTION: RETRY_TASK` → preserve the current worktree; do NOT reset or discard unrelated changes. Spawn a **new** implementer subagent with the debug report's `FIX_PLAN`, `NOTES`, and the current `git diff`, and require it to repair the task with explicit edits only\n  - If the new implementer succeeds (READY_FOR_REVIEW → reviewer APPROVED) → normal flow\n  - If the new implementer also fails → repeat debug cycle (max 2 debug rounds total). After 2 failed debug rounds → append `_Blocked: debug attempted twice, still failing — \u003CROOT_CAUSE>_` to tasks.md, skip\n- **Max 2 debug rounds per task**. Each round: fresh debug subagent → fresh implementer. If still failing after 2 rounds, the task is blocked.\n- Record debug findings in `## Implementation Notes` (this helps subsequent tasks avoid the same issue)\n\n**`(P)` markers**: Tasks marked `(P)` in tasks.md indicate they have no inter-dependencies and could theoretically run in parallel. However, kiro-impl processes them sequentially (one at a time) to avoid git conflicts and simplify review. The `(P)` marker is informational for task planning, not an execution directive.\n\n**Completion check**: If all remaining tasks are BLOCKED, stop and report blocked tasks with reasons to the user.\n\n#### Manual Mode (main context)\n\nFor each selected task:\n\n**1. Build Task Brief**:\nBefore writing any code, read the relevant sections of requirements.md and design.md for this task and clarify:\n- What observable behaviors must be true when done (acceptance criteria)\n- What files\u002Ffunctions\u002Ftests must exist (completion definition)\n- What technical decisions to follow from design.md (design constraints)\n- How to confirm the task works (verification method)\n\n**2. Execute TDD cycle** (Kent Beck's RED → GREEN → REFACTOR):\n- **RED**: Write test for the next small piece of functionality based on the acceptance criteria. Test should fail.\n- **GREEN**: Implement simplest solution to make test pass, following the design constraints.\n- **REFACTOR**: Improve code structure, remove duplication. All tests must still pass.\n- **VERIFY**: All tests pass (new and existing), no regressions. Confirm verification method passes.\n- **REVIEW**: Apply `kiro-review` before marking the task complete. If the host supports fresh subagents in manual mode, use a fresh reviewer; otherwise perform the review in the main context using the `kiro-review` protocol. Do NOT continue until the verdict is parseably `APPROVED`.\n- **MARK COMPLETE**: Only after review returns `APPROVED`, apply `kiro-verify-completion`, then update the checkbox from `- [ ]` to `- [x]` in tasks.md.\n\n### Step 4: Final Validation\n\n**Autonomous mode**:\n- After all tasks complete, run `\u002Fkiro-validate-impl {feature}` as a GO\u002FNO-GO gate\n- If validation returns GO → before reporting feature success, apply `kiro-verify-completion` to the feature-level claim using the validation result and fresh supporting evidence\n- If validation returns NO-GO:\n  - Fix only concrete findings from the validation report\n  - Cap remediation at 3 rounds; if still NO-GO, stop and report remaining findings\n- If validation returns MANUAL_VERIFY_REQUIRED → stop and report the missing verification step\n\n**Manual mode**:\n- Suggest running `\u002Fkiro-validate-impl {feature}` but do not auto-execute\n\n## Feature Flag Protocol\n\nFor tasks that add or change behavior, enforce RED → GREEN with a feature flag:\n\n1. **Add flag** (OFF by default): Introduce a toggle appropriate to the codebase (env var, config constant, boolean, conditional -- agent chooses the mechanism)\n2. **RED -- flag OFF**: Write tests for the new behavior. Run tests → must FAIL. If tests pass with flag OFF, the tests are not testing the right thing. Rewrite.\n3. **GREEN -- flag ON + implement**: Enable the flag, write implementation. Run tests → must PASS.\n4. **Remove flag**: Make the code unconditional. Run tests → must still PASS.\n\n**Skip this protocol for**: refactoring, configuration, documentation, or tasks with no behavioral change.\n\n## Critical Constraints\n- **Strict Handoff Parsing**: Never infer implementer `STATUS` or reviewer `VERDICT` from surrounding prose; only the exact structured fields count\n- **No Destructive Reset**: Never use `git checkout .`, `git reset --hard`, or similar destructive rollback inside the implementation loop\n- **Selective Staging**: NEVER use `git add -A` or `git add .`; always stage explicit file paths\n- **Bounded Review Rounds**: Max 2 implementer re-dispatch rounds per reviewer rejection, then debug\n- **Bounded Debug**: Max 2 debug rounds per task (debug + re-implementation per round); if still failing → BLOCKED\n- **Bounded Remediation**: Cap final-validation remediation at 3 rounds\n\n## Output Description\n\n**Autonomous mode**: For each task, report:\n1. Task ID, implementer status, reviewer verdict\n2. Files changed, commit hash\n3. After all tasks: final validation result (GO\u002FNO-GO)\n\n**Manual mode**:\n1. Tasks executed: task numbers and test results\n2. Status: completed tasks marked in tasks.md, remaining tasks count\n\n**Format**: Concise, in the language specified in spec.json.\n\n## Safety & Fallback\n\n### Error Scenarios\n\n**Tasks Not Approved or Missing Spec Files**:\n- **Stop Execution**: All spec files must exist and tasks must be approved\n- **Suggested Action**: \"Complete previous phases: `\u002Fkiro-spec-requirements`, `\u002Fkiro-spec-design`, `\u002Fkiro-spec-tasks`\"\n\n**Test Failures**:\n- **Stop Implementation**: Fix failing tests before continuing\n- **Action**: Debug and fix, then re-run\n\n**All Tasks Blocked**:\n- Stop and report all blocked tasks with reasons\n- Human review needed to resolve blockers\n\n**Spec Conflicts with Reality**:\n- If a requirement or design conflicts with reality (API doesn't exist, platform limitation), block the task with `_Blocked: \u003Creason>_` -- do not silently work around it\n\n**Upstream Ownership Detected**:\n- If review, debug, or validation shows that the root cause belongs to an upstream, foundation, shared-platform, or dependency spec, do not patch around it inside the downstream feature\n- Route the fix back to the owning upstream spec, keep the downstream task blocked until that contract is repaired, and re-run validation\u002Fsmoke for dependent specs after the upstream fix lands\n\n**Task Plan Invalidated During Implementation**:\n- If debug returns `NEXT_ACTION: STOP_FOR_HUMAN` because of task ordering, boundary, or decomposition problems, stop and return for human review of `tasks.md` or the approved plan instead of forcing a code workaround\n","# kiro-impl Skill\n\n## Role\nYou operate in two modes:\n- **Autonomous mode** (no task numbers): Dispatch a fresh subagent per task, with independent review after each\n- **Manual mode** (task numbers provided): Execute selected tasks directly in the main context\n\n## Core Mission\n- **Success Criteria**:\n  - All tests written before implementation code\n  - Code passes all tests with no regressions\n  - Tasks marked as completed in tasks.md\n  - Implementation aligns with design and requirements\n  - Independent reviewer approves each task before completion\n\n## Execution Steps\n\n### Step 1: Gather Context\n\nIf steering\u002Fspec context is already available from conversation, skip redundant file reads.\nOtherwise, load all necessary context:\n- `.kiro\u002Fspecs\u002F{feature}\u002Fspec.json`, `requirements.md`, `design.md`, `tasks.md`\n- Core steering context: `product.md`, `tech.md`, `structure.md`\n- Additional steering files only when directly relevant to the selected task's boundary, runtime prerequisites, integrations, domain rules, security\u002Fperformance constraints, or team conventions that affect implementation or validation\n- Relevant local agent skills or playbooks only when they clearly match the task's host environment or use case; read the specific artifact(s) you need, not entire directories\n\n#### Parallel Research\n\nThe following research areas are independent and can be executed in parallel:\n1. **Spec context loading**: spec.json, requirements.md, design.md, tasks.md\n2. **Steering, playbooks, & patterns**: Core steering, task-relevant extra steering, matching local agent skills\u002Fplaybooks, and existing code patterns\n\nAfter all parallel research completes, synthesize implementation brief before starting.\n\n#### Preflight\n\n**Validate approvals**:\n- Verify tasks are approved in spec.json (stop if not, see Safety & Fallback)\n\n**Discover validation commands**:\n- Inspect repository-local sources of truth in this order: project scripts\u002Fmanifests (`package.json`, `pyproject.toml`, `go.mod`, `Cargo.toml`, app manifests), task runners (`Makefile`, `justfile`), CI\u002Fworkflow files, existing e2e\u002Fintegration configs, then `README*`\n- Derive a canonical validation set for this repo: `TEST_COMMANDS`, `BUILD_COMMANDS`, and `SMOKE_COMMANDS`\n- Prefer commands already used by repo automation over ad hoc shell pipelines\n- For `SMOKE_COMMANDS`, choose the lightest trustworthy runtime-liveness check for the app shape (for example: root URL load, Electron launch, CLI `--help`, service health endpoint, mobile simulator\u002Fe2e harness if one already exists)\n- Keep the full command set in the parent context, and pass only the task-relevant subset to implementer and reviewer subagents\n\n**Establish repo baseline**:\n- Run `git status --porcelain` and note any pre-existing uncommitted changes\n\n### Step 2: Select Tasks & Determine Mode\n\n**Parse arguments**:\n- Extract feature name from first argument\n- If task numbers provided (e.g., \"1.1\" or \"1,2,3\"): **manual mode**\n- If no task numbers: **autonomous mode** (all pending tasks)\n\n**Build task queue**:\n- Read tasks.md, identify actionable sub-tasks (X.Y numbering like 1.1, 2.3)\n- Major tasks (1., 2.) are grouping headers, not execution units\n- Skip tasks with `_Blocked:_` annotation\n- For each selected task, check `_Depends:_` annotations -- verify referenced tasks are `[x]`\n- If prerequisites incomplete, execute them first or warn the user\n- Use `_Boundary:_` annotations to understand the task's component scope\n\n### Step 3: Execute Implementation\n\n#### Autonomous Mode (subagent dispatch)\n\n**Iteration discipline**: Process exactly ONE sub-task (e.g., 1.1) per iteration. Do NOT batch multiple sub-tasks into a single subagent dispatch. Each iteration follows the full cycle: dispatch implementer → review → commit → re-read tasks.md → next.\n\n**Context management**: At the start of each iteration, re-read `tasks.md` to determine the next actionable sub-task. Do NOT rely on accumulated memory of previous iterations. After completing each iteration, retain only a one-line summary (e.g., \"1.1: READY_FOR_REVIEW, 3 files changed\") and discard the full status report and reviewer details.\n\nFor each task (one at a time):\n\n**a) Dispatch implementer**:\n- Read `templates\u002Fimplementer-prompt.md` from this skill's directory\n- Construct a prompt by combining the template with task-specific context:\n  - Task description and boundary scope\n  - Paths to spec files: requirements.md, design.md, tasks.md\n  - Exact requirement and design section numbers this task must satisfy (using source numbering, NOT invented `REQ-*` aliases)\n  - Task-relevant steering context and parent-discovered validation commands (tests\u002Fbuild\u002Fsmoke as relevant)\n  - Whether the task is behavioral (Feature Flag Protocol) or non-behavioral\n  - **Previous learnings**: Include any `## Implementation Notes` entries from tasks.md that are relevant to this task's boundary or dependencies (e.g., \"better-sqlite3 requires separate rebuild for Electron\"). This prevents the same mistakes from recurring.\n- The implementer subagent will read the spec files and build its own Task Brief (acceptance criteria, completion definition, design constraints, verification method) before implementation\n- Dispatch via **Agent tool** as a fresh subagent\n\n**b) Handle implementer status**:\n- Parse implementer status only from the exact `## Status Report` block and `- STATUS:` field.\n- If `STATUS` is missing, ambiguous, or replaced with prose, re-dispatch the implementer once requesting the exact structured status block only. Do NOT proceed to review without a parseable `READY_FOR_REVIEW | BLOCKED | NEEDS_CONTEXT` value.\n- **READY_FOR_REVIEW** → proceed to review\n- **BLOCKED** → dispatch debug subagent (see section below); do NOT immediately skip\n- **NEEDS_CONTEXT** → re-dispatch once with the requested additional context; if still unresolved → dispatch debug subagent\n\n**c) Dispatch reviewer**:\n- Read `templates\u002Freviewer-prompt.md` from this skill's directory\n- Construct a review prompt with:\n  - The task description and relevant spec section numbers\n  - Paths to spec files (requirements.md, design.md) so the reviewer can read them directly\n  - The implementer's status report (for reference only — reviewer must verify independently)\n- The reviewer must apply the `kiro-review` protocol to this task-local review.\n- Preserve the existing task-specific context: task text, spec refs, `_Boundary:_` scope, validation commands, implementer report, and the actual `git diff` as the primary source of truth.\n- The reviewer subagent will run `git diff` itself to read the actual code changes and verify against the spec\n- Dispatch via **Agent tool** as a fresh subagent\n\n**d) Handle reviewer verdict**:\n- Parse reviewer verdict only from the exact `## Review Verdict` block and `- VERDICT:` field.\n- If `VERDICT` is missing, ambiguous, or replaced with prose, re-dispatch the reviewer once requesting the exact structured verdict only. Do NOT mark the task complete, commit, or continue to the next task without a parseable `APPROVED | REJECTED` value.\n- **APPROVED** → before marking the task `[x]` or making any success claim, apply `kiro-verify-completion` using fresh evidence from the current code state; then mark task `[x]` in tasks.md and perform selective git commit\n- **REJECTED (round 1-2)** → re-dispatch implementer with review feedback\n- **REJECTED (round 3)** → dispatch debug subagent (see section below)\n\n**e) Commit** (parent-only, selective staging):\n- Stage only the files actually changed for this task, plus tasks.md\n- **NEVER** use `git add -A` or `git add .`\n- Use `git add \u003Cfile1> \u003Cfile2> ...` with explicit file paths\n- Commit message format: `feat(\u003Cfeature-name>): \u003Ctask description>`\n\n**f) Record learnings**:\n- If this task revealed cross-cutting insights, append a one-line note to the `## Implementation Notes` section at the bottom of tasks.md\n\n**g) Debug subagent** (triggered by BLOCKED, NEEDS_CONTEXT unresolved, or REJECTED after 2 remediation rounds):\n\nThe debug subagent runs in a **fresh context** — it receives only the error information, not the failed implementation history. This avoids the context pollution that causes infinite retry loops.\n\n- Read `templates\u002Fdebugger-prompt.md` from this skill's directory\n- Construct a debug prompt with:\n  - The error description \u002F blocker reason \u002F reviewer rejection findings\n  - `git diff` of the current uncommitted changes\n  - The task description and relevant spec section numbers\n  - Paths to spec files so the debugger can read them\n- The debugger must apply the `kiro-debug` protocol to this failure investigation.\n- Preserve rich failure context: error output, reviewer findings, current `git diff`, task\u002Fspec refs, and any relevant Implementation Notes.\n- When available, the debugger should inspect runtime\u002Fconfig state and use web or official documentation research to validate root-cause hypotheses before proposing a fix plan.\n- Dispatch via **Agent tool** as a fresh subagent\n\n**Handle debug report**:\n- Parse `NEXT_ACTION` from the debug report's exact structured field.\n- If `NEXT_ACTION: STOP_FOR_HUMAN` → append `_Blocked: \u003CROOT_CAUSE>_` to tasks.md, stop the feature run, and report that human review is required before continuing\n- If `NEXT_ACTION: BLOCK_TASK` → append `_Blocked: \u003CROOT_CAUSE>_` to tasks.md, skip to next task\n- If `NEXT_ACTION: RETRY_TASK` → preserve the current worktree; do NOT reset or discard unrelated changes. Spawn a **new** implementer subagent with the debug report's `FIX_PLAN`, `NOTES`, and the current `git diff`, and require it to repair the task with explicit edits only\n  - If the new implementer succeeds (READY_FOR_REVIEW → reviewer APPROVED) → normal flow\n  - If the new implementer also fails → repeat debug cycle (max 2 debug rounds total). After 2 failed debug rounds → append `_Blocked: debug attempted twice, still failing — \u003CROOT_CAUSE>_` to tasks.md, skip\n- **Max 2 debug rounds per task**. Each round: fresh debug subagent → fresh implementer. If still failing after 2 rounds, the task is blocked.\n- Record debug findings in `## Implementation Notes` (this helps subsequent tasks avoid the same issue)\n\n**`(P)` markers**: Tasks marked `(P)` in tasks.md indicate they have no inter-dependencies and could theoretically run in parallel. However, kiro-impl processes them sequentially (one at a time) to avoid git conflicts and simplify review. The `(P)` marker is informational for task planning, not an execution directive.\n\n**Completion check**: If all remaining tasks are BLOCKED, stop and report blocked tasks with reasons to the user.\n\n#### Manual Mode (main context)\n\nFor each selected task:\n\n**1. Build Task Brief**:\nBefore writing any code, read the relevant sections of requirements.md and design.md for this task and clarify:\n- What observable behaviors must be true when done (acceptance criteria)\n- What files\u002Ffunctions\u002Ftests must exist (completion definition)\n- What technical decisions to follow from design.md (design constraints)\n- How to confirm the task works (verification method)\n\n**2. Execute TDD cycle** (Kent Beck's RED → GREEN → REFACTOR):\n- **RED**: Write test for the next small piece of functionality based on the acceptance criteria. Test should fail.\n- **GREEN**: Implement simplest solution to make test pass, following the design constraints.\n- **REFACTOR**: Improve code structure, remove duplication. All tests must still pass.\n- **VERIFY**: All tests pass (new and existing), no regressions. Confirm verification method passes.\n- **REVIEW**: Apply `kiro-review` before marking the task complete. If the host supports fresh subagents in manual mode, use a fresh reviewer; otherwise perform the review in the main context using the `kiro-review` protocol. Do NOT continue until the verdict is parseably `APPROVED`.\n- **MARK COMPLETE**: Only after review returns `APPROVED`, apply `kiro-verify-completion`, then update the checkbox from `- [ ]` to `- [x]` in tasks.md.\n\n### Step 4: Final Validation\n\n**Autonomous mode**:\n- After all tasks complete, run `\u002Fkiro-validate-impl {feature}` as a GO\u002FNO-GO gate\n- If validation returns GO → before reporting feature success, apply `kiro-verify-completion` to the feature-level claim using the validation result and fresh supporting evidence\n- If validation returns NO-GO:\n  - Fix only concrete findings from the validation report\n  - Cap remediation at 3 rounds; if still NO-GO, stop and report remaining findings\n- If validation returns MANUAL_VERIFY_REQUIRED → stop and report the missing verification step\n\n**Manual mode**:\n- Suggest running `\u002Fkiro-validate-impl {feature}` but do not auto-execute\n\n## Feature Flag Protocol\n\nFor tasks that add or change behavior, enforce RED → GREEN with a feature flag:\n\n1. **Add flag** (OFF by default): Introduce a toggle appropriate to the codebase (env var, config constant, boolean, conditional -- agent chooses the mechanism)\n2. **RED -- flag OFF**: Write tests for the new behavior. Run tests → must FAIL. If tests pass with flag OFF, the tests are not testing the right thing. Rewrite.\n3. **GREEN -- flag ON + implement**: Enable the flag, write implementation. Run tests → must PASS.\n4. **Remove flag**: Make the code unconditional. Run tests → must still PASS.\n\n**Skip this protocol for**: refactoring, configuration, documentation, or tasks with no behavioral change.\n\n## Critical Constraints\n- **Strict Handoff Parsing**: Never infer implementer `STATUS` or reviewer `VERDICT` from surrounding prose; only the exact structured fields count\n- **No Destructive Reset**: Never use `git checkout .`, `git reset --hard`, or similar destructive rollback inside the implementation loop\n- **Selective Staging**: NEVER use `git add -A` or `git add .`; always stage explicit file paths\n- **Bounded Review Rounds**: Max 2 implementer re-dispatch rounds per reviewer rejection, then debug\n- **Bounded Debug**: Max 2 debug rounds per task (debug + re-implementation per round); if still failing → BLOCKED\n- **Bounded Remediation**: Cap final-validation remediation at 3 rounds\n\n## Output Description\n\n**Autonomous mode**: For each task, report:\n1. Task ID, implementer status, reviewer verdict\n2. Files changed, commit hash\n3. After all tasks: final validation result (GO\u002FNO-GO)\n\n**Manual mode**:\n1. Tasks executed: task numbers and test results\n2. Status: completed tasks marked in tasks.md, remaining tasks count\n\n**Format**: Concise, in the language specified in spec.json.\n\n## Safety & Fallback\n\n### Error Scenarios\n\n**Tasks Not Approved or Missing Spec Files**:\n- **Stop Execution**: All spec files must exist and tasks must be approved\n- **Suggested Action**: \"Complete previous phases: `\u002Fkiro-spec-requirements`, `\u002Fkiro-spec-design`, `\u002Fkiro-spec-tasks`\"\n\n**Test Failures**:\n- **Stop Implementation**: Fix failing tests before continuing\n- **Action**: Debug and fix, then re-run\n\n**All Tasks Blocked**:\n- Stop and report all blocked tasks with reasons\n- Human review needed to resolve blockers\n\n**Spec Conflicts with Reality**:\n- If a requirement or design conflicts with reality (API doesn't exist, platform limitation), block the task with `_Blocked: \u003Creason>_` -- do not silently work around it\n\n**Upstream Ownership Detected**:\n- If review, debug, or validation shows that the root cause belongs to an upstream, foundation, shared-platform, or dependency spec, do not patch around it inside the downstream feature\n- Route the fix back to the owning upstream spec, keep the downstream task blocked until that contract is repaired, and re-run validation\u002Fsmoke for dependent specs after the upstream fix lands\n\n**Task Plan Invalidated During Implementation**:\n- If debug returns `NEXT_ACTION: STOP_FOR_HUMAN` because of task ordering, boundary, or decomposition problems, stop and return for human review of `tasks.md` or the approved plan instead of forcing a code workaround\n",{"name":5,"description":7,"allowed-tools":39,"argument-hint":40,"disable-model-invocation":41},"Read, Write, Edit, MultiEdit, Bash, Glob, Grep, Agent, WebSearch, WebFetch","\u003Cfeature-name> [task-numbers]",true,"main","3e6b722545091ed1bb6b81fe15f38189099154c1",".claude\u002Fskills\u002Fkiro-impl",0,"https:\u002F\u002Fgithub.com\u002Fj5ik2o\u002Fai-tools","https:\u002F\u002Fgithub.com\u002Fj5ik2o","https:\u002F\u002Flapras.com\u002Fpublic\u002FNHXS5RH","I'm a tech-lead in the IDEO;PLUS Inc, is lover to Scala\u002FRust, Akka, DDD\u002FCQRS+Event Sourcing.","2026-11-12 10:31:08",{"source":8,"skillName":5,"commands":52,"prompt":62,"zipAvailable":41},[53,56,59],{"tool":54,"command":55},"npx","npx skills add j5ik2o\u002Fai-tools --skill kiro-impl",{"tool":57,"command":58},"bunx","bunx skills add j5ik2o\u002Fai-tools --skill kiro-impl",{"tool":60,"command":61},"pnpm","pnpm dlx skills add j5ik2o\u002Fai-tools --skill kiro-impl","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fj5ik2o\u002Fai-tools\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fkiro-impl\u002FSKILL.md",[64,70,74],{"path":65,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":68,"sourceHtmlUrl":69},"templates\u002Fdebugger-prompt.md","REFERENCE","参考文档",3256,"https:\u002F\u002Fgithub.com\u002Fj5ik2o\u002Fai-tools\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fkiro-impl\u002Ftemplates\u002Fdebugger-prompt.md",{"path":71,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":72,"sourceHtmlUrl":73},"templates\u002Fimplementer-prompt.md",6643,"https:\u002F\u002Fgithub.com\u002Fj5ik2o\u002Fai-tools\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fkiro-impl\u002Ftemplates\u002Fimplementer-prompt.md",{"path":75,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":76,"sourceHtmlUrl":77},"templates\u002Freviewer-prompt.md",5426,"https:\u002F\u002Fgithub.com\u002Fj5ik2o\u002Fai-tools\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fkiro-impl\u002Ftemplates\u002Freviewer-prompt.md",[79,89,96,113,122,133],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":34},"01M6D03X604YGMM6YFEG4M6767","takt","TAKT ワークフローエンジン。Agent Team を使ったマルチエージェントオーケストレーション。ワークフロー YAML（steps \u002F initial_step）に従ってマルチエージェントを実行する。","https:\u002F\u002Fgithub.com\u002Fj5ik2o\u002Fai-tools\u002Fblob\u002Fmain\u002Fplugins\u002Ftakt\u002Fskills\u002Fj5ik2o-takt-workflow-builder\u002Freferences\u002Ftakt\u002Fbuiltins\u002Fskill\u002FSKILL.md",[],[81,86,87,88],"agent team","team","yaml",{"skillNo":90,"name":81,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":34},"01M6D03TAJ6WKRV6XACZHZ70NS","TAKT ワークフローエンジン。codex exec でサブエージェントを起動し、ワークフロー YAML（steps \u002F initial_step）に従って マルチエージェントオーケストレーションを実行する。","https:\u002F\u002Fgithub.com\u002Fj5ik2o\u002Fai-tools\u002Fblob\u002Fmain\u002Fplugins\u002Ftakt\u002Fskills\u002Fj5ik2o-takt-workflow-builder\u002Freferences\u002Ftakt\u002Fbuiltins\u002Fskill-codex\u002FSKILL.md",[],[81,88,95],"codex",{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":34},"01M6D02V9SQ13TEDYDGN67K3WA","j5ik2o-takt-workflow-builder","TAKTワークフロー（ワークフローYAML）の作成・カスタマイズスキル。Faceted Prompting （Persona\u002FPolicy\u002FInstruction\u002FKnowledge\u002FOutput Contract）に基づくファセット群の 生成を含む。references\u002Ftaktにあるtaktのソースコード・ドキュメント・ビルトインワークフロー群を 参照資料として活用する。ユーザーの要件をヒアリングし、step構成、ルール設計、 ファセットファイル生成を一括で行う。 トリガー：「ワークフローを作りたい」「ワークフローを定義」「taktのワークフローを作成」 「新しいtaktワークフローを作って」「takt workflow」「ワークフローYAML」","https:\u002F\u002Fgithub.com\u002Fj5ik2o\u002Fai-tools\u002Fblob\u002Fmain\u002Fplugins\u002Ftakt\u002Fskills\u002Fj5ik2o-takt-workflow-builder\u002FSKILL.md",[],[103,81,104,105,106,107,108,109,110,111,112],"j5ik2o takt workflow builder","builder","workflow builder","workflow","生成","contract","references","knowledge","persona","policy",{"skillNo":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":117,"categories":118,"keywords":119,"publishedAt":34},"01M6D02P0Y4DEJ19J6V4S5VZ2S","j5ik2o-takt-task-builder","TAKTのtasks.yaml（タスクメタデータ）とタスクディレクトリ（.takt\u002Ftasks\u002F{slug}\u002Forder.md）の 作成・編集を支援するスキル。TaskRecordスキーマに準拠したYAMLエントリの生成、 order.mdタスク仕様書の作成、ステータス遷移ルールの検証を行う。 references\u002Ftaktにあるtaskスキーマ定義・ドキュメントを参照資料として活用する。 トリガー：「タスクを追加」「tasks.yamlを編集」「taktタスクを作成」 「タスク仕様書を書く」「order.mdを作成」「takt task」「タスクを定義」 「pendingタスクを追加」「GitHub Issueからタスク作成」","https:\u002F\u002Fgithub.com\u002Fj5ik2o\u002Fai-tools\u002Fblob\u002Fmain\u002Fplugins\u002Ftakt\u002Fskills\u002Fj5ik2o-takt-task-builder\u002FSKILL.md",[],[81,120,32,104,109,107,88,23,121],"j5ik2o takt task builder","github",{"skillNo":123,"name":124,"nameZh":6,"description":125,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":126,"categories":127,"keywords":128,"publishedAt":34},"01M6D022WYSR825B6KB2CSNNY0","j5ik2o-takt-skill-updater","nrslib\u002Ftakt の新バージョンリリース時に、takt-*スキル群（j5ik2o-takt-task-builder, j5ik2o-takt-workflow-builder, j5ik2o-takt-facet-builder, j5ik2o-takt-analyzer, j5ik2o-takt-optimizer）を最新のtaktバージョンに追従させるスキル。 TypeScriptスキーマ（taskRecordSchemas.ts \u002F taskExecutionSchemas.ts）、ワークフローYAML、ファセットMarkdownの差分を検出し、 SKILL.md・参照ドキュメント（task-schema.md等）を体系的に更新する。 トリガー：「taktスキルを更新」「takt-*スキルの鮮度チェック」「taktバージョンアップ対応」 「スキルが古くないか確認」「takt skill updater」","https:\u002F\u002Fgithub.com\u002Fj5ik2o\u002Fai-tools\u002Fblob\u002Fmain\u002Fplugins\u002Ftakt\u002Fskills\u002Fj5ik2o-takt-skill-updater\u002FSKILL.md",[],[81,129,130,106,131,104,32,132],"skill updater","j5ik2o takt skill updater","schema","optimizer",{"skillNo":134,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":135,"categories":136,"keywords":137,"publishedAt":34},"01M6D01Z6WJEXJTXRKEK6N2NBM","https:\u002F\u002Fgithub.com\u002Fj5ik2o\u002Fai-tools\u002Fblob\u002Fmain\u002Fplugins\u002Ftakt\u002Fskills\u002Fj5ik2o-takt-optimizer\u002Freferences\u002Ftakt\u002Fbuiltins\u002Fskill\u002FSKILL.md",[],[81,87,86,88]]