Prompt·Architecture and hidden complexity·A01
Status hidden in a pile of flags
Finds features whose real status is spread across a pile of yes/no flags, so combinations that should be impossible can happen.
Prompt
Find every implicit state machine in this application. Identify where states, transitions, and invalid combinations are scattered across flags, conditionals, and components.
- What it returns
- A list of states and transitions per feature, each with file:line, plus one reachable invalid combination shown concretely.
- Skip it when
- Small features with one status field that has a fixed list of values and is checked in one place.
- Changes
- Changes nothing
- Sessions
- Look first, then fix in a new session
- Tools
- Repository access only.
- Watch for
- Agents tend to list every boolean as a state. Ask which combinations are reachable and which are only theoretical.
- Also called
- Implicit state machines
Skills it uses
Related prompts
- Code that relies on lucky timingPromptFinds code that only works because things usually happen in the right order.
- Screens showing a change that was refusedPromptFinds screens that show a change right away and keep showing it after the server refused it.
- Rules the data never enforcesPromptFinds the rules everyone assumes (one owner per task, no negative balance) that nothing actually checks.
More in Architecture and hidden complexity.