[Code Quality] Use when proving a fix is correct via adversarial proof traces — a skeptic tries to DISPROVE it first, with confidence scoring and evidence chains.
Scanned 9/9/2026
Install to Claude Code
npx -y skills add duc01226/easy-claude --skill prove-fix --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Prove Fix?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/duc01226-prove-fix-easy-claude)More formats (shields.io, HTML) on the badges page.
---
name: prove-fix
version: 1.2.0
description: '[Code Quality] Use when proving a fix is correct via adversarial proof traces — a skeptic tries to DISPROVE it first, with confidence scoring and evidence chains.'
---
<!-- PROMPT-ENHANCE:STEP-TASK-ANCHOR:START -->
> **[BLOCKING]** Execute skill steps in declared order. NEVER skip, reorder, or merge steps without explicit user approval.
> **[BLOCKING]** Before each step or sub-skill call, update task tracking: set `in_progress` when step starts, set `completed` when step ends.
> **[BLOCKING]** Every completed/skipped step MUST include brief evidence or explicit skip reason.
> **[BLOCKING]** If Task tools are unavailable, create and maintain an equivalent step-by-step plan tracker with the same status transitions.
<!-- PROMPT-ENHANCE:STEP-TASK-ANCHOR:END -->
## Quick Summary
**Goal:** Block shipping an unproven fix — adopt a SKEPTIC's stance and try to DISPROVE the fix first, then build a code proof trace (like a debugger stack trace) for each change with confidence percentages, so every code change carries a `file:line` evidence chain that survived a genuine refutation attempt and a fix ships only when its correctness is proven (≥80%), never assumed.
**Summary:**
- **Purpose / default stance is SKEPTIC, not validator** — find why the fix is WRONG or INCOMPLETE, never confirm it works. Skill name ("prove-fix") + post-`/fix` context + points rubric all bias toward confirmation; the Adversarial Verification Mindset forces a reset so confidence is *earned by surviving attack*, not awarded for coherence.
- **The 5 main steps (run in order, NEVER skip):** (1) **Change Inventory** — list EVERY change (file:line, before/after, type: root-cause/secondary/defensive/cleanup); (2) **Proof Trace per change** — stack-trace chain symptom → trigger path → root cause → fix mechanism → why-correct → **refutation attempt** → related paths → edge cases → side effects, every arrow `file:line`; (3) **Confidence Scoring** — points rubric + SKEPTIC caps; (4) **Cross-Verification** — Anti-Bias Gate FIRST, then interaction/completeness/regression/dependency/performance (paging+index DB protocol); (5) **Final Verdict** + Goal Satisfaction update.
- Runs AFTER `/fix` (NEVER before) — the non-negotiable verification gate between `/fix` and `/code-simplifier`; ≥80% ship · 60-79% flag · <60% BLOCK (route back to `/debug-investigate` or `/fix`).
- For EACH change, run a **Refutation Pass** FIRST (strongest case the fix is wrong/incomplete: counter-cases, unclosed feeder paths, wrong layer, regression risk, "test passes for the wrong reason") before scoring — an un-attacked change cannot exceed 79%.
- **Trace ALL related things** — every caller, consumer, sibling/alternate path, feeder path, downstream dependent, shared-state writer the change touches; an un-enumerated related path is an unproven path and caps confidence below 80%. — why: the reproduction exercises one path; the bug survives through paths you never traced.
- Score with the points rubric (root cause +25, fix mechanism +20, pattern precedent +15, framework +10, edge cases +5 each, side effects +10, no regressions +5); pattern precedent (1+ working example), edge cases (error/null/concurrent), survived refutation, and spec-loop evidence (property TC + mutation-kill + Dual-Feedback) are REQUIRED, not optional.
- Map every fix part to a primary/contributing/latent root cause from the hypothesis matrix and prove ALL feeder paths closed; finish with the **Anti-Bias Gate** + cross-change checks + final verdict, then resolve the active Goal Contract (map each proof trace to its success criterion, emit the PASS/FAIL/BLOCKED matrix) — a SHIP verdict does NOT close work while any required criterion remains FAIL.
**Workflow:**
1. **Inventory** — List every code change made by the fix (file:line, before/after)
2. **Trace + Refute** — For each change, build a proof chain (symptom → root cause → fix) AND run a refutation pass that tries to break it before believing it
3. **Score** — Assign confidence percentage per change with evidence; confidence is earned by surviving refutation, not awarded for coherence
4. **Verify** — Anti-Bias Gate + cross-check fix against edge cases, side effects, and ALL related paths
5. **Verdict** — Overall fix confidence and any remaining risks
**Key Rules:**
- **Default stance is SKEPTIC, not validator** — actively try to DISPROVE each change before scoring it; "looks correct" is the bias this gate exists to break
- Every claim MUST ATTENTION have `file:line` evidence — no exceptions
- Each change gets its OWN proof trace, refutation pass, and confidence score
- A change that has not been genuinely attacked (refutation pass) cannot exceed 79%
- If ANY change scores below 80%, flag it and recommend additional investigation
- Always run this proof-trace step after `/fix` — **non-negotiable**, never skip it
### Frontend/UI Context (if applicable)
> When this task involves frontend or UI changes,
- Component patterns: `docs/project-reference/frontend-patterns-reference.md`
- Styling/BEM guide: `docs/project-reference/scss-styling-guide.md`
- Design system tokens: `docs/project-reference/design-system/README.md`
**Be skeptical. Apply critical thinking, sequential thinking. Every claim needs traced proof, confidence percentages (Idea should be more than 80%).**
# Prove Fix
Post-fix verification skill building evidence-based proof chains for every code change. A code debugger's stack trace, but for proving WHY a fix is correct.
---
## When to Use
- **After `/fix`** in bugfix, hotfix, or any fix workflow
- After applying code changes that fix a reported bug
- Verify fix correctness before review/commit
## When NOT to Use
- Before fix applied (use `/debug-investigate` instead)
- New feature verification (use `/test` instead)
- Code quality review (use `/code-review` instead)
---
## Adversarial Verification Mindset (NON-NEGOTIABLE)
**Default stance: SKEPTIC, not validator. Your job is to prove the fix is WRONG or INCOMPLETE — and only conclude it is correct when every attack fails.**
> **Confirmation-bias trap (acute for THIS skill):** The skill is literally named "prove-fix", you arrive immediately after `/fix` (you may have written the fix yourself), and the scoring rubric *awards points for verified items* — three forces that all pull toward confirming the fix works. A reviewer who already endorsed the fix cannot also be its skeptic without a forced reset. This section is that reset. — why: "build a proof FOR X" silently becomes "find reasons X is right"; real verification is "try to break X and report what survived".
**Reframe the goal:** Do NOT set out to demonstrate the fix is correct. Set out to demonstrate it is BROKEN. Confidence is whatever is left standing *after* a genuine attempt to break it — never a tally of agreements.
### Refutation Techniques (apply ALL per change before scoring)
| Technique | Think (try to make the fix FAIL) |
| --- | --- |
| Counter-case hunt | Find ONE input/state/timing where the "fixed" code still produces the symptom. If you cannot, prove the input domain is exhausted — don't assume it. |
| Test-passes-for-wrong-reason | Does the regression test pass because the fix is correct, or because the test is weak (asserts the example, not the invariant; mocks away the bug; never executes the fixed line)? |
| Unclosed feeder path | Name every OTHER producer/caller/event/job/cache that can write the observed final state. Did the fix close ALL of them, or just the one you reproduced? |
| Wrong-layer challenge | Argue the fix patches a symptom site, not the invariant owner. Would the bug recur through a sibling path that bypasses this fix? |
| Regression injection | Assume the fix introduced a NEW bug. Where would it be? (changed scope, broadened catch, altered ordering, new query without paging/index.) |
| Steel-man "no fix" | Argue the original code was actually correct and the real bug is elsewhere. If that argument has any legs, the root cause is unproven. |
| Contrarian verdict | Before writing the score, argue in 2 sentences that this change should be BLOCKED. Then choose the stronger of ship-vs-block. |
### Forbidden Patterns
| Forbidden | Required correction |
| --- | --- |
| "Fix is obviously correct" | Obviousness is the illusion this gate breaks. Run the refutation pass anyway. |
| "Reproduction test passes → proven" | A passing example ≠ a closed invariant. Attack the test before trusting it. |
| Award points for coherence | Points require *survived attack*, not a plausible-sounding chain. |
| "I wrote the fix, I know it works" | Author ≠ reviewer. Reset to skeptic; attack your own change hardest. |
| Stop at the path you reproduced | Enumerate ALL feeder/related paths; an un-attacked path is an unproven path. |
### Anti-Bias Gate (MANDATORY before any SHIP/SHIP-WITH-CAVEATS verdict)
Complete ALL of these — per change — before writing the final verdict (MUST ATTENTION):
- [ ] Ran the Refutation Pass (≥1 genuine counter-case attempt, recorded with `file:line` evidence of why it fails to reproduce)
- [ ] Attacked the regression test itself — confirmed it fails on the *un-fixed* code and asserts the invariant, not the example
- [ ] Enumerated ALL related/feeder paths and proved each is closed or explicitly listed as unverified
- [ ] Stated the strongest argument the fix is at the WRONG layer, and rebutted it with evidence
- [ ] Named ≥1 plausible NEW regression the change could introduce, and ruled it out with evidence
- [ ] Wrote the contrarian (BLOCK) argument and explained why ship still wins
Any box unchecked → verification is NOT complete; confidence is capped at 79% (flag, do not ship). NEVER round an un-refuted change up to 80%.
---
## Step 1: Change Inventory
List ALL changes made by the fix. For each change, document:
```
CHANGE #N: [short description]
File: [path/to/file.ext]
Lines: [start-end]
Before: [code snippet — the broken version]
After: [code snippet — the fixed version]
Type: [root-cause-fix | secondary-fix | defensive-fix | cleanup]
```
**Change types:**
- **root-cause-fix** — Directly addresses the root cause of the bug
- **secondary-fix** — Fixes a related issue discovered during investigation
- **defensive-fix** — Prevents the same class of bug from recurring
- **cleanup** — Removed dead code or simplified logic (no behavior change)
---
## Step 2: Proof Trace (per change)
For EACH change, build a **stack-trace-style proof chain** — the core of the skill.
### Proof Trace Format
```
PROOF TRACE — Change #N: [description]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
SYMPTOM (what the user sees):
→ [Observable behavior, e.g., "UI doesn't refresh after assigning PIC"]
TRIGGER PATH (how the symptom occurs):
1. [file:line] User action → [method/event]
2. [file:line] → calls [method]
3. [file:line] → dispatches [action/event]
4. [file:line] → handler/effect [name]
5. [file:line] ← BUG HERE: [exact broken behavior]
ROOT CAUSE (proven):
→ [One sentence: what exactly is wrong and why]
→ Evidence: [file:line] shows [specific code proving the bug]
→ Hypothesis matrix mapping: RC-[N] status [primary/contributing/latent] from [report path/section]
→ Feeder paths closed: [path names or "single path verified"]; unresolved paths: [none/list]
FIX MECHANISM (how the change fixes it):
→ [One sentence: what the fix does differently]
→ Before: [broken code path with file:line]
→ After: [fixed code path with file:line]
→ Owning fix layer: [layer/component] — why this is the lowest shared owner
WHY THIS FIX IS CORRECT:
→ [Reasoning backed by code evidence]
→ Pattern precedent: [file:line] shows same pattern working elsewhere
→ Framework behavior: [file:line or doc reference] confirms expected behavior
→ Forward convergence: [origin/trigger] -> [corrected transformations] -> [observed final output no longer stale/wrong]
RELATED PATHS TRACED (all related things — none left un-attacked):
→ Callers/consumers of changed symbol: [file:line list] — [each unaffected/updated, with evidence]
→ Other feeder paths that write the final state: [file:line list] — [each closed / explicitly unverified]
→ Sibling/alternate paths (retry, async, cache, background, alternate UI/API): [file:line] — [status]
→ Downstream dependents (graph trace --direction downstream when graph.db exists): [evidence]
REFUTATION ATTEMPT (try to break it — REQUIRED before scoring):
→ Strongest counter-case attempted: [input/state/timing] → [why it does NOT reproduce, with file:line]
→ Test attacked: [does the regression test fail on un-fixed code? assert invariant or just the example?] — [file:line]
→ Wrong-layer challenge: [strongest argument this is a symptom patch] → [rebuttal with file:line, or CONCEDED]
→ New-regression hunt: [most plausible bug the change could introduce] → [ruled out with file:line, or OPEN]
→ Contrarian verdict (2 sentences arguing BLOCK): [...] → [why ship still wins, or why it does not]
→ Survived attack? [YES — all attacks failed / NO — finding(s): ...]
EDGE CASES CHECKED:
→ [edge case 1]: [verified/not-verified] — [evidence]
→ [edge case 2]: [verified/not-verified] — [evidence]
SIDE EFFECTS:
→ [None / List of potential side effects with evidence]
CONFIDENCE: [X%] (earned by surviving the refutation pass, NOT by tallying agreements)
Survived attacks: [list of attacks attempted that failed to break the fix]
Verified: [list of verified items]
Not verified / un-attacked: [list of unverified items — each caps confidence below 80%]
```
### Proof Trace Rules
1. **Every arrow (→) MUST ATTENTION have a `file:line` reference** — no exceptions
2. **TRIGGER PATH must be traceable** — someone should be able to follow it step-by-step in the code
3. **REFUTATION ATTEMPT is REQUIRED and must be GENUINE** — you MUST try to break the fix (counter-case, weak-test, wrong-layer, new-regression, contrarian) before scoring. A trace with an empty or token refutation pass is INCOMPLETE and caps confidence at 79%. Default to "broken until proven otherwise", not "correct until disproven".
4. **RELATED PATHS must be fully traced ("all related things")** — enumerate every caller, consumer, sibling/alternate path, feeder path, downstream dependent, and shared-state writer the change touches; an un-enumerated related path is an unproven path and caps confidence below 80%.
5. **Hypothesis matrix mapping is REQUIRED for bugfixes** — every fix part maps to a primary/contributing/latent root cause or is flagged as unrelated scope
6. **Feeder paths must be accounted for** — prove the fix closes every path that can write the final observed state, or explicitly list remaining unverified paths
7. **Pattern precedent is REQUIRED** — find at least 1 working example of the same pattern elsewhere in the codebase
8. **Edge cases MUST ATTENTION be enumerated** — at minimum: error path, null/empty input, concurrent access
9. **Side effects MUST ATTENTION be assessed** — what else could this change affect?
10. **The regression test MUST be attacked, not trusted** — confirm it FAILS on the un-fixed code and asserts the protected invariant (not just the reproduction example, not a mock that hides the bug, and the fixed line actually executes). A test you did not try to break is not evidence.
11. **Spec-loop evidence is REQUIRED for a complete proof** (canonical: `SYNC:spec-loop-discipline`) — the proof MUST carry, with `file:line`: (a) the **regression property TC** guarding the fixed invariant — a universally-quantified property ("for ALL inputs in {domain}, {invariant} holds") + boundary counter-case, not just the reproduction example; (b) **mutation-kill evidence** for the fixed core-logic line — show a surviving mutant on that line is now killed (MUTATION-SCORE bar, not line-coverage %); (c) a **Dual-Feedback entry** — the spec rule restored/added AND the guarding test that feeds it back. A proof trace missing any of (a)/(b)/(c) is INCOMPLETE — cap its confidence below the 80% ship threshold until the spec-loop evidence is supplied.
---
## Step 3: Confidence Scoring
Each change gets an individual confidence score:
| Score | Meaning | Action Required |
| ----------- | --------------------------------------------------------------------------- | -------------------------------------------------- |
| **95-100%** | Full proof trace complete, all edge cases verified, pattern precedent found | Ship it |
| **80-94%** | Main proof trace complete, some edge cases unverified | Ship with caveats noted |
| **60-79%** | Proof trace partial, some links unverified | Flag to user — recommend additional investigation |
| **<60%** | Insufficient evidence | **BLOCK** — do not proceed until evidence gathered |
### Scoring Criteria
Award points for each verified item:
| Criterion | Points | Evidence Required |
| ----------------------------------------- | ------- | ----------------------------- |
| Root cause identified with file:line | +25 | Code reference |
| Fix mechanism explained with before/after | +20 | Code diff |
| Pattern precedent found in codebase | +15 | Working example at file:line |
| Framework behavior confirmed | +10 | Framework source or docs |
| Edge cases checked (per case) | +5 each | Verification result |
| Side effects assessed | +10 | Impact analysis |
| No regressions identified | +5 | Test results or code analysis |
**Total possible: 100+** (normalize to percentage)
> **[SKEPTIC GATE — applied AFTER the additive score]** The rubric measures evidence *gathered*; it does not measure whether the fix *survived attack*. Apply these caps regardless of the additive total — a high tally never overrides a failed/missing attack:
>
> - Refutation Pass not genuinely attempted, or any related/feeder path left un-enumerated → **cap at 79%** (flag, do not ship).
> - Any refutation attack succeeded (counter-case reproduces, test is weak, wrong layer, open regression) → that is a **finding**: score reflects the unresolved defect (typically <60%, BLOCK) until the finding is closed.
> - Contrarian (BLOCK) argument is stronger than the ship argument → **BLOCK**, route back to `/debug-investigate` or `/fix`.
>
> Confidence is what remains *after* the attack — never the additive tally alone.
---
## Step 4: Cross-Verification
After individual proof traces, perform cross-change verification:
0. **Anti-Bias Gate (MANDATORY first)** — Complete every box of the Anti-Bias Gate (from the Adversarial Verification Mindset section) for the change set as a whole before any SHIP verdict. An unchecked box means verification is incomplete — go back, do not ship.
1. **Interaction check** — Do the changes interact with each other? Could one change break another?
2. **Completeness check** — Does the combined fix address ALL reported symptoms? Steel-man "the bug is still present somewhere" — what would prove it?
3. **Regression check** — Could the combined changes introduce new bugs? Assume they did; where?
4. **Dependency check** — Are there other code paths that depend on the changed behavior?
5. **Performance regression check** — Does the fix introduce performance issues?
> **[IMPORTANT] Database Performance Protocol (MANDATORY):**
>
> 1. **Paging Required** — ALL list/collection queries MUST ATTENTION use pagination. NEVER load all records into memory. Verify: no unbounded `GetAll()`, `ToList()`, or `Find()` without `Skip/Take` or cursor-based paging.
> 2. **Index Required** — ALL query filter fields, foreign keys, and sort columns MUST ATTENTION have database indexes configured. Verify: entity expressions match index field order, database collections have index management methods, migrations include indexes for WHERE/JOIN/ORDER BY columns.
---
## Step 5: Final Verdict
Produce a summary verdict:
```
FIX VERIFICATION VERDICT
━━━━━━━━━━━━━━━━━━━━━━━
Overall Confidence: [X%]
Anti-Bias Gate: [ALL boxes checked? YES/NO — if NO, verdict CANNOT be SHIP]
Changes Summary:
#1: [description] — [X%] ✅/⚠️/❌ — refutation: [survived / finding: ...]
#2: [description] — [X%] ✅/⚠️/❌ — refutation: [survived / finding: ...]
#N: [description] — [X%] ✅/⚠️/❌ — refutation: [survived / finding: ...]
Symbols: ✅ ≥80% (ship) | ⚠️ 60-79% (flag) | ❌ <60% (block)
Attacks that FAILED to break the fix (these earn the confidence):
- [attack]: [why it could not reproduce — file:line]
Attacks that SUCCEEDED (open findings — block until closed):
- [attack]: [the defect it exposed — file:line] (or "none")
Remaining Risks:
- [risk 1]: [likelihood] × [impact] — [mitigation]
- [risk 2]: [likelihood] × [impact] — [mitigation]
Verification Method:
- [Manual testing required? Which scenarios?]
- [Automated tests cover this? Which tests?]
- [Additional monitoring needed post-deploy?]
Recommendation: [SHIP / SHIP WITH CAVEATS / INVESTIGATE FURTHER / BLOCK]
```
**Goal Satisfaction update (MANDATORY after verdict):** resolve the active Goal Contract per `SYNC:goal-contract-satisfaction-loop` and map each proof trace to the saved success criterion it satisfies. Append proof evidence and remaining gaps to the goal file's Iteration Log and update its Goal Satisfaction matrix (PASS/FAIL/BLOCKED per criterion). A SHIP recommendation does NOT close the work while any required goal criterion remains FAIL — route the validated gap into another bounded fix loop or escalate a blocker.
---
## Example: Proof Trace for NgRx Effect Fix
```
PROOF TRACE — Change #1: Move catchError inside switchMap
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
SYMPTOM:
→ UI doesn't refresh after assigning PIC, Job Opening, or changing stage
TRIGGER PATH:
1. candidate-quick-card-v2.component.ts:445 — User clicks "Assign PIC"
2. candidate-card.container.component.ts:892 — onPersonInChargeChange($event)
3. candidate-card.effect.ts:275 — SavePersonInCharge effect
4. candidate-card.effect.ts:284 — dispatches LoadCandidateDetailsAction
5. candidate-card.effect.ts:48 ← EFFECT IS DEAD — never processes the action
ROOT CAUSE:
→ catchError at outer pipe level (effect.ts:64) causes effect completion on ANY error
→ Evidence: effect.ts:43-69 shows catchError OUTSIDE switchMap
→ Evidence: ngrx-effects.js:156-165 confirms defaultEffectsErrorHandler
only catches errors, not completions
FIX MECHANISM:
→ Move catchError INSIDE switchMap so errors are caught per-request
→ Before: effect.ts:64 — catchError at outer pipe → effect COMPLETES → DEAD
→ After: effect.ts:52 — catchError inside switchMap → inner obs completes → outer SURVIVES
WHY THIS FIX IS CORRECT:
→ RxJS: catchError inside switchMap catches per-emission, outer stream continues
→ Pattern precedent: effect.ts:120 (moveApplicationToNextState) uses same inner pattern
→ Framework: NgRx effects auto-resubscribe on ERROR but NOT on COMPLETION
RELATED PATHS TRACED:
→ Callers of SavePersonInCharge effect: container:892 only — verified no other dispatcher
→ Other effects sharing the dead-stream bug: grep catchError outside switchMap →
effect.ts:300 (SaveJobOpening), effect.ts:355 (ChangeStage) have SAME bug —
⚠ NOT fixed by this change; listed as unverified/out-of-scope feeder paths
→ Downstream consumers of LoadCandidateDetailsAction: reducer.ts:88 — unaffected (no contract change)
REFUTATION ATTEMPT:
→ Counter-case: a SECOND error after the fix → inner catchError re-catches; outer survives (verified effect.ts:52)
→ Test attacked: spec fails on un-fixed code (effect completes, no SetCandidateDetails emitted) AND asserts
the effect still emits on the 2nd call — invariant, not just the one example (effect.spec.ts:140-176)
→ Wrong-layer challenge: could fix at component? NO — effect owns the stream lifetime invariant; component patch
would leave SaveJobOpening/ChangeStage broken. Layer confirmed correct.
→ New-regression hunt: broadened catch could swallow a real error → ruled out, same error branch returns
same action, only scope moved (effect.ts:52 vs :64)
→ Contrarian: "BLOCK — two sibling effects still carry the bug." → Ship THIS change (correct + tested) but
the sibling paths are a SEPARATE finding to route back to /fix, not a reason to block this one.
→ Survived attack? YES for this change — but surfaced 2 un-fixed sibling feeder paths as findings.
EDGE CASES:
→ 403 Forbidden: verified — returns SetCandidateDetails with isAllowDisplayed=false
→ Network timeout: verified — returns EMPTY, effect survives
→ Multiple rapid requests: verified — switchMap cancels previous (unchanged)
SIDE EFFECTS:
→ None for this effect — same error handling logic, only scope changed
CONFIDENCE: 90% (this change), with a BLOCKING completeness finding
Survived attacks: counter-case, weak-test, wrong-layer, new-regression all failed to break it
Verified: root cause, fix mechanism, pattern precedent, framework source, all edge cases
Not verified / open finding: SaveJobOpening (effect.ts:300) and ChangeStage (effect.ts:355) share the
identical bug and are NOT fixed — the original symptom ("UI doesn't refresh after ... changing stage")
is only PARTIALLY resolved. Completeness check FAILS until those are fixed too.
```
> **What the skeptic stance bought here:** a confirmation-biased pass would have scored this 95% ("root cause found, test passes, ship it") and shipped a fix that leaves two-thirds of the reported symptom alive. The refutation pass + "trace all related things" caught the sibling feeder paths the reproduction never exercised.
---
> Run `python .claude/scripts/code_graph trace <file> --direction downstream --json` to prove fix doesn't break downstream.
## Graph Intelligence (RECOMMENDED if graph.db exists)
If `.code-graph/graph.db` exists, enhance analysis with structural queries:
- **Verify test coverage:** `python .claude/scripts/code_graph query tests_for <function> --json`
- **Trace affected code paths:** `python .claude/scripts/code_graph query callers_of <function> --json`
- **Batch analysis:** `python .claude/scripts/code_graph batch-query file1 file2 --json`
### Graph-Trace for Fix Verification
When graph DB is available, use `trace` to PROVE the fix doesn't break downstream consumers:
- `python .claude/scripts/code_graph trace <fixed-file> --direction downstream --json` — verify all downstream consumers, event handlers, and bus message listeners are unaffected
- `python .claude/scripts/code_graph trace <fixed-file> --direction both --json` — full context: what triggered the bug (upstream) + what the fix affects (downstream)
- Include trace results as evidence in the proof chain
## Integration with Other Skills
This skill is the **mandatory verification gate** between `/fix` and `/code-simplifier` in fix workflows.
**Workflow position:**
```
... → /fix → /prove-fix → /code-simplifier → /changes-review → ...
```
**If proof trace reveals issues:**
- Score ≥80%: proceed to next step
- Score 60-79%: ask user whether to proceed or investigate further
- Score <60%: BLOCK — return to `/debug-investigate` or `/fix` step
---
<prove-context>$ARGUMENTS</prove-context>
---
## Workflow Recommendation
> **MANDATORY IMPORTANT MUST ATTENTION — NO EXCEPTIONS:** If you are NOT already in a workflow, you MUST ATTENTION use `AskUserQuestion` to ask the user. Do NOT judge task complexity or decide this is "simple enough to skip" — the user decides whether to use a workflow, not you:
>
> 1. **Activate `workflow-bugfix` workflow** (Recommended) — investigate → debug → plan → fix → prove-fix → review → test
> 2. **Execute `/prove-fix` directly** — run this skill standalone
---
## Next Steps
**MANDATORY IMPORTANT MUST ATTENTION — NO EXCEPTIONS** after completing this skill, you MUST ATTENTION use `AskUserQuestion` to present these options. Do NOT skip because the task seems "simple" or "obvious" — the user decides:
- **"/code-simplifier (Recommended)"** — Clean up fix implementation
- **"/integration-test"** — Generate/update regression integration tests
- **"/workflow-review-changes"** — Review all changes before commit
- **"Skip, continue manually"** — user decides
> **[IMPORTANT]** Use `TaskCreate` to break ALL work into small tasks BEFORE starting — including tasks for each file read. This prevents context loss from long files. For simple tasks, AI MUST ATTENTION ask user whether to skip.
**Prerequisites:** **MUST ATTENTION READ** before executing:
- `docs/project-reference/domain-entities-reference.md` — Domain entity catalog, relationships, cross-service sync (read when task involves business entities/models)
> **External Memory:** For complex or lengthy work (research, analysis, scan, review), write intermediate findings and final results to a report file in `plans/reports/` — prevents context loss and serves as deliverable.
> **Evidence Gate:** MANDATORY IMPORTANT MUST ATTENTION — every claim, finding, and recommendation requires `file:line` proof or traced evidence with confidence percentage (>80% to act, <80% must verify first).
<!-- SYNC:end-to-start-debugger-trace -->
> **End-to-Start Debugger Trace** — For non-trivial bugs, failed verification, regression fixes, behavior-changing code, or unclear code flow, start from the observed final state and walk backward before proposing a fix.
>
> 1. **Frame 0: observed end state** — Name the exact user-visible output, failing assertion, log line, persisted value, API response, rendered UI, or aggregate bucket. Record the reader/query/renderer that produced it with `file:line` evidence.
> 2. **Walk backward one hop at a time** — Trace final reader -> projection/cache/storage -> writer -> consumer/handler/job -> producer/caller -> original trigger. At every hop record: input, transformation, output, owner, and evidence.
> 3. **Enumerate all feeder paths** — Find every upstream producer/caller/event/job that can write into the final path, including retry, async, cache, background, and alternate UI/API paths. Mark each path verified, ruled out, or still unknown.
> 4. **Build the hypothesis matrix** — For each plausible cause, list evidence for, evidence against, how to reproduce/verify, blast radius, and status (`primary`, `contributing`, `ruled out`, `latent`). Do not fix until competing causes are explicitly resolved or bounded.
> 5. **Choose the owning fix layer** — Identify the invariant owner and the lowest shared point that protects all downstream consumers. A fix at the symptom site is rejected unless the symptom site owns the invariant.
> 6. **Prove convergence forward** — After choosing the fix, walk start -> end again and show how the corrected state reaches the observed final output. Map each root cause to a fix part and each fix part to a test/proof.
>
> **BLOCKED until:** final state named · backward trace written · all feeder paths enumerated · hypothesis matrix completed · owning fix layer justified · forward convergence proof mapped to tests.
>
> **NEVER:** Start at the first suspicious code path. Collapse multiple producers into one "flow". Treat duplicate symptoms as duplicate records without proving the read model. Skip ruled-out hypotheses.
<!-- /SYNC:end-to-start-debugger-trace -->
<!-- SYNC:ui-system-context -->
> **UI System Context** — For ANY task touching `.ts`, `.html`, `.scss`, or `.css` files:
>
> **MUST ATTENTION READ before implementing:**
>
> 1. `docs/project-reference/frontend-patterns-reference.md` — component base classes, stores, forms
> 2. `docs/project-reference/scss-styling-guide.md` — BEM methodology, SCSS variables, mixins, responsive
> 3. `docs/project-reference/design-system/README.md` — design tokens, component inventory, icons
>
> Reference `docs/project-config.json` for project-specific paths.
<!-- /SYNC:ui-system-context -->
<!-- SYNC:graph-assisted-investigation -->
> **Graph-Assisted Investigation** — MANDATORY when `.code-graph/graph.db` exists.
>
> **HARD-GATE:** MUST ATTENTION run at least ONE graph command on key files before concluding any investigation.
>
> **Pattern:** Grep finds files → `trace --direction both` reveals full system flow → Grep verifies details
>
> | Task | Minimum Graph Action |
> | ------------------- | -------------------------------------------- |
> | Investigation | `trace --direction both` on 2-3 entry files |
> | Fix/Debug | `callers_of` on buggy function + `tests_for` |
> | Feature/Enhancement | `connections` on files to be modified |
> | Code Review | `tests_for` on changed functions |
> | Blast Radius | `trace --direction downstream` |
>
> **CLI:** `python .claude/scripts/code_graph {command} --json`. Use `--node-mode file` first (10-30x less noise), then `--node-mode function` for detail.
<!-- /SYNC:graph-assisted-investigation -->
<!-- SYNC:critical-thinking-mindset -->
> **Critical Thinking Mindset** — Apply critical thinking, sequential thinking. Every claim needs traced proof, confidence >80% to act.
> **Anti-hallucination:** Never present guess as fact — cite sources for every claim, admit uncertainty freely, self-check output for errors, cross-reference independently, stay skeptical of own confidence — certainty without evidence root of all hallucination.
<!-- /SYNC:critical-thinking-mindset -->
<!-- SYNC:understand-code-first -->
> **Understand Code First** — HARD-GATE: Do NOT write, plan, or fix until you READ existing code.
>
> 1. Search 3+ similar patterns (`grep`/`glob`) — cite `file:line` evidence
> 2. Read existing files in target area — understand structure, base classes, conventions
> 3. Run `python .claude/scripts/code_graph trace <file> --direction both --json` when `.code-graph/graph.db` exists
> 4. Map dependencies via `connections` or `callers_of` — know what depends on your target
> 5. Write investigation to `.ai/workspace/analysis/` for non-trivial tasks (3+ files)
> 6. Re-read analysis file before implementing — never work from memory alone. — why: long context drifts from the file; the file is ground truth
> 7. NEVER invent new patterns when existing ones work — match exactly or document deviation. — why: divergent patterns fragment the codebase and slow every future reader
>
> **BLOCKED until:** `- [ ]` Read target files `- [ ]` Grep 3+ patterns `- [ ]` Graph trace (if graph.db exists) `- [ ]` Assumptions verified with evidence
<!-- /SYNC:understand-code-first -->
<!-- SYNC:fix-layer-accountability -->
> **Fix-Layer Accountability** — NEVER fix at the crash site. Trace the full flow, fix at the owning layer.
>
> AI default behavior: see error at Place A → fix Place A. This is WRONG. The crash site is a SYMPTOM, not the cause.
>
> **MANDATORY before ANY fix:**
>
> 1. **Trace full data flow** — Map the complete path from data origin to crash site across ALL layers (storage → backend → API → frontend → UI). Identify where the bad state ENTERS, not where it CRASHES.
> 2. **Identify the invariant owner** — Which layer's contract guarantees this value is valid? That layer is responsible. Fix at the LOWEST layer that owns the invariant — not the highest layer that consumes it.
> 3. **One fix, maximum protection** — Ask: "If I fix here, does it protect ALL downstream consumers with ONE change?" If fix requires touching 3+ files with defensive checks, you are at the wrong layer — go lower.
> 4. **Verify no bypass paths** — Confirm all data flows through the fix point. Check for: direct construction skipping factories, clone/spread without re-validation, raw data not wrapped in domain models, mutations outside the model layer.
>
> **BLOCKED until:** `- [ ]` Full data flow traced (origin → crash) `- [ ]` Invariant owner identified with `file:line` evidence `- [ ]` All access sites audited (grep count) `- [ ]` Fix layer justified (lowest layer that protects most consumers)
>
> **Anti-patterns (REJECT these):**
>
> - "Fix it where it crashes" — Crash site ≠ cause site. Trace upstream.
> - "Add defensive checks at every consumer" — Scattered defense = wrong layer. One authoritative fix > many scattered guards.
> - "Both fix is safer" — Pick ONE authoritative layer. Redundant checks across layers send mixed signals about who owns the invariant.
<!-- /SYNC:fix-layer-accountability -->
<!-- SYNC:source-test-drift-check -->
> **Source/test drift check.** For coding, fix, debug, investigation, test, or review work: when source behavior changes, inspect affected unit/integration/E2E tests and decide from evidence whether tests should change to match intended behavior or the source change is an unintended bug to fix. Do not write tests for migration code; schema/data migrations are one-time execution paths, not core application logic.
<!-- /SYNC:source-test-drift-check -->
<!-- SYNC:test-failure-fault-adjudication -->
> **Test-Failure Fault Adjudication** — When a test fails (or you are debugging or fixing a failure), the job is to determine *who is at fault — the source code or the test code*. Getting that verdict right matters more than turning the suite green. Binds every debug / fix / test skill identically.
>
> 1. **Provisional verdict before touching either side.** Classify the observed evidence as SOURCE-WRONG, TEST-WRONG, TEST-NOT-OPTIMAL, ENVIRONMENT-BLOCKED, or AMBIGUOUS; then `/debug-investigate` and trace end-to-start before editing. A green-again suite is NOT the goal.
> 2. **Triangulate against the spec AND the source.** If a governing Feature Spec covers the behavior (e.g. `docs/specs/**` — §3 ACs / §4 BRs / §5 invariants / §8 TCs), it is the tiebreaker for *intended* behavior — compare BOTH the production source and the failing test against it. With no spec, the documented intent / acceptance criteria / caller contract is the reference. Decide from this evidence whether the SOURCE is wrong or the TEST is wrong.
> 3. **Classify who is at fault, then fix the wrong side at its root:**
> - **SOURCE-WRONG** — production code violates the spec's intended behavior or a clear invariant → fix the source at the owning layer; keep or strengthen the test that caught it.
> - **TEST-WRONG** — the test encodes a stale or incorrect assertion, setup, or expectation that contradicts intended behavior → fix the test at its root. NEVER weaken an assertion, add a skip, or relax a timeout to force green.
> - **TEST-NOT-OPTIMAL** — intended behavior is valid but the test seam, timing, or assertion signal is fragile → improve the test without weakening the invariant.
> - **ENVIRONMENT-BLOCKED** — infrastructure or external state prevents a source/test verdict → preserve diagnostics and stop mutation until the environment is healthy.
> - **AMBIGUOUS** — evidence or intended behavior does not safely select an owner → ask the user or canonical owner before editing.
> - NEVER change a test to match broken source, and NEVER change source to satisfy a broken test. (Migration code excluded — schema/data migrations are one-time execution paths, not core application logic.)
> 4. **Ask the user when intended behavior is unclear.** If no spec covers the behavior, the spec is silent, or the spec is ambiguous about which side is correct, STOP and `AskUserQuestion` (or consult the canonical spec owner) before editing either side — never silently pick source or test just to make the suite pass.
>
> Reconcile to intended behavior, never to whichever side currently passes — green can encode the very bug.
>
> **Read-only/report-only role boundary:** when this block is carried by a report-only role (`code-reviewer`, `quality-gate-review`, `spec-compliance-reviewer`, `tester`, and any other agent whose definition declares it never edits source), "fix the wrong side" means RETURN the adjudicated verdict and the proposed repair to the parent — do not modify source, tests, generated carriers, or user data. The adjudication is the deliverable; the edit is the caller's. Without this sentence the block's step-3 imperatives read as write authority and directly contradict those agents' own declarations (e.g. `tester.md` "NEVER implement fixes"), which is the sibling `SYNC:double-round-trip-review` boundary applied to the same class of carrier.
<!-- /SYNC:test-failure-fault-adjudication -->
<!-- SYNC:ai-mistake-prevention -->
> **AI Mistake Prevention** — Failure modes to avoid on every task:
>
> **Re-read files after context changes.** Context compaction, resume, or long-running work can make memory stale; verify current files before acting.
> **Verify generated content against source evidence.** AI hallucinates APIs, names, claims, and document facts. Check the relevant source before documenting or referencing.
> **Check downstream references before deleting or renaming.** Removing an artifact can stale docs, generated mirrors, configs, and callers; map references first.
> **Trace the full impact chain after edits.** Changing a definition can miss derived outputs and consumers. Follow the affected chain before declaring done.
> **Verify ALL affected outputs, not just the first.** One green check is not all green checks; validate every output surface the change can affect.
> **Assume existing values are intentional — ask WHY before changing OR flagging one as a defect.** Before changing or reporting a constant, limit, flag, cutoff, wording, or pattern, read nearby context and history, the CALLER's ordering, and 2+ sibling call sites of the same convention. A doc stating WHAT without WHY is missing rationale, not proof of a missing guard.
> **Surface ambiguity before acting — don't pick silently.** Multiple valid interpretations require an explicit question or stated assumption with risk.
> **Assert the outcome your system owns, not the intermediate state your infrastructure owns.** When verifying async work, assert the final business state — never the delivery/retry bookkeeping held in shared infrastructure that any co-running process can write. Such a check passes when run alone and flakes the moment anything else shares that infrastructure.
> **Keep shared guidance role-relevant.** Universal guidance must help every receiving skill or agent; code-specific obligations belong only in code-specific protocols.
<!-- /SYNC:ai-mistake-prevention -->
<!-- SYNC:understand-code-first:reminder -->
**IMPORTANT MUST ATTENTION** search 3+ existing patterns and read code BEFORE any modification. Run graph trace when graph.db exists.
<!-- /SYNC:understand-code-first:reminder -->
<!-- SYNC:evidence-based-reasoning:reminder -->
- **MANDATORY IMPORTANT MUST ATTENTION** cite `file:line` evidence for every claim. Confidence >80% to act, <60% = do NOT recommend.
<!-- /SYNC:evidence-based-reasoning:reminder -->
<!-- SYNC:ui-system-context:reminder -->
**IMPORTANT MUST ATTENTION** read frontend-patterns-reference, scss-styling-guide, design-system/README before any UI change.
<!-- /SYNC:ui-system-context:reminder -->
<!-- SYNC:graph-assisted-investigation:reminder -->
**IMPORTANT MUST ATTENTION** run at least ONE graph command on key files when graph.db exists. Pattern: grep → graph trace → grep verify.
<!-- /SYNC:graph-assisted-investigation:reminder -->
<!-- SYNC:fix-layer-accountability:reminder -->
**IMPORTANT MUST ATTENTION** trace full data flow and fix at the owning layer, not the crash site. Audit all access sites before adding `?.`.
<!-- /SYNC:fix-layer-accountability:reminder -->
<!-- SYNC:critical-thinking-mindset:reminder -->
**MUST ATTENTION** apply critical + sequential thinking — every claim needs appropriate traced evidence (`file:line` for repo/code claims; source URL or artifact section for research, product, content, and docs claims); confidence >80% to act, <60% DO NOT recommend. Anti-hallucination: never present guess as fact, admit uncertainty freely, cross-reference independently, stay skeptical of own confidence.
<!-- /SYNC:critical-thinking-mindset:reminder -->
<!-- SYNC:ai-mistake-prevention:reminder -->
**MUST ATTENTION** apply AI mistake prevention — verify generated content against evidence, trace downstream references before deleting or renaming, verify all affected outputs, re-read files after context loss, and surface ambiguity before acting.
<!-- /SYNC:ai-mistake-prevention:reminder -->
<!-- SYNC:end-to-start-debugger-trace:reminder -->
**IMPORTANT MUST ATTENTION** debugger trace gate: for non-trivial bug/fix/investigation/review work, start at the observed final output and trace backward through reader -> storage/projection -> writer -> consumer/job -> producer/trigger. Enumerate all feeder paths and hypotheses before fixing. **BLOCKED until** trace, hypothesis matrix, owning fix layer, and forward convergence proof exist.
<!-- /SYNC:end-to-start-debugger-trace:reminder -->
<!-- SYNC:goal-contract-satisfaction-loop:reminder -->
- **MANDATORY** Resolve the active Goal Contract BEFORE work (active plan `goal.md` → `plans/goals/{YYMMDD-HHmm}-{slug}/goal.md` → create from current request) and read saved success criteria before editing.
- **MANDATORY** Append iteration evidence after execution; emit a Goal Satisfaction matrix (PASS/FAIL/BLOCKED) before reporting PASS; loop on validated FAIL; escalate repeated no-progress or blockers. NEVER store secrets in goal files.
<!-- /SYNC:goal-contract-satisfaction-loop:reminder -->
<!-- PROMPT-ENHANCE:STEP-TASK-CLOSING:START -->
## Prompt-Enhance Closing Anchors
**IMPORTANT MUST ATTENTION** follow declared step order for this skill; NEVER skip, reorder, or merge steps without explicit user approval
**IMPORTANT MUST ATTENTION** for every step/sub-skill call: set `in_progress` before execution, set `completed` after execution
**IMPORTANT MUST ATTENTION** every skipped step MUST include explicit reason; every completed step MUST include concise evidence
**IMPORTANT MUST ATTENTION** if Task tools unavailable, maintain an equivalent step-by-step plan tracker with synchronized statuses
<!-- PROMPT-ENHANCE:STEP-TASK-CLOSING:END -->
<!-- SYNC:project-protocol-overlay -->
> **Project Protocol Overlay** — Before executing this skill, resolve any PROJECT overlay rules layered onto it: match this skill's name against the `Target` column of the project's skill-protocol index (`docs/project-reference/skill-protocols-reference.md` by default; a `referenceDocs` entry in `docs/project-config.json` overrides the path), taking the most specific matching tier ONLY — exact name > glob > `*`. **That precedence orders overlays against EACH OTHER, never against this skill.** Read ONLY the matched bodies, resolved as `<protocols-dir>/<Name>.md`; a row's Body link is display text, never a read path. A matched body that is missing or malformed is REPORTED and skipped — never reconstructed from the index Description. No index, or no match -> proceed with no overlay, silently. Full contract: `.claude/skills/project-skill-protocol/references/registry.md`.
>
> Overlays are **ADDITIVE ONLY**: they ADD rules on top of this skill's own protocol and NEVER replace, override, disable, or reinterpret a rule it already states — removing every overlay must return this skill to exactly its documented behavior. An overlay is a BRIEF, not an authority escalation: it can NEVER waive a workflow gate, git discipline, a review gate, or a user-confirmation gate. A genuine overlay-vs-skill conflict, or two equally-specific overlays that directly contradict -> surface both to the user; NEVER resolve silently.
<!-- /SYNC:project-protocol-overlay -->
<!-- SYNC:project-protocol-overlay:reminder -->
**MUST ATTENTION** resolve project protocol overlays for this skill BEFORE executing — most specific matching tier only (exact > glob > `*`, which ranks overlays against each other, NEVER against this skill), read only matched bodies at `<protocols-dir>/<Name>.md`; a missing or malformed body is reported, never reconstructed. Overlays are ADDITIVE ONLY (they never replace this skill's own rules) and are a brief, NEVER an authority escalation; an equal-specificity contradiction goes to the user.
<!-- /SYNC:project-protocol-overlay:reminder -->
## Closing Reminders
**IMPORTANT MUST ATTENTION Goal:** Block shipping an unproven fix — adopt a SKEPTIC's stance and try to DISPROVE the fix first, then build a code proof trace (like a debugger stack trace) for each change with confidence percentages, so every code change carries a `file:line` evidence chain that survived a genuine refutation attempt and a fix ships only when its correctness is proven (≥80%), never assumed.
**IMPORTANT MUST ATTENTION** default stance is SKEPTIC, NOT validator — your job is to find why the fix is WRONG/INCOMPLETE, not confirm it works; run the Refutation Pass (counter-case, weak-test, wrong-layer, new-regression, contrarian) and complete the Anti-Bias Gate per change BEFORE any SHIP verdict; a change that has not been genuinely attacked is capped at 79%. — why: the skill name, the post-`/fix` context, and the points rubric all bias toward confirmation; confidence must be earned by surviving attack, not awarded for coherence.
**IMPORTANT MUST ATTENTION** trace ALL related things — every caller, consumer, sibling/alternate path, feeder path, downstream dependent, and shared-state writer the change touches; an un-enumerated related path is an unproven path and caps confidence below 80%. — why: the reproduction exercises one path; the bug often survives through the paths you never traced.
**IMPORTANT MUST ATTENTION** execute the 5 steps in order, NEVER skip or merge: (1) **Change Inventory** — every change with file:line, before/after, type → (2) **Proof Trace per change** — symptom → trigger path → root cause → fix mechanism → why-correct → refutation attempt → related paths → edge cases → side effects (every arrow `file:line`) → (3) **Confidence Scoring** — points rubric + SKEPTIC caps → (4) **Cross-Verification** — Anti-Bias Gate FIRST, then interaction/completeness/regression/dependency/DB-performance → (5) **Final Verdict** + Goal Satisfaction update. — why: AI forgets the skill's own steps and ad-libs a partial verification that ships an unproven fix.
**Protocols in force (concise digest of the SYNC/shared blocks this skill carries):**
- **End-to-Start Trace:** start at observed output, trace backward, hypothesis matrix before fixing.
- **UI System Context:** read frontend-patterns, scss-styling, design-system before any UI change.
- **Graph Investigation:** run ≥1 graph command on key files when graph.db exists.
- **Critical Thinking:** traced `file:line` proof per claim; confidence >80% to act.
- **Understand Code First:** grep 3+ patterns and read code before any modification.
- **Fix-Layer Accountability:** trace full data flow, fix at owning layer not crash site.
- **Source/Test Drift:** when source behavior changes, reconcile affected unit/integration/E2E tests from evidence.
- **AI Mistake Prevention:** verify generated content against evidence, trace downstream references, verify all affected outputs, re-read after context loss, surface ambiguity.
**IMPORTANT MUST ATTENTION** every arrow (→) in every proof trace MUST ATTENTION carry a `file:line` reference — no exceptions; a claim without traced evidence is speculation and BLOCKS the ship. — why: a proof chain with an unproven link proves nothing.
**IMPORTANT MUST ATTENTION** score each change with the points rubric (root cause +25, fix mechanism +20, pattern precedent +15, framework +10, edge cases +5 each, side effects +10, no regressions +5) → ≥80% ship · 60-79% flag to user · <60% BLOCK; NEVER ship a <80% change — route it back to `/debug-investigate` or `/fix`. — why: the threshold is the gate; bypassing it defeats the skill.
**IMPORTANT MUST ATTENTION** run AFTER `/fix`, never before — this is the non-negotiable verification gate between `/fix` and `/code-simplifier`; NEVER skip it because the fix "looks obviously right". — why: obviousness is the exact illusion this gate exists to break.
**Domain protocols this proof MUST NOT skip:**
**IMPORTANT MUST ATTENTION** pattern precedent is REQUIRED, not optional — cite at least 1 working example of the same pattern at `file:line` elsewhere in the codebase; "no precedent found" caps confidence below 80%. — why: a fix with no precedent is an unproven invention.
**IMPORTANT MUST ATTENTION** edge cases are REQUIRED — enumerate at minimum error path, null/empty input, concurrent access, each verified with evidence; assess side effects (what else this change touches). — why: the happy path passing is not the change being correct.
**IMPORTANT MUST ATTENTION** spec-loop evidence is REQUIRED for a complete proof (`SYNC:spec-loop-discipline`) — (a) a regression PROPERTY TC (∀ inputs in {domain}, invariant holds) + boundary counter-case, (b) mutation-kill evidence on the fixed line (MUTATION-SCORE, not line-coverage %), (c) a Dual-Feedback entry (spec rule restored + guarding test); missing any one caps confidence below 80%. — why: line coverage and a single reproduction example let the original defect class survive.
**IMPORTANT MUST ATTENTION** map every fix part to a primary/contributing/latent root cause from the hypothesis matrix and prove ALL feeder paths are closed; fix at the LOWEST shared owning layer, NEVER patch the crash/symptom site. — why: a symptom-site patch leaves the real cause writing bad state through other paths.
**IMPORTANT MUST ATTENTION** for non-trivial bug/fix work, start at the observed final output and trace BACKWARD (reader → storage/projection → writer → consumer/job → producer/trigger) before proposing a fix; build the hypothesis matrix first. — why: starting at the first suspicious line fixes a symptom, not the cause.
**IMPORTANT MUST ATTENTION** run the Database Performance Protocol in cross-verification — ALL list/collection queries paginated (no unbounded `GetAll/ToList/Find`), ALL filter/FK/sort columns indexed. — why: a correct fix that degrades query performance ships a new regression.
**IMPORTANT MUST ATTENTION** when `.code-graph/graph.db` exists, run a `trace --direction downstream` on the fixed file to prove no downstream consumer breaks; include trace output as proof evidence. — why: a green local change can silently break a distant caller.
**IMPORTANT MUST ATTENTION** resolve the active Goal Contract AFTER the verdict (`SYNC:goal-contract-satisfaction-loop`) — map each proof trace to its success criterion, emit the PASS/FAIL/BLOCKED matrix; a SHIP verdict does NOT close work while any required criterion remains FAIL. — why: a verified change is not a satisfied goal.
**MANDATORY IMPORTANT MUST ATTENTION** break work into small `TaskCreate` todos BEFORE starting (one task per change/proof), keep exactly one `in_progress`, add a final review todo; on context loss `TaskList` first — resume, never duplicate.
**Anti-Rationalization:**
| Evasion | Rebuttal |
| --------------------------------------------- | ------------------------------------------------------------------------------------------------ |
| "Fix is obviously correct, skip the proof" | Obviousness is the illusion this gate breaks. Build the trace anyway — every arrow `file:line`. |
| "No precedent, but it's clearly right" | No precedent caps confidence <80%. Find a working example or mark the change unproven. |
| "Reproduction test passes, that's enough" | A single example ≠ a property. Add the universally-quantified regression TC + boundary case. |
| "Line coverage is green" | Coverage ≠ kill. Show the surviving mutant on the fixed line is now killed (mutation score). |
| "I'll just patch where it crashes" | Crash site ≠ cause site. Trace backward, fix the lowest invariant owner that protects all paths. |
| "Score is 75%, close enough to ship" | <80% BLOCKS. Flag to user or return to `/debug-investigate` — never round a confidence up. |
| "I'm building the proof FOR the fix" | That's confirmation bias. Build the proof AGAINST it — attack first, score what survives. |
| "I wrote this fix, I know it's right" | Author ≠ reviewer. Reset to skeptic and attack your own change hardest of all. |
| "Didn't really try to break it, but it's fine"| No genuine refutation pass → capped at 79%. An un-attacked fix is unproven, not proven. |
| "Only traced the path I reproduced" | Trace ALL related/feeder/sibling paths. The bug usually survives where you never looked. |
**IMPORTANT MUST ATTENTION** be a SKEPTIC — try to DISPROVE the fix and trace ALL related paths; run AFTER `/fix` only; every arrow carries `file:line`; confidence is what survives the attack (≥80% to ship, <60% BLOCK) — these are the gate. (primacy-recency echo of the top three)
**[TASK-PLANNING]** Before acting, analyze task scope and break it into small `TaskCreate` todos systematically before starting — this is very important.
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!