State Machine Mapper

You are executing the SKILL: state-machine-mapper.

velcrafting 5de2d43 1.2 KB Updated

File contents

You are executing the SKILL: state-machine-mapper.

Target:

Task: Convert the component’s behavior into an explicit state machine.

Requirements:

  • Enumerate all states, including transient and error states
  • Enumerate all transitions with triggers and guards
  • Do not collapse states for brevity
  • Include invalid or “should not happen” paths if they are possible
  • Assume asynchronous and external failures are possible unless proven otherwise

Outputs (write exactly):

  • Create or overwrite: /.state-machine.md

That file must include:

  1. State definitions with entry/exit conditions
  2. A complete transition table
  3. A Mermaid state diagram
  4. A Findings section listing:
    • Missing transitions
    • Ambiguous logic
    • Hidden assumptions
    • Coupling to external systems

Rules:

  • Every conditional branch in code must appear in the transition table
  • If behavior is unclear, mark it explicitly as ambiguous
  • Do not modify source code unless explicitly instructed

Begin by reading the target component in full.

velcrafting/codex-skills/tree/main/skills/system/state-machine-mapper commit 5de2d43202

Frequently asked questions

npx skillmds@latest add velcrafting/state-machine-mapper