Notation reference · v0.6
The Scholialang v0.6 specification.
Scholialang, the structured reasoning language, renders
agentic reasoning in a form that can be audited, replayed, compared,
and validated. The v0.6 release defines a 32-atom catalog,
XML-shaped trace syntax, an optional SHA-256 canonical_id
attribute available on every atom, a
canonical_id-keyed DAG registry, a 3-mode lazy prelude,
and canonical-id-aware validator updates — so reasoning recorded
and validated in one session can be reused in the next by hash
instead of being replayed.
Scholialang source files conventionally use the .srml
extension; that extension names the XML-shaped notation, not a
separate language.
v0.6 · canonical
What v0.6 adds.
v0.6 centers the language around portable identity. The 32-atom
closed set, XML-shaped tags, 11 operators with canonical-id target
forms for REFER and IMPLIES, the
<Step> container, and validator report shape form
the launch contract. canonical_id_well_formed is
vacuous on an atom that carries no canonical_id, which
keeps lightweight traces valid while allowing content-addressed
traces to be checked mechanically.
For the plain-language story behind these additions — why content-addressed identity makes reasoning portable and compounding across sessions — see What's new in v0.6.
| # | Change | Type | Spec slot | Primary surface |
|---|---|---|---|---|
| 1 | Content-addressable canonical_id — optional universal base attribute + compute_canonical_id hasher |
Additive | sha256:<12 hex> over {kind, content, attrs} (provenance excluded) |
Atoms |
| 2 | REFER:sha256 / IMPLIES:sha256 forms |
Additive | Content-addressed target form alongside the local-id form | Operators |
| 3 | DAG registry — canonical_id-keyed atom store with REFER/IMPLIES edges |
Additive | {version, atoms, edges} on disk; the cross-session resolver |
v0.6 substrate |
| 4 | Lazy canonical-prelude — 3 core render modes | Additive | hash_only, hash_list (default), inline |
v0.6 substrate |
| 5 | Canonical-id validator updates | Additive | one new canonical_id_well_formed rule + canonical-id-aware reference_complete |
Validation |
02 · content-addressable substrate
The v0.6 substrate.
Three additive capabilities, all defined byte-for-byte by the
published scholialang v0.6 reference implementation.
None of them changes the 32-atom catalog — they sit underneath it.
Content-addressable canonical_id.
Every atom carries an optional universal base attribute,
canonical_id — a "sha256:" prefix plus the
first 12 hex chars of the SHA-256 digest of a canonical JSON
serialization of the atom's structural identity. The same structural
atom emitted from different sessions or hosts addresses to the
same id, so reasoning can be reused across runs without
replaying it.
payload = {
"kind": atom.kind,
"content": atom.content.strip(),
"attrs": <sorted kind-specific attrs, provenance excluded>,
}
serialized = json.dumps(payload, sort_keys=True, separators=(",", ":"))
canonical_id = "sha256:" + sha256(serialized).hexdigest()[:12]
Excluded from the hash: provenance / session
metadata (timestamp, wall_clock,
run_id, sequence, instance) and
base bookkeeping (id, canonical_id,
children, operators). Children are hashed
independently and are not folded into a parent's id
(a Merkle-DAG identity is a v0.7 non-goal). Two emits of the same
structural atom from different sessions therefore address
identically.
The DAG registry.
A canonical_id-keyed atom store whose edges are derived
from REFER:sha256 / IMPLIES:sha256
operators. When atom A's body carries REFER:sha256:<B>,
the registry records a premise B → conclusion A edge.
On disk it is {version, atoms, edges} (default
~/.scholia/registry.proofchain.json); a file with no
edges key loads as an empty edge list. The registry is the resolver of
last resort for genuinely cross-session REFER:sha256.
The lazy canonical-prelude — 3 core modes.
The prelude introduces a later session to prior atoms by
canonical_id instead of replaying their full XML — the
consumer side of the token-savings claim. The finalized v0.6
contract is exactly three deterministic render modes
(CORE_PRELUDE_MODES); the renderer makes no LLM calls.
hash_only
Maximally compact (~30 chars/atom). One canonical_id
+ kind line per atom, no body — tooling, validators, or
resolvers can hydrate bodies from the registry when a trace
references the atom.
- REFER:sha256:8f4a9d2c1b3e (Finding)
hash_list default
Compact + truncated preview (~70–100 chars/atom).
canonical_id, kind, and a ~60-char flattened body
preview.
- sha256:8f4a9d2c1b3e (Finding) "All criteria passed; coverage…"
inline
Each prior atom as a full XML element, emitting its
canonical_id. This is the high-context render mode
the compact modes are measured against.
<Finding id="F_01" canonical_id="sha256:8f4a9d2c1b3e" …>…</Finding>
See the prelude preview live in the
playground. The two experimental
quality-recovery arms (hash_semantic_preview,
selective_inline_plus_hash_only) are not
part of this core contract (overview, above).
03 · vocabulary
Atoms.
Canonical atom catalog from SCHOLIA_v0.6_SPEC.md and
reference/atoms_index.yaml. These 32 atom kinds span
seven categories. Each card lists the atom's tag, summary, a Scholialang
syntax preview, and any
spec attributes or sub-elements it accepts. Click an atom name (or
the # on hover) to copy a permalink.
Universal base attributes. Every atom kind below
inherits two optional base attributes that are not repeated per
kind: id (the trace-scoped local identifier) and
canonical_id (the v0.6 content address,
sha256:<12 hex>; see
§2 · canonical_id).
04 · vocabulary
Operators.
Logical, temporal, identity, and reference operators. Inline
shorthand (REFER:, IMPLIES:) is the
primary form in prose; the long forms appear as
<Reference/> and <Implication/>
atoms when extra framing is needed.
Canonical-id operator forms new in v0.6
v0.6 adds no new operators — it adds a content-addressable
target form for REFER and IMPLIES
alongside the existing local-id form. The sha256: form
is what makes cross-session reuse possible: a
REFER:sha256:<cid> in a later session dereferences
an atom first emitted earlier and persisted in the
DAG registry, without that atom appearing in
the current trace.
| Form | Example | Resolves against |
|---|---|---|
| local-id | REFER:Finding_02 |
the trace's local id index |
| canonical-id (v0.6) | REFER:sha256:8f4a9d2c1b3e |
the trace's canonical_id index, then the registry |
| canonical-id forward | IMPLIES:sha256:8f4a9d2c1b3e |
same; also records a DAG edge in the registry |
Resolution boundary. A canonical-id target resolves
cleanly when supplied as a structured attribute (e.g.
<Reference to="sha256:<cid>">) and the cid is
in the trace's canonical_id index. A bare
inline REFER:sha256:<cid> to a cid that is
not in the current trace needs the registry to resolve; a
registry-less validator surfaces it as an informational
"needs registry" note rather than a hard fail. To validate clean
standalone, keep the referenced atom in-trace or use the
to="sha256:<cid>" attribute form.
05 · vocabulary
Primitives.
Two families. Value primitives are the literal
shapes attributes carry (LIST, SET, MAP, STRING, NUMBER, BOOL).
Structural primitives are sub-elements that pin
code-graph metadata onto atoms — each one constrained by a closed
set of allowed attribute values.
Meta, Effect, Ref, and
Edge are atom tags that also serve as constrained
structural child primitives.
06 · enforcement
Validation rules.
The v0.6 validator enforces 18 rules: structural checks,
<Concluding> and criticality checks, warning
rules, plus the canonical_id_well_formed rule. (Rule 2,
reference_complete, also gains canonical-id resolution
in v0.6 — it is an upgrade, not a new rule name.)
SCHOLIA_VALIDATOR_VERSION reads 0.6.0.
Errors invalidate a trace; warnings surface epistemic overreach
without failing it.
v0.6 content-addressable rules
-
Rule 18 ·
canonical_id_well_formed(hard-fail) — every atom that carries acanonical_idmust match the hash recomputed from its structural content viacompute_canonical_id. Vacuous whencanonical_idis absent; hard-fails on mismatch — the canonical signal of tamper or stale storage. -
Rule 2 ·
reference_complete(canonical-id-aware) — aREFERtarget now resolves via (1) local id, (2) in-tracecanonical_id, (3) registry lookup bycanonical_id, else (4) unresolved. The resolution-boundary note applies to bare inlineREFER:sha256refs.
Closed-set attributes
<Ref type="…">
test_owner, doc, spec
<Ref type="test_owner" target="tests/unit/scholia/test_validator.py"/>
Format-constrained attributes
<Observation location="…">
path:start_line:end_line — colon-separated
location="src/service/util/dates.py:14:21"
<Observation confidence="…"> or <Concluding confidence="…">
Float in [0.0, 1.0]; absent = 1.0
confidence="0.85"
Validity rules
Eighteen rules govern how atoms compose and how content addresses
stay honest. JS renders the valid / invalid examples for each into
#validity-rules below.
07 · canonical sources
Reference implementation.
This page translates the canonical v0.6 spec, atom card, and
notation reference into a scannable, indexable reference. The authoritative
sources live in scholialang-spec. Read them on GitHub
when you need precise language; cite this page when you need stable
per-atom URLs. Where this page, the tagged spec, and implementation
disagree, treat it as release drift and prefer the tagged
SCHOLIA_v0.6_SPEC.md until reconciled.
- SCHOLIA_v0.6_SPEC.md → The canonical v0.6 atom, operator, primitive, substrate, and validator-rule catalog.
-
v0.6 examples →
Traces exercising
canonical_id, aREFER:sha256cross-trace reference, and a prelude sample per core mode. - Notation reference → Per-atom attributes, examples, and validator rules (incl. the universal base-attribute table).
- scholialang → Python parser, validator, stable IDs, serializers, and renderers.
- scholialang-mcp → MCP server, LSP MVP, Codex and Claude Code plugins, plus Ollama-backed MCP host recipes.
- CRITICALITY.md · CONFIDENCE.md · FILE_METADATA.md · CODE_GRAPH_METADATA.md · STABLE_IDS.md
- /whats-new-in-v0.6 — plain-language v0.6 substrate explainer.
- /gallery — example traces.