Skip to content
spockIt’s only logical !
Non-normative guide. This page shows how to use Spock; the v0 specification governs where they disagree.

Project status

Spock is pre-1.0 software, currently 0.5.4; minor versions may break, and the changelog records every cut. Spock v0 is a local prototype runtime for building and studying authority contracts; it is not a production platform. Its state is disposable by doctrine β€” the database is rebuilt from source and seed on every start, and there are no migrations. Its identity seam is deliberately forgeable β€” v0 secures nothing. What v0 does freeze is the contract: the compiled contract shape and the derived error vocabulary are frozen additively for v0.x, while source syntax may still change between minor versions.

That is the whole disclaimer. Every page distinguishes shipped behavior from any explicitly labeled current-source integration that is waiting for a release; pages otherwise describe shipped behavior in plain terms and point here instead of hedging inline.

Legend

StatusMeaning
StableShipped and specified; frozen where the specification says so. Still pre-1.0.
ExperimentalShipped behind an explicit preview; may change or vanish in any release.
In progressCommitted direction, not shipped yet.
Not plannedDeliberately absent from v0 β€” a decision, not an omission.

Language

FeatureStatus
Tables, records, keys, unique fields and groups, references, on delete actionsStable
Closed-set types and validator check fnsStable
fn / mut fn, SQL escape bodies, read/write polarityStable
Refusals via spock_refuseStable
Top-level error declarations (RFD 0024 implementation preview)Experimental
Doc comments (///, //!) carried into the contractStable
Seed blocks and seed assets (file())Stable
The actor seam: auth table, X-Spock-Actor, spock_actor(), = meStable β€” an unverified development seam
Verified identity (JWT), role, policy, per-row governanceIn progress
view (write-through projections)In progress β€” design study
Native fn statement grammar (beyond the SQL escape)In progress β€” design
State machinesNot planned (v0)
Cross-file programs and modulesNot planned (v0)
Partial or conditional uniquenessNot planned β€” undecided, so unshipped
Curated formats (email) and nominal domain typesNot planned (v0)

Derived API

FeatureStatus
Contract JSON at /~contract, frozen additively for v0.xStable
gen types (TypeScript) and gen graphql-schemaStable
REST reads: lists, by-key, filters, ordering, offset, rpcStable
REST table writesIn progress β€” writes are GraphQL-first for now
GraphQL Tier 1: single-row reads and writesStable
GraphQL Tier 2 reads: where, order_by, offsetStable
GraphQL Tier 2 bulk writes: insert_<t>, update_<t>, delete_<t>In progress
GraphQL Tier 3: on_conflict upserts, _inc, aggregatesIn progress
GraphQL subscriptions, Relay connections, distinct_on, _likeNot planned
64-bit int over GraphQL Int (width gap)In progress β€” open conformance gap

Runtime and framework

FeatureStatus
Embedded SQLite runtime (single serialized connection)Stable β€” a prototype property
Storage plane /storage/v1 (signed URLs, per-run secrets)Stable β€” a prototype byte plane
Durable storage and migrationsNot planned β€” disposable state is doctrine
Studio, /~personas, /~whoamiStable β€” development surfaces
spock new / init / check / start / devStable
spock dev client live reload (last-known-good)Stable
spock dev backend reload (currently restart_required)In progress
Uhura client languageExperimental β€” strict 0.4 and its explicit web-app@1 profile ship with spock@0.5.4; framework releases 0.5.0–0.5.3 carry the retired frontend, while releases through 0.4.0 are standalone-only. See Uhura

Distribution

FeatureStatus
npm package: macOS arm64/x64, Linux x64 (glibc), Windows x64; Node β‰₯ 18Stable
Alpine / musl LinuxIn progress β€” not supported in 0.5.x
VS Code grammar (locally packaged VSIX)Experimental

Vocabulary

One canonical name per concept, used consistently across this site, the v0 specification, and the compiled contract:

TermMeaning
contractThe compiled JSON artifact a program produces, served verbatim at GET /~contract.
authorityThe Spock-owned backend: durable truth, policy, and guarded mutations.
derived errorA failure code minted from a schema constraint, such as user_username_taken.
product errorA top-level error declaration (experimental RFD 0024 preview).
refusalA product error raised from a fn body via spock_refuse; kind refused, REST status 409.
reserved codeA protocol-owned code: not_found, type_mismatch, unknown_field, bad_request, internal, unauthorized, conflict.
diagnosticA compile-time error with a stable code (E001–E053, L001–L012) and a source span.
the floorThe derived per-table read/write surface every table receives.
the deliberate surfaceThe functions a program declares on top of the floor.
polarityWhether a function reads (fn) or writes (mut fn).
escapeOne unchecked sql("...") statement in a fn body, carried verbatim in the contract.
actor / actor seamThe current identity value / the deliberately unverified path that carries it (X-Spock-Actor).
anchorThe one auth table a program may declare; identity references point at it.
personaA seeded actor row used for impersonation during development.
seed replayRebuilding the database from source and seed on every load, through the ordinary write path.
disposable stateThe doctrine that v0 state is never migrated, only replayed.
framework projectA directory with a spock.toml manifest, served by spock start / spock dev.
standalone programOne explicit .spock file, served by spock run.