somora 2026.1001.4 → 2026.1007.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/README.md +31 -24
  2. package/config.example.yaml +37 -1
  3. package/docs/agents.md +714 -584
  4. package/docs/api.md +2327 -2546
  5. package/docs/browser.md +450 -265
  6. package/docs/builder.md +408 -282
  7. package/docs/cache-strategy.md +249 -301
  8. package/docs/compaction.md +378 -232
  9. package/docs/display.md +363 -130
  10. package/docs/dream-phases.md +598 -789
  11. package/docs/files.md +509 -333
  12. package/docs/imagegen.md +421 -302
  13. package/docs/images/somora-hero.png +0 -0
  14. package/docs/index.md +139 -174
  15. package/docs/lsp.md +142 -60
  16. package/docs/mcp.md +365 -273
  17. package/docs/memory.md +315 -356
  18. package/docs/mobile.md +283 -282
  19. package/docs/models.md +440 -197
  20. package/docs/projects.md +297 -316
  21. package/docs/realtime-voice.md +358 -234
  22. package/docs/resources.md +268 -176
  23. package/docs/sampling.md +141 -78
  24. package/docs/security.md +413 -169
  25. package/docs/sentinel.md +268 -208
  26. package/docs/setup.md +786 -1115
  27. package/docs/skills.md +415 -430
  28. package/docs/team.md +268 -143
  29. package/docs/thinking.md +415 -387
  30. package/docs/tmux.md +384 -334
  31. package/docs/tools.md +492 -109
  32. package/docs/videogen.md +319 -146
  33. package/docs/voice.md +335 -220
  34. package/docs/web.md +633 -835
  35. package/docs/wiki.md +442 -482
  36. package/package.json +2 -1
  37. package/src/attachments/store.ts +19 -1
  38. package/src/browser/session.ts +2 -2
  39. package/src/cli/auth.ts +22 -0
  40. package/src/cli/banner.ts +56 -0
  41. package/src/cli/claude-bin.ts +48 -0
  42. package/src/cli/config.ts +47 -0
  43. package/src/cli/server-call.ts +65 -0
  44. package/src/cli/setup.ts +26 -8
  45. package/src/cli/somora.ts +36 -4
  46. package/src/cli/team.ts +13 -6
  47. package/src/cli/tui/api.ts +44 -2
  48. package/src/cli/tui/app.tsx +77 -8
  49. package/src/cli/tui/commands.ts +111 -14
  50. package/src/cli/tui/header.tsx +20 -0
  51. package/src/cli/tui/stream.ts +3 -0
  52. package/src/cli/tui/turn-views.tsx +22 -0
  53. package/src/cli/tui/types.ts +14 -3
  54. package/src/compaction/summarize.ts +12 -3
  55. package/src/compaction/template.ts +15 -0
  56. package/src/compaction/types.ts +3 -0
  57. package/src/config/loader.ts +75 -10
  58. package/src/config/types.ts +59 -20
  59. package/src/dream/deep-llm.ts +83 -3
  60. package/src/dream/deep-runner.ts +8 -2
  61. package/src/dream/deep-worker.ts +1 -0
  62. package/src/dream/lucid-runner.ts +7 -3
  63. package/src/dream/lucid-types.ts +3 -0
  64. package/src/dream/rem-extract.ts +99 -69
  65. package/src/dream/worker-model.ts +31 -0
  66. package/src/engine/a2a.ts +1 -1
  67. package/src/engine/claude-cli.ts +136 -4
  68. package/src/engine/codex-cli.ts +74 -0
  69. package/src/engine/engine-meta-labels.ts +2 -0
  70. package/src/engine/openai-compatible.ts +142 -29
  71. package/src/engine/types.ts +7 -0
  72. package/src/imagegen/generate.ts +30 -5
  73. package/src/imagegen/types.ts +6 -0
  74. package/src/media/capabilities.ts +8 -0
  75. package/src/memory/inject.ts +66 -7
  76. package/src/multimodal/blocks.ts +14 -0
  77. package/src/multimodal/load.ts +21 -2
  78. package/src/multimodal/model-image.ts +127 -0
  79. package/src/persona/loader.ts +2 -2
  80. package/src/server/index.ts +275 -62
  81. package/src/server/restart-intent.ts +138 -0
  82. package/src/server/restart-reconcile.ts +6 -2
  83. package/src/server/run-turn.ts +66 -17
  84. package/src/server/session-compact.ts +138 -0
  85. package/src/server/thinking-resolve.ts +30 -0
  86. package/src/server/turn-origin-kind.ts +2 -2
  87. package/src/ssh/exec.ts +55 -22
  88. package/src/ssh/known-hosts.ts +17 -2
  89. package/src/ssh/pool.ts +7 -1
  90. package/src/storage/sessions.ts +40 -15
  91. package/src/tools/dream/tools.ts +2 -2
  92. package/src/tools/exec/tools.ts +19 -2
  93. package/src/tools/file/analyze.ts +46 -7
  94. package/src/tools/file/remote.ts +31 -10
  95. package/src/tools/file/tools.ts +86 -19
  96. package/src/tools/image/tools.ts +6 -0
  97. package/src/tools/registry.ts +14 -0
  98. package/src/types/events.ts +25 -4
  99. package/src/types/turn-origin.ts +6 -2
  100. package/web/dist/apple-touch-icon.png +0 -0
  101. package/web/dist/assets/{index-CrkkIfd9.js → index-40x__Izy.js} +168 -163
  102. package/web/dist/assets/index-40x__Izy.js.map +1 -0
  103. package/web/dist/assets/index-CZFgQRsq.css +32 -0
  104. package/web/dist/favicon-48.png +0 -0
  105. package/web/dist/favicon.ico +0 -0
  106. package/web/dist/favicon.svg +1 -8
  107. package/web/dist/index.html +6 -2
  108. package/web-mobile/dist/apple-touch-icon.png +0 -0
  109. package/web-mobile/dist/assets/index-CxILeHfe.js +88 -0
  110. package/web-mobile/dist/assets/index-CxILeHfe.js.map +1 -0
  111. package/web-mobile/dist/assets/index-Cyr13VGR.css +1 -0
  112. package/web-mobile/dist/favicon-48.png +0 -0
  113. package/web-mobile/dist/favicon.ico +0 -0
  114. package/web-mobile/dist/favicon.svg +1 -8
  115. package/web-mobile/dist/icon-192.png +0 -0
  116. package/web-mobile/dist/icon-512.png +0 -0
  117. package/web-mobile/dist/index.html +5 -3
  118. package/web-mobile/dist/manifest.webmanifest +2 -2
  119. package/web/dist/assets/index-BA5mmiV0.css +0 -32
  120. package/web/dist/assets/index-CrkkIfd9.js.map +0 -1
  121. package/web-mobile/dist/assets/index-BqKt7IMx.css +0 -1
  122. package/web-mobile/dist/assets/index-X_vRr6cd.js +0 -88
  123. package/web-mobile/dist/assets/index-X_vRr6cd.js.map +0 -1
package/docs/wiki.md CHANGED
@@ -1,583 +1,543 @@
1
1
  # Wiki Layer
2
2
 
3
- > Long-term, structured, shared knowledge that all agents read but only
4
- > Deep and Lucid (and you, in Obsidian) write. Lives in a designated
5
- > subfolder of an Obsidian vault.
3
+ The wiki is the long-term knowledge all your agents share. It is a
4
+ folder of Markdown pages inside your Obsidian vault: one page per
5
+ person, project, device or rule. somora writes it from the agents' notes,
6
+ and you can read and edit it like any other note.
6
7
 
7
- ## What it is
8
+ ## What you get
8
9
 
9
- The wiki is somora's long-term memory. While each agent has its own
10
- private **memory inbox** (`~/.somora/agents/<name>/memory/*.md`), the
11
- wiki is **one shared knowledge base** that every agent can read from
12
- and contribute to via the Deep dream phase.
10
+ - **One shared picture.** A fact one agent learned is known to all of
11
+ them, on one page per thing.
12
+ - **Curated, not collected.** The Deep phase turns loose notes into
13
+ pages and removes the notes. One source of truth per topic.
14
+ - **Yours to edit.** Pages are plain Markdown in your vault. somora
15
+ never overwrites a page you changed while it was working on it.
16
+ - **A tidy structure.** A folder says what kind of page lives in it, so
17
+ a thousand pages still fit a dozen folders.
18
+ - **A browser with a graph.** The web client shows the pages, their
19
+ links and what links back.
13
20
 
14
- ```
15
- <obsidian-vault>/
16
- ├── … your normal Obsidian notes (somora reads these as 'vault' source) …
17
- └── <wiki-subfolder>/ ← THIS is the wiki
18
- ├── index.md ← auto-regenerated topology
19
- ├── personen/
20
- │ ├── familie-klein.md
21
- │ ├── max-meier.md
22
- │ └── …
23
- ├── projekte/
24
- │ ├── somora.md
25
- │ ├── internal-cms.md
26
- │ └── …
27
- ├── wissen/
28
- │ ├── runpod.md
29
- │ └── …
30
- ├── infrastruktur/, orte/, … ← the shipped template, see "Folders"
31
- ├── _struktur.md ← the folders and what lives in them
32
- └── logs/
33
- └── YYYY-MM.md ← monthly Deep audit log
34
- ```
35
-
36
- The folder names, section headings and the wording of index and log
37
- follow `wiki.language` (`de`, the default, or `en` — see
38
- [Language](#language)). The tree above is the German set; with `en`
39
- it reads `people/`, `projects/`, `knowledge/`, `places/`.
40
-
41
- ## Why a separate layer
21
+ ## Set it up
42
22
 
43
- Three reasons memory and wiki need to be separate:
23
+ The wiki is off by default. It needs a vault and a subfolder name:
44
24
 
45
- **Multi-agent.** Each agent has its own conversation history and its
46
- own atomic observations. But a fact like "Bea is the user's spouse"
47
- is not agent-private — it's something every agent should know. The
48
- wiki is where shared facts live.
25
+ ```yaml
26
+ # ~/.somora/config.yaml
27
+ obsidian:
28
+ vault: ~/Documents/Vault
29
+ wiki:
30
+ enabled: true
31
+ vaultSubfolder: somora # <vault>/somora/ becomes the wiki
32
+ language: en # de (default) | en
33
+ deep:
34
+ model: <model> # worker model for Deep
35
+ lucid:
36
+ model: <model> # worker model for Lucid
37
+ ```
49
38
 
50
- **Curation.** Memory inboxes accumulate raw observations ("user
51
- mentioned a new family car arrived"). The wiki is the place where
52
- those observations
53
- get integrated into a coherent picture (`personen/familie-klein` is
54
- updated; the source memory entry is deleted). One source of truth per
55
- topic.
39
+ You do not need Obsidian itself. `obsidian.vault` can be any folder of
40
+ Markdown files. Without it there is no wiki.
56
41
 
57
- **You-edit-able.** The wiki is plain markdown in your Obsidian vault.
58
- You can read it in Obsidian, edit it like any note, link it from other
59
- vault content. somora respects your edits (mtime-aware writes — Deep/Lucid
60
- back off if you've changed a page since they last saw it).
42
+ Restart the server. Deep fills the wiki from the agents' notes on its
43
+ next run, or at once when an agent calls `dream_run({phase: 'deep'})`.
61
44
 
62
- ## How wiki pages are written
45
+ ## Where it lives
63
46
 
64
- ### By Deep (Memory → Wiki consolidation)
47
+ ```
48
+ <vault>/
49
+ ├── … your own notes (read as source "vault", never written) …
50
+ └── <wiki-subfolder>/
51
+ ├── index.md ← list of all pages, regenerated by Deep
52
+ ├── _structure.md ← the folders and what lives in them
53
+ ├── people/
54
+ │ └── nina-muster.md
55
+ ├── projects/
56
+ │ └── house-build.md
57
+ ├── knowledge/, places/, … ← see "Folders: kind, not topic"
58
+ └── logs/
59
+ └── YYYY-MM.md ← monthly change log
60
+ ```
65
61
 
66
- Every 12h or via `dream_run({phase: 'deep'})`, Deep iterates each agent's
67
- memory inbox, decides per file whether to skip / promote / merge, and
68
- applies the structured fix verbatim. After Promote/Merge the source
69
- memory file is deleted.
62
+ This is the English set. With `language: de` the names are German:
63
+ `personen/`, `projekte/`, `wissen/`, `orte/`, `_struktur.md`.
70
64
 
71
- See [dream-phases.md](dream-phases.md#phase-deep--memory--wiki) for
72
- mechanics.
65
+ Each agent also has a private memory inbox under
66
+ `~/.somora/agents/<name>/memory/`. The inbox is short-term and belongs
67
+ to one agent. The wiki is long-term and shared.
73
68
 
74
- ### By Lucid + an agent in a `dream_review` loop
69
+ ## Who writes the wiki
75
70
 
76
- Every 7 days or via `dream_run({phase: 'lucid'})`, Lucid scans the
77
- existing wiki for objectively-verifiable issues (contradictions, dead
78
- refs, missing pages, link suggestions) — max 8 findings per run. Each
79
- finding is **informational only** — the actual editing happens in a
80
- conversational `dream_review` loop where you walk the findings with
81
- one of your agents and the agent writes changes via loop-scoped
82
- `wiki_edit` / `wiki_create` / `wiki_delete` / `wiki_move` tools after you OK each
83
- step. Outside the loop, no agent can write to the wiki.
71
+ | Writer | When | What it does |
72
+ |---|---|---|
73
+ | **Deep** | every 12 hours, or `dream_run({phase: 'deep'})` | Reads each agent's inbox. Per note it skips, creates a page, or merges into a page. A used note is deleted. No approval step. |
74
+ | **Lucid** | every 7 days, or `dream_run({phase: 'lucid'})` | Checks the wiki for contradictions, dead links, missing, duplicate, misfiled and oversized pages. Sets plain link suggestions itself. Everything else waits for review. |
75
+ | **An agent in review** | when you start `dream_review` | Walks the Lucid findings with you and changes pages with `wiki_edit`, `wiki_create`, `wiki_delete` and `wiki_move` after you agree to each step. |
76
+ | **You** | any time | Edit a page in Obsidian and save. |
84
77
 
85
- See [dream-phases.md](dream-phases.md#phase-lucid--wiki-cleanup) for
86
- the full flow + loop discipline rules.
78
+ Outside a `dream_review` loop no agent can write to the wiki. The four
79
+ `wiki_*` tools only work for the agent that holds the loop.
87
80
 
88
- ### By you (manually in Obsidian)
81
+ Every write checks the file's modification time first. If you changed a
82
+ page after somora read it, the write is dropped and tried again on the
83
+ next run. Your edit is picked up by the file watcher and indexed once,
84
+ for all agents.
89
85
 
90
- The wiki is just markdown. Open Obsidian, edit a page, save. somora's
91
- file-watcher re-indexes the change — once, into the shared vault/wiki
92
- index every agent reads ([memory.md](memory.md#mental-model--memory-inbox)).
93
- Deep and Lucid will respect your edit on next run (mtime check before
94
- writing — they back off on conflict).
86
+ Two guards protect large pages. A merge that would shrink a page to
87
+ less than half is refused (`wiki.deep.mergeShrinkGuard`). A page over
88
+ 50,000 characters takes no more content: Deep files the note as a
89
+ sub-page under it (`wiki.deep.maxPageChars`).
95
90
 
96
91
  ## Page format
97
92
 
98
- Every wiki page is markdown with YAML frontmatter:
99
-
100
93
  ```markdown
101
94
  ---
102
- slug: personen/familie-klein
103
- type: family
95
+ slug: people/nina-muster
96
+ type: person
104
97
  created: 2026-05-08
105
98
  updated: 2026-05-09
106
99
  sources:
107
- - alpha/familie-klein # which agent's memory contributed
108
- - beta/people
100
+ - ada/nina-muster
101
+ - bea/people
109
102
  related:
110
- - wissen/family-cars
111
- - orte/main-house
103
+ - places/main-house
112
104
  ---
113
105
 
114
- # Familie Klein
106
+ # Nina Muster
115
107
 
116
- ## Aktueller Stand
108
+ ## Current state
117
109
 
118
- Familie around Sarah Klein: spouse, sister, father, niece and
119
- two dogs. This page bundles the key people …
110
+ Nina is Karl's sister and lives in the main house …
120
111
 
121
- ## Eigenschaften
112
+ ## Properties
122
113
 
123
- - **Spouse:** Dr. Bea Klein (* 03.02.1984)
124
- - **Sister:** Eva Klein (* 08.12.1973)
125
- - …
114
+ - **Brother:** Karl Muster
126
115
 
127
- ## Zeitleiste
116
+ ## Timeline
128
117
 
129
- - 1941-04-30 — Ada Klein born
130
- - 1973-12-08 — Eva Klein born
131
- - …
118
+ - 2026-05-08: moved into the main house
132
119
 
133
- ## Notizen
120
+ ## Notes
134
121
 
135
- - Querverweise: [[wissen/family-cars]], [[orte/main-house]]
122
+ - See also [[places/main-house]]
136
123
  ```
137
124
 
138
- ### Frontmatter fields
139
-
140
- | Field | Required | Purpose |
125
+ | Field | Required | Meaning |
141
126
  |---|---|---|
142
- | `slug` | yes | Wiki path without `.md`, matches the file's location. Stable identifier. |
143
- | `type` | yes | Loose category (`person`, `projekt`, `konzept`, `ort`, `werkzeug`, …). Deep may invent new types. |
144
- | `created` | yes | ISO date when the page was first created. |
145
- | `updated` | yes | ISO date of last modification. Deep refreshes on every Promote/Merge. |
146
- | `sources` | optional | List of `<agent>/<memory-slug>` strings — which agent inboxes contributed content. |
147
- | `related` | optional | List of wiki-paths (without `.md`) for cross-references. |
127
+ | `slug` | yes | Path inside the wiki without `.md`. Matches the file's location. |
128
+ | `type` | yes | Loose category. Deep prefers `person`, `project`, `concept`, `place`, `tool` (`de`: `person`, `projekt`, `konzept`, `ort`, `werkzeug`) and may use others. |
129
+ | `created` | yes | Date the page was created. |
130
+ | `updated` | yes | Date of the last change. Refreshed on every write. |
131
+ | `sources` | no | `<agent>/<memory-slug>` entries: which inboxes contributed. |
132
+ | `related` | no | Other wiki pages, as paths without `.md`. |
148
133
 
149
- ### Section conventions (soft)
134
+ New pages get four sections. You can add others: a merge keeps the
135
+ structure a page already has.
150
136
 
151
- Deep prefers writing pages with four section headers, named by
152
- `wiki.language`:
153
-
154
- | `de` (default) | `en` | content |
137
+ | `en` | `de` | Content |
155
138
  |---|---|---|
156
- | `## Aktueller Stand` | `## Current state` | prose summary, current state of the topic |
157
- | `## Eigenschaften` | `## Properties` | bullet-list of stable facts |
158
- | `## Zeitleiste` | `## Timeline` | dated entries (additions, changes, milestones) |
159
- | `## Notizen` | `## Notes` | miscellaneous observations, cross-refs |
160
-
161
- You can introduce other sections; Deep respects existing structure on
162
- Merge. The conventions exist so multi-agent reads have a predictable
163
- shape.
164
-
165
- ### Wikilinks
166
-
167
- Use Obsidian's `[[wiki-path]]` syntax for cross-references between
168
- pages. Example: `Bea ist die [[personen/familie-klein|Ehefrau]]`.
169
-
170
- Wikilinks are indexed as plain text (the brackets are tokenized away),
171
- so a search for `garten` finds pages mentioning `[[orte/garten]]`. They
172
- are NOT followed transitively — `memory_search` doesn't walk graph
173
- edges. The agent reads the wikilink in a hit and decides whether to
174
- fetch the referenced page via `memory_get`.
175
-
176
- ## index.md
177
-
178
- Auto-regenerated after every Deep run. Contains:
179
-
180
- - Header with last-update timestamp
181
- - Sections per subfolder (`## Personen`, `## Projekte`, … — the
182
- capitalised folder names)
183
- - One bullet per page with the slug + first-line description
184
- - `## Letzte Updates` (`## Recent updates` with `wiki.language: en`) —
185
- last 10 Promote/Merge entries from the current run
186
-
187
- ```markdown
188
- # somora-Wiki Index
139
+ | `## Current state` | `## Aktueller Stand` | a short summary in prose |
140
+ | `## Properties` | `## Eigenschaften` | stable facts as a list |
141
+ | `## Timeline` | `## Zeitleiste` | dated entries |
142
+ | `## Notes` | `## Notizen` | everything else, cross-references |
189
143
 
190
- Letztes Update: 2026-05-09 07:45 UTC von Deep
144
+ Link pages with Obsidian's `[[path]]` or `[[path|label]]`. Search does
145
+ not follow links. An agent that sees a link in a hit decides itself
146
+ whether to read that page with `memory_get`.
191
147
 
192
- ## Personen
193
- - [[personen/familie-klein]] — Family around Sarah Klein …
194
- - [[personen/anna]] — Niece, daughter of Eva …
148
+ ## Folders: kind, not topic
195
149
 
196
- ## Projekte
197
- - [[projekte/internal-cms]] — Internal CMS used by …
198
- - [[projekte/release-pipeline]] — CI/CD across multiple repos …
150
+ A folder says what **kind** of page lives in it: a person, a project, a
151
+ device, a rule. It never says what a page is about. Topics live in the
152
+ page text, in links and in `index.md`. Without this rule a wiki grows a
153
+ folder per topic and the same page name in several of them.
199
154
 
200
- ## Wissen
201
- - [[wissen/family-cars]] — Notes on the household vehicle fleet …
155
+ somora ships one folder template per language. Your wiki's real folders
156
+ win: a folder you or Deep created is used as it is, and the template
157
+ only fills gaps. Subfolders go one level deep at most.
202
158
 
203
- ## Letzte Updates
204
- - 2026-05-09: [[personen/familie-klein]] — familie-klein aktualisiert: spouse + birthday
205
- ```
159
+ | `en` | `de` | What lives there |
160
+ |---|---|---|
161
+ | `people/` | `personen/` | one page per human |
162
+ | `companies/` | `unternehmen/` | one page per company, firm, supplier |
163
+ | `projects/` | `projekte/` | one page per bounded undertaking. Dated work reports are timeline entries on it, not pages. |
164
+ | `infrastructure/` | `infrastruktur/` | subfolders `devices`, `hosts`, `services`, `accounts` (`geraete`, `hosts`, `dienste`, `konten`) |
165
+ | `finances/` | `finanzen/` | subfolders `accounts`, `portfolio`, `crypto`, `real-estate`, `loans` (`konten`, `depot`, `krypto`, `immobilien`, `kredite`) |
166
+ | `possessions/` | `besitz/` | things owned that are not investments |
167
+ | `places/` | `orte/` | houses, sites, cities, destinations |
168
+ | `events/` | `ereignisse/` | what happened when |
169
+ | `knowledge/` | `wissen/` | knowledge tied to no person or company. Subfolders `concepts`, `how-tos`, `comparisons` (`konzepte`, `anleitungen`, `vergleiche`) |
170
+ | `rules/` | `regeln/` | directives, preferences, agreements |
171
+ | `agents/` | `agenten/` | agent profiles only, no work reports |
172
+ | `personal/` | `privat/` | interests, hobbies, pets, health, living |
206
173
 
207
- The index is the **topology header** Lucid and REM see — they know what
208
- subfolders exist and what slugs are taken without loading every page
209
- body.
174
+ ### The structure file
210
175
 
211
- ## Folders: kind, not topic
176
+ `_structure.md` (`_struktur.md` with `de`) in the wiki root holds one
177
+ table row per folder: its purpose, who described it (`template`, `deep`
178
+ or `user`) and since when. Deep writes it after a run that created a
179
+ folder or met an undescribed one.
212
180
 
213
- A folder says what **kind** of page lives in it — a person, a project,
214
- a device, a rule — never what a page is about. Topics live in the page
215
- body, in its `[[links]]` and in `index.md`. Kept this way, a wiki with
216
- a thousand pages still has a dozen folders; without the rule, five
217
- months of Deep runs produced 40 folders, a 300-page `wissen/` catch-all
218
- and the same page name living in several folders at once.
181
+ Edit the sentences in Obsidian like any page. Your wording and the
182
+ template's are never overwritten. The file is not a wiki page: the
183
+ index and the search skip it.
219
184
 
220
- somora ships one folder template per wiki language. Deep proposes it,
221
- your wiki's real folders win: a folder you or Deep created is listed as
222
- it is, the template only fills the gaps.
185
+ ### How Deep files a page
223
186
 
224
- | `de` | `en` | What lives there |
225
- |---|---|---|
226
- | `personen/` | `people/` | one page per human |
227
- | `unternehmen/` | `companies/` | one page per company, firm, supplier |
228
- | `projekte/` | `projects/` | one page per bounded undertaking; dated work reports are timeline entries on it, not pages |
229
- | `infrastruktur/` | `infrastructure/` | devices, hosts, services, provider accounts — subfolders `geraete/hosts/dienste/konten` (`devices/hosts/services/accounts`) |
230
- | `finanzen/` | `finances/` | accounts, portfolio, crypto, real estate as investment, loans — one subfolder per kind |
231
- | `besitz/` | `possessions/` | things owned that are not investments |
232
- | `orte/` | `places/` | houses, sites, cities, destinations |
233
- | `ereignisse/` | `events/` | what happened when |
234
- | `wissen/` | `knowledge/` | subject knowledge tied to no person or company — `konzepte/anleitungen/vergleiche` (`concepts/how-tos/comparisons`) |
235
- | `regeln/` | `rules/` | directives, preferences, agreements |
236
- | `agenten/` | `agents/` | agent profiles only, no work reports |
237
- | `privat/` | `personal/` | interests, hobbies, pets, health, living |
238
-
239
- At most one level of subfolders. The template with its rationale per
240
- folder lives in `src/wiki/taxonomy.ts`; adding a language means adding
241
- an entry there.
187
+ On every run Deep sees a map of the wiki: every existing folder with
188
+ its purpose and page count, the template folders that do not exist yet,
189
+ and the rules. Then:
190
+
191
+ - **A new page goes into a described folder.** A folder nobody has
192
+ described shows as "(no description yet)" and is not used until
193
+ someone describes it.
194
+ - **A new folder needs a purpose.** Deep may create one only when no
195
+ kind fits, with one sentence on what lives there. The sentence goes
196
+ into the structure file. A folder without a purpose, or deeper than
197
+ one subfolder, is refused and the note waits for the next run.
198
+ - **No twins.** The page name is checked against the whole wiki. If a
199
+ page of that name exists in another folder, Deep merges into it.
200
+ Names that already exist in several folders are listed in the
201
+ structure file.
202
+ - **Details go to their entity.** A note named `acme-capital-reserve`
203
+ while `companies/acme` exists is usually a detail of acme. Deep is
204
+ asked again with that page in full and merges, unless it insists the
205
+ note is a thing of its own.
206
+
207
+ ## The index page
208
+
209
+ Deep regenerates `index.md` after every run. It has one section per top
210
+ folder, one line per page with a short description, and the last 10
211
+ changes of that run. Pages in the wiki root are listed under `Other`
212
+ (`Sonstiges`).
242
213
 
243
- ### The structure file
214
+ ```markdown
215
+ # somora wiki index
244
216
 
245
- `_struktur.md` (`_structure.md` with `en`) in the wiki root is the
246
- wiki's own memory of what its folders mean: one row per folder with
247
- its purpose, who described it (`template`, `deep`, `user`) and since
248
- when. Deep writes it after a run in which a folder was created or
249
- found undescribed; you edit the sentences in Obsidian like any page —
250
- a person's wording is never overwritten. Folders on disk nobody has
251
- described yet appear as "(no description yet)" until you or the
252
- migration fill them in. The file is not a wiki page: the index and the
253
- memory search skip it.
217
+ Last update: 2026-05-09 07:45 UTC by Deep
254
218
 
255
- ### How Deep files a page
219
+ ## People
220
+ - [[people/nina-muster]] — Karl's sister, lives in the main house …
256
221
 
257
- On every run Deep is shown the **wiki map**: every folder that exists
258
- with its purpose and page count, then the template folders that do not
259
- exist yet, then the rules. It files a new page into one of the
260
- described ones — a grown folder nobody has described is not a home
261
- until someone describes it. Only when no kind fits may it create a folder, and then it has to say in one
262
- sentence what kind of page lives there — that sentence lands in the
263
- structure file and in every later map. A new folder without a purpose,
264
- or one deeper than a subfolder, is refused and the memory note waits
265
- for the next run.
266
-
267
- Before a page is created, its name is checked against the **whole**
268
- wiki, not only the exact path: when a page with that name already
269
- exists in another folder, Deep merges into it instead of creating a
270
- twin. Names that already exist in several folders are noted in the
271
- structure file for the migration.
272
-
273
- A page whose name extends an entity page's name — a note filed as
274
- `acme-kapitalruecklage` while `unternehmen/acme` exists — is
275
- usually a detail of that entity: Deep is asked again with the entity
276
- page in full and merges the note into it, unless it insists the page
277
- is a thing of its own.
278
-
279
- `wiki.defaultSubdirs` from earlier versions is still read, but only
280
- shapes the example slugs in the prompts; the template above replaces
281
- the list.
282
-
283
- ### Migrating a grown wiki
284
-
285
- A wiki that grew before the template keeps working as it is: the map
286
- only changes where **new** pages go. Moving the existing pages onto
287
- the template is a separate, deliberate process that nothing starts by
288
- itself — you trigger it, you read what it would do, you approve it in
289
- groups, and it takes a full copy of the wiki before it moves a file.
290
- Four steps, from the shell on the somora host — `somora wiki migrate`
291
- walks you through them, and each is also a subcommand with flags so a
292
- script, or an agent that read this page, can drive it — or over HTTP
293
- ([api.md](api.md#post-wikimigrationplan)), which is what the command
294
- calls:
222
+ ## Projects
223
+ - [[projects/house-build]] — Extension of the main house …
295
224
 
296
- ```
297
- somora wiki migrate guided: plan → judge → approve → dry run → run
298
- somora wiki migrate plan step 1, prints the plan id
299
- somora wiki migrate judge <id> step 2, waits for the model, lists the groups
300
- somora wiki migrate status <id> the groups and what is approved
301
- somora wiki migrate approve <id> --action move --action fold --twins
302
- somora wiki migrate approve <id> --group fold:projekte/somora --dismiss
303
- somora wiki migrate dry-run <id> step 4a, writes dry-run.md, touches nothing
304
- somora wiki migrate run <id> --confirm "move my wiki"
305
- somora wiki migrate undo <id> the backup back over the wiki (the current
306
- wiki is moved aside, nothing is deleted)
307
- somora wiki migrate relink <id> point links and related: at the moved pages
308
- again (runs before .07 missed related:)
225
+ ## Recent updates
226
+ - 2026-05-09: [[people/nina-muster]] — nina-muster updated: address
309
227
  ```
310
228
 
311
- The words "move my wiki" are the one thing an agent must not supply on
312
- its own: it may plan, judge, read the groups out and record your
313
- approvals, and it starts the real run only after you said the words.
314
-
315
- 1. **Plan** — `POST /wiki/migration/plan` reads the wiki and writes a
316
- plan under `~/.somora/wiki-migration/<id>/plan.md`: folders a rule
317
- would move (a folder named `aktien` belongs in `finanzen/depot`),
318
- page names that exist in several folders, dated work reports and
319
- the project they seem to belong to. Nothing is touched.
320
- 2. **Judge** — `POST /wiki/migration/refine` has the Lucid model look
321
- at **every** page — with the map and the names of the entity pages
322
- in front of it — and answer per page: keep, move (with a new file
323
- name when the old one is a date, not a thing), fold into an existing
324
- page, or unclear. A rule's proposal is only a proposal; no page
325
- moves on a folder name alone. The answers land in `refined.md`,
326
- grouped by what would happen: "move 12 pages to
327
- infrastruktur/geraete", "fold 30 pages into projekte/realtimevoice".
328
- Still nothing is touched.
329
- 3. **Approve** — `POST /wiki/migration/plans/<id>/approve` marks groups
330
- (or every group of one action, or the same-name unions) approved or
331
- dismissed. What you do not approve stays where it is.
332
- 4. **Execute** — `POST /wiki/migration/plans/<id>/execute`. The default
333
- is a dry run: it walks the approved steps and writes `dry-run.md`,
334
- nothing else. A real run needs `{"dryRun": false, "confirm": "move
335
- my wiki"}` and then, in this order: a full copy of the wiki into
336
- `~/.somora/wiki-migration/<id>/backup-<time>/` (verified by file
337
- count — no copy, no run); the approved moves (file, frontmatter
338
- `slug`); the approved folds — the model writes the entry that
339
- carries the page's substance into the target (a timeline line for a
340
- dated report, a few lines under the fitting heading for a detail),
341
- the original is kept in full under `logs/berichte/` (`logs/reports/`
342
- with `en`) with `merged_into` in its frontmatter — that archive is
343
- left out of the search index, its substance now lives in the target
344
- pages; the approved unions
345
- of same-name pages — the copy the model gave a home survives, the
346
- model writes its merged body, the other copy goes to the same
347
- archive; every `[[link]]` in the wiki pointed at the new places;
348
- empty folders removed; the structure file stamped with the template
349
- version; `index.md` and the monthly log regenerated; the search
350
- index swept. Every step is recorded with its outcome in
351
- `execution-<time>.md`; a failed step never stops the others.
352
-
353
- To undo a run: `somora wiki migrate undo <id>` moves the current wiki
354
- folder aside (`<wiki>.before-undo-<time>`), copies the backup to the
355
- wiki's place and sweeps the search index. The plan and its files stay
356
- under `~/.somora/wiki-migration/` for as long as you keep them.
229
+ The description is the page's `description` field if it has one,
230
+ otherwise its first line of prose, cut at 120 characters.
357
231
 
358
232
  ## How agents read the wiki
359
233
 
360
- Three paths feed a chat turn:
234
+ | Way | What the agent gets |
235
+ |---|---|
236
+ | **Automatic recall** | Wiki sections that fit the message, in the `<memory-context>` block, tagged `[wiki/<path> · score=N.NN]`. A wiki hit counts 1.4 times its score, so curated pages rank ahead of raw notes. |
237
+ | **Overview block** | A map of what the wiki holds, in the system prompt. |
238
+ | **Tools** | `memory_search` to search, `memory_get('wiki/<path>')` to read a whole page, `memory_list` with `source: "wiki"` to browse a folder. |
361
239
 
362
- 1. **Auto-injection** runs hybrid search (vector + BM25) across all three
363
- memory layers. With wiki enabled, hits from `source: 'wiki'` get a
364
- 1.4× boost (configurable) so curated wiki pages outrank noisier
365
- memory chunks. Auto-injected wiki content shows up as
366
- `[wiki/<path> · score=N.NN]` in the `<memory-context>` block.
240
+ A reference is `wiki/` plus the slug: `wiki/people/nina-muster`.
367
241
 
368
- 2. **Wiki overview block** puts a shortened `index.md` into the system
369
- prompt — so the agent sees the wiki topology even when no specific
370
- page matches, and can decide "is there a wiki page I should fetch?"
371
- It is built once, on a session's first turn, and then frozen for the
372
- life of that session (see [Overview block](#overview-block)).
242
+ ## Overview block
373
243
 
374
- 3. **Explicit tool calls** — `memory_search` or `memory_get` with a
375
- `wiki/<path>` reference. Agents fetch full pages on demand.
244
+ The overview tells the agent which topics the wiki holds, so it knows
245
+ what is worth searching for. It carries page names only. Content comes
246
+ from recall and `memory_get`.
376
247
 
377
- Wiki paths in references look like `wiki/personen/familie-klein` — the
378
- `wiki/` prefix is the source-tag, the rest is the slug.
248
+ It sits in the system prompt and is frozen for the session: it is built
249
+ on the session's first turn and stays the same after that. A block in
250
+ front of the whole conversation must not change, or the provider's
251
+ prompt cache is lost on every Deep run.
379
252
 
380
- ### Overview block
253
+ Recall is not frozen. Search always uses the live index. To get a fresh
254
+ map, start a new session or `/reset` the current one.
381
255
 
382
- The overview answers one question: *what topics does the wiki hold?*
383
- Content comes from search and `memory_get`, never from here.
256
+ `index.md` rarely fits the budget of `wiki.search.overviewMaxChars`.
257
+ somora then shortens it in stages. Every stage covers the whole wiki:
258
+
259
+ | Stage | Content | Used when |
260
+ |---|---|---|
261
+ | 1 | `index.md` as it is | it fits the budget |
262
+ | 2 | sections, pages, descriptions cut to 100 characters | small wiki |
263
+ | 3 | sections and bare page links | medium wiki |
264
+ | 4 | section names with page counts | large wiki |
384
265
 
385
- It lives in the **system prompt**, not in the per-turn memory block. The
386
- content is identical on every turn, so putting it in the cached prefix
387
- costs it once per session instead of once per turn — and on the
388
- `openai-compatible` engine, which rebuilds the whole conversation from
389
- the transcript, once instead of once *per turn of history*.
266
+ Stage 4 says `- Projects (60)` and does not list some of the pages. A
267
+ partial list looks complete and stops the agent from searching. With
268
+ the default of 4000 characters, page names stay visible up to roughly
269
+ 120 pages.
390
270
 
391
- It is also **frozen for the session**. Deep rewrites `index.md` every
392
- ~12 h; re-reading it mid-session would shift a block that sits in front
393
- of the entire conversation and invalidate the provider's prefix cache.
394
- A session therefore keeps the wiki map it started with. Recall stays
395
- current regardless — auto-injection and `memory_search` always hit the
396
- live index. To pick up a rewritten map, start a new session or `/reset`
397
- the current one; both re-read `index.md` on the next turn.
271
+ > **Tip:** Raise `overviewMaxChars` to keep page names visible on a
272
+ > larger wiki. The cost is a bigger system prompt, paid once per
273
+ > session.
398
274
 
399
- `index.md` rarely fits the budget, so it degrades through four stages.
400
- Each one describes the **whole** wiki; they differ in resolution:
275
+ ## Language
401
276
 
402
- | Stage | Content | Used when |
403
- |---|---|---|
404
- | 1 | `index.md` verbatim | fits `overviewMaxChars` |
405
- | 2 | sections + pages + clipped descriptions | small wiki |
406
- | 3 | sections + bare page links | medium wiki |
407
- | 4 | section names + page counts | large wiki |
277
+ `wiki.language` sets what the wiki's scaffolding is called and which
278
+ language Deep writes in:
408
279
 
409
- Stage 4 deliberately reports `- Projekte (60)` rather than listing 30 of
410
- the 258 pages. A partial page list reads as complete and stops the agent
411
- from searching; a section with a count tells it what to search *for*.
280
+ - the section headings and `type` values of new pages
281
+ - the folder template and the name of the structure file
282
+ - the wording of `index.md` and of the monthly log
283
+ - the examples in the Deep and Lucid prompts
284
+ - the language of titles, headings and prose that Deep writes
412
285
 
413
- Raise `overviewMaxChars` to keep page names visible on a larger wiki —
414
- the cost is a bigger constant prefix, paid once per session.
286
+ `de` is the default. Switching later changes new scaffolding only.
287
+ Existing pages are not translated, and a merge keeps the headings a
288
+ page has. Names and terms are quoted as they appear in the note,
289
+ whatever the language. Notes and search are not affected.
415
290
 
416
291
  ## Web explorer
417
292
 
418
- The web client has a read-only wiki browser behind the **wiki** tile in
419
- the app dock. Three columns:
293
+ The web client has a read-only wiki window behind the **wiki** tile in
294
+ the dock. The tile appears when the wiki is enabled. It carries a badge
295
+ while Lucid findings wait for review.
296
+
297
+ | Column | What it shows |
298
+ |---|---|
299
+ | **Tree** | Folders and pages, a filter box, a re-scan button and the page count. |
300
+ | **Page** | The rendered page. `[[links]]` open inside the window. |
301
+ | **Graph** | The link graph, then the page's backlinks and its broken links. |
302
+
303
+ A link that matches no page is shown as broken. Links resolve like in
304
+ Obsidian: exact path, then path ignoring case, then a page name that is
305
+ unique in the wiki. A name that fits several pages stays unresolved.
306
+
307
+ The graph has two views. **This page** shows the page, what it links
308
+ to, what links to it and the links among those. **Whole wiki** shows
309
+ all pages, limited to the 400 best connected. `related` entries count
310
+ as links. `index.md` is left out because it links to everything.
311
+
312
+ Scroll to zoom, drag to pan, click a node to open the page. The expand
313
+ button gives the graph the whole window.
314
+
315
+ Edits made in Obsidian show up within about 10 seconds. The re-scan
316
+ button skips the wait. There is no editor on purpose: an editor in the
317
+ browser would race Deep and Lucid.
318
+
319
+ ## Migrating a grown wiki
320
+
321
+ A wiki that grew without the template keeps working. The map only
322
+ decides where **new** pages go. Moving existing pages onto the template
323
+ is a separate process that only you start. You approve it in groups,
324
+ and it copies the whole wiki before it moves a file.
325
+
326
+ Run `somora wiki migrate` on the somora host. It walks you through four
327
+ steps. Each step is also a subcommand and a route, so a script or an
328
+ agent can drive it. See [Commands](#commands) and [Routes](#routes).
329
+
330
+ > **Warning:** A real run needs the words "move my wiki" from you. An
331
+ > agent may plan, judge, read the groups to you and record your
332
+ > approvals. It must not supply those words on its own.
333
+
334
+ 1. **Plan.** Reads the wiki and writes `plan.md`: folders a rule would
335
+ move (a folder named `stocks` belongs in `finances/portfolio`), page
336
+ names that exist in several folders, and dated work reports with the
337
+ project they seem to belong to. Nothing is touched.
338
+ 2. **Judge.** The Lucid model looks at every page and answers: keep,
339
+ move, fold into an existing page, or unclear. No page moves on a
340
+ folder name alone. The answers land in `refined.md`, grouped by what
341
+ would happen: "move 12 pages to infrastructure/devices". Nothing is
342
+ touched.
343
+ 3. **Approve.** You approve or dismiss groups, all groups of one
344
+ action, or the unions of same-name pages. What you do not approve
345
+ stays where it is.
346
+ 4. **Execute.** The default is a dry run that writes `dry-run.md` and
347
+ nothing else. The real run does the steps below.
348
+
349
+ A real run, in this order:
350
+
351
+ | Step | What happens |
352
+ |---|---|
353
+ | Backup | A full copy of the wiki, checked by file count. No copy, no run. |
354
+ | Moves | The file moves and its `slug` follows. |
355
+ | Folds | The model writes the page's substance into the target: a timeline line for a dated report, a few lines under the fitting heading for a detail. The original is kept in `logs/reports/` (`logs/berichte/`) with `merged_into` in its frontmatter. This archive is not searched. |
356
+ | Unions | Of two same-name pages one survives with a merged text. The other goes to the same archive. |
357
+ | Links | Every `[[link]]` and `related` entry is pointed at the new places. |
358
+ | Cleanup | Empty folders are removed. The structure file, `index.md` and the monthly log are updated. The search index is swept. |
359
+
360
+ Every step is recorded with its outcome in `execution-<time>.md`. A
361
+ failed step does not stop the others.
362
+
363
+ All files of a plan live in `~/.somora/wiki-migration/<id>/`, the backup
364
+ in `backup-<time>/` below it. They stay until you delete them.
365
+
366
+ To undo a run, use `somora wiki migrate undo <id>`. It moves the current
367
+ wiki aside to `<wiki>.before-undo-<time>`, copies the backup back and
368
+ sweeps the search index. Nothing is deleted.
369
+
370
+ ## Keeping an agent out
371
+
372
+ Every agent's inbox feeds the wiki by default. To keep one out, set
373
+ this in its `agent.yaml`:
420
374
 
421
- ```
422
- ┌──────────┬────────────────────────┬───────────────┐
423
- │ tree │ # somora Voice/TTS │ graph │
424
- │ wissen/ │ │ o │
425
- │ konzepte/│ … │ / \ │
426
- │ projekte/│ [[somora]] [[voice]] │ o o │
427
- │ personen/│ │ backlinks: │
428
- │ bugs/ │ │ · projekte/x │
429
- └──────────┴────────────────────────┴───────────────┘
375
+ ```yaml
376
+ rem:
377
+ participate_in_wiki: false # REM still runs, Deep skips this inbox
430
378
  ```
431
379
 
432
- `[[wikilinks]]` are clickable and navigate inside the window. Targets
433
- that resolve to no page render as **broken** instead of vanishing — a
434
- wiki with gaps should look like one. Resolution follows Obsidian's
435
- rules, in order: exact slug, case-insensitive slug, then a unique
436
- basename. A basename matching several pages stays unresolved rather
437
- than picking one; a wrong edge reads as a real relationship and is
438
- worse than a missing one.
439
-
440
- The graph toggles between **This page** (the current page, what it links
441
- to, and what links to it — plus the edges among those neighbours) and
442
- **Whole wiki** (every page at once, capped at the 400 most-connected).
443
- Scroll to zoom, drag the background to pan, and the expand button gives
444
- the graph the full window — a dense whole-wiki view only becomes legible
445
- once you can zoom into a corner and read the labels. Clicking a node
446
- opens that page. `index.md` is excluded from both scopes: it links to
447
- every page by construction, so including it turns the graph into a star
448
- around one node and adds hundreds of edges that say nothing about how
449
- the knowledge connects.
450
-
451
- Read-only is deliberate. Deep and Lucid own the wiki files; an editor
452
- in the browser would race them mid-run.
453
-
454
- ### Endpoints
455
-
456
- ```http
457
- GET /wiki/status # { enabled, root? }
458
- GET /wiki/tree # folder tree + page titles
459
- GET /wiki/page?slug=konzepte/voice-tts # body + frontmatter + links
460
- GET /wiki/graph?scope=local&slug=<slug> # neighbourhood
461
- GET /wiki/graph?scope=global # whole wiki
462
- POST /wiki/refresh # drop the cache, re-scan
463
- ```
380
+ A single note stays out with `wiki_promote: false` in its frontmatter.
464
381
 
465
- Pages are addressed by **slug, never by path**. A request can only name
466
- pages the index already found under the wiki root, so `../`, absolute
467
- paths and symlink escapes are rejected by construction rather than by a
468
- filter someone has to keep correct.
382
+ ## Sync and limits
469
383
 
470
- The index caches for 10 seconds, then re-stats the tree and re-parses
471
- only files whose mtime or size moved. Edits made in Obsidian appear
472
- within that window; the refresh button skips it.
384
+ - **Sync is yours.** The wiki is part of your vault. Use the sync you
385
+ already use for it. somora runs on one host.
386
+ - **Do not sync the inboxes.** Deep empties them. Synced to a second
387
+ machine, a note one side just changed could be consumed by the other.
388
+ - **Your vault stays yours.** somora reads the vault outside the wiki
389
+ folder and never writes there. Deep does not turn vault notes into
390
+ wiki pages.
391
+ - **No chat logs.** Deep skips notes that are only of the day: task
392
+ lists, scratchpads, daily logs.
393
+ - **Splitting a page is manual.** Lucid can propose moving or uniting
394
+ pages. To split one page in two, edit it in Obsidian.
473
395
 
474
- ## Configuration
396
+ ## Settings
397
+
398
+ All settings live in `config.yaml`. The values shown are the defaults.
399
+ Keys marked as comments have no default.
475
400
 
476
401
  ```yaml
477
- # ~/.somora/config.yaml
402
+ obsidian:
403
+ # vault: ~/Documents/Vault
478
404
  wiki:
479
- enabled: true # master toggle
480
- vaultSubfolder: somora # <vault>/somora/ becomes the wiki
481
- language: de # de | en — see "Language" below
482
-
405
+ enabled: false
406
+ vaultSubfolder: somora
407
+ language: de
408
+ # defaultSubdirs: [people, projects]
483
409
  deep:
484
410
  enabled: true
485
411
  intervalHours: 12
486
- model: opus
487
-
412
+ # model: <model>
413
+ # fallback: [<model>]
414
+ # thinking: medium
415
+ mergeShrinkGuard:
416
+ enabled: true
417
+ minRatio: 0.5
418
+ minExistingBytes: 2000
419
+ skipCacheDays: 30
420
+ maxPageChars: 50000
488
421
  lucid:
489
422
  enabled: true
490
423
  intervalDays: 7
491
- model: opus
492
- requireApproval: true
493
- maxCallsPerTurn: 3 # wiki_* calls per turn in a review loop
494
-
424
+ # model: <model>
425
+ # fallback: [<model>]
426
+ # thinking: medium
427
+ maxCallsPerTurn: 3
428
+ batchChars: 100000
429
+ oversizedChars: 50000
430
+ maxFindings: 12
431
+ autoLinks: true
432
+ autoLinksPerRun: 30
433
+ seenDays: 90
495
434
  search:
496
- boostWiki: 1.4 # search-rank multiplier per source
435
+ boostWiki: 1.4
497
436
  boostMemory: 0.85
498
437
  boostVault: 0.65
499
- overviewMaxChars: 4000 # overview-block budget (see above)
500
- overviewTopNSlugs: 30 # max sections in the stage-4 view
501
-
502
- obsidian:
503
- vault: /path/to/your/vault
504
- ```
505
-
506
- `obsidian.vault` is required for the wiki to work — the wiki is a
507
- subfolder of your Obsidian vault. If you don't use Obsidian, you can
508
- still point `vault` at any directory; somora doesn't require Obsidian
509
- itself, just the markdown-vault layout.
510
-
511
- ## Language
512
-
513
- `wiki.language` decides what the wiki's scaffolding is called and
514
- which language Deep writes page prose in. It covers:
515
-
516
- - the section headings of new pages (table above),
517
- - the `type:` values Deep picks (`person / projekt / konzept / ort /
518
- werkzeug` vs `person / project / concept / place / tool`),
519
- - the folder template ("Folders" above) and the examples in the Deep
520
- and Lucid prompts and the `wiki_*` tool descriptions,
521
- - the wording of `index.md` (`Letztes Update … von Deep` / `Sonstiges`
522
- / `Letzte Updates` vs `Last update … by Deep` / `Other` / `Recent
523
- updates`) and of the monthly log (`# Wiki-Log Mai 2026` vs `# Wiki
524
- log May 2026`, promotion lines),
525
- - the instruction to the Deep worker to write titles, headings and
526
- prose in that language.
527
-
528
- `de` is the default; an installation that never sets the key keeps
529
- producing pages that match its existing ones. Set `en` for an English
530
- wiki. Switching later changes only new scaffolding: Merge keeps the
531
- headings a page already has, existing pages are not translated, and
532
- memory notes and search are language-neutral and unaffected. Names and
533
- terms are quoted as they appear in the memory, whatever the wiki
534
- language.
535
-
536
- ## Multi-agent participation
537
-
538
- By default, every agent's memory inbox feeds the wiki via Deep. Opt
539
- individual agents OUT in their `agent.yaml`:
540
-
541
- ```yaml
542
- rem:
543
- enabled: true
544
- participate_in_wiki: false # REM still runs; Deep won't see this agent's inbox
438
+ overviewMaxChars: 4000
439
+ overviewTopNSlugs: 30
545
440
  ```
546
441
 
547
- Useful for scratch agents, sandbox personas, or anything you don't want
548
- contributing to shared knowledge.
549
-
550
- ## Sync across machines
551
-
552
- The wiki is plain markdown in your Obsidian vault. Use whatever sync
553
- mechanism you already use for Obsidian — iCloud, Syncthing, git, etc.
554
- somora is single-host; the wiki sync is your responsibility.
555
-
556
- Memory inboxes (`~/.somora/agents/<name>/memory/`) are intentionally
557
- NOT designed for sync. They're ephemeral inboxes that get drained by
558
- Deep — sync them and you risk Deep on machine A consuming a memory
559
- file that machine B has just modified.
560
-
561
- ## What the wiki is not
562
-
563
- **Not your raw notes.** Your Obsidian vault outside the wiki subfolder
564
- is yours alone. somora reads it (auto-injection sees `source: 'vault'`
565
- hits) but never writes to it. Deep won't promote vault content into the
566
- wiki.
567
-
568
- **Not a chat log.** Daily-log-shaped memory files are routinely skipped
569
- by Deep ("transient task list, scratchpad, or daily log"). The wiki
570
- captures stable knowledge, not session transcripts.
571
-
572
- **Not auto-fixed beyond Deep + Lucid.** Lucid surfaces objective
573
- issues; you walk them with an agent in a `dream_review` loop and the
574
- agent writes the fixes after you OK each step. If you want bigger
575
- restructuring (split a page in two, move between subfolders), do it
576
- manually in Obsidian — Lucid intentionally stays out of structural
577
- changes.
442
+ | Setting | Meaning |
443
+ |---|---|
444
+ | `obsidian.vault` | Path to the vault. Required for the wiki. |
445
+ | `wiki.enabled` | Switches the wiki on. |
446
+ | `wiki.vaultSubfolder` | Folder inside the vault that is the wiki. |
447
+ | `wiki.language` | `de` or `en`. See [Language](#language). |
448
+ | `wiki.defaultSubdirs` | Still read, but only shapes the example paths in the prompts. The folder template decides where pages go. |
449
+ | `wiki.deep.enabled` | Switches the scheduled Deep run on. |
450
+ | `wiki.deep.intervalHours` | Hours between Deep runs. |
451
+ | `wiki.deep.model` | Worker model for Deep: an alias or `<provider>/<model>`. |
452
+ | `wiki.deep.fallback` | Backup model or list of models, tried in order when `model` cannot be reached. Best on another provider. |
453
+ | `wiki.deep.thinking` | `off`, `low`, `medium` or `high`. Used when the model can reason. Unset means the engine's default. |
454
+ | `wiki.deep.mergeShrinkGuard.enabled` | Refuse a merge that shrinks a page too much. |
455
+ | `wiki.deep.mergeShrinkGuard.minRatio` | The merge is refused when the new text is smaller than this share of the old one. |
456
+ | `wiki.deep.mergeShrinkGuard.minExistingBytes` | Pages smaller than this are never guarded. |
457
+ | `wiki.deep.skipCacheDays` | An unchanged note that was skipped is looked at again after this many days. `0` means only when it changes. |
458
+ | `wiki.deep.maxPageChars` | A page over this size takes no more merges. The note becomes a sub-page. |
459
+ | `wiki.lucid.enabled` | Switches the scheduled Lucid run on. |
460
+ | `wiki.lucid.intervalDays` | Days between Lucid runs. |
461
+ | `wiki.lucid.model` | Worker model for Lucid. Also judges a migration. If unset, the migration uses `wiki.deep.model`. |
462
+ | `wiki.lucid.fallback` | As `wiki.deep.fallback`. |
463
+ | `wiki.lucid.thinking` | As `wiki.deep.thinking`. |
464
+ | `wiki.lucid.maxCallsPerTurn` | Most `wiki_*` calls per turn in a review loop. Resets with every message of yours. |
465
+ | `wiki.lucid.batchChars` | Most page text one Lucid call carries. A larger page travels alone. |
466
+ | `wiki.lucid.oversizedChars` | Pages over this size are reported as oversized. |
467
+ | `wiki.lucid.maxFindings` | Most findings a run keeps for review. Link suggestions fill what is left after the weightier kinds. |
468
+ | `wiki.lucid.autoLinks` | Lucid sets link suggestions itself: the first plain mention becomes a `[[link]]`. |
469
+ | `wiki.lucid.autoLinksPerRun` | Most links set per run. |
470
+ | `wiki.lucid.seenDays` | A finding you dismissed is not filed again for this many days. |
471
+ | `wiki.search.boostWiki` | Weight of a wiki hit in recall. |
472
+ | `wiki.search.boostMemory` | Weight of a memory hit. |
473
+ | `wiki.search.boostVault` | Weight of a vault hit. |
474
+ | `wiki.search.overviewMaxChars` | Size budget of the overview block. |
475
+ | `wiki.search.overviewTopNSlugs` | Most sections in stage 4 of the overview. The largest ones win. |
476
+
477
+ ## Commands
478
+
479
+ The commands talk to the running server. They never touch the wiki
480
+ themselves.
481
+
482
+ | Command | What it does |
483
+ |---|---|
484
+ | `somora wiki migrate` | Guided: plan, judge, approve, dry run, run. |
485
+ | `somora wiki migrate plan` | Step 1. Prints the plan id. |
486
+ | `somora wiki migrate judge <id>` | Step 2. Waits for the model and lists the groups. |
487
+ | `somora wiki migrate status <id>` | The groups and what is approved. |
488
+ | `somora wiki migrate approve <id> --action move --action fold --twins` | Approves all groups of an action (`move`, `fold`, `unclear`) and all same-name unions. |
489
+ | `somora wiki migrate approve <id> --group fold:projects/orbit --dismiss` | Dismisses one group. A group key is `move:<folder>` or `fold:<page>`. |
490
+ | `somora wiki migrate dry-run <id>` | Writes `dry-run.md`, touches nothing. |
491
+ | `somora wiki migrate run <id> --confirm "move my wiki"` | The real run, with backup first. |
492
+ | `somora wiki migrate undo <id>` | Puts the backup back. Asks for "yes" unless you pass `--yes`. |
493
+ | `somora wiki migrate relink <id>` | A second pass over links and `related` entries with the renames of a finished run. |
494
+
495
+ `--url <server>` picks the server. The default comes from `SOMORA_URL`
496
+ or from the config.
497
+
498
+ ## Routes
499
+
500
+ When the wiki is not enabled, the explorer routes answer 503 and the
501
+ migration routes 400. The request and response fields are in the
502
+ [API reference](api.md).
503
+
504
+ | Route | What it does |
505
+ |---|---|
506
+ | `GET /wiki/status` | `{ enabled, root? }` |
507
+ | `GET /wiki/tree` | Folder tree with page titles. |
508
+ | `GET /wiki/page?slug=<slug>` | Text, frontmatter, links, backlinks, broken links. |
509
+ | `GET /wiki/graph?scope=local&slug=<slug>` | The page's neighbourhood. |
510
+ | `GET /wiki/graph?scope=global` | The whole wiki. |
511
+ | `POST /wiki/refresh` | Drops the cache and scans again. |
512
+ | `POST /wiki/migration/plan` | Step 1. Returns the plan id. |
513
+ | `POST /wiki/migration/refine` | Step 2 for `{id}`. Runs in the background. |
514
+ | `GET /wiki/migration/plans/:id` | Plan, progress, groups, approvals. |
515
+ | `POST /wiki/migration/plans/:id/approve` | Step 3: `groups`, `action` or `twins` with `status`. |
516
+ | `POST /wiki/migration/plans/:id/execute` | Step 4. Dry run by default. A real run needs `{"dryRun": false, "confirm": "move my wiki"}`. |
517
+ | `POST /wiki/migration/plans/:id/relink` | Second pass over links and `related`. |
518
+ | `POST /wiki/migration/reindex` | Sweeps the search index now. |
519
+
520
+ Pages are addressed by slug, never by file path. A request can only
521
+ name a page the server already found under the wiki root, so `../` and
522
+ absolute paths lead nowhere.
523
+
524
+ ## When something is off
525
+
526
+ | Symptom | What to check |
527
+ |---|---|
528
+ | No wiki tile, routes answer 503 | `GET /wiki/status` shows `enabled: false`. Set both `wiki.enabled` and `obsidian.vault`, then restart. |
529
+ | The agent does not know a new page exists | Its overview is the one from session start. Start a new session or reset. The log line `wiki.overview_failed` means the overview could not be built. |
530
+ | A page you edited was not updated by Deep | Your edit came between its read and its write. The note is tried again on the next run. |
531
+ | A note is never promoted | It was skipped and is looked at again when it changes or after `skipCacheDays`. Check for `wiki_promote: false` and `participate_in_wiki: false`. |
532
+ | Migration says "no model" | Set `wiki.lucid.model` or `wiki.deep.model`. |
578
533
 
579
534
  ## See also
580
535
 
581
- - [dream-phases.md](dream-phases.md) — REM/Deep/Lucid mechanics
582
- - [memory.md](memory.md) — the per-agent memory inbox
583
- - [agents.md](agents.md) — per-agent config including `participate_in_wiki`
536
+ - [Memory](memory.md): the per-agent inbox, recall and search ranking
537
+ - [Dream phases](dream-phases.md): how REM, Deep and Lucid work, and
538
+ the review loop
539
+ - [Agents](agents.md): `agent.yaml`, including `participate_in_wiki`
540
+ - [Web client](web.md): the desktop the wiki window lives in
541
+ - [API](api.md): the wiki and migration routes in full
542
+ - [Cache strategy](cache-strategy.md): why the overview is frozen per
543
+ session