oficina / home Public

Spec: Oficina ID native slice (draft for Paul; not reviewed)

Human

Prompt

Write the design spec for Oficina ID's native slice — how the five Oficina native apps (Calls, Docs, Sheets, Calendar, Memoria; Mac + iPhone, SwiftUI) sign in with Oficina ID, without the browser round trip, with several Oficina IDs at once and teams under each. This is a spec only: no implementation. [...] Paul's rulings that the spec must honour: Oficina ID is one account across every app and team, named "Oficina ID" on screen; native sign-in is in-app email + 6-digit code (Mail one-time-code AutoFill), passkeys next (native passkeys against RP id.oficina.works need webcredentials: associated domains); several Oficina IDs at once (paul@tito.io, paul@rslw.com) with each one's teams switchable; one sign-in shared across all five native apps (shared keychain access group, App Group); seamless native<->web handoff (opening the web from an app must not ask to sign in again, and must land in the same account+team). And from 11-13: every app keeps its own sign-in AND offers "Sign in with Oficina ID". Where today's rulings and slice 1 pull in different directions, say so plainly and propose the resolution as an explicit question for Paul — don't silently pick. [...] Write it in Home: take a worktree from fresh origin/main of oficina/home (branch e.g. spec/oficina-id-native), add docs/superpowers/specs/2026-11-14-oficina-id-native.md, follow Home's AGENTS.md and the amadan workflow, push and describe the branch, and stop — do not merge. Status line: "draft for Paul; not reviewed".

From this commit's own message. The prompt ledger has no entries for it — which is what a squashed, rebased or amended commit looks like, and what every commit looks like in a repo without a ledger.

Summary

Adds docs/superpowers/specs/2026-11-14-oficina-id-native.md: device-bound native grant in a shared keychain group; in-app email code endpoints and limits; slice 1's passkey/recovery factor rule kept, with the tension raised as Q1; native passkeys via webcredentials:id.oficina.works; browserless assertion to a connect NativeExchange per team instance; directory native teams read; multi-identity device store; per-identity sign-out; outages; native-to-web handle and web session sets; AASA hosting (portero for wildcards); Calls guests; migration; gates; slices 0 and A-E; eight questions for Paul.
Agent notes
Doc only; no code. Line refs checked at e9829fd. Needs highest-capability model review per AGENTS.md before approval.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 4cc21a83e3244b034012e78607388b5eb8ceb221 parent e9829fd
1 file changed, +227 −0
  • docs/superpowers/specs/2026-11-14-oficina-id-native.md +227 −0

CI cancelled — superseded by a newer push — run details

diff --git a/docs/superpowers/specs/2026-11-14-oficina-id-native.md b/docs/superpowers/specs/2026-11-14-oficina-id-native.md
new file mode 100644
index 0000000..b23f6f3
--- /dev/null
+++ b/docs/superpowers/specs/2026-11-14-oficina-id-native.md
@@ -0,0 +1,227 @@
+# 🤖 Oficina ID: the native slice
+
+Status: draft for Paul; not reviewed. Author: Claude (`claude-opus-5-5`), 2026-11-14, written against Home `e9829fd`. AGENTS.md's Review rule still requires a review by the most capable model available, and §17 needs Paul's answers. There is no implementation, deployment or merge approval.
+
+## 1. Decision and boundary
+
+This spec extends [Oficina ID slice 1](2026-11-13-oficina-id-slice-1.md) and does not replace it. Where this spec says nothing, slice 1 binds. It covers the "native deep-link delivery" that slice 1 left outside its scope.
+
+**Paul, 2026-11-14 (native level-up BRIEF):**
+- Oficina ID is one account across every app and team, named "Oficina ID" on screen.
+- Native sign-in is an email and a 6-digit code entered in the app, filled by Mail's one-time-code AutoFill. Passkeys come next.
+- Several Oficina IDs can be signed in at once (paul@tito.io, paul@rslw.com), and each one's teams are switchable.
+- One sign-in is shared across all five native apps (Calls, Docs, Sheets, Calendar, Memoria) on Mac and iPhone.
+- Moving between native and web is seamless: opening the web from an app never asks for a sign-in and lands in the same account and team.
+
+**Paul, 2026-11-13:** every app keeps its own sign-in **and** offers "Sign in with Oficina ID".
+
+**Out of scope:** Contra (slice 2), CallKit/PiP, provisioning, roster writes and per-item grants.
+
+**Home's one rule holds.** Home gains no readable address, no content and no device name. The one new fact it learns is that a person has N signed-in devices, each tagged with a platform.
+
+## 2. Evidence
+
+**Today no device holds an identity.** A native "account" is a host plus an instance cookie (`native-levelup/reports/calls.md` §B3, `docs.md` §3).
+- Docs, Sheets, Calendar and Memoria use rastrillo/native's browser approval. It keeps pending requests in memory, at most 256 of them for 5 minutes each (`rastrillo-native/server/auth.go:23-37`).
+- Calls has its own one-slot store (`calls.md` §C).
+- Keychain items are per app, with no access group (`sheets.md` §3).
+- On iPhone the code compare is impossible, and a link that opens in another browser hangs (`calls.md` §B3).
+
+**What Home has:**
+- P-256 `rastrillo/assertion` v1 minting (`internal/home/exchange.go:72-146`), with an exact consumer registry (`consumer_registry.go`).
+- The passkey gate on both email paths (`id_recovery.go:71-92`), and persistent recovery limits (`identity/migrations/0002_recovery.sql`).
+- 30-day browser sessions (`app.go:123`).
+- An in-memory email budget of 20 per IP and 5 per blinded address per 15 minutes (`app.go:146-147`; keymaildev/signin v0.1.1 `flow.go:123,137`).
+- The directory's `teams`, `team_instances` and `memberships` tables (`directorydata/migrations/0001_directory.sql`).
+- `Store.AgentChoices`, which reads a person's live teams and app origins in one snapshot (`directorydata/store.go:129-177`).
+
+**All five apps already consume Home.** Each imports `connect`, `handoff`, `roster` and `teammode`. A completed `connect` sign-in resolves in order: link, then Home-only person, then team-mode `Unlinked` (roster members only). It then mints with `HomeMethod` (`connect/bridge.go:191-247`).
+
+## 3. The native credential
+
+**On the device**, per identity: a P-256 device key (Secure Enclave where present, else a software key in the data-protection keychain) and a 32-byte random grant token. Both sit in the shared access group `9U4A84C4WK.works.oficina.id` (`kSecUseDataProtectionKeychain` on Mac), `AfterFirstUnlockThisDeviceOnly`, never synchronizable or exported. Slice 0 proves a Secure Enclave key in a shared group works from all five apps.
+
+**At Home**, a new credential-database table `home_id_grants`: `grant_hash` (SHA-256 of the token, primary key), `person_ref`, `device_key` (65 bytes), `platform` (`mac`/`ios`), `method`, `auth_time`, `created_at`, `last_used_day`, `expires_at`. No address, device name or app list. At most 20 live grants per person; a 21st revokes the least recently used.
+
+**Device binding.** Every native call to Home carries `Authorization: OficinaID <token>` and `Oficina-Proof: base64url(payload).base64url(sig)`, where the payload is `{v:1, htm, htu, iat, jti, bh=SHA-256(body)}` signed with rastrillo `crypto` under context `oficina-id/native-proof/v1` (no JWT, no algorithm field). Home requires a live grant, a valid signature by its stored key, `htu` equal to the exact request URL, `|iat−now| ≤ 30 s` and an unseen `jti` (kept 60 s, bounded). A copied token is useless without the key. **No rotation:** five apps share one item and would race, and possession of the key already gives what rotation would.
+
+**Lifetime:** 90 days idle, 365 days absolute (Q4). `auth_time` is the sign-in gesture; use never refreshes it, only a new factor ceremony on the same grant ("Confirm it's you"). **Revocation:** device sign-out, the Devices page (§10), expiry, and passkey replacement by recovery code — slice 1's "revoke all Home sessions" **includes every grant**.
+
+## 4. In-app email code
+
+New JSON endpoints under `https://id.oficina.works/native/v1/`. They render nothing, answer `no-store`, send no CORS headers and accept only `application/json`. Any request carrying `Origin` or `Sec-Fetch-Site` is refused, so no web page can drive them.
+
+**`POST code/start {email, device_key, platform}`** → `202 {start, resend_after:30}`. It classifies the address as `/signin` does (Keymail: Q2), stores a `home_id_native_starts` row (`start_hash`, the address sealed under purpose `native.code`, `device_key`, `code_mac`, `sends`, `attempts`, `expires_at`) and mails the code. The answer is identical for known and new addresses: open signup (ruling 7) mints the person at verify, as slice 1 does. **`POST code/resend {start}`**, proved by the start's key, replaces the code: at most 3 sends, 30 s apart.
+
+**`POST code/verify {start, code}`**, same proof, finds or mints the person as `completeSignIn` does (`signin.go:399`) and runs the same gate as `idGate`. With no passkey enrolled it returns `{grant, auth_time}`. Otherwise it returns `{factor:["passkey","recovery"], pending}`, bound to the start and its key for 5 minutes.
+
+**Codes and limits.** Six uniformly random digits, stored as HMAC-SHA256 under a Home key and compared in constant time. A code lives 10 minutes, is used once and dies after 5 wrong tries; one is live per (blinded address, device key). `start` and `resend` spend the **existing** `/signin` budget, so two doors never double it. `verify` failures take slice 1's persistent, atomic counters (5 per blinded address and 20 per IP per 15 minutes, across all starts), which neither restarts nor parallel requests reset. At most 10,000 live starts, as `id_recovery.go:100` bounds pending factors.
+
+**Privacy.** The address is sealed before the write and erased at verify or expiry, under `secure_delete`. Gates 1, 2 and 9 extend to the table and its logs. An SMTP failure never authenticates.
+
+**The mail** uses estilo chrome. Subject "Your Oficina ID code"; first line "Your Oficina ID code is 123456"; then the expiry and an "ignore it if you didn't ask" line. It has **no link**, because a link would sign in a browser, not the app. `.textContentType(.oneTimeCode)` gives Mail AutoFill (iOS 17+, macOS 14+), and a code read on the iPhone can be typed on the Mac.
+
+## 5. The factor rule: slice 1 against today's ruling
+
+Slice 1: "After passkey enrollment, email/Keymail sign-in requires a passkey or recovery code." The in-app path keeps the rule as written. A verified code on an enrolled account yields `pending`, never a grant.
+
+**`POST recovery {pending, code}`** is the JSON twin of `/passkey/signin/recovery`, with the same limits. It mints an `email+recovery` grant that, as in slice 1, is for sign-in only:
+- it cannot enrol or replace a passkey;
+- it cannot satisfy step-up;
+- replacing a lost last passkey stays on the web.
+
+A passkey completes `pending` instead (§6).
+
+**The tension (Q1).** Paul ruled "code now, passkeys next". Until native passkeys exist, an enrolled person can finish in the app only by spending a recovery code every time. The options:
+- **(a)** native passkey *assertion* in slice A, enrolment in B. Recommended.
+- **(b)** a recovery code or a browser fallback until B.
+- **(c)** the code alone natively. Not recommended: the passkey then adds nothing against a mailbox holder.
+
+## 6. Native passkeys
+
+**Domain association.** All ten builds carry `webcredentials:id.oficina.works`. The credential role serves a static `/.well-known/apple-app-site-association` (`application/json`, no redirect) that lists the ten `9U4A84C4WK.works.oficina.<app>` IDs under `webcredentials`. It holds no account-authored string, and it declares no `applinks`, so §12's handle opens in a browser.
+
+**Sign-in.** `POST passkey/begin {pending?}` returns WebAuthn options: discoverable without `pending` ("Sign in with a passkey", no email), or restricted to that person with it. The challenge is single-use, lasts 5 minutes, is bound to the device key in place of a browser, and stays within `home_id_ceremonies`' bounds. The app calls `ASAuthorizationPlatformPublicKeyCredentialProvider(relyingPartyIdentifier: "id.oficina.works")`, and the system sheet offers phone-as-key itself. `POST passkey/finish` runs Home's existing verification (exact RP and origin `https://id.oficina.works`, user verification, person binding) and mints a `passkey` or `email+passkey` grant. `LegacyRPID` stays empty. Slice 0 confirms on a real device that a native `clientDataJSON.origin` is exactly `https://id.oficina.works`.
+
+**Enrolment (slice B).** `passkey/register/{begin,finish}`, with grant and proof, needs `auth_time` within `enrolFreshness` (10 minutes, `passkey.go:30`) on a grant that is not recovery-derived, and uses slice 1's generated names. The first enrolment returns the ten recovery codes **once**: the app offers Copy, Save and Print, and asks for "I've saved them". `e9829fd`'s zero-codes rules apply. "Create a passkey" is offered once, after the first code sign-in.
+
+## 7. From credential to per-app, per-team session, with no browser
+
+**1. Home: `POST /native/v1/assert {aud, nonce}`** (grant plus proof) returns `{assertion}`.
+- `aud` must be in `consumers()` and must not be the operator's reserved consumer.
+- Claims are exactly slice 1's v1: 120 s, a fresh `jti`, `sub` = the person ref, and the grant's `auth_time`.
+- `nonce` = `base64url(SHA-256(verifier))`. The verifier is 32 random bytes, new for each exchange.
+- No `max_age`: **native never links**. Linking a local account stays slice 1's browser flow, started from the app's web account page.
+
+**2. Instance: `POST <origin>/native/oficina-id {assertion, verifier, target?}`**, a new `connect.Bridge.NativeExchange` that every app mounts. It takes JSON only, sets no cookies and refuses `Origin`. One writer transaction:
+- verifies the signature with the pinned keys, the exact issuer and the exact audience;
+- requires `SHA-256(verifier) = nonce`;
+- reserves `(iss,jti)` in `oficina_handoff_replay`;
+- resolves exactly as `complete` does (link → `HomeOnly` → team-mode `Unlinked`);
+- rechecks admission, mints, and replies `{session, expires}`.
+
+An unknown subject gets `403 {"state":"unknown"}` and is allocated nothing.
+
+**No pending row: a justified addition.** Slice 1's pending transaction and browser secret exist to stop login CSRF. A native client has no ambient browser to fix an assertion onto. The verifier gives the same guarantee, "only the requester redeems", with no unauthenticated state on the instance. It also retires rastrillo/native's in-memory map, which a restart loses.
+
+**No Continue page (Q3).** Slice 1 shows Continue before minting for an existing browser session. Native skips it: the request is the person's own tap, made with a key held on the device.
+
+**Session lifetime.** A natively minted session lives **7 days**. The app re-mints silently after 24 h of use and on any 401, so a revoked grant stops reaching instances within 7 days. Slice 1's unlink deletes these sessions with every other Home-derived one, since they share `HomeMethod`.
+
+## 8. Teams
+
+The directory is one more consumer (Home §4: one assertion path). The app posts a directory-audience assertion to the directory's own `POST /native/oficina-id` and gets a 7-day directory session.
+
+**`GET https://oficina.works/api/native/teams`** returns `[{sqid, label, name, role, apps:[{app, origin}]}]`.
+- It reads `Store.AgentChoices` in one snapshot, filtered to live instances of the five apps.
+- It is `no-store`. Names are opened per request, for that person only.
+- The app uses `origin` as given and never builds one, which also covers self-hosted teams (portero ruling 3). Native apps refuse redirects, so they never touch portero (portero §2.2).
+- It refreshes at launch, when the menu opens (at most every 5 minutes), and on any 403.
+
+**Home already knows:** label, name, app origins and their state, role, the roster epoch, and sealed owner-set member names.
+
+**Missing:**
+- A team hue or mark. Clients derive a stable Calma hue from `sqid` (Q6).
+- A display name or avatar. Home holds none by design, so the app shows the email typed on this device, with its initials.
+- Teams you are invited to but have not joined. Those are instance-side.
+- The last-used team. That stays device state (ruling 22).
+
+## 9. Device store, onboarding, several identities
+
+**Store (RastrilloApple).** The shared keychain group holds one record per identity, `{grant_id, email as typed and lowercased, added_at}`, beside its key and token. The App Group `group.works.oficina` defaults hold only non-secret state: identity order, each identity's team cache, and the last-used (identity, team), suite-wide and per app. Each app's private keychain holds its instance sessions keyed `(grant_id, origin)`, so no app holds another app's cookie. A Darwin notification, `works.oficina.id.changed`, tells the other apps to reread. A device holds at most 5 identities, and adding one already present answers "Already signed in".
+
+**Onboarding.** Welcome → Email → Code (AutoFill, resend, back) → passkey or recovery code if required → Team (skipped when there is only one). A second app finds the identities already there and offers "Continue as paul@tito.io" or "Use another". It lists only teams that have a live instance of that app.
+
+**Account menu (PLAN Phase 2).** Identities, each with its teams under it, then Add Oficina ID…, Manage… and Sign Out of <email>. On Mac, ⌃⌘1…9 switch teams and each window carries its own (identity, team). The current identity and team always show. Switching is blocked mid-call, and wherever an app already guards unsaved edits.
+
+## 10. Sign-out per identity, and revocation
+
+**"Sign out of <email>"** is local and immediate. The app deletes that identity's key, token and record from the shared group and posts the notification, so every app drops the identity at once. It then, best effort with 5 s timeouts, revokes the grant with `POST /native/v1/signout`. Each app `POST /signout`s its cached sessions under that `grant_id` and deletes them, and revokes at launch any it later finds under a vanished grant. Completion never waits on Home; slice 1's test with an issuer that **hangs** covers it.
+
+**Devices page.** `https://id.oficina.works/devices` lists grants with fixed labels only ("Mac · signed in 14 Nov · used today"), with Revoke and "Sign out all devices". It sits behind a fresh session and request-forgery protection, and renders no account-authored text. **Disclosed residual:** after a remote revoke, a device that stays offline keeps its instance sessions until their 7-day expiry, in line with slice 1's "no global logout guarantee". There is no per-team sign-out: team standing comes from the roster.
+
+## 11. Outages
+
+**Credential origin down:** no new identity, and no new or renewed session. Existing sessions run until they expire and cached teams still show. A team with a live session opens; any other shows "Can't reach Oficina ID", with Try again and the app's own sign-in (§14). **Directory down:** the team cache serves, and minting still works, because the credential origin is a separate process. **Instance down:** the existing offline banner. In every case sign-out completes locally, nothing loops, and retrying is the person's choice.
+
+## 12. Native → web, and the web changes it needs
+
+**Copy Link and Handoff** carry the plain team URL. A credential never rides a shared URL.
+
+**"Open on the web":**
+1. `POST /native/v1/web {aud, path}` (grant plus proof) returns `https://id.oficina.works/native/web/<handle>`. The handle is 32 bytes, lives 60 s, works once and is never logged. It is sealed and bound to the person, `aud`, a validated local `path` and the grant's `auth_time`.
+2. The app opens the link in the default browser.
+3. Home consumes the handle and checks the browser's Home session:
+ - **None:** Home mints one with method `native-web` and the grant's `auth_time`. It is never fresh for step-up or linking.
+ - **The same person's:** reused.
+ - **Another person's:** before slice E, a fixed-text page asks "Another Oficina ID is signed in in this browser. Switch to this one?". From slice E, the session joins the set.
+4. Home `303`s to the consumer's ordinary slice 1 entry with `path` as the validated return. Pending cookie → `/authorize` → assertion POST → `/auth/finish` then lands on the same team and path.
+
+Slice 1 would show Continue at step 4. This spec skips it only when this handle minted or chose the session, for this exact consumer, within 60 s (Q3). On any failure the app opens the plain URL, which asks for sign-in as today.
+
+**Web multi-account (slice E)** keeps a handoff, or a second ID, from landing in the wrong account.
+- `id.*` holds a **session set**: up to 5 sessions in a sealed `__Host-oficina-ids` cookie, with the existing cookie as "current".
+- `/authorize` uses "current". The handle and linking pick the session matching the intent's subject; that check exists today (`exchange.go:107`).
+- The directory gets the same set.
+- **Instances stay one session per host.** Two IDs in the *same* team stay one at a time in a browser: disclosed, not solved.
+- Home holds no address, so no web page can name an ID by email (Q5).
+
+**Web → app.** Universal links (§13), plus an "Open in the app" button using the custom scheme. Safari ignores universal links on same-host taps.
+
+## 13. Universal links and AASA hosting
+
+Each app carries `applinks:<app>.oficina.works` and `applinks:*.<app>.oficina.works`. For a wildcard, the system fetches the file from the bare host, which portero answers. So **portero serves `/.well-known/apple-app-site-association`**, label-free and static, matching its "static on any host" row (portero §2; a portero follow-up). Each app serves the same file on its team hosts, and both answer 200 `application/json` with no redirect. Slice 0 checks the wildcard fetch against Apple's CDN (`app-site-association.cdn-apple.com/a/v1/<host>`).
+
+**Paths** list each app's item routes (Calls: `/m/*`, `/j/*`) and exclude `/auth/*`, `/signin*`, `/signout*`, `/native/*`, `/account/*`, `/api/*` and `/.well-known/*`, so no sign-in or handoff URL ever opens an app. **Routing:** `onContinueUserActivity(NSUserActivityTypeBrowsingWeb)` routes by host. If one identity has the origin, the app uses it. If several do, it asks once and remembers per team. If none does, Calls treats the link as a visit (§14), and the other apps offer "Add an Oficina ID" or "Open in browser". Custom schemes stay as the fallback, and items advertise `NSUserActivity` with `webpageURL` for Handoff.
+
+## 14. Calls guests, the apps' own sign-in, migration
+
+**Calls members** go through §7.
+
+**Invited guests with an Oficina ID but off the roster** assert to that Calls instance, which is registered like every team instance. They post with `target` from the closed set `/j/{token}`, `/m/{sqid}` (`native_auth.go:56-87`). `Unlinked` refuses non-members, so Calls admits them through its own guest hook, and only by its existing meeting-bound invitation consumption. The visit lives in memory and is dropped on leave (`calls.md` §C).
+
+**Name-only guests** keep the web "Join in the app" offer (`native_auth.go:349-421`), which now also works by universal link.
+
+**Push** registers per stored (identity, team).
+
+**The apps' own sign-in (11-13).** The first screen leads with "Sign in with Oficina ID". "Other ways to sign in…" (also in Settings ▸ Advanced) keeps the server address and rastrillo/native's browser approval, for self-hosted servers and local accounts. Those accounts are listed as "Other accounts", by host. `/native/request|start|authorize|exchange` stay for that path.
+
+**Migration.** The move to `works.oficina.*` (BRIEF) gives every build new keychain services and defaults domains, so new builds start at Welcome. That *is* the migration: the apps hold no real data, and one reinstall per app is accepted.
+- Old `net.amadan.oficina.*` items are orphaned. The release notes say how to delete them.
+- Alta's instances are fresh (portero ruling 6), so no server sessions carry over.
+- Docs' links keep resolving through `connect.Resolve`.
+
+## 15. Gates
+
+**Codes and privacy:** no address at rest in the starts table, WAL or backups, and no address or code in logs; code entropy, expiry, single use and the 5-try death; persistent verify limits under concurrency; one `/signin` budget for both doors; identical answers for known and unknown addresses; an enrolled account never gets a grant from a code alone; recovery-derived grants refused for enrolment and step-up.
+
+**Proof and exchange:** proofs refused for a wrong key, replayed `jti`, skewed `iat`, wrong `htu`, swapped body, or an `Origin`/`Sec-Fetch-Site` header; unregistered `aud` refused; the instance refuses a wrong verifier, replay, swapped audience and unknown subject (allocating nothing); concurrent exchange, unlink and relink.
+
+**Revocation, handoff, domains:** passkey replacement revokes every grant; native sign-out and Devices revoke both work against a **hanging** issuer; the web handle is single-use, expiring, consumer-bound and refuses a foreign path; AASA content and excluded paths; RP ID exactly `id.oficina.works`, `LegacyRPID` empty.
+
+## 16. Slices, smallest first
+
+| Slice | Contents |
+|---|---|
+| **0** | Client and Paul only. Bundle IDs; entitlements on all ten builds (keychain group, App Group, associated domains); Developer ID profiles. Spikes: a shared Secure Enclave key, native `clientDataJSON.origin`, the wildcard AASA fetch. |
+| **A** (first shippable) | **Home:** grants and proof, code start/resend/verify, the recovery factor, passkey assertion if Q1 is (a), `assert`, `signout`, Devices. **connect:** `NativeExchange`. **Directory:** native session and `teams`. **RastrilloApple:** store, onboarding, account menu with N identities and team switching. **One app** (Q7). |
+| **B** | Native passkey enrolment, and showing the recovery codes. |
+| **C** | The other four apps, and Calls guests. |
+| **D** | Universal links, AASA files, `NSUserActivity`, Open on the web. |
+| **E** | Web session sets, the switcher, and labels. |
+
+## 17. Questions for Paul
+
+1. **Factor rule (§5).** Choose (a) native passkey assertion in slice A (recommended), (b) a recovery code or the browser until slice B, or (c) the code alone natively (not recommended).
+2. **Keymail addresses.** Slice 1 keeps the Keymail upgrade. Choose (a) Keymail approval in an `ASWebAuthenticationSession` sheet, with "Email me a code instead" (recommended), or (b) always mail a code and skip the upgrade.
+3. **Silent minting.** Native assertions (§7), and the web handle for its one consumer (§12), skip slice 1's Continue page. Recommended: yes to both.
+4. **Lifetimes.** Grants: 90 days idle, 365 days absolute. Native instance sessions: 7 days, which also bounds how long a revocation takes to reach them. Recommended as stated.
+5. **Web labels for several IDs.** Home holds no address. Choose (a) label each ID by its teams' names (recommended: nothing new is held), (b) a person-chosen nickname sealed at Home and shown only on the directory, or (c) the address in a sealed browser cookie, rendered by the directory.
+6. **Team hue.** Choose (a) derive it on the client from `sqid` for now (recommended), or (b) add an owner-set column of closed Calma hues to `teams`.
+7. **First app for slice A.** Docs (recommended: it already has the multi-account `NativeConnection`), or Calls (PLAN's order, but it has to move onto RastrilloApple first).
+8. **Code strength.** Is a mailed 6-digit code (10 minutes, 5 tries, rate-limited) equal to a magic link as mailbox proof? Recommended: yes. It proves the same mailbox, and it fixes the cross-device and cross-browser failures.
+
+**Portal steps for Paul.** None has been taken.
+- Register the App Group `group.works.oficina`.
+- Enable Associated Domains on the ten `works.oficina.*` App IDs.
+- Issue Developer ID provisioning profiles for the Mac Sparkle builds, covering keychain-access-groups, the App Group and associated domains. It is not yet verified that these builds need them (PLAN Phase 0).