blackbox-state

Derives test cases from state transitions and CRUD entity lifecycles without inspecting implementation.

Updated Jun 24, 2026
One-click install
npx skills add https://github.com/Hakkadaikon/hymme --skill blackbox-state-hakkadaikon
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: blackbox-state
Source: https://github.com/Hakkadaikon/hymme/tree/main/skills/blackbox-state
Command: npx skills add https://github.com/Hakkadaikon/hymme --skill blackbox-state-hakkadaikon

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When behavior depends on history (order statuses, auth sessions, persisted entities), ad-hoc testing misses invalid transitions and cross-operation inconsistencies. This Skill mechanically derives test cases from state transition models and CRUD lifecycles using only the input/output specification, so defects hiding in forbidden sequences and post-delete references get covered. ## Core Features & Use Cases - State Transition Testing: Build a state x event table, enumerate all valid transitions and invalid events, and scale from 0-switch coverage to N-switch chains only where needed. - Forbidden/Permitted Sequence Derivation: Turn prohibition specs into reject tests and boundary-normal sequences into accept tests, almost one-to-one. - CRUD / Entity Lifecycle Testing: Fill an entity x {C,R,U,D} matrix with a C->R->U->R->D->R scenario, explicitly verifying post-delete reads, idempotent updates, and duplicate creation. - Use Case: Testing an order state machine in TypeScript/Vitest — enumerate valid transitions (created -> paid -> shipped -> delivered), assert invalid ones throw, and verify a repository returns null after delete. ## Quick Start Ask the AI to apply the blackbox-state techniques to derive state transition and CRUD lifecycle test cases for your order or repository module.

Frequently Asked Questions about blackbox-state

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write state transition tests for a state machine?

Build a state x event transition table, enumerate all valid transitions as test cases, then apply every possible event to each state to derive invalid transitions. Start with 0-switch coverage (each transition once) and escalate to N-switch chains only where needed.

How to test CRUD operations for a repository or REST resource?

Create an entity x {C,R,U,D} matrix and walk one C->R->U->R->D->R lifecycle scenario per entity. Explicitly verify the read after delete returns null or 404, plus idempotent updates, partial updates, duplicate creation, and operations on nonexistent ids.

What is the difference between 0-switch and N-switch coverage?

0-switch coverage exercises each valid transition exactly once plus all invalid events per state. N-switch coverage tests chained transition sequences, catching forbidden sequences that only become invalid partway through an otherwise normal history.

When should I use TLA+ model checking instead of state transition testing?

Use model checking when the state space is large and you need exhaustive coverage of interleavings and reachability. Tools like TLC explore all sequences rigorously; counterexample traces can then be dropped into tests as reject cases.

Why do CRUD tests miss defects even with high coverage?

Testing each operation in isolation misses cross-operation consistency: reading right after create, re-reading after update, and referencing after delete. Post-delete access and non-idempotent updates are common defect sources that require lifecycle-level scenarios.