Skip to content
RULITH DOCS
Browse documentation

Capability field reference

Developer/Operator reference. These tables describe the authoring fields shipped with the deployed Java service. Use Console validation for the final acceptance of a draft.

Shared value model

An atom names a declared predicate and its named arguments:

{"predicate":"order","args":{"id":"?order_id","status":"pending"}}

A string beginning with ? is a variable. The same variable means the same value within a rule or Action. Bind a variable in a positive premise before using it in a conclusion. A negated or absence premise cannot supply missing values.

Keep business keys explicit. Cases share the Agent's graph; a Case selection does not implicitly scope every predicate.

Portable capability

A Capability contains Vocabulary, Rules, Actions and Sources, and can declare Case Contracts. Its immutable Release identifies the content installed on an Agent. Connections, local paths, credentials and independent Constitution clauses are not portable capability content.

Vocabulary, Rules and Actions

FieldRequirementTypeMeaning
idrequiredidentifierStable package name; starts with a lowercase letter.
titlerequirednon-empty stringHuman-readable package title used in Console and the capability library.
summaryoptionalstringShort catalog summary; presentation metadata, not executable semantics.
judgesoptionalstring[]Catalog and discovery tags; presentation metadata, not executable semantics.
vocabulary.defines[].idrequirednamespaced predicate idCanonical semantic identity such as acme.finance.invoice_approved. Definitions in one Domain Program use one namespace.
vocabulary.defines[].asoptionallocal identifierPackage-local alias. The final id segment is used when omitted.
vocabulary.defines[].argsrequiredstring[]Ordered argument names; their order is the canonical word signature.
vocabulary.imports[].idoptionalcanonical predicate idA shared predicate this program may read. Imports are explicit and read-only.
vocabulary.imports[].asoptionallocal identifierUnique package-local alias used by Rules and Actions.
rules[].idrequiredidentifierStable rule id, unique within the board.
rules[].labelrequiredstringHuman explanation shown as the basis of a conclusion.
rules[].whenrequiredAtom[]Non-empty premises. Variables must be bound by a positive premise.
rules[].thenrequiredAtom[]Non-empty conclusions. Built-ins and naf are not allowed here.
acceptance[]optionalAcceptanceBridge[]Completion bridges. The body binds an acceptance node and positive evidence; the single conclusion is acceptance_met for that node.
actions[].actionrequiredidentifierA board-state transition name; distinct from an external Tool.
actions[].descriptionoptionalstringHuman explanation of the transition.
actions[].preconditionsrequiredAtom[]Facts that bind parameters and must hold before the transition; use an empty array for an unconditional transition.
actions[].effectsrequiredAtom[]Facts consumed or produced after success. It may be empty only when execution is present and the Action exists solely to obtain a trusted receipt or returned facts.
actions[].executionoptionalExecutionMakes the Action externally executed. It references one versioned Tool and one Source; Adapter details are forbidden here.
actions[].execution.toolconditionalversioned Tool idStable Tool contract such as acme.invoice.read@1. Required when execution is present.
actions[].execution.sourceconditionalsource nameThe one governed Source bound to this Action. Multiple candidate Sources require distinct Action names; Source is never an ApplyAction argument.
actions[].execution.kindconditionalread | write | runExternal effect class. It does not choose the local Adapter.
actions[].execution.paramsoptionalRecord<name, string | number | boolean (+ ? for optional)>Typed argument contract. Values supplied to ApplyAction are bindings, never facts.
actions[].execution.inputPolicyoptionalgrounded | clueread defaults to clue; write and run default to grounded. Grounded parameters bind from positive trusted preconditions; clues only seed acquisition.
actions[].execution.humanOnlyoptionalboolean = falseIf true, only human clearance can release the exact Action instance.
actions[].execution.returnsoptionalReturnMapping[]Maps trusted structured receipt columns to attested board facts.

Use canonical predicate names or declared imports. Reference installed definitions rather than copying them into model assertions. Use Action preconditions and declared inputs to state what evidence must support execution.

For an Action that runs a Worker Tool, the declared Tool and the configured Worker must agree. A field appearing in a draft does not itself grant a runtime permission.

Built-in operators

The following operator descriptions come from the deployed authoring manifest. They describe the accepted authoring interface, not the language used to implement the current server.

OperatorGroupMeaning
eq(left, right)comparisonEquality.
neq(left, right)comparisonInequality.
lt(left, right)comparisonStrictly less than.
lte(left, right)comparisonLess than or equal.
gt(left, right)comparisonStrictly greater than.
gte(left, right)comparisonGreater than or equal.
between(value, low, high)comparisonInclusive numeric range check.
contains(left, right)textTrue when the left string contains the right string.
add(left, right, result)arithmeticExact addition.
sub(left, right, result)arithmeticExact subtraction.
mul(left, right, result)arithmeticExact multiplication.
div(left, right, result)arithmeticDivision; fails on zero or a non-finite result.
mod(left, right, result)arithmeticJavaScript-style remainder; fails on zero.
pow(left, right, result)arithmeticExponentiation; fails on a non-finite result.
idiv(left, right, result)arithmeticFloor division; exact integer inputs only.
imod(left, right, result)arithmeticMathematical modulus paired with floor division.
min(left, right, result)arithmeticNumeric minimum.
max(left, right, result)arithmeticNumeric maximum.
neg(left, result)arithmeticArithmetic negation.
abs(left, result)arithmeticAbsolute value.
sign(left, result)arithmeticReturns -1, 0, or 1.
sqrt(left, result)arithmeticSquare root; fails outside its finite domain.
ln(left, result)arithmeticNatural logarithm; fails outside its finite domain.
exp(left, result)arithmeticNatural exponential; fails on a non-finite result.
concat(left, right, result)textString concatenation.

Test arithmetic boundaries, zero divisors, missing values and failed comparisons. The JSON interface still constrains representable values; do not rely on a language-specific conversion to repair an invalid value.

Sources

FieldRequirementTypeMeaning
formatfixedrulith-sources/1Source-template format identifier.
meta.namerequiredidentifierStable source-template package name.
meta.versionoptionalnumber = 1Template version.
sources[].namerequiredstring <= 64Logical Source name referenced by executed Actions and Worker Tools.
sources[].typerequireddb | file | http | mcp | sensor | compute | humanWorker access family. It determines connection, access, and territory semantics.
sources[].wordsrequiredstring[]Predicates this source is allowed to attest.
sources[].tieroptionalattested | perceivedSuggested evidence ceiling; installation governance decides the effective tier.
sources[].territoryHintoptionalstring <= 240Human deployment or jurisdiction hint.
Agent source instance.connectiondeploymentAgent-owned connection nameNot package content. After installation, governance binds each source instance to exactly one Worker Connection owned by the same Agent.
sources[].accessconditionaladdress <= 240Non-secret endpoint or path required when configuring a live source.

Sources declare logical evidence requirements. Bind their physical locations and Connections in the Agent's Runtime configuration. Source trust and material-delivery permission are separate controls.

Worker Tool Manifest

FieldRequirementTypeMeaning
formatfixedrulith-worker-tools/1Local manifest format. This file is not uploaded or published as a Capability.
tools.<versioned-id>.adapterrequiredhttp | mcp | db-query | db-exec-fenced | run | workspaceLocal implementation recipe for the versioned Tool. Workspace is built into the reference Worker and normally enabled through environment configuration rather than a manifest row.
tools.<versioned-id>.sourcerequiredsource nameMust equal the Source referenced by the Action and be bound to the same Agent-owned Connection.
tools.<versioned-id>.entryrequiredstringAdapter entry: relative path, request path, MCP Tool name, or fixed query template, depending on the Adapter.
tools.<versioned-id>.fenceoptionalobjectAdapter-specific bounds such as method, timeout, response size, or row limit.
tools.<versioned-id>.handles.verificationoptionalstring[]Verification work kinds this Tool handles through the same Adapter path.
tools.<versioned-id>.handles.evidenceoptionalstring[]Evidence material kinds this Tool handles through the same Adapter path.

A Tool manifest selects an Adapter, a fixed operation and bounded execution settings. Secrets belong in the Worker vault or operator environment.

Use the runtime's supported Adapter and manifest format, and check that the Worker reports the required Tool. Do not infer tool availability from a capability's declaration alone.

Agent and Worker setup explains the ordinary workbench path. The published runtime contains the implementation and advanced integration reference.

Constitution

FieldRequirementTypeMeaning
formatfixedrulith-norms/1Constitution format identifier.
meta.namerequiredidentifierStable Constitution package name.
meta.versionoptionalnumber = 1Constitution package version.
norms[].idrequiredidentifierStable clause id.
norms[].titlerequiredstringShort clause summary shown at clearance time.
norms[].versionoptionalnumber = 1Clause version.
norms[].textoptionalstringFull natural-language wording shown to the reviewer.

Constitutions are separate from capability business rules and local Tool configuration. Review the effective policy on the Agent. Editing a draft does not modify an installed immutable Release.

Snapshot and validation

Java 6b1ddc3 / Rulith 0.8.17

These tables are extracted from pinned release artifacts. A later development schema is not automatically available on the hosted service. Validate the complete draft in Console, publish it separately, and check effective installation before running it.

MCP reference · Publishing reference