Systematic pre-implementation analysis that finds unknown unknowns — usability gaps, broken flows, state conflicts, concurrency hazards, error dead-ends, and edge cases BEFORE code is written. Fire-and-forget: runs all phases autonomously and delivers a severity-ordered report. Works across stacks — frontend, backend, CLI, mobile, APIs. Use this skill when: (1) before implementing any feature that changes existing behavior, (2) before adding async/background processing to what was synchronous, (3) when a feature touches shared state (global stores, caches, databases, queues), (4) when a feature has multiple entry points or triggers, (5) when moving functionality between surfaces or layers, (6) when the user asks to 'think through' or 'analyze' a feature before building it, (7) when reviewing a plan for hidden failure modes. Triggers on: 'analyze this feature', 'think through the flow', 'what could go wrong', 'check for edge cases', 'will this break anything', 'find problems with this', 'unknown unknowns', flow analysis, impact analysis, pre-implementation review.
Autonomous analysis engine. Finds the things you didn't think to worry about.
Fire-and-forget: runs all phases, delivers a severity-ordered report. No interaction required during analysis.
Identify every piece of shared state the feature reads, writes, or depends on.
Adapt to the detected domain:
| Field | Read by | Written by | Cleared by | Singleton? | Scope |
|---|---|---|---|---|---|
| ... | ... | ... | ... | ... | request / session / global / persistent |
Singletons are the #1 conflict source. Any state that holds one value at a time and is written by multiple flows is a collision waiting to happen.
Key question: "If two different operations both write to the same state, what happens? Who wins? Is the loser's work lost silently?"
Find every way the feature can be triggered. Don't just grep for function names — trace backwards from the interface layer.
| Entry point | Trigger type | Params/context | Pre-conditions | User/caller expects |
|---|---|---|---|---|
| ... | ... | ... | ... | ... |
Key question: "Is there an entry point I haven't considered? What if this gets called in a context the author didn't design for?"
For every entry point from Phase 2, walk through the complete journey:
At every step, verify: does the caller know what's happening? Is there feedback if this takes longer than expected? What happens if the user/caller abandons midway?
Take every pair of flows that touch shared state and analyze conflicts.
| Flow A | Flow B | Flow C |
Flow A | — | CONFLICT | OK |
Flow B | CONFLICT | — | CONFLICT |
Flow C | OK | CONFLICT | — |For each CONFLICT: document what state collides, what the observable symptom is, severity (data loss / incorrect behavior / cosmetic / silent corruption), and a proposed mitigation.
Key question: "What's the worst thing that happens if these two flows run at the same time?"
The most important phase. Every operation can fail. Trace what happens to state, callers, and the system when things break.
Errors create new collision surface. Example:
status: 'error', result: null, retryable: trueKey question: "After this error, what can the caller do next? If the answer is 'nothing without manual intervention', that's a critical finding."
Check that data entities maintain consistency throughout their lifecycle.
Key question: "If I look at this entity after a crash halfway through its lifecycle, is it in a state that makes sense? Can the system recover from that state?"
Present findings as a single report, ordered by severity.
Each finding:
Same format as critical.
Brief list with one-line descriptions.
Table of all shared state identified in Phase 1.
From Phase 4, showing all flow interactions.
Ordered list of changes needed, grouped by:
After running the core phases, load the appropriate reference for additional domain-specific analysis:
For mixed systems (e.g., frontend + API backend), load both relevant references and analyze the boundary between them as an additional collision surface.
These appear across all domains. Flag them whenever found:
| Anti-Pattern | Description | Severity |
|---|---|---|
| Silent Failure | Error caught and swallowed. No log, no notification, no recovery path. | Critical |
| Singleton Collision | Two concurrent operations writing the same shared state. Loser's work disappears. | Critical |
| Unrecoverable Error | Error leaves system in a state where the only recovery is restart/redeployment. | Critical |
| Orphan Entity | Entity created in step 1, enriched in step 2. Step 2 fails. Half-formed entity persists. | Significant |
| Stuck State | Operation fails but status flag never resets. System thinks operation is still in progress. | Significant |
| Stale Context | New operation starts with leftover state from a previous operation. | Significant |
| Cascade Failure | One component's failure causes dependent components to also fail, amplifying blast radius. | Significant |
| Retry Storm | Automatic retries without backoff overwhelm an already-struggling system. | Significant |
| Temporal Coupling | Operations must happen in a specific order but nothing enforces that order. | Significant |
| Phantom Dependency | Feature works only because of an implicit side effect that could be removed at any time. | Minor |
0970b21
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.