Use Case: Specification

A specification is only worth its upkeep while it stays true. The running example here is rate limiting for the REST API — grounded in an external source, specified, validated, reconciled with the code, and exported for the reviewers.

  1. 1

    Orientation

    Activate the Specification

    The SpecBook know-how — format contract, schema, and artifact set — is activated first, so the existing specification can be queried in plain conversation before anything is changed.

    Claude Code
    /ase-spec-activate what does the specification say about rate limiting so far?
  2. 2

    Foreign Input

    Import the Source

    External material — a standard, a ticket, a pasted mail — is ingested into the specification first, instead of being paraphrased by hand later.

    Claude Code
    /ase-sync-import --target spec @docs/rfc-6585-status-429.md
  3. 3

    Draft

    Edit the Specification

    The requirement itself enters the SpecBook-based specification in one shot, with the intent grilled before anything is written.

    Claude Code
    /ase-spec-edit --grill --grill-rounds 2 add rate limiting to the REST API
  4. 4

    Validation

    Verify and Loop

    The edit runs again with validation and looping enabled, so the SpecBook schema violations are resolved rather than reported.

    Claude Code
    /ase-spec-edit --verify --loop rate limiting
  5. 5

    Forward Engineering

    Reconcile Code to Spec

    The code is aligned to the specification which now describes it — the forward direction of the round-trip.

    Claude Code
    /ase-sync-reconcile --target code --source spec rate limiting
  6. 6

    Hand-Off

    Export for Review

    The specification is materialized into ready-to-consume renderings for the people who will never open the repository.

    Claude Code
    /ase-sync-export --output html,pdf
npm install -g @rse/ase && ase setup install