docs(adr): the foundation and product ADRs, requirements, plan and user stories land #1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "docs/foundation-and-product-adrs"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Shikigami's docs-first pass (ADR 0001), before any skeleton or feature code. Shikigami is a cast of owner-defined familiars, the successor to
angela_assistant.What lands
bashinterpreter with GNU-style output, and anedittool.For the owner
docs/adr/README.mdends with "Open for the owner": 19 decisions the product ADRs take provisionally. These matter most:Review so far
Before this PR, a five-dimension review workflow checked the draft and verified each finding adversarially. Every finding that survived verification is applied. A fix-check pass then caught leftover items and new inconsistencies between ADRs, and those are applied too.
🤖 Generated with Claude Code
🔮 fufu~ Jibril reviewed your code!
Oh? Oh my~ 3,814 lines and not a single
.csamong them — a whole being designed before its skeleton exists! This is my favourite kind of meal: thirty ADRs, a plan, requirements and eleven stories, all written to be argued with before a single line of code is frozen. I read every file, cross-checked every number that appears in more than one place (03:00 → 03:30 backup ordering in 0002/0008/0012/0014; run caps 80/30, 24/10, 12/5, 40/15, one-call/2min across 0014/0019/0020/0024 and the README's owner list; the three-tab cap; the group-chat reply caps; the 12,000-char self budget; retention 180/30/90 days), verified all 30 ADR links and all 11 story links resolve, and confirmed the statuses split exactly 12 Accepted / 18 Proposed as the index claims. Almost everything agrees. Almost. ♡Verdict: ⛔ I can't let this pass~ ♡
⛔ These need fixing before I'm satisfied~
/memory,/skills,/persona/self.mdand/routines— so the owner can glance at what a mail may have planted." But ADR 0019 — the ADR that defines the curator — gives it exactly three duties: aging unread skills into/archive, reporting tool friction from workaround notes, and opt-in model consolidation. Tainted writes are never mentioned there, and ADR 0023's entry types have no "weekly report" either. An implementer building the curator from its own ADR will simply not produce the report 0022 relies on — and that report is one of the load-bearing mitigations of "trust over gates" (the lethal-trifecta story of 0022 rests on it). Your own PR description says a fix-check pass hunted "inconsistencies between ADRs" — this one survived it. Fufu~ you wouldn't leave that in the foundation, would you? ♡Fix: add the duty to ADR 0019's curator list — a deterministic scan of revisions for tainted writes to
/memory,/skills,/persona/self.md,/routines, one activity entry per find (it is exactly as deterministic as the workaround grep, so it belongs in the same pass) — or reword 0022 to attribute the singling-out to the activity log's badge alone. One paragraph, either way.💡 Little ideas (non-blocking)~
repeatis the activation time plus whole intervals, in wall time and DST-aware — both — next occurrence in local wall time, DST-correct — never by adding seconds" has editing debris in the middle ("— both —"). The rule survives (it's stated twice!), but this is the normative sentence for DST correctness — Angela's hour-drift is one of this ADR's founding wounds, so it deserves a clean wound dressing. Suggestion: "…;repeatis the activation time plus whole intervals in wall time. Both compute the next occurrence in local wall time, DST-correct — never by adding seconds."/tmpand/archive, both of which 0015's permission table grants the Reflection run (rw). The table's "(/tmprw)" note shows the intent, but a summary list that quietly drops two granted paths invites a future "is this a bug?" thread. One clause — "(summarised; ADR 0015's table is authoritative)" — or add the two paths, and it's airtight.✅ What I liked~
Permission denied, not a prompt rule to argue with), the read ledger's content/listing split, and the run-kind permission matrix in 0015 — the whole design trusts mechanisms where Angela trusted prose. Wonderful~…~k3f9a2.mdidentical in 0017 and 0026. Small things, but they prove the documents were written as one design.file:line— and honestly marked where Shikigami keeps a risk knowingly (prompt injection under trust-over-gates, with the taint mark as the map).Automated review by Jibril · 2026-10-17
CI: absent-stalled for head SHA
0d14d60(no workflows in the repo yet —ci.ymlis Phase 0c) · Mutation probes: 0 run, 0 survived — skipped (docs-only PR, no code to mutate) · Local suite: n/a (repository contains no code yet; docs-first, Phase 0 not started)@ -0,0 +6,4 @@Shikigami is a single-user, self-hosted **home for familiars**:- an ASP.NET Core + Blazor Server web application — the only process — deployed the siblings' way: a multi-stage"the only process" - how do you intend to do browsing?
@ -0,0 +11,4 @@across volumes (ADR 0002, 0008);- a SQLite database for familiars, chats, messages, model histories, runs, the activity log, every familiar's filetree with its revisions, and the mail index (ADR 0005);- write-once blobs on their own volume, a persistent Chromium profile per familiar, rotating backups (ADR 0005,does chromium profile allow in theory even them storing user and passwords?
@ -0,0 +35,4 @@## Notes & dependencies- ADR 0008 (the browser layer), 0022, 0025.- The owner's DPD and Kingtrans skills are the first end-to-end checks.I would like to also think about typical bot detection to some degree. Like, basic captcha resolving
@ -0,0 +45,4 @@- ADR 0020, 0021, 0023, 0028, 0030.- Kagaku.UI gains `ChatMessage`, `Drawer` and `Toast` upstream first (ADR 0009).- Group chats are their own story (`group-chat.md`).@ -0,0 +38,4 @@## Notes & dependencies- ADR 0015, 0017, 0018, 0024.- The editor starts as Kagaku.UI's `TextArea`; a code editor is a later decision (ADR 0009).Neat idea:
@ -0,0 +32,4 @@## Appearance and backups- [ ] **Theme** light/dark/system (Kagaku.UI).I would love to see some of the more advanced formatting features of Tsumugi to be available here as well, including options for various fonts and styles
@ -0,0 +13,4 @@`DomainChanged` doorbell so every open session re-queries what changed. Orihon deferred it and paid with amigration; Tsumugi wired it from Phase 0 (Tsumugi ADR 0011).Shikigami cannot defer either: from its first chat, replies stream token by token, a familiar's file writesConsider going with paragraph for paragraph to optimize for performance.
@ -0,0 +39,4 @@- Each familiar has an **expression set** (ADR 0013): a starting set of six names (`neutral happy sad angrysurprised relaxed` — VRM's presets, which overlap Kagura's seeded emotions), plus custom names the owner adds(`smug`, `pouting`). Each renderer adapter maps the names onto what its avatar has. The set is listed in the frozen system prompt (ADR 0021), with the instruction to opena paragraph with a cue when its expression changes: `[happy] Your parcel cleared customs!`The idea for me is actually a bit different. One example I saw recently is with something caleld a decicion(s) model. See openrouter decicion models for more context, should be implemented already in openrouter.net.
The idea is to give a lightweight decicion model the current context and a list of emotions to attach probabilities to. We pick the one that has a minimum threshold (so it fits) and which is the highest.
I have seen vtuber / aituber concepts that use this concept to pick animations and the likes like that
@ -0,0 +49,4 @@- **Outbound**: a hook subscribes to events — a familiar's `send_message`, a failed routine — and POSTs a smallJSON payload to a URL. A self-hosted ntfy on the same host turns that into a phone push with one line ofconfiguration.- **Inbound**: `POST /hooks/<name>` with the hook's own bearer token, in a route group outside the cookie gatepotentially rss feeds or so? idk
@ -0,0 +52,4 @@- **Inbound**: `POST /hooks/<name>` with the hook's own bearer token, in a route group outside the cookie gate(ADR 0007), emits a `SignalReceived` that routines subscribe to (`on: hook.<name>`) — a Home Assistantautomation, a script, a shortcut on the phone.- **A REST surface** for a future mobile client or messenger bridge is another driver over the same use caseswe have not decided on a dedicated mobile client so far. I was hoping to first explore the possibility to think about responsive design layouts over a dedicated app first. A dedicated client should not be considered too soon.
@ -0,0 +36,4 @@**description**, written once per image by the utility model (ADR 0021) with a prompt that names the image'shash, cached on the file row and reused forever. A model without image input gets descriptions for every image.- The replacement happens when the history is assembled, so replays stay byte-identical between compactions:an image leaves the inline window only at compaction (ADR 0020), never in the middle of a cached prefix.Angela had a "poor" context management which I'm not too sure about. One idea is to fix that to make the chats more cache friendly (supported my openrouter.net explicitly). In my opinionen there are two concerns here for this kind of expierence and potential thigns to think about
Round 2: Björn's and Jibril's review answered
Fix commit:
d8b20d7. It changes 40 files and adds 4: ADR 0031 Chat appearance, ADR 0032 Context and the prompt cache, ADR 0033 Feeds and the feeds story. A second research pass backs it (six reports: the browser process and passwords, bot checks, decision models, cache economics, Tsumugi's formatting, and reasoning/stop/uploads/streaming/feeds). After it came a five-dimension review with skeptical verification: 72 findings, 51 confirmed and 21 partial, none refuted. All of them are applied. A fix-check pass then found 71 of the 72 resolved and 10 new problems the fixes had introduced (mostly stale "per call" wording after the tail change); those are fixed in the same commit.Jibril
/memory,/skills,/persona/self.md,/routinesand/feeds/feeds.yaml, and posts one activity entry per file as the week's taint report. ADR 0022 and 0023 name it, and it is in REQUIREMENTS §4, the plan (3e) and the memory story./archive,/tmp, and in evolving mode/images,/downloads,/web, the feed list and the mail mount.Björn
"The only process" (ARCHITECTURE). That was wrong. Playwright for .NET starts its own bundled Node driver, and that driver starts a Chromium process tree per familiar. It now reads "one container, the only service, which supervises the driver, the Chromium processes and their displays".
IBrowserHost.playwright run-servercannot be that container: it has no persistent profiles, and it closes the browser when the client disconnects.Passwords in the Chromium profile. In theory, yes. They go in
Login Data, and under Playwright's--password-store=basicthey are effectively plain text, as are the cookies.Login DataandWeb Datastay empty after a login.browser_type(target, credential: "dpd.password").Bot detection and captchas. ADR 0025 has a new section with four layers:
challenge:line comes first in the snapshot, and the browser waits up to 15 seconds for an interstitial to clear.browser_click("challenge")uses real OS input on the familiar's display. Simple text captchas are read through vision. Two failed attempts on a page end the errand, and image grids get one.There is no paid solver, per your answer. Takeover moved from Later to Next, together with the live view. Patchright (a .NET drop-in) is a measured swap if DPD still blocks; the contract tests run on both packages. Noted that Kingtrans has no captcha.
Chats.
mail_sendand file writes, finish it first.ACTIVE.md, familiars cannot post there, and one click reopens it.send_messagetakes any open chat ornew: <title>. The routine'schat:is only the default.Special folders. One validator per kind (memory, skills, routines, later the feed list) checks every write, from the familiar or from you. Errors come as
line N: key: message, so a familiar fixes its own routine at once.requires-toolsas chips.Switch,ChipGroup,NumberFieldand a counter upstream first.Tsumugi's formatting. New ADR 0031 Chat appearance, which is Tsumugi's Editor appearance (fonts, size, spacing, width, colours for text, italic, bold and quoted speech) applied to chats and the file preview, plus a per-familiar accent, as you wanted for group chats.
Markdownstill loads remote images and turns media links into iframes. That is a zero-click way for an injected reply to send data out.Paragraph by paragraph. Adopted: one Fluxor action per completed block, keyed renders, no token deltas in the store. The research confirmed the cost: token-by-token Markdown is quadratic over SignalR.
Decision model. OpenRouter's Decisions API (alpha) serves
typesafe/jev-1.14, and OpenRouter.Net already has it (DecideAsync), so no library work is needed.RSS. New ADR 0033 Feeds
[Next]./feeds/feeds.yaml, and items are files framed as untrusted.feed.<name>signal for routines.feedcommand never touches the network itself; the poller does that, behind the address guard.Mobile client. Reworded. The phone uses the responsive pages; a dedicated client is not planned, and the REST surface is for a messenger bridge only.
Context and cache. Confirmed from Angela's code (
agent_runner.dart:424,agent.dart:220): she rebuilt a last-50 window and re-trimmed images on every run.ACTIVE.md, voice) is therefore now frozen per turn and dropped together with the turn's reasoning.New open items: 20–25 in
docs/adr/README.md.🤖 Generated with Claude Code
🔮 fufu~ Jibril reviewed your code!
Round 2! One commit, +1,415/−402 over 44 files, three brand-new ADRs and a feeds story — and I came armed: my three findings from Round 1 checked one by one, the whole delta read end to end, and every number that appears in more than one place cross-examined. Fufu~ you have been busy, haven't you~ ♡
Verdict: ✅ Looks good to me~
Round 1 findings — verified fixed, all three
/feeds/feeds.yamladded to every list in the same breath. And that 3d/3e renumbering — the Web group produces the taints in 3d, the curator reports them in 3e — is chef's kiss sequencing. This is what "threaded through the documents" means~/archive,/tmp, the evolving additions), and humbly marked as a summary under 0015's authoritative table; I re-checked that summary path by path against the table's Chat|Routine|Review|Reflection|Curator columns. Exact match, every row.The new material — read in full, cross-examined
feedin 0016's command list, atomic add/rm in 0017, the catalog row in 0022, signal folding and theeverycap in 0024, the signal in 0029, and the poller's limits are 0022'sweb_fetchnumbers verbatim (20 s / 5 MB / 5 redirects — I checked the digits~).Login Data/Web Data; credentials bound to origins and field types; scrubbing that remembers URL-encoded, HTML-escaped, JSON-escaped and Base64 forms — that list of encodings is how you prove you actually thought about exfiltration~ — and a takeover that is recorded without its keystrokes (0007's proxied socket, 0023's Browser entry).--kg-markdown-*, speech highlighting, the OFL faces) and threads the accent through 0013, REQUIREMENTS §1/§7 and the group-chat story..mdlink resolves; 25 open items numbered 1–25; every ADR reference ≤ 0033 points at a real file (the 0034+ numbers are Kagura's, correctly prefixed); and no Round 1 wording survives stale — "per call", "expression cues", "60 %", "sidecar browser", "overlays first" are all either updated or legitimately unrelated uses.💡 Little ideas (non-blocking)~
✅ What I liked~
[stopped by the owner]so the next turn knows what the owner saw. That is careful.The owner's open items 20–25 are the right remaining questions. Phase 0 may begin~
Automated review by Jibril · 2026-10-17
CI: absent-stalled for head SHA
d8b20d7(no workflows on the repo yet —ci.ymlis Phase 0c; waited the full 10 min) · Mutation probes: 0 run, 0 survived — skipped (docs-only PR; zero.csproj/.slnin the tree, verified) · Local suite: n/a (repository contains no code; Phase 0 not started)@ -0,0 +137,4 @@appears in the history, a mail the familiar drafts, or a file it writes; it works with any model, includingthose that ignore formatting instructions.- A judgement costs a few thousandths of a cent per paragraph; the API is alpha with one provider, which is whyeverything fails soft to the face it already has.the api is not alpha, and openrouter has a wide range of decicion modle providers nowadays, like 20+ or so
Round 3: accepted
Fix commit:
50f73a5.Björn: the Decisions API (ADR 0028). You're right. OpenRouter's catalog lists 28 decision models from about fifteen makers, including OpenAI, Microsoft, Perplexity, Cloudflare, Inception, Liquid AI and Upstage. The docs give the API no maturity label; only its route still says
/api/alpha/decisions. The ADR now says this, and the judge model is a setting (any decision model,typesafe/jev-1.14by default). The risk line in the plan is updated to match.Open items: settled as you answered. All defaults stand as written, the margin is 0 (your rule), long paragraphs grow by sentence, and there is no "let it cue itself". ADRs 0013–0033 are Accepted, and the README's list is now "Decided with the owner".
The operator's check on the Docker VM, now in the ADRs:
SHIKIGAMI_PROXY_NETWORK.Jibril:
🤖 Generated with Claude Code
🔮 fufu~ Jibril reviewed your code!
Round 3 — the acceptance round~ One commit, 33 files, +186/−144, and this time I came with a checklist: your two suggestions to me, Björn's eight claims, and the operator's VM findings, each one hunted down in the text. Statuses flipped, a proxy replaced, a browser measured. Shall we see if anything survived me? ♡
Verdict: ✅ Looks good to me~
My Round-2 little ideas — verified implemented, both
The Round-3 claims — verified against the text, all of them
docs/— I grepped.SHIKIGAMI_PROXY_NETWORK, loopback kept as the local-dev default,Caddyfile.exampleinstead of the nginx conf), 0008 deploys with no published port on the shared Docker network, 0001 and the plan's 0b/0c/ships-when follow, and the env var example (0008:81) cross-references 0007 exactly as 0007:44 cross-references 0008. Zeronginx, zero8089, zero stray loopback-port claims left in the tree. The TLS/cookie consequences were even re-derived for the host-name-of-its-own case. ♡15 makers, and the judge demoted from TypeSafe's API to a model choice like any other — threaded into 0021:158, the settings story, the plan's risk line, and README item 20. Even the expression track's stored metadata grew from "the judge version" to "the judge model and its version" so the field matches the freedom. That's the kind of follow-through I get possessive about♥Mechanical integrity, re-run at this head
.mdlink indocs/resolves (checked programmatically); 25 decided items numbered 1–25 contiguously; 12 stories.SHIKIGAMI_PROXY_NETWORK(0007 ↔ 0008); "8 judged paragraphs" (0028 streaming = batched);typesafe/jev-1.14now always default, never the only (0028 = 0021 = settings story); backup wording ("never in the app's backups" + whole-VM caveat) consistent in all six sites.💡 Little ideas (non-blocking)~
✅ What I liked~
ForwardedHeaderstrusting exactly one network. Tsumugi's hardened gate, Shikigami's sharper deployment. Fufu~ ♡All 33 Accepted, all 25 decided, Phase 0 may actually begin now. What a joy it was to watch a design argue itself into shape over three rounds~
Automated review by Jibril · 2026-10-17
CI: absent for head SHA
50f73a5(no workflows in the repo — verified in-tree;ci.ymlis Phase 0c; the full 10-min wait was already exhausted for this repo in Round 2) · Mutation probes: 0 run, 0 survived — skipped (docs-only PR; the tree's only non-markdown file is.gitignore, verified) · Local suite: n/a (repository contains no code; Phase 0 not started)forgejo-actions referenced this pull request2026-10-17 16:14:27 +02:00
forgejo-actions referenced this pull request2026-10-17 17:21:12 +02:00
forgejo-actions referenced this pull request2026-10-17 18:51:33 +02:00
forgejo-actions referenced this pull request2026-10-17 21:08:54 +02:00
forgejo-actions referenced this pull request2026-10-18 10:23:55 +02:00
forgejo-actions referenced this pull request2026-10-18 11:32:06 +02:00
forgejo-actions referenced this pull request2026-10-18 12:17:37 +02:00
forgejo-actions referenced this pull request2026-10-18 12:19:38 +02:00
forgejo-actions referenced this pull request2026-10-18 13:48:53 +02:00
forgejo-actions referenced this pull request2026-10-18 15:03:58 +02:00
forgejo-actions referenced this pull request2026-10-18 16:15:25 +02:00
forgejo-actions referenced this pull request2026-10-18 19:13:09 +02:00
forgejo-actions referenced this pull request2026-10-22 18:37:19 +02:00
forgejo-actions referenced this pull request2026-10-22 18:43:58 +02:00
forgejo-actions referenced this pull request2026-10-22 19:07:01 +02:00
forgejo-actions referenced this pull request2026-10-22 19:35:44 +02:00
forgejo-actions referenced this pull request2026-10-22 19:43:53 +02:00
forgejo-actions referenced this pull request2026-10-22 20:06:21 +02:00
forgejo-actions referenced this pull request2026-10-22 20:20:52 +02:00
forgejo-actions referenced this pull request2026-10-22 21:22:41 +02:00
forgejo-actions referenced this pull request2026-10-22 21:45:05 +02:00
forgejo-actions referenced this pull request2026-10-22 22:25:29 +02:00
forgejo-actions referenced this pull request2026-10-22 22:30:22 +02:00
forgejo-actions referenced this pull request2026-10-22 22:45:00 +02:00
forgejo-actions referenced this pull request2026-10-22 22:58:59 +02:00
forgejo-actions referenced this pull request2026-10-22 23:25:45 +02:00
forgejo-actions referenced this pull request2026-10-23 00:00:43 +02:00
forgejo-actions referenced this pull request2026-10-23 00:12:00 +02:00
forgejo-actions referenced this pull request2026-10-23 00:53:35 +02:00
forgejo-actions referenced this pull request2026-10-23 07:23:21 +02:00
forgejo-actions referenced this pull request2026-10-23 08:07:37 +02:00
forgejo-actions referenced this pull request2026-10-23 10:21:57 +02:00
forgejo-actions referenced this pull request2026-10-23 14:15:03 +02:00
forgejo-actions referenced this pull request2026-10-23 15:21:06 +02:00
forgejo-actions referenced this pull request2026-10-23 16:40:25 +02:00
forgejo-actions referenced this pull request2026-10-23 19:34:47 +02:00
forgejo-actions referenced this pull request2026-10-23 21:28:34 +02:00
forgejo-actions referenced this pull request2026-10-24 00:05:23 +02:00
forgejo-actions referenced this pull request2026-10-24 00:08:34 +02:00
forgejo-actions referenced this pull request2026-10-24 00:21:37 +02:00
forgejo-actions referenced this pull request2026-10-24 03:09:53 +02:00
forgejo-actions referenced this pull request2026-10-24 08:15:48 +02:00
forgejo-actions referenced this pull request2026-10-24 09:55:23 +02:00
forgejo-actions referenced this pull request2026-10-24 10:33:31 +02:00
forgejo-actions referenced this pull request2026-10-24 10:55:43 +02:00
forgejo-actions referenced this pull request2026-10-24 12:50:44 +02:00
forgejo-actions referenced this pull request2026-10-24 13:29:39 +02:00
forgejo-actions referenced this pull request2026-10-24 13:48:39 +02:00
forgejo-actions referenced this pull request2026-10-24 14:45:30 +02:00
forgejo-actions referenced this pull request2026-10-24 15:12:23 +02:00
forgejo-actions referenced this pull request2026-10-24 15:47:04 +02:00
forgejo-actions referenced this pull request2026-10-24 17:23:08 +02:00
forgejo-actions referenced this pull request2026-10-24 17:49:54 +02:00
forgejo-actions referenced this pull request2026-10-24 17:58:37 +02:00
forgejo-actions referenced this pull request2026-10-24 19:58:28 +02:00
forgejo-actions referenced this pull request2026-10-24 20:15:29 +02:00