[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M781RQZZDPVFZGRNGCD8MNDP":3,"skill-same:01M781RQZZDPVFZGRNGCD8MNDP":46},{"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":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":6,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":6,"updatedAt":32,"install":33,"resources":45},"01M781RQZZDPVFZGRNGCD8MNDP","spec-kitty.implement",null,"Execute a work package implementation","spec-kitty\u002Fspec-kitty-open-packs","spec-kitty","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F299193673?v=4","01M781PAHK4SK9KA0V4KT7R3XN","Spec Kitty","01M781PAJDDBGZA6R83VQKWW90",2,"MIT","https:\u002F\u002Fgithub.com\u002Fspec-kitty\u002Fspec-kitty-open-packs\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fspec-kitty.implement\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: spec-kitty.implement\ndescription: Execute a work package implementation\nuser-invocable: true\n---\n## Startup Upgrade Check\n\nRun this at most once per active agent session before the first Spec Kitty command workflow.\nIf you already ran `spec-kitty upgrade --agent-check --json` in this session, reuse that result and skip this block.\nDo not run or announce an upgrade check again for later Spec Kitty commands in the same session.\nOtherwise, before continuing, run:\n\n```bash\nspec-kitty upgrade --agent-check --json\n```\n\nIf JSON `action` is `none`, continue.\nIf `action` is `auto_upgrade`, run `upgrade_command` before continuing. If it fails, tell the user and continue with the current Spec Kitty version.\nIf `action` is `guidance`, show `upgrade_note` briefly, then continue.\nIf `action` is `prompt`, ask the user with the host-native question UI when available:\n\n`Spec Kitty {latest_version} is available. You are on {installed_version}. Upgrade now?`\n\nUse these choices:\n\n1. Upgrade now (recommended) - record `upgrade_now`, run `upgrade_command`, then continue.\n2. Always keep me up to date - record `always`, run `upgrade_command`, then continue.\n3. Not now - record `not_now`, then continue.\n4. Never ask again - record `never_ask`, then continue.\n\nRecord the selected choice before continuing:\n\n```bash\nspec-kitty upgrade --agent-choice \u003Cupgrade_now|always|not_now|never_ask> --agent-latest \u003Clatest_version> --json\n```\n\nIf no host-native question UI is available, present the same four choices in plain text and wait for the user.\nIn non-interactive hosts, choose `not_now` and continue.\n\n\n# \u002Fspec-kitty.implement - Execute Work Package Implementation\n\n**Version**: 0.12.0+\n\n\n### REASONS Guidance — Implement WP\u003Cid>\n\nBefore coding, load the WP-scoped REASONS section from\n`kitty-specs\u002F\u003Cmission>\u002Freasons-canvas.md`:\n\n- Requirements (WP-scoped)\n- Entities (WP-relevant)\n- Approach (chosen strategy for this WP)\n- Structure (files this WP owns)\n- Operations (ordered steps)\n- Norms (testing, observability, style)\n- Safeguards (hard constraints — what not to break)\n\nIf the canvas is missing, invoke the `spk-charter-spdd-reasons` skill to\ngenerate it before continuing.\n\nDo not invent files, entities, or scope outside the canvas without recording a\ndeviation.\n\n\n## Purpose\n\nExecute the implementation of a work package according to its prompt file.\nFollow TDD practices, respect file ownership boundaries, and apply safety\nguardrails for bulk operations.\n\n---\n\n## Working Directory\n\n**IMPORTANT**: This step works inside the execution workspace (worktree)\nallocated by `spec-kitty agent action implement WPxx --agent \u003Cname>`. For a `single_branch` mission the WP instead runs in the repository root checkout, which must be on the mission's write branch and clean, and only one WP may be in progress at a time.\n\n**One writer per checkout.** Concurrent implementers and reviewers each work in their own checkout\n(a lane worktree, or a harness-isolated worktree). On `single_branch` the repository root checkout has\none writer at a time: `implement` refuses a second claim there (`WRITE_CHECKOUT_OCCUPIED`) while\n`agent action implement` and `agent action review` warn when another actor is working in it.\n\nPrefer to stay within\nyour `owned_files` boundaries. If a small, well-justified change to a file outside the map is\ngenuinely needed to deliver the WP (e.g. a one-line prerequisite or a stale assertion that\npins a now-deleted internal), make it and record a one-line rationale in the commit message —\nthat is better than a convoluted in-bounds workaround or a duplicated local re-implementation.\nThe finalize ownership-overlap gate remains the guard against *parallel* WPs colliding on the\nsame file.\n\n**In repos with multiple missions, pass `--mission \u003Chandle>` to every command that accepts `--mission`.** The `\u003Chandle>` can be the mission's `mission_id` (ULID), `mid8` (first 8 chars of the ULID), or `mission_slug`. The resolver disambiguates by `mission_id` and returns a structured `MISSION_AMBIGUOUS_SELECTOR` error on ambiguity — there is no silent fallback.\n\n## User Input\n\nThe content of the user's message that invoked this skill (everything after the skill invocation token, e.g. after `\u002Fspec-kitty.\u003Ccommand>` or `$spec-kitty.\u003Ccommand>`) is the User Input referenced elsewhere in these instructions.\n\nYou **MUST** consider this user input before proceeding (if not empty).\n\n## Governance Payload Contract\n\nThe prompt produced by `spec-kitty agent action implement` is guaranteed to\ncarry the following surfaces. Trust the prompt; do not consult external\ngovernance sources unless explicitly cited by a fetch command + when-doing\nrule in the prompt.\n\n**Guaranteed bodies** (verbatim in the prompt when under the token budget; the\nresolver substitutes a `spec-kitty charter context --include section:\u003Cslug>`\nfetch + when-doing stanza only when the budget would otherwise be exceeded):\n\n- **Terminology Canon** — from `.kittify\u002Fcharter\u002Fcharter.md` — governs every\n  identifier rename or new term you introduce.\n- **Code Review Checklist** — from `.kittify\u002Fcharter\u002Fcharter.md` — enumerates\n  the gates the reviewer will measure your diff against.\n- **Regression Vigilance** — from `.kittify\u002Fcharter\u002Fcharter.md` — the project's\n  explicit guard against terminology and structural drift.\n- Any additional action-critical sections the mission declares are appended\n  automatically.\n\n**Guaranteed citations** (catalog IDs always present in the prompt when the\nWP frontmatter selects an `agent_profile`):\n\n- Every `DIRECTIVE_NNN` declared in the loaded agent profile's\n  `directive-references` list (for example, `python-pedro` cites\n  `DIRECTIVE_010` — Specification Fidelity Requirement, `DIRECTIVE_024` —\n  Locality of Change, `DIRECTIVE_030` — Test and Typecheck Quality Gate).\n- Every tactic-id declared in the loaded agent profile's `tactic-references`\n  list.\n\n**Guaranteed authority pointers** (path + when-doing conditional):\n\n- Any paths declared in the charter's `authority_paths:` block are emitted,\n  each with a when-doing conditional describing when to consult it (for\n  example canonical-terminology or architectural-intent directories the\n  project configures).\n\n**Fetch commands** (the prompt may substitute these for bodies that exceed the\ntoken budget; whenever a fetch command appears, the accompanying\n\"When you \u003Cverb>, run this and apply\" line specifies the trigger):\n\n- `spec-kitty charter context --include directive:DIRECTIVE_NNN`\n- `spec-kitty charter context --include tactic:\u003Cid>`\n- `spec-kitty charter context --include section:\u003Cslug>`\n\n## Execution Steps\n\n> **Analysis-report gate (software-dev).** `spec-kitty implement` (and\n> `spec-kitty agent action implement`) refuses to claim a work package until a\n> current analysis report exists — it fails with `analysis_report_required`\n> otherwise. Run `\u002Fspec-kitty.analyze` and record the report first; if the\n> spec, plan, tasks or charter changed after the recorded `analysis-report.md`\n> it is stale and must be re-run. `spec-kitty next` issues the analyze step\n> before implement for exactly this reason.\n\n### 1. Setup\n\nRun:\n\n```bash\nspec-kitty agent context resolve --action implement --mission \u003Chandle> --json\n```\n\nThen execute the returned `check_prerequisites` command and capture\n`mission_dir`. All paths must be absolute.\n\nThe output of `spec-kitty agent action implement ...` is the authoritative work\npackage prompt and execution context. Do **not** separately call\n`spec-kitty charter context` or rummage through unrelated files looking for a\n\"newer\" prompt unless the command output tells you to. The\n**Governance Payload Contract** section above documents what the prompt is\nguaranteed to carry.\n\n### 2. Load Work Package Prompt\n\nRead the WP prompt file from `mission_dir\u002Ftasks\u002FWPxx-slug.md`.\nParse frontmatter for:\n- `owned_files` -- prefer to modify files matching these globs; out-of-map edits are allowed when small and well-justified (record a one-line rationale)\n- `authoritative_surface` -- primary directory for this WP\n- `execution_mode` -- `code_change` or `planning_artifact`\n- `subtasks` -- ordered list of subtask IDs\n- `dependencies` -- WPs that must be done first\n- `agent_profile` -- agent profile identifier to load (e.g., `implementer-ivan`)\n- `role` -- role within the profile (e.g., `implementer`)\n- `agent` -- CLI agent\u002Ftool identifier (e.g., `claude`, `codex`)\n- `model` -- optional model override (e.g., `claude-sonnet-4-6`)\n\n### 2a. Load Agent Profile\n\nBefore proceeding, load the agent profile from the WP frontmatter using the `\u002Fspk-charter-profile-load` skill (or `spec-kitty agent profile list` to find user-defined profiles). Apply the profile's guidance for the rest of this implementation session.\n\nIf `agent_profile` is empty, run `spec-kitty agent profile list` and select the best\navailable profile for the WP's `task_type` and `authoritative_surface`.\n\n### 3. Verify Dependencies\n\nConfirm all dependency WPs are in `approved` or `done` status before proceeding.\nIf any are not approved or done, stop and report which dependencies are blocking.\n\n### 4. Implement Subtasks\n\nWork through each subtask in order:\n1. Read the subtask guidance from the WP prompt\n2. Write tests first (TDD) when the subtask involves code changes\n3. Implement the code to pass the tests\n4. Verify tests pass before moving to the next subtask\n\n### 4a. Supply-Chain Security Check (dependency changes)\n\nIf this WP adds, upgrades, or removes a dependency (any ecosystem — npm\u002Fyarn\u002Fpnpm, pip\u002Fuv, Maven\u002FGradle, etc.), run the `supply-chain-install-safety` tactic's checklist before the quality gate, per `DIRECTIVE_051` — this mirrors the `supply_chain_security_check` step already present in the `implement` step contract. Use the matching ecosystem toolguide (for example `javascript-supply-chain`, `python-supply-chain`, `java-supply-chain`) for the exact commands and file names.\n\n- **Risk disclosure**: record what was checked and the resulting decision for every control DIRECTIVE_051 names in the WP implementation notes or commit message, so a reviewer does not have to re-derive the analysis.\n\nThis is advisory in v1 — it does not add a new fail-closed gate — but skipping the checklist for a dependency change is a gap the reviewer will flag, not a neutral outcome.\n\n### 5. Self-Check\n\nAfter all subtasks are complete:\n- All tests pass\n- Any files modified outside `owned_files` are small, justified, and have a one-line rationale in the commit message\n- Code follows project conventions (run linter if configured)\n- **Diff-scoped lint\u002Fformat sweep (MANDATORY before moving to `for_review`)** —\n  catches lint regressions before they reach the cycle-1 reviewer. Run the\n  project's own lint and format commands over the changed files only, using the\n  project's own tool configuration and execution environment, so the\n  implementer does not drown in pre-existing warnings owned by other work\n  packages.\n  ```bash\n  CHANGED=$(git diff --name-only --diff-filter=AMR HEAD || true)\n  if [ -n \"$CHANGED\" ]; then\n    # Run the project's configured lint and format checks over $CHANGED.\n    echo \"$CHANGED\"\n  fi\n  ```\n  - The project's own lint and format commands MUST pass. If they do not, fix\n    (or auto-fix) introduced findings and re-run the check.\n  - Paste the final commands, their exit codes, and any findings into your\n    handoff note (e.g. `\"diff-scoped lint: 0 issues\"`).\n  - On cycle-N re-implementation, diff against the WP's planning base — the\n    mission's target branch from the setup JSON — instead of `HEAD`, so earlier\n    cycle changes are included:\n    `git diff --name-only \"$(git merge-base HEAD \"$TARGET_BRANCH\")\"`, where\n    `$TARGET_BRANCH` is the mission's `target_branch`\u002F`merge_target_branch`.\n\n---\n\n## Bulk Edit Occurrence Classification\n\nIf this mission has `change_mode: bulk_edit` in its `meta.json`, an occurrence\nclassification artifact is required before implementation can begin.\n\n**What to check**:\n1. Read `meta.json` in the mission directory — look for `\"change_mode\": \"bulk_edit\"`\n2. If present, verify `occurrence_map.yaml` exists in the same directory\n3. The occurrence map classifies the target term by semantic category with\n   per-category actions: `rename`, `manual_review`, `do_not_change`, `rename_if_user_visible`\n\n**During implementation**:\n- Consult the occurrence map before modifying any file\n- Respect category actions: do NOT modify occurrences in categories marked `do_not_change`\n- For `manual_review` categories, document your decision in the WP review notes\n- For `rename_if_user_visible`, only change user-facing text (docs, UI, error messages)\n- Check the `exceptions` section for files\u002Fpatterns with overriding rules\n\n**If the gate blocks you**:\nThe system will refuse to start implementation if the occurrence map is missing or\nincomplete. Create `occurrence_map.yaml` following the schema with `target`, `categories`\n(3+ with actions), and optionally `exceptions`. Re-run the implement command.\n\n**If an inference warning fires**:\nThe system may warn that spec content looks like a bulk edit even without `change_mode` set.\nEither set `change_mode: \"bulk_edit\"` in meta.json, or re-run with `--acknowledge-not-bulk-edit`.\n\n---\n\n## Bulk Edit Safety\n\n**WHEN THIS APPLIES**: Any work package that performs bulk renaming, terminology\ncutover, or mass find-and-replace across multiple files. If your WP does NOT\ninvolve bulk text replacement, skip this section.\n\n### Pre-Edit: Occurrence Classification\n\nBefore performing bulk renames or term replacements:\n\n1. **Search** the codebase for ALL occurrences of the target term:\n   ```bash\n   grep -rn \"target_term\" src\u002F tests\u002F docs\u002F --include=\"*.py\" --include=\"*.md\" --include=\"*.yaml\" --include=\"*.json\"\n   ```\n\n2. **Classify** each occurrence into one of these categories:\n\n   | Category | Example Pattern | Typical Action |\n   |----------|----------------|----------------|\n   | `import_path` | `from module.old_name import` | RENAME |\n   | `class_name` | `class OldName:` | RENAME |\n   | `function_name` | `def old_name():` | RENAME |\n   | `variable` | `old_name = ...` | RENAME |\n   | `dict_key` | `\"old_name\": value` | RENAME |\n   | `file_path` | `src\u002Fold_name\u002F` | RENAME (with filesystem move) |\n   | `config_value` | `setting: old_name` | RENAME |\n   | `log_message` | `log(\"Processing old_name\")` | UPDATE (human-readable) |\n   | `comment` | `# old_name does X` | UPDATE |\n   | `documentation` | `The old_name module...` | UPDATE |\n   | `test_fixture` | `test_old_name_works` | RENAME |\n   | `external_ref` | URL or external API name | PRESERVE |\n\n3. **Produce a classification report** as a markdown table in the WP\n   implementation notes. Example:\n\n   | File | Line | Occurrence | Category | Action |\n   |------|------|-----------|----------|--------|\n   | `src\u002Ffoo.py` | 12 | `from old_name import` | `import_path` | RENAME |\n   | `docs\u002Fapi.md` | 45 | `The old_name module` | `documentation` | UPDATE |\n   | `src\u002Fconfig.yaml` | 8 | `endpoint: https:\u002F\u002Fapi.old_name.com` | `external_ref` | PRESERVE |\n\n4. **Get classification confirmed** before proceeding with edits.\n\n5. **Apply edits category by category**, verifying each category independently.\n\n### Post-Edit: Verification\n\nAfter completing bulk renames:\n\n1. **Search for remaining occurrences** of the old term:\n   ```bash\n   grep -rn \"old_term\" src\u002F tests\u002F docs\u002F --include=\"*.py\" --include=\"*.md\" --include=\"*.yaml\" --include=\"*.json\"\n   ```\n\n2. **For each remaining occurrence**, classify it:\n   - **Intentional preservation**: Document why it was kept (e.g., external API name, backward compat)\n   - **Missed rename**: Fix it\n   - **New occurrence**: Introduced by parallel work -- rename if appropriate\n\n3. **Search the template source directories** explicitly. Command templates now\n   live as step prompts under `packs\u002F\u003Cpack>\u002Fmissions\u002F\u003Ctype>\u002Fsteps\u002F`; edit\n   those SOURCE files, never the generated agent copies:\n   ```bash\n   grep -rn \"old_term\" packs\u002F*\u002Fmissions\u002F*\u002Fsteps\u002F\n   ```\n\n4. **Search the configured agent directories** explicitly. Resolve the agent\n   command\u002Fskill directories this project actually has with\n   `spec-kitty agent config list`, then grep each one for the old term, for\n   example:\n   ```bash\n   grep -rn \"old_term\" .claude\u002Fcommands\u002F .agents\u002Fskills\u002F\n   ```\n\n5. **Produce a verification report**:\n   - Total occurrences found: N\n   - Intentionally preserved: M (with reasons for each)\n   - Missed renames fixed: K\n   - Template directories checked: yes\u002Fno\n   - Agent directories checked: yes\u002Fno\n   - Doc directories checked: yes\u002Fno\n\n---\n\n### 6. Prepare for Review Hand-off\n\nBefore moving this WP to `for_review`, update the `agent_profile` field in the WP\nprompt frontmatter to a reviewer profile so the reviewing agent loads the correct\nagent profile automatically.\n\n1. Identify the appropriate reviewer profile:\n   ```bash\n   spec-kitty agent profile list --json | grep reviewer\n   ```\n   The default reviewer profile is `reviewer-renata`. Use it unless the mission or\n   charter specifies a different reviewer.\n\n2. Update the WP frontmatter:\n   ```yaml\n   agent_profile: \"reviewer-renata\"\n   role: \"reviewer\"\n   ```\n\n3. Commit the updated frontmatter together with your implementation changes with\n   `spec-kitty safe-commit \u003Cfiles> -m \"\u003Cmsg>\" --to-branch \u003Clane branch>` **before**\n   running `spec-kitty agent tasks move-task WPxx --to for_review`.\n\n### GitHub Actions Workflow Changes\n\nIf this WP adds or modifies `.github\u002Fworkflows\u002F*`, the changed workflow must be\nexercised on a real GitHub Actions runner before review hand-off. Per\n`DIRECTIVE_045` and `mission-wrap-up-sequence`, the WP agent pushes and reports;\nthe orchestrator opens the draft PR:\n\n1. Commit with `spec-kitty safe-commit \u003Cfiles> -m \"\u003Cmsg>\" --to-branch \u003Clane branch>`,\n   then push the WP branch.\n2. Report to the orchestrator that this WP needs a draft PR to exercise the\n   changed workflow on a real runner.\n3. The orchestrator opens the draft PR and iterates until the changed workflow\n   has a successful run, then records the successful run ID or Actions URL in\n   `kitty-specs\u002F\u003Cmission>\u002Fworkflow-evidence.md`.\n4. Only after the orchestrator confirms the recorded evidence does the WP move\n   to `for_review`.\n\nThe reviewer will then use `\u002Fspk-charter-profile-load` with the reviewer profile and apply\nits self-review gates automatically.\n\n---\n\n## Output\n\nAfter completing implementation:\n- All subtasks done with passing tests\n- Bulk edit classification and verification reports (if applicable)\n- Commit changes with a descriptive message\n\n**Next step**: `spec-kitty next --agent \u003Cname> --mission \u003Chandle>` will advance to review.\n","## Startup Upgrade Check\n\nRun this at most once per active agent session before the first Spec Kitty command workflow.\nIf you already ran `spec-kitty upgrade --agent-check --json` in this session, reuse that result and skip this block.\nDo not run or announce an upgrade check again for later Spec Kitty commands in the same session.\nOtherwise, before continuing, run:\n\n```bash\nspec-kitty upgrade --agent-check --json\n```\n\nIf JSON `action` is `none`, continue.\nIf `action` is `auto_upgrade`, run `upgrade_command` before continuing. If it fails, tell the user and continue with the current Spec Kitty version.\nIf `action` is `guidance`, show `upgrade_note` briefly, then continue.\nIf `action` is `prompt`, ask the user with the host-native question UI when available:\n\n`Spec Kitty {latest_version} is available. You are on {installed_version}. Upgrade now?`\n\nUse these choices:\n\n1. Upgrade now (recommended) - record `upgrade_now`, run `upgrade_command`, then continue.\n2. Always keep me up to date - record `always`, run `upgrade_command`, then continue.\n3. Not now - record `not_now`, then continue.\n4. Never ask again - record `never_ask`, then continue.\n\nRecord the selected choice before continuing:\n\n```bash\nspec-kitty upgrade --agent-choice \u003Cupgrade_now|always|not_now|never_ask> --agent-latest \u003Clatest_version> --json\n```\n\nIf no host-native question UI is available, present the same four choices in plain text and wait for the user.\nIn non-interactive hosts, choose `not_now` and continue.\n\n\n# \u002Fspec-kitty.implement - Execute Work Package Implementation\n\n**Version**: 0.12.0+\n\n\n### REASONS Guidance — Implement WP\u003Cid>\n\nBefore coding, load the WP-scoped REASONS section from\n`kitty-specs\u002F\u003Cmission>\u002Freasons-canvas.md`:\n\n- Requirements (WP-scoped)\n- Entities (WP-relevant)\n- Approach (chosen strategy for this WP)\n- Structure (files this WP owns)\n- Operations (ordered steps)\n- Norms (testing, observability, style)\n- Safeguards (hard constraints — what not to break)\n\nIf the canvas is missing, invoke the `spk-charter-spdd-reasons` skill to\ngenerate it before continuing.\n\nDo not invent files, entities, or scope outside the canvas without recording a\ndeviation.\n\n\n## Purpose\n\nExecute the implementation of a work package according to its prompt file.\nFollow TDD practices, respect file ownership boundaries, and apply safety\nguardrails for bulk operations.\n\n---\n\n## Working Directory\n\n**IMPORTANT**: This step works inside the execution workspace (worktree)\nallocated by `spec-kitty agent action implement WPxx --agent \u003Cname>`. For a `single_branch` mission the WP instead runs in the repository root checkout, which must be on the mission's write branch and clean, and only one WP may be in progress at a time.\n\n**One writer per checkout.** Concurrent implementers and reviewers each work in their own checkout\n(a lane worktree, or a harness-isolated worktree). On `single_branch` the repository root checkout has\none writer at a time: `implement` refuses a second claim there (`WRITE_CHECKOUT_OCCUPIED`) while\n`agent action implement` and `agent action review` warn when another actor is working in it.\n\nPrefer to stay within\nyour `owned_files` boundaries. If a small, well-justified change to a file outside the map is\ngenuinely needed to deliver the WP (e.g. a one-line prerequisite or a stale assertion that\npins a now-deleted internal), make it and record a one-line rationale in the commit message —\nthat is better than a convoluted in-bounds workaround or a duplicated local re-implementation.\nThe finalize ownership-overlap gate remains the guard against *parallel* WPs colliding on the\nsame file.\n\n**In repos with multiple missions, pass `--mission \u003Chandle>` to every command that accepts `--mission`.** The `\u003Chandle>` can be the mission's `mission_id` (ULID), `mid8` (first 8 chars of the ULID), or `mission_slug`. The resolver disambiguates by `mission_id` and returns a structured `MISSION_AMBIGUOUS_SELECTOR` error on ambiguity — there is no silent fallback.\n\n## User Input\n\nThe content of the user's message that invoked this skill (everything after the skill invocation token, e.g. after `\u002Fspec-kitty.\u003Ccommand>` or `$spec-kitty.\u003Ccommand>`) is the User Input referenced elsewhere in these instructions.\n\nYou **MUST** consider this user input before proceeding (if not empty).\n\n## Governance Payload Contract\n\nThe prompt produced by `spec-kitty agent action implement` is guaranteed to\ncarry the following surfaces. Trust the prompt; do not consult external\ngovernance sources unless explicitly cited by a fetch command + when-doing\nrule in the prompt.\n\n**Guaranteed bodies** (verbatim in the prompt when under the token budget; the\nresolver substitutes a `spec-kitty charter context --include section:\u003Cslug>`\nfetch + when-doing stanza only when the budget would otherwise be exceeded):\n\n- **Terminology Canon** — from `.kittify\u002Fcharter\u002Fcharter.md` — governs every\n  identifier rename or new term you introduce.\n- **Code Review Checklist** — from `.kittify\u002Fcharter\u002Fcharter.md` — enumerates\n  the gates the reviewer will measure your diff against.\n- **Regression Vigilance** — from `.kittify\u002Fcharter\u002Fcharter.md` — the project's\n  explicit guard against terminology and structural drift.\n- Any additional action-critical sections the mission declares are appended\n  automatically.\n\n**Guaranteed citations** (catalog IDs always present in the prompt when the\nWP frontmatter selects an `agent_profile`):\n\n- Every `DIRECTIVE_NNN` declared in the loaded agent profile's\n  `directive-references` list (for example, `python-pedro` cites\n  `DIRECTIVE_010` — Specification Fidelity Requirement, `DIRECTIVE_024` —\n  Locality of Change, `DIRECTIVE_030` — Test and Typecheck Quality Gate).\n- Every tactic-id declared in the loaded agent profile's `tactic-references`\n  list.\n\n**Guaranteed authority pointers** (path + when-doing conditional):\n\n- Any paths declared in the charter's `authority_paths:` block are emitted,\n  each with a when-doing conditional describing when to consult it (for\n  example canonical-terminology or architectural-intent directories the\n  project configures).\n\n**Fetch commands** (the prompt may substitute these for bodies that exceed the\ntoken budget; whenever a fetch command appears, the accompanying\n\"When you \u003Cverb>, run this and apply\" line specifies the trigger):\n\n- `spec-kitty charter context --include directive:DIRECTIVE_NNN`\n- `spec-kitty charter context --include tactic:\u003Cid>`\n- `spec-kitty charter context --include section:\u003Cslug>`\n\n## Execution Steps\n\n> **Analysis-report gate (software-dev).** `spec-kitty implement` (and\n> `spec-kitty agent action implement`) refuses to claim a work package until a\n> current analysis report exists — it fails with `analysis_report_required`\n> otherwise. Run `\u002Fspec-kitty.analyze` and record the report first; if the\n> spec, plan, tasks or charter changed after the recorded `analysis-report.md`\n> it is stale and must be re-run. `spec-kitty next` issues the analyze step\n> before implement for exactly this reason.\n\n### 1. Setup\n\nRun:\n\n```bash\nspec-kitty agent context resolve --action implement --mission \u003Chandle> --json\n```\n\nThen execute the returned `check_prerequisites` command and capture\n`mission_dir`. All paths must be absolute.\n\nThe output of `spec-kitty agent action implement ...` is the authoritative work\npackage prompt and execution context. Do **not** separately call\n`spec-kitty charter context` or rummage through unrelated files looking for a\n\"newer\" prompt unless the command output tells you to. The\n**Governance Payload Contract** section above documents what the prompt is\nguaranteed to carry.\n\n### 2. Load Work Package Prompt\n\nRead the WP prompt file from `mission_dir\u002Ftasks\u002FWPxx-slug.md`.\nParse frontmatter for:\n- `owned_files` -- prefer to modify files matching these globs; out-of-map edits are allowed when small and well-justified (record a one-line rationale)\n- `authoritative_surface` -- primary directory for this WP\n- `execution_mode` -- `code_change` or `planning_artifact`\n- `subtasks` -- ordered list of subtask IDs\n- `dependencies` -- WPs that must be done first\n- `agent_profile` -- agent profile identifier to load (e.g., `implementer-ivan`)\n- `role` -- role within the profile (e.g., `implementer`)\n- `agent` -- CLI agent\u002Ftool identifier (e.g., `claude`, `codex`)\n- `model` -- optional model override (e.g., `claude-sonnet-4-6`)\n\n### 2a. Load Agent Profile\n\nBefore proceeding, load the agent profile from the WP frontmatter using the `\u002Fspk-charter-profile-load` skill (or `spec-kitty agent profile list` to find user-defined profiles). Apply the profile's guidance for the rest of this implementation session.\n\nIf `agent_profile` is empty, run `spec-kitty agent profile list` and select the best\navailable profile for the WP's `task_type` and `authoritative_surface`.\n\n### 3. Verify Dependencies\n\nConfirm all dependency WPs are in `approved` or `done` status before proceeding.\nIf any are not approved or done, stop and report which dependencies are blocking.\n\n### 4. Implement Subtasks\n\nWork through each subtask in order:\n1. Read the subtask guidance from the WP prompt\n2. Write tests first (TDD) when the subtask involves code changes\n3. Implement the code to pass the tests\n4. Verify tests pass before moving to the next subtask\n\n### 4a. Supply-Chain Security Check (dependency changes)\n\nIf this WP adds, upgrades, or removes a dependency (any ecosystem — npm\u002Fyarn\u002Fpnpm, pip\u002Fuv, Maven\u002FGradle, etc.), run the `supply-chain-install-safety` tactic's checklist before the quality gate, per `DIRECTIVE_051` — this mirrors the `supply_chain_security_check` step already present in the `implement` step contract. Use the matching ecosystem toolguide (for example `javascript-supply-chain`, `python-supply-chain`, `java-supply-chain`) for the exact commands and file names.\n\n- **Risk disclosure**: record what was checked and the resulting decision for every control DIRECTIVE_051 names in the WP implementation notes or commit message, so a reviewer does not have to re-derive the analysis.\n\nThis is advisory in v1 — it does not add a new fail-closed gate — but skipping the checklist for a dependency change is a gap the reviewer will flag, not a neutral outcome.\n\n### 5. Self-Check\n\nAfter all subtasks are complete:\n- All tests pass\n- Any files modified outside `owned_files` are small, justified, and have a one-line rationale in the commit message\n- Code follows project conventions (run linter if configured)\n- **Diff-scoped lint\u002Fformat sweep (MANDATORY before moving to `for_review`)** —\n  catches lint regressions before they reach the cycle-1 reviewer. Run the\n  project's own lint and format commands over the changed files only, using the\n  project's own tool configuration and execution environment, so the\n  implementer does not drown in pre-existing warnings owned by other work\n  packages.\n  ```bash\n  CHANGED=$(git diff --name-only --diff-filter=AMR HEAD || true)\n  if [ -n \"$CHANGED\" ]; then\n    # Run the project's configured lint and format checks over $CHANGED.\n    echo \"$CHANGED\"\n  fi\n  ```\n  - The project's own lint and format commands MUST pass. If they do not, fix\n    (or auto-fix) introduced findings and re-run the check.\n  - Paste the final commands, their exit codes, and any findings into your\n    handoff note (e.g. `\"diff-scoped lint: 0 issues\"`).\n  - On cycle-N re-implementation, diff against the WP's planning base — the\n    mission's target branch from the setup JSON — instead of `HEAD`, so earlier\n    cycle changes are included:\n    `git diff --name-only \"$(git merge-base HEAD \"$TARGET_BRANCH\")\"`, where\n    `$TARGET_BRANCH` is the mission's `target_branch`\u002F`merge_target_branch`.\n\n---\n\n## Bulk Edit Occurrence Classification\n\nIf this mission has `change_mode: bulk_edit` in its `meta.json`, an occurrence\nclassification artifact is required before implementation can begin.\n\n**What to check**:\n1. Read `meta.json` in the mission directory — look for `\"change_mode\": \"bulk_edit\"`\n2. If present, verify `occurrence_map.yaml` exists in the same directory\n3. The occurrence map classifies the target term by semantic category with\n   per-category actions: `rename`, `manual_review`, `do_not_change`, `rename_if_user_visible`\n\n**During implementation**:\n- Consult the occurrence map before modifying any file\n- Respect category actions: do NOT modify occurrences in categories marked `do_not_change`\n- For `manual_review` categories, document your decision in the WP review notes\n- For `rename_if_user_visible`, only change user-facing text (docs, UI, error messages)\n- Check the `exceptions` section for files\u002Fpatterns with overriding rules\n\n**If the gate blocks you**:\nThe system will refuse to start implementation if the occurrence map is missing or\nincomplete. Create `occurrence_map.yaml` following the schema with `target`, `categories`\n(3+ with actions), and optionally `exceptions`. Re-run the implement command.\n\n**If an inference warning fires**:\nThe system may warn that spec content looks like a bulk edit even without `change_mode` set.\nEither set `change_mode: \"bulk_edit\"` in meta.json, or re-run with `--acknowledge-not-bulk-edit`.\n\n---\n\n## Bulk Edit Safety\n\n**WHEN THIS APPLIES**: Any work package that performs bulk renaming, terminology\ncutover, or mass find-and-replace across multiple files. If your WP does NOT\ninvolve bulk text replacement, skip this section.\n\n### Pre-Edit: Occurrence Classification\n\nBefore performing bulk renames or term replacements:\n\n1. **Search** the codebase for ALL occurrences of the target term:\n   ```bash\n   grep -rn \"target_term\" src\u002F tests\u002F docs\u002F --include=\"*.py\" --include=\"*.md\" --include=\"*.yaml\" --include=\"*.json\"\n   ```\n\n2. **Classify** each occurrence into one of these categories:\n\n   | Category | Example Pattern | Typical Action |\n   |----------|----------------|----------------|\n   | `import_path` | `from module.old_name import` | RENAME |\n   | `class_name` | `class OldName:` | RENAME |\n   | `function_name` | `def old_name():` | RENAME |\n   | `variable` | `old_name = ...` | RENAME |\n   | `dict_key` | `\"old_name\": value` | RENAME |\n   | `file_path` | `src\u002Fold_name\u002F` | RENAME (with filesystem move) |\n   | `config_value` | `setting: old_name` | RENAME |\n   | `log_message` | `log(\"Processing old_name\")` | UPDATE (human-readable) |\n   | `comment` | `# old_name does X` | UPDATE |\n   | `documentation` | `The old_name module...` | UPDATE |\n   | `test_fixture` | `test_old_name_works` | RENAME |\n   | `external_ref` | URL or external API name | PRESERVE |\n\n3. **Produce a classification report** as a markdown table in the WP\n   implementation notes. Example:\n\n   | File | Line | Occurrence | Category | Action |\n   |------|------|-----------|----------|--------|\n   | `src\u002Ffoo.py` | 12 | `from old_name import` | `import_path` | RENAME |\n   | `docs\u002Fapi.md` | 45 | `The old_name module` | `documentation` | UPDATE |\n   | `src\u002Fconfig.yaml` | 8 | `endpoint: https:\u002F\u002Fapi.old_name.com` | `external_ref` | PRESERVE |\n\n4. **Get classification confirmed** before proceeding with edits.\n\n5. **Apply edits category by category**, verifying each category independently.\n\n### Post-Edit: Verification\n\nAfter completing bulk renames:\n\n1. **Search for remaining occurrences** of the old term:\n   ```bash\n   grep -rn \"old_term\" src\u002F tests\u002F docs\u002F --include=\"*.py\" --include=\"*.md\" --include=\"*.yaml\" --include=\"*.json\"\n   ```\n\n2. **For each remaining occurrence**, classify it:\n   - **Intentional preservation**: Document why it was kept (e.g., external API name, backward compat)\n   - **Missed rename**: Fix it\n   - **New occurrence**: Introduced by parallel work -- rename if appropriate\n\n3. **Search the template source directories** explicitly. Command templates now\n   live as step prompts under `packs\u002F\u003Cpack>\u002Fmissions\u002F\u003Ctype>\u002Fsteps\u002F`; edit\n   those SOURCE files, never the generated agent copies:\n   ```bash\n   grep -rn \"old_term\" packs\u002F*\u002Fmissions\u002F*\u002Fsteps\u002F\n   ```\n\n4. **Search the configured agent directories** explicitly. Resolve the agent\n   command\u002Fskill directories this project actually has with\n   `spec-kitty agent config list`, then grep each one for the old term, for\n   example:\n   ```bash\n   grep -rn \"old_term\" .claude\u002Fcommands\u002F .agents\u002Fskills\u002F\n   ```\n\n5. **Produce a verification report**:\n   - Total occurrences found: N\n   - Intentionally preserved: M (with reasons for each)\n   - Missed renames fixed: K\n   - Template directories checked: yes\u002Fno\n   - Agent directories checked: yes\u002Fno\n   - Doc directories checked: yes\u002Fno\n\n---\n\n### 6. Prepare for Review Hand-off\n\nBefore moving this WP to `for_review`, update the `agent_profile` field in the WP\nprompt frontmatter to a reviewer profile so the reviewing agent loads the correct\nagent profile automatically.\n\n1. Identify the appropriate reviewer profile:\n   ```bash\n   spec-kitty agent profile list --json | grep reviewer\n   ```\n   The default reviewer profile is `reviewer-renata`. Use it unless the mission or\n   charter specifies a different reviewer.\n\n2. Update the WP frontmatter:\n   ```yaml\n   agent_profile: \"reviewer-renata\"\n   role: \"reviewer\"\n   ```\n\n3. Commit the updated frontmatter together with your implementation changes with\n   `spec-kitty safe-commit \u003Cfiles> -m \"\u003Cmsg>\" --to-branch \u003Clane branch>` **before**\n   running `spec-kitty agent tasks move-task WPxx --to for_review`.\n\n### GitHub Actions Workflow Changes\n\nIf this WP adds or modifies `.github\u002Fworkflows\u002F*`, the changed workflow must be\nexercised on a real GitHub Actions runner before review hand-off. Per\n`DIRECTIVE_045` and `mission-wrap-up-sequence`, the WP agent pushes and reports;\nthe orchestrator opens the draft PR:\n\n1. Commit with `spec-kitty safe-commit \u003Cfiles> -m \"\u003Cmsg>\" --to-branch \u003Clane branch>`,\n   then push the WP branch.\n2. Report to the orchestrator that this WP needs a draft PR to exercise the\n   changed workflow on a real runner.\n3. The orchestrator opens the draft PR and iterates until the changed workflow\n   has a successful run, then records the successful run ID or Actions URL in\n   `kitty-specs\u002F\u003Cmission>\u002Fworkflow-evidence.md`.\n4. Only after the orchestrator confirms the recorded evidence does the WP move\n   to `for_review`.\n\nThe reviewer will then use `\u002Fspk-charter-profile-load` with the reviewer profile and apply\nits self-review gates automatically.\n\n---\n\n## Output\n\nAfter completing implementation:\n- All subtasks done with passing tests\n- Bulk edit classification and verification reports (if applicable)\n- Commit changes with a descriptive message\n\n**Next step**: `spec-kitty next --agent \u003Cname> --mission \u003Chandle>` will advance to review.\n",{"name":5,"description":7,"user-invocable":24},true,"main","ab710df6d6db292abd3d1288d20f338eef0ee475",".agents\u002Fskills\u002Fspec-kitty.implement",0,"https:\u002F\u002Fgithub.com\u002Fspec-kitty\u002Fspec-kitty-open-packs","https:\u002F\u002Fgithub.com\u002Fspec-kitty","https:\u002F\u002Fspec-kitty.ai","2026-11-15 03:23:45",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":24},[35,38,41],{"tool":36,"command":37},"npx","npx skills add spec-kitty\u002Fspec-kitty-open-packs --skill spec-kitty.implement",{"tool":39,"command":40},"bunx","bunx skills add spec-kitty\u002Fspec-kitty-open-packs --skill spec-kitty.implement",{"tool":42,"command":43},"pnpm","pnpm dlx skills add spec-kitty\u002Fspec-kitty-open-packs --skill spec-kitty.implement","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fspec-kitty\u002Fspec-kitty-open-packs\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fspec-kitty.implement\u002FSKILL.md",[],[47,54,61,68,75,82],{"skillNo":48,"name":49,"nameZh":6,"description":50,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":51,"categories":52,"keywords":53,"publishedAt":19},"01M781XGMZZ1J569VFF53BFFRX","kitty-semi-auto","Use to take a tracker issue or a coherent issue-set through a governed delivery run that works autonomously but pauses to escalate the operator's decisions. Runs BOTH ways — in this session (local) or handed to a fresh cloud runner (cloud) — from one set of standing orders covering orientation, code grounding first, Mission-vs-Ops, the pause-and-escalate contract, brownfield discipline, and the canonical closeout to a draft PR the operator merges. Triggers: semi-auto, semi-auto dispatch, run this semi-automatically, deliver these issues semi-auto, hand this to a cloud runner, dispatch semi-auto.","https:\u002F\u002Fgithub.com\u002Fspec-kitty\u002Fspec-kitty-open-packs\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fkitty-semi-auto\u002FSKILL.md",[],[],{"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":19},"01M781XCN71TH0P1AMK99MZ042","kitty-report-debrief","Use when a maintainer asks what happened or what is open (\"what landed since Friday\", \"WTF happened with X\", a milestone overview). Collects the facts from GitHub, writes a short branded debrief for named readers, and hands the PDF back without committing it. Triggers: what landed since, WTF happened, debrief the weekend, milestone overview, exec overview of open issues, write up what shipped.","https:\u002F\u002Fgithub.com\u002Fspec-kitty\u002Fspec-kitty-open-packs\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fkitty-report-debrief\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"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":19},"01M781X8MDSBSEFP7HDM65A89G","kitty-mission-from-issue","Use to take one or more GitHub issues through a full governed Mission (spec, plan, tasks, implementation, review) to a green pull request flipped to ready for review, which a maintainer then merges. Triggers: mission from issue, run a mission for this issue, drive issue to PR.","https:\u002F\u002Fgithub.com\u002Fspec-kitty\u002Fspec-kitty-open-packs\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fkitty-mission-from-issue\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M781X574X27Q630CBWXEWMBC","kitty-land-pr","Use when a ready-for-review pull request needs a maintainer to get it ready to merge. Rebases it, fixes and reviews it, updates its description, changelog and docs, and hands it back without merging by hand. Triggers: land this PR, landing pass, land PR.","https:\u002F\u002Fgithub.com\u002Fspec-kitty\u002Fspec-kitty-open-packs\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fkitty-land-pr\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M781X0KW55NB6G0P5FKGFEX0","kitty-issue-triage","Use to triage a batch of open GitHub issues on spec-kitty\u002Fspec-kitty (default, those opened in the last 7 days). Sets type, priority, domain, parent and milestone, and reports stale, duplicate or clustered issues for an operator decision. Triggers: triage issues, triage the tracker, triage new issues.","https:\u002F\u002Fgithub.com\u002Fspec-kitty\u002Fspec-kitty-open-packs\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fkitty-issue-triage\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M781WXTC0ACEC78PVXKB22YH","spk-team-tracker","https:\u002F\u002Fgithub.com\u002Fspec-kitty\u002Fspec-kitty-open-packs\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fspk-team-tracker\u002FSKILL.md",[],[]]