The idea: keep knowledge useful as it changes
Maintenance has several different jobs: checking broken links, rebuilding search artifacts, combining related knowledge, and reorganizing pages. A graph records relationships between pages; federation searches attached wikis; absorption proposes selected knowledge to copy into a destination wiki.
Start with inspection, which does not require a model:
mini-a wikiman=true wikiroot=./demo-wiki
Use the menus to inspect pages, lint results, indexes, and graphs. Writable operations require explicit write access. Preview consolidation before applying it:
mini-a dream=true dreammode=wiki dreamwikimode=plan \
usewiki=true wikiroot=./demo-wiki wikiaccess=ro
The plan should report proposed work without changing the wiki. Reorganization and apply modes have different write gates; follow the relevant section below. Keep backups and resolve pending recovery journals before starting conflicting maintenance.
For moving knowledge between wikis, use the reviewed absorption workflow. For exact standalone commands and their defaults, see wiki utilities.
Dreams (Sleep Pass)
The dream pass is an LLM-powered off-line consolidation step — think of it as REM sleep for your agent. After a long session, the pass reorganises what the agent learned: merging near-duplicate memory entries, marking superseded entries stale, surfacing new cross-cutting insights into the summaries section, and producing a lint-clean wiki.
# Consolidate memory after a session
mini-a dream=true \
memorych='(name: mini_a_global_mem, type: file, options: (file: ~/.openaf-mini-a/memory-global.json))' \
model='(type: anthropic, model: claude-sonnet-4-6)'
# Or from the interactive console (when memory or wiki is configured)
mini-a ➤ /dream
mini-a ➤ /dream memory dryrun # preview without writing
mini-a ➤ /dream wiki
Seven wiki dream execution modes control exactly how maintenance is applied:
| Mode / Option | Setting | Description |
|---|---|---|
| Explicit Modes | dreamwikimode / dreammemorymode |
Wiki: auto, plan, apply, reorg, repair, reindex, graph, or indexes; memory: plan or apply |
| No-write preview | dreamwikidryrun=true |
Opt out of writing during wiki apply |
| Structural Reorg | dreamwikireorg=true |
Allow structural directory and file moves |
| Reorg Approval | dreamwikiapproval |
Control structural approval flow (auto, ask, never) |
| JSON Reporting | dreamreport |
Optional path to write a JSON run report |
Use dryrun=true, dreamwikidryrun=true, or the plan mode to preview what would change without writing anything back. Memory dreams back up their pre-dream channel state to a sibling namespace before writing; keep normal storage backups for the primary wiki.
Automatic wiki maintenance
/dream wiki auto dryrun previews issues without a model or writes. Applying /dream wiki auto requires explicit wikiaccess=rw and authorizes supported local repairs: ingestion-journal recovery, deterministic lint/navigation repairs, retrieval rebuilds and optional validated model proposals. dreamwikillm=false keeps deterministic repairs only. Backups, writer locking, ownership checks and fresh verification protect recovery; conflicts remain for review. See authorization, limits and outcomes.
Wiki dreaming and reorganization
Wiki dreaming is a maintenance workflow for a writable primary wiki; it is not an operation provided by the read-only mcp-wiki endpoint. Run it from Mini-A with usewiki=true; the dream runner forces its own wiki manager to read-write mode. Keep the discovery MCP available to broad clients, and restrict the credentials used for dream runs and mcp-wiki-ops to trusted operators.
| Mode | Writes pages? | Purpose | Required controls |
|---|---|---|---|
plan / dryrun=true |
No | Produce a proposed tree, index changes, and lint summary | usewiki=true |
apply |
Yes | Make safe, non-structural index and metadata improvements, then finalize indexes and graph | usewiki=true |
reorg |
Yes | Run an agent-led structural reorganization, including high-confidence moves and index repair | dreamwikireorg=true, dreamwikiapproval=auto |
repair |
Yes | Run deterministic lint repairs only | usewiki=true |
reindex |
Yes | Rebuild the search index only | usewiki=true |
graph |
Yes | Rebuild the knowledge graph only | usewiki=true, usewikigraph=true |
indexes |
Yes | Regenerate all directory index.md pages only |
usewiki=true |
plan is the recommended first run, especially for S3 and OpenSearch-backed wikis. It emits a proposal rather than changing remote pages. apply is the default and can be made no-write with dreamwikidryrun=true. reorg remains explicitly guarded: structural reorganization must be enabled and non-interactive approval must be auto. With the default ask approval it returns approval-required; with never it returns approval-denied.
# Inspect a MinIO/S3 wiki without modifying it
mini-a dream=true usewiki=true wikibackend=s3 \
wikibucket=team-wiki wikiprefix=wiki/ wikiurl=http://minio.internal:9000 \
wikiaccesskey="$MINIO_ACCESS_KEY" wikisecret="$MINIO_SECRET_KEY" \
wikiuseversion1=true dreamwikimode=plan \
dreamreport=/var/log/mini-a/wiki-plan.json
# Run a deliberately approved structural reorganization
mini-a dream=true usewiki=true wikiroot=/shared/wiki \
dreamwikimode=reorg dreamwikireorg=true \
dreamwikiapproval=auto dreamreport=/var/log/mini-a/wiki-reorg.json
Before a reorganization, the runner loads the wiki’s AGENTS.md; the agent then uses the hierarchy, backlinks, and lint results to make only high-confidence moves, creates or repairs section indexes, and reports skipped uncertain moves. A dreamreport captures counts for changed, moved, deleted, and indexed pages plus lint summaries. For operational detail and the programmatic API, see Advanced → Dreams.
See Advanced → Dreams for full documentation and the programmatic API.
Dreams (Sleep Pass)
The dream pass is an LLM-powered off-line consolidation step. Given the same memory channels and wiki settings used during a regular session, it reorganises what the agent learned: merging duplicates, marking superseded entries stale, surfacing new cross-cutting insights, and producing a lint-clean wiki — all without touching the live agent loop.
Think of it as REM sleep for your agent: the active session ends, then the dream pass reorganises what was retained.
When to run a dream pass
- After a long or iterative session where the agent appended many memory entries — the pass compacts redundancy without losing information.
- When the wiki has accumulated near-duplicate pages, broken links, or missing front-matter.
- On a nightly cron schedule to keep a shared team wiki clean.
Dream pass modes
| Mode | Triggered by | What happens |
|---|---|---|
| Memory dream | memorych arg is set |
Loads global (and optionally session) memory, calls the LLM to consolidate, writes back |
| Wiki dream | usewiki=true |
Runs the selected wiki workflow: deterministic maintenance, validated auto proposals, or an agent for reorg |
| Combined | Both args set | Both modes run in sequence |
Parameters
| Parameter | Default | Description |
|---|---|---|
dream |
false |
Run in standalone dream-pass mode |
dreammode |
- | Dream mode selector: memory, wiki, or both — controls which pass(es) run |
dryrun |
false |
Preview what would change without writing anything back |
dreamwikimode |
apply |
Wiki mode: auto, plan, apply, reorg, repair, reindex, graph, indexes |
dreammemorymode |
apply |
Memory mode: plan or apply |
dreamwikidryrun |
false |
Propose wiki changes without writing (opt out of apply) |
dreamwikiapproval |
ask |
Reorg approval mode: auto, ask, never |
dreamwikireorg |
false |
Allow structural wiki reorg |
dreamreport |
- | Optional JSON output report path |
memorych |
- | SLON/JSON global memory channel definition (required for memory dream) |
memorysessionch |
- | SLON/JSON session memory channel |
memorysessionid |
- | Session namespace string — use the same value as conversation= during the goal |
auditch |
- | SLON/JSON audit channel — recent events are included as context |
maxauditrecords |
200 |
Maximum audit log entries included in the memory consolidation prompt |
usewiki |
false |
Enable the wiki dream (requires wikiroot, wikibucket, or equivalent) |
model |
- | SLON/JSON model config used for the memory consolidation LLM call |
dreammaxsteps |
40 |
Total model-step limit for wiki auto/reorg |
dreamwikillm |
true |
Allow model proposals for unresolved auto-maintenance issues; false selects deterministic repairs only |
dreamwikiinstructions |
- | Additional guidance for the existing reorg goal; does not relax tool restrictions |
libs |
- | Extra comma-separated libraries to load |
Automatic wiki maintenance
/dream wiki auto runs the same coordinator in the terminal, Advanced Dream panel and Wiki Manager. Preview with /dream wiki auto dryrun, then deliberately apply supported repairs with an explicit wikiaccess=rw:
mini-a dream=true dreammode=wiki dreamwikimode=auto \
usewiki=true wikiroot=./wiki wikiaccess=rw \
dreamwikillm=false dreamreport=wiki-auto.json
Auto is on-demand and local-directory-only; mounted/remote wikis and remote graphs are unsupported. Invoking it authorizes its supported repairs without per-action prompts. Dry-run calls no model and performs no writes, backups, ingestion resumes or index publication. Other Dream modes keep their approval gates.
It diagnoses authoritative Markdown, resumes valid existing ingestion journals, repairs deterministic lint/navigation issues and rebuilds damaged retrieval artifacts. dreamwikillm=true allows tool-free model proposals for remaining issues, validated by the coordinator. Healthy pages receive no speculative reorganization. It runs at most three repair/verification cycles, stops on no progress and caps total model requests at dreammaxsteps=40. A missing model leaves semantic issues unresolved after deterministic work.
When modeldec or OAF_DECIDE_MODEL is configured, auto first asks the decision model to choose among existing targets for ambiguous links and existing headings for invalid anchors. Only the remaining issues go to main-model proposals. Decision calls share dreammaxsteps and keep one step in reserve for fallback; usedecide=false turns this off. Reports add decision counts (calls, selected, fallbacks), and each selected repair is verified with fresh lint and retrieval checks.
Provenance/ingestion-owned pages are protected from generic edits. Conflicting/corrupt ingestion journals remain in place; pending absorption blocks auto and directs you to /absorb status and /absorb resume <plan-id>. Unsupported schemas, unavailable pages and unresolved ownership require review.
Local mutations share .mini-a-wiki-ingest/writer.lock. Auto must persist original page/state contents and hashes in .mini-a-wiki-maintenance/<run-id>/backup.json and journal.json before repair; backup failure blocks writes. Stop requests cancellation, possibly after an in-flight non-streaming model call returns. Interrupted runs retain a pending marker and backups; the next pass reconciles known journal boundaries. External hash conflicts are preserved for manual review rather than overwritten. Completed work is not automatically rolled back.
Fresh strict-reader checks, content reads, search probes, lint and enabled structural-graph checks determine verified fixes. The report records diagnosed issues, attempted actions, verified fixes, unresolved issues, backup location and verification coverage. Outcomes include noop, complete, partial, planned, blocked, cancelled and interrupted; dreamreport saves the JSON report. A rebuild alone does not prove success.
Memory dream internals
- Channels are opened using the provided SLON/JSON definitions.
- Global memory (and optionally session memory) is loaded via
MiniAMemoryManager.loadFromChannel. - If
auditchis provided, the most recentmaxauditrecordsaudit entries are loaded. - The LLM receives a system prompt describing the consolidation rules, the full memory snapshot, and the audit events.
- Consolidation rules:
- MERGE near-duplicate entries in the same section (keep the most informative value; preserve the earlier
createdAt). - MARK superseded entries with
stale=trueandsupersededBy=<id-of-replacement>. - DROP entries that are both
stale=trueand have asupersededBythat exists in the output. - SURFACE new cross-cutting insights as new
summariesentries. - PRESERVE all IDs of retained entries unchanged; assign new 16-char hex IDs to new entries.
- MERGE near-duplicate entries in the same section (keep the most informative value; preserve the earlier
- The consolidated snapshot is validated against the
MiniAMemoryManagerschema. - Unless
dryrun=true, the pre-dream state is backed up to a sibling namespace (<ns>::predream-<ISO-timestamp>), then the consolidated snapshot is written back.
Source folders and topic organization
Preview folder-preserving ingestion with /ingest ./docs reference layout=source dryrun, then remove dryrun to apply. Standalone callers use ingestlayout=source. Guide/Setup.md maps to reference/guide/setup.md; existing source bindings retain their destinations when layout changes. Sanitized collisions receive stable source-key suffixes, and generated section indexes remain separate from source index pages.
New/refreshed pages rewrite local Markdown page links against current ingestion mappings, including moved pages; anchors and external URLs remain. Unresolved links are reported in unresolved_links. Code fences, inline code and image links stay intact; asset copying and arbitrary HTML-link conversion are excluded. A newly available link target refreshes unchanged referring pages under normal budgets/ownership checks; unrelated new sources do not. Older link records refresh once to establish tracking, possibly calling the distillation model.
For semantic organization explicitly run /dream reorg topics. /set dreamwikiapproval auto authorizes it; ask requires approval and never denies. Standalone settings are dreamwikimode=reorg dreamwikireorg=true dreamwikiapproval=auto dreamwikiorganize=topics. The wiki manager retains review/backup confirmations. The topic policy prefers existing sections and shallow groups, records uncertain moves and accepts dreamwikiinstructions. Ingestion does not start this operation automatically.
Moves journal verified link repairs and ingestion destinations at <indexRoot>/.mini-a-wiki-move/journal.json. Changed sources then refresh at their moved destinations; manual edits and Dream content rewrites still cause ownership conflicts. Repeat the move or run writable ingestion to recover an interruption; dry-run only reports pending recovery. Other writes stay blocked until verified replay completes. Conflicting edits preserve the journal. The local lock does not coordinate remote writers on separate machines.
Wiki dream internals
The following describes the pre-existing modes; auto uses the coordinator above.
usewiki=trueis required;wikiaccessis forced torw.dreamwikimode=plan,dryrun=true, anddreamwikidryrun=truerun the same no-write proposal path.- Use
dreamwikimode=planfor explicit mode selection; usedryrun=truewhen you want the generic safety flag (it also affects memory dreams). - Proposal output includes
new_tree,move_table,indexes_to_create,indexes_to_update, and lint before/after summaries. dreamwikimode=applyis the default and performs safe non-structural work; usedreamwikidryrun=trueto opt out.dreamwikimode=reorgis structural and requiresdreamwikireorg=trueplusdreamwikiapproval=auto.- A
MiniAWikiManagerexposes hierarchy-awaretree,browse,backlinks,move, andlint()operations. - A full
MiniAagent is spawned (defaultmaxsteps=40, controlled bydreammaxsteps) with the following goal:- Discover the hierarchy with
tree/browse, search related content, inspect backlinks, and list lint issues. - Apply only high-confidence category moves with
move; skip uncertain relocations. - Create missing section indexes and fix index links for local pages and child sections.
- For each heading hierarchy violation: fix heading levels.
- For orphan pages (excluding
index.md,AGENTS.md, andlog.md): add a link fromAGENTS.mdor the most related existing page. - Re-run lint and confirm zero errors and warnings remain.
- Discover the hierarchy with
- The agent’s final answer summarises
pages_moved,pages_changed,pages_deleted,indexes_created,issues_fixed, andskipped_uncertain_moves.
Standalone usage (mini-a dream=true)
# Memory dream — dry-run preview (no writes)
mini-a dream=true dryrun=true \
memorych='(name: mini_a_global_mem, type: file, options: (file: /tmp/mini-a-memory.json))' \
model='(type: anthropic, model: claude-sonnet-4-6)'
# Full memory dream (writes back)
mini-a dream=true \
memorych='(name: mini_a_global_mem, type: file, options: (file: /tmp/mini-a-memory.json))' \
auditch='(name: mini_a_audit, type: file, options: (file: /tmp/mini-a-audit.log))' \
model='(type: anthropic, model: claude-sonnet-4-6)'
# Session memory dream
mini-a dream=true \
memorych='(name: mini_a_global_mem, type: file, options: (file: /tmp/mini-a-memory.json))' \
memorysessionch='(name: mini_a_session_mem, type: file, options: (file: /tmp/mini-a-session.json))' \
memorysessionid='research-2026' \
model='(type: anthropic, model: claude-sonnet-4-6)'
# Wiki dream
mini-a dream=true \
usewiki=true wikiroot=/shared/wiki \
model='(type: anthropic, model: claude-sonnet-4-6)'
# Non-interactive nightly proposal (no writes) + JSON report
mini-a dream=true \
usewiki=true wikiroot=/shared/wiki \
dreamwikimode=plan \
dreamreport=/var/log/mini-a/dream-wiki-plan.json \
model='(type: anthropic, model: claude-sonnet-4-6)'
# Non-interactive safe apply + JSON report
mini-a dream=true \
usewiki=true wikiroot=/shared/wiki \
dreamwikimode=apply \
dreamreport=/var/log/mini-a/dream-wiki-apply.json \
model='(type: anthropic, model: claude-sonnet-4-6)'
# Non-interactive structural reorg (explicit gates required)
mini-a dream=true \
usewiki=true wikiroot=/shared/wiki \
dreamwikimode=reorg dreamwikireorg=true \
dreamwikiapproval=auto \
dreamreport=/var/log/mini-a/dream-wiki-reorg.json \
model='(type: anthropic, model: claude-sonnet-4-6)'
For a local wiki, mini-a wikidream=true wikiroot=... is a shortcut that applies reorg defaults, takes a zip backup and compacts the index afterwards. See Wiki lifecycle jobs. wikidreambudget isn’t enforced by the current dream runner, so use dreammaxsteps to bound auto/reorg. /dream plan is always model-free and returns estimates.
Console command (/dream)
The /dream slash command is available in interactive console sessions when at least one of memorych or usewiki=true was set at startup. It is shown in /help whenever memory or wiki is configured.
| Command | Description |
|---|---|
/dream |
Run memory dream + wiki dream (whichever are configured) |
/dream memory |
Run memory dream only |
/dream wiki |
Run wiki dream only |
/dream dryrun |
Dry-run both (no writes) |
/dream memory dryrun |
Dry-run memory dream only |
/dream wiki dryrun |
Dry-run wiki dream (proposal package, no writes) |
/dream wiki plan |
Explicit wiki proposal mode (same execution path as dryrun today) |
/dream wiki apply |
Safe wiki apply mode (enables write gate) |
/dream wiki reorg |
Structural wiki reorg mode (enables gates + auto approval in console) |
Sub-commands and dryrun complete with Tab.
Combining with regular sessions
# 1. Start a session with persistent memory and a shared wiki
mini-a usememory=true memoryuser=true usewiki=true wikiaccess=rw wikiroot=/shared/wiki
# 2. Work on goals interactively...
# 3. When done, consolidate from the console
mini-a ➤ /dream
# Or consolidate in a separate invocation (e.g. a nightly cron)
mini-a dream=true \
memorych='(name: mini_a_global_mem, type: file, options: (file: ~/.openaf-mini-a/memory-global.json))' \
usewiki=true wikiroot=/shared/wiki \
model='(type: anthropic, model: claude-sonnet-4-6)'
Programmatic API
loadLib("mini-a-dreams.js")
var runner = new MiniADreams({
memorych: '{"name":"my_memory","type":"file","options":{"file":"/tmp/memory.json"}}',
model: '{"type":"anthropic","model":"claude-sonnet-4-6"}'
}, log)
// Run memory dream only
var result = runner.dreamMemory()
// result: { ok: true, results: { global: { ok, before, after, staleMarked } } }
// Run wiki dream only
var wikiResult = runner.dreamWiki()
// wikiResult: { ok: true, result: "<final-answer-excerpt>" }
// Run both
var overall = runner.run()
// overall: { ok: true, memory: {...}, wiki: {...} }
// Inject a stub LLM for testing
runner._setLlm(myStubLlm)
Wiki maintenance utilities
Guided operations manager
mini-a wikiman=true wikiroot=./wiki wikiaccess=rw usewikigraph=true
wikiman=true opens guided inspection, page editing/moves/deletion, lint, indexes, compaction, graph, Dream, ingestion and absorption/recovery menus. Inspection needs no model; access defaults to ro, and no current-directory wiki is silently selected. Mounts stay read-only: explicitly configure their root/backend as primary to maintain them. Do not combine this launch mode with web, worker, Dream or goal execution.
Category Advanced options exposes operation limits; Session → Adjust session settings changes temporary connection/graph settings. Use /back to cancel text prompts. Results include elapsed time, full details/history and a sanitized replay command. Run history / export explicitly saves a sanitized run record; connection profiles/history are not automatically saved.
Writes require review and noninteractive confirm=true. Reorg asks two default-No confirmations, including an external recovery point, and requires backupconfirmed=true dreamwikireorg=true dreamwikiapproval=auto. dreamwikiinstructions adds guidance without changing restrictions. Compaction previews and requires offline=true. Recovery discard and absorption delete/cancel do not undo written pages.
# From the Mini-A checkout/package directory
ojob utils/wikiOps.yaml operation=wiki.lint wikiroot=./wiki
ojob utils/wikiOps.yaml operation=wiki.reindex wikiroot=./wiki wikiaccess=rw confirm=true
Wiki lifecycle jobs
utils/wikiHydrate.yaml, utils/wikiDream.yaml and utils/wikiQuery.yaml wrap ingestion, dreaming and read-only querying of a local filesystem wiki. You can also reach them as mini-a wikihydrate=true, mini-a wikidream=true and mini-a wikiquery=true (aliases --wiki-hydrate, --wiki-dream, --wiki-query). For a step-by-step walkthrough, see Features → Quickstart: hydrate, sleep and query a wiki.
ojob utils/wikiHydrate.yaml wikiroot=okts/docs source=./docs prune=true dream=true
ojob utils/wikiDream.yaml wikiroot=okts/docs semantic=true mode=ollama organize=topics
ojob utils/wikiQuery.yaml wikiroot=okts/docs goal="How does compaction work?"
| Hydrate | Dream | Query | |
|---|---|---|---|
| Required | wikiroot, source |
wikiroot (must exist) |
wikiroot (must exist and have pages) |
| Writes | Yes, then compacts | Yes (backup zip first), then compacts | Never (wikiaccess=ro) |
| Mode preset | poweruser |
poweruser |
wiki |
| Specific options | prune, dryrun, semantic, dream, dreamwikimode, dreamsemantic, backup, compact |
dreamwikimode (default reorg), semantic, organize, instructions, dreammaxsteps, backup, dryrun, compact |
web, onport, goal |
- Model resolution:
mode=applies a preset exactly as the console does (mode=noneskips it), an explicitmodel=overrides the preset, andOAF_MODELis the fallback. - Shared defaults:
usewikigraph=true,wikiretrievalv2=true,wikitelemetry=true,wikilexicalfromOAF_MINI_A_WIKI_LEXICAL(otherwise English with n-grams, shingles, query expansion and pseudo-relevance feedback), andwikiretrievalconfigfromOAF_MINI_A_WIKI_RETRIEVAL_CONFIG. Hydrate also defaults toingestmode=auto,ingestlayout=sourceandwikimaxprompttokens=200000. - Semantic graph: off unless
semantic=true. Both writing jobs pass an explicitwikigraphsemantic, because dreamapply/planwould otherwise enable it implicitly. - Dream defaults:
dreamwikireorg=trueanddreamwikiapproval=auto. A mutating mode zips the wiki, including hidden index and state folders, to<wikiroot>.predream-<timestamp>.zip, and doesn’t start if the backup fails.planskips compaction. - Enforced and pass-through:
wikiaccess=rwandwikibackend=fsare enforced for the writing jobs. Othermini-a-ingest, wiki and dream arguments pass through. - Readers must match: use the same
wikiretrievalv2=trueandwikilexicalas the publisher; the jobs print a reminder. - Exclusions: the three switches can’t be combined with each other or with
wikiman,modelman,memoryman,dream,workermode,execoragent.web,onportandgoalare accepted only bywikiquery. - The jobs load
mini-a-*.jsfrom their own checkout, soojob /path/to/mini-a/utils/wikiDream.yaml ...works from any directory. Validate withojob tests/wikiUtilsJobs.yaml.
Compaction and offline diagnostics
Local Retrieval V2 compaction rebuilds the active serving index as a base generation and reclaims unreachable serving artifacts. Preview first; stop other processes reading or writing the wiki before applying. With wikiaccess=rw and V2 enabled:
/wiki compact
/wiki compact offline=true
The standalone, model-free equivalent runs from the Mini-A package directory:
ojob utils/wikiCompact.yaml dir=/path/to/wiki
ojob utils/wikiCompact.yaml dir=/path/to/wiki apply=true offline=true
Use the publisher’s wikilexical and wikiretrievalconfig settings. offline=true confirms other readers/writers have stopped; publication locking cannot track readers in other processes. Local writable wikis only are supported. Pending or corrupt ingestion journals block compaction. Check ok: true before reopening read-only.
Compaction preserves Markdown, graph, metadata, knowledge/ingestion state, legacy indexes and bundle caches, plus the previous generation and its dependency lineage. It is not a general hidden-folder purge or Lucene force-merge. Collection can fail after a new index has already been activated; report and retry the failed cleanup.
For a self-contained offline graph visualization:
ojob utils/wikiGraph.yaml dir=/path/to/wiki output=/tmp/atlas.html title="Team wiki"
The exporter uses an existing .mini-a-wiki-graph/graph.json or scans Markdown links without creating indexes; it needs no model or server. utils/indexStats.yaml also accepts V2 serving-only roots and reports pointers, parser/schema versions, contracts, artifact sizes, lineage and persisted telemetry. These are offline snapshots: a present manifest does not prove integrity or compatibility, and missing telemetry does not mean zero queries.
Graph builds
Wiki Manager, Studio, /graph build, MCP graph_build and utils/wikiOps.yaml operation=graph.build share one build contract. Ordinary builds do not edit Markdown.
| Choice | Effect |
|---|---|
extraction=structural |
Default; links and structure, no model calls |
extraction=semantic modelHelp=off |
Deterministic section-level concept discovery, no model calls |
extraction=semantic modelHelp=auto |
Bounded model-assisted relationships grounded in source quotes |
strategy=incremental |
Default; changed/missing work, reusing valid section evidence |
strategy=full |
Reconstruct structure while retaining valid enrichment |
strategy=resume |
Continue unfinished semantic work; rejects stale options |
retryFailed=true |
Retry deferred semantic sections while preserving successes |
force=true |
Ignore successful semantic checkpoints and reset failures |
# Build deterministic semantics without a model.
ojob utils/wikiOps.yaml operation=graph.build wikiroot=/path/to/wiki \
usewikigraph=true wikiaccess=rw confirm=true \
params='{"extraction":"semantic","modelHelp":"off"}'
# Resume enrichment with a bounded per-run budget.
ojob utils/wikiOps.yaml operation=graph.build wikiroot=/path/to/wiki \
usewikigraph=true wikiaccess=rw confirm=true \
params='{"extraction":"semantic","modelHelp":"auto","strategy":"resume","maxCalls":25}'
Built-in budgets are 100 calls, 200,000 estimated total tokens and 10 minutes. preset=small uses 20 / 40,000 / 2; large uses 500 / 1,000,000 / 30. There is no unlimited mode. Explicit run options override saved wiki defaults, then built-ins. Save preferences with graph.defaults or the manager; strategy, force and retries are per-run actions. Legacy semantic=true maps to semantic extraction with automatic help; explicit extraction/help wins.
Automatic help tries LC, then main; optional Decide classification shares the budget and does not establish evidence. Progress includes completed, cached, pending and failed sections, calls and estimated tokens. Completed sections are checkpointed. After two failed cycles with unchanged inputs, sections are deferred: a retry-required build needs explicit retryFailed=true, rather than another ordinary resume. Cancellation preserves completed work and stops further scheduling; in-flight calls use provider timeouts. See the full build contract.
Reconcile and upgrade a graph
Use reconciliation when related pages are hard to find because their authors used different links or left a title unlinked. The default wikigraphreconcile=lexical finds candidates from the primary wiki and records relationships supported by the page text. For example, a unique title or alias mentioned verbatim can create a MENTIONS_PAGE edge. It ranks below an explicit link. The original Markdown stays intact.
On a local writable wiki of up to 200 pages, a single edit, move or delete can trigger a short reconciliation when the settings are lexical and model-free. Larger wikis and model-assisted work queue changes for a build. Set wikigraphautoreconcile=false to defer this work, or wikigraphimplicitlinks=false to remove implicit mentions at the next reconciliation. Hybrid reconciliation uses OAF_EMBED_MODEL to rerank candidates. Model validation is a separate opt-in, wikigraphreconcilellm=auto. Ordinary searches call neither provider.
To upgrade an existing graph from its current wiki pages, start with a read-only preview. Run these commands from the Mini-A checkout with the path to your wiki.
ojob utils/wikiOps.yaml operation=graph.upgrade wikiroot=/path/to/wiki \
usewikigraph=true wikiaccess=ro params='{"preview":true,"reconcile":"lexical"}'
In Studio, open Maintenance → Rebuild graph → Advanced options and choose Preview graph upgrade to estimate the work. Under Pages → Graph → Build or update graph, Inspect meaningful connectivity distinguishes pages connected by content from pages that only share a folder. When ready, select the expensive staged upgrade and choose Upgrade complete graph. The CLI equivalent requires both write confirmation and an explicit expensive-operation confirmation.
ojob utils/wikiOps.yaml operation=graph.upgrade wikiroot=/path/to/wiki \
usewikigraph=true wikiaccess=rw confirm=true params='{"confirmExpensive":true,"reconcile":"lexical"}'
The previous graph serves readers until its replacement passes verification. If a budget runs out or the process stops, choose Resume graph upgrade or run operation=graph.resume with the same confirmations. Resume reuses completed work and the saved settings. Keep the journal and staging directory while the upgrade is pending. The graph upgrade manual covers rollback and conflicting edits.
Fully rebuild graph and index
For a complete reconstruction from existing Markdown, choose Fully rebuild graph and index in Wiki Manager → Indexes & storage, or use:
ojob utils/wikiDream.yaml wikiroot=/path/to/wiki \
dreamwikimode=rebuild mode=none semantic=false compact=false
This is an expensive, explicit operation for a writable filesystem wiki. Stop external readers/writers first. The wrapper takes a pre-dream backup, republishes the full index, then reconstructs the graph without changing source pages. dryrun=true previews it. Repeat to resume; an interrupted index phase restarts, and changed content invalidates an index checkpoint. semantic=true permits model enrichment under graph budgets; it defaults off here.
Folder transactions and recovery
Wiki Manager’s Browse & organize supports marked page/folder moves and deletes, page renaming and new folders. Multi-item selections use one previewed, snapshotted transaction. Move/rename folder and Delete folder cover the entire tree, including attachments and empty directories. These require a local writable primary wiki; mounts, symlinks, root operations and existing destinations are rejected.
ojob utils/wikiOps.yaml operation=wiki.folderPreview wikiroot=/path/to/wiki \
params='{"from":"guides","to":"archive/guides"}'
ojob utils/wikiOps.yaml operation=wiki.folderMove wikiroot=/path/to/wiki \
wikiaccess=rw confirm=true \
params='{"from":"guides","to":"archive/guides","expectedRevision":"<preview revision>"}'
The destination parent must exist. Moves update links, relative attachment references and ingestion ownership; no overwrite or merge occurs. For deletion, omit to in the preview and use wiki.folderDelete with its revision and confirmation equal to the source path. Marked selection deletion instead requires delete N items. Re-preview after a revision conflict.
Failed/interrupted folder work keeps .mini-a-wiki-folders/pending.json and blocks writers. Stop other readers and choose Restore pending folder snapshot, entering the exact recovery ID. wiki.folderRestore is the noninteractive equivalent. This restores the entire wiki, including attachments, ownership and indexes; reopen afterward. Verified snapshots live beside the wiki under <wikiroot>.mini-a-folder-recovery/<recovery-id> and remain after success or rollback. Retain unresolved journals and snapshots.