validation-first — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited validation-first (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Define state machines from requirements before implementation. Specifications say what the system MUST do. Encode compile-time properties in types first, then layer state machine modeling for properties types cannot express.
Modern insight (2025): State machines exist on a spectrum from runtime enums to compile-time typestates. Use the strongest mechanism available. XState v5 introduces actor model semantics -- state machines are now first-class concurrent entities, not just enum switches.
See approaches for language-specific state machine mechanisms. See examples for brief state machine patterns per language. See formal-tools for specification and model checking tools.
| Level | Mechanism | Strength | Use When |
|---|---|---|---|
| Typestate (compile-time) | Generic type params, phantom data | Invalid transitions unrepresentable | Protocol APIs, builder patterns, Rust FFI |
| Statecharts (hierarchical) | Nested states, parallel regions | Complex workflows, entry/exit | Game state, multi-modal UI, XState |
| Flat FSM (runtime) | Enum + match/switch | Simple, auditable | Order lifecycle, connection mgmt |
| Actor model | Independent entities, message passing | Concurrent state | Distributed systems, Erlang/Elixir, XState v5 |
Default choice: Use the strongest mechanism the language supports. Typestate in Rust, sealed classes in Kotlin, discriminated unions in TypeScript.
Type system (strongest) > State machine > Contract > Runtime check (weakest){ isLoading: true, isError: true, data: X } -- contradictory states representable. Use discriminated unions instead.state: "pending" with no exhaustiveness checkSTATE MACHINE: <Name>
STATES: S1 | S2 | S3
VARIABLES: var1: type, var2: type
INIT: var1 = val, state = S1
ACTION name(args): PRE: guard -> POST: new_state, effects
INVARIANT: condition_that_always_holdsWhen state machines guard event-sourced aggregates:
| Gate | Pass Criteria | Blocking |
|---|---|---|
| Typecheck | No errors; exhaustive match where language enforces it | Yes |
| Invariants | All invariant assertions pass after each action | Yes |
| Tests | All state transition tests pass | If present |
| Code | Meaning |
|---|---|
| 0 | Specification verified, ready for implementation |
| 11 | Checker not available |
| 12 | Syntax/type errors in specification |
| 13 | Invariant violation detected |
| 14 | Specification tests failed |
| 15 | Implementation incomplete |
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.