[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M74K5P744AM0EKJ4STAG8DNV":3,"skill-same:01M74K5P744AM0EKJ4STAG8DNV":46},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"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":26,"repositoryHtmlUrl":27,"repositoryHomepageUrl":28,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":30,"updatedAt":31,"install":32,"resources":45},"01M74K5P744AM0EKJ4STAG8DNV","modify-feature",null,"Acauhi99\u002Fopencode-agent-system","Acauhi99","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F109399110?v=4","01M74JTV4VH2YAER6TABE78RKF","Acauhi","01M74JTV5CXNC5DEV2XR5SBFG3",1,"MIT","https:\u002F\u002Fgithub.com\u002FAcauhi99\u002Fopencode-agent-system\u002Fblob\u002Fmain\u002Fskills\u002Fmodify-feature\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: modify-feature\ndescription: Modify an existing feature — add to it, change how it works, or wire a small new behavior into something that already exists. Use when the user says \"modify\", \"modify this\", \"modify the X\", \"enhance\", \"extend\", \"add to existing X\", \"also do Y when Z\", \"make this also do…\", \"derive this from that\", \"add a new component\u002Fpicker\u002Fwidget that reads existing data\", or proposes a tweak to a feature that already lives in the app. Lighter than add-feature (no full plan-approval gate), but still maps which contracts shift before editing so a small-feeling change doesn't silently break adjacent code. Includes conditional logic-first tests and integration-first observability for risky extensions. Accepts `mode=fast|balanced|production` to control depth (default: balanced); also accepts `include=` \u002F `skip=` overrides. Skip for greenfield features (use add-feature), pure refactors, enum\u002Fstate renames (use realign), and bug fixes (use fix-bug).\nlicense: MIT\ncompatibility: opencode\nmetadata:\n  source: \"Adapted from AgentSystemLabs\u002Fcore (MIT)\"\n  requires_codegraph: true\n---\n\n> **Tool mapping (OpenCode):** This skill uses:\n> - `question` tool for user prompts (not `AskUserQuestion`)\n> - `task` tool for subagents (not `Agent` or `Task` subagent syntax)\n> - `skill({ name: \"...\" })` to load other skills (not `Skill(skill=\"...\", args=\"...\")`)\n> - `codegraph_explore`, `codegraph_search`, `codegraph_callers` for codebase exploration (preferred)\n> - `todowrite` for phase\u002Fprogress tracking\n> - `grep`, `glob`, `read`, `bash` as fallback when `.codegraph\u002F` not initialized\n>\n> **Context rule:** This skill supersedes any prior skill instructions. Follow ONLY these instructions now. Read the user's goal and any mode\u002Finclude\u002Fskip from the conversation context.\n\nRead `mode=`, `include=`, and `skip=` from the conversation context. Default to the mode specified in this skill if not provided.\n\n# Modify Feature\n\nA small extension is the most dangerous size of change: large enough to shift requirements and adjacent contracts, small enough that the agent skips the thinking a full feature would trigger. The user's proposed shape is one option, not the spec.\n\n---\n\n## Modes\n\nThis skill accepts a `mode=` argument. Default — when no `mode=` is specified — is `balanced`: the four-question pre-flight + contract audit below.\n\n| Mode | Behavior |\n|---|---|\n| `fast` | Skip the four pre-flight questions. Implement the user's literal proposal. Use only when the user has explicitly locked the seam (e.g. `mode=fast` in their prompt) and the change is genuinely single-file. |\n| `balanced` (default) | The full pre-flight: alternative seam, contract audit, scope check, edge cases. Then edit, verify, and run gated post-checks for contracts, concurrency, observability, and tests when triggered. |\n| `production` | `balanced` + an explicit scope-confirm gate before editing if the Q2 contract audit surfaces 5+ affected sites, plus mandatory tests for logic\u002Fdata\u002FAPI changes and observability instrumentation for integration boundaries. Pause and ask via `question` whether to proceed as an extension or escalate to `add-feature` \u002F `realign`. |\n\n**`include=` \u002F `skip=` overrides.** Add or remove specific concerns on top of the mode default — `mode=fast include=q2` runs the contract audit even in fast mode; `mode=balanced skip=q1` skips the alternative-seam question.\n\n**Mode safety override.** If `mode=fast` is requested but the change touches auth, permissions, payments, secrets, schema migrations, destructive deletes, background jobs, queues, cron, external APIs, email\u002FSMS\u002Fpush, imports\u002Fexports, file writes, spawned processes, IPC, caching\u002Finvalidation, feature flags, analytics\u002Fbusiness reporting, concurrency-sensitive mutations, or external webhooks, surface the conflict via `question` and confirm before honoring. The `\u002Fship` orchestrator enforces this upstream — direct manual callers may not.\n\n**Phase-gated NEVER scope.** When `mode=fast` is in effect, two NEVERs are explicitly suspended for the run: *\"NEVER implement the user's literal proposal without naming one alternative\"* and *\"NEVER agree with the user's framing of effort before completing Q2\"*. The remaining NEVERs (contract audit, peer-data consumers, scope creep, manual-override, stop-action symmetry, rename-realign boundary) stay in force in every mode — they protect against silent breakage that fast mode shouldn't override.\n\n---\n\n## Before you touch code, answer four questions\n\nUse `todowrite` to track these four questions as pending, then mark each completed as you answer it.\n\n**Always use the `question` tool** (structured choices) when you need clarification from the user — never present static numbered prompts they have to type answers to. Fall back to free-form prose only when the option space is genuinely open-ended.\n\n1. **Is the user's proposal the best seam?** They named one approach. Find at least one alternative — different layer (UI vs server vs data), different trigger (push vs pull, eager vs lazy), different ownership (existing module vs new). State the tradeoff. If their proposal still wins, say why; if not, surface the alternative *before* implementing.\n\n2. **What contracts shift?** List every place the *meaning* of something changes: types, API responses, persisted rows, UI states, user expectations, docs, tests asserting the old behavior. The extension is done when all of these are coherent, not when the new path works.\n\n   **Audit order:** types → API\u002FIPC surface → persisted rows\u002Fmigrations → UI states & conditionals → runtime\u002Flifecycle state (spawned processes, child terminals, timers, watchers, in-memory registries — and which UI surface projects each one's liveness) → tests asserting old behavior → user-facing docs\u002Fcopy → peer consumers (other components\u002Fhooks\u002Froutes reading or caching this same entity) → live-update wiring (event subscriptions, query invalidations, refetch triggers, and runtime-state projections like status badges, indicator dots, \"is alive\" booleans — name what owns the truth and how each reader stays consistent with it). Walk the list in this order; later layers depend on earlier layers' decisions.\n\n   **Structural audit preference:** Use `codegraph_explore`, `codegraph_search`, and `codegraph_callers` to map callers\u002Fconsumers of the changed type\u002Ffield\u002Fstate. Use `grep` as a fallback when `.codegraph\u002F` is not initialized.\n\n3. **Where's the boundary?** If the change touches 3+ unrelated modules, renames a domain concept, or invalidates persisted data, it's not an extension — stop and recommend `realign` or a feature-build approach instead. **Scope-explosion fallback:** if the audit in Q2 surfaces more than ~10 affected sites, that itself is the signal — stop and re-scope, even if implementation has already started.\n\n4. **What edge cases does the user's framing miss?** User overriding the derived value manually. Pre-existing rows that predate the extension. Failure of the new derivation step. Re-derivation when the source changes after the fact.\n\n   **Symmetric data-flow:** when adding a new *reader* of shared data, list the mutations that must invalidate it; when adding a new *mutation*, list the readers that must refresh.\n\n   **Cold-start reconciliation:** on process\u002Fapp restart, what's the source of truth for this feature's runtime state — persisted disk, a runtime probe (is the child process actually alive?), or \"assume offline until re-triggered\"? Decide explicitly; default-persist is a decision, not an absence of one. Stale persisted state that outlives its underlying runtime (a \"running\" row pointing at a dead PID, a green dot for a terminal that no longer exists) is the canonical bug class here.\n\n## Logic-first lane\n\nIf the extension changes a deterministic parser, validator, pricing rule, permission rule, data transform, state machine, API\u002Fdata contract, or non-trivial branch, write the expected behavior test before editing production code. In `production`, this is mandatory. In `balanced`, run it unless the project has no harness or the change is trivial UI wiring. In `fast`, run it only when the user passed `include=logic-first` or `include=tests`.\n\n## Integration-first lane\n\nIf the extension touches HTTP\u002Fwebhook dispatch, queues, jobs, cron, IPC, MCP tool calls, file writes, env-var injection, spawned processes, external APIs, email\u002FSMS\u002Fpush, imports\u002Fexports, or cache invalidation, name the runtime contract before editing: trigger, dispatch site, receiver, persisted\u002Fvisible outcome, and log\u002Fobservation location. Dispatch the **`runtime-contract-tracer`** subagent via `task({ subagent_type: \"runtime-contract-tracer\", description: \"Trace runtime contract\", prompt: \"Extract the 4-link runtime contract trace with file:line refs for this extension\" })` to extract the 4-link trace with file:line refs in a fresh context — the result is the input to your planning. After verification, invoke `skill({ name: \"add-observability\" })` unless equivalent structured evidence already exists and you can name where it lives.\n\n## After editing\n\nUse `todowrite` to track the after-editing steps. Create a todo for each gated step that applies to this change.\n\n1. Verify the changed code path, not just the build.\n2. Dispatch the **`reviewer-contracts`** subagent via `task({ subagent_type: \"reviewer-contracts\", description: \"Audit contracts\", prompt: \"Audit contracts for the change — check client\u002Fserver, route\u002Fschema, IPC, DTO, generated-client, and API boundaries\" })` when the change crosses client\u002Fserver, route\u002Fschema, IPC, DTO, generated-client, or API boundaries. Apply auto-fixable renames; surface structural mismatches.\n3. Dispatch the **`reviewer-concurrency`** subagent via `task({ subagent_type: \"reviewer-concurrency\", description: \"Audit concurrency\", prompt: \"Audit concurrency for the change — check mutations, jobs, webhooks, retries, idempotency, transactions, async UI writes\" })` when the change touches mutations, jobs, webhooks, retries, idempotency, transactions, or async UI writes. Apply auto-fixable items (AbortController injection); surface the rest.\n4. Dispatch the **`reviewer-observability-coverage`** subagent via `task({ subagent_type: \"reviewer-observability-coverage\", description: \"Audit observability coverage\", prompt: \"Audit observability coverage for critical-path async\u002Ferror\u002Fintegration changes\" })` after critical-path async\u002Ferror\u002Fintegration changes; if it reports missing evidence, invoke `skill({ name: \"add-observability\" })`.\n5. Dispatch the **`reviewer-data-integrity`** subagent via `task({ subagent_type: \"reviewer-data-integrity\", description: \"Audit data integrity\", prompt: \"Audit data integrity for the change — check migrations, schema, persistence, imports\u002Fexports, deletes, denormalized data, data-access invariants\" })` when the change touches migrations, schema, persistence, imports\u002Fexports, deletes, denormalized data, or data-access invariants. The subagent returns a change classification (additive\u002Fmutating\u002Fdestructive) plus severity-ranked findings; apply auto-fixable seed-fixture renames and surface the rest.\n6. Dispatch the **`reviewer-security-regression`** subagent via `task({ subagent_type: \"reviewer-security-regression\", description: \"Audit security regression\", prompt: \"Audit security regression for the change — check backend execution, auth, payments, file upload, webhook signing, secrets\u002Fenv, external APIs, unsafe redirects, user-rendered HTML\" })` when the change touches backend execution, auth, payments, file upload, webhook signing, secrets\u002Fenv, external APIs, unsafe redirects, or user-rendered HTML. The subagent runs read-only and returns a severity-ranked findings report; apply the `auto-fixable: true` items mechanically and surface the rest to the user. If the change specifically adds or modifies authorization\u002Fownership checks on a server entry point (TanStack server function, route handler, tRPC procedure, GraphQL resolver, webhook handler, queue worker, IPC handler), also dispatch the **`reviewer-authz`** subagent via `task({ subagent_type: \"reviewer-authz\", description: \"Audit authorization\", prompt: \"Audit authorization\u002Fownership checks for server entry points changed in this extension\" })` — the security-regression auditor covers the broader surface but defers authorization to this auditor. The `skill({ name: \"audit-authz\" })` skill remains available as a manual entry point.\n7. Dispatch the **`reviewer-error-boundaries`** subagent via `task({ subagent_type: \"reviewer-error-boundaries\", description: \"Audit error boundaries\", prompt: \"Audit error boundaries for user-facing async flows, route loaders, form submits, server actions, background failure paths changed in this extension\" })` when the change alters a user-facing async flow, route loader, form submit, server action surfaced in UI, or background failure path. Apply auto-fixable items; surface the rest.\n8. Dispatch the **`reviewer-loading-states`** subagent via `task({ subagent_type: \"reviewer-loading-states\", description: \"Audit loading states\", prompt: \"Audit loading states for async UI changes — useQuery, useSuspenseQuery, useMutation, optimistic updates, submit pending state, polling, client fetches\" })` when the change alters async UI (`useQuery`, `useSuspenseQuery`, `useMutation`, optimistic updates, submit pending state, polling, client fetches). Apply auto-fixable items; surface the rest.\n9. Dispatch the **`reviewer-accessibility-regression`** subagent via `task({ subagent_type: \"reviewer-accessibility-regression\", description: \"Audit accessibility regression\", prompt: \"Audit accessibility regression for interactive UI mutations — buttons, forms, dialogs, focus, custom click targets, error messages\" })` after interactive UI mutation (buttons, forms, dialogs, focus, custom click targets, error messages). Apply auto-fixable items; surface the rest.\n10. Dispatch the **`reviewer-client-bundle`** subagent via `task({ subagent_type: \"reviewer-client-bundle\", description: \"Audit client bundle\", prompt: \"Audit client bundle for changes — check new imports in UI, server-only code leaks to browser bundle\" })` when client routes\u002Fcomponents\u002Fhooks change, new dependencies are imported in UI, or server-only code might leak into the browser bundle.\n11. Add or expand tests for backend logic, data transformations, permissions, contracts, persisted data, non-trivial branching, async behavior, and business rules — invoke `skill({ name: \"write-tests\" })` so the new behavior is covered using the project's existing harness and conventions. When the extension changes a user-facing flow that warrants browser coverage and the project has Playwright (or the user approves installing it), also invoke `skill({ name: \"add-e2e-test\" })`. In `production`, this step is mandatory; in `balanced`, run unless the change is trivial UI wiring; in `fast`, opt in only via `include=tests`.\n\n## Stack-conditional adjuncts\n\n- **UI wiring:** use `skill({ name: \"add-empty-error-states\" })` for newly wired data that needs empty\u002Ferror states.\n- **Backend schema:** invoke `skill({ name: \"add-migration\" })` before editing migrations for schema changes, then dispatch the **`reviewer-data-integrity`** subagent via `task({ subagent_type: \"reviewer-data-integrity\", description: \"Audit data integrity\", prompt: \"Audit data integrity for schema changes — check migrations, persistence, data-access invariants\" })`.\n\n## NEVER\n\n- **NEVER implement the user's literal proposal without naming one alternative**\n  **Instead:** Surface the alternative seam in one sentence, state the tradeoff, then ask or proceed with reasoning.\n  **Why:** Users propose the solution shape from their current vantage point; the cleaner seam is often one layer up or down. Implementing literally locks in the wrong shape.\n\n- **NEVER ship the new path without auditing adjacent contracts**\n  **Instead:** Use `codegraph_search` and `codegraph_callers` (or `grep` as fallback) for callers\u002Fconsumers of the changed type\u002Ffield\u002Fstate and decide explicitly whether each adapts, breaks, or is unaffected.\n  **Why:** Extensions shift requirements; stale assumptions in adjacent code become silent bugs that surface later when no one remembers the change.\n\n- **NEVER add a new consumer of shared data without checking how peers stay live**\n  **Instead:** Use `codegraph_search` and `codegraph_callers` (or `grep` as fallback) for other readers of the same entity\u002Fendpoint (lists, current-user, settings, project\u002Fworkspace metadata — anything fetched in more than one place). Verify they share a cache or each subscribe to the mutation signal. If neither, propose consolidating into a shared query\u002Fstore before adding a second ad-hoc fetch.\n  **Why:** Each ad-hoc `useState + fetch` becomes an island the next mutation has to remember to invalidate. Rename-style mutations (same id, no navigation) won't incidentally refresh peers — the bug ships silently and only surfaces in production.\n\n- **NEVER expand scope to \"while we're here\" cleanups**\n  **Instead:** Note the cleanup opportunity in the response and stop.\n  **Why:** Extensions are dangerous because they're framed as small. Bundling cleanup makes the diff unreviewable and hides the requirement shift inside structural noise.\n\n- **NEVER treat manual override as a future problem**\n  **Instead:** Decide upfront: does the derived value lock the field, suggest into it, or fully replace user input? Make it explicit in the implementation.\n  **Why:** \"Auto-derive X\" almost always collides with the user's existing ability to set X manually. Skipping this decision creates UX bugs the next session has to retro-fix.\n\n- **NEVER agree with the user's framing of effort before completing Q2**\n  **Instead:** Run the contract audit first, then confirm or push back on scope.\n  **Why:** Small-feeling extensions routinely have 5x the contract surface the proposal implies. Agreeing early anchors scope incorrectly and locks the agent into a too-small mental budget for the real work.\n\n- **NEVER add a stop\u002Fcancel\u002Fremove\u002Fdisable action without enumerating every side-effect of its start\u002Fcreate\u002Fadd\u002Fenable counterpart**\n  **Instead:** List spawned children (processes, terminals, workers), persisted rows, in-memory registries\u002Fmaps, UI badges and indicator state, event listeners, pollers, and any cached \"is alive\" derivations created by the start path. The stop path must address each — kill, delete, unregister, reset, unsubscribe — or explicitly defer with a reason.\n  **Why:** Stop actions are framed as deletions but are really *reconciliations*. Missing one inverse leaves a zombie (orphan terminal still running, status dot still green, ghost row in a registry) that surfaces only after restart or the next interaction with the stale surface.\n\n- **NEVER proceed when the change crosses into rename\u002Frealign territory**\n  **Instead:** Stop and recommend the `realign` skill, or propose breaking the work into (a) extension and (b) follow-up rename.\n  **Why:** A rename masquerading as an extension drags every leak site into one diff and gets misreviewed as a small change.\n\n## When you're done\n\nBefore reporting completion, restate: (a) the contract that shifted, (b) the alternatives you considered and rejected, (c) the edge cases handled and the ones explicitly deferred. If you can't fill all three, you skipped the thinking — go back.\n\n---\n\n## Post-step: \u002Fsimplify\n\nAfter the extension lands, run `skill({ name: \"simplify\" })` against the diff to catch newly-introduced duplication, parallel-pattern drift, missed reuse of existing utilities, and parameter sprawl from grafting onto the existing shape.\n\n## Post-step: \u002Fpolish-ui (UI changes only)\n\nIf the diff touches UI files (`src\u002Fcomponents\u002F**`, `src\u002Froutes\u002F**`, `src\u002Fpages\u002F**`, `app\u002F**` — `.tsx`\u002F`.jsx`), run `skill({ name: \"polish-ui\" })` to verify kbd hints on hotkey-bound buttons, focus management, loading\u002Fdisabled states, and footer\u002Fchrome consistency. Skip when the UI delta is a one-line copy or style tweak.\n","> **Tool mapping (OpenCode):** This skill uses:\n> - `question` tool for user prompts (not `AskUserQuestion`)\n> - `task` tool for subagents (not `Agent` or `Task` subagent syntax)\n> - `skill({ name: \"...\" })` to load other skills (not `Skill(skill=\"...\", args=\"...\")`)\n> - `codegraph_explore`, `codegraph_search`, `codegraph_callers` for codebase exploration (preferred)\n> - `todowrite` for phase\u002Fprogress tracking\n> - `grep`, `glob`, `read`, `bash` as fallback when `.codegraph\u002F` not initialized\n>\n> **Context rule:** This skill supersedes any prior skill instructions. Follow ONLY these instructions now. Read the user's goal and any mode\u002Finclude\u002Fskip from the conversation context.\n\nRead `mode=`, `include=`, and `skip=` from the conversation context. Default to the mode specified in this skill if not provided.\n\n# Modify Feature\n\nA small extension is the most dangerous size of change: large enough to shift requirements and adjacent contracts, small enough that the agent skips the thinking a full feature would trigger. The user's proposed shape is one option, not the spec.\n\n---\n\n## Modes\n\nThis skill accepts a `mode=` argument. Default — when no `mode=` is specified — is `balanced`: the four-question pre-flight + contract audit below.\n\n| Mode | Behavior |\n|---|---|\n| `fast` | Skip the four pre-flight questions. Implement the user's literal proposal. Use only when the user has explicitly locked the seam (e.g. `mode=fast` in their prompt) and the change is genuinely single-file. |\n| `balanced` (default) | The full pre-flight: alternative seam, contract audit, scope check, edge cases. Then edit, verify, and run gated post-checks for contracts, concurrency, observability, and tests when triggered. |\n| `production` | `balanced` + an explicit scope-confirm gate before editing if the Q2 contract audit surfaces 5+ affected sites, plus mandatory tests for logic\u002Fdata\u002FAPI changes and observability instrumentation for integration boundaries. Pause and ask via `question` whether to proceed as an extension or escalate to `add-feature` \u002F `realign`. |\n\n**`include=` \u002F `skip=` overrides.** Add or remove specific concerns on top of the mode default — `mode=fast include=q2` runs the contract audit even in fast mode; `mode=balanced skip=q1` skips the alternative-seam question.\n\n**Mode safety override.** If `mode=fast` is requested but the change touches auth, permissions, payments, secrets, schema migrations, destructive deletes, background jobs, queues, cron, external APIs, email\u002FSMS\u002Fpush, imports\u002Fexports, file writes, spawned processes, IPC, caching\u002Finvalidation, feature flags, analytics\u002Fbusiness reporting, concurrency-sensitive mutations, or external webhooks, surface the conflict via `question` and confirm before honoring. The `\u002Fship` orchestrator enforces this upstream — direct manual callers may not.\n\n**Phase-gated NEVER scope.** When `mode=fast` is in effect, two NEVERs are explicitly suspended for the run: *\"NEVER implement the user's literal proposal without naming one alternative\"* and *\"NEVER agree with the user's framing of effort before completing Q2\"*. The remaining NEVERs (contract audit, peer-data consumers, scope creep, manual-override, stop-action symmetry, rename-realign boundary) stay in force in every mode — they protect against silent breakage that fast mode shouldn't override.\n\n---\n\n## Before you touch code, answer four questions\n\nUse `todowrite` to track these four questions as pending, then mark each completed as you answer it.\n\n**Always use the `question` tool** (structured choices) when you need clarification from the user — never present static numbered prompts they have to type answers to. Fall back to free-form prose only when the option space is genuinely open-ended.\n\n1. **Is the user's proposal the best seam?** They named one approach. Find at least one alternative — different layer (UI vs server vs data), different trigger (push vs pull, eager vs lazy), different ownership (existing module vs new). State the tradeoff. If their proposal still wins, say why; if not, surface the alternative *before* implementing.\n\n2. **What contracts shift?** List every place the *meaning* of something changes: types, API responses, persisted rows, UI states, user expectations, docs, tests asserting the old behavior. The extension is done when all of these are coherent, not when the new path works.\n\n   **Audit order:** types → API\u002FIPC surface → persisted rows\u002Fmigrations → UI states & conditionals → runtime\u002Flifecycle state (spawned processes, child terminals, timers, watchers, in-memory registries — and which UI surface projects each one's liveness) → tests asserting old behavior → user-facing docs\u002Fcopy → peer consumers (other components\u002Fhooks\u002Froutes reading or caching this same entity) → live-update wiring (event subscriptions, query invalidations, refetch triggers, and runtime-state projections like status badges, indicator dots, \"is alive\" booleans — name what owns the truth and how each reader stays consistent with it). Walk the list in this order; later layers depend on earlier layers' decisions.\n\n   **Structural audit preference:** Use `codegraph_explore`, `codegraph_search`, and `codegraph_callers` to map callers\u002Fconsumers of the changed type\u002Ffield\u002Fstate. Use `grep` as a fallback when `.codegraph\u002F` is not initialized.\n\n3. **Where's the boundary?** If the change touches 3+ unrelated modules, renames a domain concept, or invalidates persisted data, it's not an extension — stop and recommend `realign` or a feature-build approach instead. **Scope-explosion fallback:** if the audit in Q2 surfaces more than ~10 affected sites, that itself is the signal — stop and re-scope, even if implementation has already started.\n\n4. **What edge cases does the user's framing miss?** User overriding the derived value manually. Pre-existing rows that predate the extension. Failure of the new derivation step. Re-derivation when the source changes after the fact.\n\n   **Symmetric data-flow:** when adding a new *reader* of shared data, list the mutations that must invalidate it; when adding a new *mutation*, list the readers that must refresh.\n\n   **Cold-start reconciliation:** on process\u002Fapp restart, what's the source of truth for this feature's runtime state — persisted disk, a runtime probe (is the child process actually alive?), or \"assume offline until re-triggered\"? Decide explicitly; default-persist is a decision, not an absence of one. Stale persisted state that outlives its underlying runtime (a \"running\" row pointing at a dead PID, a green dot for a terminal that no longer exists) is the canonical bug class here.\n\n## Logic-first lane\n\nIf the extension changes a deterministic parser, validator, pricing rule, permission rule, data transform, state machine, API\u002Fdata contract, or non-trivial branch, write the expected behavior test before editing production code. In `production`, this is mandatory. In `balanced`, run it unless the project has no harness or the change is trivial UI wiring. In `fast`, run it only when the user passed `include=logic-first` or `include=tests`.\n\n## Integration-first lane\n\nIf the extension touches HTTP\u002Fwebhook dispatch, queues, jobs, cron, IPC, MCP tool calls, file writes, env-var injection, spawned processes, external APIs, email\u002FSMS\u002Fpush, imports\u002Fexports, or cache invalidation, name the runtime contract before editing: trigger, dispatch site, receiver, persisted\u002Fvisible outcome, and log\u002Fobservation location. Dispatch the **`runtime-contract-tracer`** subagent via `task({ subagent_type: \"runtime-contract-tracer\", description: \"Trace runtime contract\", prompt: \"Extract the 4-link runtime contract trace with file:line refs for this extension\" })` to extract the 4-link trace with file:line refs in a fresh context — the result is the input to your planning. After verification, invoke `skill({ name: \"add-observability\" })` unless equivalent structured evidence already exists and you can name where it lives.\n\n## After editing\n\nUse `todowrite` to track the after-editing steps. Create a todo for each gated step that applies to this change.\n\n1. Verify the changed code path, not just the build.\n2. Dispatch the **`reviewer-contracts`** subagent via `task({ subagent_type: \"reviewer-contracts\", description: \"Audit contracts\", prompt: \"Audit contracts for the change — check client\u002Fserver, route\u002Fschema, IPC, DTO, generated-client, and API boundaries\" })` when the change crosses client\u002Fserver, route\u002Fschema, IPC, DTO, generated-client, or API boundaries. Apply auto-fixable renames; surface structural mismatches.\n3. Dispatch the **`reviewer-concurrency`** subagent via `task({ subagent_type: \"reviewer-concurrency\", description: \"Audit concurrency\", prompt: \"Audit concurrency for the change — check mutations, jobs, webhooks, retries, idempotency, transactions, async UI writes\" })` when the change touches mutations, jobs, webhooks, retries, idempotency, transactions, or async UI writes. Apply auto-fixable items (AbortController injection); surface the rest.\n4. Dispatch the **`reviewer-observability-coverage`** subagent via `task({ subagent_type: \"reviewer-observability-coverage\", description: \"Audit observability coverage\", prompt: \"Audit observability coverage for critical-path async\u002Ferror\u002Fintegration changes\" })` after critical-path async\u002Ferror\u002Fintegration changes; if it reports missing evidence, invoke `skill({ name: \"add-observability\" })`.\n5. Dispatch the **`reviewer-data-integrity`** subagent via `task({ subagent_type: \"reviewer-data-integrity\", description: \"Audit data integrity\", prompt: \"Audit data integrity for the change — check migrations, schema, persistence, imports\u002Fexports, deletes, denormalized data, data-access invariants\" })` when the change touches migrations, schema, persistence, imports\u002Fexports, deletes, denormalized data, or data-access invariants. The subagent returns a change classification (additive\u002Fmutating\u002Fdestructive) plus severity-ranked findings; apply auto-fixable seed-fixture renames and surface the rest.\n6. Dispatch the **`reviewer-security-regression`** subagent via `task({ subagent_type: \"reviewer-security-regression\", description: \"Audit security regression\", prompt: \"Audit security regression for the change — check backend execution, auth, payments, file upload, webhook signing, secrets\u002Fenv, external APIs, unsafe redirects, user-rendered HTML\" })` when the change touches backend execution, auth, payments, file upload, webhook signing, secrets\u002Fenv, external APIs, unsafe redirects, or user-rendered HTML. The subagent runs read-only and returns a severity-ranked findings report; apply the `auto-fixable: true` items mechanically and surface the rest to the user. If the change specifically adds or modifies authorization\u002Fownership checks on a server entry point (TanStack server function, route handler, tRPC procedure, GraphQL resolver, webhook handler, queue worker, IPC handler), also dispatch the **`reviewer-authz`** subagent via `task({ subagent_type: \"reviewer-authz\", description: \"Audit authorization\", prompt: \"Audit authorization\u002Fownership checks for server entry points changed in this extension\" })` — the security-regression auditor covers the broader surface but defers authorization to this auditor. The `skill({ name: \"audit-authz\" })` skill remains available as a manual entry point.\n7. Dispatch the **`reviewer-error-boundaries`** subagent via `task({ subagent_type: \"reviewer-error-boundaries\", description: \"Audit error boundaries\", prompt: \"Audit error boundaries for user-facing async flows, route loaders, form submits, server actions, background failure paths changed in this extension\" })` when the change alters a user-facing async flow, route loader, form submit, server action surfaced in UI, or background failure path. Apply auto-fixable items; surface the rest.\n8. Dispatch the **`reviewer-loading-states`** subagent via `task({ subagent_type: \"reviewer-loading-states\", description: \"Audit loading states\", prompt: \"Audit loading states for async UI changes — useQuery, useSuspenseQuery, useMutation, optimistic updates, submit pending state, polling, client fetches\" })` when the change alters async UI (`useQuery`, `useSuspenseQuery`, `useMutation`, optimistic updates, submit pending state, polling, client fetches). Apply auto-fixable items; surface the rest.\n9. Dispatch the **`reviewer-accessibility-regression`** subagent via `task({ subagent_type: \"reviewer-accessibility-regression\", description: \"Audit accessibility regression\", prompt: \"Audit accessibility regression for interactive UI mutations — buttons, forms, dialogs, focus, custom click targets, error messages\" })` after interactive UI mutation (buttons, forms, dialogs, focus, custom click targets, error messages). Apply auto-fixable items; surface the rest.\n10. Dispatch the **`reviewer-client-bundle`** subagent via `task({ subagent_type: \"reviewer-client-bundle\", description: \"Audit client bundle\", prompt: \"Audit client bundle for changes — check new imports in UI, server-only code leaks to browser bundle\" })` when client routes\u002Fcomponents\u002Fhooks change, new dependencies are imported in UI, or server-only code might leak into the browser bundle.\n11. Add or expand tests for backend logic, data transformations, permissions, contracts, persisted data, non-trivial branching, async behavior, and business rules — invoke `skill({ name: \"write-tests\" })` so the new behavior is covered using the project's existing harness and conventions. When the extension changes a user-facing flow that warrants browser coverage and the project has Playwright (or the user approves installing it), also invoke `skill({ name: \"add-e2e-test\" })`. In `production`, this step is mandatory; in `balanced`, run unless the change is trivial UI wiring; in `fast`, opt in only via `include=tests`.\n\n## Stack-conditional adjuncts\n\n- **UI wiring:** use `skill({ name: \"add-empty-error-states\" })` for newly wired data that needs empty\u002Ferror states.\n- **Backend schema:** invoke `skill({ name: \"add-migration\" })` before editing migrations for schema changes, then dispatch the **`reviewer-data-integrity`** subagent via `task({ subagent_type: \"reviewer-data-integrity\", description: \"Audit data integrity\", prompt: \"Audit data integrity for schema changes — check migrations, persistence, data-access invariants\" })`.\n\n## NEVER\n\n- **NEVER implement the user's literal proposal without naming one alternative**\n  **Instead:** Surface the alternative seam in one sentence, state the tradeoff, then ask or proceed with reasoning.\n  **Why:** Users propose the solution shape from their current vantage point; the cleaner seam is often one layer up or down. Implementing literally locks in the wrong shape.\n\n- **NEVER ship the new path without auditing adjacent contracts**\n  **Instead:** Use `codegraph_search` and `codegraph_callers` (or `grep` as fallback) for callers\u002Fconsumers of the changed type\u002Ffield\u002Fstate and decide explicitly whether each adapts, breaks, or is unaffected.\n  **Why:** Extensions shift requirements; stale assumptions in adjacent code become silent bugs that surface later when no one remembers the change.\n\n- **NEVER add a new consumer of shared data without checking how peers stay live**\n  **Instead:** Use `codegraph_search` and `codegraph_callers` (or `grep` as fallback) for other readers of the same entity\u002Fendpoint (lists, current-user, settings, project\u002Fworkspace metadata — anything fetched in more than one place). Verify they share a cache or each subscribe to the mutation signal. If neither, propose consolidating into a shared query\u002Fstore before adding a second ad-hoc fetch.\n  **Why:** Each ad-hoc `useState + fetch` becomes an island the next mutation has to remember to invalidate. Rename-style mutations (same id, no navigation) won't incidentally refresh peers — the bug ships silently and only surfaces in production.\n\n- **NEVER expand scope to \"while we're here\" cleanups**\n  **Instead:** Note the cleanup opportunity in the response and stop.\n  **Why:** Extensions are dangerous because they're framed as small. Bundling cleanup makes the diff unreviewable and hides the requirement shift inside structural noise.\n\n- **NEVER treat manual override as a future problem**\n  **Instead:** Decide upfront: does the derived value lock the field, suggest into it, or fully replace user input? Make it explicit in the implementation.\n  **Why:** \"Auto-derive X\" almost always collides with the user's existing ability to set X manually. Skipping this decision creates UX bugs the next session has to retro-fix.\n\n- **NEVER agree with the user's framing of effort before completing Q2**\n  **Instead:** Run the contract audit first, then confirm or push back on scope.\n  **Why:** Small-feeling extensions routinely have 5x the contract surface the proposal implies. Agreeing early anchors scope incorrectly and locks the agent into a too-small mental budget for the real work.\n\n- **NEVER add a stop\u002Fcancel\u002Fremove\u002Fdisable action without enumerating every side-effect of its start\u002Fcreate\u002Fadd\u002Fenable counterpart**\n  **Instead:** List spawned children (processes, terminals, workers), persisted rows, in-memory registries\u002Fmaps, UI badges and indicator state, event listeners, pollers, and any cached \"is alive\" derivations created by the start path. The stop path must address each — kill, delete, unregister, reset, unsubscribe — or explicitly defer with a reason.\n  **Why:** Stop actions are framed as deletions but are really *reconciliations*. Missing one inverse leaves a zombie (orphan terminal still running, status dot still green, ghost row in a registry) that surfaces only after restart or the next interaction with the stale surface.\n\n- **NEVER proceed when the change crosses into rename\u002Frealign territory**\n  **Instead:** Stop and recommend the `realign` skill, or propose breaking the work into (a) extension and (b) follow-up rename.\n  **Why:** A rename masquerading as an extension drags every leak site into one diff and gets misreviewed as a small change.\n\n## When you're done\n\nBefore reporting completion, restate: (a) the contract that shifted, (b) the alternatives you considered and rejected, (c) the edge cases handled and the ones explicitly deferred. If you can't fill all three, you skipped the thinking — go back.\n\n---\n\n## Post-step: \u002Fsimplify\n\nAfter the extension lands, run `skill({ name: \"simplify\" })` against the diff to catch newly-introduced duplication, parallel-pattern drift, missed reuse of existing utilities, and parameter sprawl from grafting onto the existing shape.\n\n## Post-step: \u002Fpolish-ui (UI changes only)\n\nIf the diff touches UI files (`src\u002Fcomponents\u002F**`, `src\u002Froutes\u002F**`, `src\u002Fpages\u002F**`, `app\u002F**` — `.tsx`\u002F`.jsx`), run `skill({ name: \"polish-ui\" })` to verify kbd hints on hotkey-bound buttons, focus management, loading\u002Fdisabled states, and footer\u002Fchrome consistency. Skip when the UI delta is a one-line copy or style tweak.\n",{},"main","a40966cd3b7323e693a9fd665ab9c720d8bf9634","skills\u002Fmodify-feature",0,"https:\u002F\u002Fgithub.com\u002FAcauhi99\u002Fopencode-agent-system","https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@acauhi\u002Fopencode-agent-system","https:\u002F\u002Fgithub.com\u002FAcauhi99","@github Backend Engineer","2026-07-07 22:24:45",{"source":7,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add Acauhi99\u002Fopencode-agent-system --skill modify-feature",{"tool":38,"command":39},"bunx","bunx skills add Acauhi99\u002Fopencode-agent-system --skill modify-feature",{"tool":41,"command":42},"pnpm","pnpm dlx skills add Acauhi99\u002Fopencode-agent-system --skill modify-feature","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FAcauhi99\u002Fopencode-agent-system\u002Fblob\u002Fmain\u002Fskills\u002Fmodify-feature\u002FSKILL.md",true,[],[47,53,59,66,72,79],{"skillNo":48,"name":49,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":50,"categories":51,"keywords":52,"publishedAt":18},"01M74KEHKFCSF2H23R44MR5DN8","write-tests","https:\u002F\u002Fgithub.com\u002FAcauhi99\u002Fopencode-agent-system\u002Fblob\u002Fmain\u002Fskills\u002Fwrite-tests\u002FSKILL.md",[],[],{"skillNo":54,"name":55,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":58,"publishedAt":18},"01M74KEEXZW2185BZ3VJCM7AF6","update-changelog","https:\u002F\u002Fgithub.com\u002FAcauhi99\u002Fopencode-agent-system\u002Fblob\u002Fmain\u002Fskills\u002Fupdate-changelog\u002FSKILL.md",[],[],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":18},"01M74KDVH470SS6WPS8WK3VSW3","triage","Move issues and external PRs through a state machine of triage roles — categorise, verify, grill if needed, and write agent-ready briefs.","https:\u002F\u002Fgithub.com\u002FAcauhi99\u002Fopencode-agent-system\u002Fblob\u002Fmain\u002Fskills\u002Ftriage\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":18},"01M74KDKGNY0MQXQ0ZHAGYSJJ4","to-prd","https:\u002F\u002Fgithub.com\u002FAcauhi99\u002Fopencode-agent-system\u002Fblob\u002Fmain\u002Fskills\u002Fto-prd\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":18},"01M74KD9YN0K59GWMWDT5YHBKY","to-issues","Break a plan, spec, or PRD into independently-grabbable issues on the project issue tracker using tracer-bullet vertical slices.","https:\u002F\u002Fgithub.com\u002FAcauhi99\u002Fopencode-agent-system\u002Fblob\u002Fmain\u002Fskills\u002Fto-issues\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":18},"01M74KD14VJAJZ8E4ENN0KP9GV","testing-plan","https:\u002F\u002Fgithub.com\u002FAcauhi99\u002Fopencode-agent-system\u002Fblob\u002Fmain\u002Fskills\u002Ftesting-plan\u002FSKILL.md",[],[]]