<nil>NILScript

Core Concepts

SEQRD-PC Specification

SEQRD-PC is the public mnemonic for NIL's speaker-plane kernel — the closed set of performatives that every legal exchange on the wire is built from. Closing the grammar is what lets any client reason about any conformant system.

The kernel mnemonic

Read as a mnemonic, the kernel is:

  • SSTATUS · poll the state of a proposal or run
  • EEVENT · the system pushes a signed result back
  • QQUERY · read fresh business truth
  • RROLLBACK · request a governed reversal
  • DDECIDE · the owner approves, out of band
  • PPROPOSE · an agent proposes an action
  • CCOMMIT · execute an approved proposal

It is a re-cut of the existing set for recall — not a wire rename. PROPOSAL is the synchronous response to PROPOSE and ROLLBACK, so it does not carry its own letter.

Two planes

The performatives split across two planes with credential separation between them. The speaker plane carries the seven an agent can emit. The owner plane carries DECIDE alone — the act of approval, which must run on a credential that is not co-deployed with speaker credentials.

Separation of duties is structural
A fully compromised speaker cannot approve its own CRITICAL action, because it does not hold the DECIDE credential.

The seven, in order

A consequential action travels a fixed path: PROPOSE the action, receive a PROPOSAL (preview or refusal), DECIDE to approve if the tier requires it, COMMIT the approved proposal, receive the real result as a signed EVENT, and — if it must be undone — ROLLBACK into a compensation preview that is committed in turn. QUERY and STATUS read the world and the run at any point along the way.

DECIDE — the owner plane

DECIDE records an approval, a rejection, or an approve-with-modification. Modifications are only legal for facts a profile marks modifiable; everything else is immutable even from the owner’s seat. It is the one performative an agent can never emit.

Six endpoints

The speaker-plane kernel surfaces as six HTTP endpoints. EVENT is outbound — the system is the sender:

NIL endpoints
POST /nil/v0.1/propose      # PROPOSE  → PROPOSAL (preview or refusal)
POST /nil/v0.1/commit       # COMMIT   → STATUS
POST /nil/v0.1/query        # QUERY    → { "data": { … } }
GET  /nil/v0.1/status/{id}  # STATUS   → STATUS
POST /nil/v0.1/rollback     # ROLLBACK → PROPOSAL (compensation preview)
# EVENT is outbound: POST {gateway}/webhooks/nil-events

Why the set is closed

A profile cannot invent a new performative. The performatives are the grammar; the profiles are the vocabulary. Closing the grammar is what lets any client reason about any conformant system — and the set grows only by ratified amendment, never by a single vendor’s extension.

See also
For the full envelope, request/response bodies, and refusal codes, see NIL — Wire Protocol and Spec at a Glance.

NILScript is an open standard, stewarded by the Wosool project. The spec is extracted from running code.

Draft standard v0.3.0 · 0.x stage · NIL wire 0.1 · DSL 0.1