The operator path: migration, dreaming, maintenance, wiki, evals, deploy/install, and the tests that prove those paths exist.
Main code:
src/dory_core/migration_plan.pysrc/dory_core/migration_engine.pysrc/dory_core/migration_llm.pysrc/dory_core/migration_prompts.pysrc/dory_core/migration_normalize.pysrc/dory_core/migration_resolve.pysrc/dory_core/timeline_migration.pysrc/dory_core/corpus_normalization.py
CLI entrypoint: dory migrate
Behavior:
- Can estimate a run without writing.
- Can select folders or samples.
- Can run with concurrency.
- Can run deterministically or with LLM assistance.
- Stages supported legacy markdown plus structured/text inputs (
.json,.jsonl,.ndjson,.txt,.yaml,.yml,.toml,.csv) after filtering junk roots like.pytest_cache, dependency caches, and build output. - With
--llm, each selected markdown file goes through one strict-schema extraction pass yielding classification, entity candidates, atoms, source quality, andresolution_mode. - Writes per-document extraction artifacts under
inbox/migration-documents/<run_id>/. - Resolved documents go through a corpus-level entity clustering pass before claims and canonical pages are written.
- Deterministic fallback is evidence-first by default; unresolved docs no longer mint canonical pages from heuristic atom extraction.
- Bounded no-LLM promotion exists only for explicit contracts:
- transcript-shaped session exports with clear assistant statements
- typed JSON payloads with explicit supported families
- known schema-tagged exports routed through explicit adapters
- Resolved docs route through entity resolution, then compile through the claim/canonical/wiki stack.
- When the LLM audit path succeeds, migration writes
inbox/migration-runs/<run_id>.audit.json. - When flagged pages can be safely tightened, migration also writes
inbox/migration-runs/<run_id>.repair.json, applies one bounded grounded repair pass, and re-audits before writing the final markdown report and JSON run artifact. - Quarantines low-confidence or explicitly quarantined material.
- Emits migration reports and run artifacts.
Validation:
- Acceptance coverage exercises the baseline
--no-llmpath plus a bounded fake-LLM--llmpath that writes canonical output, per-document artifacts, and an audit artifact. - Acceptance coverage also exercises the migration quarantine path, including
quarantined_count, per-document artifact metadata, and the written quarantine markdown artifact.
CLI flags:
--llm/--no-llm(default: llm enabled)--jobs(min 1)--estimate--interactive--folder(repeatable)--sample(min 1)--pricing-file
Timeline migration is a separate utility:
scripts/ops/migrate_timeline_v1.py --corpus-root <corpus>--writeflag for actual writes; without it, preview mode
Snapshot notes:
- CLI help doesn't expose
migrate-tui. - Older
migrate-tuiplan docs are historical/private material — not shipped publicly. - Old TUI implementation files are deleted.
Main code:
src/dory_core/dreaming/extract.pysrc/dory_core/dreaming/proposals.pysrc/dory_core/dreaming/recall.pysrc/dory_core/dreaming/events.pysrc/dory_core/ops.py
CLI group: dory dream
Subcommands:
listapply—proposal_id(required)distill—session_path(required),--agentpropose—distilled_id(required)reject—proposal_id(required)
Batch surface:
dory ops dream-once—--session(repeatable)
Runtime behavior:
daily-digest-oncesummarizes raw session logs into durable daily digest files.weekly-digest-oncesummarizes generated daily digests into durable weekly digest files.dream-oncereads daily/weekly digest files and generates semantic write proposals intoinbox/proposed/.- Raw session distillation is only the explicit legacy/manual
--sessionpath. - Promotes repeated recall hits into distilled notes.
- Proposal application routes through semantic writes, not raw markdown target selection.
- The general proposal queue is also available outside dreaming via
dory proposalsand thedory_memory_proposeMCP/HTTP tool family. Semantic proposals store the dry-run route and fail apply if the route later changes. dream-oncematerializes recall-promotion distilled notes before proposal generation.
Backend selection:
- Dream distillation/proposal generation uses
DORY_DREAM_LLM_PROVIDER. - Supported values are
openrouter,local, andauto; the local path uses the OpenAI-compatibleDORY_LOCAL_LLM_*endpoint.
Main code:
src/dory_core/digest_writer.pysrc/dory_core/digest_mining.py
Batch surface:
dory ops daily-digest-once—--date,--today,--overwrite,--dry-run,--min-age-minutes,--limit,--reindex/--no-reindexdory ops weekly-digest-once—--week,--current-week,--overwrite,--dry-run,--reindex/--no-reindexdory mine-digests— extracts durable claims out of existing daily/weekly digest files into the claim store
Runtime behavior:
daily-digest-onceconsumes shipped session Markdown underlogs/sessions/**.- The default scheduled behavior writes yesterday's
digests/daily/YYYY-MM-DD.md. - It skips sessions modified more recently than the configured age guard so active sessions are not summarized mid-write.
- It includes every matching session by default. For multi-session days it batches small sessions together, sends oversized sessions alone, then merges those batch-level digests into the daily digest.
- It refuses to overwrite an existing digest unless
--overwriteis passed. - It uses the configured dream LLM provider for digest generation and reindexes the written digest path by default.
weekly-digest-onceconsumes existingdigests/daily/YYYY-MM-DD.mdfiles for the target ISO week and writesdigests/weekly/YYYY-Www.md.mine-digestsis the follow-up claim extraction pass; it does not create the digest file.
Main code:
src/dory_core/maintenance.pysrc/dory_core/ops.py
CLI commands:
dory maintain inspect—path(required),--write-reportdory maintain wiki-health—--write-reportdory maintain backfill-privacy-metadata—--path(repeatable),--refresh,--applydory ops maintain-once—--path(repeatable)
Behavior:
inspectasks OpenRouter for cleanup suggestions on metadata and placement.- Reports written under
inbox/maintenance/. wiki-healthscans generated wiki pages for stale pages, contradictions, low confidence, open questions, missing evidence, and missing timelines.- Privacy metadata convention:
visibility:private | internal | publicsensitivity:personal | financial | legal | contact | credentials | health | none- personal/raw/imported docs should carry both fields so agents and maintenance reports can distinguish boundary rules from raw sensitive evidence.
- Stale-page detection covers both explicit
status: stale|supersededmarkers and age-based expiry from frontmatterupdated. wiki-healthaccepts both claim-style and canonical current-state sections when checking evidence coverage.- Only concrete evidence refs count as coverage; placeholder labels like
Derived from claim storedon't count. - Ignores placeholder contradiction/open-question lines like
No contradictions found.. - Flags event mismatches when
TimelineandEvidencedescribe different event-type sets. - Flags
state_conflictwhen a page still presents live current-state claims but its event model only shows retirement/invalidation. - Flags
claim_mismatchwhen a compiled page's current-state section disagrees with active claims in.dory/claim-store.db. - Flags
claim_event_mismatchandclaim_evidence_mismatchwhen the page's rendered event types or evidence paths drift from the claim-event ledger. - Flags
missing_privacy_metadatafor personal/raw/imported docs withoutvisibilityandsensitivity. backfill-privacy-metadatauses the latestinbox/maintenance/wiki-health.jsonby default, dry-runs unless--applyis passed, and only inserts missingvisibility/sensitivityfrontmatter fields.maintain-onceruns the inspector across canonical defaults.
Main code:
src/dory_core/compiled_wiki.pysrc/dory_core/wiki_indexes.pysrc/dory_core/ops.py
Behavior:
compiled_wiki.pyrenders claim-backed wiki pages from active claims plus claim events.dory ops wiki-refresh-onceprefers claim-store-backed page rendering when claim history exists:- the refresh job in
ops.pymaps canonical sources to entity IDs, loads claim history and claim events, and usesrender_compiled_page_from_claim_records()when it has structured claim data - when no claim history exists, refresh falls back to a bounded summary-based page built from the canonical source body
- the refresh job in
- Refresh prunes orphaned generated wiki pages under managed families (
people,projects,concepts,decisions) while leaving non-generated wiki files alone. - The renderer groups
Evidenceby event type (Added,Replaced,Retired,Invalidated) when claim events are provided. wiki/index.md,wiki/hot.md,wiki/log.mdare generated shell pages for navigation, recent context, and recent activity.wiki/hot.mdincludesLast Updated,Current Focus,Key Recent Facts,Recent Changes,Recent Pages, andActive Threadssections. When.dory/claim-store.dbexists, facts and changes come from recent claim events instead of page summaries alone.- Family indexes and recent-page summaries prefer claim-store statements and claim-event recency over page-body summary scraping when the claim store exists.
wiki/log.mdincludes aRecent Claim Changessection derived from the claim-event ledger before wiki/session activity listings.
CLI commands:
dory ops wiki-refresh-oncedory ops wiki-refresh-indexesdory maintain wiki-health
Current source inputs for compiled pages:
core/active.mdpeople/*.mdprojects/*/state.mdconcepts/*.mddecisions/*.md
Outputs live under wiki/.
Notes:
- Compiled wiki rendering consumes claim-event evidence directly via
compiled_wiki.py. - Pages render a simple event-driven
Timelinesection when claim events are present. - Canonical tombstone pages for semantic
forgetare republished from claim history plus claim events before wiki refresh or maintenance scans. - Family wiki indexes sort pages by claim-event-derived freshness when
.dory/claim-store.dbexists, otherwise by frontmatterupdated, and display frontmatter titles instead of raw file stems. wiki-healthcompares rendered page text against claim-store state, but its mismatch checks are still largely text-heuristic set/subset comparisons, not a full structured round-trip.
Main code:
src/dory_core/watch.pysrc/dory_core/ops.py
CLI:
dory ops watch—--debounce-seconds(default 1.0),--dream/--no-dream(default True),--poll-interval(default 0.25)
Behavior:
- Buffers markdown filesystem events.
- Reindexes non-session markdown changes.
- Syncs changed
logs/sessions/**files intosession_plane.dbinstead of embedding them into durable memory. - Can pass changed session files into dreaming when configured with a dream runner.
Main code:
src/dory_cli/eval.pysrc/dory_core/eval_judge.pyeval/public/questions/- Private question roots passed explicitly with
--questions-root eval/INDEX.mdeval/validate.py
CLI:
dory eval run—question_id(optional),--questions-root,--runs-root,--top-k,--list-onlydory ops eval-once—--reindex/--no-reindex(default True),--runs-root,--top-k
Behavior:
- Loads the YAML question bank.
- Runs retrieval/wake/judging.
- Writes timestamped run directories with
results.jsonandsummary.md. ops eval-oncecan reindex before evaluation.- Judging uses OpenRouter LLM with pass/partial/fail outcomes.
- Default eval question root is the public-safe synthetic suite under
eval/public/questions/. - Private evals must be selected explicitly with
--questions-rootand reported publicly only as aggregate pass/partial/fail counts, coverage, and failure themes.
Main files:
Dockerfiledocker-compose.ymlreferences/runbook.mdreferences/client-runbook.md
Bootstrap/install scripts:
scripts/ops/install-dory.shscripts/ops/install-ops-launchd.shscripts/ops/install-client-launchd.shscripts/ops/install-client-systemd.shscripts/ops/install-backup-cron.shscripts/ops/backup.shscripts/ops/client-session-shipper.py
Installer roles:
hostclientsolo
Install intent:
- host config for HTTP/index/corpus
- client shipper for local session capture
- solo mode for a machine acting as both local host and client
Dockerfileexposes8765and8766, but its default command is onlydory-http, not a combined HTTP+MCP supervisor.docker-compose.ymlbinds HTTP on127.0.0.1:8766by default, withDORY_HTTP_BINDandDORY_HTTP_PORToverrides for LAN, VPN, reverse proxy, or firewall deployments.DorySettingsdefaultshttp_portto8000, so docs should distinguish config defaults from deployment examples.- Docker runs as fixed UID/GID
10000:10000; host bind mounts must be writable by that identity, or use a filesystem that maps ownership appropriately. docker-compose.ymluses bridge networking and a configurableDORY_DATA_ROOTbind mount so public users can run Dory on the same machine, a LAN box, a VPS, or any Docker host without inheriting a project-specific path.- Healthcheck hits unauthenticated
/healthz, so it doesn't need bearer auth. Dockerfileinstalls dependencies into/app/.venvat build time withuv sync --frozen --no-dev.
Migration:
tests/integration/acceptance/test_memory_schema_migration_acceptance.pytests/integration/cli/test_migrate_command.pytests/integration/core/test_migration_engine.py
Dreaming:
tests/integration/cli/test_dream_commands.pytests/integration/cli/test_dream_generation_commands.pytests/integration/core/test_distillation_write.pytests/integration/core/test_proposal_generation.py
Maintenance and wiki:
tests/integration/cli/test_compiled_wiki_commands.pytests/integration/core/test_compiled_wiki_search.pytests/unit/test_compiled_wiki.pytests/unit/test_wiki_indexes.pytests/unit/test_maintenance.py
Ops and watch:
tests/integration/cli/test_ops_commands.pytests/integration/core/test_watch_reindex.py
Evals:
tests/integration/cli/test_eval_runner.pytests/integration/cli/test_eval_rerank.py
Install assets:
tests/integration/cli/test_install_dory_script.py
Docker and runbooks:
tests/integration/ops/test_docker_assets.pytests/integration/ops/test_runbook_paths.py
Search and indexing:
tests/integration/core/test_search_engine.py
Semantic provenance and claim publishing:
tests/integration/core/test_semantic_evidence_artifacts.pytests/integration/core/test_event_driven_canonical_pages.pytests/unit/test_claim_store.pytests/unit/test_claim_store_events.pytests/integration/core/test_search_realish_queries.pytests/integration/core/test_session_fallback_search.pytests/integration/core/test_reindex_pipeline.pytests/integration/core/test_reindex_invalid_docs.py
Write and semantic write:
tests/integration/core/test_write_flow.pytests/integration/core/test_semantic_write_flow.py
MCP:
tests/integration/mcp/test_stdio_server.pytests/integration/mcp/test_tcp_server.pytests/integration/mcp/test_tool_schema.pytests/integration/mcp/test_http_bridge.pytests/integration/mcp/test_cross_agent_visibility.py
When you change any operator-facing behavior, update:
- This file.
- The relevant command help or runbook.
- At least one integration or acceptance test reference in the docs if coverage changed.