wuwei is part of ontoref Gov.
wuwei
a domain ontoref resolves by bond · contract 4, not yet frozen

One stroke, left open: the session is seen, never closed by the one who watches.

Agent sessions, observed without forced intervention.

wuwei is a manner: how an AI work session opens, identifies itself, reports, waits for its principal's conformity, closes and delivers. It registers, observes, traces and carries messages. It does not assign, plan, decide or act with credentials: signing, agreement and custody are extensions that others fill. The lightness is earned on a floor of registration, report and receipt; without that floor it is drift.

The domain

Three capabilities, one contract

The contract lives in code/schemas as Nickel. wuwei-contract is its Rust mirror: it decodes only what the schemas accept, holds the lifecycle as pure transitions and declares the traits SessionRegistry, Trace, Messenger, Liveness and Edge.

session-registry

A session receives an identity when it registers, and declares what it is, such as its VCS identity or its custody status, as declarations validated by form. One live session per host and workspace, unless the deployment says otherwise.

session-trace

What a session does is recorded without intervening: an append-only trace per session on NATS JetStream, queryable as evidence. Every event names the contract version it was written under.

session-messages

Typed events and .md files carried between a session, its principal and other sessions, over a Unix socket or TCP. Bodies travel inline only as small markdown; reports, receipts and signatures travel as references by digest.

Status: contract 4 is complete in code/ and held by its tests, and the service passes the kit on real NATS. It is not frozen: the owner has not accepted those changes, and ADR-001, ADR-002 and ADR-003 are Proposed. No deployment declares where the service and the view run, and no harness has the adapter installed for real work.

The lifecycle

A session moves by its own steps, never by the observer's

wuwei never closes a session by itself. A session reaches a terminal state by its own step, its principal's, or its harness ending, and the trace names who. The states and the steps, as code/schemas/session.ncl declares them:

Live = Registered | Working | Awaiting | Closing
Terminal = Delivered | Abandoned { by } | Failed { reason }
Stale = { interrupted: Live }
Step = Start | Close | Deliver | Fail { reason } | Abandon { by }
  • Awaiting holds while a request is open. Any answer, unread, returns the session to the state it came from.
  • Stale is an observation, not a step. A process that stops answering the liveness probe leaves its session Stale; when it answers again, the interrupted state is restored.
  • Abandoned carries the party that abandoned it, and Failed the reason given. Neither is inferred.
  • shared_workspace says what happens when a second session registers on a host and workspace another live session holds: Refuse by default, writing nothing; Report, which records WorkspaceShared in its trace; or Ask, which makes it wait on a request its principal answers.

Two places in the flow are still open: a session answered under Ask returns to Registered and cannot be abandoned until it starts, and there is a delivery gap at SessionEnd.

A session under wuwei

From deployment to delivery

  1. Deploy

    A project adopts wuwei by deploying the service, never by linking it (ADR-001). wuwei-observer --deployment <file> reads a declared Deployment: NATS with JetStream, the trace and records streams, a Unix socket or TCP. It refuses to start on streams that differ from the deployment, and creates them only with --create-streams.

  2. Register

    The harness's adapter registers each session. For Claude Code, wuwei-claude-code does it on SessionStart. A session refused for a held workspace is told so before it touches a file.

  3. Trace

    The adapter keeps the session alive on UserPromptSubmit, Stop and Notification. The service appends every event to the trace stream, which is the source of truth: on start it replays the trace into its projection, so it keeps no store of its own.

  4. Carry

    Messages, requests and answers go on the records stream. The service delivers them and never reads what an answer means.

  5. Close

    On SessionEnd the adapter brings the session to a terminal state, and each step is taken by a named party and recorded with who took it. What is delivered at that moment is the open gap the lifecycle names.

The conformance kit

Twelve checks any implementation passes

wuwei-conformance depends on the contract only, never on an implementation. It judges two: wuwei-memory, an in-memory fixture, and the service on a NATS server with JetStream. The fixture's tests break it on purpose, once per check, and each check must catch its defect.

DistinctIdentity

Sessions of the same project and actor get distinct ids and never overlap.

FullLifecycle

The whole lifecycle, with a continuous trace.

AnswerUnread

An open request keeps the session Awaiting; any answer, unread, returns it to Working.

LivenessObserved

A dead process makes the session Stale; a revived one restores it; nothing closes.

AppendOnly

The trace is append-only.

EvidenceByDigest

Evidence travels by digest; inline evidence is refused.

DeclarationsByForm

Declarations are validated by form and kept, whatever their namespace.

EdgeRefutes

A malformed frame is refused at the edge and leaves nothing behind.

WorkspaceHeld

A session registering in a workspace another live session holds meets the policy the implementation declares.

QueriesRead

The queries on the wire answer from what is recorded and never write.

WarrantCarried

A principal's warrant is carried as given and never read.

VersionNegotiated

The contract version is negotiated, never imposed.

The contract depends on no ontoref crate. An agnosticism test refuses any ontoref package in the lockfile and any vocabulary of the attaching domains in the sources, so the kit is the only judge of an implementation.

A published contract

Frozen by version, negotiated like TLS

The trace outlives the implementation that wrote it, so a type change reaches every writer and every reader (ADR-002). What a change owes is ontoref's rule, invoked and never restated here.

A frozen version does not change

A version freezes when the owner accepts the changes that complete it. After that, every change of a type is a new version, which says how it reads the traces written before it.

Every event names its version

Event.contract travels on every event. A reader refuses an event of another version by name, never by guessing from its shape. The number lives once, in primitives.ncl, and Rust is held to it by test.

No authority is necessary

A registration says the versions it speaks. The implementation takes its own when offered, or answers Unsupported with both ranges.

The agreement is named by its digest

What a version covers is data of the contract. The service announces it on <prefix>_agreement; any carrier may spread it and none is trusted for it: a reader recomputes the digest. Endorsements are optional opinions a reader's policy weighs.

The session view

Perspective for the principal, and their acts carried

The view shows what runs, what waits for the principal's act, what stopped sending heartbeats, and whether the floor holds. It reads and acts through the service's wire only: it never writes to NATS and keeps no projection of its own.

Acts by a named principal

Answer, deliver, fail, abandon: each offered only where the lifecycle allows it, and recorded with who took it. The same acts reach the pages, the HTTP endpoint and the command line through one dispatch.

An assertion, not a proof

The wire authenticates nobody. A principal always says what it rests on: an authority's Decision or Attestation, or Asserted by a named writer. No deployment issues warrants yet, so the view listens on loopback only, and acting needs a session opened with a passkey or a registered device.

States are named, never judged

Every colour is a role of the brand: live, waiting, without heartbeat, delivered, failed. No template draws a tick or a cross, and a check refuses one that does (ADR-003).

Boundaries

What wuwei is not

Not surveillance

To observe is not to watch over. The trace shows what passed and changes nothing.

Not an intervention

It assigns, plans and decides nothing for a session. Every act it carries is a step a named party takes: the session, its principal or its harness.

No verdicts

A state is said by its name. wuwei does not approve or reject a session it only observed.

Not orchestration

Orchestration is vapora's. An orchestrator can be a further implementation of the contract, held to the same kit.

Not a harness

It observes the harness. An adapter per harness reports to the service; wuwei does not run the agent.

Not custody, not a signature

It never acts with credentials. Custody is another domain, and signing belongs to Signatio and gov; a principal's warrant is carried, never read.

ontoref Gov

ontoref

One domain in three layers: how a project governed by ontoref governs itself.

What it is

Gov is ontoref's own domain. It holds the arrangement — what a project's boundary declares, its members, which artefacts a consumer inherits — and the exercise — what work is committed and how an act is delivered. Its name is the root of governance, governability and government, and elects none of them.

Why

A decision, a boundary or a delivery that lives only in someone's memory binds no one. In Gov each one is a declaration a project can be held to, and what holds it is a mechanism, not a good intention.

What for

A project reaches Gov by bond, never by imposition, and takes only the parts it needs. In signature governance each project carries one: the contract, the operations of work, the signature, the dossier, the agreement and the signing on an agent's behalf. Beside them, the capabilities any state of governance uses: the host boundary, deployment, the observed session and the opening by name.

How governance is layered

Protocol · base

ontoref's base: bonds and planes, content bound by digest, the unsigned work order, the check form, and mandatum's types. Every project is written in it; a project can bond without adopting any governance.

Management and governability · gov

The gov domain, in ontoref: how the constellation is organised, its management modes, and decisions held by validators.

Signature governance · foedus

The foedus domain, provided by the foedus project and operated by warden: the agreement, each party's annex and the tests that prove it. A project is here because it is a party to the agreement.

Isolation, provisioning, wuwei and openbyname are capabilities any state of governance uses — the agent's boundary, deployment, sessions, and running tasks locally — not governance: governance needs them, they do not need governance.

Each project chooses its governance mode

Governability (coherence) · ontoref alone

Coherence only: ontoref checks that the declarations hold together. No signature.

Auditable governance · signature

The person signs. It detects a departure; it does not prevent it.

Applied governance · signature + isolation

Signature and isolation together. It prevents.

Part of the same system

signature governance

capabilities

Observed, not forced.

A session opens, reports, waits, closes and delivers by its own steps and its principal's. wuwei registers it, traces it and carries what is said, on a floor that earns the lightness.