Click-Path Audit
Trace every touchpoint handler through its full state sequence to catch silent undos. Detalhes em references/.
When to Activate
- After systematic debugging finds "no bugs" but users report broken UI
- After modifying any Zustand store action (check all callers)
- After any refactor that touches shared state
- Before release, on critical user flows
- When a button "does nothing"
Core Flow
- Map stores — every action →
{sets, resets}(references/state-stores.md) - Trace handler — every call in order, reads/writes/side effects
- Check undo — does any later call reset an earlier call's state?
- Check final — does final state match the button label promise?
- Check race — async resolves, stale closures, useEffect interference
Example
onClick={() => {
useEmailStore.getState().setComposeMode(true) // sets true
useEmailStore.getState().selectThread(null) // RESETS composeMode=false → BUG
}}
References
references/state-stores.md— side-effect map procedure and output formatreferences/bug-patterns.md— 6 patterns: undo, race, closure, transition, dead path, useEffectreferences/audit-execution.md— 6-step trace, touchpoint template, report format, real examplereferences/scope-integration.md— scope control, agent split, non-goals, skill integration
Checklist
- Store side-effect map built before auditing touchpoints
- Every call traced in order with sets/resets noted
- Final state compared against button-label promise
- Bugs reported as CLICK-PATH-NNN with pattern + fix
- Each bug gets a regression test