oficina / base Public
Base on the Mac and iPhone
Status: draft for Paul's review, 2026-11-23. Read against Base main d8700cf, rastrillo/native 0254817, Home 8125a3c, Docs d5a328a, Equipo a697cde9.
Decided by Paul so far:
- The native "launcher" we once discussed for Oficina is Base, not a native Oficina Home (2026-11-23).
- Base probably replaces Oficina Home in the end; Home stays for now, as a slightly different concern (2026-11-24).
- Base's branches land on main first (done:
d8700cf). - Native Base follows Base's look, not Oficina's Calma (2026-11-23).
- Mac main window: B, Ask in the middle with the apps in a floating sidebar, "for now" (2026-11-23, from the slice 1 mockups).
- iPhone first screen: A, Ask first, with the apps one tap away (2026-11-23).
- Ask is set up during sign-in, in slice 1 (2026-11-23): nobody approves a code in Equipo before Ask works (3.8).
- Slice 2 approved with every recommendation (2026-11-28): section 7, and its rulings in 7.9.
- Jobs started in Equipo stay in Equipo, and jobs started in Base stay in Base (2026-11-28): notifications, decision cards and Live Activities.
- Base takes over the Live Activity for jobs started from Ask in slice 3 (2026-11-28).
Mockups: .superpowers/mockups/native/ (git-ignored: it holds the licensed font; python3 build.py draws it), shown to Paul on 2026-11-23.
1. What native Base is for
Base's direction is "all about doing work and giving the user something to see very quickly" (Paul, 2026-11-20, jobs design). The native app serves that, not app launching. On a Mac the Dock and Spotlight already launch apps, and on an iPhone the Home Screen does. A grid of icons in a window would only copy them.
What only a native Base can do:
- Ask Base from anywhere. One keystroke on the Mac, or Siri and Shortcuts on the iPhone, opens Ask without finding a browser tab first.
- Tell you when a job needs you. It sends a notification when a job is ready, done, stuck or waiting on your decision. The answer's buttons sit on the notification where the platform allows it.
- Sign in once. It uses the same Oficina ID as Docs, Sheets, Calls and Equipo, and goes straight in if one of them already holds it.
- Open your apps. It opens the native app when one is installed, and the web app otherwise.
My call: the order of importance is 1, 2, 3, 4, and the first slice is built to match (section 6).
2. What exists today (audit)
2.1 Base's server
- Every screen is a server-rendered page behind a browser cookie (
internal/web/app.go:160-208). There is no JSON API for a person. The one bearer API,/api/v1/operations, is for Equipo's Assistant (internal/operations). - Sign-in is either Base's own (email link or passkey) or Oficina ID, through Home's browser handoff (
internal/web/oficina.go). There is no native exchange. - Ask runs through Base. Base enrols with Equipo as a device for each person (
internal/equipo/equipo.go:168-208). It keeps that person's Equipo key sealed withBASE_INSTANCE_KEY, and relays the snapshot, events, messages, cancel and card answers (internal/web/ask*.go). - Connecting Equipo is a one-time code the person approves in Equipo (ask_connect.go:41-135). - Connecting Oficina apps to the Assistant goes through oficina-connect (ask_oficina.go). - Home's apps come from two places. The team's Oficina apps come from
BASE_OFICINA_APPS(internal/config/oficina.go) and open in a new tab. The rest are apps installed from the Store. Base's own pages (Store, People, Settings) form the dock (internal/web/home.go:21-50). - Appearance is System, Light or Dark, stored for each member (
internal/web/settings.go:44-47). - The jobs design (
2026-11-20-jobs-that-keep-moving-design.md, direction approved) is not built yet. Until it is, job cards can't carry their own decision, on the web or in a native app.
2.2 The shared native kit (RastrilloApple)
- Oficina ID sign-in: an email code or a passkey, with straight-in when another app holds the ID and a chooser when there are two or more IDs (
OficinaID/OficinaIDModel.swift). - Keychain and App Group: identities go in the shared group
9U4A84C4WK.works.oficina.id. Sessions go in each app's own group. The App Group isgroup.works.oficinaon iOS and9U4A84C4WK.works.oficinaon the Mac. - Also in the kit: several accounts, a team step, an offline banner, and quiet Sparkle updates.
- Not in the kit: an account or team menu (Equipo built its own), the Colophon (each app has its own) and a string catalog.
OficinaApphas nobasecase (OficinaAppearance.swift:7-8).
2.3 Equipo's native app
- Chat:
EquipoKithas public chat pieces:ConversationScreen,ChatMarkdownView,ThinkingLineand an SSE reader. They are bound to the Coordinator's routes andEquipoSession, and nothing calls the Assistant routes. Base can adapt them, not drop them in. - Push: registrations, an outbox and payloads are built. Sending is a stub until the CARLOS
/v1/pushverb and rastrillo's push client exist. Paul has still to rule who holds the Apple push key (Equipo native slice 2 plan). - Live Activities exist in Equipo's iOS widget extension.
2.4 Opening other apps
- Bundle IDs: every Oficina native app is
works.oficina.<app>on every build (D1, ruled 11-14). D2 puts "Oficina <Name>" in Finder and the plain name inside the app. - Docs, Sheets, Calendar and Memoria only handle
…://signin. Opening their scheme with anything else just launches them. - Calls handles
oficina-calls://join, and Equipo handlesworks.oficina.equipo://task/<id>. - Missing: universal links, and opening a given document by link. "Open on the web, already signed in" is spec'd as Home slice D but not built.
3. How it works
3.1 Signing in
- Oficina ID only, with the kit's flow (email code, passkey, straight-in).
- Base becomes a Home consumer. Its origin is added to
HOME_CONSUMERS, and it mountsconnect.Bridge.NativeExchangeatPOST /native/oficina-id, as Docs did in9de84e4. The exchange mints a native session (methodhome-assertion-native, seven days). The answer isok,failed,unknown,chooseorunavailable, with the kit's handling of each. - Also mounted:
POST /signout,POST /native/web/endand the choose page at/account/home/choose. - A Base without Oficina ID (self-hosted, Base's own sign-in only) gets a "Use the browser instead" path in a later slice, not in slice 1 (my call). Every Base Paul runs has Oficina ID.
3.2 A small JSON API for people
Under /api/v1, with the native session. The routes are the web pages' reads and writes, not new behaviour:
GET me: the member, the Base's name and the appearance.GET home: the steps and the apps in Home's order. Each app carries: -kind:oficina,installedorown; - its name and web address; - its tint and icon; - for Oficina apps, the native bundle ID.ask/*: the same relay as today's/ask/*(state, events, messages, turn cancel, card answer, connect, check and disconnect), returning JSON and SSE.
My call: the native app talks only to Base, never to Equipo directly. Base already holds each person's Equipo key, registers itself as the Assistant's host and translates cards. A second, native path to Equipo would fork all of that.
3.3 Ask
- Mac: one window (B, chosen). Ask fills it. A floating glass sidebar holds Ask Base (with a badge counting jobs waiting on the person), Getting started while any step is open, every app (Oficina apps, then installed ones), then Store and People, and the person and team at its foot. Settings is the app's Settings window (⌘,). The web's layout, Home and Ask side by side (A), was the alternative. - A menu-bar item and a global shortcut open a small Ask panel from anywhere. Its text field has focus, and the reply streams in. - The native-levelup audit says to ask before adding a menu-bar item: this is that ask (Q3).
- iPhone: Ask is the first screen (A, chosen). Home's apps sit behind one button, top left, in a sheet. Home first, as the web's phone layout, was the alternative.
- Cards: they draw what Base's web draws today: question, confirm, outcome, connect and job cards, with jobs as pills. When the jobs design lands, the job pill carries its decision on both web and native at once, because both read the same JSON.
- Code: adapted from
EquipoKit's chat views and SSE reader, pointed at Base'sask/*.
3.4 Opening apps
- Mac: if the Oficina app's bundle ID is installed, open it with
NSWorkspace. Otherwise open its web address in the default browser. - iPhone: an app can't be opened by bundle ID, so the kit's
handleOpenURLgains…://open, a small kit change that every app picks up at its next repin. Until then, the web address. - Store apps always open on the web.
- When Home slice D lands, "open on the web" arrives already signed in. Until then the browser may ask once.
3.5 Notifications (slice 2)
- Equipo sends them, to the Base app's device registrations, through Equipo's existing outbox. My call: Equipo knows every job's state the moment it changes, and Base only sees it while relaying a chat.
- Blocked on the CARLOS push verb and the ruling on who holds the Apple push key, the same blockers as Equipo's own push.
- Decided in section 7 (2026-11-28): Equipo sends, to registrations Base relays, and each app hears only the jobs started in it (7.2).
3.6 The look
Base's approved look (first-slice spec section 6), translated:
- Sky and fog: the deep indigo sky with teal, violet, rose and mist fog, and the swaying amber beam. Drawn with SwiftUI
MeshGradientandCanvas. Fog loops of 10 to 17 seconds, still when Reduce Motion is on. - Glass: system materials with Base's dark tint (
--glass-basergba(14,17,42,.40)) and a thin bright top edge. Text keeps WCAG AA on every frame. - Accent and buttons: teal
#6EE7DConly for finished steps and progress. Primary buttons are frost white with dark text. - Type: Timeless Sans, the Grotesk cut for headings, bundled through a fetch step with a pinned checksum. Never committed. No FOUT: the font is in the bundle, so nothing paints in a fallback face.
- Appearance: System, Light and Dark, from the member's setting.
- Platform rules: standard platform controls (menus, sheets, toolbars, Settings), with Base's colours and type. The Mac window is a real window; nothing in it pretends to be an operating system.
3.7 Where it lives
- Code:
native/in this repo, laid out like Equipo's:apple/(BaseKit),ios/andmacos/, on RastrilloApple. - Kit changes: a
basecase onOficinaApp, and theopenURL. - Distribution: Mac through Sparkle and the Mac release assets, iPhone through TestFlight.
3.8 Ask set up during sign-in
Today a person connects Equipo once from Base's web: Base enrols a device key with Equipo (internal/equipo/equipo.go:168-208), the person approves its code in Equipo, and Base keeps the resulting Equipo key sealed. In the native app that step disappears: signing in to Base with Oficina ID also connects Ask, the first time, with nothing to approve.
Both ends already know the person through Oficina ID, so the approval can be an Oficina ID proof in place of the code. Two shapes, to settle in the plan with Equipo's owner:
- Base asks for it. Base's server gets a short-lived Oficina ID assertion for the person addressed to Equipo (a Home consumer change: Base may ask for another app's audience only for the person it holds a session for) and presents it with its device proof. Equipo checks the assertion and the person's membership, and issues the person's key to Base. The native app does nothing extra.
- The app carries it. At sign-in the native app fetches a second assertion from Home with Equipo's audience, as it fetched Base's, and hands it to Base with the exchange. Base presents it to Equipo as above. No change to Home's rules about audiences, one more round trip for the app.
My call: the second, because it keeps Home's rule that an assertion is fetched by the person's own device for one app. Either way the web keeps its code as a fallback, and a person whose Equipo membership is missing sees Ask's existing "isn't set up for you yet" state.
4. Questions for Paul
- Base and Oficina Home. Decided (Paul, 2026-11-24): Base probably replaces Home as Oficina's front door in the end, but Home stays for now, because it is a slightly different concern (Oficina ID, the team directory and the suite's own front page). Nothing in this slice moves Home's work into Base.
- Bundle ID and name. Base isn't only Oficina's: it fronts Keymail, Sporran and the rest. Recommended:
works.oficina.base, named "Base". It lives at base.oficina.works and shares Oficina ID's keychain group. The alternative is a CARLOS ID such ascom.carloku.base. - Mac menu-bar item and global shortcut for Ask. Recommended: yes, with the shortcut off until the person sets one.
- Store, People and Settings in slice 1? Recommended: Settings natively (account, appearance, sign out, Equipo connection). Store and People open Base on the web in slice 1 and go native in slice 2.
- Notifications: sent by Equipo (recommended) or by Base. Decided (Paul, 2026-11-28): Equipo (7.2, 7.9).
5. Not doing
- A grid-of-icons launcher as the main screen.
- Base's own sign-in in the native app (slice 1).
- Installing Oficina, Keymail or Sporran from the Store. That is the web Store's later slice; native follows it.
- Widgets and Live Activities before notifications.
6. Slices
- Sign in, Ask, Home. - Server: native exchange, JSON API. - Native: Mac window with menu-bar Ask, iPhone with Ask first, Home's apps opening as in 3.4, Settings. - Mockups first, for Paul to approve. Then the plan.
- Notifications, Store and People native, and the jobs design's decisions on cards (if not already built for the web). Specified in section 7, in four parts (7.11); part 1 is planned in
docs/superpowers/plans/2026-11-28-native-slice2-part1.md. - Siri and Shortcuts ("Ask Base"), a share extension ("Send to Base"), and Live Activities for running jobs.
7. Slice 2: notifications, decisions on cards, Store and People, files
Approved by Paul on 2026-11-28, with every recommendation as written (7.9). Read against Base main 07ec2ec, Equipo origin/main 8bd40ed1, CARLOS origin/main e210550b1 and its push branch 379d97d17 (design/platform-push-submission), rastrillo 0033fa0e (v0.47.0), rastrillo/native bb989a7, Docs 78fb1db, Sheets 76b7abc, Slides a27d28d, Home 88f610a.
Mockups: .superpowers/mockups/native-s2/ (git-ignored: it holds the licensed font; python3 build.py draws them), shown to Paul on 2026-11-28.
Rulings this section works under:
- Keep working through the plan in order (Paul, 2026-11-28).
- "Equipo jobs started in Equipo should stay in Equipo and jobs started in Base should stay in Base" (Paul, 2026-11-28). That covers notifications, decision cards and, later, Live Activities. Base shows and notifies only the jobs started from Ask, and Equipo only its own.
- In slice 3, Base takes over the Live Activity for jobs started from Ask, so there's never a duplicate with Equipo's (Paul, 2026-11-28).
- Files in Ask (2026-11-26): Equipo holds the bytes (R1), the Assistant reads a file for 14 days (R3), and native copies Equipo's attachment code into BaseKit (R5).
7.1 What exists today
Push
- CARLOS
/v1/pushis a spec, not code on main. - The spec was approved on 2026-11-20:docs/superpowers/specs/2026-11-20-platform-push-submission-design.mdat379d97d17. - The build is uncommitted work incarlos/platform-wt-push-build(internal/pusher/,internal/pushsubmit/). Main and v0.44.0 have no pusher. - A box-localcarlos-pusherholds the Apple key, plus a grant file that names which(account, app)may push to which topic (decisions 4 and 9, and §5apns.conf): ``key NS36T57NS4 9U4A84C4WK production works.oficina.equipo grant <sqid>/equipo works.oficina.equipo`` - rastrillo's push client (
push.FromCarlos,push.Submit) is uncommitted onfeat/push-submitinrastrillo/rastrillo-push-submit, and has no tag. - Equipo can't send to its own app yet. - Registrations, the outbox and the payloads are all built. - The transport is a stub:
push.FromCarlosrefuses boot whenCARLOS_PUSH=submit(internal/equipo/push/transport.go:50-64, "SEAM (2026-11-20)"). - The topic is a constant,push.Topic = "works.oficina.equipo"(push/push.go:19). - Equipo's registrations have no app or topic. - The table is
push_registrations(credential PRIMARY KEY, person, token, environment, platform, start_token, …)(migrations/0096_push.sql:8), withactions_versionandbinding_idadded in 0111. - The routes arePOST /api/v1/push-registrationsand…/activities(chat/http.go:95-96). - Recipients arepush.Devices(person)(push/store.go:286). - The Apple key is topic-specific and production-only. From the CARLOS spec's "Facts (2026-11-20)": > "key ID
NS36T57NS4, Team ID9U4A84C4WK. It is production only > and topic-specific: its only topic isworks.oficina.equipo… The >.p8has not been downloaded yet; Apple allows one download."
So Equipo's key can't push to works.oficina.base, and Base needs a key of its own.
- Base's app has no push. Both entitlements files say "No push until slice 2" (
native/ios/BasePhone.entitlements,native/macos/DeveloperID.entitlements). Equipo's Mac app shows that a Developer ID app can get push: it carriescom.apple.developer.aps-environment = production(equipo native/macos/DeveloperID.entitlements:10-11).
Where a job started (for the ruling)
- Every turn, card and task has a lane (
wire/assistant.go:8-24). -""is the Coordinator (Equipo's own conversation). -assistantis Base's Ask. -job:h_<id>is "the Coordinator thread of one job Base handed off". - A task's lane comes from the turn that made it.
chat_tasks.laneis set inchat/tasks.go:866(migration 0084), and cards inherit it (tasks.go:898). - Hand-offs list their tasks in
chat_handoff_tasks(handoff_id, task_id)(0079), and their lane inchat_handoffs.lane(0083). - Hand-offs from before job threads existed have an empty lane. - Their tasks still appear inchat_handoff_tasks, so that table is the reliable test. - Equipo's push rules only half follow the ruling today (
push/rules.go:123-200). - Followed:card_opensandreply_unseenfire only for the Coordinator lane (:126,:138). - Not followed:task_ends,task_fails,badgeand the fouractivity_*rules check no lane. A task Base handed off therefore ends, fails and runs a Live Activity on Equipo's app today. - Why:pushTask(chat/push.go:426) builds the change fromwire.Task, which has no lane field. - No message records which client sent it.
PersonPrincipalcarries the credential for each request, but it isn't stored (personapi/types.go:16-21). The lane is the origin, and it is enough.
Decisions on cards
- "The jobs design's decisions on cards" means phase 1 of
2026-11-20-jobs-that-keep-moving-design.md, plus Paul's addendum on context and a recommendation: - K1: the job card carriesask,options,actionsandreceipts. - K2: one act endpoint, bound to the decision and its revision. - K6: stops, with their reasons and next steps. - K11: "What next?" on a first look. - Addendum: each decision gets context, a link, a recommended option and a line for each option. - Folding (K9) is phase 4. - None of it is built. - Equipo: there is no
JobAskand no job act route on origin/main.decision-cards-context(cf0614ec, 11-20) is unmerged. - Base:equipo.Cardhas noAsk,ActionsorReceipts(internal/equipo/chat.go:60-76), and there is no/ask/jobs/{id}/act(internal/web/ask.go:47-68). - What Base can act on today: - question, confirm and outcome cards (
POST /ask/cards/{id}/answer); - a paused job's Carry on now (POST /ask/cards/{id}/carry_on). - A job pill shows only its state, its status and one more sentence. - Waiting cards (Equipo
50029aba) aren't something Base draws. They are a note in the Assistant's frame, listing Equipo's own open cards (chat/waiting_cards.go).
Store and People on the web
- Store (
internal/web/store.go:32-116,templates/store.html): - It lists the catalogue: Welcome, Scratchpad and Contra (internal/catalog/catalog.json). - Each app shows its state: installing, installed or failed (with the reason). - The owner can Install, Try again, or Uninstall (with a confirm page). Everyone else sees "Installed". - The page refreshes every 2 s while anything is installing. - People (
internal/web/people.go:30-96,templates/people.html): - It lists the members, each with their initial, name or address, and Owner, Member or Invited ("Invited. Hasn't signed in yet."). - The owner can invite by address. The invitation is sent again until one is delivered. - There is no Remove:store.RemoveMemberexists but no route calls it. - Neither has JSON. The native app opens both on the web:
apiHomeReadpoints Base's own pages atorigin + href(internal/web/api.go:115-118).
Files in Ask
- The server side is done. Slice 1 landed on Base
07ec2ecand in Equipo (can_attach,wire/assistant.go:157;read_attachment). - Native has every route it needs, documented in
docs/api/base-native-v1.md:262-311: upload, delete, discard, read and preview. - The app shows files only as a line of names today (
BaseKit/Ask/Thread.swift:135-159). - Equipo's native code to copy (R5):
| File | What it does | |---|---| | EquipoKit/API/Attachments.swift | the client | | Attachments/PhoneAttachmentPicker.swift | PhotosPicker, fileImporter, paste | | AttachmentDraft.swift | draft state and refusal codes | | AttachmentViews.swift | the chips (AttachmentDraftStrip), the bubble's thumbnails (MessageAttachments), the full-size preview | | native/share/Sources/EquipoShareCore/AttachmentFile.swift:58-93 | HEIC, HEIF and TIFF to JPEG, a 2560 px long edge | | EquipoMac/MacComposer.swift:13-31, AttachmentPromises.swift | paste, drag, and file promises on the Mac |
Equipo has no Quick Look.
Opening Docs, Sheets and Slides
- Base can launch the Docs or Sheets app, not open a document in it. - On the Mac,
Opener.macopens the app by its bundle ID (BaseKit/Home/Opener.swift:22). - On the iPhone, everything except Calls and Equipo opens on the web (Opener.swift:34). - The kit can open a path; the apps don't use it yet. - The kit handles
<scheme>://open?path=…(rastrillo/nativeNativeConnection.swift:82-123, since8dc540a). - Docs and Sheets pin kits from before that change (0254817and1e36aac), and neither setsonOpen. - No universal links: - The only association file is Home's, and it is webcredentials only (
home internal/home/native_passkey.go:285-312). - The app hosts'/.well-known/apple-app-site-associationanswer 404. - No app claimsapplinks:. - Slides has no native app, and doesn't mount
/native/oficina-id. - Nothing can be framed, and there's no read-only view. - Every app sends
frame-ancestors 'none'andX-Frame-Options: DENY(rastrillo serve.go:464,480). - None has a signed-in read-only or embed view. - The only read-only pages are the owner's public links: Docs/p/{token}, Sheets/l/{token}, Slides/s/{token}. - Exports exist: - Docs:
/d/{sqid}/export.pdfand.md. - Sheets:/sheets/{id}/export.xlsx. - Slides: a PDF job (POST /d/{sqid}/export). - Path-based team URLs don't work natively.
NativeHTTP.originrejects an origin with a path (NativeHTTP.swift:94-100), and Docs is the pilot for path-based teams (ruling 11-26).
7.2 Notifications
Who sends
Decided (7.9, 1): Equipo, through its outbox, to the Base app's registrations, as 3.5 said. Equipo learns of every change in the transaction that makes it. It already has everything else: the outbox, once-only dedupe, collapse, holds, sealed payloads, retries, action bindings and receipts. Base would have to build all of that again.
- The app still talks only to Base (3.2). - It registers its token with Base:
POST /api/v1/pushwith{token, environment, platform, install, start_token: null}. - Base relays the registration to Equipo with the person's bearer, addingapp: "base". - Answers from a notification go to Base's own routes, as everything else does. - The alternative was Base sending. Equipo would call Base, as the Assistant's host, on every job change, and Base would keep its own devices, outbox and CARLOS grant. Rejected: it is a second outbox and a new callback channel, for words Equipo already writes. A job card's words are already Base-facing (Base shows them as given).
What Equipo changes
- E-P1. Registrations know their app and device. -
push_registrationsgainsapp(equipo|base) andinstall(the app install's id). - The key becomes(credential, install). Base holds one Equipo credential per person, but that person may have Base on a Mac and on an iPhone. - The topic follows fromapp.push.Topicbecomes a lookup. - E-P2. One rule for where work started. A change is Base's when: - its lane is
assistantor startsjob:; or - its task is inchat_handoff_tasks, which catches hand-offs from before job threads.
The rule is computed once into push.Change as Origin, because wire.Task has no lane. Every rule then reads it: - Equipo-origin changes go only to app = equipo devices. - Base-origin changes go only to app = base devices. - The rules that don't look at the lane today (task_ends, task_fails, badge) gain the check. That stops Equipo's app hearing about Ask jobs, which fixes a breach of the ruling that exists today.
- E-P3. Base's rules, from the Assistant-lane job card, not the task. - A job is a hand-off that may run several tasks. Base knows it by its job card id. - Each rule's collapse id is the job card's id, so a newer state replaces the older notification on every device. - Its thread id is
job:<card>. - Its dedupe is the card's id, state and decision. - The table follows. - E-P4. Base's payload. -
aps.alert{title: job title, body: the decision's text or the state line}, pluscategory,thread-idandinterruption-level. - A custom key: ``base: {origin, member, job, revision, decision, actions: {binding, notification_id}}`- The app needsoriginandmember` to pick the right account, since the kit holds several. The words never name Equipo (Review 8). - E-P5. Withdraw on settle. - When a decision is settled anywhere (a tap, the web, another device), Equipo sends a background push for that job. - The app then removes the notifications delivered in its thread (
removeDeliveredNotifications). - Each app also tidies itself whenever it opens. - E-P6. The grant. On each box running an Equipo that serves a Base: ``
key <BASE-KEY-ID> 9U4A84C4WK production works.oficina.base grant <equipo-sqid>/equipo works.oficina.base`The Live Activity topicworks.oficina.base.push-type.liveactivity` is allowed with it (CARLOS spec §5).
Which job events notify
Decided (7.9, 2):
| Job state (Base's pill) | Notification | Actions (with K1/K2; until then, a tap opens the job) | |---|---|---| | Asking: a question | alert | its choices (recommended first, at most 3), and Something else… when words are allowed | | Asking: "First look ready" | alert | Build it; Try again… (asks "What should change?") | | Asking: needs your OK (approvals) or replace | alert | none: a tap opens the job (approvals stay on Equipo's pages, K6; Replace drops work) | | Ready to try | alert | Try it (opens the link) | | Stopped, with Try again offered | alert | Try again | | Stopped, otherwise | alert | none | | Paused | quiet (passive) | none: Carry on now spends money, so it stays in the app | | Done | quiet (passive) | none | | Working, any stage | never | (Live Activities, slice 3) | | The Assistant replied with no Ask open | alert, Ask's own (7.9, 4) | none |
- Never on a notification: Drop it, Dismiss, Replace it, or anything that publishes, spends or grants without a confirm in the app.
- The badge on the app's icon counts the jobs waiting on you, the same number as the sidebar's.
- In the foreground, a job on screen shows no banner. Anything else shows one.
The buttons
- Actions answer without opening the app. They use
.authenticationRequiredand not.foreground, so the device must be unlocked. - Each is bound to the decision and revision the notification showed, with its notification id as the idempotency key. - A409(the decision has moved on) answers nothing. The app posts a local "That's changed since. Open it to see." with Open. - Equipo's buttons, by contrast, all bring the app forward (NotificationResponse.swift:81-93). - Labels are the decision's own ("Fri 18 Dec"), so categories can't be fixed ahead. - A notification service extension (iOS, and macOS 11 or later) registers one category per decision before the notification shows. - If that ever loses the race, the fallback is Equipo's: one "Choose…" that opens the app at the decision. (7.9, 3)
- On the Mac, a banner's actions sit under Options. Alert style shows them as buttons. Both work the same.
Not notifying twice
- By construction (E-P2). A job started in Ask notifies only Base's devices, and a job started in Equipo only Equipo's. A person with both apps hears each job once.
- Across devices: collapse by job, and withdraw on settle (E-P5).
- No fallback (7.9, 5). With no Base app installed, an Ask job does not notify through Equipo's app. Web push for Base is for later.
What slice 2 does so that slice 3 can take over Live Activities
- The origin rule (E-P2) decides the Live Activity rules too. - Slice 2 makes
activity_*readOrigin. - Until slice 3 ships, Base-origin tasks keep Equipo's Live Activity, as today (7.9, 6). - Then one Equipo release switches them to Base's start tokens. It switches only for people whose Base registration carries astart_token, so there is never both and never a gap. - Registrations carry
start_tokenfrom day one (null until slice 3).appdecides the topic (works.oficina.base.push-type.liveactivity). - One activity per job, not per task. Slice 2's collapse ids already map a task to its hand-off and then to its job card (
chat_handoff_tasks). The activity reuses that mapping. - The payload names
originandmember, so the widget extension can pick the account. - The same Base push key serves Live Activities. The extension needs its own App ID (
works.oficina.base.activity) in slice 3.
7.3 Decisions on the cards
- Native draws what the web draws, from the same JSON (3.3). It does that once the jobs design's phase 1 is in Equipo and Base's web (7.9, 10), and is never built native-first.
Models.swiftgains the K1 fields:ask{kind, decision, text, words, note},options,actions,receipts,updated_atandhidden. It also gains the addendum'scontext,link,recommendedand each option'sdetail.- The pill carries the decision under it, as the mockups show: - the context, the link to the thing, the question; - the choices, with Recommended and why; - Something else as a one-line field.
- Actions: - Try again opens its field. - Drop it confirms ("Drop this job too?"). - Stops show their reason and Try again.
- The act:
POST /ask/jobs/{id}/actas JSON, with the idempotency key and revision. A409redraws the card from the answer. - The job view adds the first look's picture as a link, the receipts, Dismiss with Undo for 8 s, and "Open in Equipo" as the title's link.
- Placement: jobs that need you move to the end of the thread. "Waiting on you" and "N finished" fold, by
stateandupdated_at(K9, phase 4, when the web has it).
7.4 Store and People, native
A small JSON API beside the pages, built from the same builders, behind the same owner checks:
GET /api/v1/store:{owner, rows: [{id, name, summary, tint, icon_svg, state, error}]}.stateis"",installing,installedorfailed.POST /api/v1/store/{app}/install:202 {store}, then poll every 2 s while any row is installing, as the web does. - An app already installing answers202, and one already installed200, both with the store and without starting anything. - If starting the install fails, the store is read again. A row that now shows installing (another request started it) answers202as it stands. Otherwise the answer is503 unavailable, and nothing was claimed: starting fails only before its claim, so a row that still reads failed shows an earlier failure.POST /api/v1/store/{app}/uninstall:200 {store},409 busywhile installing,403 owner_onlyif not the owner.GET /api/v1/people:{owner, people: [{id, initial, name, email, role}]}.roleisowner,memberorinvited(not yet signed in), so no separatejoinedis sent.POST /api/v1/people:{email}. It answers200 {person}with the person invited (or already here),422 bad_email,502 mail_failed(invite again to retry), or403 owner_only.- Every route answers
503 unavailablewhen Base can't read its own store, as the pages do, and401 unauthenticatedwithout a member's session. Nothing removes a member:DELETE /api/v1/people/{id}stays unrouted. - Where they show: - Mac: in the window's pane, from the sidebar. - iPhone: pushed from the apps sheet's new "Your team" section. - Uninstall confirms with the web's words.
GET /api/v1/home'sownapps keep their web URLs for older builds. New builds route Store and People natively byid.- Not doing: removing a member. The web has no such action either.
7.5 The sidebar
- Apps folds (Paul). - On both, the "Apps" heading is a button with a chevron: in the Mac's glass sidebar (which isn't a
List, so notSection(isExpanded:)) and in the iPhone's apps sheet. - Folded, it shows the count. - The state is remembered for each person on each device, inUserDefaults. It is keyed by a hash of the signed-in account the session already holds, so it is right before/api/v1/meloads and offline. It isn't synced, and the web's rail setting (migration 0007) is its own. - It starts open. - Made with Base. Decided yes (7.9, 7). It lists what you made through Ask that has an address: - What: a published site, which shows a filled dot and its address; or a first look that is still up, which shows a hollow dot and "First look". Newest first, at most five, then "Show all". - Whose: only jobs started in Base (the ruling). Equipo's own projects stay in Equipo. - Data: - Published sites are in
chat_steps.publish, and reach a task aswire.Task.site{app, url, state, at}(wire/tasks.go:457,publish.go:102). - A task's job is found throughchat_handoff_tasks. -chat_project_places(0112) holds the deploy binding but no person.GET /api/v1/projectshas no site URL (api.go:302-334). - So Equipo addsGET /api/v1/assistant/made: the person's Base-origin jobs with a site or a live first look, as{job, title, url, kind, state, at}. Base relays it asGET /api/v1/made, and the web can show it too. - A click opens the address in the browser. The context menu adds "Show the job" and "Copy address". - Why yes: it is what Base is for ("something to see very quickly"). Without it, a finished site falls out of the snapshot after 7 days (K9), and the only way back to it is Equipo. - Why it might be no: a new Equipo route and section for what may be only a handful of sites. It comes last in the slice for that reason. - Later, Docs and Sheets the Assistant made throughusecould list here too.
7.6 Files in Ask, native (attachments slice 2)
No server change: the routes exist. BaseKit copies Equipo's code (R5) and points it at Base's /ask/attachments.
- Mac: - A paperclip left of Send opens the file panel. - Files can be dropped on the composer or anywhere on the window; the outline uses the web's words. - ⌘V pastes. A paste with words pastes the words (D8). Base's composer is a SwiftUI field, not Equipo's
NSTextView, so Base takes Paste in its own Edit menu command and narrows the field's drag types. The plan says how, and when it falls back to Equipo's editor. - File promises are honoured, from Photos and Mail. - iPhone: a
+left of the field, with Photos (PhotosPicker, no permission needed), Camera (NSCameraUsageDescription), Files and Paste (as Equipo's menu has). The field also takes a pasted image. - On the device, HEIC, HEIF and TIFF become JPEG, and anything over 2560 px is scaled down, before uploading (
AttachmentFile.swift). A chip says "from HEIC". 48 MP photos stop being refused. - At most two files are prepared at once, behind the same gate as the uploads. A file whose size already rules it out is refused without being read. - Only converted output loses its metadata on the device. A PNG or JPEG at or under 2560 px goes up as it is, and Equipo strips an image's location on arrival (files spec 1.1). - Chips: - each has a thumbnail, name, size, an upload ring and Remove; - Remove deletes the upload; - uploads and chips survive the app going to the background. An upload in flight runs as a background task so it can finish. A lost answer shows Retry, and a retry is a second upload, so an orphan may count against the 20 for a day; - unsent uploads are discarded, as best the app can, when the session ends (
end(): sign-out, account switch, a rejected session), bounded at 2 s. When another Oficina app signs the ID out, the session has gone before Base hears, so nothing can be discarded. Equipo's 24-hour drop catches that, a killed app, and quitting; - two uploads at a time. A busy answer is retried by itself up to three times with backoff, then the chip says busy and offers Retry; - the paperclip shows only whilecan_attach; - every refusal has the web's words (copy review 13), and the PDF chip says "Ask can't read PDFs yet."; - refused files never take Ask down (D5). - In the thread: thumbnails, then file pills, then the words, as the web draws them. - On the Mac, a click or Space opens Quick Look (
QLPreviewPanel), with Open with Preview and Share. - On the iPhone, a tap opensQLPreviewController, with Share. - The original is fetched from/ask/attachments/{id}into the app's cache (7.9, 12): - Path:Caches/Attachments/<account hash>/<attachment id>/<name>. The name is its last path component, with the extension taken from the media type, so a file can't preview or open as another type. - Protection: kept out of backups. On iOS it usesNSFileProtectionComplete. - When it's cleared: - onend(), and when Ask is disconnected; - 14 days after the message was sent (the file's date is set to the message's at download); - folders of accounts no longer signed in are cleared too; - the sweep runs at launch, on each return to the foreground, and on the Mac each time a window opens and daily. - One download per file: a double tap shares it. - Copies: Share and Open with Preview hand a copy to another app, which is outside these rules once the person sends it there. - Not doing: Equipo's "recent screenshot" suggestion (
RecentScreenshot.swift). It needs Photos permission.
7.7 Opening Docs, Sheets and Slides
In the right app (decided for slice 2: 7.9, 9)
- When a reply links an Oficina document, Base opens it in the installed app with
works.oficina.docs://open?path=/d/<sqid>(Sheets:/sheets/<id>), and otherwise on the web. - Base recognises a link by its host, fromBASE_OFICINA_APPS, and by the app's path patterns. - On the iPhone, Base adds both schemes toLSApplicationQueriesSchemes. - Each app needs a kit repin to
8dc540aor later, and anonOpenthat routes the path to the document: - Mac: look up the local document by its sqid and open its window. - iPhone: push the document. - Slides opens on the web: it has no native app.
- Later: universal links, once portero serves
applinks(Home spec appendix D). They make the same links work from anywhere. - Flag: path-based team URLs (the Docs pilot) need
NativeHTTP.originto accept a path before any of this works for them.
A read-only view inside Base (7.9, 8)
| | WKWebView of the web app | Render from JSON | Quick Look of an export | |---|---|---|---| | Sign-in | Needs a web session in the view's cookie store. Home's slice D is for the default browser and isn't built. A cookie bridge (an exchanged native session put into WKHTTPCookieStore) is possible, but no spec sanctions it, and /native/web/end isn't served | An exchanged session for that app | An exchanged session: Base asks Oficina ID for an assertion addressed to Docs and trades it at Docs' /native/oficina-id, as it already does for Equipo. No second sign-in | | What each app needs | A read-only or embed view, which none has today. Framing headers don't matter to a top-level web view | Docs keeps only CRDT updates (/d/{sqid}/updates), so Base would need a Yjs reader and a renderer. Sheets' cells are workable | Nothing for Docs (PDF) or Sheets (XLSX). Slides needs /native/oficina-id mounted | | Fidelity | Exact and live | Base's own drawing, which drifts from each app | A faithful snapshot, not live | | Cost | High: a new view in three apps, plus a web-session story for embedded views and its security review | Highest, and duplicated per app | Lowest |
- Decided: Quick Look of the export now (7.9, 8). - Mac:
QLPreviewViewin a pane beside Ask, as in the mockup. - iPhone:QLPreviewController. - The bar says "Read only" and holds Edit in Oficina Docs. It opens the Docs app at that document when it's installed (as above), and otherwise the web. - It reuses slice 2's Quick Look code, and the session is per app and asked for only when needed. - WKWebView later, once slice D gives embedded views a sanctioned sign-in and the apps have a read-only view. Then it becomes live.
- Placement: after the rest of slice 2. Its Slides half waits on Slides mounting the exchange.
7.8 Paul's portal steps (Apple Developer, team 9U4A84C4WK)
- Identifiers →
works.oficina.base: - Tick Push Notifications, then Save. Changing a capability makes the existing profiles invalid. - Don't create a Push certificate: the key replaces it. - Keys → "+": - Name: "Oficina Base Push Production". - Tick Apple Push Notifications service (APNs), then Configure. - Environment: Production. TestFlight and Developer ID builds both use production. - Key restriction: Topic Specific, topic
works.oficina.base. This matches Equipo's key, and CARLOS's decision 5 counts on a key for one topic. - Save, Continue, Register. - Download
AuthKey_<KEYID>.p8once, and note the Key ID. - Apple allows a single download. - It goes to the operator for/etc/carlos-pusher/on each box running an Equipo that serves a Base (E-P6). - It must never go in a repo or a chat. - Equipo's own.p8(NS36T57NS4) hasn't been downloaded yet either. Doing both in one sitting saves a second trip. - Profiles: regenerate the iOS App Store profile and the macOS Developer ID profile for
works.oficina.base, so that both carryaps-environment. Install them where the release scripts readOFICINA_PROVISIONING_PROFILE. - For the notification service extension (7.9, 3): - register
works.oficina.base.notify(iOS and macOS) with the App Groupgroup.works.oficinaon iOS and9U4A84C4WK.works.oficinaon the Mac; - make its two profiles. - In slice 3 (not now):
works.oficina.base.activityfor the widget extension.
7.9 Paul's rulings (2026-11-28)
Paul approved every recommendation as written. Each is now decided:
- Who sends Base's notifications. Decided: Equipo, through its outbox, to registrations Base relays (7.2). Alternative: Base sends.
- Which job states notify. Decided: the table in 7.2. Asking, first look, ready and stopped alert. Done and paused are quiet. Working never notifies.
- Buttons on notifications. Decided: - the decision's own choices, answered without opening the app, through a notification service extension; - never Drop, Replace, publishing or spending; - "Choose…" as the fallback.
- Assistant replies. When the Assistant answers and no Ask is open anywhere, should Base notify? Decided: yes, as Equipo does for its Coordinator (
reply_unseen). - A person without the Base app. Should Ask jobs fall back to Equipo's app? Decided: no, by the ruling. Web push for Base later.
- Equipo's Live Activities for Ask jobs until slice 3. Decided: keep them until Base's ship, then switch in one release (7.2), so there's never a gap. Alternative: stop them now.
- "Made with Base" in the sidebar. Decided: yes, named "Made with Base", listing published sites and live first looks from Ask jobs, with a new Equipo route. Last in the slice. Alternative names: "Your sites", "Things you made".
- Reading a Doc inside Base. Decided: Quick Look of the export now, with Edit in Oficina Docs; a web view later, after slice D.
- Opening a linked Doc or Sheet in its app. Decided: yes in slice 2, through
://open?path=. It needs Docs and Sheets to repin and route the path. - Decisions on cards wait for the web. Decided: yes. Native follows phase 1 on the web and is never built first, so both read the same JSON.
- The push key. Decided: a production, topic-specific key for
works.oficina.base. Alternative: one team-wide key for every Oficina app. That is simpler, but it loses the per-app bound CARLOS relies on. - Opened files on the device. Decided: kept in the app's cache, out of backups, cleared on sign-out and after 14 days (matching R3). Never anywhere else.
7.10 Blockers
- B1. CARLOS
/v1/push: the spec is approved, but the build is uncommitted and undeployed (carlos/platform-wt-push-build). - B2. rastrillo
push: uncommitted, no tag (feat/push-submit). - B3. Equipo's transport seam:
push/transport.go:50-64. It also needs E-P1 to E-P6 (7.2). - B4. Apple: the Base push key doesn't exist yet, and Paul downloads it (7.8). The App ID needs Push Notifications and new profiles. Equipo's
.p8isn't downloaded either. - B5. The jobs design's phase 1 isn't built in Equipo or Base. It is needed for decisions on the cards and for notification buttons.
- B6. "Made with Base" needs Equipo's
GET /api/v1/assistant/made. - B7. Opening documents needs the Docs and Sheets kit repins and
onOpen. Slides needs its exchange mounted. Path-based teams need the kit's origin fix.
7.11 Slice plan
In the plan's order (Paul, 2026-11-28). Within slice 2, the unblocked parts come first.
- 2a. No blockers. - Store and People: the JSON API (7.4) and native screens. - Apps folding. - Files in Ask: native copy of Equipo's code, Quick Look, and the HEIC conversion. - Copy review of the new strings.
- 2b. Notifications, tap to open. Needs B1 to B4. - Base:
POST /api/v1/pushrelay. - Equipo: E-P1 to E-P6. - App: registration, categories, the badge, foreground rules, withdraw. - Ships without buttons. - 2c. Decisions on the cards, and notification buttons. Needs B5. - Pills, the job view, the act, folding when the web has it. - Then the service extension and the bound actions.
- 2d. Made with Base, and opening documents. Needs B6 and B7. - The sidebar section. -
://openinto Docs and Sheets. - The Quick Look viewer with Edit in Oficina Docs.
The mockups are signed off (2026-11-28). Each part gets a plan, reviews as before, and TestFlight and Sparkle releases.
7.12 Not doing in slice 2
- Siri, Shortcuts, the share extension and Live Activities: slice 3.
- Removing members natively.
- Base paths for approvals (K6 keeps them on Equipo's pages).
- A live embedded editor of any Oficina app.