framework
One project
Check the authority backend and Uhura client, then serve Studio, Editor, and Play together.
Technical Preview— Spock is early stage and not recommended for production.
npm i -g spocknpx skills add gridaco/spockSpock is a programming language that gives the whole team one source of truth. Check product rules and interface behavior together, then run a prototype that can say no.
project/backend/app.spockclient/uhura.tomlmachine.uhuraui.uhuraevidence.uhurahost.tomlspock dev/~studioStudioauthority console/Editorchecked previews/playPlayinteractive experienceframework
Check the authority backend and Uhura client, then serve Studio, Editor, and Play together.
backend
Model backend data, relationships, constraints, defaults, and operations.
experience
Model UI-session state, experience transitions, and presentation.
the product contract
Spock keeps durable product truth—data, constraints, defaults, and operations—in one compact authority model. People and agents work from the same explicit text, with structured diagnostics when the contract does not hold.
spock language
Define tables, relationships, defaults, value constraints, and operation signatures close enough to reason about together. The compiler turns that source into a contract that runtimes and tools can inspect.
auth table user {
key id: uuid = auto
username: text unique
full_name: text?
private: bool = false
joined_at: timestamp = now
}spock studio
Studio reads the active compiled contract. Browse and filter rows, insert valid data, run functions, inspect storage when enabled, and compare actor-sensitive outcomes—without building a separate prototype console.
the experience contract
Uhura models UI-session state and transitions. Author the loading, empty, optimistic, confirmed, and refused examples the product needs. The checker validates them; Editor presents the previews together before the production UI is built.
one action, end to end
Follow one action from immediate interface feedback to confirmation or rollback. Uhura owns the temporary experience state; the authority backend decides whether the attempted change becomes durable.
optimistic
The like appears before the authority has answered.
on ToggleLike(post, liked) {
if like_pending.contains(post) {
return Duplicate;
}
let serial: PositiveInt = next_request + 1;
let request = RequestId(serial);
next_request = serial;
like_overlay = like_overlay.put(post, liked);
like_pending = like_pending.add(post);
pending = pending.put(request, Mutation::SetLike {
post, liked,
});
emit mutations.Request(request, Mutation::SetLike {
post, liked,
});
Accepted
}
on mutations.Settled(request, result) {
let mutation = match pending.get(request) {
None => return Stale,
Some(mutation) => mutation,
};
pending = pending.remove(request);
match mutation {
Mutation::SetLike { post, liked: _ } => {
like_pending = like_pending.remove(post);
match result {
Settlement::Accepted => {},
Settlement::Refused { .. } => {
like_overlay = like_overlay.remove(post);
notice.updates.show("Couldn't update this like. Try again.");
},
_ => return Invalid("unexpected settlement"),
}
},
// Other mutation arms are omitted from this excerpt.
_ => {},
}
Accepted
}what survives
Use Spock to resolve the product’s data, rules, states, and boundaries while change is cheap. Then carry the checked contracts forward as the production specification—not as infrastructure you have to deploy.
Exercise data shapes, constraints, storage, and refusal paths before implementation choices harden.
Explicit contracts name the types, operations, outcomes, and states production work must preserve.
Choose the real stack after the team has exercised the product end to end—not while its rules are still guesses.
Spock is a local prototype runtime, not a production platform. Keep the checked contracts; replace the runtime.