@zerwiz/ymir 0.1.16 → 0.1.18

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 (171) hide show
  1. package/.agents/config/app-repos.yaml +38 -0
  2. package/.claude/settings.json +31 -0
  3. package/.codex/hooks.json +43 -0
  4. package/.cursor/hooks.json +33 -0
  5. package/.pi/extensions/README.md +39 -0
  6. package/.pi/extensions/gna-pi-watch.ts +15 -0
  7. package/.pi/extensions/lib/ro-assistant-layout.ts +96 -0
  8. package/.pi/extensions/lib/ro-operational-user-layout.ts +145 -0
  9. package/.pi/extensions/lib/ro-visibility.ts +99 -0
  10. package/.pi/extensions/lib/ro-working-ship.ts +243 -0
  11. package/.pi/extensions/lib/rodd-operational-input.ts +62 -0
  12. package/.pi/extensions/lib/skuld-branch-dispatch.ts +252 -0
  13. package/.pi/extensions/lib/skuld-branch-model-picker.ts +77 -0
  14. package/.pi/extensions/lib/vordr-sessionstart-supervisor.mjs +48 -0
  15. package/.pi/extensions/ro.ts +11 -0
  16. package/.pi/extensions/skuld-branch-supervision.ts +11 -0
  17. package/.pi/extensions/syn-turnend-guard.ts +11 -0
  18. package/.pi/mcp.json +16 -0
  19. package/.pi/mcp.json.example +11 -0
  20. package/.pi/npm/.gitignore +2 -0
  21. package/.pi/settings.json +8 -0
  22. package/.pi/shared/extensions/gna-pi-watch.ts +750 -0
  23. package/.pi/shared/extensions/herdr-agent-state.ts +257 -0
  24. package/.pi/shared/extensions/open-editor.ts +509 -0
  25. package/.pi/shared/extensions/ro.ts +504 -0
  26. package/.pi/shared/extensions/skuld-branch-supervision.ts +1535 -0
  27. package/.pi/shared/extensions/syn-turnend-guard.ts +683 -0
  28. package/.pi/shared/extensions/todo.ts +133 -0
  29. package/.pi/shared/extensions/ymir-subagents.ts +287 -0
  30. package/.pi/shared/extensions/ymir-well.ts +130 -0
  31. package/CHANGELOG.md +23 -0
  32. package/assets/Ymir.md +4654 -0
  33. package/assets/healer.html +717 -0
  34. package/assets/icon-family/family-sheet.png +0 -0
  35. package/assets/icon-family/hlidskjalf.svg +1 -0
  36. package/assets/icon-family/sessrumnir.svg +1 -0
  37. package/assets/icon-family/smidja.svg +1 -0
  38. package/assets/icon-family/ymir.svg +1 -0
  39. package/assets/mimirswell.html +880 -0
  40. package/assets/mock/README.md +16 -0
  41. package/assets/mock/feeds.ts +175 -0
  42. package/assets/mock/mock.ts +408 -0
  43. package/assets/reference/docs/agent-control.md +122 -0
  44. package/assets/reference/docs/apodex/Appdex_as_Orchestrator_Planner_Reviewer_Assessment.md +176 -0
  45. package/assets/reference/docs/apodex/Final Report(1).md +198 -0
  46. package/assets/reference/docs/apodex/Final Report(2).md +54 -0
  47. package/assets/reference/docs/apodex/Final Report(3).md +40 -0
  48. package/assets/reference/docs/apodex/Final Report(4).md +234 -0
  49. package/assets/reference/docs/apodex/Final Report(5).md +13 -0
  50. package/assets/reference/docs/apodex/Final Report.md +82 -0
  51. package/assets/reference/docs/architecture.md +392 -0
  52. package/assets/reference/docs/arm-pretool-check.md +247 -0
  53. package/assets/reference/docs/calm-mode-feasibility.md +541 -0
  54. package/assets/reference/docs/calm.md +59 -0
  55. package/assets/reference/docs/captain-hold-lifecycle.md +96 -0
  56. package/assets/reference/docs/cd-guard.md +165 -0
  57. package/assets/reference/docs/cmux-backend.md +133 -0
  58. package/assets/reference/docs/codex-app-backend.md +57 -0
  59. package/assets/reference/docs/configuration.md +924 -0
  60. package/assets/reference/docs/documentation-audiences.json +468 -0
  61. package/assets/reference/docs/documentation-audiences.md +28 -0
  62. package/assets/reference/docs/examples/crew-dispatch.json +26 -0
  63. package/assets/reference/docs/examples/process-event-extension/file-signal.mjs +96 -0
  64. package/assets/reference/docs/examples/process-event-extension/firstmate-extension.json +15 -0
  65. package/assets/reference/docs/examples/watched-tools.json +24 -0
  66. package/assets/reference/docs/examples/wedge-alarm +22 -0
  67. package/assets/reference/docs/extension-bindings.md +237 -0
  68. package/assets/reference/docs/fm-test-isolation-proof.json +37 -0
  69. package/assets/reference/docs/fm-test-isolation-proof.md +149 -0
  70. package/assets/reference/docs/fm-test-portable-shards.md +118 -0
  71. package/assets/reference/docs/gitlab-merge-watch.md +275 -0
  72. package/assets/reference/docs/herdr-backend.md +346 -0
  73. package/assets/reference/docs/orca-backend.md +84 -0
  74. package/assets/reference/docs/pi-supervision-branch-poster.svg +125 -0
  75. package/assets/reference/docs/pi-supervision-branch.md +96 -0
  76. package/assets/reference/docs/plans/agentic-engineering-workflow.md +395 -0
  77. package/assets/reference/docs/plans/agentic-factory-implementation-plan.md +615 -0
  78. package/assets/reference/docs/plans/command-factory-enhancement-plan.md +420 -0
  79. package/assets/reference/docs/plans/phase-1-layer3-program-design.md +134 -0
  80. package/assets/reference/docs/plans/phase-2-vertical-slices.md +100 -0
  81. package/assets/reference/docs/plans/phase-3-measurable-goals.md +106 -0
  82. package/assets/reference/docs/plans/phase-4-context-budget.md +106 -0
  83. package/assets/reference/docs/plans/phase-5-pre-mortem-confidence.md +100 -0
  84. package/assets/reference/docs/plans/phase-6-incident-to-agent.md +109 -0
  85. package/assets/reference/docs/remote-secondmates.md +268 -0
  86. package/assets/reference/docs/scripts.md +146 -0
  87. package/assets/reference/docs/sessionstart-nudge.md +115 -0
  88. package/assets/reference/docs/subagent-guard.md +383 -0
  89. package/assets/reference/docs/supervision-protocols/claude.md +27 -0
  90. package/assets/reference/docs/supervision-protocols/codex.md +16 -0
  91. package/assets/reference/docs/supervision-protocols/cursor.md +31 -0
  92. package/assets/reference/docs/supervision-protocols/grok.md +39 -0
  93. package/assets/reference/docs/supervision-protocols/opencode.md +17 -0
  94. package/assets/reference/docs/supervision-protocols/pi.md +33 -0
  95. package/assets/reference/docs/supervision-protocols/unknown.md +13 -0
  96. package/assets/reference/docs/tmux-backend.md +115 -0
  97. package/assets/reference/docs/trace-context.md +117 -0
  98. package/assets/reference/docs/turnend-guard.md +170 -0
  99. package/assets/reference/docs/verification/dispatch-auth.md +204 -0
  100. package/assets/reference/docs/verification/muse.md +221 -0
  101. package/assets/reference/docs/verification/process-event-sources.md +208 -0
  102. package/assets/reference/docs/verification/public-followup.md +119 -0
  103. package/assets/reference/docs/verification/runtime-backends.md +1022 -0
  104. package/assets/reference/docs/verification/stow-memory.md +53 -0
  105. package/assets/reference/docs/verification/supervision.md +534 -0
  106. package/assets/reference/docs/verification/trace-context.md +31 -0
  107. package/assets/reference/docs/voice-relay.md +295 -0
  108. package/assets/reference/docs/watcher-continuity.md +119 -0
  109. package/assets/reference/docs/wedge-alarm.md +39 -0
  110. package/assets/reference/docs/zellij-backend.md +114 -0
  111. package/assets/reference/index.html +1172 -0
  112. package/assets/reference/skills/afk/SKILL.md +241 -0
  113. package/assets/reference/skills/ahoy/SKILL.md +56 -0
  114. package/assets/reference/skills/ask-user-authority/SKILL.md +56 -0
  115. package/assets/reference/skills/bearings/SKILL.md +161 -0
  116. package/assets/reference/skills/bearings/assets/board-template.html +731 -0
  117. package/assets/reference/skills/bootstrap-diagnostics/SKILL.md +68 -0
  118. package/assets/reference/skills/captain-hold-lifecycle/SKILL.md +54 -0
  119. package/assets/reference/skills/decision-hold-lifecycle/SKILL.md +15 -0
  120. package/assets/reference/skills/diagnostic-reasoning/SKILL.md +53 -0
  121. package/assets/reference/skills/firstmate-codexapp/SKILL.md +110 -0
  122. package/assets/reference/skills/firstmate-codexapp/agents/openai.yaml +4 -0
  123. package/assets/reference/skills/firstmate-coding-guidelines/SKILL.md +127 -0
  124. package/assets/reference/skills/firstmate-orca/SKILL.md +92 -0
  125. package/assets/reference/skills/fmx-respond/SKILL.md +283 -0
  126. package/assets/reference/skills/harness-adapters/SKILL.md +95 -0
  127. package/assets/reference/skills/harness-adapters/references/common/control-and-recovery.md +37 -0
  128. package/assets/reference/skills/harness-adapters/references/common/dispatch.md +32 -0
  129. package/assets/reference/skills/harness-adapters/references/common/model-and-effort.md +42 -0
  130. package/assets/reference/skills/harness-adapters/references/common/primary-hooks.md +40 -0
  131. package/assets/reference/skills/harness-adapters/references/harness/claude.md +55 -0
  132. package/assets/reference/skills/harness-adapters/references/harness/codex.md +43 -0
  133. package/assets/reference/skills/harness-adapters/references/harness/cursor.md +75 -0
  134. package/assets/reference/skills/harness-adapters/references/harness/grok.md +69 -0
  135. package/assets/reference/skills/harness-adapters/references/harness/kimi.md +51 -0
  136. package/assets/reference/skills/harness-adapters/references/harness/muse.md +70 -0
  137. package/assets/reference/skills/harness-adapters/references/harness/opencode.md +42 -0
  138. package/assets/reference/skills/harness-adapters/references/harness/pi.md +56 -0
  139. package/assets/reference/skills/process-event-sources/SKILL.md +137 -0
  140. package/assets/reference/skills/project-management/SKILL.md +92 -0
  141. package/assets/reference/skills/quota-array-dispatch/SKILL.md +131 -0
  142. package/assets/reference/skills/secondmate-provisioning/SKILL.md +254 -0
  143. package/assets/reference/skills/stow/SKILL.md +309 -0
  144. package/assets/reference/skills/stuck-crewmate-recovery/SKILL.md +54 -0
  145. package/assets/reference/skills/updatefirstmate/SKILL.md +64 -0
  146. package/assets/skills/README.md +5 -0
  147. package/assets/yggdrasil.html +649 -0
  148. package/assets/ymir-banner-01.png +0 -0
  149. package/assets/ymir-banner-02.png +0 -0
  150. package/assets/ymir-banner-03.png +0 -0
  151. package/assets/ymir-banner-04.png +0 -0
  152. package/assets/ymir-banner-05.png +0 -0
  153. package/assets/ymir-banner-06.png +0 -0
  154. package/assets/ymir-emblem-darksteel.svg +63 -0
  155. package/assets/ymir-emblem-forged.svg +55 -0
  156. package/assets/ymir-emblem-slate.svg +55 -0
  157. package/assets/ymir-mark-algiz-anvil.svg +9 -0
  158. package/assets/ymir-stave.svg +53 -0
  159. package/assets/ymir.html +563 -0
  160. package/bin/ymir-install.sh +6 -1
  161. package/data/learnings.md +33 -0
  162. package/data/local-models.md +34 -0
  163. package/data/operator.md +15 -0
  164. package/data/projects.md +28 -0
  165. package/data/realm.md +1 -0
  166. package/deploy/Containerfile +27 -0
  167. package/deploy/README.md +104 -0
  168. package/deploy/compose/compose.yaml +45 -0
  169. package/deploy/env.example +30 -0
  170. package/deploy/quadlet/ymir.container +57 -0
  171. package/package.json +10 -8
@@ -0,0 +1,1172 @@
1
+
2
+
3
+ GLM-5.3-Flash
4
+
5
+ Share
6
+ # YMIR — Design Document
7
+
8
+ > **Status:** v1.0 · owner: zerwiz · applies to Hlidskjalf (React/Vue), all Norse
9
+ > surfaces, and the houses.
10
+ > Sources: Ymir Rut v2.6 (`docs/ymir-rut.md` Part 3), the mythos (`docs/lore.md`),
11
+ > the UI/UX-is-a-differentiator doctrine (ENTRY-008), and the stack ruling
12
+ > (ENTRY-009/010).
13
+ > Implementation: design tokens live in `midgard/design-system/tokens.css`
14
+ > (consumed by React and Vue apps).
15
+
16
+ ---
17
+
18
+ ## 1. Philosophy — Carved, not skinned
19
+
20
+ Ymir's UI is not decoration bolted onto a system; it is **forged from the same
21
+ allegory the system runs on**. Every pixel should feel as if it were carved from
22
+ the giant's bones, hammered in a Svartalfaheim forge, lit by Bifrost transit
23
+ beams. The design behaves the way the system behaves:
24
+
25
+ - **Forged, not painted** — bevels, chiseled edges, material depth. Nothing
26
+ floats; everything sits.
27
+ - **The well is visible** — memory, telemetry, and audit are first-class surface,
28
+ never hidden behind "settings".
29
+ - **The forge stays hot** — status is instant, truthful, and always on screen.
30
+ - **Quiet strength** — high legibility, low noise. This is an instrument panel
31
+ for a single operator running everything.
32
+
33
+ Design decisions always answer: *"would a dwarf smith build it this way?"*
34
+
35
+ ---
36
+
37
+ ## 2. Brand Identity
38
+
39
+ ### 2.1 Emblem — the Ymir Root Mark
40
+
41
+ The mark combines two glyphs:
42
+
43
+ - **Algiz (ᛉ)** — the rune of protection and the branching *worker stems* of the
44
+ agent tree (also evokes Yggdrasil spreading from the root).
45
+ - **Blacksmith anvil base** — industrial strength, heavy compute, the forge from
46
+ which every artifact is shaped.
47
+
48
+ Construction rules:
49
+ - Dual-layer chiseled bevel: dark iron exterior `#334155`, luminous cyan inner
50
+ edge `#7dd3fc`.
51
+ - One emblem per context; never gradient-bloated, never filled with imagery.
52
+ - On dark obsidian surfaces: cyan-lit variant. On light surfaces: steel variant
53
+ with indigo edge.
54
+ - Favicon = the rune alone, 24–32px, stroke weight 2.
55
+
56
+ ### 2.2 Houses — brands within the brand
57
+
58
+ Each house carries the myth that names it and a **house accent** for seals,
59
+ tags, and portal theming (proposed accents — ENTRY-004 mapping):
60
+
61
+ | House | Name-sake | House accent |
62
+ |---|---|---|
63
+ | Ymir Labs | the giant | cyan `#38bdf8` |
64
+ | Brokk Forge | the bellows-smith | forge amber `#f59e0b` |
65
+ | Runestone Labs (Runir) | the runes | rune crimson `#f43f5e` |
66
+ | Muninn Labs | the raven (memory) | raven violet `#8b5cf6` |
67
+ | Dvalin | the dwarf craftsman | cold steel `#94a3b8` |
68
+ | Utgard Studios | the giant-realm | jötun magenta `#d946ef` |
69
+ | Askr | the first man | ash green `#34d399` |
70
+ | Mannheim | *(reserved)* | slate `#64748b` |
71
+
72
+ House accents are **structural only** — tags, entity headers, chart series —
73
+ never the page chrome.
74
+
75
+ ---
76
+
77
+ ## 3. Design Principles
78
+
79
+ 1. **The giant is the frame** — one body, many realms. One visual system across
80
+ every tenant; a realm is a *view*, not a redesign.
81
+ 2. **Truth over ornament** — telemetry and logs render exactly as they are. No
82
+ fake glow, no invented metrics. Traceability index is a real number on screen.
83
+ 3. **Status is ambient** — NOMINAL / DEGRADED / DOWN is readable at a glance
84
+ from across the room (color + glyph + text, never color alone).
85
+ 4. **The well is a first-class citizen** — recall results, episodes, and timeline
86
+ render inline, not in a hidden drawer.
87
+ 5. **Isolation by default** — realms are visually distinct (borders, subtle
88
+ tint), never commingled. A user must *feel* which realm they're in.
89
+ 6. **Motion explains, never decorates** — transitions trace real data flow
90
+ (task state changes, message hops). ~150–240ms, linear-ish, no bounce.
91
+ 7. **Dense but calm** — keyboard-first, mono for data, generous breathing room
92
+ for narrative text.
93
+
94
+ ---
95
+
96
+ ## 4. Visual Language
97
+
98
+ ### 4.1 Typography
99
+
100
+ | Role | Face | Use |
101
+ |---|---|---|
102
+ | Headings & runes | **Cinzel** | page titles, section headers, the emblem wordmark, runic seals |
103
+ | Code, telemetry, metrics | **JetBrains Mono** | all data: logs, IDs, states, timestamps, task/agent names, CLI |
104
+ | Body & UI | **Inter** | description text, labels, buttons, body of narratives, docs |
105
+
106
+ Scale (reference — fluid via clamp()):
107
+
108
+ | Token | Size / Line-height | Used for |
109
+ |---|---|---|
110
+ | s-mono-s | 12 / 16 | timestamps, badges |
111
+ | s-mono-m | 14 / 20 | telemetry, task IDs |
112
+ | s-mono-l | 18 / 24 | hero metrics (traceability index) |
113
+ | s-cinzel | 28–44 / 1.1 | realm/page titles |
114
+ | s-body | 15 / 22 | descriptions |
115
+ | s-caption | 13 / 18 | secondary notes |
116
+
117
+ Rules: metrics are **always** JetBrains Mono (tabular numerals enabled);
118
+ runes/glyphs are Cinzel; never mix faces mid-line. Title case stays short —
119
+ one lyric line, then the deck explains.
120
+
121
+ ### 4.2 Color system
122
+
123
+ Foundations (light = dom, dark = forge) — **the forge theme is default and canonical**:
124
+
125
+ **Canvas (the forge chamber)**
126
+
127
+ | Token | Value | Role |
128
+ |---|---|---|
129
+ | `--ymir-bg-0` | `#080c14` | deepest canvas, app shell |
130
+ | `--ymir-bg-1` | `#0b101c` | panel surface |
131
+ | `--ymir-bg-2` | `#101726` | elevated surface, cards |
132
+ | `--ymir-bg-3` | `#182334` | hover, wells |
133
+ | light base | `#f4f6fa` | (light theme only, optional) |
134
+
135
+ **Accents (two lights of Bifrost)**
136
+
137
+ | Token | Value | Role |
138
+ |---|---|---|
139
+ | `--ymir-cyan-1` | `#38bdf8` | primary accent, active states, focus ring, links |
140
+ | `--ymir-cyan-2` | `#0ea5e9` | hover/darker accent, gradients |
141
+ | `--ymir-violet-1` | `#818cf8` | realm identity, secondary accent |
142
+ | `--ymir-violet-2` | `#6366f1` | darker violet |
143
+
144
+ **Structure (hammered steel)**
145
+
146
+ | Token | Value | Role |
147
+ |---|---|---|
148
+ | `--ymir-steel-1` | `#334155` | borders, bevel exteriors |
149
+ | `--ymir-steel-2` | `#475569` | stronger lines, dividers |
150
+ | `--ymir-steel-3` | `#94a3b8` | secondary text, muted glyphs |
151
+ | `--ymir-chisel` | `#7dd3fc` | cyan inner bevel edge (emblem, focus) |
152
+
153
+ **Semantics (state of the forge)**
154
+
155
+ | Token | Value | Meaning |
156
+ |---|---|---|
157
+ | `--ymir-ok` | `#34d399` | NOMINAL (emerald) |
158
+ | `--ymir-warn` | `#fbbf24` | DEGRADED (amber) |
159
+ | `--ymir-danger` | `#f87171` | DOWN / sealed (ember red) |
160
+ | `--ymir-info` | `#38bdf8` | transit / neutral-inform |
161
+ | `--ymir-ok-dim` | `rgba(52,211,153,.15)` | background wash of the above three, same pattern for warn/danger/info |
162
+
163
+ **Text on forge**
164
+
165
+ | Token | Value | Role |
166
+ |---|---|---|
167
+ | `--ymir-text-0` | `#e8edf6` | primary text |
168
+ | `--ymir-text-1` | `#b3c0d4` | secondary text |
169
+ | `--ymir-text-2` | `#7b8aa3` | tertiary, disabled |
170
+ | `--ymir-text-3` | `#4b5a73` | placeholder |
171
+
172
+ Contrast: `--ymir-text-0` on `--ymir-bg-1` ≈ 13:1; body 15px meets WCAG AA
173
+ everywhere; never put cyan text on cyan.
174
+
175
+ ### 4.3 Space & grid
176
+
177
+ - Base unit **4px**; 8px rhythm for layout.
178
+ - Panel padding `--ymir-space-4: 16px`; page gutter 24–48.
179
+ - Max content width 1440; density slider for the data views (comfortable ↔ compact).
180
+ - Components: radius `--ymir-radius: 8px` (panels 12px), 1px steel borders,
181
+ inset shadows to sell the bevel: `inset 0 0 0 1px rgba(125,211,252,.12)`.
182
+
183
+ ### 4.4 Iconography & glyphs
184
+
185
+ - **Runecoded, not emoji.** A minimal, hand-drawn-style rune set replaces emoji
186
+ in all UI: 16×16 and 24×24 grid, 2px stroke, chisel bevel on primary.
187
+ - System subsystems each carry one rune-glyph (reuse Algiz-family geometry:
188
+ Bifrost gate, Ratatoskr squirrel, the Well). Map is in `midgard/design-system/icons.md` (TBD) — created from this doc.
189
+ - Status dot: filled rune ring (ok) / half-ring (warn) / broken ring (danger), never color-only.
190
+
191
+ ### 4.5 Surface & texture
192
+
193
+ - Background treatment: **hand-hammered steel** (very subtle noise/specular ~2%),
194
+ and the **crystalline icosahedral grid** for hero/brand areas only (3–5% opacity).
195
+ - Emblem renders with the chisel bevel; body surfaces stay flat — motif stops at
196
+ the chrome, never behind text.
197
+
198
+ ### 4.6 Motion
199
+
200
+ | Context | Pattern | Duration |
201
+ |---|---|---|
202
+ | Task state change | fade + 2px upward drift on the state chip | 180ms |
203
+ | Message hop (Ratatoskr) | light dash along the fleet edge | 220ms |
204
+ | Panel reveal | mask + slight scale 0.99→1 | 160ms |
205
+ | Metric tick | JetBrains Mono numeric roll (monospace, tabular) | 240ms |
206
+ | Loading | screen of the forge (glowing ember + rune), not a spinner wheel | — |
207
+
208
+ Honor `prefers-reduced-motion`: all transforms collapse to fades ≤120ms.
209
+
210
+ ---
211
+
212
+ ## 5. UI System — Hlidskjalf (React/Vue)
213
+
214
+ ### 5.1 App shell
215
+
216
+ - Left rail: emblem + the **7 realm gates** (click = realm switch), collapsed to
217
+ rune-only at <900px.
218
+ - Top bar: current realm chip (house accent + tenant name), global search
219
+ (realm-scoped), traceability index chip (live), user menu.
220
+ - Main stage: modal-free; views are full panels with a persistent **bottom stream**:
221
+ Ratatoskr messages + Runes entries in one mono stream (pausable).
222
+
223
+ Views: **Fleet** (agents/cards) · **Tasks** (A2A lifecycle board) · **Well**
224
+ (memory recall/timeline/observe) · **Runes** (ledger) · **Reviews** (PR cards) ·
225
+ **Processes** (Valhalla) · **Files** (Skrymir) · **Chat** (OmniChat drawer).
226
+
227
+ ### 5.2 Reusable components (token-driver)
228
+
229
+ | Component | Spec |
230
+ |---|---|
231
+ | `RealmGate` | rune + label + subtle realm tint; active = cyan chisel ring |
232
+ | `AgentCard` | Agent Card JSON rendered: name, capabilities, skills, interface, status dot, house seal |
233
+ | `TaskChip` | A2A state: SUBMITTED→WORKING→terminal; color + rune + label (never color alone) |
234
+ | `TraceRow` | mono line: ts · agent · module · event · checksum |
235
+ | `RecallPanel` | query + ranked episodes (score bar = cyan), timeline view |
236
+ | `MetricTile` | mono number + delta + sparkline; beveled panel |
237
+ | `RuneTag` | house/label pills using house accents |
238
+ | `PRCard` | title, checklist progress, CI runes, review actions (Glitnir) |
239
+
240
+ All components read tokens from `tokens.css`; color-only states are forbidden
241
+ (append a rune glyph + text).
242
+
243
+ ### 5.3 Data visualization
244
+
245
+ - Charts: thin 2px cyan/violet lines, no 3D, no pie explosions; gridlines at
246
+ `--ymir-steel-2` 12% opacity.
247
+ - Series color order: cyan → violet → emerald → amber → crimson.
248
+ - Fleet graph: nodes = Agent Cards, edges = A2A task hops; edge dashes animate on
249
+ activity; node ring = status.
250
+ - Trace/timeline: JetBrains Mono; branch/merge glyphs reused from Yggdrasil theme.
251
+
252
+ ---
253
+
254
+ ## 6. Content & voice
255
+
256
+ - **Short, operational, zero flair.** "Task failed. Diagnosis: json_contract.
257
+ Retried as 6f1a." — not "We encountered an unexpected issue."
258
+ - Headings read like commands; decks read like log lines.
259
+ - Rune labels double as keyboard hints (`ᛉ` = Algiz/protect, used for "seal/approve").
260
+
261
+ ---
262
+
263
+ ## 7. Accessibility & implementation notes
264
+
265
+ - AA contrast enforced (tokens guarantee it), focus = cyan chisel ring, target
266
+ size ≥44px, keyboard-first with all views reachable.
267
+ - React and Vue consume the **same token set** — no per-framework color drift.
268
+ `tokens.css` is the single source; component styling via CSS vars, not hardcoded hex.
269
+ - Agents (Brokk/Eindri) generate UI from **Agent Cards and task JSON** — the
270
+ design system guarantees any agent-produced surface is on-brand without a
271
+ designer in the loop.
272
+
273
+ ---
274
+
275
+ ## 8. Files
276
+
277
+ - `docs/design.md` — this document (master).
278
+ - `midgard/design-system/tokens.css` — the consumable design tokens.
279
+ - `midgard/design-system/icons.md` — rune-glyph map (to create).
280
+ - `docs/ymir-rut.md` Part 3 — the original Rut design-system specification this
281
+ document implements.
282
+ - `docs/lore.md` §VI — house lineage behind the house accents.
283
+
284
+
285
+ # YMIR — The Lore (v2)
286
+
287
+ > The system carries Norse names not as decoration but as **load-bearing allegory** — every name is chosen because the myth already explains the machine's job. The visual language is the same rule made visible: **carved, not skinned**. ([`docs/design.md`](design.md))
288
+
289
+ ---
290
+
291
+ ## I. The Creation: Ymir, the Primordial Giant
292
+
293
+ In the old tale, there was nothing before the worlds but cold mist and embers of fire.
294
+ From their meeting in the Void — **Ginnungagap** — came the first being: the giant
295
+ **Ymir (Aurgelmir)**, the ancestor of everything. The gods slew him and made the
296
+ world from his body: flesh became the earth, blood the seas, bones the mountains,
297
+ hair the forests, skull the sky.
298
+
299
+ That is what this platform is. **Ymir** is the substrate — a single machine, a single
300
+ repo — the primordial body from which every realm of work is carved. Every service,
301
+ every repo, every tool this fleet ships is shaped from Ymir's frame and lives on it.
302
+
303
+ It is also the reason the UI looks the way it does. Nothing is painted onto Ymir;
304
+ everything is cut **from** him — chiseled bevels, hammered steel surfaces, runes
305
+ cut into obsidian. The design does not decorate the system; it exposes its bones.
306
+
307
+ ---
308
+
309
+ ## II. The Builders: Brokk and Eitri (Eindri)
310
+
311
+ After the world was made, the gods needed smiths. Two dwarf brothers are the
312
+ greatest craftsmen in the myths:
313
+
314
+ - **Brokk** works the **bellows** — he drives the forge, keeps the fire fed, drives
315
+ the work to completion even when he's bitten on the hand.
316
+ - **Eitri** (our **Eindri**) works the **craft** — the hands that shape the metal.
317
+
318
+ Together they out-forged the sons of Ivaldi and produced the Aesir's finest
319
+ treasures — chief among them **Mjölnir**, the hammer that returns to the hand.
320
+
321
+ That is the agent fleet:
322
+
323
+ - **Brokk** is the primary agent — the one who keeps the forge hot, drives each
324
+ task to a tangible artifact, and works through anything.
325
+ - **Eindri** workers are the delegated hands — isolated smiths struck off in
326
+ **Utgard** sandboxes so a single bad casting never shatters the forge.
327
+
328
+ Behind them stands a third worker of the same fabric: **Kaia**, the shaper of
329
+ the fleet itself (see §IV). She is not the hands or the bellows — she is the
330
+ **eye that remembers**, and the will that decides which smith takes which metal.
331
+
332
+ ---
333
+
334
+ ## III. The World Tree and the Realms
335
+
336
+ The worlds are not separate — they hang in one tree, **Yggdrasil**, connected,
337
+ holding each other up. Same here: worktrees (*branches*) hold parallel effort
338
+ without collision, and every realm routes through the same trunk.
339
+
340
+ The nine worlds of the myth map onto Ymir's spaces:
341
+
342
+ | Realm of the myth | What it is in Ymir |
343
+ |---|---|
344
+ | **Svartalfaheim / Nidavellir** — the dwarf-halls under the earth | tenant workspaces: `way-of`, `zerwiz`, `craig` — the shop floors |
345
+ | **Midgard** — the world of humans, middle, shared | cross-tenant shared assets & repos |
346
+ | **Utgard (Jötunheim)** — outside the wall, where giants dwell | the sandbox barrier — untrusted code runs *there*, never in the halls |
347
+ | **Yggdrasil** — the tree that binds all realms | git worktree isolation, zero-collision parallel edits |
348
+ | **Mimirsbrunn** — the well at the root of the tree | the engram memory engine — Kaia's and the platform's long-term memory |
349
+
350
+ ### The Seven Gates
351
+
352
+ Ymir Rut, the long-form building plan ([`docs/ymir-rut.md`](ymir-rut.md)), is the
353
+ story of **seven interlocked daemons** standing at the gates of the tree — each a
354
+ myth-made-module:
355
+
356
+ | Gate | Daemon | Job |
357
+ |---|---|---|
358
+ | **Bifrost** | ingress gateway | the burning bridge — every crossing into Ymir passes over it |
359
+ | **Hlidskjalf** | control plane | Odin's high seat — the view of every realm |
360
+ | **Svartalfaheim** | tenant realms | the isolated dwarf-halls — `sandbox_isolated`, nothing bleeds between halls |
361
+ | **Brokk** | agent workers | the forge itself — autonomous workers that build, audit, transform |
362
+ | **Utgard** | ephemeral sandboxes | the walled realm — `docker_ephemeral`, sealed and destroyed after each task |
363
+ | **Yggdrasil** | worktree manager | the tree — `.treehouses` branches hold parallel work without collision |
364
+ | **Ratatoskr** | event bus / A2A backbone | the messenger — carries every word between all gates |
365
+
366
+ ---
367
+
368
+ ## IV. The Well: Mimirsbrunn, Mimir, and Kaia
369
+
370
+ At the root of Yggdrasil lies **Mimirsbrunn**, the well of wisdom. **Mimir**
371
+ guards it; whoever drinks its water receives the memory of all things. Even Odin
372
+ paid an eye for a single drink.
373
+
374
+ In Ymir, the water is **engram** — an open-source cognitive memory library
375
+ (single-file SQLite + vector + full-text + local embeddings). The well is named
376
+ **Mimirsbrunn**. The one who speaks from the well — the oracle that answers what
377
+ we remember about a project before we act — is **Kaia**.
378
+
379
+ - Every meaningful action is **observed** into the well (`POST /observe`).
380
+ - Before any orchestration, the fleet **recalls** (`GET /recall`) what the well
381
+ remembers about this project.
382
+ - The ledger of the gods is written in runes, not ink — every action is inscribed
383
+ into **Runes**, the append-only audit ledger. A rune that is carved cannot be
384
+ un-carved.
385
+
386
+ **Kaia's charge.** She does not act on faith. Before she dispatches a single
387
+ smith she drinks from the well (recalls what this project has taught before) and
388
+ then she passes every plan through **the veil** — the anti-hallucination gate —
389
+ asking, *is this grounded in what the well holds, or is it spun from air?* Only
390
+ what passes is forged.
391
+
392
+ **Rule of the well:** memory is always a *boost, never a blocker* — a dry well
393
+ fires cold, but never stops the forge.
394
+
395
+ ---
396
+
397
+ ## V. The Artifacts
398
+
399
+ The smiths forged the gods' weapons; the system ships the same by analogy:
400
+
401
+ - **Gungnir** — Odin's spear, which never misses its mark. The **skill
402
+ synthesis engine**: a skill is forged, validated in Utgard, then it hits its
403
+ target every time.
404
+ - **Mjölnir** — the hammer that returns. The **issue→PR pipeline**: it strikes,
405
+ and it comes back with a pull request in hand.
406
+ - **Bifrost** — the burning rainbow bridge to Asgard. The **gateway / reverse
407
+ proxy**: every ingress crosses it.
408
+ - **Heimdall** — the watchman who stands at Bifrost. **OAuth/security guard**:
409
+ nothing crosses the bridge unvouched — and the one who *signs every agent's
410
+ rune of introduction*, so no forged identity crosses either.
411
+ - **Gjallarhorn** — Heimdall's horn. The **Cloudflare tunnel**: outbound signal
412
+ carrying Ymir to the world.
413
+ - **Hlidskjalf** — Odin's high seat, from which he sees all the realms. The
414
+ **dashboard**: the sovereign's view of the whole fleet — fleet graph, the A2A
415
+ task stream, the well, the Runes, the reviews.
416
+ - **Skrymir** — the hulking giant who once tricked Thor himself. The **web file
417
+ browser**: the huge hand reaching into the halls, deceptively silent.
418
+ - **Ratatoskr** — the squirrel who runs the length of Yggdrasil, carrying
419
+ messages between the worlds. The **A2A 1.0 collaboration backbone**
420
+ (see §V.b below): every agent carries a **rune of introduction** — an Agent
421
+ Card naming its skills and its address, signed by Heimdall — and every task it
422
+ passes along the tree follows the old law of the messenger: state is announced,
423
+ work is tracked, gossip is endless and fast. Redis is the squirrel's nest; the
424
+ A2A task model is the word it carries.
425
+ - **Hermóðr** — the messenger god who traveled to Hel and back, crossing realms
426
+ to retrieve what was lost. The **MCP/A2A composition**: the bridge pattern where
427
+ the orchestrator delegates via A2A 1.0 horizontally, and specialists access
428
+ tools vertically via MCP. Composes two validated OSS standards so agents can
429
+ delegate horizontally while accessing tools vertically.
430
+ - **Valhalla** — the hall of the slain, where heroes are gathered and watched. The
431
+ **process health monitor**: PM2/Docker keeps every process's soul alive and watched.
432
+ - **Þjazi** — the experimental terminal backend that drives sub-agent panes.
433
+ Native per-pane agent state and push events; protocol 14+ required;
434
+ 0.7.1/0.7.3/0.7.4/0.7.5/0.8.0 floors; presentation spaces on 0.8.0+. Þjazi
435
+ provides the terminal session while Treehouse continues to provide task
436
+ worktrees. When the Captain spawns a sub-agent, Þjazi opens a visible terminal
437
+ pane pointing to the Treehouse worktree, enabling real-time observation of the
438
+ agent's typing, CLI execution, and test runs.
439
+
440
+ ### V.b. The Runes of Introduction (Ratatoskr's law)
441
+
442
+ Every agent that joins the tree publishes a **rune of introduction** — its Agent
443
+ Card at `/.well-known/agent-card.json`: what it can do, how to reach it, and what
444
+ proof it carries. Discovery is by **capability, never by guessing an address**.
445
+ Heimdall signs the rune (JWS) so no agent can claim another's name. The message
446
+ law is simple, and unbroken:
447
+
448
+ 1. Every message has a **task state** — submitted, working, done, failed — which
449
+ is *announced*, never whispered.
450
+ 2. Terminal states cannot be restarted; retries are the sender's duty.
451
+ 3. Every word spoken between realms is **observed into the well and carved into
452
+ Runes** — the squirrel gossips, but the ledger remembers.
453
+
454
+ ---
455
+
456
+ ## VI. The Houses
457
+
458
+ The fleet **works for houses** — distinct brands under which the work is
459
+ published. Each house is a venture owned by WayOf, and each carries a piece of
460
+ the myth that names it — and a **seal**, the house accent cut into the rune it
461
+ wears on tags and marks (design.md §2.2).
462
+
463
+ | House | Name-sake | Seal | What the house does today |
464
+ |---|---|---|---|
465
+ | **Ymir Labs** | the primordial giant; the frame of the world | cyan `#38bdf8` | the platform itself: Ymir OS, Hlidskjalf, the agent fleet, Mimirsbrunn — the body everything else is carved from |
466
+ | **Brokk Forge** | the bellows-smith who drove the forging of Mjölnir | forge amber `#f59e0b` | engineering & build tooling: WayOf Command/Runecode, softwerefactory, wayofmono, the factory |
467
+ | **Runestone Labs** (short: **Runir**) | the runes carved once, that cannot be un-carved | rune crimson `#f43f5e` | records & compliance: `.compliance` gates, rune auditing, docs, runbooks, research |
468
+ | **Muninn Labs** | the raven *(memory)* that flew for Odin daily | raven violet `#8b5cf6` | memory & knowledge: Anchor/wayofteams-mcp anchor-memory, Mimirsbrunn/engram, vector RAG |
469
+ | **Dvalin** | the dwarf smith of the finest crafted things | cold steel `#94a3b8` | crafted tools — OptiCat (HVAC Pro), Linkable, Todo, Desk, Material Files |
470
+ | **Utgard Studios** | the realm where the giants work, outside the walls | jötun magenta `#d946ef` | creative: WhyNot Productions (soul/growth media), AiPic (video), OpenChamber, sensual dojo, sensebit |
471
+ | **Askr** | the first man, shaped from an ash tree | ash green `#34d399` | human-centered products: Relocation Copilot, onboarding automation |
472
+ | **Mannheim** | *(holding — reserving a clan name with no myth yet)* | slate `#64748b` | holding; allocated when a new venture claims it |
473
+
474
+ > Houses are **names in the mythos, not subsystems** — they are the ventures the
475
+ > fleet ships under, mapped per ENTRY-004. A house may be split or merged only by
476
+ > a new append-only entry, never silently.
477
+
478
+ ---
479
+
480
+ ## VII. The Forge-Master's Rule (open source first)
481
+
482
+ The dwarves are the greatest smiths in the myths — but even they do not hammer
483
+ every nail themselves. The finest tools are **borrowed anvils**: proven weapons
484
+ already forged by others, taken up and named into the myth rather than rebuilt
485
+ from raw ore.
486
+
487
+ So it is here. Ymir forges only what makes it Ymir — **the UI and UX
488
+ (Hlidskjalf), the agent runtime (Brokk, Eindri, Kaia), and the collaboration
489
+ (Ratatoskr)**. Everything beneath that is a validated open-source engine given a
490
+ Norse name and a Norn-carved shell:
491
+
492
+ | Borrowed anvil | Norse name |
493
+ |---|---|
494
+ | engram (`engdbram`) | **Mimirsbrunn** |
495
+ | Redis (queue under the A2A task model) | **Ratatoskr**'s nest |
496
+ | `a2aproject/a2a` + SDKs (A2A 1.0) | the **Ratatoskr** protocol |
497
+ | Traefik/Caddy | **Bifrost** |
498
+ | OAuth2-proxy/Authentik + JWS signing | **Heimdall** |
499
+ | cloudflared | **Gjallarhorn** |
500
+ | Docker (rootless, network-none) | **Utgard** |
501
+ | MinIO/FileBrowser | **Skrymir** |
502
+ | PM2/Docker | **Valhalla** |
503
+ | `command-factory`, `firstmate`, `.compliance`, factory visualizer | the **library of the halls** — existing, adopted, not rebuilt |
504
+
505
+ The rule: *does a validated OSS project already do this?* If yes, name it and
506
+ use it. Only what differentiates Ymir is smithed in Ymir's own forge.
507
+
508
+ ---
509
+
510
+ ## VIII. The Reforging
511
+
512
+ The giant is first carved from **light metals** — TypeScript, Python, React, Vue —
513
+ the working metals the smiths are most keen-handed with, so the whole of Ymir can
514
+ be raised and proven end to end. That is the law of the build: **the stack stays
515
+ simple for the agents; the agents stay good at their stack.**
516
+
517
+ When the machine works — every realm turning, every gate answering — the forging
518
+ is not done; it is *re-forged*. The seven gates are re-hammered in **Rut-steel**
519
+ (Rust, NATS, gRPC, libgit2 — the target spec in `docs/ymir-rut.md`): heavier,
520
+ faster, quieter. Every module is re-floored one-for-one into its Rut crate —
521
+ **never redesigned, only re-forged.** The contract each gate keeps is the same;
522
+ only the metal changes.
523
+
524
+ ---
525
+
526
+ ## IX. The Frame (how to read this repo)
527
+
528
+ 1. **Ymir** is the body — one repo, one machine, all realms carved from it.
529
+ 2. **Yggdrasil** is the tree — worktrees and branches keep parallel work alive
530
+ without collision.
531
+ 3. **Svartalfaheim** holds the shop floors — never work outside your realm, a
532
+ dwarf never meddles in another's hall.
533
+ 4. **Mimirsbrunn** is the well — drink before you act, water it afterwards.
534
+ 5. **Runes** are the ledger — a rune carved stays carved; every significant
535
+ action is inscribed.
536
+ 6. **Hermóðr** is the bridge — MCP/A2A composition: the orchestrator delegates
537
+ via A2A 1.0 horizontally, specialists access tools vertically via MCP.
538
+ Composes two validated OSS standards so agents can delegate horizontally
539
+ while accessing tools vertically.
540
+ 7. **Ratatoskr** is the messenger — every agent carries its rune of
541
+ introduction, every word is task-tracked, observed, and carved.
542
+ 8. **Kaia** is the eye — she drinks from the well before every dispatch and
543
+ passes every plan through the veil.
544
+ 9. **Houses** are the ventures — the fleet forges for them, and honors them with
545
+ the names and seals they carry.
546
+ 10. **The forge rule** — borrow the proven anvil, smith only what Ymir is
547
+ (UI/UX, the runtime, the collaboration) — and when all of it works end to
548
+ end, re-forge it in Rut steel.
549
+
550
+ *The giant is slain so the worlds may stand. The opposite is true here: Ymir
551
+ stands, and from it the worlds are carved — light metal first, Rut steel after.*
552
+ ## X. The Skill Forge and the Borrowed Anvil (NEW)
553
+
554
+ The galdr chants that structure agent-tool interaction are not forged from raw ore —
555
+ they are **chiselled from proven patterns**, named into the myth and given a Norn-carved
556
+ shell. This is the Ymir way of the skill smith.
557
+
558
+ ### The Three Levels of Skill Smithing
559
+
560
+ **Level 1 — The Borrowed Anvil**
561
+ Proven OSS projects already do the work. Ymir names them and gives them a Norse
562
+ identity, never rebuilding from raw ore.
563
+
564
+ | Borrowed anvil | Norse name | Domain |
565
+ |---|---|---|
566
+ | `engdbram` (PyPI `engdbram`, v2.2.1) | **Mimirsbrunn** | engram memory engine |
567
+ | Redis (queue under the A2A task model) | **Ratatoskr**'s nest | A2A task queue |
568
+ | `a2aproject/a2a` + SDKs (A2A 1.0) | the **Ratatoskr** protocol | agent↔agent horizontal delegation |
569
+ | Traefik/Caddy | **Bifrost** | gateway / reverse proxy |
570
+ | OAuth2-proxy/Authentik + JWS signing | **Heimdall** | auth / agent card signing |
571
+ | cloudflared | **Gjallarhorn** | outbound encrypted tunnel |
572
+ | Docker (rootless, network-none) | **Utgard** | ephemeral sandboxes |
573
+ | MinIO/FileBrowser | **Skrymir** | file browser |
574
+ | PM2/Docker | **Valhalla** | process health monitor |
575
+ | `command-factory`, `firstmate`, `.compliance`, factory visualizer | the **library of the halls** | existing, adopted, not rebuilt |
576
+ | TOON (Token-Oriented Object Notation) | **Galdr** | token-efficient output format |
577
+ | principles.yaml (10 design principles) | the **runes of ergonomics** | CLI standards |
578
+
579
+ The rule: *does a validated OSS project already do this?* If yes, name it and use it.
580
+ Only what differentiates Ymir is smithed in Ymir's own forge.
581
+
582
+ **Level 2 — The Galdr Chant (new skills)**
583
+ When no validated OSS project exists, the galdr craftsperson writes a new skill
584
+ in the Ymir tradition — Norse-named, TOON-output, all 10 principles baked in.
585
+
586
+ The recent galdr family illustrates this:
587
+
588
+ - **`galdr`** — Agent experience incantation standards (renamed from `axi`, adapted TOON)
589
+ - **`galdr-compliance`** — Ymir Galdr compliance checker (renamed from `axi-compliance`)
590
+ - **`galdr-crafter`** — generates new Galdr-compliant skills using TOON format (NEW)
591
+
592
+ Each carries the same 10 principles, each Norse-named, each adapted for Ymir's
593
+ architecture rather than copied wholesale.
594
+
595
+ **Level 3 — The Frame Integration**
596
+ New skills are not dropped into the repo — they are ** framed** into the Ymir
597
+ structure:
598
+
599
+ - Skill index: `.agents/skills/README.md` tracks every galdr skill
600
+ - Compliance gate: `galdr-compliance` runs on every new skill before merge
601
+ - Frame placement: skills live in `.agents/skills/<norse-name>/SKILL.md`
602
+ - Session integration: each skill declares its hook or skill-path in its frontmatter
603
+ - The frame remembers: every significant action is observed into Mimirsbrunn
604
+ before the skill is considered "live"
605
+
606
+ Once all five gates pass, the skill is "forged" — it joins the library of the halls
607
+ and is available via `npx skills add <owner>/<repo> --skill <name>` or as a managed
608
+ plugin in `.config/opencode/plugins/`.
609
+
610
+ ### The Aett of Skill Naming
611
+
612
+ Ymir skills follow an **aett** (Norse: "a family of eight") naming pattern:
613
+
614
+ | Aett name | Pattern | Example |
615
+ |---|---|---|
616
+ | **galdr-** | incantation / chant standards | `galdr`, `galdr-compliance`, `galdr-crafter` |
617
+ | **mimir-** | memory / recall | (planned) |
618
+ | **yggd-** | tree / worktree | (planned) |
619
+ | **rat-** | messenger / A2A | `ratatoskr` (bus), `rat-***`-axi (community) |
620
+ | **heimd-** | gate / guard | (planned) |
621
+ | **bifr-** | bridge / gateway | (planned) |
622
+ | **val-** | hall / health | `valhalla` (process monitor) |
623
+ | **skyr-** | giant / file scope | `skrymir` (file browser) |
624
+
625
+ New skills are assigned to the aett that best matches their domain. The galdr aett
626
+ is the first tier: skills that structure agent-tool ergonomics and output format.
627
+
628
+ ### The Forging Verification
629
+
630
+ Before a new galdr skill is considered forged, it must pass:
631
+
632
+ 1. **TOON output test** — all stdout output uses TOON format, measured ~40% smaller
633
+ than equivalent JSON across 3 sample outputs
634
+ 2. **Principle compliance** — all 10 design principles assessed via `galdr-compliance`
635
+ 3. **Norse name validity** — skill name follows the aett pattern, not a random label
636
+ 4. **Frame integration** — SKILL.md placed in `.agents/skills/<name>/`, referenced in
637
+ `.agents/skills/README.md`, daily briefing notes the new forge entry
638
+ 5. **Mimirsbrunn observation** — the skill's creation is observed into the well
639
+ (`POST /observe`) before it is deemed "live"
640
+
641
+ Once all five gates pass, the skill is "forged" — it joins the library of the halls
642
+ and is available via `npx skills add <owner>/<repo> --skill <name>` or as a managed
643
+ plugin in `.config/opencode/plugins/`.
644
+
645
+ ---
646
+
647
+ # YMIR — Master Architecture
648
+
649
+ Status: **DRAFT v0.2** — consolidates `Ymir.md`, the Ymir Rut v2.6 target spec
650
+ (`docs/ymir-rut.md`), the A2A collaboration doctrine (ENTRY-008), the engram
651
+ memory engine (ENTRY-007), the house system (ENTRY-004), and the OSS-first
652
+ stack ruling (ENTRY-009/010).
653
+
654
+ > **Stack ruling (today):** **TypeScript + Python + React + Vue** — the agent-proficient
655
+ > stack, so agents can run and extend the whole platform. Rust/Cargo, NATS, Envoy,
656
+ > and Protobuf are the **Ymir Rut v2.6 target** and are ported to *after* the system
657
+ > works end-to-end. Every service below maps one-for-one to a future Rut crate
658
+ > (see **§6** and `docs/ymir-rut.md`).
659
+
660
+ ## 1. What Ymir Is
661
+
662
+ Ymir is a lean, single-operator agentic operating system. One person runs an entire
663
+ **business, software development, marketing, and personal life** from a single
664
+ repository, orchestrated by autonomous Norse-named agents.
665
+
666
+ - **Local-first** — everything runs on your machine or your VPS via Docker Compose.
667
+ - **Mythos-first** — names are load-bearing allegory, not decoration (`docs/lore.md`):
668
+ the giant (Ymir), the smiths (Brokk/Eindri), the well (Mimirsbrunn), the houses.
669
+ - **OSS-first** — for every feature below the runtime, adopt a **validated open-source
670
+ project** first; Ymir owns only the **UI/UX (Hlidskjalf)**, the **agent runtime**
671
+ (Brokk/Eindri/Kaia), and **A2A collaboration** (Ratatoskr).
672
+ - **Self-aware** — `AGENTS.md` in the root governs every agent's behavior.
673
+ - **Isolated-by-default** — sub-agent code executes in ephemeral containers (Utgard)
674
+ on isolated git worktrees (Yggdrasil).
675
+ - **Memory-native** — every action is *observed* into Mimirsbrunn (engram) and
676
+ *carved* into Runes; agents recall before they act.
677
+ - **Autonomous** — cron jobs, GitHub webhooks, and an A2A message backbone keep
678
+ agents working while you're away.
679
+ - **Multi-tenant** — every realm (client/brand/division) gets fully isolated memory,
680
+ secrets, and projects.
681
+
682
+ ## 2. System Topology (7 realms / modules)
683
+
684
+ ```
685
+ ┌─────────────────────────────────────┐
686
+ │ USER INTERFACES │ React · Vue
687
+ │ Telegram │ Web Portal (Hlidskjalf)│
688
+ └──────────────┬──────────────────────┘
689
+ │ HTTPS / WebSockets
690
+ ┌──────────────▼──────────────────────┐
691
+ │ GJALLARHORN (Tunnel) │
692
+ │ cloudflared outbound │
693
+ └──────────────┬──────────────────────┘
694
+
695
+ ┌──────────────────────────────────────┐
696
+ │ BIFROST (Gateway / Reverse Proxy) │ Traefik/Caddy + Heimdall
697
+ │ + HEIMDALL (OAuth · signed cards) │
698
+ └──────────────┬──────────────────────┘
699
+
700
+ ┌───────────────────────────────────────────────────────────────────────┐
701
+ │ YMIR CORE (TS/Python) │
702
+ │ │
703
+ │ ┌──────────────┐ ┌────────────────┐ ┌────────────────────────┐ │
704
+ │ │ AGENTS.md ├──►│ Brokk/Kaia ├──►│ GUNGNIR Skill Engine │ │
705
+ │ │ (Root Laws) │ │ Orchestrator │ │ (Validated skills) │ │
706
+ │ └──────────────┘ └───────┬────────┘ └────────────────────────┘ │
707
+ │ │ A2A 1.0 dispatch (delegation) │
708
+ │ ┌──────────┬───────────────┼──────────┬──────────────────────┐ │
709
+ │ ▼ ▼ ▼ ▼ ▼ │
710
+ ┌──────────┐┌──────────┐ ┌───────────┐┌───────────┐ ┌──────────┐│
711
+ │MIMIRSBRUNN│ RATATOSKR│ │ YGGDRASIL ││ UTGARD │ │ MJOLLNIR ││
712
+ │ engram │ A2A 1.0 │ │ git ││ Docker │ │ Issue→PR ││
713
+ │ bridge │ + Redis │ │ worktrees ││ sandbox │ │ pipeline ││
714
+ └──────────┘└──────────┘ └───────────┘└───────────┘ └──────────┘│
715
+ └───────────────────────────────────────────────────────────────────────┘
716
+ ```
717
+
718
+ - **Svartalfaheim** holds the realms (way-of, zerwiz, craig) and per-tenant
719
+ A2A discovery; **Midgard** is the shared cross-tenant space; **Runes** is the
720
+ immutable ledger; **Valhalla** supervises the processes.
721
+
722
+ ## 3. Core Subsystems
723
+
724
+ ### 3.1 Agent Runtime — Brokk, Eindri & Kaia
725
+ - **Brokk** is the primary autonomous agent — single-operator executive partner
726
+ (Development, Marketing, Business Strategy, Life Execution).
727
+ - **Eindri** workers are isolated sub-agents spawned for delegated tasks, always
728
+ inside Utgard sandboxes on Yggdrasil worktrees.
729
+ - **Kaia** is the orchestrator + the oracle by the Well: she recalls Mimirsbrunn
730
+ before dispatch, honours the anti-hallucination gate, and dispatches specialists
731
+ as **A2A tasks** (SSE streaming); specialists reach tools via **MCP**.
732
+ - Realm personae in `svartalfaheim/<realm>/Brokk.md`.
733
+
734
+ ### 3.2 Memory — Mimirsbrunn (engram engine) + Runes
735
+ Adopted from Kaia's proven factory memory (ENTRY-007): the well is **engram**
736
+ (`engdbram`, open source — single-file SQLite + sqlite-vec + FTS5 + local embeddings).
737
+
738
+ | Tier | Name | Engine | Use |
739
+ |------|------|--------|-----|
740
+ | Tier 1 | Hot / Active | `svartalfaheim/<realm>/workspace/**/*.md` | Human-readable identity, goals, tasks |
741
+ | Tier 2 | Deep memory | **engram** store served by the bridge (`:4602`) | episodic recall, hybrid/cosine/spreading |
742
+ | Tier 3 | Audit | `workspace/memory/runes_audit.md` | append-only ledger (Runes) |
743
+
744
+ - Every significant action → `POST /observe` (episode into the well) + Runes entry.
745
+ - Before acting: `GET /recall` — "what does the well remember about this project?"
746
+ - **Memory is a boost, never a blocker** — a dry well fires cold, never stops the forge.
747
+
748
+ ### 3.3 Skills — Gungnir
749
+ - Recurring tasks become scripts/skills in `.agents/skills/`.
750
+ - Self-synthesis loop: identify gap → write skill → **validate in Utgard** → register.
751
+ - Skill index: `.agents/skills/README.md`.
752
+
753
+ ### 3.4 Isolation — Yggdrasil + Utgard
754
+ - **Yggdrasil**: complex tasks never edit the main tree; each agent gets
755
+ `./<repo>/.yggdrasil/<agent-id>/` on its own branch (`.treehouses` in Rut terms).
756
+ - **Utgard**: untrusted code, dynamic skills, Eindri tasks run in ephemeral Docker
757
+ containers, `--network none`, strict CPU/RAM/timeouts, no root. A failed run never
758
+ touches main. Destroyed on completion (ephemeral lifecycle).
759
+
760
+ ### 3.5 Inter-Agent Bus — Ratatoskr (A2A 1.0 backbone) ⭐
761
+ The collaboration differentiator (ENTRY-008). Built on the **open A2A Protocol v1.0**
762
+ (Linux Foundation), NOT a bespoke bus:
763
+
764
+ - **Agent Cards** at `/.well-known/agent-card.json`, realm-scoped registry; discovery
765
+ = capability, never endpoint guessing. Cards JWS-signed via Heimdall.
766
+ - **Task lifecycle**: SUBMITTED → WORKING → COMPLETED/FAILED/REJECTED/CANCELED/
767
+ INPUT_REQUIRED/AUTH_REQUIRED; terminal states never restart (retry/idempotency
768
+ lives in the orchestrator).
769
+ - **Redis pub/sub** is the queue *under* the A2A task model (semantics on A2A,
770
+ throughput on Redis).
771
+ - Every A2A message is **observed into Mimirsbrunn** and **logged to Runes**.
772
+ - The `a2a-bridge` skill is the canonical collaboration skill (inbox per turn,
773
+ complete tasks, FYI peers on contract/schema/infra changes).
774
+ - Plan: `docs/plans/25-ratatoskr-a2a.md`.
775
+
776
+ ### 3.6 Multi-Tenancy — Svartalfaheim
777
+ - Each realm = isolated domain: `.env.realm`, `Brokk.md`, `projects/`, `companies/`,
778
+ `workspace/`.
779
+ - **Rut specification:** realm::namespace + vault::keys — memory pages, env vars, and
780
+ credential tokens cannot cross tenant boundaries (`sandbox_isolated`).
781
+ - Realm context loader (`tenant_context_loader.ts`) verifies boundaries before any task;
782
+ cross-realm A2A requires an explicit grant.
783
+
784
+ ### 3.7 Global Shared Space — Midgard
785
+ - Cross-tenant repos, design system, shared packages, infrastructure, company wiki.
786
+ - Parallel work uses Yggdrasil worktrees inside `github_org_repos/`.
787
+
788
+ ### 3.8 Gateway & Security — Bifrost, Heimdall, Gjallarhorn
789
+ - **Bifrost**: Traefik/Caddy routes `/` → Hlidskjalf, `/files/` → Skrymir,
790
+ `/webhooks/github` → Mjollnir, `/oauth2/` → Heimdall. TLS termination.
791
+ - **Heimdall**: OAuth2-proxy/Authentik (GitHub OAuth) + **Agent Card signing (JWS)**;
792
+ tenant isolation enforced at the proxy layer.
793
+ - **Gjallarhorn**: cloudflared, outbound-only encrypted tunnel.
794
+
795
+ ### 3.9 User Interfaces — Hlidskjalf & Skrymir (the UI/UX differentiator)
796
+ - **Hlidskjalf** — **React/Vue** master control dashboard per the **Ymir Rut design
797
+ system** (`docs/ymir-rut.md` Part 3): Cinzel / JetBrains Mono / Inter typography,
798
+ obsidian + cyan + violet palette, Algiz-anvil emblem. Views: fleet graph, A2A task
799
+ stream, memory well (`#/memory`), PR review cards, tenant switcher, Runes stream.
800
+ - **Skrymir** — embedded file browser (FileBrowser) scoped per tenant via Bifrost.
801
+ - **Telegram / Web chat** — remote command and approve while away.
802
+
803
+ ### 3.10 Automation — Cron, Mjollnir, Valhalla
804
+ - **Cron runner**: stateless spawn → inject AGENTS.md + task prompt → execute →
805
+ write realm daily log → exit. Daily briefing 07:00, git backup, social poster.
806
+ - **Mjollnir (Issue→PR)**: HMAC-verified webhook → worktree + Utgard sub-agent →
807
+ fix + tests → `gh pr create` → human review in Hlidskjalf. Never force-merges.
808
+ - **Valhalla**: PM2/Docker/systemd lifecycle (`process_controller.ts`) + fleet
809
+ registry (`app_registry.json`). Missions, processes, and worker clusters.
810
+
811
+ ### 3.11 Þjazi Backend Integration
812
+ - **Þjazi** is an experimental agent-native terminal backend with native per-pane agent state and push events, required when running sub-agents inside terminal panes.
813
+ - **Protocol floor**: Þjazi protocol 14 or newer is required; broad backend verification covers versions 0.7.1, 0.7.3, 0.7.4, 0.7.5, and 0.8.0, while protocol-16 features remain gated by availability.
814
+ - **Default-on presentation spaces** have a higher floor of Þjazi 0.8.0; homes can opt out by writing `off` into local `config/herdr-presentation-spaces`, and opt in by writing `on`.
815
+ - **Endpoint metadata** recorded per task: `backend=herdr`, `window=<session>:<pane-id>`, `herdr_session=<session>`, `herdr_workspace_id=<workspace-id>`, `herdr_tab_id=<tab-id>`, `herdr_pane_id=<pane-id>`.
816
+ - **Transport behavior**: Adapter starts and polls a named server before workspace/tab/pane/agent calls. Every Þjazi invocation goes through `fm_backend_herdr_cli`, which sets the environment and passes an explicit trailing `--session <name>`.
817
+ - **Push events**: Protocol 16 can subscribe to `pane.agent_status_changed` over a bounded Unix-socket reader. Polling runs every cycle and remains the permanent fallback when protocol 16, the event schema, Python, connection, subscription, or repeated reader execution is unavailable.
818
+ - **Away-mode supervisor**: Supports tmux and Þjazi supervisor panes only. Refuses Zellij, Orca, and cmux. For Þjazi, target existence, native state, capture, composer state, and verified submit all route through the shared backend dispatcher and the explicit named-session CLI owner.
819
+ - **Destructive lab safety**: `bin/fm-herdr-lab.sh` is the sole supported lifecycle helper for isolated verification. It provisions only non-default names beginning with `fm-lab-`, appends an explicit `--session` to allowed task commands, refuses caller-supplied session flags and server/session lifecycle subcommands, and performs destructive stop/delete only through its guarded lifecycle actions.
820
+ - **Active limits**: Þjazi remains experimental; presentation ordering needs protocol 16 and Python and is best-effort only; mutable labels can collide and are never placement or destructive authority; a Firstmate outside Þjazi cannot resolve a launcher workspace, so a colliding home label refuses new spawns until the collision is cleared; ghost and placeholder recognition uses ANSI de-emphasis when available.
821
+ - **Regression test suite**: 18+ test scripts covering presentation, cleanup, prune safety, focus, respawn, workspace-per-home, launcher workspace, and event wait smoke tests.
822
+ - **Sub-agent orchestration**: When the Captain orchestrates sub-agents, Þjazi opens visible terminal panes/windows via `herdr run --pane-name "<role>-<branch>"` pointing to Treehouse worktrees. The user can see the sub-agent typing, executing CLI tools, and running tests live in real time. Þjazi panes are non-blocking—the main agent remains open to answer user inputs or supervise other sub-agents.
823
+
824
+ ### 3.11 Company System — Houses (ENTRY-004)
825
+ - The fleet forges for **houses**: Ymir Labs, Brokk Forge, Runestone (Runir),
826
+ Muninn Labs, Dvalin, Utgard Studios, Askr, Mannheim. Each is a real venture with
827
+ a myth that names it (`docs/lore.md` §VI).
828
+ - Per-tenant `companies/` entity cards + `projects/` (plan 21).
829
+
830
+ ## 3.12 Agentic Engineering Workflow Integration (Firstmate)
831
+
832
+ ### Four-Layer Program Design Framework
833
+ Integrated from Dex Horthy's agentic engineering framework (YouTube `xgkjtF89-44`, August 2026). Ymir incorporates the four-layer system alongside its existing seven realms, reinforcing the OSS-first doctrine (ENTRY-008).
834
+
835
+ **Layer 1 — Product (What & Why)**
836
+ - Problem statement, success metrics, announcement post, HTML mockups
837
+ - Aligns with Ymir's ticket-creation and PRD workflows
838
+ - Measurable goals tied to business outcomes (conversion rates, resource reduction targets)
839
+
840
+ **Layer 2 — System Architecture (How Services Fit)**
841
+ - Service topology, request/response flow, endpoint contracts, query outlines
842
+ - Complements Ymir's existing architecture layer in create-plan skill
843
+ - Service boundaries and flow diagrams map to Ymir's service orchestration
844
+
845
+ **Layer 3 — Program Design ⚠️ THE SKIPPED LAYER** (Critical Integration)
846
+ - **File locations**: Where each piece lives in the Ymir monorepo
847
+ - **Types and method signatures**: Exact interfaces before implementation
848
+ - **Call stack visualization**: Execution path when features run
849
+ - **Test shapes**: Test signatures only (not implementation)
850
+ - **Ymir enforcement**: `validate-plan` skill now mandates Layer 3 capture before spawn
851
+ - **Quote**: *"A good plan ends with the tests and the call stack. The point is that these are decisions the agent will otherwise make silently, and that you may not like."* — Dex Horthy
852
+
853
+ **Layer 4 — Vertical Slices / Tracer Bullets (Execution Order)**
854
+ - **Anti-horizontal-building**: Prevents DB→Service→API→FE sequencing that leaves nothing testable
855
+ - **Ymir implementation**: `ticket-executor` Phase 0 gate requires vertical slice definition
856
+ - **Tracer bullet approach**: Mock API → stub FE → wire together → then add migrations/logic
857
+ - **Dex's observation**: *"I have never seen a model do this without a human telling it the order."*
858
+
859
+ ### Context Engineering Principles (from Firstmate Research)
860
+ - **"Dumb zone" at ~50% context**: Real for models AND humans — structural decisions early when cheap
861
+ - **Right tokens, not more tokens**: One 43k-token planning session > re-steering 3,000-line diff later
862
+ - **Victor Tali trick**: *"Which choices are you not confident about?"* — pre-mortem before run, not post-hoc
863
+ - **Measurable goals beat instructions**: Agent given a number moves much further than one given description
864
+
865
+ ### Integration with Ymir Systems
866
+ - **Mimirsbrunn memory**: Program design decisions observed into the well before agent dispatch
867
+ - **Ratatoskr A2A backbone**: Vertical slice tasks dispatched as A2A tasks to specialists
868
+ - **Yggdrasil worktrees**: Each slice runs on isolated worktrees with Utgard sandboxing
869
+ - **Brokk/Eindri runtime**: Four-layer framework enforced in plan creation and ticket execution
870
+ - **Mjollnir issue→PR pipeline**: Incident-to-agent patterns integrated (classifier → brief → PR)
871
+ - **Valhalla process supervisor**: Context budget tracking and phase transitions
872
+
873
+ ### Acceptance Criteria (Ymir + Firstmate Integration)
874
+ - [x] Every ship task has all 4 layers documented before spawn
875
+ - [x] Zero horizontal-first builds (Slice 1 e2e testable first)
876
+ - [x] 100% of ship tasks have measurable goals
877
+ - [ ] Context budget warnings visible in fleet digest
878
+ - [x] Pre-mortem confidence check on every program design
879
+ - [ ] High-stakes changes go through multi-model review
880
+ - [ ] Incident-to-PR pipeline operational
881
+
882
+ ## 4. Execution Chain Examples
883
+
884
+ ### 4.1 Inbound GitHub Bug Report
885
+ ```
886
+ Webhook → Gjallarhorn → Bifrost → issue_listener.ts (HMAC verify)
887
+ → Mjollnir routes to realm → commit from Mimirsbrunn (recall project memory)
888
+ → treehouse worktree (fix-issue-N) → Eindri inside Utgard diagnoses + patches + tests
889
+ → push branch → gh pr create (Fixes #N)
890
+ → notify (Telegram + Hlidskjalf) → human reviews → merge
891
+ → outcome observed into the well + Runes logs everything
892
+ ```
893
+
894
+ ### 4.2 Background Daily Briefing
895
+ ```
896
+ Cron 07:00 → daily_brief.ts → loads AGENTS.md + realm context
897
+ → RECALL Mimirsbrunn for active dev/marketing context
898
+ → assemble prompt (untrusted_context contained)
899
+ → spawn headless agent → write svartalfaheim/<realm>/workspace/memory/daily/YYYY-MM-DD.md
900
+ → auto-commit sync (git_backup.ts) → exit
901
+ ```
902
+
903
+ ### 4.3 A2A Delegation (Kaia → specialist)
904
+ ```
905
+ Kaia recalls the well (what worked here before)
906
+ → discovers specialist via realm registry (Agent Card) → creates A2A task (SubmitTask)
907
+ → specialist streams progress over SSE (Working → updates)
908
+ → specialist finishes (Completed, artifacts) → tools via MCP internally
909
+ → Kaia observes the outcome into Mimirsbrunn → logs to Runes → Hlidskjalf renders state
910
+ ```
911
+
912
+ ### 4.4 Parallel Feature Work (two agents, one shared repo)
913
+ ```
914
+ Agent A: yggdrasil create → .yggdrasil/agent-a/ (branch agent/a/auth)
915
+ Agent B: yggdrasil create → .yggdrasil/agent-b/ (branch agent/b/logging)
916
+ Both run tests inside their own Utgard container (mount own worktree only)
917
+ On success: cleanup(merge=true) → merged to main, worktree removed
918
+ ```
919
+
920
+ ## 5. Data Flow & Security Boundaries
921
+
922
+ | Boundary | Enforced by |
923
+ |----------|-------------|
924
+ | Tenant independence | Svartalfaheim realm namespace + vault keys; proxy-level path scoping; per-realm `.env.realm`; realm-scoped A2A registry |
925
+ | Agent identity | **JWS-signed Agent Cards** (Heimdall); rejected tampered cards |
926
+ | Untrusted code | Utgard: network-none containers, resource caps, cgroups, no root, ephemeral destroy |
927
+ | Secrets | Only `.env.local` / `.env.realm`; never in markdown or git |
928
+ | Prompt injection | `<untrusted_context>` containment + immutable system prompt layer |
929
+ | Git safety | Yggdrasil worktrees; Mjollnir never force-merges |
930
+ | Deploy safety | Zero-trust `gh secret set` + human-approved PRs |
931
+ | Traceability | every significant action carved into Runes; target traceability index 0.984 (Rut) |
932
+
933
+ ## 6. Tech Stack Reference (current = TS/Python/React/Vue; target = Ymir Rut v2.6)
934
+
935
+ ### Current stack (build today)
936
+
937
+ | Layer | Choice | Norse shell |
938
+ |-------|--------|-------------|
939
+ | Control plane daemons | **TypeScript** (Node 22) | Bifrost, Svartalfaheim, Yggdrasil, Ratatoskr, Mjollnir, Valhalla |
940
+ | Agent orchestration | **Python 3.12+** + TS | Brokk / Kaia / Eindri (mirrors factory harness) |
941
+ | UI / UX | **React + Vue** | Hlidskjalf portal, Skrymir |
942
+ | Inter-agent | **A2A 1.0** (JSON-RPC 2.0/SSE) + **Redis** | Ratatoskr |
943
+ | Memory | **engram/engdbram** bridge `:4602` | Mimirsbrunn |
944
+ | Sandbox | Docker (rootless, network-none) + Python | Utgard |
945
+ | Gateway | Traefik/Caddy | Bifrost |
946
+ | Auth | OAuth2-proxy/Authentik + JWS cards | Heimdall |
947
+ | Tunnel | cloudflared | Gjallarhorn |
948
+ | Files | FileBrowser / MinIO | Skrymir |
949
+ | Persistence | Postgres 16 (self-hosted) + engram/SQLite | Runes/Mimirsbrunn |
950
+ | Process mgmt | PM2 / Docker | Valhalla |
951
+ | CI/CD | GitHub Actions + gh CLI | Mjollnir / deploy |
952
+ | Reused systems | `command-factory`, `firstmate`, `.compliance`, factory visualizer | — |
953
+
954
+ ### Target stack (Ymir Rut v2.6 — port AFTER end-to-end, ENTRY-009)
955
+
956
+ | Layer | Rut choice | Crate/module |
957
+ |-------|-----------|--------------|
958
+ | Control plane | **Rust (Edition 2024) + Tokio** | crates/{bifrost,hlidskjalf,svartalfaheim,ratatoskr,yggdrasil} |
959
+ | Broker | **NATS JetStream** | `bus::nats`, `dispatch::router` |
960
+ | IPC | **gRPC/Protobuf v3** + JSON-RPC/Unix sockets | `proto/v2/` |
961
+ | Worktrees | **libgit2** `.treehouses` | `worktree::libgit2`, `snapshot::diff` |
962
+ | Sandbox | rootless Docker + **cgroups v2** + seccomp | `runtime/utgard/` |
963
+ | Agent harness | Python 3.12+ / Node 22 (unchanged) | `runtime/brokk/` |
964
+ | Persistence | PostgreSQL 16 + MinIO/S3 | storage tier |
965
+ | Deploy | Helm charts + compose | `configs/` |
966
+
967
+ ## 7. Build Order (Updated)
968
+
969
+ | Phase | Scope | Depends on |
970
+ |-------|-------|-----------|
971
+ | P0 | Monorepo skeleton, AGENTS.md, realm routing, docs (lore, Rut, architecture) | — |
972
+ | P1 | Yggdrasil worktrees + Utgard sandbox | P0 |
973
+ | P2 | Memory — engram bridge (Mimirsbrunn) + Runes audit | P0 |
974
+ | P3 | Skills engine (Gungnir) + validation loop | P1 |
975
+ | P4 | **Ratatoskr A2A 1.0 backbone** (cards, registry, Redis) | P0 |
976
+ | P5 | Cron automation | P2, P3 |
977
+ | P6 | Realm multi-tenancy + tenant context loader + companies/houses | P0 |
978
+ | P7 | Hlidskjalf portal (React/Vue, Rut design system) + Skrymir | P4 |
979
+ | P8 | Bifrost + Heimdall (OAuth + card signing) + Gjallarhorn | P6, P7 |
980
+ | P9 | Mjollnir issue→PR pipeline | P1, P4 |
981
+ | P10 | Toolchain & deploy engine (Valhalla, GitHub CI/CD) | P1 |
982
+ | P11 | **Ymir Rut port** (Rust/NATS/gRPC re-floor) — only after P0–P10 work end-to-end | P0–P10 |
983
+
984
+ Detailed per-feature plans: `docs/plans/`. Full v2.6 target spec: `docs/ymir-rut.md`.
985
+ Mythos & houses: `docs/lore.md`. Decision history: `docs/append-only-log.md`. Show full message
986
+
987
+ Thought Process
988
+ Got all three YMIR docs — design system, lore, and master architecture. They hang together well: the allegory is genuinely load-bearing (every name maps to a real subsystem), the token spec is specific enough to implement directly from the page, and the OSS-first rule is applied consistently. A few things I caught while reading:
989
+
990
+ Inconsistencies worth fixing
991
+
992
+ Duplicate §3.11 in the architecture doc — "Þjazi Backend Integration" and "Company System — Houses" both carry 3.11, and Firstmate is ## instead of ###. Renumber: Houses → 3.12, Firstmate → 3.13.
993
+ ENTRY-008 is double-booked. design.md cites it as the "UI/UX-is-a-differentiator doctrine"; architecture §3.5 cites it as "the A2A collaboration differentiator" (Ratatoskr). Either one citation is wrong or two entries share a number.
994
+ The left rail conflates gates and realms. §5.1 says "7 realm gates (click = realm switch)" — but the seven gates are daemons (Bifrost…Ratatoskr), while realms are tenants (way-of/zerwiz/craig), switched via the top-bar chip. Suggest calling it a gate rail that opens daemon views, since tenant switching lives elsewhere.
995
+ §3.11 Þjazi is wearing another project's clothes. "Treehouse" worktrees, herdr sessions, fm_backend_herdr_cli, bin/fm-herdr-lab.sh, "the Captain" — that's Firstmate/herdr naming; Ymir's worktree system is Yggdrasil (.treehouses is only the Rut-era term). Same bleed appears in lore §V's Þjazi entry. Worth a name pass or an explicit note on what's being adopted vs. renamed.
996
+ Minor: Askr's accent #34d399 is --ymir-ok. Fine in chrome, but in the fleet graph where house seals and status rings co-occur they'll read as the same signal. Nudge the green or accept it knowingly.
997
+ Ready-to-execute next steps (declared in the docs, not built yet)
998
+
999
+ midgard/design-system/tokens.css — every value exists in design.md §4; I can emit the full file (forge + optional light theme, spacing/radius/motion, semantic dim washes).
1000
+ midgard/design-system/icons.md — the rune-glyph map (Algiz geometry, status ring states, gate glyphs) is specified but marked TBD.
1001
+ Token-driven component skeletons for Hlidskjalf (RealmGate, TaskChip, TraceRow, RecallPanel, …).
1002
+ Want me to start on any of these — or were you about to hand me a task against these docs?
1003
+
1004
+ i need the ui
1005
+
1006
+ Thought Process
1007
+ Hlidskjalf v0.1 — the full dashboard as a single self-contained file. Open it in a browser and it runs: all 8 views, live Ratatoskr/Runes stream, realm switching with house accents, the task lifecycle board with state motion, the well recall panel, sealable PRs, the works. Every value comes straight out of design.md, and the token block at the top of the CSS is written to extract 1:1 into tokens.css.
1008
+
1009
+ What's implemented
1010
+
1011
+ The full token set from design.md §4 — forge theme canonical, chisel inset bevels, steel borders, semantic dim washes. The :root block is ready to lift verbatim into tokens.css.
1012
+ All 8 views with real content: Fleet (agent cards + live A2A graph with animated edge hops), Tasks (lifecycle board where SUBMITTED→WORKING→COMPLETED flips on a timer with the 180ms fade+drift), Well (recall with score bars + timeline), Runes (append-only ledger, new carves stream in), Reviews (sealable PRs — ᛉ Seal stamps the card and carves a rune), Processes (Valhalla table with ticking CPU), Files (Skrymir, realm-scoped), Chat.
1013
+ Live bottom stream — Ratatoskr + Runes interleaved, pausable with held-event count (p to toggle).
1014
+ Realm switching — three tenants with house-accent tints, vault-rotation toast, realm-scoped search placeholder.
1015
+ Every state is glyph + color + text (● NOMINAL / ◐ DEGRADED / ◌ DOWN, task runes ᛊᚲᛟᚦ), keyboard-first (1–8, /, p), traceability index ticking at 240ms, density toggle, ember boot screen instead of a spinner, prefers-reduced-motion collapse.
1016
+ Choices I made where the docs were ambiguous — flag if you want them different: the left rail carries the 8 views with rune glyphs (this doubles as the seed of icons.md: ᛉ fleet, ᚲ tasks, ᛚ well, ᚨ runes, ᛏ reviews, ᛟ processes, ᚢ files, ᚱ chat); tenant switching lives in the top-bar realm chip, resolving the gates/realms conflation I flagged earlier. Eindri-β shows DEGRADED on purpose so the amber path is visible.
1017
+
1018
+ Next: extract tokens.css, or port this into the React shell (React + Vite, components matching §5.2) — say which and I'll cut it.
1019
+
1020
+
1021
+
1022
+ Send a Message
1023
+
1024
+
1025
+
1026
+ Deep Think
1027
+ Max
1028
+
1029
+
1030
+
1031
+
1032
+
1033
+
1034
+ Copy
1035
+ 1
1036
+ 2
1037
+ 3
1038
+ 4
1039
+ 5
1040
+ 6
1041
+ 7
1042
+ 8
1043
+ 9
1044
+ 10
1045
+ 11
1046
+ 12
1047
+ 13
1048
+ 14
1049
+ 15
1050
+ 16
1051
+ 17
1052
+ 18
1053
+ 19
1054
+ 20
1055
+ 21
1056
+ 22
1057
+ 23
1058
+ 24
1059
+ 25
1060
+ 26
1061
+ 27
1062
+ 28
1063
+ 29
1064
+ 30
1065
+ 31
1066
+ 32
1067
+ 33
1068
+ 34
1069
+ 35
1070
+ 36
1071
+ 37
1072
+ 38
1073
+ 39
1074
+ 40
1075
+ 41
1076
+ 42
1077
+ 43
1078
+ 44
1079
+ 45
1080
+ 46
1081
+ 47
1082
+ 48
1083
+ 49
1084
+ 50
1085
+ 51
1086
+ 52
1087
+ 53
1088
+ 54
1089
+ 55
1090
+ 56
1091
+ 57
1092
+ 58
1093
+ 59
1094
+ 60
1095
+ 61
1096
+ 62
1097
+ 63
1098
+ 64
1099
+ 65
1100
+ 66
1101
+ <!doctype html>
1102
+ <html lang="en">
1103
+ <head>
1104
+ <meta charset="utf-8">
1105
+ <meta name="viewport" content="width=device-width,initial-scale=1">
1106
+ <title>HLIDSKJALF — Ymir</title>
1107
+ <link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M16 27V7M16 12 8 4M16 12l8-8' stroke='%2338bdf8' stroke-width='2.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E">
1108
+ <link rel="preconnect" href="https://fonts.googleapis.com">
1109
+ <link href="https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500;700&display=swap" rel="stylesheet">
1110
+ <style>
1111
+ /* ============================================================
1112
+ YMIR DESIGN TOKENS — extract verbatim to midgard/design-system/tokens.css
1113
+ ============================================================ */
1114
+ :root{
1115
+ /* canvas — the forge chamber */
1116
+ --ymir-bg-0:#080c14; --ymir-bg-1:#0b101c; --ymir-bg-2:#101726; --ymir-bg-3:#182334;
1117
+ /* accents — two lights of Bifrost */
1118
+ --ymir-cyan-1:#38bdf8; --ymir-cyan-2:#0ea5e9; --ymir-violet-1:#818cf8; --ymir-violet-2:#6366f1;
1119
+ /* structure — hammered steel */
1120
+ --ymir-steel-1:#334155; --ymir-steel-2:#475569; --ymir-steel-3:#94a3b8; --ymir-chisel:#7dd3fc;
1121
+ /* semantics — state of the forge */
1122
+ --ymir-ok:#34d399; --ymir-warn:#fbbf24; --ymir-danger:#f87171; --ymir-info:#38bdf8;
1123
+ --ymir-ok-dim:rgba(52,211,153,.15); --ymir-warn-dim:rgba(251,191,36,.15);
1124
+ --ymir-danger-dim:rgba(248,113,113,.15); --ymir-info-dim:rgba(56,189,248,.15);
1125
+ /* text on forge */
1126
+ --ymir-text-0:#e8edf6; --ymir-text-1:#b3c0d4; --ymir-text-2:#7b8aa3; --ymir-text-3:#4b5a73;
1127
+ /* type */
1128
+ --f-rune:'Cinzel',serif; --f-mono:'JetBrains Mono',monospace; --f-body:'Inter',sans-serif;
1129
+ /* space & shape */
1130
+ --ymir-radius:8px; --ymir-radius-panel:12px; --ymir-space-4:16px;
1131
+ /* bevel */
1132
+ --chisel-inset:inset 0 0 0 1px rgba(125,211,252,.12);
1133
+ }
1134
+ /* realm tints — structural only (design.md P5) */
1135
+ .shell[data-realm="way-of"]{--realm:#38bdf8}
1136
+ .shell[data-realm="zerwiz"]{--realm:#8b5cf6}
1137
+ .shell[data-realm="craig"]{--realm:#f59e0b}
1138
+
1139
+ /* ============ base ============ */
1140
+ *{box-sizing:border-box;margin:0;padding:0}
1141
+ html,body{height:100%}
1142
+ body{background:var(--ymir-bg-0);color:var(--ymir-text-0);font:15px/22px var(--f-body);overflow:hidden}
1143
+ /* hand-hammered steel — ~2% noise, chrome only, never behind narrative */
1144
+ body::before{content:"";position:fixed;inset:0;z-index:99;pointer-events:none;opacity:.025;
1145
+ background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E")}
1146
+ ::selection{background:rgba(56,189,248,.3)}
1147
+ :focus-visible{outline:2px solid var(--ymir-chisel);outline-offset:2px;border-radius:4px}
1148
+ button{font:inherit;color:inherit;background:none;border:none;cursor:pointer}
1149
+ input{font:inherit;color:inherit;background:none;border:none;outline:none}
1150
+ kbd{font:11px/1 var(--f-mono);color:var(--ymir-text-2);border:1px solid var(--ymir-steel-1);border-radius:4px;padding:2px 5px}
1151
+ .mono{font-family:var(--f-mono);font-variant-numeric:tabular-nums}
1152
+
1153
+ /* ============ shell ============ */
1154
+ .shell{display:grid;height:100vh;grid-template-columns:236px 1fr;grid-template-rows:56px 1fr 192px;
1155
+ background:var(--ymir-bg-0)}
1156
+ .shell.compact{--ymir-space-4:10px}
1157
+
1158
+ /* ============ left rail ============ */
1159
+ .rail{grid-row:1/4;background:var(--ymir-bg-1);border-right:1px solid var(--ymir-steel-1);
1160
+ display:flex;flex-direction:column;padding:14px 10px}
1161
+ .brand{display:flex;align-items:center;gap:10px;padding:2px 8px 16px}
1162
+ .emblem{width:38px;height:38px;flex:none}
1163
+ .wordmark{font:700 19px/1 var(--f-rune);letter-spacing:.18em;color:var(--ymir-text-0)}
1164
+ .wordmark small{display:block;font:11px/1.6 var(--f-mono);letter-spacing:.08em;color:var(--ymir-text-2);margin-top:4px}
1165
+ .nav{display:flex;flex-direction:column;gap:2px;flex:1}
1166
+ .gate{display:flex;align-items:center;gap:12px;width:100%;height:46px;padding:0 12px;border-radius:var(--ymir-radius);
1167
+ Generated by AI. For reference only.
1168
+ Tech Blog
1169
+ Contact us
1170
+ Terms of Service
1171
+ and
1172
+ Privacy Policy