Soma · Configuration & integration
Export maps and Engram knowledge
Ordinary docs render uses the Axon database when available, otherwise workspace facts. It writes <generated_dir>/codemap.md, arteries.md, overview.md, module pages and authored-area navigation. Fix discovery/index inputs rather than hand-editing generated facts. --out chooses the authored root, not every output destination. Release annotations do not run tests at the named revision.
Generated <generated_dir>/manifest.json describes schemaVersion (1), optional tag, inputs, axonIdFormat, trustFloor, botOwnedFiles and botOwnedBlocks. Bot-owned file entries control which pages are excluded from authored-anchor scans; do not expand them to bypass review. concerns index writes <generated_dir>/registry.md and each authored concern's trigger block, not a new definition of the rule. Render refreshes map/navigation output and may create an initial lock, while reconfirm explicitly updates reviewed pins; these writes have different purposes. Preserve authored prose and review generated diffs before treating regeneration as closeout.
Choose one of two Engram file exports:
soma docs render --engram
soma docs render --engram --maps --ote ./example.ote.toml --axon-db .axon/axon.db
Concern export: review <generated_dir>/engram/, its compartment manifest and key inventory. Each valid concern, irrespective of lifecycle state, becomes one curated page with key soma-<project-slug>-<id>: critical concerns become failure_mode, others invariant, with explicit curated_knowledge authority. Sections are demoted beneath the one node heading; no summary/completion directive is emitted. Only path-bearing triggers produce globs (brace alternatives expanded); symbol/reach/migration names do not invent path scope. The authored README is not swept into this layer. Reconfirming pins alone does not change the page body. Envelope/structural-marker injection is refused rather than silently sanitized; > summary: and > complete: lines are rejected even in fences. Invalid registry or rejected concern text exits 1 before output; corrupt previous keys.json exits 2 without forgetting emitted keys. These pages are neither runtime guards nor automatically graduated canon.
Map export: provide the consumer's OTE and a current Axon index, then review <generated_dir>/engram-maps/: module pages, manifests, key inventory and census.json. The index supplies modules and content hashes. The OTE determines body/cue budgets and the generated-layer share; withheld modules are named in the census. A missing index exits 1 (axon: absent). A commit-stale index also exits 1 unless explicitly allowed with --allow-stale; that override does not make the map fresh.
Use the consumer's real OTE; this minimal synthetic shape demonstrates the required budget inputs, not a complete Engram seat configuration:
[seat]
seat_id = "seat:example"
archetype = "reviewer"
keyspace_budget_tokens = 2000
generated_layer_share_pct = 20
[ontology]
domain = "example"
[[topology.mounts]]
ring = "M2"
budget_share_pct = 30
[[topology.mounts]]
ring = "M4"
budget_share_pct = 70
Budget must be an integer 256–16384; generated share is an integer 0–100 (default 20). Mounts must be unique M0–M4 rings with integer shares totalling 100. Seat ID, archetype and ontology domain must be nonempty. Missing/unusable OTE inputs exit 2. M2 is the map ring; missing/zero M2 or generated share can successfully withhold every module—read the census, not just the exit code. Bodies are capped by the block/share budget; cues also obey M2's guaranteed partition minus a reserve for other knowledge (including the sibling concern export). Modules with the most symbols are admitted first, then name order; zero-symbol modules are withheld. These estimates are not measured tokenizer usage.
Map keys are axon-<project-slug>-module-<module-slug> with collision-safe suffixes. Pages use architecture/curated_knowledge; snapshot hashes cover every module node ID/content hash in stable order, even symbols beyond the visible body cap. Freshness compares the indexed commit to HEAD, not uncommitted content: matching HEAD is not a clean-worktree guarantee. Missing/unresolvable/nonancestor indexed commits are stale; corrupt or empty/unusable indexes exit 1. --allow-stale records the override in census.json, not a freshness claim.
Both exports write compartments.json and keys.json (schema: soma.engram.keys.v1, emitted, retired). Preserve inventories between renders: deletions accumulate retired keys, restoring a key makes it active again, and changing the project name can change all keys. Successful rendering removes obsolete Markdown in its own generated layer and writes the key inventory last. Validate inputs before re-rendering; a rejected registry must not silently retire its concern keys. Consumers should scope import to these layer manifests, not recursively ingest the whole authored/generated docs tree. Consumer-side hydration/conformance/retirement commands are outside Soma's CLI.
Check the render option rules before adding release or client metadata: concern and map exports accept different combinations. Exporting writes files only. A separately authorized Engram consumer performs hydration and retirement/supersession of retired keys; Soma does not mutate Engram memory.