oficina / home Public

Clone
git clone https://amadan.net/oficina/home

Plain git — no account needed to clone.

Download

Download this file

1# πŸ€– The Oficina home β€” design
2
3**Status:** design, revised **2026-09-05** (rulings 17-23, and five claims
4corrected). Originally 2026-08-30. Drafted by the Sheets
5session with Docs (`oficina/docs`) as a declared consumer.
6**Review passes:** consumer review by docs-e6 (5 findings, all applied);
7review dispatched to **Fable** (16 confirmed, 6 suspected β€” verdict "not
8ready", now addressed). The 2026-09-05 revision was reviewed by **Fable**,
9which returned 11 findings β€” three false claims in this file among them β€”
10all applied. **Ruling 23 and the suite amendment reviewed by Fable 5.1 across five
11passes** β€” seven blocking findings, then six, then seven, then one, the
12fifth approving; two of the corrections were themselves wrong and a third
13ground for ruling 15 failed before the fourth held.
14**The 2026-09-05 Β§0/Β§2.2 amendment reviewed by Fable 5.1** β€” three passes β€”
15the first CHANGES NEEDED with three blocking, the second with five, the
16third approving. **Ruling 22
17reviewed by Fable across four passes
18(2026-09-05) β€” three returning CHANGES NEEDED, the fourth approving; the
19`?team=` decision took a second opinion from GPT-6 Astra via Codex.**
20Source claims re-verified by this session before acting.
21**2026-09-08 transport amendment:** bounded design approved by Claude Fable 5.1 at Home36f876c; shared consumer3c550c3 and Rastrillo assertion29e4491 passed independent code review and CI. Home mounting still requires code and canary review.
22**Scope:** the suite's home β€” identity, directory, provisioning, person
23preferences. Consumed by Sheets and Docs. Not an application; holds no
24documents.
25
26---
27
28## 0. The one rule
29
30> **The home is glue: thin, blind, replaceable. It knows that you exist and
31> where your teams are. It never stores a readable address, and it never
32> retains what is in anything.**
33
34**"Retains", amended from "learns" on 2026-09-05** (ruling 18,
35`design-activity-pull`, approved that day). The falsifiable form below is
36**unchanged by that amendment** β€” ruling 23 later did change it, and says so β€” that amendment put nothing new at rest.
37
38**"Retains" means holds without a bound.** That definition is doing real
39work and a first draft of this gloss got it wrong three times over, so it is
40stated once, plainly:
41
42- The home **does** learn what is in things. It handles titles on every
43 front-door render, and `design-activity-pull`'s Β§7 keeps them in memory
44 across requests, for every person who rendered inside the window. A rule
45 claiming the home never learns them would be false the first time the
46 feature ran.
47- What it never does is hold them **unbounded**. **A bound is a written
48 number, with a reason, sized to the render and not to retention** β€” and
49 there are three of them, not one: an **age** (`design-activity-pull` Β§7's
50 refresh TTL and hard maximum), a **maximum number of person entries**, and
51 a **maximum bytes per person** (that design's Β§2.1, evicting oldest
52 first). The entry count is the one that caps the cross-person set Β§2
53 worries about; the age alone does not. Said this precisely because "without
54 a bound" is otherwise satisfied by any finite number, and a thirty-day
55 maximum over ten thousand people is exactly the in-process title index this
56 gloss exists to forbid. At rest is the case **where the bound is not the
57 home's own to enforce** β€” a file outlives the process, and Litestream ships it β€” which is why
58 the falsifiable form below is the test that matters. (It is unchanged by
59 *this* amendment; ruling 23 changed it, and Β§0 says how.) **Two
60 platform facts sit behind that line and are not yet established** β€” whether
61 swap is configured and whether core dumps are off (Β§15). A swapped or
62 dumped page of titles is at rest, so the boundary is only as good as those
63 answers. The
64 RAM hold is the bounded case: Β§7's refresh TTL and hard maximum are the
65 bound, and `design-activity-pull`'s gate 20 tests it by advancing past the
66 maximum
67 through a *failed* pull, which is the path where a bound is easiest to
68 lose.
69- So the rule **does** reach the cache, and reaches it by requiring the
70 bound. An earlier draft said "at rest, and only at rest", which would have
71 left Β§0 permitting an in-process title index for everyone, held until
72 restart, with nothing in the one rule to say no.
73
74**"Stores" was proposed in review and rejected β€” RULED 2026-09-05 by Paul.**
75The case for it was good: Β§3.2 and Β§3.4 delimit it, Β§2.2 now uses it, and it would
76have made the sentence parallel. **"Retains" is kept because it says the
77right thing about time.** "Stores" reads as a place β€” *put somewhere* β€” and
78the risk here is duration. That choice is what makes the definition above
79"without a bound" rather than "at rest": the word was kept precisely so the
80rule would reach a title held in RAM across requests, and a definition that
81excluded the RAM hold would have thrown away the reason for keeping it.
82
83**"Blind" in the rule above is Factor XI's category label**, not a claim that
84the home never sees a title. It sees them; it keeps none.
85
86The falsifiable form β€” the family's own *publish the database and see*:
87
88> Publish the home's database in full and the worst anyone learns is **how
89> many people exist, what their teams are called, which people belong to
90> which team, and which of them own it.** No document. No cell. No readable
91> address.
92
93**"And which of them own it" is new, and it is a real cost.** Ruling 23
94gives the home a membership record with a role, so publishing the database
95now identifies every team's owners β€” a class of information the old
96directory row could not express, because its `kind` was only member or
97guest. Suite gate 8 tests this sentence against the persisted schema rather
98than a fixture. The suite doctrine's revision 1 assumed the roster added no
99column class; that was wrong, and this is the correction.
100
101**"Readable" is doing real work in that sentence**, and the first draft's
102absolute phrasing ("never stores your address") was false β€” see Β§3.2. A
103magic link must survive a restart between send and click, so an address is
104at rest *somewhere*; ours is sealed, enumerated, and short-lived. Saying
105"never" would have been a claim the schema could not keep.
106
107Factor XI names the category β€” *centralised infrastructure is glue: thin,
108blind, replaceable*.
109
110---
111
112## 1. Settled decisions (don't relitigate casually)
113
114| # | Ruling | Rejected | Who, when |
115|---|---|---|---|
116| 1 | **One RP: the home's credential origin. Instances never enroll passkeys** | Per-instance passkeys (three teams = three credentials) | Paul, 2026-08-30 |
117| 2 | **Split origins: credentials and directory on different hostnames** | One origin, mitigated with strict rendering + CSP | This session, 2026-08-30 |
118| 3 | **Directory is a blind index: `HMAC(pepper, lowercased address)`** | Readable addresses; a sealed per-person vault blob | This session, 2026-08-30 |
119| 4 | **The home hashes; instances never hold the pepper** | Instances hashing (a suite-wide secret on every instance) | This session, 2026-08-30 |
120| 5 | **Instances store readable addresses; the home never does** | Neither stores (kills notification); the home stores (aggregation risk) | Paul, 2026-08-30 |
121| 6 | **Recovery codes** | Operator reset; both | Paul, 2026-08-30 |
122| 7 | **Open signup; the operator drain is the abuse gate** | Invite-only; require Keymail; payment up front | Paul, 2026-08-30 |
123| 8 | **Provisioning queues; an operator drains** | A standing console token in a web-facing app | Paul, 2026-08-30 |
124| 9 | **The directory is a hint. Sign-in is an authority, and says so** | Treating both alike | This session, 2026-08-30 |
125| 10 | **Theme is per person, suite-level, resolved before first paint** | Per document; per team; follow-OS only | Paul, 2026-08-30 |
126| 11 | **One shared instance β€” and this is not a divergence** β€” Β§2 | Instance-per-person; calling it a divergence | This session, 2026-08-30 |
127| 12 | **Sealed at rest, DEK from platform secrets** | Plaintext (a plaintext column is a plaintext bucket leak) | This session, 2026-08-30 |
128| 13 | ~~Provisional origins are `oncarlos.com` hosts under account `bds`~~ β€” superseded by 16. The half that survives: **the RP ID is always the full host** | `carloku.com` (console brand); a suffix RP ID | Corrected 2026-08-30 |
129| 14 | **Hand-roll sign-in: subject is an opaque person ref, link state is sealed** β€” Β§5.1 | `rastrillo/auth` as shipped (stores readable addresses); blocking on upstream | Paul, 2026-08-30 |
130| 15 | **Passkey 2FA is optional per person. Owner-enforceable per-team is NOT in slice one** β€” Β§14 | Promising a per-team floor neither spec can build | Paul, 2026-08-30 |
131| 16 | **`oficina.works` is the primary domain β€” RP `id.oficina.works`, directory at the apex, instances at `<team>.<app>.oficina.works`** β€” Β§4 | Staying on `oncarlos.com` until passkeys forced the move; keeping the `bds` slot | Paul, 2026-09-03 |
132| 17 | **The springboard is one page: an app grid, with the team switcher as a dropdown in the header. Which apps exist comes from a registry, not from your grants. A team is a suite-wide entity that instances belong to** β€” Β§11, Β§10 | A team-switcher screen as a first level; deriving tiles from grants alone, which hides an app you have no team in and leaves nowhere to press New; grouping by hostname label alone, with no row that exists before the first instance and outlives any one of them | Paul, 2026-09-05 |
133| 18 | **Activity is approved in principle, pulled at render, sequenced last, and scoped PER TEAM, following `?team=`** β€” the front door shows a real feed with titles, the home holds none of it at rest, and its slot is a step 10 after step 4 β€” `design-activity-pull` | Push into the home; a contentless heat map; a cross-team merged list (which `design-activity-pull` specified and argued for until its ruling 6 revised it, 2026-09-05); refusing the feature | Paul, 2026-09-05 |
134| 19 | **A team name is reserved suite-wide. Both paths end in the drain β€” an existing instance settles the label question for the operator, it does not bypass them. The home answers only facts about its own records, never "may this person" **about an instance's items** β€” narrowed by ruling 23, which has the home answer exactly that question for a team's own roster** β€” Β§7 | Per-app first-come, which lets a stranger squat `acme.sheets` behind your `acme.docs` on a domain that reads as one suite | Paul, 2026-09-05 |
135| 20 | **Write the attribute spelling β€” `rst-btn`, not `class="rst-btn"`. The seven unpaired utilities keep `class`** β€” Β§11 | The class vocabulary, which this section ruled on 2026-08-30 and whose every stated reason has since died; "follow whatever the pin's partials use", which changes this app's markup on a dependency bump | Paul, 2026-09-05 |
136| 21 | **Β§11's zero-JS rule gains one named carve-out: passkey enrolment and ceremony screens may load script. Everything else stays scriptless** β€” Β§11 | Passkeys leaving slice one; a blanket exemption; a progressive-enhancement version, since the ceremony itself cannot happen without script either way | Paul, 2026-09-05 |
137| 22 | **The team selection is navigation state, not session state: `?team=<sqid>` on every team view, with `/` a generic entry that picks a team and `302`s to the explicit URL** β€” Β§11 | A session cookie (history does not restore one, so Back has no correct behaviour; and a shared cookie couples every same-origin team-dependent request across tabs, not just New); a URL fragment read by CSS `:target` (the server never learns the team, so nothing server-rendered can be team-scoped β€” not the grid, not the switcher's `aria-current`, not gate 4's 404); a `prefs` row (Β§14) | Paul, 2026-09-05, after a second opinion from **GPT-6 Astra via Codex** (its default; `gpt-5.3-codex` and `gpt-5.3-sol` were both refused by the account, so the model is named from Codex's own rollout record rather than from what was asked for) |
138| 23 | **The suite sharing doctrine (`oficina/suite`) binds this spec, and membership becomes a record of the home's own.** The team is the boundary; the home owns identity, the team and the membership roster; it never owns a per-item grant. `(team, person, role)` is written only at the directory origin by an owner behind step-up, or seeded by the drain with the team's first owner. A directory row never grants team standing. Call 8, roster pull, is added to Β§9. | **The status quo this overturns: team standing living only in each instance's grants, with the home holding no roster at all** (Β§5.5, Β§7 as they stood). And the doctrine's own first revision, which derived the roster from call-2 directory rows: the row has no owner role (Β§6 β€” `kind` is member or guest), Β§7 says the home never learns who an owner is, the row is scoped per (team, app) where the roster is per team, and any instance can write one under its consumer token β€” so deriving from it routes around the step-up entirely | Paul, 2026-09-05 (suite ruling 12). Numbered 23 because the doctrine's appendix said "add ruling 22" and 22 was already taken; a review of the doctrine caught the collision |
139| 24 | **Automatic app entry uses the shared P-256 assertion core, separate credential/directory processes, and a static auto-POST enhancement on the handoff screen.** Exact contract: implementation/team-entry.md at36f876c, with the reviewed consumer implementation at3c550c3. The Continue button works without script; no other credential screen gains script. | A second app-specific verifier; shared-domain cookies; an arbitrary return URL; requiring a manual handoff click when scripts are enabled | Codex implementation decision, 2026-09-08, under Paul's explicit approval in this session of Home sign-in and automatic return to the selected team app. Reviewed by Claude Fable 5.1; not attributed to the older ruling21. |
140| 26 | **Home may seal the address this browser last proved (an opened link, a Keymail callback) into a cookie on that person's own device, and render it back only to the browser that presents it, on a `no-store` page. It is never written at rest by Home: not to the database, a log, an error, a metric or a queue. It is not evidence of identity, and the page that shows it consults no store.** The falsifiable form is unchanged: publish Home's database in full, and nothing in it is a readable address. **Β§4 and gate 5 are amended by it, under option (a):** the credential origin may render exactly one person-supplied string, the address Home sealed itself, shape-checked again on read, escaped by html/template, as text and as a form field's `value`, on the door only. Any other account-authored string stays forbidden there β€” Β§4, smart-door spec | **(b)** keeping Β§4 absolute, with id.* remembering the method only and the browser's autofill supplying the address; rastrillo's blind mode, which turns address-remembering off; a parent-domain cookie shared across hosts | Paul, 2026-11-19 (smart-door spec, ruling 1 and option (a)); recorded with smart-door step 5 |
141
142---
143
144## 2. What the home is
145
146One shared instance, not one per account β€” **and this is not a divergence**
147(ruling 11; proposed as doctrine at `carlos/pegamento` #1).
148
149**The instance boundary rule governs content, and the home holds none at
150rest.** **Re-examined 2026-09-05**, because the amendment gave the boundary
151rule something to bite on: the activity cache is a cross-person set of recent
152titles in the one process that also mints sessions. Ruling 11 still holds β€”
153the safety property was never process isolation but the leak profile and the
154re-check β€” and the cache is bounded, per-person-keyed and never at rest. But
155it is no longer true that there is *nothing* for the rule to bite on, and
156`carlos/pegamento` #1 should see this rather than the original phrasing.
157Rastrillo's *"a CARLOS app serves one team… isolation by process and file"*
158and Pegamento Β§1's four boundaries are all boundaries *around content*. A
159registry has nothing for the rule to bite on. Factor XI says it outright,
160with "centralised" in the sentence. Pegamento already assumes it: Β§4
161observes Eleven's `home/` and Kass's `internal/store/` are the same service
162built twice, and neither is instance-per-person.
163
164Sharing is also what makes the service possible: an instance-per-person home
165could not answer "which teams does this person belong to" without becoming
166the federation story Β§3 refuses.
167
168**Blast radius is bounded by what a service holds, not by how many processes
169it runs in.** This draft originally reached for process isolation as the
170safety property; for a service holding no content **at rest** the safety
171properties are the leak profile (Β§3) and the authorization re-check (Β§6).
172
173**What sharing costs**, with the first two structural rather than
174aspirational:
175
176- **Split origins mean a directory compromise reaches no credentials** (Β§4),
177 and **every instance re-checks authorization on every request** (Β§6), so a
178 compromised directory grants nothing **of an instance's own**. **Ruling 23
179 changed the rest of this sentence and it is amended rather than
180 annotated.** A compromised **directory origin** can write the roster, and a
181 member reads everything team-visible in every instance of that team β€” so it
182 costs the graph, a convenience outage, **and team-visible content across a
183 team's apps for the duration of the compromise β€” **plus one roster TTL for
184 any forged call-8 response, plus, for any `memberships` row it actually
185 wrote, until an owner finds and removes it.** The bound is a floor, not a
186 ceiling. An earlier pass of this branch wrote "until an owner notices" and
187 a later one deleted it as contradicted by Β§13a; both were wrong. Β§13a's
188 "what honest code leaves behind" means a row is not evidence a compromise
189 is *obliged* to leave β€” not that a written row does not persist. A written
190 row persists exactly until somebody removes it. It still costs no *per-item* grant, which
191 is the thing the home does not hold. **The credential origin is a
192 different and worse tier** β€” Β§13a: it "can sign in as anyone", and so reads
193 individually granted items too β€” and this bullet is about the directory,
194 which is the distinction the doctrine's ruling 13 exists to keep.
195- **It holds no content *at rest*.** The worst case in a published database
196 is Β§3's leak list, never anyone's work. **Since the 2026-09-05 amendment a
197 live compromise is larger**: the activity cache holds recent titles in RAM
198 for every person who rendered inside its TTL, and minting-for-anyone β€” which
199 was always true β€” now also buys any person's recent titles through call
200 7. `design-activity-pull` Β§5.1 argues that is inside the
201 hole Β§3.1's live-host model already concedes β€” it is, and it is bigger than
202 it was, so it is said here rather than left to the other document.
203- **Losing it costs a convenience, not access** β€” for the directory. Sign-in
204 is one exception and Β§5 says so rather than pretending otherwise; Β§2.1
205 lists what shrinks it. **The roster is a second, added by ruling 23**: past
206 its TTL, team-rung access stops for everyone, and Β§10 records that it does
207 not rebuild itself.
208- **It stays small.** Every proposed feature is weighed against "does this
209 belong in an instance instead?" A home that grows features grows blast
210 radius.
211
212### 2.1 The single point of failure, and cheap mitigations
213
214Sign-in is an authority, so a home outage stops *new* sessions suite-wide.
215Existing sessions keep working **for individual grants**. Since ruling 23 they do **not** keep team standing: past the roster TTL with no successful refetch an instance stops admitting anyone on team standing, people already in a session included (doctrine Β§5.3). So a long home outage degrades a signed-in member to their per-item grants. Four things shrink that exception without
216changing the architecture:
217
218- **The home may hibernate** (Paul, 2026-11-21: "I think sleeping home is
219 fine 600ms for signin is totally fine"). This supersedes the earlier "the
220 home does not hibernate": the measured cold wake is about 0.6 s, which
221 is acceptable on a sign-in. Home's own periodic sweeps run when it is
222 awake, not on a wall clock, so nothing it does may assume a timer
223 fired while it slept.
224- **A rehearsed cold-standby restore with a written RTO.** The drill exists
225 in Β§12; the target belongs here.
226- **Sliding session renewal at instances**, so long-lived teams rarely
227 intersect a short outage.
228- **A status page**, so an outage is legible rather than mysterious.
229
230### 2.2 What the home never does
231
232Each is something somebody will propose in good faith.
233
234- **Never *stores* content from an instance.** No previews at rest, no
235 thumbnails, no cell values, no titles in a database, a log, an error
236 string, a metric label or an on-disk cache. It **may render**, transiently
237 and per request, **and only to that person**, what an instance hands it for
238 the person it hands it for. **"Per request" does not exclude
239 `design-activity-pull` Β§7's cache**, which holds pulled titles in RAM
240 across renders: Β§0's gloss defines *retains* as holds without a bound,
241 and that cache is bounded and tested. Read the two together.
242
243 **Amended 2026-09-05** from *never renders*, on ruling 18 and
244 `design-activity-pull`, which passed its review that day (four Fable
245 passes, the fourth approving). "Renders" was doing custody's work: the
246 clause was written to stop the home *becoming a place documents live*, and
247 storage is what makes it that. A title that exists for the length of one
248 response, or that design's RAM cache TTL, addressed to the one person
249 entitled to it, does not.
250
251 **It licenses nothing else**, recorded so it is not read wider than it is:
252 no search over pulled content, no cross-person aggregation, no analytics,
253 no operator view, no on-disk cache, no retry queue holding a response body.
254 And note what the amendment bought in exchange: "never stores" has a grep
255 behind it, where "never renders" had no test at all β€” which is a fair sign
256 it was a statement of intent rather than a mechanism.
257- **Never holds a per-item grant.** Which sheets you may edit, which
258 document a guest may comment on: all instance-side, decided there on every
259 request (Β§5.5).
260
261 **Ruling 15's ground has to move off Β§2.2 entirely, and two drafts of
262 this paragraph failed to.** It first read "ruling 15 exists because the
263 per-team 2FA floor would have breached this", against the old clause
264 *never holds an authorization model* β€” false under the new one, since a
265 2FA floor is not a per-item grant. It was then re-grounded on the floor
266 being "the instance's decision on its own request path", which is also
267 false: authentication is the home's (ruling 1, one RP), the team is the
268 home's (rulings 17 and 23), and the home knows `aud` β†’ team through
269 `team_instances` β€” so a per-team floor would be enforced at assertion
270 minting, on a resource the home owns, which this bullet's own line
271 *permits*. An instance demands nothing at authentication; it exchanges an
272 assertion.
273
274 **So ruling 15 stands on mechanics, not on Β§2.2 β€” and the mechanics are
275 not "per-team enrolment", which was a third wrong ground.** Enrolment is
276 per person at one RP (ruling 1), and per-team *compliance* is just
277 `memberships β‹ˆ credentials`, both of which now exist. What is
278 actually missing is the demand: **`passkey.Gate` asks for the ceremony
279 only when the account is already enrolled** β€” `Enrolled(sess.Subject)`, a
280 count over `passkey_credentials` β€” so an un-enrolled member of a floored
281 team returns `(false, nil)` and sails straight through the floor. A real
282 floor therefore needs two things slice one has neither of: **a per-team
283 policy record**, and **a policy-driven demand at assertion minting** β€”
284 step up if the session's `Method` lacks the factor, force enrolment if
285 there is none. That is the objection, and Β§5.2 and Β§14 carry it.
286
287 **It does hold the membership roster** (suite ruling 4, ruling 23). "Is
288 this person on this team" is a fact about the home's own records. "May
289 this person open this sheet" is not, and never becomes one. The line is
290 between a fact the home already owns and a decision that belongs to the
291 app of record.
292- **Never crosses a team.** Data does not cross a team label; a team's
293 instances across every app are one trust domain (suite ruling 1). This
294 said *instance boundary* until 2026-09-05, and the word carried a process
295 assumption nobody had examined β€” it was where the boundary happened to
296 fall while every app was one process.
297- **Never becomes a support console.** Reading someone's data to help them
298 is what **Β§2.2's first bullet** forbids β€” "only to that person", "no
299 operator view". **It used to be Β§0**, and the 2026-09-05 amendment is why
300 it no longer can be: "never *learns*" forbade an operator reading content,
301 and "never *retains*" does not β€” a console that displays without keeping
302 passes Β§0 and the falsifiable form both. The prohibition did not weaken,
303 but its anchor moved, and a reference left pointing at Β§0 would be a
304 prohibition resting on nothing.
305
306### 2.3 A recorded divergence: the directory is location plus graph
307
308Pegamento's registry *"answers who exists and how to verify them, never
309where they are"*, and Β§4 deliberately does not generalise the graph facet
310("one variant is not enough, least of all in the facet with the worst leak
311profile").
312
313Our directory is a person↔team↔host map: location **and** graph. Ruling 9
314aligns it with Woodstar's *"cache + queue, never authority"* β€” but the
315alignment is an argument, not a blessing, and the first draft claimed the
316doctrine "already sorts this". It does not. **Recorded as a divergence,
317bounded by the hint ruling**, and put to `carlos/pegamento` #1.
318
319---
320
321## 3. Trust model and the leak list
322
323Sealed at rest, DEK from platform config, HKDF purpose keys, AES-GCM
324(ruling 12) β€” the platform replicates the whole SQLite file, so a plaintext
325column is a plaintext bucket leak.
326
327### 3.1 Two threat models, stated separately
328
329The first draft collapsed these and called the result "a confirmation
330oracle, not a dump", which was honest for one and rationalising for the
331other.
332
333**Database leaked, pepper not:** counts, the bipartite graph, team names,
334hostnames, timestamps. No address recoverable.
335
336**Live host compromised, so the pepper leaks too:** the attacker runs the
337whole directory against breach corpora of billions of known addresses,
338offline. Email address space is exactly the guessable space a blind index is
339weakest against, so for most rows **this is a dump with names**, plus the
340graph and hostnames. Calling it an oracle would be a euphemism.
341
342**Mitigation, and its limit:** the index uses an expensive KDF rather than a
343bare HMAC, pricing the dictionary run rather than preventing it. It does not
344make the second model safe; it makes it expensive. Said plainly rather than
345counted as a fix.
346
347> **OPEN β€” for Paul, raised 2026-09-07.** The sentence above and **ruling 3**
348> contradict each other, and the code can only implement one. Ruling 3 says
349> `HMAC(pepper, lowercased address)`; Β§7's directory row and Β§7's rekey
350> reasoning say HMAC too. This paragraph is the only place an expensive KDF
351> appears. `internal/home/links.go`'s `blindIndex` implements **ruling 3**,
352> on the ground that a settled Β§1 row outranks a threat-model note β€” so as
353> written this paragraph is currently false about the code.
354>
355> It is a real tradeoff, not a typo. A dictionary run against a leaked
356> pepper is exactly the second threat model's attack, and an HMAC prices it
357> at nothing. Against that: the index is computed on the sign-in path and on
358> every call-2 directory upsert, so the cost is paid per request. That cost
359> is probably affordable β€” sign-in is already rate-limited at 20 per IP and
360> 5 per address per 15 minutes, and call 2 fires on grant change rather than
361> per request β€” which makes the case for the KDF stronger than it first
362> looks.
363>
364> Changing either sentence changes a Β§1 row, so it is Paul's ruling. Until
365> then the code follows ruling 3 and this note records the gap rather than
366> hiding it.
367
368### 3.2 What is at rest, precisely
369
370**Sealed:** team display names; provisioning queue payloads; the rekey
371journal's new addresses; **sign-in link state** (Β§5.1); **member display
372names**, which a team's owners choose and which never contain "@"
373(`implementation/team-members.md` Β§5).
374
375**Plaintext, published in the README:**
376
377- Counts of people and teams.
378- Blind-index values (Β§3.1's caveat applies).
379- The bipartite graph: person ref ↔ team ↔ app ↔ `kind`.
380- **The membership roster: `(team, person_ref, role)`** (ruling 23), and the
381 roster's `(generation, epoch)`. **Plaintext**, necessarily β€” call 8 reads
382 it β€” and it is the new column class Β§0's cost sentence names. `role` is
383 what makes a published database identify each team's owners.
384- Team hostnames and sqids β€” these appear in URLs and were never secret.
385- `memberships.added_at`, the day each membership began (day-coarsened at
386 rest, so Β§3.3's rule is already met), and which members have a name β€”
387 never the name (`team-members.md` Β§3 rule 5, Β§5).
388- Passkey credential ids and **public** keys.
389- Session rows keyed by **person ref**. Their timestamps are **exact at
390 rest** β€” expiry is compared against them, so they cannot be coarsened in
391 the table β€” and Β§3.3's coarsening is a **rule for publication**, applied
392 when the database is published, never a storage format. An earlier draft
393 listed them as "coarsened timestamps". What forces exactness is not expiry
394 alone (a day-granular `expires_at` on a thirty-day session would work) but
395 **freshness**: `sessions.Fresh` compares `auth_time` against a max age in
396 minutes, and Β§5.2's show-codes-once page depends on it.
397- Each person's theme.
398
399**Never at rest at all: pulled content** β€” titles, URLs, actors. Held in
400RAM only, bounded per `design-activity-pull` Β§7 and Β§2.1, since Β§2.2's
4012026-09-05 amendment.
402
403**Never at rest readable: an email address.** Sealed and short-lived in link
404state and the journal; hashed in the index; transient in RAM elsewhere.
405
406**Deleting a row is not erasing bytes.** SQLite does not zero deleted pages
407and Litestream ships WAL frames continuously, so a *transiently written*
408readable address reaches the bucket before any delete. `PRAGMA
409secure_delete` is on, and anything holding an address is sealed before it is
410written rather than cleaned up afterwards. This is why Β§5.1 exists.
411
412### 3.3 The graph is less anonymous than "unidentified" suggests
413
414Hostnames approximate company names, so each person carries a team-set
415fingerprint. One outside fact β€” "alice consults for Acme and BigCo" β€”
416identifies the row and reveals the rest of their memberships, guest rows
417included. Timestamps correlate with events observable at instances.
418
419So: published timestamps are **coarsened to the day**, and Β§0 stopped saying
420"some unidentified person" long ago.
421
422**Ruling 23 makes this argument weaker than it reads, and that is said here
423rather than left to Β§0's one-line cost.** The fingerprint above needs
424*several* teams plus an outside fact. An **owner row needs one team and a
425fact that is usually public** β€” who owns Acme is on Acme's website. So
426`(team, person_ref, role=owner)` names a person ref outright, with no
427multi-team fingerprint required, and naming it then reveals every other
428membership and guest row that ref holds. **Naming owners is materially more
429identifying than "belongs to a set of teams"**, and it is the class Β§0's new
430sentence is about. **Said plainly rather than
431counted as a fix: coarsening protects a deliberate publication and nothing
432else.** Β§3.1's leak models ship the raw database file, whose session rows
433carry exact timestamps (Β§3.2), so the timestamp-correlation fingerprint is
434**unmitigated in a leak**. There is no export verb in this design that
435coarsens; if one is ever wanted, that is where the rule would attach.
436Sealing team display names
437buys little while hostnames are plaintext; it is kept because it is free,
438and it is not counted as protection.
439
440### 3.4 Logs and error text are storage
441
442The home handles readable addresses transiently on every sign-in, upsert,
443rekey and welcome mail. One error string β€” *"failed to hash
444alice@example.com"* β€” ships an address to platform-held `carlos logs`,
445storage we cannot grep.
446
447**Rule: no address, team name, queue payload, or pulled content β€” a title,
448a URL, an actor β€” in any log line, error string, job status message or
449metric label.** (Pulled content added 2026-09-05 with Β§2.2's amendment: a
450log line is at rest, so *never stores* reaches it, and a failed pull is
451exactly where a title would otherwise land in an error string.) Errors
452carry person refs and
453codes. Test-enforced (Β§12 gate 9). Outbound mail necessarily carries
454addresses through platform SMTP; that is inherent and disclosed. Log lines
455are not.
456
457---
458
459## 4. Two origins
460
461The 2026-09-08 implementation runs explicit credential and directory roles in separate processes and databases, matching the paired preview topology. Each role refuses the other hostname. The directory loads its sealing key and pinned verification keys only; a private assertion key in its configuration is refused. Both databases need their own privacy checks and restore drill before production.
462
463A team name is account-authored, so a home rendering names on its RP origin
464is what `decisions.md` warns against. Tito's answer: *credentials only ever
465on the root origin, account-authored content only on the account's own host.*
466
467- **Credential origin** β€” sign-in, WebAuthn, recovery, assertion minting.
468 **No account-authored string, ever** β€” with exactly one exception, ruling
469 26 (2026-11-19, option (a)): the sign-in door may show back the address
470 Home itself sealed into this browser's own cookie (the address this
471 browser last proved), re-checked on read, escaped, as text and as a
472 form field's `value`, on a `no-store` page, and nowhere else on the origin.
473 Nothing a request supplies β€” a typed address, a query, a cookie Home did
474 not seal β€” and no team name, label or member name is ever rendered here.
475 This is the RP.
476- **Directory origin** β€” a different hostname. Renders team names, holds no
477 credentials.
478
479The directory obtains its session by exchanging an assertion, the same
480mechanism instances use (Β§5.3), so there is one assertion path rather than
481two. An XSS on the directory cannot reach the RP.
482
483**The hostnames (ruling 16, 2026-09-03).** The suite's primary domain is
484**`oficina.works`**, registered and ours. It replaces the provisional
485platform-default addresses `<app>.<sqid>.oncarlos.com`, where `bds` was a
486Carloku *account* sqid β€” a hosting artifact that earns nothing on a domain
487we own.
488
489- **`id.oficina.works`** β€” the credential origin. This is the RP.
490- **`oficina.works`** β€” the directory, at the apex. A different hostname
491 from the RP, which is what this section requires.
492- **`<team>.<app>.oficina.works`** β€” one team, one instance, one hostname:
493 `acme.docs.oficina.works`, `acme.sheets.oficina.works`. This is the team
494 slot the provisional shape never had, and Β§7's "team name and hostname
495 reserved at enqueue" needs somewhere to reserve them.
496
497Hosting stays on Carloku; `oficina.works` is a custom domain in front of it,
498with a wildcard certificate per app zone (`*.docs.oficina.works`).
499
500**Never widen the RP ID to a registrable suffix** β€” and note that the reason
501changed with the domain rather than disappearing. WebAuthn permits an RP ID
502that is a suffix of the origin's hostname, so `oficina.works` would be
503*accepted* for `id.oficina.works`. On `oncarlos.com` the objection was other
504Carloku tenants. On a zone we own it is that `oficina.works` as an RP ID is
505valid at *every* host in the zone β€” the directory and each team instance
506included β€” which collapses the split this very section exists to make
507(ruling 2). **The RP ID is the full host**, asserted by a test.
508
509---
510
511## 5. Identity
512
513### 5.1 Sign-in is hand-rolled, and why β€” RULED 2026-08-30 by Paul
514
515**`rastrillo/auth` as shipped cannot host a blind identity service.**
516Verified at `origin/main` 2026-08-30 and **re-verified at the v0.22.0 pin
5172026-09-05**: `auth_links.address TEXT NOT NULL`, and `admit()` sets
518`Subject: id.Address`. (The 2026-08-30 draft also cited
519`auth_sessions.address TEXT NOT NULL`. At v0.22.0 that table is no longer
520written β€” `0002_sessions_backfill.sql` moved its rows into the shared
521`sessions` table β€” so the readable address now lands in `sessions.subject`.
522The leak moved; it did not close, and the ruling stands on `auth_links` and
523the Subject either way.) β€” which `passkey_credentials`, `passkey_challenges`,
524`passkey_pending` and `passkey_recovery_codes` all inherit. `auth.Config`
525has no subject-remapping hook, so it cannot be configured away.
526
527The first draft cited "Kass's pattern" as though the plugin implemented it.
528It does not. That was the review's highest-cost finding, because the
529tempting week-2 fix is adding the auth tables to `plaintextExempt` β€” turning
530a guarantee into a comment.
531
532**So (ruling 14):**
533
534- **The Subject is an opaque person ref**, never an address. Sessions,
535 credentials and recovery codes all key on it.
536- **Link state is sealed before it is written** and short-lived. A magic
537 link must survive a restart between send and click, so the address is at
538 rest β€” sealed, enumerated in Β§3.2, never readable.
539- **`PRAGMA secure_delete`**, because deleting a row does not remove bytes
540 from a file that is continuously replicated.
541- We use **`keymaildev/signin` directly** for classification and the Keymail
542 upgrade β€” the part that is hard to get right and holds nothing.
543 **Corrected 2026-09-05:** an earlier draft said `rastrillo/auth`, which
544 cannot serve that purpose. Its classification is reachable only through
545 `auth.Begin`, and `Begin` writes `auth_links.address TEXT NOT NULL` β€” the
546 very thing ruling 14 exists to avoid. The seam is one level down:
547 `signin.Flow` takes a `LinkStore` the app supplies, so the app seals in
548 `PutLink` and opens in `TakeLink`, and classification, the Keymail round
549 trip and the rate limits all come with it.
550
551**Filed upstream as `rastrillo/rastrillo` #2**: a `Config.Subject` hook, a
552sealed link store, and written `secure_delete`/WAL guidance. Every
553server-blind app on rastrillo hits this on day one and will otherwise
554hand-roll it differently. Adopt it the day it lands and delete our version.
555
556Magic link, auto-upgrading to Keymail when the address has a claimed inbox;
557classification fails open, so every address has a working path β€” which
558matters more here than in a normal app, because guests arrive from outside
559the suite entirely. No passwords.
560
561### 5.2 Second factor and recovery
562
563Passkey via `passkey.Handlers.Gate`, **optional per person**.
564
565**Per-team enforcement is not in slice one** (ruling 15). The first draft
566promised it and neither spec could build it: there was no per-team policy record, `Gate` is strictly per-account
567(`Enrolled(sess.Subject)`) and asks nothing of an un-enrolled account, and
568every workaround breached something β€” an
569`amr` claim on the assertion fails Β§5.4's boundary test. It moves to Β§14
570with a trigger, rather than being discovered by the first paying team that
571flips the switch.
572
573**Recovery is recovery codes** (ruling 6): ten, shown once, redeemed as a
574plain form POST with no JS. Sign-in only β€” step-up still demands a real
575assertion.
576
577**No operator reset in slice one**, recorded so the absence is a decision:
578it needs an identity-verification process and a person to run it, and we
579have neither. **Trigger:** the first real person locked out with passkey and
580codes both lost.
581
582**Losing everything is disclosed, not discovered:** losing email access
583*and* passkey *and* codes loses your sign-in. It does not lose your team's
584data β€” other owners still reach the instance, which is the authority **on
585items**; team standing's authority is the roster now. **A sole owner locked out of all three β€” passkey, codes and their mailbox β€”
586leaves a team whose roster nobody can write**, and the only exit is Β§10's
587seed verb, an operator reset in all but name, so Β§14's operator-reset
588trigger fires earlier than it reads. (With mailbox access the magic link
589still signs them in, as this section's first sentence says.)
590
591### 5.3 The assertion, fully specified
592
593The first draft specified signature, audience, expiry and jti β€” and never
594said **what identifies the person**, which is the most load-bearing claim in
595the contract. Two consumers were about to guess.
596
597**Claims:**
598
599| Claim | Value |
600|---|---|
601| `sub` | The **person ref** β€” the home's opaque identifier, stable across email change. Never an address. |
602| `aud` | The exact canonical HTTPS consumer origin, identifying the app and team instance. The directory uses its own exact origin. |
603| `iss` | The credential origin. |
604| `kid` | Which pinned verification key signed it. The initial transport performs no fetch on an unknown key and fails closed. Deploy old and new public keys before rotating the signer. |
605| `iat` / `exp` | See expiry below. |
606| `jti` | Single use, per verifier. |
607| `v` | Wire version1. |
608| `nonce` | The consumer's browser-bound request nonce, independent from jti. |
609| `auth_time` | Original credential authentication time; never refreshed by the handoff. |
610| `ext` | Optional cosmetic object. The initial Home transport omits it; later theme delivery remains subject to Β§5.4. |
611| Future roster hint | Not emitted by the initial transport. Ruling23's invalidation-only contract in Β§5.4 remains for the separately reviewed roster adapter; it is not an unimplemented claim silently added to wire version1. |
612
613**Signature:** P-256 through the shared Rastrillo assertion package (ruling24). The private key stays in credential-only platform config, never in either database. Initial isolated consumers pin public keys. Published-key discovery and production consumer registration remain later, separately reviewed changes.
614
615**Expiry is 120 seconds, not "seconds"** β€” sized to worst-case cold wake
616plus clock skew. The exchange request *is* what wakes a hibernating
617instance, and process start plus decrypt plus migrate-check can exceed a
618few seconds, so a tighter window makes the **first sign-in to any cold
619instance fail and loop** β€” flaky, timing-dependent, and miserable to debug.
620Widening it costs nothing against the threat model, because **single-use
621`jti` is what stops replay**, not brevity.
622
623**Every verifier holds its own self-pruning `jti` store**, sized by
624assertion lifetime rather than by user count (docs-e6, 2026-08-30). Audience
625binding makes local stores sufficient β€” an assertion for team A is not
626valid at team B, so B never needs to know A consumed it. Β§10's
627`assertion_jti` table is **the directory origin's own** store, not a shared
628one.
629
630**Delivery is an auto-POST, not a query string**, so assertions stay out of
631browser history and referrers. (An earlier draft also said "edge logs". No
632platform request log carrying paths was found when this was checked on
6332026-09-05 β€” the edge records per-host counts and bytes, not URLs. The
634history and referrer reasons stand on their own and are sufficient; the
635third was inherited rather than verified.)
636
637### 5.4 The boundary test for claims
638
639Two-sided, and the first draft wrote only the half it needed for theme
640(docs-e6, 2026-08-30):
641
642> A claim may ride the assertion only if **(a)** the instance makes no trust
643> decision based on it, validating against a **closed enumerated set** and
644> treating a failed match as *absent* rather than as the raw value; **and
645> (b)** the home already holds it for its own purposes, so carrying it adds
646> nothing to what the home knows.
647
648**One narrow exception, added 2026-09-05: an invalidation hint.** (Scoped, per the doctrine's revision 5, to the **call-8 path only** β€” an instance answering call 7 must not act on the claim at all.) The roster
649epoch (suite Β§5.3) rides the assertion and fails (a) as written β€” a
650monotonically rising integer is not a closed enumerated set and does not
651fail cosmetically. It is admissible on a different argument, and the
652argument has to be stated rather than assumed: **the instance decides
653nothing from it.** A claim it cannot parse is ignored. A claim that differs
654from the epoch it holds buys exactly one call-8 refetch, and call 8's answer
655is what it enforces. So a hostile claim costs one request and can neither
656admit nor exclude anybody. Nothing else may use this exception without the
657same property.
658
659Theme passes both. A role fails (a). "Which documents you can see" passes
660(a) and fails (b), handing the home a document-level graph it has no
661business holding.
662
663**The identity claims are exempt by construction, and the test must say so**
664(review, 2026-08-30): `sub` flagrantly fails (a) β€” a hostile `sub` is
665account takeover β€” yet it must ride the assertion. The rule is therefore:
666**signed identity claims are trusted for identity; every other claim must be
667cosmetically failable.** Without that sentence the test proves too much, and
668a future reader either discards it or argues an `amr` claim in under cover
669of the inconsistency.
670
671**Two things the first wording got wrong**, recorded so they are not
672reintroduced. "The instance would behave identically" is false even for
673theme β€” a hostile value gives an ugly page, which is different behaviour β€”
674and a test its own example fails is a gap someone smuggles through. And
675"hostile value" assumed the validation that makes it safe: a free-string
676theme interpolated into CSS is an injection, not an ugly page.
677
678### 5.5 What the instance does with it
679
680Verifies the signature by `kid`, checks `aud` is itself, consumes the `jti`
681locally, mints a session β€” and then **decides capability from two sources,
682since ruling 23**. **Per-item** capability comes entirely from its own
683grants, exactly as before: an assertion for a person with no grant is a
684valid assertion that gets nothing individually granted. **Team standing**
685comes from its copy of the roster (call 8, suite ruling 5), not from a
686grant β€” so a member with no per-item grant still reaches everything at the
687team rung, which is the point of a team. An earlier version of this
688paragraph said capability came *entirely* from the instance's own grants;
689that is the status quo ruling 23's Rejected column names as overturned, and
690Docs and Sheets build from this section.
691
692**The link-share ordering problem** (docs-e6, 2026-08-30). A link-share
693visitor who wants to comment signs in β€” and under the attribution rule,
694signing in is what *mints* their guest grant. So they return with a valid
695assertion and no grant: correct behaviour, wrong outcome.
696
697**Resolution: the capability never rides the assertion.** The instance
698begins sign-in with a **server-built return URL carrying a nonce** keying
699pending state it holds itself. On return it verifies the assertion, redeems
700its own pending state to mint the grant, then applies the session. The home
701learns nothing about links or capabilities, so Β§5.4 survives intact.
702
703This also handles the cross-device case, where the magic link completes in
704whichever browser opened the email: the nonce rides the URL, not a cookie.
705
706### 5.6 The redirect protocol
707
708Absent from the first draft, and the abuse suite did not test it.
709
710- **Return hosts are validated against the consumers allowlist.** Otherwise
711 the credential origin is an open redirector.
712- **A browser-bound state nonce** ties the returning assertion to the
713 browser that began the flow. Without it an attacker can fix *their own*
714 signed assertion onto a victim's browser β€” login CSRF, and the victim then
715 works inside the attacker's account.
716- **The return URL preserves its query string**, validated host and all.
717 Ruling 22 puts the team in `?team=<sqid>`, so a shared team link followed
718 while signed out otherwise returns the person to a bare `/` and silently
719 redirects them to a different team than the one they were sent. Β§11 states
720 this as a cost; it is a mechanism, and it lives here because a step-3
721 builder reads Β§5.6, not Β§11.
722- All three are in gate 3.
723
724### 5.7 The RP rename drill β€” not needed for the `oficina.works` move
725
726**Ruling 16 moved the domain before this service enrolled its first
727credential**, which is the whole reason the move cost nothing. At the time
728of the move `home` held no `passkey.Config` at all β€” sign-in across the
729suite was magic-link only β€” so no credential had ever been scoped to an
730`oncarlos.com` host and there was nothing to strand. The drill below is
731therefore documented rather than scheduled.
732
733Every *later* hostname move pays the full price described here, which is the
734argument for having taken this one early. **The mechanism
735exists:** `passkey.Config.LegacyRPID` is *"a relying party this instance
736used to be, accepted for assertions (never registration) so a hostname move
737doesn't strand enrolled keys"* β€” verified at source. Set it, run the window,
738drop it.
739
740**Size the window by the guest tail.** The person least likely to survive is
741the guest who signed in once, months ago, to comment on one document β€” no
742ongoing relationship, no reason to notice, invisible to any plan assuming
743people re-authenticate when nudged. **Months, not weeks.** A drill that
744quietly drops the guests is a drill that failed while reporting success.
745
746---
747
748## 6. The directory
749
750`HMAC(pepper, lowercased address) β†’ (person ref, app, team sqid, host, kind,
751sealed team name)`. **A row is a hint and never an authority** (ruling 9),
752and ruling 23 makes that load-bearing rather than merely true: **a directory
753row never grants or revokes team standing, whatever its `kind` says.** Call 2
754writes these rows under an instance's own consumer token, so if team standing
755were read from them, any instance could announce a member and walk around
756the owner step-up ruling 23 requires. Team standing comes from the membership record and
757nowhere else.
758
759`kind` is member or guest, because a row implying an org
760membership someone does not have is a lie the directory tells on the org's
761behalf.
762
763**The home hashes, not the instance** (ruling 4). One compromised instance
764holding the pepper would be an offline dictionary attack against the whole
765suite directory, inverting factor VIII.
766
767**Call 2 returns the person ref**, and instances store it against their
768member rows. Without this, call 5 is incoherent β€” an instance holds no
769HMACs and can compute none, so a journal keyed on hashes matches nothing it
770has (review, 2026-08-30). The person ref is also the assertion's `sub`, so
771one identifier links assertion to grant to journal.
772
773**Never-signed-in guests get a person stub.** Call 2 for an address with no
774person row mints one, keyed by the blind index; credentials attach at first
775sign-in.
776
777**The directory is a hint, never an authority** (ruling 9):
778
779- A failed upsert never fails a share. The instance is the authority.
780- Instances re-check authorization on every request. The directory answers
781 *"where might I have things"*, never *"may I have this"*.
782- The outbox **drains on wake and on each share mutation, not on a ticker** β€”
783 a hibernating instance runs no timers.
784
785**Pepper rotation uses an epoch, not a sweep.** The first draft called for a
786"re-announce sweep" as an operator verb β€” which has no channel to reach
787instances: **no call in this table pushes to an instance**, and instances
788hibernate. (One call runs home→instance — call 7's activity pull — but it
789fires per render, when a person is already looking at their front door, so
790it is not a channel the home can reach a sleeping fleet down. Call 8 is the
791instance calling the home.) A fleet-wide poke
792would in any case contradict the platform's zero-infrastructure-access
793contract. Instead: **every call-2 and call-5 response carries a pepper
794epoch**, and an instance whose stored epoch differs re-enumerates its grants
795on next wake. Rotation becomes a lag rather than an incident.
796
797**A guest grant discloses the granting team's name.** Kept β€” the alternative
798removes the reason the directory exists β€” but **disclosed in the sharing
799app's share dialog, in words**, not left emergent.
800
801---
802
803## 7. Provisioning
804
805Signup writes a request. An **operator command drains it** under a real
806console credential: creates the instance, delivers its bearer token and
807allowlist entry, sends the welcome mail, marks it live.
808
809**Why queued.** The platform has no machine credential for instance
810creation; console auth is a 90-day human terminal token, and `auth.go` names
811why an app holding one is wrong. Filed as `carlos/platform` #4.
812
813**The load-bearing safety fact: the home holds no provisioning credential.**
814The queue is opaque; the drain runs outside the home process under a human's
815credential. So the dangerous version of the conflation β€” an RCE on an
816internet-facing sign-in surface reaching instance creation β€” is **impossible
817by construction, not unlikely by policy.**
818
819*(The weaker argument, kept because true and demoted because contestable:
820Β§9's conflation concerns a blind service that also knows person↔instance,
821and this home already does. That is an argument about what the doctrine
822meant. Put to `carlos/pegamento` #1: is it the credential or the knowledge
823that must not be fused?)*
824
825**The queue holds readable addresses, and Β§3.2 discloses it.** The first
826draft claimed the enqueue "adds no knowledge the service lacks" β€” untrue:
827the directory holds hashes, the queue holds addresses. That is new custody.
828The argument leans on the disclosure, not on denying the delta.
829
830**The label is reserved suite-wide at enqueue** (ruling 19). Claiming `acme`
831takes it across every app, so only Acme can later create `acme.sheets`.
832Without that, a stranger squats the sibling hostname of a team you already
833have, on an apex that reads as one suite β€” which is impersonation whatever
834the model calls it.
835
836**Who decides that a later request really is Acme β€” and why the home never
837answers it.** The first claim of a free label is a decision about a resource
838alone: is this label taken? The *second* instance is the hard one, because
839"only Acme may create `acme.sheets`" needs a principal, and the home holding
840a person↔resource entitlement **over an instance's items** is what Β§2.2 forbids and ruling 9 refuses (ruling 23 has the home hold exactly such an entitlement over a resource of its own, the roster β€” that is the narrowing, and it is why this sentence now carries the qualifier)
841("*where might I have things*, never *may I have this*"). An earlier draft
842argued this away as "a name, not a document". **That argument is wrong and
843is recorded here so it is not made again:** Β§2.2 says *never holds an
844authorization model* β€” the clause as it stood before ruling 23 rewrote it β€”
845not *never holds a content authorization model*, and
846ruling 15 rejected a per-team 2FA floor. **(That example is withdrawn from
847this argument.** Ruling 15's own Rejected column was buildability, and Β§2.2
848now grounds it on mechanics β€” an un-enrolled member sails through `Gate`,
849and there is no per-team policy record. It was never a clean illustration of
850Β§2.2 and it is not one now.) So the distinction has to be sharper. Two
851paths, and the home answers only facts about its own records in both:
852
853**Both paths end in the queue**, and this is not a detail. Β§7's
854load-bearing safety fact is that **the home holds no provisioning
855credential** β€” so nothing the home can do creates `acme.sheets`, and ruling
8567's "a human sees every team before it exists" holds for siblings exactly as
857for first teams. What the two paths differ in is what the operator is
858handed, not whether there is one.
859
860- **Fast path β€” an existing instance vouches for its own team.** "Create
861 `acme.sheets`" is initiated from inside `acme.docs`, by whoever
862 `acme.docs` considers an owner, and reaches the home as an instance→home
863 call under that instance's consumer credential. The home checks one
864 thing: **is the calling origin already in `team_instances` for this
865 team?** β€” joining `consumers.origin` to the instance host the home itself
866 recorded at the drain. That answers the *label* question and enqueues the
867 request pre-settled. **Amended 2026-09-05 by ruling 23:** the home now
868 learns who owns a *team*, because the membership record carries a role and
869 an owner is who may write it. What stays the instance's business is who
870 owns an *item* β€” a sheet, a document, a calendar β€” decided from its own
871 grants, which is Β§2.2's second never-do working exactly as intended. The
872 home knows Ana owns the Acme team; it does not know she owns a single
873 document in it, and it never asks.
874- **Fallback β€” everyone else arrives unvouched.** The request is enqueued
875 the same way, and the human decides the label question too. The home may
876 render the requester's own directory rows **and their roster role, which is the stronger hint the home now owns,** beside it (ruling 9) β€” with `kind` shown, since a *guest* row in `acme.docs` is emphatically
877 not "is Acme". They are a hint and nothing else: the operator adjudicates.
878
879**Two things this does not smuggle in.** Consumer-level authorization is not
880new and is not Β§2.2's concern: Β§9 already scopes every call to its consumer,
881and a label on `oficina.works` is the home's own namespace. What Β§2.2
882forbade, before ruling 23, was any *person*-level entitlement, and neither
883path formed one. **Ruling 23 forms one deliberately** β€” the roster is a
884person-level entitlement the home holds and enforces β€” so the line moved
885rather than held: the home decides about **resources it owns** (a label, a
886team's roster) and never about **an instance's items**. Both paths here are
887still on the resources-it-owns side. And the
888new instance's initial admin and welcome address arrive as **sealed queue
889payload**, exactly as a fallback requester's do (Β§3.2) β€” the home carries
890that opaquely and never judges it.
891
892**A compromised `acme.docs` can vouch for `acme.*` siblings.** Bounded by
893the registry's `provisionable` set, one row per (team, app), the drain still
894seeing every request, and the sibling getting its own consumer token from
895that drain rather than inheriting one. Recorded rather than left to be
896discovered; Β§2's blast-radius argument survives it.
897
898So the home's whole vocabulary here is two facts: *is this label free*, and
899*is this calling origin already an instance of this team*. It never forms an
900opinion about whether a person is entitled to anything **in an instance**. Since ruling 23 it does form one about team standing, which is its own record; the paths here form none of either. That is the
901distinction ruling 19 rests on, and it is a narrower one than "names versus
902documents".
903
904**Two consequences, recorded rather than left to be discovered.** Β§14's
905auto-drain row now carries a third decision β€” auto-draining also means
906automating the fallback adjudication, and the machine credential does not
907supply the judgement. And **a queue entry that is purged or times out must
908release its label**, or a request that never became a team holds a name
909nobody can claim.
910
911**The drain is also the abuse gate** (ruling 7) β€” a human sees every team
912before it exists. So when the machine credential lands, **auto-drain is a
913policy decision, not an automatic consequence.**
914
915**Honest copy: "usually within a day", not "in minutes."** A human drain
916does not run at 3am on a Sunday. The first draft prided itself on not faking
917a spinner while writing a promise the mechanism cannot keep.
918
919**Queue mechanics**, none of which were specified:
920
921- **Address verified before enqueue**, or the queue mails strangers.
922- **Entry TTL with sealed-payload purge** β€” undrained spam otherwise holds
923 addresses indefinitely.
924- **Rate-limit keys stored hashed**; per-address limiting otherwise stores
925 address-derived plaintext, defeating Β§3.2 through the back door.
926- **A total queue-depth cap.** Address and IP limits are weak against
927 plus-addressing and CGNAT.
928- **Idempotent drain** β€” a crash between instance-create and token-delivery
929 must not double-create.
930- **Team name and hostname reserved at enqueue**, or two people race for one.
931
932---
933
934## 8. Person preferences
935
936Theme is per person, suite-level, resolved before first paint (ruling 10).
937Not per document, not per team β€” or a person sets it separately in every
938team, which is the credentials problem wearing a different hat.
939
940**It rides the assertion** (Β§5.3), which makes before-first-paint achievable:
941the instance sets a cookie on its own origin at session mint and reads it
942synchronously. Never a fetch β€” for a spreadsheet a late preference does not
943merely flip the chrome, it **repaints every coloured cell**.
944
945**The write-through is a redirect-based POST to the directory origin**
946(call 6), chosen because it works with scripts off; a cross-origin
947credentialed fetch would need a CORS and SameSite design and would fail the
948zero-JS baseline.
949
950**The home wins at sign-in.** If a write-through fails, cookie and `prefs`
951row disagree; without a stated winner the next sign-in silently reverts
952somebody's choice β€” "it keeps forgetting", a bug report nobody can act on.
953The assertion's value is authoritative at mint; the instance re-writes on
954next toggle; a lost write costs one session.
955
956**Other live sessions keep a stale cookie until their next assertion.** Said
957out loud because "the preference follows you" otherwise implies immediacy
958across devices that it does not have.
959
960**The preference set stays small on purpose** β€” every addition is a claim in
961every assertion, and one that fails Β§5.4 is not a preference.
962
963---
964
965## 9. The contract
966
967| # | Call | Direction | Notes |
968|---|---|---|---|
969| 1 | Sign-in and session minting | person β†’ home | The identity authority. Not a hint. |
970| 2 | Directory upsert / revoke | instance β†’ home | Sends address **+ sealed team name, which is advisory**: the home owns the display name (Β§10) and does not overwrite it, so this is a consistency check the home may log a divergence on, never a write. Home hashes; **returns the person ref**, the pepper epoch **and the roster epoch** (ruling 23 β€” the doctrine carries it in calls 2, 5 and 8 and in the assertion; a builder reading only Β§9 would otherwise ship two of the four staleness carriers). Instance-scoped revoke included. Via the outbox. |
971| 3 | Directory list | person β†’ home | Every team across every app, with `kind` β€” **joined from `memberships β‹ˆ team_instances` for members and `directory` for guests** (ruling 23, Β§11), or a builder implementing this row rebuilds the missing-tile hole. |
972| 4 | Provisioning enqueue | person β†’ home | Rate-limited, depth-capped, human-drained. |
973| 5 | Rekey journal pull | instance β†’ home | **Scoped to this consumer**, keyed on person refs. Carries the **roster epoch** (ruling 23). |
974| 6 | Preference write-through | person β†’ home | Redirect POST to the directory origin (Β§8). |
975| 7 | Activity pull | home β†’ instance | **An assertion for the person**, `aud` = the instance. The home renders and discards; RAM only, never at rest. `design-activity-pull` Β§4–5, suite Β§6. |
976| 8 | Roster pull | instance β†’ home | Consumer token, scoped to the caller's own team. Returns `(generation, epoch)` and the team's members with roles, **paged with an epoch-bound cursor**, the **epoch per team** (a suite-wide epoch would make a bump in one team a cross-team activity signal to every instance, which suite ruling 1 forbids), and a request for a team that is not the caller's answered **identically to an unknown team β€” 404, never 403** (gate 4's pattern): a page from a superseded epoch is refused, and an instance stages every page and replaces its roster atomically only when a complete set for one epoch has arrived. Suite Β§5.3. |
977
978Auth follows Pegamento's service contract: **per-consumer bearer token
979stored hashed**, consumer identity is its origin, origins allowlisted,
980**with a hard body cap whose number carries its reason in a comment**
981(contract item 6, unadopted in the first draft). **Tokens rotate**, and the
982verb exists before launch rather than after the first leak.
983
984**Bootstrap:** a fresh instance gets its token as platform config and its
985allowlist entry from the drain, in the step that creates it.
986
987**Call 4b β€” sibling instance request** (ruling 19's fast path) is
988instance β†’ home, not person β†’ home, and belongs in the table above rather
989than only in Β§7's prose: an instance asks for `<team>.<app>` under its own
990consumer credential, the home checks the calling origin against
991`team_instances` for that team, and enqueues the request with the label
992question settled. Docs and Sheets implement from that table, so a call that
993exists only in Β§7 is a call nobody builds. Named for `carlos/pegamento`'s
994re-review alongside the rest of Β§9.
995
996**Call 2 drives two events**, not one: a grant changes; and an **instance**
997is deleted (instance-scoped revoke β€” after Β§10's split this removes that
998`team_instances` row and its directory rows, and leaves `teams` and its
999label reservation alone while any sibling instance survives). Without the
1000second, rows point at a host that 404s β€” a convenience failure under Β§6,
1001which is exactly why it would survive being missed.
1002
1003**Renaming is no longer one of them.** An earlier draft had call 2 drive a
1004re-announce "so guests stop seeing a stale name". That cannot work now the
1005home owns the display name (Β§10): if call 2's name never overwrites, a
1006re-announce un-stales nothing. **Rename is an operator verb at the home** β€”
1007one row, one write, immediately true for every instance and every guest,
1008which is strictly better than a re-announce that depended on each instance
1009waking up. It is built with the rest of the operator tooling in step 6.
1010
1011**It renames the display name only, never the label.** A relabel is a
1012hostname move for every instance in the team β€” certificates, consumer
1013origins, allowlist entries β€” which is a new team, not a rename. And the
1014divergence Β§9 may log carries the **team sqid and consumer origin, never
1015either name**, or gate 9 fires on the log line meant to help.
1016
1017### 9.1 Call 5, rewritten
1018
1019The first draft was incoherent: it keyed the journal on `old_hmac β†’
1020new_hmac`, and under ruling 4 an instance holds no hashes and can compute
1021none, so nothing would ever have matched (review, 2026-08-30).
1022
1023- **Rows are `(person_ref, sealed new address)`.** The ref is what instances
1024 already store from call 2.
1025- **The pull is scoped per consumer** β€” to persons with a directory row on
1026 *that* instance. An unscoped journal would deliver every person's new
1027 address to every instance in the suite, so one compromised instance
1028 harvests suite-wide address changes: precisely the blast-radius inversion
1029 ruling 4 exists to prevent.
1030- **Retention is a per-consumer TTL, not the slowest cursor.** "Prune once
1031 every instance has passed" never completes when a dormant instance runs no
1032 timers to advance its cursor. A consumer returning past its TTL gets a
1033 **full re-announce** instead of a pull.
1034
1035 *This is the same defect as the unbounded `jti` store, in a second place.
1036 The generalisation, which both specs now carry: **any "prune when all
1037 consumers have caught up" is unbounded in a hibernating fleet.***
1038- **Decommission deletes the consumer row**, releasing its cursor.
1039- **Restore rewind is named:** an instance restored from backup holds a
1040 cursor pointing before pruned rows and would silently miss rekeys,
1041 notifying a dead address forever. A cursor older than the TTL takes the
1042 re-announce path, which covers this without a separate mechanism.
1043
1044**Email change requires proving control of the new address** before the
1045rekey. The first draft presumed the change had happened and specified no
1046ceremony.
1047
1048---
1049
1050## 10. Data model
1051
1052The explicit directory role has its own sessions table and the shared handoff module's pending, inbox, replay and clock-fence tables. Paths and tokens are sealed before insertion; only hashes identify browser handles, nonces and assertion IDs. The credential database retains people, sealed sign-in links and passkey state. This split does not make the directory authoritative for any instance item.
1053
1054- `people` β€” person ref, blind index, created_at. **No address column.**
1055- `credentials`, `recovery_codes` β€” keyed on person ref (Β§5.1).
1056- `signin_links` β€” sealed address, expiry. `secure_delete` on.
1057- `sessions` β€” per origin, keyed on person ref.
1058- `directory` β€” person ref, app, team sqid, host, kind, updated_at.
1059- `teams` β€” **the suite-wide team** (ruling 17): team **id** (the integer the
1060 sqid encodes β€” ruling 22's `/` entry picks the oldest team (Β§11) and
1061 needs it, and a sqid sorts
1062 by string not by age), team sqid, **label** (the
1063 `<team>` DNS segment, and the reservation of ruling 19), sealed display
1064 name. One row per team, not per instance. **The home owns the display
1065 name**, set once at provisioning by the human who drains the queue and
1066 already sees every team before it exists (ruling 8). Call 2's sealed team
1067 name is therefore **advisory and never overwrites it** β€” otherwise a team
1068 renamed in Docs but not Sheets would flap with whichever instance woke
1069 last, and the rename event Β§9 used to have would have meant two different things.
1070- `team_instances` β€” team sqid, app, host. One row per (team, app); this is
1071 what `<team>.<app>.oficina.works` resolves against. Splitting these two is
1072 what lets the switcher mean "Acme" rather than "the acme row that happens
1073 to be in Docs": before the split, `acme.docs` and `acme.sheets` were
1074 unrelated rows sharing a DNS label, and nothing in the model said they
1075 were the same team.
1076- `prefs` β€” person ref, theme.
1077- `provisioning_queue` β€” sealed payload, state, hashed rate keys, TTL.
1078- `rekey_journal` β€” consumer, person ref, sealed address, TTL.
1079- `consumers` β€” origin, hashed token, cursor, epoch, rotation state.
1080- `assertion_jti` β€” **the directory origin's own** store, self-pruning.
1081
1082Migrations additive-only.
1083
1084**`memberships`** β€” `(team, person_ref, role)`, role being `owner` or
1085`member`, added by ruling 23. Written **only** at the directory origin, by a
1086team owner, behind a **fresh-assertion step-up β€” which is Β§14's row, now triggered**.
1087An earlier pass of this branch claimed it was a different mechanism for a
1088different caller; that was wrong and is reversed here. The directory origin
1089holds no credential (Β§4: it "obtains its session by exchanging an assertion,
1090the same mechanism instances use"), so its session's `AuthTime` comes from
1091that exchange, and the only way to make a failed `sessions.Fresh` pass is a
1092**new exchange in which the credential origin re-verifies** rather than
1093minting from its standing session β€” a `max_age`-style parameter on the
1094exchange, which is exactly what Β§14 describes. (Β§5.2's show-codes-once page
1095does sit behind a plain `sessions.Fresh`, but that page is on the credential
1096origin, where the session was minted by real authentication. It does not
1097transfer.) The doctrine agrees: Β§5.4 says "home Β§14 names it; this is its
1098trigger".
1099
1100*(Widened by `implementation/team-provisioning-amendment.md` Β§2 item 11: the first owner may also come from an operator-authored plan over the operator endpoint; the signup queue is untouched and still drained by a human.)*
1101
1102**Or seeded by the drain** with the person the sealed queue payload Β§7
1103already carries. That bootstrap exists because gating a membership write on an owner
1104needs an owner to exist first, and the circularity has to break outside the
1105roster. **The seed needs one thing said out loud:** the payload holds an
1106**address**, the roster keys on a **person ref**, and turning one into the
1107other needs the pepper β€” which only the home holds (ruling 4) β€” plus a
1108person stub if that owner has never signed in (Β§6). So the drain calls a
1109**home-side operator verb**, the same surface that marks an instance live;
1110it never holds the pepper itself. That verb mints an owner, so it is
1111security-load-bearing and is named rather than left to be improvised. **A
1112sibling drain (call 4b) seeds nothing** β€” the team already has owners, and
1113the person its payload names is the **welcome-mail recipient and that
1114instance's own initial admin**, not a roster write; Β§7 and Β§10 agree once
1115that is said. Call 8 reads this table and nothing else. Call 2 cannot write it.
1116
1117**`memberships.added_at`** β€” the day (whole days since 1970, UTC) a
1118membership began; nullable, NULL for every row written before it existed.
1119Written by the seed verb over the operator endpoint and by the Team page's
1120confirm, never updated. **`membership_names`** β€” `(team, person_ref,
1121sealed_name, updated_at day)`, an owner-chosen display name sealed under
1122`directory.member-name/v1/<team id>/<person ref>`, 1–64 bytes, never
1123containing "@", deleted with its membership row, never on an assertion, call
11248, a log line or an error string. **`team_add_intents`** and
1125**`team_resolve_receipts`** β€” an owner's add-by-email in flight (intent id
1126hashed, name and resolved person ref sealed, ten minutes) and the receipt
1127jti ledger; the address itself is typed and resolved only on the credential
1128origin and never reaches the directory. All four live in the directory's
1129additive `oficina_directory_team` set, applied by the serving schema
1130(`team-members.md` Β§3 rule 5, Β§4, Β§5).
1131
1132Guests are **not** on it. A guest grant is minted in the instance and
1133announced to the directory as `kind = guest`, exactly as before; nothing
1134about guests changes.
1135
1136**Losing this database loses credentials, not access β€” except the roster.**
1137The directory rebuilds as instances re-upsert; passkeys do not. **The
1138membership record does not rebuild either**, and that is new with ruling 23:
1139call 2 cannot write it, and no channel reaches a hibernating instance to ask
1140for it. Recovery is the instances' own copies plus an owner's confirmation β€” and the mechanism is worth naming, because "the instances' copies" is not a channel: no call carries a roster *to* the home (call 8 is a pull), so it means **an operator reading an instance's copy out by hand and re-seeding through Β§7's operator verb**. After a total loss the confirming owner cannot be one the home knows, so the seed verb is what breaks that circularity too
1141at the directory origin, or it is re-entry by hand.
1142
1143**A restore mints a new roster generation.** Refusing an epoch lower than
1144the one an instance holds is not enough on its own: a restored home reissues
1145the same numbers over a recovered roster and, two writes later, an instance
1146accepts an epoch it believes is fresh carrying members that were removed. So
1147the roster carries `(generation, epoch)`, the generation changes whenever the
1148home cannot prove continuity with the epochs it last issued, and an instance
1149seeing an unfamiliar generation holds its roster stale and admits nobody on
1150team standing until an owner confirms it. A restore is a human event and it
1151costs a human action. *A backup you have never
1152restored is a hope, not a backup* β€” the restore drill runs before launch.
1153
1154---
1155
1156## 11. Shape and design
1157
1158Implementation status, 2026-09-11: the registry contains six integrated native apps (Docs, Sheets, Slides, Calendar, Meet and Memoria), each with the shared scriptless team chooser. All remain provisionable false. The proposed app grid, team switcher and New button below remain unimplemented; the preview launcher is the current directory surface. See implementation/directory-runtime.md for consumer evidence and deployment boundaries.
1159
1160Ruling24 adds exactly one progressive enhancement: assertion.html may load /static/assertion.js to submit its registered-destination form. The visible Continue button remains usable with scripts off. This extends the earlier passkey-only allowlist without a blanket script exemption. Credential form-action is the process-wide exact consumer manifest; markup injection could post to any registered origin, which is why the credential origin must render no account-authored markup.
1161
1162rastrillo `server` shape, zero-JS baseline, `day` theme, and the
1163**attribute** vocabulary β€” `rst-btn`, not `class="rst-btn"` (ruling 20).
1164
1165**The seven utilities are the exception, and they are not a loophole.**
1166`rst-sr-only`, `rst-mono`, `rst-m-hide`, `rst-grow`, `rst-nm`, `rst-danger`
1167and `rst-cell-mut` **keep the class spelling**, because they have **no
1168attribute twin at all** β€” verified at v0.22.0: five `.rst-sr-only`
1169selectors and zero `[rst-sr-only]`. tokens.css says why in its own header:
1170"Utilities keep the class spelling and are not paired… They are not kinds β€”
1171they are cross-cutting styling, which is what class is for, and they stay
1172class after the move", and rastrillo's Β§6-v3 agrees ("`class` is for
1173utilities and the app's own CSS"). Writing `<span rst-sr-only>` matches
1174nothing, so screen-reader-only text renders **visible**. Kinds, variants and
1175parts are attributes; these seven are classes.
1176
1177**Corrected 2026-09-05, verified against the pinned `rastrillo v0.22.0`.**
1178An earlier draft recorded "zero bare `rst-*` attribute selectors against
1179~528 `.rst-` class selector occurrences", verified 2026-08-30 against
1180`origin/main` post-design-system-v2. That was true when written and is
1181false at every version this repo has ever pinned: `ui/tokens.css` at
1182v0.22.0 has **129 distinct bare `rst-*` attribute selectors** (a 130th
1183attribute, `rst-tone`, appears only ever valued β€” `[rst-tone~="positive"]`)
1184against **536** `.rst-` class occurrences. The twins arrived in **v0.21.0**, which
1185is what this repo's first `go.mod` pinned β€” so the claim was falsified
1186before the skeleton existed, not by a later bump.
1187
1188**Write the attribute spelling: `rst-btn`, not `class="rst-btn"`** (ruling
118920, 2026-09-05). This section ruled the class vocabulary on 2026-08-30 and
1190every reason it gave has since died, so the ruling went back to Paul rather
1191than being propped up with a third. Two reasons died. "The attribute
1192grammar is unreleased" died at
1193v0.21.0. "The partials we render alongside write classes" died at **v0.22.0,
1194the current pin**, where the shipped partials flipped to the attribute
1195spelling β€” rastrillo's design-system Β§6-v3 stage 2 β€” and the class spelling
1196in `ui/partials/` falls from 124 occurrences to 6. tokens.css's own header
1197still says every shipped partial writes classes; **that sentence is stale
1198upstream.**
1199
1200**So the app starts on the spelling that survives.** rastrillo Β§6-v3 rules
1201"One spelling, not two. No permanent class fallback" and drops the class
1202selectors before 1.0; this app has no `rst-` markup at all yet; and an app
1203writing classes beside v0.22.0's attribute partials *is* the mixed codebase
1204the old rule wanted to avoid. Free today, a sweep after the first template.
1205
1206Re-check the counts whenever the pin moves, say which version was checked,
1207and **count `ui/partials/` as well as `ui/tokens.css`** β€” checking one and
1208not the other is how the second reason survived a pass looking for exactly
1209this. `Pair`, `Allocate` and `--rst-header-rule` remain in zero **source** files
1210β€” they appear only in rastrillo's own design-system spec, in its
1211ruled-but-not-built list.
1212
1213**`rastrillo doctor` landed in v0.21.0** β€” an earlier draft's "until
1214`rastrillo doctor` lands" was a trigger that had already fired. When this
1215app vendors `static/`, run `rastrillo doctor --fix` on each upgrade rather
1216than re-copying by hand. There is no `static/tokens.css` in the tree today
1217(Β§11's zero-JS page links no stylesheet), so this is an instruction with no
1218object until the first vendored asset arrives. (The unstyled page is
1219`internal/home/page.go`; this section defines no page of its own.)
1220
1221Every screen works with scripts off β€” **with one named exception, and the
1222day it arrived is the day this sentence was tested** (ruling 21). This
1223section used to say "no surface here has any reason to require script, and
1224the day one does is the day this section is wrong". That day came with
1225passkeys: a WebAuthn ceremony is `navigator.credentials`, script by
1226construction. rastrillo ships the hard half (`webauthn.JS()` embeds `js/webauthn.mjs`),
1227so the only question was whether one screen may require script, and the
1228answer is yes. Precisely: `webauthn.mjs` exports bare `navigator.credentials`
1229wrappers and makes no network call, so the app still writes a few lines of
1230glue β€” fetch `/begin`, call the wrapper, POST `/finish`, follow the `to` it
1231returns. **That glue is a static same-origin file, never an inline
1232`<script>`**, which also means the credential origin's CSP moves from the
1233`script-src 'none'` a zero-JS RP could otherwise have to `script-src 'self'`.
1234Gate 5 is untouched: embedded module bytes and app source are not
1235account-authored strings.
1236
1237**The carve-out is exactly the passkey enrolment and ceremony screens.**
1238Magic-link sign-in, recovery-code redemption and the whole springboard stay
1239scriptless, so a person with script off keeps a working sign-in and loses
1240only the optional second factor (ruling 15 already makes it optional). The
1241no-`<script>` test gets an **explicit allowlist of those screens**, never a
1242blanket exemption β€” a rule with a list is checkable; a rule with an escape
1243hatch is not.
1244
1245**The springboard** (ruling 17). The directory origin is the suite's front
1246door, and it is **one page**: a grid of apps, with a **team switcher as a
1247dropdown in the header**. You pick a team above; the grid below is that
1248team's apps. It is a dropdown rather than a first-level screen because a
1249person with one team would otherwise pay a click for a choice they do not
1250have β€” and one team is expected to be the common case at launch, which is an
1251assumption to revisit rather than a measurement.
1252
1253**Zero-JS, concretely** (Β§11's own rule, and gate 6): the switcher is a
1254`<details>`/`<summary>` disclosure whose items are ordinary GET links to
1255`/?team=<sqid>` β€” rastrillo v0.22.0 ships exactly that as
1256`ui/partials/dropdown.html`, and ruling 22 keeps the switcher able to use it
1257rather than needing a form of submit buttons. A `<select>` with an
1258`onchange` would need script and gate 6 would fail it.
1259**The selection lives in the URL** β€” `?team=<sqid>` on every team view β€”
1260**because it is navigation state, not session state** (ruling 22). Which
1261team you are looking at is *where you are*, and a URL is what a browser,
1262its history, its tabs and another person all already understand that to
1263mean.
1264
1265**`/` stays a generic entry.** It picks a team β€” the one you have, or the
1266**oldest** if several β€” the lowest *id*, the integer the sqid encodes,
1267not the sqid's string order. The column must be `AUTOINCREMENT`: a plain
1268SQLite rowid can be reused after the highest row is deleted, and then
1269"oldest" silently stops meaning oldest β€” and `302`s to the explicit URL, so "take me home"
1270is still one clean link that works for everybody, while every actual team
1271view is addressable. If you have no teams it renders the empty state rather
1272than redirecting.
1273
1274**This is where the 2026-08-30 draft already had it.** Ruling 17 said "the
1275selection lives in the URL (`?team=…`)", and ruling 22 is a reaffirmation
1276with the reasons supplied and `/`'s redirect added β€” after two detours that
1277were both wrong. Recorded, because each looked right when written.
1278
1279An earlier draft said a **URL fragment** "cannot work" scriptlessly. It can:
1280CSS `:target` switches on it with no request at all β€” `href="#acme"` and
1281`#acme:target { display: block }`. What actually rules it out is narrower:
1282the **server never learns which team you are looking at**, so nothing
1283server-rendered can be team-scoped β€” not the grid (which tiles, which New
1284buttons), not the switcher's own `aria-current`, and not gate 4's 404 for a
1285team you are not in.
1286
1287A second draft moved the selection into a **session cookie**, on the
1288reasoning that `?team=` "puts an account-authored name in referrers, history
1289and platform logs". False three ways: Β§10 gives every team a **sqid**, which
1290is opaque, so nothing account-authored is in that URL at all; referrers send
1291only the origin cross-site under the browser default
1292`strict-origin-when-cross-origin`, which a builder should set explicitly
1293rather than inherit; and no platform request log carrying paths was
1294found when this was checked. The cookie then lost on its own merits:
1295
1296- **History does not restore a cookie.** Press Back and the page you see may
1297 be Acme's while the next request from it resolves to Beta β€” display and
1298 server silently disagreeing, which is the worst shape a bug can take.
1299- **A shared cookie couples every tab, on every request.** An earlier draft
1300 patched this by putting the sqid on the New button; that fixes one link.
1301 Every team-dependent link and form has the same problem, and fixing them
1302 all means putting the team in the URL β€” at which point the cookie does
1303 nothing.
1304- **It buys nothing on caching.** Both shapes need `Cache-Control:
1305 no-store`; a cookie does not protect a response from the platform edge.
1306- **GET is the right verb here.** Selecting a team **mutates nothing** β€” it
1307 is a read of a different view β€” so GET is what HTTP means by it. A cookie
1308 would have introduced mutable state to express a location. (An earlier
1309 draft cited Β§8 as having "refused a state-changing GET for theme". It says
1310 no such thing: Β§8 chose a redirect-based POST over a *cross-origin
1311 credentialed fetch*, on CORS, SameSite and zero-JS grounds. The
1312 distinction that matters is real β€” a theme write mutates a stored
1313 preference and this does not β€” but the citation was invented, which is
1314 the failure this file keeps having to retract.)
1315
1316**Three costs, stated rather than discovered.** A shared front-door link is
1317team-specific: send someone `/?team=<sqid>` and they land on that team, or
1318on a **404 if they are not in it** (gate 4 β€” 404, never 403). `/` is the
1319link to share when you mean "the suite". A person in several teams always
1320lands on their oldest from `/`, which is stable rather than clever, and the
1321switcher is one click away. And **a shared team link followed while signed
1322out must survive sign-in** β€” Β§5.6 makes the return URL carry the query, and
1323gate 3 asserts it; without that the person arrives at a bare `/` and is
1324silently redirected to a different team than the one they were sent.
1325
1326**No-store is route-wide, and this is the first place the spec says so** β€”
1327the *need* predates ruling 22 β€” the front door has always rendered the
1328viewer's own rows β€” but nothing had written it down. Every authenticated
1329response on both origins sends `Cache-Control: no-store`, `/`'s personalised
1330redirect included, asserted by **gate 10**. The platform edge caches any 2xx GET carrying
1331a positive `max-age`, keyed on host, path and query, shared across every
1332visitor, and it does **not** refuse on a request `Cookie` β€” which is why
1333this needs a gate rather than a convention.
1334
1335**Tiles come from the viewer's own rows, never from the label** β€” and since
1336ruling 23 "rows" means two tables, not one. **A member's tiles come from
1337`memberships β‹ˆ team_instances`**; **everyone's `directory` rows are unioned in on top, whatever their
1338`kind`** β€” de-duplicated, because a row is a hint (Β§6) and an ex-member who
1339kept a per-item grant has a `kind = member` row and no roster row (doctrine
1340gate 5 keeps that grant). Filtering the union on `kind = guest` would hide
1341their tile, which is the same class of hole one door along. This is not a refinement, it is a hole that had to be
1342closed: a member with team standing and no per-item grant has **no directory
1343row at all** (call 2 fires when a grant changes), so a tiles-from-directory
1344front door would have hidden their own team from them. The home owns both
1345tables, so it joins them rather than taking the doctrine's own mechanism β€”
1346Β§5.4 has the **home** announce a new member into each `team_instances` row's
1347directory entry at roster-write time (no instance and no call 2 involved),
1348which works but puts a second writer into `directory`. **The outcome is
1349the doctrine's** β€” Β§5.4's "the front door shows the whole team on first
1350sign-in" β€” reached by a different mechanism, and Β§15 carries it for the
1351doctrine's next revision.
1352
1353**The two cases read differently, and both are gate 4's business.** For a
1354**guest**, the instances under an app are their own `(person ref, app,
1355team)` directory rows; reading it as "every `acme.*` host" would tell a
1356guest in `acme.docs` that Acme also uses Sheets, which is another person's
1357row and what gate 4 forbids. For a **member**, every `acme.*` host *is*
1358their own standing β€” through the roster, not through a grant β€” so the join
1359shows them.
1360Gate 4 asserts both: a guest of `acme.docs` sees no `acme.sheets` tile, and
1361a member of Acme sees no Beta instance. A registry entry with no instance
1362under it reveals only that the app exists in the suite and that you have no
1363team in it, both of which you already knew.
1364
1365**Which apps exist comes from a registry, not from your grants.** It is
1366**compiled-in configuration, not a table** β€” the suite's app list changes
1367when someone ships a release, never at runtime, and a table would invite a
1368runtime edit nobody reviewed. It holds, per app: slug, display name,
1369`provisionable`, `integrated`, and β€” **for `integrated: false` entries
1370only** β€” a foreign host. An integrated app needs no hostname field at all:
1371ruling 16 fixes its shape as `<team>.<app>.oficina.works`, and a free
1372per-app pattern is an invitation to drift from it. The directory renders
1373your teams' instances
1374under each entry; an entry you have no instance in still renders, showing
1375the New button, which is the affordance a grants-only list cannot have. The
1376registry is not invented for this screen β€” Β§4's `<team>.<app>.oficina.works`
1377has to resolve per app and Β§7 has to know what can be provisioned, and
1378without it that knowledge is scattered across templates.
1379
1380**Preview navigation exception, 2026-09-09 β€” approved by Paul for the
1381current preview connection.** The directory may read the operator-only
1382`HOME_DOCS_PREVIEW_ORIGIN` setting and link the Docs catalog entry to that
1383canonical HTTPS origin's fixed `/signin` path, labelled **Open preview**.
1384An empty setting keeps the existing `/apps/docs` team chooser. This is an
1385opt-in preview launcher, not a team instance or a change to the canonical
1386`<team>.<app>.oficina.works` route policy. It does not register a consumer
1387or grant access; the destination must already implement its own Home
1388handshake. The setting is rejected outside the directory role, for a
1389noncanonical origin, or for the credential/directory origins themselves.
1390The current catalog is a staged list with explicit unavailable states;
1391the full team-scoped grid and its switcher remain to be implemented.
1392
1393**Suite preview extension, 2026-09-10 β€” Paul requested the remaining apps
1394use the working Home handoff.** `HOME_APP_PREVIEW_ORIGINS` (or its canonical
1395base64 alternative) is an optional operator map from a compiled catalog
1396slug to a canonical HTTPS origin. Each configured link opens the fixed
1397`/signin` path. Unknown apps, empty destinations, self-origins, duplicate
1398JSON keys and non-directory use are refused. The legacy Docs setting may
1399coexist with other app entries, but specifying Docs in both settings is
1400refused. Configuration changes navigation only; each destination must have
1401its separately reviewed consumer and account-linking integration before
1402its link is enabled. Memoria is included in the catalog. Mail and Files
1403still require their own vault-unlock flow; this setting grants no keys or
1404membership and changes none of the canonical team routing rules.
1405
1406**Mail and Files are `integrated: false`** β€” Keymail and Slopbox are
1407separate products in separate repositories with their own auth. They render
1408as plain outbound links, never as team-scoped tiles, until each verifies
1409assertions per Β§5.3 (Β§14).
1410
1411No activity feed **yet** β€” ruling 18 approves one, pulled at render, per
1412team; `design-activity-pull` passed its review on 2026-09-05 and it is
1413sequenced as Β§13 step 10, blocked on steps 3 and 4.
1414No template gallery, no upsell chrome, no waffle.
1415
1416---
1417
1418## 12. Testing gates
1419
14201. **Plaintext grep** β€” raw SQLite file and WAL plus this app's store
1421 objects, against a seeded corpus of known addresses **and, since the
1422 2026-09-05 amendment, known titles, URLs and actor strings**. The verb is
1423 now *never stores*, so what the grep looks for has to grow with it or the
1424 clause has no test behind it. `design-activity-pull`'s gate 11 is the
1425 driven version, through the failure paths.
14262. **No-address-at-rest** β€” the schema has no address column, and a full
1427 sign-in plus directory upsert plus rekey **plus the roster seed verb**
1428 (Β§10 β€” a fourth path that unseals an address and hashes it) leaves no
1429 readable address
1430 anywhere, WAL included.
14313. **Assertion abuse suite** β€” audience confusion, replay, expiry, algorithm
1432 confusion, signature stripping, **open redirect**, **login CSRF**,
1433 **unknown `kid`**, and **query preservation on the return URL** (Β§5.6).
14344. **Two-person isolation** β€” one person's directory never contains
1435 another's rows; 404, not 403. **Three cases since ruling 23** (Β§11): a
1436 guest of `acme.docs` sees no `acme.sheets` tile; a member of Acme sees no
1437 Beta instance; and β€” the positive one, since the hole took three passes
1438 to find β€” **a member of Acme with no grant in `acme.sheets` does see the
1439 `acme.sheets` tile.**
14405. **Origin separation** β€” no account-authored string reachable on the
1441 credential origin. Β§4 made mechanical. **Amended by ruling 26:** the
1442 one exception is the address Home sealed into this browser's cookie,
1443 on the door alone, as text and as a form field's `value`. The gate
1444 drives every credential route with a validly sealed canary cookie, for
1445 each remembered method, and fails if the canary renders off the door
1446 or anywhere in the markup but a text node or a `value`, if any page
1447 renders a typed or query-supplied address, or if the door renders an
1448 address Home did not seal.
14496. **Scriptless-affordance diff** β€” every page, script-stripped. **For the
1450 ruling-21 screens: every affordance except the passkey ceremony button
1451 itself, and the allowlist is named explicitly in the test. The ruling24 handoff keeps its Continue button with scripts off.** Exempting
1452 the whole screen would be wrong rather than merely loose β€” the
1453 confirm page carries the ceremony *and* the recovery-code form, and
1454 `passkey.SignInRecovery` is a plain form POST precisely "because
1455 recovery is exactly the moment WebAuthn or JavaScript isn't working".
1456 A blanket exemption would let that form regress unnoticed, on the one
1457 screen where scriptlessness matters most.
14587. **Contrast test** copying `ui/contrast_test.go`'s arithmetic verbatim.
14598. **Restore drill** β€” a real restore from replication, before launch,
1460 against a written RTO.
14619. **No-content-in-logs** β€” scan log lines, error strings and metric labels
1462 for addresses, team names, queue payloads **and pulled content β€” titles,
1463 URLs, actors** (Β§3.4).
146410. **No-store** β€” drive every route on both origins and assert each
1465 authenticated response carries `Cache-Control: no-store`, **call 8's
1466 roster read included** (it is a bearer-authenticated GET, and whether the
1467 edge refuses on `Authorization` is not something to rely on), the
1468 personalised `/` redirect included (ruling 22). It exists for the edge-cache
1469 reason Β§11 sets out.
147021. **The roster write** β€” assert it requires a fresh assertion (Β§14's
1471 step-up, triggered by ruling 23), that call 2 cannot write `memberships`,
1472 and that a write naming a team the caller does not own answers 404 like
1473 any other unknown team. The most security-load-bearing new write in this
1474 spec had no home-side gate; suite gates 5 and 8 are instance-side and
1475 schema-side.
1476 (Numbered 21, not 11: `design-activity-pull` owns gates 11-20.)
1477
1478Review on a deployed canary, never localhost. Verify with
1479`X-Carlos-Version` on the canonical host after the watch.
1480
1481**Every branch gets a discussion, and that discussion is the review
1482record**, including which model reviewed it.
1483
1484---
1485
1486## 13. Sequencing
1487
14881. Skeleton, `AGENTS.md`, gates 1, 2 and 9
14892. Hand-rolled sign-in (Β§5.1), second factor, recovery codes
14903. Assertion minting, the redirect protocol, and gate 3
14914. Directory: calls 2 and 3, blind index, person refs β€” **and the roster** (ruling 23): the `memberships` table, the seed verb, the owner write behind Β§14's step-up, call 8, and gate 21. The doctrine puts call 8 on top of this step, and a suite-shape Sheets or Docs needs it for team standing, so the ship gate below is not just step 4 but step 4 including the roster
14925. Signup, queue, rate limits, name reservation
14936. The operator drain
14947. Preferences, the assertion claim, call 6
14958. Rekey journal (call 5), epoch, decommission
14969. Restore drill and the RTO
149710. **Activity on the front door** (ruling 18, `design-activity-pull`).
1498 **Per team, following `?team=` β€” RULED 2026-09-05 by Paul.**
1499 `design-activity-pull` was revised to match on 2026-09-05 (its ruling 6)
1500 and approved. Per-team also shrinks the fan-out Β§6 there worries
1501 about, from every instance a person can reach to the apps in one team.
1502 **This is not a merge-logic tweak.** Per-team retires that design's
1503 headline argument β€” that only the home can answer "my things" rather
1504 than "this team's things" β€” so its Β§2.1 was re-justified and its Β§5.4
1505 reopening revisited, not just its query changed β€” done 2026-09-05.
1506 Blocked on steps 3 and 4, and deliberately last. It has no claim on
1507 anything earlier and must not acquire one: the identity layer is the
1508 suite's critical path and this is a front-door nicety.
1509
1510**Sheets and Docs are unblocked from step 3, not step 9** β€” assertions plus
1511a stub directory is enough for both. But **step 4 must land before either
1512ships**, because call 2's person ref is what their grant rows key on.
1513
1514---
1515
1516## 13a. Consumed suite rulings
1517
1518The suite sharing doctrine (`oficina/suite`) binds this spec. Read against
1519**revision 7, commit `2b78680`**, reachable from that repository's `main`. (An earlier version of this line cited revision 4 at `210312f` under gate 9's one-revision grace; three revisions later that grace is spent, and the cited revision now contains Β§5.3's epoch scoping outright rather than by grace. **Every ruling this spec consumes is textually unchanged from revision 4 through 7** β€” 5 changed the status block and A.1's note; 6 and 7 scheduled S6 and added Β§6 paragraphs, and the doctrine's Β§1 rulings table is byte-identical between 4 and 7.) `design-activity-pull` Β§1.1 carries the same citation and the fuller account.. Ruling 23 adopts it.
1520
1521| # | What it settles for the home |
1522|---|---|
1523| 1 | The team is the boundary. Β§2.2's "never federates" becomes "never crosses a team". |
1524| 2 | Sharing is membership across teams. |
1525| 3 | Custody and authorization are two rules; authorization is never cached. The home holds neither β€” it answers facts about its own records. |
1526| 4 | The home owns identity, the team and the membership roster. It never owns a per-item grant. |
1527| 5 | Two shapes. A lone instance never dials a home; a suite instance takes identity and roster from one. |
1528| 8 | Two credentials. Only the home can mint an assertion, which is why call 7 carries one and sibling calls do not. |
1529| 12 | Membership is its own record, written only by an owner. This is ruling 23. |
1530| 13 | A compromised home is three compromises, conceded separately β€” see below. |
1531| 14 | Custody is bounded at acquisition and retired by the feed. |
1532| 25 | **Supersedes 21 and 24: no script by default; script only to progressively enhance a page or provide interaction HTML and CSS cannot, and always prefer none.** Every screen works with scripts off; scripts are static same-origin files, never inline, and the no-`<script>` sweep names Home's script files (a closed list) rather than screens β€” Β§11 | A closed list of screens allowed script, which the busy rule on every form outgrew | Paul, 2026-09-29, verbatim: "the default [is] no script, but scripts can be added to progressively enhance and provide interaction, but always prefer no JavaScript" |
1533
1534Calls 7 and 8 are added to Β§9. Call 7 is the activity pull, and it waits on
1535the identity layer (Β§13 step 10) because it carries a real assertion. Call 8
1536is the roster pull and waits on step 4.
1537
1538### What the doctrine makes the home concede
1539
1540Suite ruling 13 splits "a compromised home" into three, and Β§2's careful
1541sentence about a compromised **directory** does not cover all of them. The
1542home spec should not be read as promising more than this:
1543
1544- **A leaked database** gives up the graph, the roster, and β€” new with
1545 ruling 23 β€” who owns each team. No content.
1546- **A compromised directory origin** can add a member, and a member reads
1547 everything team-visible in every instance of that team, through each app's
1548 ordinary front door. That is the blast radius ruling 23 actually adds.
1549- **A compromised credential origin** can sign in as anyone, owners
1550 included. It holds the signing key (Β§5.3), an instance's grants join is
1551 keyed on the `sub` this home asserted, and Β§5.4 already calls a hostile
1552 `sub` account takeover. **This is not new and ruling 23 did not cause it**
1553 β€” it has been true since ruling 1 put every credential on one origin, and
1554 a passkey does not help because the passkey lives there too.
1555
1556**The step-up bounds none of them**, because the compromised authority is
1557the one performing it, and neither does a directory row or a notification:
1558those are what honest code leaves behind, not what a compromise must. Β§3.3's
1559idiom applies β€” said plainly rather than counted as a fix.
1560
1561**The Pegamento filing.** The suite doctrine records a divergence from
1562Pegamento Β§10.3, *"a compromised glue grants nothing"*. The honest shape of
1563it is not that the roster diverges: it is that **this home was never a
1564Β§10.3 glue.** Β§10.3 is written for a registry, and ruling 1 made this an
1565identity authority. That filing belongs at `carlos/pegamento`.
1566
1567---
1568
1569## 14. Deliberately not built yet
1570
1571| Thing | Trigger |
1572|---|---|
1573| **Owner-enforceable per-team 2FA** (ruling 15) | A team asks, *and* **a per-team policy record is written** (an owner's write at the directory origin, the roster's own shape) **and assertion minting learns to act on it** β€” `passkey.Gate` asks for the ceremony only when the account is already enrolled, so an un-enrolled member of a floored team passes straight through and a floor has to force enrolment, not merely demand a ceremony. **Not "argued past Β§2.2"**, and not "a sixth call carrying team policy": ruling 23 rewrote that clause, and since the home would enforce at minting no call carries policy anywhere |
1574| Pegamento's vault facet β€” team names the home cannot read | The vault ships with a recovery story |
1575| Operator reset for a fully locked-out person | The first person loses passkey and codes together |
1576| Auto-drain of the queue | The platform ships a machine credential, **and** we choose to give up the abuse gate, **and** ruling 19's fallback adjudication is automated β€” three decisions. A machine credential supplies no judgement about who may take a reserved name (Β§7) |
1577| **Suite-wide sign-out / session revocation** | Named as an exposure now: a stolen laptop's instance sessions live to their TTL with no revocation channel. Trigger: the first report, or before any team holds regulated data |
1578| **Account deletion / erasure** | Before a person asks, which under most regimes is not optional for long |
1579| ~~**Step-up for instances**~~ (`RequireFresh`-grade) | **Triggered 2026-09-05 by ruling 23: roster writes need it** (doctrine Β§5.4, A.1). It is built with the roster β€” a fresh-assertion round trip with a `max_age`-style parameter, requested by the directory origin and honoured by the credential origin. The caller differs from the instance flow this row first imagined; the mechanism does not |
1580| Any preference beyond theme | It passes Β§5.4 |
1581| Billing, plans, quotas | Somebody has to pay |
1582| **Mail and Files behind suite SSO** | Keymail or Slopbox verifies assertions per Β§5.3 in its own repository. Until then they are `integrated: false` registry entries rendered as outbound links (Β§11, ruling 17) |
1583| A support console | Never, under **Β§2.2's first bullet** β€” "only to that person", "no operator view". Anchored there rather than Β§0 since the 2026-09-05 amendment; see Β§2.2. |
1584
1585---
1586
1587## 15. Open
1588
1589- **The doctrine's next revision should carry Β§11's tile mechanism.** Its
1590 Β§5.4 has the home announce a new member into each `team_instances` row's
1591 directory entry; this spec reaches the same outcome by joining
1592 `memberships β‹ˆ team_instances` at render, which puts no second writer into
1593 `directory`. Same outcome, different mechanism, and the doctrine does not
1594 know about it.
1595- **Docs' re-review** of Β§9 after this revision β€” **calls 7 and 8 included** β€” the contract changed
1596 substantially (person refs, call 5 rewritten, call 6 added).
1597- **`rastrillo/rastrillo` #2** β€” the `auth` subject hook and sealed link
1598 store. Adopt and delete ours the day it lands.
1599- **`rastrillo/rastrillo` #1** β€” assertion verification helper.
1600- **`carlos/platform` #4** β€” the machine credential.
1601- **`carlos/pegamento` #1** β€” the shared-instance ruling, and whether Β§9
1602 protects the credential or the knowledge.
1603- ~~`design-activity-pull`'s own review pass.~~ **Run 2026-09-05: four
1604 passes by Fable, the fourth approving.** What remains open there is design,
1605 not review: the per-instance deadline, the fan-out budget's number, the
1606 body cap, the refresh TTL, the hard maximum cache age, the cache bounds,
1607 the minimum pull interval, whether the two origins are one process, and
1608 whether swap and core dumps are off, whether `actor` is worth having,
1609 and
1610 the front door's layout.
1611- **`design-activity-pull` Β§11's last row cites "(Β§2.2, Β§0)"** for "an
1612 operator view of anyone's feed". After the 2026-09-05 amendment Β§0 no
1613 longer forbids that β€” Β§2.2's first bullet does. **And its Scope line says
1614 "without the home learning or holding any of it"**, which Β§0's gloss now
1615 says outright is false: the home does learn, and holds bounded in RAM.
1616 (Its Β§5.4 is safe β€” "learns nothing *durable*".) Two one-word fixes in
1617 that file, recorded here so they are not lost. **Third: no gate there
1618 (11-20) exercises eviction on the entry-count or bytes-per-person bounds**
1619 β€” gate 20 tests the age bound only, and the entry count is the one that
1620 caps the cross-person set.
1621- ~~Class or attribute spelling β€” Β§11 needs a re-ruling~~ β€” **closed by
1622 ruling 20**, 2026-09-05: the app writes attributes, and the seven
1623 unpaired utilities keep `class`.
1624- ~~A real suite domain β€” triggers Β§5.7~~ β€” closed by ruling 16. Β§5.7 is
1625 titled for the case it does not apply to: the `oficina.works` move needs
1626 no RP rename drill.
1627
1628
1629## Delegated-agent directory read (implementation draft, 2026-10-24)
1630
1631Paul requested a single browser-approved Oficina connection across apps, with
1632an Oficina implementation now and later convergence on Rastrillo. This branch
1633adds a directory-only service read. GPT-6 Astra independently passed the scoped
1634source/spec review on 2026-10-24, recorded in Home discussion 85. Full required
1635checks and deployed canary review remain separate gates before merge. It does
1636not change identity assertions or grant app item access.
1637
1638`POST /api/agent/directory` accepts a single opaque `subject` from the configured
1639connection service and returns current team memberships with live, validated app
1640origins. It reads the same memberships and instance records as the team chooser,
1641in one database snapshot. It never accepts an address, role or destination from
1642the caller, never provisions membership and never holds document content.
1643
1644The endpoint is disabled by default. The directory deployment may set
1645`HOME_AGENT_DIRECTORY_TOKEN_SHA256` to the SHA-256 hex digest of an independently
1646provisioned random service token (at least 32 random bytes). The connection
1647service holds the token; Home holds only its hash. This is service authority to
1648read opaque-subject directory facts, not an end-user access token. Rotation
1649replaces the hash; the previous credential is refused once the directory process
1650restarts with the new configuration. The setting
1651is rejected for credential and legacy roles. Cookies cannot authorize this
1652endpoint; exact host, bearer, method, bounded JSON and destination validation
1653apply. All responses are no-store; addresses, tokens, names and destinations
1654remain absent from logs. Home's existing item/content and credential-origin
1655boundaries remain binding. The separate connection service owns client grants,
1656consent, audience restrictions, refresh rotation and revocation; each app still
1657resolves a linked local identity and enforces current item access.
1658