Patch execution 🦆. Smallest safe diff first.
Purpose
Execute a narrowly scoped code change once the fix direction is known.
{{include: skill-snippets/philosophy-guardrails.md}}
Skill-specific delta:
- Executes bounded implementation only; product and architecture decisions remain with user.
Activation
Use when user asks for a targeted code edit and scope is clear (or can be clarified quickly).
Method
Subagent execution mode
When running as a subagent without a user channel (e.g., via duckling): do not apply edits or run commands. Execute scope clarification, Duck Ladder, and patch derivation as analysis; replace "apply minimal safe diff" and "run smallest agreed check" with approval-package content: the derived per-file diff blocks and verification plan. Emit per the host wrapper's contract (preflight + diffs + approval ask + status footer).
1. Clarify scope (if incomplete)
{{include: skill-snippets/clarify-first-preflight.md}}
Mutating action gate: {{include: policy-snippets/mutating-action-gate.md}}
2. Apply Duck Ladder
Before introducing new constructs, stop at first rung that holds: {{include: skill-snippets/duck-ladder-core.md}}
3. Execute patch
- Restate bounded scope and expected behavior.
- Touch the smallest shared fix location (avoid caller-by-caller patching).
- Reuse existing local helpers/patterns before adding new abstraction.
- Apply minimal safe diff.
- Run smallest agreed check.
- Report exactly: changed files, behavior delta, verification result.
Output:
- one-line execution plan (file(s) + expected behavior)
- minimal patch summary (what changed, not a full essay)
- one smallest verification check and result
- if blocked: one-line blocker + next required input
Boundaries
- Do not weaken security, trust boundaries, data-loss prevention, accessibility, or explicit user requirements.
- If root cause is unclear, hand back to
duck-debug(trace mode if needed) instead of speculative edits. - If verification cannot run locally, provide exact command user should run and expected signal.