Specification-first agentic development

Make intended behavior visible, executable, and hard to drift from.

Model an application as composable state machines and low-fidelity screens. Click through the prototype, generate against a deterministic contract, and verify the real application with test traces.

$ npx @alainux/wirestate serve --open
Wirestate Studio showing the Habit chunks state machine beside its interactive dashboard wireframe
Captured from the runnable TypeScript habit-tracker fixture after its startup transition.
One reviewable loop

From intent to evidence.

Wirestate keeps desired behavior, the interactive prototype, source bindings, and observed test behavior connected through repository-native files.

ModelStates and constraints
PrototypeClickable wireframes
GenerateStructured agent context
ExerciseFramework-neutral traces
VerifyConformance and coverage
Designed for real repositories

A specification that participates in development.

01

Hierarchical machines

Compose large products from nested state machines instead of forcing thousands of microstates into one flat graph.

02

Interactive wireframes

Transition metadata makes buttons, toggles, and inputs operate the same machine interpreter used by the CLI.

03

Passive verification

Compare states and edges observed by Playwright or any test runner with the behavior declared in the spec.

04

Source synchronization

Stable data attributes, decorators, and comments reveal missing and unknown links in both directions.

05

Intent comments

Attach acceptance criteria and rationale directly to states and components as readable YAML diffs.

06

Agent-ready context

Give coding agents deterministic states, screens, interactions, bindings, and human constraints—not another ambiguous ticket.

The repository remains the source of truth.

The browser is a synchronized surface over simple YAML. Every meaningful change can be reviewed, generated, replayed, and checked in CI.

src/shell/app.wire.yml
states:
  dashboard:
    screen: dashboard
    on:
      OPEN_ADD:
        target: adding
        interaction:
          kind: click
          component: habit.addButton
  adding:
    screen: adding
    # Intent is explicit and reviewable.
FAQ

Why this boundary?

Why are generated views and artifacts not manually editable?

Wirestate is built for specification-first, AI-driven development. The checked-in specification is authoritative; graphs, previews, generated tests, and scaffolds are derived. Directly editing derived output creates hidden, non-reproducible state that agents and reviewers cannot reliably interpret and that regeneration may overwrite.

Can people still change the product specification?

Yes. Humans and agents can change machines, screens, comments, and constraints through the filesystem, CLI, or specification-focused UI operations. The restriction applies to derived artifacts, not to authoring intent.

Does Wirestate replace tests?

No. It adds a behavioral contract and coverage model above test implementation. Tests still exercise the application; Wirestate checks whether their evidence agrees with the intended state graph and whether expected behavior remains unvisited.

Does it catch visual regressions?

The core focuses on behavior, reachability, bindings, and modeled coverage. Screenshot, accessibility-tree, and semantic DOM adapters can complement it without turning the DSL into a styling language.