Patpat Debug
For clear, bounded, reversible local work without delivery intent, use this skill and its relevant references. Otherwise read the operating protocol and execution graph in full before acting. Escalate on uncertainty, security, auth, billing, secrets, architecture, cross-cutting work, or delivery intent. Define Claim, Surface, Action, Expect, and Cleanup before editing. Do not load the router or reread unchanged instructions already loaded in this session.
Read repository truth, proof over proxy, fix root causes, smallest safe change, and preserve safety. Apply the defect playbook. When the user requests test-first work or a cheap deterministic regression target exists, apply regression first.
Observe the failure before any production edit, or record an explicit why-not; report fail-before and pass-after on the same check.
Reproduce before editing when safe and practical. Otherwise trace the contract or code path, or use an isolated non-harmful surrogate, and state that direct runtime proof is unavailable. Trace the earliest incorrect state instead of patching the last visible symptom.
If the user limited the request to diagnosis, stop after proving or bounding the root cause. Recommend the smallest patch without editing.
Change one causal variable at a time. Preserve only material failed hypotheses through the defect playbook as bounded, redacted evidence; do not retain raw logs or trivial attempts. Re-run the original reproduction when it remains safe and practical; otherwise run the predeclared non-triggering check and state the missing runtime proof. Never label an unobserved fix as verified.
When the defect is a mismatch against a reference image or migrated UI, apply the visual equivalence playbook after reproducing the defect. Preserve the pre-edit reference and comparison harness.
Proof closure
Define the five-field proof contract before any mutation. Close mutating work with:
- Always:
patpat-verify, using authoritative evidence. - When required:
patpat-reviewfor delivery intent, auth/security/billing/secrets, architecture or cross-cutting scope, durable-run completion, land/merge, or another operating-protocol review gate.
For clear, bounded, reversible local work with none of those review requirements, proceed from verification to REPORT without independent review.