Pace — architecture (systems reference)
This is the canonical detailed architecture reference for Pace — the per-system
bullet list that previously lived inline in the repository AGENTS.md. It was
extracted to keep AGENTS.md a concise agent bootloader. The doctrine and the
high-level constellation diagram live in overview.md; per-file
responsibilities live in ../development/key-files.md.
App shape
- App Type: Menu-bar-first (
LSUIElement=true) with no Dock icon. On MacBooks with a camera housing, the always-available Living Notch signal and quick panel are joined by one on-demand resizable Command Center window. Displays without a reported housing use a conventional status item and standalone panel; Pace never draws a synthetic center notch. - iPad companion target:
PacePadis a full-screen iPadOS 26 input/output surface in the same Xcode project. It owns Bonjour discovery, authenticated reconnect, tap-to-talk recording, local system TTS, the companion face, low-rate local presence detection, and requested-only camera still capture. It owns no planner, durable memory, Mac inspection, tool execution, or interruption policy. - Framework: SwiftUI (macOS native) with AppKit bridging for onboarding, the Command Center window, menu-bar panel, hardware-derived notch overlay, and cursor overlay
- SwiftUI design system: The macOS app target links SaaSMakerUI at exact version
0.1.17.DS.palettebrands its fonts and components with Pace’s semantic colors; SwiftUI roots apply the theme while cursor and glow geometry stay native. Packaging verifies theSaaSMakerUI_SaaSMakerUI.bundlefont resources before signing. - Pattern: MVVM with
@StateObject/@Publishedstate management - Concurrency:
@MainActorisolation, async/await throughout - Analytics: local-only no-op/timing-safe hooks via
PaceAnalytics.swift; no cloud analytics SDK is linked.
iPad companion transport
PaceCompanionServeris a thin Mac adapter over the existing conversation, local audio transcription, privacy-pinned vision, world observation, and proactivity pipelines. It advertises_pace-companion._tcpand never creates a second planner or memory store.PaceShareddefines versioned messages and a length-prefixed frame containing bounded JSON control data plus optional AAC/JPEG bytes. Heartbeats and a bounded message-ID window handle connection health and replayed frames; shared policy also validates semantic payloads, stale sessions, privacy gates, heartbeat expiry, and bounded reconnect timing.- Pairing uses a six-digit, in-memory code only to establish TLS 1.3 PSK transport. The Mac then issues a random 256-bit credential stored in each device’s Keychain. Reconnect PSKs and a session HMAC derive from that credential; no secret is stored in UserDefaults or logged.
- The iPad sends ordinary utterance audio and semantic presence events. JPEG
bytes are sent only in response to an expiring
camera_frame_requestcreated by the conservative explicit physical-scene request parser. Pause or camera disable discards queued presence, cancels pending still continuations, and is re-checked before either side sends or accepts camera media. Temporary Mac audio files are removed after local transcription and requested images are never persisted. - If the Mac’s selected planner crosses the on-device boundary, the existing audit/tint behavior remains authoritative and the iPad processing and speaking states become amber for the same turn.
Planner
- Planner: main screen/action planning uses the local OpenAI-compatible LM Studio reasoner. The current source default for both planner and fallback VLM is one resident
qwen/qwen3.5-4bmultimodal model, eliminating the missing-model and model-swap stalls caused by the previous separate Gemma/UI-Venus defaults. Pure-knowledge turns use the bundled in-process MLX planner when enabled; otherwise they use LM Studio’s native/api/v1/chatstream withreasoning: offand fall back before first output to the OpenAI-compatible route with both supported non-thinking hints. Structured action turns stay on Chat Completions for JSON-schema decoding.<think>…</think>stripping remains defensive. The bundled path prepares explicit system/user/assistant roles with a fresh token cache and a 2,048-token response limit; feature-specific JSON synthesis bypasses the agent planning scaffold. The pinned OSSChatSession.streamResponsediscards system instructions, so Pace uses the lower-level MLX generation API. The bundled path reuses a complete Hugging Face CLI asset cache and runs one real inference at launch; an early user turn awaits that same warmup task instead of racing a second model load. The 2026-08-27 qualification scored 16/19 on the legacy planner fixtures and 7/8 on production v10 action fixtures, with the focused five-turn set averaging 878 ms. Gemma 3 12B remains an optional quality-over-memory planner andqwen/qwen3-30b-a3bremains the stronger 48 GB swap. Apple Foundation Models is scoped to classification and structured extraction rather than world-knowledge answers. See../development/info-plist-switches.md. Cloud planning is available only through explicitly consented tiers. First-launch tier default: on a brand-new install with nopace.planner.tier.UserDefaults state at all,PacePlannerTierStore.loadConfiguration()checksSystemLanguageModel.default.availabilityand resolves to.appleFoundationModelswhen Apple Intelligence is available,.localotherwise. Existing persisted tier choices remain authoritative. - Planner (
BuddyPlannerClient): the active planner is chosen by the user in Settings → Planner viaPacePlannerTier(Local / CLI bridge / CLI direct / Direct API / Apple FM). Default local model isqwen/qwen3.5-4b.BuddyPlannerClientFactory.makeDefault()dispatches on tier:LocalPlannerClientfor.localand as a fallback for missing/invalid configs;AppleFoundationModelsPlannerClientfor.appleFoundationModels;CloudBridgePlannerClientfor.cliBridge;PaceLocalCLIPlannerClientfor.cliDirect; andDirectAPIPlannerClientfor.directAPI. The sameCompanionSystemPromptflows through every tier. Direct-API keys live in macOS Keychain viaPaceKeychainStore. Any off-device tier tints the capsule amber and fails loud unless the user explicitly enables local fallback. The main action planner is decode-constrained to the v10{spokenText,intent,payload}envelope; invalid structured output retries without prompt cache. Eval coverage lives inevals/fm-fixtures-actions/and is scored on decoded actions..cliDirectgeneral brain (OpenSpecopenspec/changes/archive/2026-07-12-codex-general-brain): a user-selectable tier that direct-spawns the user’s already-authenticatedcodex(default) orclaudeCLI — no Node bridge, only the CLI on PATH — as the brain for ALL turns (the samePaceLocalCLIPlannerClientthe.researchlane already uses). Upstream sub-selection persists viaPacePlannerTierStorekeypace.planner.tier.cliDirect.upstream(PaceLocalCLIUpstream, default.codex). Off-device, so it inherits the FULL cloud-bridge safety contract via a separate transport-aware consent:PaceCloudBridgeConsent.hasAcceptedDirectSpawnConsent()(canRunDirectSpawnTurn(now:), immediate foreground availability) — accepting the Node-bridge consent does NOT auto-grant the direct-spawn path. A.cliDirectturn tints the capsule amber (isOffDeviceTurnInFlight, keyed onplannerClientForThisTurn is PaceLocalCLIPlannerClient), writes aPaceAPIAuditLogentry (subsystem: "planner.cliDirect",target: <codex|claude>) so the Privacy dashboard flips off “0 bytes → X KB to codex”, and FAILS LOUD viaPaceFailureNarratoron CLI error (no silent local fallback beyond the existing opt-in). Missing-binary preflight (PaceLocalCLIPlannerClient.isUpstreamBinaryOnPath) surfaces a plain-language “needscodexon PATH” hint before the turn. Codex is the phone-a-friend default: the.researchlane defaults to Codex on fresh installs (PaceResearchTierStore.defaultCLIBridgeUpstream = .codex,defaultCLIBridgeModel = ""so Codex uses its own authenticated model; persisted upstreams honored for existing users), and cron/scheduled fires (CompanionManager+LifecycleexecuteTaskCallback) route through a Codex direct-spawn brain ONLY when direct-spawn consent + 24h soak are satisfied (BuddyPlannerClientFactory.cronTaskBrainDecision, using the separate scheduled-turn gate) — otherwise they fall back to the local planner, so an unattended background fire never silently goes off-device (amber forced for the Codex path). The planner brain is also selectable from Settings → Models via a RAM-aware brain picker folded intoPaceModelMemoryBudget’s budget section (PaceBundledModelsSettingsTab.memoryBudgetSection): picking a cloud/Apple-FM brain frees the local-planner RAM and the section live-updates the per-model breakdown, fits verdict, and largest-VLM-that-fits recommendation. Both the Planner tab and the Models picker route through the sharedCompanionManager.selectPlannerTierWithConsent.- Codex response completion is separate from CLI exit. A nonempty, validated
turn.completedseals the response; Pace stops and reaps its owned CLI worker before returning it, avoiding telemetry/cleanup exit delay. Missing, failed or malformed completion events retain process-exit validation. Cancellation remains authoritative. Claude retains normal process-exit handling. - Clear, standalone F-35B hover and Pi 5 camera teaching requests may show a lessonless trusted native model before Codex returns. This requires an available, consented Codex direct planner, a current local turn and no existing visual/suggestion context. The preview emits no narration or assistant-history event. Its turn lease and playback/dismissal generations fence the eventual plan. Manual exploration preserves the exact current model and controls while the authored lesson explanation (or ordinary answer when no lesson exists) uses the normal final speech/history path once. An untouched preview yields to a different authored visual; dismissal or a newer turn prevents late delivery. A follow-up turn retains the current preview and its part context. Starting a capture cancels old authoring; if capture ends without a question, the figure remains available for exploration or dismissal without late narration. Suppressed tool kinds after manual exploration are recorded without payloads. Failure and panel cancellation withdraw only an unmodified preview still owned by that turn.
- Bounded everyday Codex answers: only confident, simple classified chitchat and direct knowledge answers may try
gpt-6-lunawith per-call low reasoning effort. The factory requires automatic Codex direct selection, the actual nonresearch default-model client, and current direct-spawn consent and availability. Suggestions, visual context, teaching/mechanism requests, history-dependent questions, richer text callers, explicit models, and other tiers retain the selected planner. Plain explain/teach/how-mechanism requests use the Teaching power predicate; explicit text-only or one-sentence requests keep short-answer eligibility. Luna receives an immutable trusted text prompt without diagram instructions and a plain-answer contract; the selected planner retains the full diagram-enabled prompt with the same thread and history, and debug exports use the completed answer’s actual prompt. Only this factory-created Luna client aggregates completed message items until a valid Codexturn.completedevent; the wrapper validates that complete answer and publishes accepted plain text once immediately, before process exit. Generic clients remain buffered until return. An exact escalation marker, empty answer, structured/action output, malformed or incomplete turn, unavailable model/configuration, other non-account nonzero exit, or the Luna-only ten-second timeout promotes once to the selected planner after the call returns, provided no answer was accepted. Known authentication/quota failures from JSON or stderr, spawn failures, and cancellation propagate before acceptance. After accepted speech, cleanup errors retain the sealed answer in history and chat and record a content-free late-error decision; cancellation still propagates, and later output never retries or replaces the accepted answer. The main planner remains concrete and unchanged, amber disclosure covers both attempts, and size-only audits include model, effort, and routing reasons without changing thecodexegress target. - Opted-in current-question API answers:
fastEverydayAnswersEnableddefaults to false. While automatic direct Codex and its current off-device consent are selected, enabling this setting lets the existing bounded decorator try OpenAI Responsesgpt-6-lunawith reasoning none, low verbosity, a 1,024-token cap andstore:false. Its separatePaceEverydayQuestionprotocol accepts only the raw current question. Fixed instructions exclude history, retrieval, ambient context and images by construction. A shared ephemeral session buffers at most 1 MiB and requires a successful terminal completion before whole-answer validation and exactly-once delivery to local speech/history. Recoverable unavailable, timeout and invalid-answer cases record a reason and use the selected planner with its original context; cancellation, revoked consent, API authentication/policy failures and refusal fail loud. API audit and debug provenance name Responses and its fixed prompt. Disabling the setting retains the existing Codex Luna route. - Fast-answer credentials:
PacePlannerCredentialStorereads an explicitly configured Infisical CLI source asynchronously, with a bounded process and a sleep-inclusive in-memory cache. Failed lookups back off for 30 seconds; changing configuration or clearing the cache resets that backoff. Itspace.planner.infisicalCredentialSourcedefaults dictionary contains only project/organization IDs, environment, path and secret name. Configured Infisical never falls through to Keychain; absent configuration retains the existing Keychain source. The key never enters files, defaults, process arguments, stderr or audit details. Eligible automatic fast Codex mode prewarms configured Infisical at launch, push-to-talk press, interactive chat opening, composer focus and Mac wake. One owned readiness task rechecks authorization after enqueue; opt-out, planner changes, consent revocation and shutdown cancel it and clear the cache. No periodic refresh runs and the existing expiry remains strict. API authentication failures invalidate it for the next turn without retrying or bypassing the failure; cancellation and current consent are checked again after retrieval and before API dispatch. Metadata-only credential audits separate fetch time from cache hits. - Opted-in passive screen API answers: the same fast-answer setting also covers explicit current-screen questions that pass
shouldUsePassiveScreenPrompt, with actual captures, Read My Screen, automatic direct Codex and current consent required. Selection occurs only at the single-planner call after the existing concrete Codex capture, AX and compact-prompt choices. A distinct typedPacePassiveScreenQuestionentry carries those JPEG images, the current AX-enriched prompt, supplied history and the same compact instructions to Responses Luna with reasoning none andstore:false; the everyday question-only protocol stays unchanged. Both entries share one ephemeral HTTP/SSE implementation. No API tools or action schemas are sent. Only completed plain text or a spoken-only JSON answer is accepted; executable actions, control/pointing tags, visual commands and malformed output are rejected before speech/history. Recoverable missing-key, transient and malformed responses promote once with the original payload to the selected Codex planner. Current consent, fast-answer opt-in, Read My Screen, turn ownership and cancellation are checked before sending, delivery and fallback; revocation, cancellation, authentication/policy failures and refusal never promote. Fallback output is also held until its final authorization check. Amber disclosure remains on, the per-turn HUD/debug name the actual provider, and both attempt audits include image byte counts without content or fabricated usage. - Teaching annotation ownership: deterministic visual-find requires Read My Screen and an explicit initiating turn/dismissal lease. Capture and OCR cancellation propagate; every asynchronous result is checked before annotation set/clear and before caller feedback. Both visual-find and planner annotation rendering carry the capture’s stable display ID/frame. Overlays match NSScreenNumber and the captured frame, independent of cursor-first screenshot order, and reject removed or moved displays.
- Retained Coding power:
coding_sessionis a distinct typed start/resume/status/cancel tool; legacycodex_sessionstill opens Warp. Recognized retained-coding commands use a screenless selected-planner route and never the everyday API; other requests retain ordinary planner routing. Every start/resume route converges on the executor’s manager callback for mandatory approval showing its resolved canonical workspace, current session state and task. Unknown IDs fail before the modal. Turn ownership and live consent are rechecked after the modal, and the coordinator validates the same approved scope immediately before execution. EnableActions and current Codex off-device consent remain required. Local status/cancel bypass the planner and remain available after either gate is revoked, including a unique owned workspace still opening before thread creation. Start/resume reservations identify their owning session when available; status shows each existing ID once as preparing or resuming, and cancellation by ID stops that pending operation. Multiple active or opening owners require clarification. Idle-process teardown reports that the previous process is still shutting down rather than calling a completed job busy. Voice resume receives only owned session IDs, workspace names and states; no prior task or transcript is injected. Recognized retained-coding imperatives use this route, while questions and legacy Warp launches retain ordinary routing. Foreground acknowledgements use the existing turn-owned local speech path; one assigned lifecycle callback records background progress/final events against the original canonical conversation turn without acquiring voice ownership. The coordinator owns a private stdiocodex app-serverslot per canonical workspace, with at most four active workspaces and one writer per workspace. Completed idle slots retire after startup reservations release. A slot’s process, opening task and event stream share a generation fence; a failed startup affects only that workspace. Approved startup outlives foreground-turn supersession. Permanent close fences and awaited metadata/open/process-group cleanup prevent launch after app shutdown. Retained non-ephemeral threads keep their immutable workspace identity. Every thread/turn requests workspace-write, network off, no temporary-root expansion and user review. The effective thread policy must match before a task starts. Codex 0.169.0 rejectsuntrustedat runtime despite its generated schema; the supported policy ison-request. Ordinary command-approval requests are denied because this protocol cannot prove that accepting them preserves confinement. Exact in-workspace file changes and explicit managed human checkpoints can use Allow Once; network, permission grants, session grants, policy amendments and unknown methods remain denied. Shell/file tools and workspace AGENTS stay active; private process overrides disable hooks, apps, browsers, computer use, images, multi-agent delegation, search and every configured MCP discovered through CLI metadata. Global Codex configuration is unchanged. A versioned mode-0600 catalog under privatePace/Codingatomically saves workspace/thread/turn/conversation identities and state, with a readable recovery copy. It stores no keys, task replay, wire/stderr or second transcript. Interrupted process/app lifetimes load as needsResume. Explicit resume reads/reconciles the retained thread and supplies a new task; no mutating task is replayed. Correlated terminal notifications determine completion and cancellation, rather than RPC acknowledgements. Ordered startup-event draining and stable event identities reject stale/duplicate results. Closing chat revokes foreground speech; a retained coding job continues unless explicitly cancelled or its actual displayed approval is cancelled. Closing an unrelated explanation does not interrupt coding sessions. Dismissal revokes all currently presented coding approval tokens by epoch, forces their later decisions to cancel, and registers each token’s actual alert window. The abort cascade acts only when the current modal window belongs to a revoked token; it waits behind fresh coding or unrelated dialogs. Shutdown and actual app termination await only the owned process and its isolated process group.
Voice, vision, TTS
- Speech-to-Text: Apple
SFSpeechRecognizer(on-device,requiresOnDeviceRecognition=true) is the default active provider — instant, no model download.TranscriptionProvider=whisperKitis accepted as a scaffolded local provider selection, but falls back to Apple Speech until the real WhisperKit streaming bridge lands. All cloud STT providers have been removed. - Text-to-Speech: two on-device conformers of
BuddyTTSClient. The dependable default isLocalTTSClient(AVSpeechSynthesizer, Premium > Enhanced > compactLocalTTSVoiceIdentifier) because it has no sidecar or model-readiness dependency.TTSProvider=localServeropts intoLocalServerTTSClient, backed by a loopback Kokoro-82M/v1/audio/speechservice with per-utterance Apple fallback and a five-second outage memo. Both expose identity-scoped utterance onset/completion for guided lessons on the same queue used by regular speech. Kokoro retains its drain task and fences synthesis, retries, native player callbacks and fallback with a playback generation; stop cancels pending completion exactly once, so delayed synthesis cannot restart audio. Optional backends without precise completion retain the ordinary spoken answer and manual lesson stepping; Their guided Play control is disabled; ordinary answers keep the selected voice, and Next/Back explore the visual quietly without claiming synchronized progression. Cloud TTS has been removed. - Local Vision-Language Model (optional): LM Studio at
http://127.0.0.1:1234/v1(OpenAI-compatible). The defaultqwen/qwen3.5-4bmodel is shared with the local planner, so only one model stays resident. Accessibility and native OCR run first; the VLM is the fallback for screens those native paths cannot expose. Planner/VLM HTTP roots are loopback-only. Pure-Q&A typed turns do not prewarm or call the VLM. - Screen Capture: ScreenCaptureKit (macOS 14.2+), multi-monitor support
- Voice Input: Push-to-talk via
AVAudioEngine+ pluggable transcription-provider layer. Right Option is the system-wide keyboard shortcut. A listen-only CGEvent tap opens the microphone after a brief hold. Another key, a click or a scroll cancels that capture. Physical hold-to-talk ends on key release; button, avatar and wake-word captures release through the same shortcut pipeline after approximately one second of local speech silence, with an eight-second no-speech timeout and a 45-second ceiling. Endpointing uses raw RMS from the existing tap; transcription and audio remain local. With always-listening explicitly enabled, barge-in shares raw RMS from its existing wake-word tap, cancels and drains the interrupted reply once, and starts the same bounded hands-free capture without displacing active push-to-talk. Turn leases reject queued speech from a cancelled reply even after the next capture resets the speech pipeline. - Voice Input UI:
PaceNativeInterfaceModelmaps ready, listening, understanding, approval, acting, speaking, completed, blocked, and failed into one semantic state language.PaceSignalViewrenders that language across onboarding, the real notch, and the quick panel; off-device planner activity overrides the active signal to amber. Timeline rendering exists only for active states, and Reduce Motion uses static or short crossfade presentations. - Cursor: Codex-style arrow (
CodexArrowShape) with linear-gradient fill, white highlight stroke, dual shadow. - Element Pointing: the planner embeds
[POINT:x,y:label:screenN]tags in its response. The overlay parses these, maps coordinates to the correct monitor, and animates the cursor along a bezier arc to the target.
Memory
- Shared conversation history:
PaceConversationRecorderwrites typedConversationEventmetadata into the existing on-devicepaceHistoryretrieval documents and upserts live chat under the same event ID. Accepted typed requests persist before queueing; accepted voice transcripts persist before asynchronous planner dispatch. Each visible assistant reply, progress message, reminder or proactive narration is a separate assistant event, including muted replies. Composer and chat-deeplink turns suppress automatic speech. Voice turns use the session’s voice mute setting. Cancellation retains accepted input and commits the sanitized visible response prefix with interrupted delivery state; delivery state does not claim which audio was heard. Replay uses the existing event. Legacy user/assistant pair documents remain readable without a migration. Reply threads share the same store. An optional root message ID binds each accepted request and its output to one main-chat message. Voice captures the destination at microphone start and typed input captures it before queueing. The planner uses the root and previous replies for that thread. Legacy events appear in Main chat. Raw STT partials and unsent drafts are ephemeral. Assistant-only events do not enter user-fact extraction. Meeting transcripts and synthesized notes retain their separate privacy-pinned storage; conversation history contains command acknowledgements. - Two-tier in-context memory: every planner call carries the last K=4 turns verbatim (
PaceThreadMemory.verbatimWindow()) AND a rolling summary of everything older (injectionPrefix(), rendered into the system prompt as<conversation_so_far>...</conversation_so_far>). The summary is refreshed by a detached Apple FM call after each turn viaPaceThreadSummarizer; the user-facing path never blocks on summarization. Race-safety lives in a monotonicsummaryVersionsnapshot captured before each detached call, so out-of-order arrivals are dropped atapplySummaryUpdate. In-session a 20-minute idle threshold still drops the live state (or Settings → Memory → Reset thread). The conversation now SURVIVES quit/relaunch:PaceThreadMemory.snapshot(now:)/restore(from:)are pure value-type accessors andPaceThreadMemoryStorepersists a single on-device JSON (~/Library/Application Support/Pace/thread-memory.json, atomic write) after every turn/summary/reset;CompanionManager.start()rehydrates it. Policy is “resume always, until reset” — no staleness expiry; the file is wiped only on an explicit thread reset or when thread memory is disabled. The summary is still never journaled topaceHistory(only session id + lifecycle events are). Durable facts go through episodic memory instead. - Always-On Companion Mode (default off): typed provenance-bearing
PaceWorldObservationevidence uses bounded atomic persistence, current-state/last-seen/change/presence queries, confidence decay, correction supersession, deterministic memory promotion, and a dedicated retrieval source.PaceCompanionModeControllerexposes off/starting/observing/interpreting/paused/degraded/privacy-blocked;PaceCompanionInterventionPolicydefaults to silent memory and keeps card/speech opt-ins separate. Settings → Companion and menu-bar indicators expose source consent, active capture, retention/storage, readiness, pause, and clear. App lifecycle starts explicitly enabled ambient/watch sources plus a production low-rate AVFoundation/Vision camera client that emits only non-identifying ephemeral person tracks and conservatively matches user-taught, locally persisted Vision feature prints across coarse camera zones. Teaching is an explicit centered-object capture; no photo is persisted. Ambient voice uses a bundled local pre-STT Core ML gate (PaceWakeWordClassifier, exact labelshey_paceandbackground); missing or malformed assets fail closed before Speech.framework is reachable. Accepted wakes hand off to the bounded push-to-talk conversation path. Silent cards and spoken interventions are separately default-off and wired through the intervention policy; speech additionally passes the existing live restraint/cooldown path. Routine promotion requires at least three unique supporting observations. On 2026-07-13 the owner directed “push through,” accepting the remaining unmeasured live/hardware and manualCmd+Rrisk without representing those checks or documented thresholds as passed. Seedocs/product/companion-mode-privacy.md,docs/product/companion-mode-dogfood.md, anddocs/product/pace-wake-word-classifier.md.
Actions, tools, integrations
-
Deterministic first inspection: exact standalone window-list requests for Chrome, Safari, Firefox, Arc and TextEdit may supply one local, silent Peekaboo
window.listenvelope as the first main-loop step. This requires the actual default Codex direct planner, current consent/availability, Read My Screen, enabled actions and a local foreground turn without research, escalation, skills, suggestions, teaching or visual context. Ordinary preflight, approval, executor, ambiguity recovery and inspection history remain authoritative. The selected planner receives the resulting evidence for the answer or repair; the resolver neither executes tools nor answers from an inventory alone. Those inventory-only continuations use shared conversation and speech rules plus canonical MCP envelopes plus bounded inventory instructions and the actual Peekaboo window schema. They omit screenshots, prior conversational exchanges, thread summary, ambient context and local retrieval; the unchanged two-receipt, 12,000-character inspection budget retains canonical requests, results and truncation warnings in the current prompt. A typed plan-scope guard permits only Peekaboowindow.listactions or an answer before observation policy, visual draining and execution; inventory turns also suppress point overlays. Other turns retain normal prompts, memory, screen capture and configured-tool context. Live eligibility is rechecked after asynchronous context assembly before the next planner call. -
Ambiguous app inspection: a Peekaboo application-name ambiguity during exactly
window.liststops the current action plan and permits one bounded read-only recovery per user turn. Fresh foreground/on-screen process metadata prioritizes inspection only; up to four currently matching application processes are listed by PID, with bundle identity rechecked after each await. The deterministic first inspection requests the provider’s compactinclude_window_details: ["ids"]array and preserves it on recovery calls. Only this mode pools inventory text within 4,800 bytes, with a reserved share for each result, redistribution of unused space and visible truncation markers; other inspections keep their uniform 4,000-byte allocation. Native coverage reports examined versus validated reported instances, omitted validated PIDs, unvalidated reported processes, failures, changed processes and truncation. Full reported-instance coverage requires every reported matching instance to succeed without a parsing or inventory limit; it does not establish a control binding. Inventories remain untrusted evidence for an answer or a fresh planner step through normal approvals. Missing candidates permit one app inventory; repeated ambiguity, screenshots and mutations ask a short clarification instead of expanding authority. Cancellation, turn replacement and screen-access revocation stop further discovery. Typed target-resolution state drives the HUD using human feedback; raw receipts appear only in a collapsed technical-details disclosure. Mixed results retain visible receipts for earlier completed actions. Exact dispatched-prefix receipts distinguish dispatched actions from queued actions. Undo is shown only when the actual AX mutation log grows, using the latest logged edit rather than planned MCP or Calendar actions. -
Preinstalled powers:
Powers/PacePowerCatalog.swiftassembles Text, Voice, Screen Awareness, Computer Use, Teaching, Images, Research, Productivity, Automations and Integrations. Each provider owns real tool definitions and contextual prompt contributions.PaceToolRegistryretains the canonical typed lookup, aliases, risk/schema validation and artifact checks over those definitions.CompanionSystemPromptcomposes contributions for screen, text-only and research turns, then adds thread memory and ambient context. Registering a provider adds its contributions without another prompt switch. Permission metadata is descriptive; existing consent, screen access, preflight and approval gates remain authoritative. These are bundled code providers, not an installable third-party package format or an SDK promise.- Teaching owns pointing instructions, guided Tuition Mode, annotations, visual find, interactive diagram documents and native 3D figures under
Powers/Teaching/. This means teaching the user on their screen; reusable user-taught automations retain their existing storage and execution paths. Tuition Mode keeps its existing preference and action-mode gating. Image-generation policy and controllers belong separately toPowers/Images/. Optional validated lesson steps live in the existing diagram document; the diagram controller owns immutable step snapshots, reveal/focus/camera/control state and playback generation. The shared visual drainer awaits narration under the manager’s current turn task/lease in both planner lanes, consuming outer narration once. Next/Back changes the active utterance revision within that same awaited run; Pause returns to normal turn finalization and Play waits for it before taking a fresh manager-owned task. No detached lesson speaker survives the turn. Pause repeats the current utterance on replay. Manual exploration pauses, the actual pipeline mute and remote-output context keep muted/iPad turns silent on the Mac. Written response text remains nonempty and independent of local speech handling. Audible onset or a written caption uses one stable presentation/step event in shared history without adding derived thread pairs; the hosting response enters derived memory once. Follow-up context omits the old course to prevent replay. A trusted template catalog supplies the conceptual F-35B LiftSystem and Pi5 camera board, their semantic anchors and bounded hinge/slide definitions through the generic RealityKit builder. Data-driven token/matrix/metric rows use the existing native diagram surface. Same-geometry steps retain entities and manual orbit until an explicit viewpoint; translation-only motion uses a translation envelope rather than a rotation sphere for camera fitting. - Shared execution remains in the agent runtime. Powers do not start independent turn loops or gain direct input authority.
PaceVisualActionDrainerpreserves mixed visual ordering and dismissal generations; annotations still drain before action approval/execution. Closing explanations, cancellation, speech, conversation history and user-input coexistence retain their existing owners. Voice engines and text/voice delivery remain runtime adapters while their planner instructions are supplied by their respective powers.
- Teaching owns pointing instructions, guided Tuition Mode, annotations, visual find, interactive diagram documents and native 3D figures under
-
Action Layer (agent mode): the planner should prefer
<tool_calls>JSON blocks where the outer array is sequential steps and each inner array is a parallel group. Tool metadata lives inPaceToolRegistryso prompt docs, aliases, and risk labels share one source of truth; the local registry validates at app startup so schema examples, aliases, and enum coverage cannot silently drift. Legacy tags are still accepted:[CLICK:x,y],[DOUBLE_CLICK:x,y],[TYPE:text],[KEY:cmd+s],[SCROLL:up:3],[OPEN_APP:Safari],[OPEN_URL:https://example.com],[MUSIC:play],[VOLUME:up:2],[BRIGHTNESS:down:3],[CALENDAR:today], and[REMINDER:send invoice].PaceActionTagParserextracts them;CompanionManagerasks for user approval only for higher-risk non-undoable or external actions when theApprove Risky Actionspreference is on, and the approval alert defaults to Cancel. Routine local actions such as click, scroll, window snap, app/URL open, media, volume, brightness, clipboard read, and undo can execute without the popup; blocking preflight issues still surface before execution.PaceActionApprovalkeeps the allow/cancel decision testable;PaceActionExecutorposts events after TTS playback starts. Single-clicks tryPaceAXTargeterfirst (AX-tree press), falling back to CGEvent. AX set-value edits are logged in a session-local mutation log and can be restored withUndo.last/ “undo that”. App launch/URLs useNSWorkspace; volume, brightness, media, and clipboard reads use local macOS APIs; Calendar/Reminders use EventKit for reads and creation. Mail recipient names can resolve through Contacts before composing a draft. Finder/Notes/Mail/Things/Shortcuts/Messages have first-pass local integrations.download_filedownloads a user-named http(s) URL into~/Downloadswith URL validation, filename sanitization, and Finder-style collision suffixes — always approval-gated. Gated byEnableActions=truein Info.plist. Runtime smoke hooks are disabled unlessPACE_ENABLE_SMOKE_HOOKS=1. -
Trust surfaces (visible undo + reply replay + failure narration): an actual new AX set-value/edit mutation raises a 5-second floating
PaceUndoBannernext to the cursor; tapping it submitsUndo.lastthrough the executor. Dispatched MCP or Calendar actions and queued writes cannot advertise undo for an older AX entry. After every assistant turn finishes speaking, the notch panel renders a 30-second reply-replay button driven by the same post-processed string that flowed through TTS — replay does NOT re-stream the planner. Plain-language failures (planner offline, missing permission, click missed, sidecar TTS offline, MCP server not configured, cloud-bridge upstream error) are composed deterministically byPaceFailureNarrator(no LLM call) and routed throughPaceRestraintGate.decide(...)so failure speech stays silent during a Zoom/active call. Undo eligibility follows the actual AX mutation log; the broader action-risk policy does not imply an undo implementation. The click-missed narrator is wired to the all-fail click observation inPaceActionExecutor. -
Typed automation catalog: Versioned manifests under
Resources/automations/contain canonical Pace tool calls, provenance, execution mode, required preferences, invocation examples, and ordered step groups. The indexed 19-entry starter library covers Notes templates, Calendar reads, timers, Finder locations, current-window layouts, bounded media control, weekly review, and end-of-day reset.PaceAutomationDefinitionLibraryvalidates every manifest at startup againstPaceToolRegistry, rejects input injection, network/download, destructive, nested-flow, and opaque Shortcut capabilities, and callsPaceAutomationCompilerto reject partial parses. The compiler feeds the existingPaceActionTagParser, so typed automations reuse normal preflight, approval, executor, observation, and audit behavior.PaceAutomationCatalogbuilds a non-persisted view over typed automations (deterministicLocal), bounded Pace Programs (deterministicProgram), recorded flows (deterministicReplay), skills (plannerGrounded), and installed Shortcuts (externalOpaque). Explicit list/run commands still resolve locally by unique exact normalized name. Ordinary completed text permits implicit execution only for an exact authored invocation alias. Embedding similarity and local-model ambiguity resolution do not authorize execution; uncertain requests preserve the selected planner fallthrough. Catalog metadata is never added to any off-device planner prompt or conversation memory. -
Saved power management:
PaceManagedPowerStoreis a typed facade over existing user automation JSON, Pace Program JSON and.skill.mdartifacts. Exact user-transcript commands list/read/create/update/enable/disable/run/archive powers before broad skill/flow or natural matching. Namespaced backing references, SHA-256 snapshots and per-power enabled metadata live separately from executable definitions. Update preserves representation, name and identifier, validates the whole replacement, excludes itself from collision checks, preserves the prior owned bytes underpower-management/revisions/, then atomically replaces the artifact. Removal moves exactly that owned artifact underpower-management/archive/; logs, conversation, media and dependencies stay intact. Unreadable state fails closed for managed user artifacts with an explicit settings error; protected bundled/provider workflows keep their own authority. Symbolic-link files/directories cannot acquire mutation ownership. Disabled metadata is scoped to owned artifacts; successful archive clears that lifecycle’s state, and a new explicit create starts enabled. Archive rolls back the owned move if settings cleanup fails. Compiled powers, bundled definitions, recorded flows and provider-managed Shortcuts remain protected and disclose their existing controls. Enabling never grants action, OS or cloud authority. Selected-planner authoring shares the existing representation ladder with one commit boundary; turn leases and expected fingerprints fence stale replies. Execution binds the saved snapshot, rechecks enabled/existence/fingerprint state at action and response boundaries, and covers explicit skill runs plus natural aliases. Management mutations use the API audit journal and normal conversation recorder. -
Runtime JavaScript Powers: “Add a Power” accepts a description directly or asks for one bounded follow-up. The selected consented authoring planner emits schema-v2 Program JSON containing exactly one JavaScript function body. Creation and updates evaluate it without effects before the managed artifact commit. Schema-v1 declarative Programs remain supported. Each invocation computes from immutable local hour and weekday in a fresh
PacePowerJavaScriptWorkerchild, using public JavaScriptCore APIs and no native object exports. The embeddedPacePowerJavaScriptService.xpcis a persistent Foundation-only broker; it spawns the bundled helper with bounded stdin/stdout and serially owns its PID through reaping. The broker’s independent App Sandbox entitlement grants no network, user-selected files, or input control; the signed helper has exactly the sandbox and inherit entitlements and inherits that restricted sandbox. The SDK calls queuespeak,presentMedia,presentSVGandpresentCardrequests; the host checks every argument, compiles the complete typed plan, verifies all media assets, then rechecks the current turn and managed artifact fingerprint before entering existing speech/media execution and conversation history. The broker enforces a two-second monotonic watchdog on its control queue, kills only its owned compute child on timeout or active cancellation, reaps it before replying or starting the next evaluation, and remains alive so launchd restart throttling cannot block recovery. Source is capped at 24 KiB, output at 64 KiB and emitted actions at 50. Connection invalidation alone is never treated as interruption of JavaScript. Each run receives a fresh JavaScript context; saved code is discovered and runs without rebuilding or restarting the app. -
Expressive saved workflows: Voice owns canonical
present_media(assetID|svg,durationSeconds,motion?)andspeak(text,profile?)tools, permitted in typed automation/program definitions. Media IDs resolve only throughPaceLocalMediaCatalog: bundledthank-you-danceis an original transparent eight-frame GIF; explicitimport power media /absolute/file.gif as asset-idvalidates actual GIF/PNG content, twenty-megabyte size, frame/dimension/decoded-pixel limits, then atomically installs an owned copy and hash/provenance manifest. Planner calls accept no URLs or paths. Generated SVG uses a typed, XML-parsed and canonically serialized vector source bounded to 32 KiB, 512 elements and depth 24; scripts, events, foreign namespaces, entities/DTDs, images, reuse, filters, SMIL and external references are rejected. Inline CSS keyframes animate generated shapes. A public WebKit view with nonpersistent website data disables content JavaScript and native bridges, applies a host CSP and resource-blocking rules before loading an inert SVG data-image, denies later navigation and releases content on dismissal. The existing panel appears only after renderer readiness and a fresh turn-lease check; saved Power runs also recheck managed-artifact authorization. No per-Power rebuild or installed asset is needed.PaceMediaOverlayControllershows an animated NSImageView in a transparent nonactivating click-through panel with a separate black close control. Presentation returns when visible, allowing the next local utterance to overlap. Duration is one to thirty seconds; old timer/close generations cannot dismiss a replacement. User close/stop cancels only the originating live turn and speech. Dismissal releases animation content. Speech uses confirmed utterance onset/completion, records the requested line once in common history, respects mute, and reports playback failure/cancellation rather than claiming speech completed. The boundedjapanese_femaleprofile resolves to Kokorojf_alphawith language codejinside the same utterance queue; omission preserves the configured default voice. Explicit profiles reject unsupported backends, retry only whole utterances before onset, and fail without split playback or English fallback on synthesis or playback failure. Outage memos are scoped to model, voice, language and speed. Thethank-you-dancestarter retains its original aliases, animation, four-second duration and default-voice English line. The separatejapanese-greetingstarter presentsjapanese-greeting-womanfor six seconds and speaks Japanese with the explicit profile, requiring a Japanese-enabled Kokoro sidecar. Japanese dictionary preparation is explicit and idempotent throughscripts/start-tts-server.sh --install-japanese; it validates UniDic’smecabrcandsys.dicbefore atomically writingvoice-support/japanese.enabledunder Pace’s Application Support directory. The installer prints instructions to restart a running sidecar before using Japanese speech. Ordinary startup keeps the English dependency environment until this receipt exists, then uses the same Japanese environment as the installer; it never downloads UniDic.PACE_VOICE_SUPPORT_DIRECTORYallows isolated setup verification. Runtime permissions, preflight, approvals and audit remain shared with all typed actions. -
Programmable teachable skills: Schema-v1
PaceProgramDefinitionis a declarative graph stored under~/Library/Application Support/Pace/programs/. It supports ordered typed-action steps, conditions over one pre-run snapshot (weekday, local hour, or frontmost bundle identifier), and literal repetition. The whole graph—including inactive branches—is validated before save, discovery, and each run. Fixed limits are nesting depth 4, 50 source nodes, repeat count 10, and 50 worst-case expanded action steps. Schema-v1 Programs cannot contain Lua, JavaScript, shell, imports, network/file APIs, raw Accessibility operations, or branches on action output. The selected graph flattens into a transient typed definition and reusesPaceAutomationCompilerplus normal preflight, approval, executor, observation, and audit behavior; no model runs after catalog selection. “Teach a skill …” and “Create an automation …” share a selected-planner authoring ladder: fixed typed automation first, bounded Pace Program second, planner-grounded.skill.mdlast. The selected model is an authoring aid, never runtime authority. -
Teachable skills:
.skill.mdskills (PaceSkillLoader) are the natural-language sibling of typed automations, Pace Programs, and recorded flows — a numbered step list the planner re-grounds each run (intent tier), rather than compiling canonical tool calls (typed/program tier) or replaying recorded AX steps verbatim (flows, pixel tier). Bundled skills live inResources/skills/<slug>.skill.md; user skills in~/Library/Application Support/Pace/skills/. Teachable by telling (PRDdocs/product/prds/teachable-skills.md): explicit teach/create transcripts use the shared representation ladder above; Settings → Powers → “Teach a power” remains an explicit planner-grounded prose form.skillStructuringSystemPrompt+skillFromStructuredJSONuse the selected consented planner (local text planner for local tiers), withstructureSkillDeterministicallyas a no-model fallback. Stored triggers are active catalog invocation phrases.PaceSkillLoader.save/deleteUserSkill/listUserSkillsuse the atomic temp-file+rename pattern and reusePaceFlowStore.slug(for:).PaceSkillsViewsurfaces prose skills and deterministic programs in “Saved powers.” Saved reusable work stays local; authoring descriptions and saved preferences go to the selected provider when an off-device tier is enabled. -
Request feedback: User voice input and typed acceptance reveal the existing black conversation panel with preview intent, preserving the active app and keyboard focus. The mic icon starts/stops hands-free voice input; microphone preparation, actual listening, transcription and working are distinct states. A local ready cue plays only after capture preparation succeeds, with the existing release cue reserved for captured PCM. Both conversation layouts share a readable phase row with a real one-second elapsed-time update while active. Capture startup errors surface immediately and remain visible until dismissed or retried; completed foreground output can reveal a passive preview again, while cancelled and remote-only replies cannot. The existing permission refresh re-enables a disabled hotkey tap and recovers a missing modifier release without stopping simulated hands-free presses. Accepted hardware shortcut transitions and capture-entry stages are audited with the process ID, without recording other keyboard input. This provides diagnosis, not a claim that a microphone captured or recognized speech.
-
Spoken Power recovery: Per-capture local vocabulary prioritizes saved Power names before generic tool terms. WhisperKit conditions both streaming passes on the same bounded, special-token-filtered prompt snapshot; it does not force transcript prefixes or change file/meeting transcription. Spoken run requests with a near catalog name resolve locally before general classification or screen planning and ask for confirmation using the existing black clarification chips. Choices hold exact artifact snapshots and a prompt generation for sixty seconds. A chip or explicit short spoken or typed answer must select an offered candidate; ambiguous affirmative answers ask for a choice. Expired, stale, disabled or replaced choices never run. Mutations and general typed requests retain exact semantics. Confirmation revalidates the exact Power and uses the existing managed execution boundary without awaiting a fresh Shortcuts inventory.
-
Interactive Power cards:
pace.presentCardemits data for the existing nonactivating media overlay, not executable HTML. A card has a title, 1–12 pages, at most four answer choices per page, and an optional shared illustration using the existing SVG validator and script-disabled renderer. Native Back/Next and answer buttons update local presentation state; generated code cannot supply callbacks or invoke tools through buttons. Each interaction rechecks the captured turn lease and original managed artifact/enablement before recording an explicitly framed selection as an activity event and displayed feedback in canonical conversation history. Pages and unique choices have bounded event identities; revisiting an answer refreshes its existing selection/feedback events and chronological chat order. Back/Next never creates user questions. Selecting an answer scrolls its feedback into view. Replacement, closing, cancellation and expiry invalidate the presentation generation. Cards default to 120 seconds, capped at 300; existing GIF/SVG presentations retain their 30-second cap. Card JSON is capped at 48 KiB within the existing 64 KiB total worker output budget. There is no persistent Power state, network, package import or arbitrary UI scripting in this SDK. -
MCP Integration Layer: configured stdio servers use the official Swift MCP SDK with serialized persistent sessions for initialization, live tool schemas, calls, and structured/text results. Configuration changes or failed transports close the session; failed mutations are not replayed. Teardown is idempotent and retains pipe owners until the SDK disconnect completes, preventing an old reader from consuming a replacement session’s reused descriptors. Any failed read-only Peekaboo inspection stops its queued action plan. Argument or app-not-running RPC failures permit one fresh planner repair per user turn; permission, authentication and transport failures stop the turn with human recovery instructions. UI technical details omit structured metadata and are capped at 8 KB; full planner/debug receipts remain available. Settings → Connected apps and tools distinguishes installed configuration from an explicit connection test with actual tool count/error. The catalog includes pinned Peekaboo and Playwright helpers and Linear’s official read-only OAuth endpoint through
[email protected]; generic configured tools use their discovered schemas. Missing connections fail visibly. Configuration merges preserve user-added entries. See open-source credits.
Observation, journals, proactivity
- Watch mode: default-off opt-in for useful screen suggestions using the selected planner, with the user’s choice remembered across launches.
PaceScreenWatchModeControllersamples the cursor display every three seconds while Read My Screen, Screen Recording permission, selected-planner consent and privacy gates allow it. Initial and unchanged frames reach bothPaceScreenSuggestionCoordinatorandPaceScreenWatchNoteCoordinatorthrough one immutable observation carrying captured app provenance. Quiet notes use local Vision OCR independently of suggestion eligibility, cooldown, quiet decisions or planner errors. One actual OCR operation and one replaceable pending sample bound note work without awaiting it in the capture loop; attempts remain at least 30 seconds apart across failure and invalidation. Incoming samples emit one content-freeocr_delayeddiagnostic if an occupied attempt exceeds 12 seconds; cancellation never frees a still-running OCR slot. The existing meaningful-change publisher remains available to Companion Mode. Lock, sleep and inactive user sessions pause capture, evaluation and delivery without clearing the choice; resume requires a verified active unlocked current-user session and the same permission and consent gates. Calls, Focus and serious thermal pressure suspend capture. Explicit Watch off or Read My Screen off saves Watch off; app teardown stops only its runtime. - Screen suggestions: one latest pending sample and one cancellable evaluation, with generation checks and a minimum 60-second request interval including quiet decisions and failures. A local visual fingerprint skips planner calls for unchanged content and minor animation; the profile cooldown is checked before inference as well as delivery. Native Vision OCR is redacted and capped at 6,000 characters. Background requests send no images, never load a VLM and use an isolated selected-planner client with no silent fallback to another tier. OCR is quoted untrusted data; strict JSON permits only quiet or one grounded offer. PID, bundle ID, stable display ID, eligibility, expiry and fresh OCR evidence are rechecked before delivery. The background result never reaches the action executor. Accepted offers enter assistant-only chat/history, without episodic fact extraction, and appear in one nonactivating top-right notification with a quiet local chime once per newly delivered identifier. Explain and Draw it submit explicit topic, offer and page-excerpt requests through the shared typed conversation, preserving an unfinished draft. Dismiss acknowledges only its matching offer and stops optional Watch speech; unsafe runtime or protected-app transitions remove the popup immediately without acknowledging it. History rehydration never opens or chimes a notification. Optional speech is separately default off and uses the existing restraint and interruptible TTS path.
- Suggestion follow-up and disclosure: only delivered offers establish a session anchor, bounded to five minutes and cleared when Watch stops or the planner changes. Follow-ups such as “explain that”, “yes” and “draw it” retain the literal user transcript and receive marked untrusted observation context through the normal foreground planner routes. Pointing uses current captures. The existing screen-status dot turns yellow for unread delivered Watch offers restored from typed conversation history. Explicit interactive conversation opening, nonblank typed submission or an accepted voice follow-up saves an acknowledgement marker; hover previews, Watch pauses and bubble timeouts do not acknowledge offers. Off-device activity aggregates foreground, hosted MCP, headless calls and idempotent suggestion leases, so concurrent completion cannot clear another source’s amber disclosure. Existing planner clients retain their normal privacy audit entries; Watch logs only decision state and sizes.
- Time understanding (journals): two passive retrieval sources power Dayflow-style recall. The screen watch journal records deterministic redacted visible-text excerpts (up to 320 characters, captured app and observation time) into day-per-screen documents, including initial/stable samples when no suggestion is made. It never infers completed tasks or user intent and makes no note-specific planner/VLM/cloud request. Any sensitive-label OCR line rejects the entire persisted note, including separately boxed values. Passive screen history stays in Pace’s journal and unified local memory and is excluded from Spotlight mirroring. Startup performs a one-time purge of Pace’s own legacy Spotlight domain, then re-mirrors allowed memories; deletion and pending mirror writes are serialized, and a failed purge remains retryable. Capture/privacy gates and scene/source revisions are rechecked after OCR; source clear/off-on and runtime revocation reject suspended work. Identical excerpts have a bounded heartbeat, changed text survives same-app dedup, and accepted writes enforce 240 entries per day/display and seven distinct activity dates in persisted storage. Both lexical and unified recall quote/escape screen notes as untrusted observed evidence, select relevant excerpts within existing budgets, and reject removed/replaced history after embedding waits. Source clear/disable removes the unified projection immediately. Changed notes synchronize only the screen-history projection; unchanged notes trigger no synchronization, and permitted appends refresh in-flight recall without acting as revocations. The app usage journal (
PaceAppUsageTracker+PaceAppUsageJournal, sourceappUsageHistory) tracks foreground app minutes and switch counts through permission-free NSWorkspace notifications even when watch mode is off. Both dedupe/cap entries, rehydrate across restarts, and honor per-source enable/clear in Settings; app usage keeps its existing retention policy. A third recall source,researchHistory(PaceResearchJournal), captures each research-lane turn as a day-bucketed{question, answer}document (30-day/100-entry retention, same-day dedupe) — recorded by a strictlyisResearchTurn-guarded, non-blocking, fire-once hook at the agent-loop turn finalization (question = original transcript, answer = final spoken text) — so “what did I research about X?” answers from history and the turns are browsable in Settings → Memory → Past research. - Proactive features (opt-in): Watch and proactive surfaces pause while another process has audio input/output running and a known call app is open. Pace’s own microphone and speech process is excluded. Unavailable metadata retains the pause; exited processes are ignored. This conservative five-second metadata poll records no audio and also pauses during unrelated playback or dictation with a call app open. Browser-only calls are not identified. The menu-bar app exposes a small set of proactive surfaces gated by
PaceRestraintGate(active-call check, proactive cooldown, intent confidence). Posture watch (PacePostureMonitor), focus-fatigue nudges, calendar pre-meeting nudges, watch-mode observation nudges, and the daily weekday morning brief (PaceMorningTriageScheduler+PaceMorningBriefBuilder) all default OFF and become inert until the user enables them in Settings. When restraint says “stay quiet” the morning brief is parked on a panel card so the user never misses it. - On-device meeting notes:
PaceMeetingModeController(inPaceSystemAudioCapture.swift) captures mic + system audio as two separate tracks viaPaceMeetingAudioRecorder, segments them into attributed turns viaPaceMeetingTurnSegmenter(Accelerate RMS + hysteresis + echo trimming), transcribes each turn on-device viaPaceAudioFileTranscriber.transcribeAudioFileSegmented(WhisperKit → Apple Speech fallback), synthesizes structured notes (summary + action items + decisions) viaPaceMeetingNotesBuilderusing a privacy-pinned LOCAL planner (BuddyPlannerClientFactory.makeLocalOnlyTextPlannerForPrivacyPinnedFeatures()— never the CLI bridge or Direct API tier, regardless of the user’s tier selection), and journals them viaPaceMeetingNotesJournalinto themeetingNotesretrieval source so “what did we decide in standup?” answers from local history. Fully on-device — no cloud STT, no cloud LLM. The wedge against Granola/Otter/Fireflies (all cloud). Recording files use.part→ atomic rename with RIFF-header crash repair. See PRDdocs/product/prds/on-device-meeting-notes.mdand ADRdecisions/0001-meeting-audio-capture.md. Adaptive note profiles (meetily-informed, Pace-native — seeopenspec/changes/archive/2026-07-12-adaptive-meeting-notes): notes are shaped by a selectablePaceMeetingNoteProfile(bundledResources/meeting-note-profiles/<slug>.json— general/standup/one-on-one — plus user overrides in~/Library/Application Support/Pace/meeting-note-profiles/, loaded/validated byPaceMeetingNoteProfileLibrary). Thegeneralprofile renders byte-for-byte identical to the legacy prompt (compat anchor, default). Selection precedence: explicit selection (voice command or per-meeting panel pick) → non-general default preference → optional local inference (a silent on-device classify call, default OFF) → general. Voice-triggered: “start my one-on-one recording” / “record this standup” starts a meeting with that profile pinned —PaceMeetingModeCommandParserroutes the profile name before the recording starts. - Deeplinks and typed-turn scheduling (
pace://): external launchers (Raycast, Shortcuts) can trigger Pace viapace://listen,pace://chat?text=...,pace://watch?enabled=true|false, andpace://panel.PaceDeepLinkParseris a pure reject-on-ambiguity parser (500-char chat cap). Listen remains start-only while a turn is active. Typed chat submitted during an active turn entersPaceChatTurnQueueand drains FIFO as each complete turn returns to idle; the panel keeps optimistic user rows in order, shows the pending count, and can clear pending work without cancelling the active turn. Pace deliberately does not run complete turns in parallel because TTS, approval, conversation memory, and Mac actions share one authoritative agent loop and parallel completion would interleave user-visible effects. Each active turn owns a generation lease plus separately tracked routing and response tasks, so explicit cancellation during intent or automation discovery cannot later install stale speech or UI state. Chat/listen turns still run the normal intent/approval pipeline, so a deeplink can do nothing the user’s own voice couldn’t. URL types registered viaCFBundleURLTypes; handled inCompanionAppDelegate.application(_:open:)with pre-launch buffering.
Loop, routing, latency
- Intent routing:
PaceIntentClassifieris a tiny rule-based local classifier. It routes chitchat to a canned response, pure-knowledge to a text-only planner path, and labels screen-read, tool-action, and phone-large-model turns without paying model latency. On eligible Macs, only unmatched.unknownturns use the Apple Foundation Models classifier as a local fallback before the full pipeline. - Plan-act-observe loop:
CompanionManager.sendTranscriptToPlannerWithScreenshotruns a multi-step loop. Each step re-screenshots, re-invokes the VLM (heuristic permitting) and the planner, executes grouped tool calls/actions, returns tool observations to the next planner step, and continues until the planner emits[DONE], emits no tool calls/action tags, or hitsAgentMaxSteps(default 8). - Speculative planner race (first step only): on a screen-action / screen-description FIRST step, when
CompanionManager.speculativeRaceShouldFirepasses (race toggle on, local VLM configured, Apple FM available),performFirstStepSpeculativePlannerRacerunsPaceSpeculativePlannerRace.raceSpeculative: the in-process Apple FM “lite” planner (transcript + thread-memory only, NO VLM) races the full VLM-fed planner. The full path’s VLM+OCR+AX prep is deferred into the race’s lazy builder so it runs concurrently with lite — lite produces audio in ~150 ms while a cold VLM (2–3 s) is still resolving. Whichever streams first wins TTS; the full path supersedes the lite stream if its first token lands within 500 ms / 60 spoken chars (prepareForSupersedingStreamWithinTurnresets the pipeline so the new stream replays cleanly). Action parsing ALWAYS uses the full planner’s complete text, never lite — the lite path is spoken-feedback only and can’t emit a real action; when lite wins the audio, the lite text becomes the spoken/bubble/memory string soflushFinalcan’t double-speak.bothFailedroutes toPaceFailureNarrator. Gate false (and every multi-step turn) keeps the single-planner path byte-identical. Toggle:PaceUserPreferencesStore.enableSpeculativePlannerRace(default ON, opt-out in Settings → Planner). - Walking avatar (optional):
PaceAvatarOverlaypaints a small SwiftUI character at the bottom of the cursor screen in its own tinyNSPanel, but it is not attached at app launch. The default always-visible surface is the menu-bar/notch capsule.
Key architecture decisions
Native Surface Pattern: PaceOnboardingWindowManager hosts a versioned, resumable first-run state machine that migrates the legacy Boolean completion flag, consolidates live permission setup, and reaches one typed or spoken request through submitChatTranscriptFromDeepLink. A truthful response or completed action contracts the in-window signal toward a notch-shaped anchor before the window closes; failure and blocked outcomes do not play success. PaceMenuBarOverlayManager derives the closed Living Notch frame from NSScreen.safeAreaInsets and the two auxiliary top areas and reserves the physical camera housing between two always-visible, rounded icon caps at menu-bar height: microphone on the left and the Pace mark on the right. A 200 ms hover dwell opens the existing conversation; leaving the notch cancels a pending opening, and closing while the pointer remains over the notch requires a fresh exit and re-entry. Both icons also retain click-to-open. A bounded background geometry monitor yields the ambient controls to a native status item when app menus or status extras overlap, or their bounds are unavailable. It reads top-level bounds only, refreshes on app activation and a tolerant two-second timer, and leaves input untouched. The conversation stays camera-aligned but drops below native menu-bar layering while crowded. Active requests retain a lower activity row and amber selected-planner/capture disclosure. A deliberate click expands one black, nonactivating MenuBarPanelManager surface directly from that same top-aligned housing. PaceConversationPanelPlacement owns the physical-notch versus conventional-anchor frames; the ambient panel is hidden while the connected conversation is visible and restored after collapse. The existing PacePanelChatView renders unframed inside the expanded surface at a fixed content width while the outer window reveals it by clipping, preserving crisp text during resize. Its compact context bar keeps history and settings reachable. The panel uses Dialogue’s quiet outlined user turns and unboxed assistant replies, readable 14-point responses, a bounded latest exchange, persisted history and an always-available typed composer. Show, hide, shortcut, deep-link and smoke-test requests share this lifecycle; interrupted collapse and delayed outside-click dismissal are generation-guarded. On notchless or external-only display setups, PaceMenuBarOverlayManager creates a standard NSStatusItem, and the same requests open the panel anchored below it. The ambient and open conversation geometry and fallback choice recalculate after wake and display changes; Pace never draws a synthetic housing. PaceWindowLayering keeps the optional screen-edge activity glow below both the system menu bar and Living Notch while deliberate teaching annotations remain topmost; the glow defaults off and is transparent while idle. Delayed onboarding transitions are cancellable and generation-guarded so stale work cannot advance a newer scene.
PaceChatAppearanceStore owns one versioned, local Codable chat preference. Its bounded font, extra line spacing, padding, anchored width and control accent are shared by quick chat, Conversations and the gated chat renderer. Essentials opens an editor-local preview; only Done validates, persists and publishes the draft. Cancel, Escape and dismissal discard it, and Reset changes the draft only. Missing, corrupt or unsupported data restores the existing black defaults. Width changes resize the existing panel and hosting view within display bounds without replacing the conversation or requesting focus. Physical-notch housing/content geometry and privacy, capture, approval, error and completion colors retain their existing owners.
PaceDialogueTranscriptModel groups routine progress and action receipts only by an explicit accepted conversation turn identifier. Unlinked records retain their own compact disclosure; failures, denials, skipped actions and current approval remain visible. The mapping preserves original messages and receipt bodies without changing canonical history or planner context. PaceDialogueChatComponents shares message and activity presentation across quick chat, Conversations and the gated renderer. A bilingual reply displays its saved English text, its actual Japanese speech request and optional original together; per-message replay respects session/turn mute, the current turn lease and the existing Stop path without recording another event or changing the selected voice. Profiled streaming speech records first-audio latency at confirmed onset, independently of utterance completion.
Command Center Pattern: PaceMainWindowManager owns one normal resizable NSWindow for every durable management surface. PaceCommandCenterRouter groups primary destinations under Use Pace, Activity & Privacy, Customize, and Help, while optional integrations and developer controls use one searchable Advanced disclosure. It honors exact requested routes and restores the last valid selection. PaceSettingsWindowManager is a compatibility facade into the same window rather than a second host. The notch panel remains a present-turn surface; its gear routes to Customize → General. Pace still runs as LSUIElement=true, and the Command Center explicitly activates the app only when opened.
Native Display Routing: PaceActiveDisplayCoordinator selects one stable display ID shared by the ambient notch and conversation. App activation, active-Space changes, display changes, wake, and listen-only mouse clicks drive routing. A coalesced background AX read uses short messaging timeouts and reads only the focused window’s bounds; a focused-window observer also follows keyboard changes within the same app. Generations discard stale reads, and Pace’s own activation/focus preserves the selected display. Both windows join all Spaces and full-screen applications. Space changes reassert existing visible windows without requesting focus, reopening hidden chat, replacing its session, or restarting explanation timers. Geometry comes only from the selected display; displays without a camera housing retain the native status item and standalone conversation.
Cursor Overlay: A full-screen transparent NSPanel hosts the blue cursor companion. It’s non-activating, joins all Spaces, and never steals focus. Cursor flight, response text placement, and pointing animations render in this overlay via SwiftUI through NSHostingView; listening/thinking animation lives in the notch bar. During explicit pointing, a static click-through reticle marks the exact target independently of the decorative buddy’s offset or edge clamp; clearing the target or starting the next turn removes it. AX screen context enters as unscaled global points and converts once using the actual capture dimensions and display origin, including mixed-density displays.
Interactive visual explanations: PaceDiagramDocument contains up to twelve
semantic explanation parts and either a 1000×600 flowchart or a typed 3D figure.
For lift_system and pi_camera only, omitted nodes selects the complete
trusted catalog explanations and omitted connections selects an empty array.
Explicit fields remain authoritative and pass normal validation; null or invalid
node/connection arrays are rejected. Compact selection never supplies a lesson or
changes authored titles, summaries or narration. Input and hydrated documents both
retain the 64 KB limit.
PaceFigureScene accepts an authored aircraft template or at most 96 generated
solid parts, with bounded transforms, triangle indices and custom vertices.
The aircraft uses lofted/airfoil meshes and real control-surface hinge entities;
custom scenes compose boxes, ellipsoids, cylinders, cones and triangle meshes.
Native RealityKit owns lighting, projection, depth and collision-based selection.
Optional figure presentation commands combine a stable focusNodeID, a named
viewpoint (three_quarter, side, top, front, rear, underside) and
aircraft controlDeflection from -1 to 1. A nonzero deflection requires an explicit
aileron, elevator, rudder or flap focus. The controller owns the current slider
value; planner context reports this live value and omits old presentation commands
from its document copy so ordinary updates preserve manual orbit.
The renderer reuses geometry for focus, view and control updates, applies an
explicit viewpoint once per document revision, and preserves later manual orbit.
The selected part’s reticle follows its projected physical anchor without moving
the system cursor. These controls illustrate conceptual mechanisms, not simulated
flight dynamics.
The
show_diagram and dismiss_diagram read-only tools are available independently
of EnableActions. Both the text-only and full planner paths drain these tools
before the action executor. Conceptual explanations request an early labeled
native figure with brief narration tied to its highlighted part, reusing an
appropriate active figure. Short facts and explicit text-only requests remain
text and speech. An explicit conversation, diagram or image Close stops speech,
locks out late TTS submissions, cancels remaining work and pending queued turns,
and retains the interrupted conversation prefix. Typed dismissal intent keeps
automatic panel collapse and visual replacement from cancelling narration.
PaceDiagramOverlayController owns the persistent
figure and selection; a complete replacement keeps surviving part selection unless
the planner explicitly changes the figure’s requested focus. Its bounded document and selected part are included in later
planner context because spoken conversation history does not retain tool payloads.
A per-turn dismissal generation prevents an in-flight reply from reopening a
closed figure while allowing the turn’s own ordered close-and-replace actions.
Planner changes, Read My Screen revocation and thread reset clear the scene
and its cached prompt context.
PaceDiagramOverlayManager renders connectors in a click-through panel and each
interactive node, heading and detail card in separate nonactivating native panels.
3D objects use a bounded transparent RealityKit ARView hosted in SwiftUI, with an
explicit perspective camera, projected part callouts, native orbit, zoom,
part selection and control-surface input. Mouse interaction inside that object’s
panel belongs to Pace; the desktop remains available outside it. Flowchart gaps
remain click-through. Clicking a part reveals
local detail without a model call; the deliberate “Explore this part” button enters
submitChatTranscriptFromDeepLink, preserving the normal queue, consent, audit,
cancellation and action policy. Presentation collapses the quick panel, and
shutdown/dismissal closes every diagram panel. Screen-referential diagram requests
use the existing screen-enabled planner path; self-contained subjects use the
text-only path. Diagram instructions are enabled only for interactive planner
callers. Part follow-ups use neutral intent text; generated labels remain context
rather than becoming commands. Escape dismissal applies only to a focused diagram panel or while the pointer
is over a visible diagram part or control. No generated code, external resources or web renderer execute.
Generated images: Interactive planners can emit the typed read-only
generate_image request (prompt, title, optional edit). Both planner paths await
PaceImageOverlayController before final conversation feedback; ordinary actions
in the same plan remain available to the executor. Creation requires the selected
Codex direct CLI tier and its existing off-device consent. The capsule is amber
while generation runs, and every attempted CLI generation writes a sizes-only
planner.cliDirect audit event. Selecting another planner produces an explicit
unsupported message rather than choosing a hidden provider.
PaceCodexImageGenerationClient invokes the authenticated installed Codex CLI
with an isolated temporary working directory, ignored user rules/configuration,
no project docs, and shell, apps, browser, MCP/plugin discovery, skills and
multi-agent capabilities disabled. Native image generation and its code-mode
host remain enabled. Prompts arrive over stdin. The only supported reference is
an explicitly requested edit of the current Pace-owned image, copied to a private
per-job attachment and passed with --image; ambient screenshots and arbitrary
model-authored paths never become image inputs. A brief may still be derived
from a screen the user explicitly asked Pace to read through the normal planner
consent path; the image audit does not claim that such a brief has no screen context.
Codex can finish with no final text or typed image event. Pace reads only the
validated thread.started UUID directory under Codex’s generated-images store,
checks containment and nonsymlink regular PNG/JPEG bytes through ImageIO, and
requires one image within32MiB and32million pixels. File-descriptor traversal
rejects symlink parents; validated bytes are copied to a private Pace-owned store
before job cleanup. Output prose is never interpreted as a path or a command.
The conversation records the generated image’s preview ID and keeps a private
640-pixel thumbnail across overlay dismissal and chat reload. Clearing Pace
conversation retrieval also removes its stored thumbnails.
The cancellable300-second job presents progress immediately in a native floating
panel with transparent artwork and quiet graphite controls. Zoom and Save use
native UI. Save snapshots the validated bytes before its chooser opens, so
replacement or dismissal cannot invalidate a pending save. A failed edit retains
the previous successful image; explicit close,
thread reset, planner/provider change, consent loss, Read My Screen revocation or
shutdown invalidates in-flight results and clears active context. New diagrams
and images replace one another. Later turns receive only the active image’s
bounded title and prompt as description data, never a file path. Raster images
have no orbit or physical-part interaction. Only the controller’s exact tracked
unsaved Pace working copies are discarded on successful replacement, dismissal,
reset or a late cancelled result; a failed edit keeps the previous working copy.
Saved user destinations (including an explicit save at the working-copy URL)
and the shared Codex generated-images directory are never removed by Pace. Resetting thread memory clears Pace’s thread snapshot and active
image context, not Codex-managed artifacts or the separate conversation history.
Global Push-To-Talk Shortcut: Background push-to-talk uses a listen-only CGEvent tap instead of an AppKit global monitor so modifier-based shortcuts like ctrl + option are detected more reliably while the app is running in the background.
Transient Cursor Mode: When “Show Pace” is off, pressing the hotkey fades in the cursor overlay for the duration of the interaction (recording → response → TTS → optional pointing), then fades it out automatically after 1 second of inactivity.
Local-mode setup
See SETUP_LOCAL.md for the full recipe. The complete Info.plist switch reference (local VLM / planner / TTS-sidecar / transcription-provider knobs and their defaults) lives in ../development/info-plist-switches.md.
Everyday desktop actions and Codex sessions
The selected consented planner can compose app launches, browser/profile opens,
screenshot controls, screen-recording controls, meeting-audio controls, and
codex_session calls. These are general tools, not bundled work-startup presets.
Chrome’s saved work-profile directory is used for profile: "work" and ordinary
Chrome opens. Native screen capture still requires the user to choose a region
and press Capture/Record. Each launch preserves the native destination settings,
selects the requested mode through the native toolbar using Accessibility, and
confirms its Capture/Record label before reporting success. Immediate launch
failures are surfaced. start_recording, stop_recording, and recording_status
use PaceScreenRecordingController to record the main display with the native
screencapture utility, save locally under Pace/screen-recordings, and validate
the movie’s duration and video track before reporting a successful stop. It stops
only its owned process; shutdown requests normal recording completion.
Meeting observations report the recorder’s actual state.
codex_session validates an existing absolute or tilde-expanded directory,
resolves the installed Codex executable, writes a uniquely named Warp Tab Config,
and opens it through Warp’s URL scheme. The folder is data, not shell code;
Codex’s interactive sign-in, folder trust, and action approvals remain intact.
Warp 2026 Tab Config support is required. Pace reports launch requested rather
than claiming it inspected the terminal session.
Foreground CLI-direct planning works immediately after explicit consent. The 24-hour first-use gate remains for unattended scheduled tasks. CLI planning runs in a private temporary directory, independent of Git, with user config, shell, hooks, apps, browser, computer-use, and multi-agent tools disabled. Research explicitly enables web search. The stream runner handles UTF-8 boundaries, drains stderr to a private file, cancels the subprocess, and bounds calls with a timeout. CLI turns avoid local VLM prewarming and use permitted images plus AX/OCR context. Research and Read My Screen off skip automatic screen capture entirely. Read My Screen also gates the planner’s ambient window and accessibility sampling. Disabling it clears the planner snapshot and invalidates pending reads. Companion Mode can independently sample its explicitly enabled macOS Context source without granting the planner access. Screenless text and headless subagent requests omit that snapshot.
Lightweight computer use and text dogfood
Peekaboo 4.9.8 is the optional OSS Mac automation backend, installed through the existing MCP catalog with a pinned npm package. It needs Node 22+ and its own OS permissions; Pace does not provision another AI provider. The catalog explicitly starts mcp serve --allow-foreground so app launches and foreground UI work, with that capability disclosed on the install card and individual actions still gated by Pace approval. Existing background-only installs need removal and reinstallation from the catalog; Pace does not silently expand their configuration. Pace discovers its actual tool schemas and supplies them to the selected planner. Peekaboo observations/actions reuse one serialized MCP process because its snapshot IDs belong to that producer; changing configuration or a transport failure closes the session. Failed mutations are never replayed automatically. App exit closes owned persistent sessions. Read My Screen gates Peekaboo window inspection/control, while read-only app inventory remains available.
Text commands use the same task routing and typed execution pipeline as final voice transcripts. Implicit reusable-work execution currently requires an exact authored invocation phrase. Semantic similarity and local-model ambiguity resolution no longer authorize a saved routine; uncertain requests fall through to the selected planner. Explicit automation/catalog commands still work. Native screenshot commands open macOS controls. Explicit start/stop/status screen-recording commands use the owned recording lifecycle; opening selection controls remains a separate action.
Playwright MCP 0.0.85 supplies browser navigation, snapshots, and element actions in a separate isolated Chrome session. Its persistent producer preserves browser state across tool calls. Both Playwright and Peekaboo use the official Swift MCP SDK, pinned to revision a0ae212ebf6eab5f754c3129608bc5557637e605 for its upstream transport concurrency fix on the current Swift compiler. All configured stdio servers use that SDK transport and preserve producer state across calls.
Local speech uses WhisperKit base.en from Application Support, provisioned with python3 scripts/setup-whisperkit.py; pinned model and tokenizer assets avoid recognition-time downloads. This small default model recognises English. Bundled Silero v6 CoreML rejects silence before streaming/file decoding. Explicit read aloud using Kokoro ... starts the existing mlx-audio sidecar on demand and uses mlx-community/Kokoro-82M-bf16; ordinary voice selection stays configurable. transcribe audio <path> and check for updates reach the existing transcription and Sparkle components through the shared text/voice router. Meeting capture requests microphone access asynchronously before opening the audio engine to keep the permission prompt off the blocking device-binding path.
Native Vision OCR performs synchronous work on a detached task rather than the UI actor. CLI image planners receive screenshots plus AX context directly, so their screen turns do not wait for the local OCR/VLM path. Text-only CLI turns retain native OCR without invoking the local VLM. Screen-analysis cache reuse requires identical image bytes, analyzer identity, display geometry, and VLM/OCR capabilities; small image changes trigger a fresh read. Successful OCR remains available when VLM analysis fails. A stop-meeting text command bypasses the turn queue while capture startup is awaiting permission.
Durable read-only work and recurring assistance
Background summaries, drafts, and research persist task state and full results atomically in Application Support. Queued/running work becomes interrupted on restart and requires explicit retry from the beginning. Cancellation guards late results by execution ID. Scheduled origin survives persistence and retry; its off-device consent/24-hour gate is rechecked at execution time.
Recurring tasks preserve exact intervals or local daily times, persist the next deadline, coalesce missed intervals into one run, and prevent overlapping runs. Pause, deletion, and global disable are rechecked after asynchronous preflight. Interrupted claims require review. The Tasks surface exposes next run, errors, results, cancellation, and explicit retry. Morning briefs retain their readable card and delivered day before optional speech, with same-day catch-up on launch or wake. These background paths generate read-only results, never execute foreground mutations silently.
Requested Files, Notes, Mail, and Calendar summaries refresh their permitted sources before answering and include provenance. Disabled sources are filtered both during unified-memory sync and recall. Explicit approved file roots support PDF/RTF/text with bounded enumeration fallback when Spotlight has no index; secret paths and symlink escapes remain excluded. Missing permissions, empty accounts, and unavailable sources are reported rather than replaced by stale personal facts. Notes/Mail refresh uses only existing AppleEvents grants.
Local model provider integration
The local planner, VLM and embedder use mlx-swift-lm 3.x with a shared PaceMLXHuggingFaceIntegration adapter. Hugging Face owns snapshot caching/downloads and tokenization; Pace maps their APIs to MLX loading protocols. Complete snapshots already present in the standard Hugging Face cache or the MLX 2 Library/Caches/models and Documents/huggingface/models roots are reused without moves or downloads; partial shards, explicit other revisions and latest-refresh requests bypass legacy reuse. Planner/VLM cache hits also require a downloaded chat template; encoder-only embeddings do not. MCP launch configuration resolves only exact legacy bundled preset arguments to the current catalog versions in memory; custom launch commands, endpoints and arguments remain unchanged, and no configuration file is rewritten.
Japanese conversation practice
Japanese practice is explicitly enabled for the current app session through the existing chat header or “start Japanese practice”; “back to English”, “stop Japanese practice” and “英語に戻して” restore standard behavior. The same selected planner and action/approval loop produce one v10 envelope, with Japanese spokenText and bounded payload.englishSubtitle. The teacher prompt permits a useful transcript-based correction and follow-up, without inferring pronunciation from STT text. Practice suppresses unvalidated stream speech, the everyday-answer shortcut and the speculative English narrator. Practice-only unknown conversation defaults to the selected text-only planner without screen capture. Recognized routes, conservative Japanese/English computer and screen cues, screen suggestions and active visual context retain normal routing; standard-mode unknown policy is unchanged. The existing speech pipeline submits only the validated Japanese request to the existing Kokoro queue, respecting mute, stop and turn leases. Local command acknowledgements and safety diagnostics remain visible and are silent during practice. Existing guided diagram lessons retain their separate ordinary narration behavior.
One conversation event displays English and retains optional typed speech metadata for Japanese replay; older events decode without it. Canonical speak also accepts optional bounded englishSubtitle, used by the bundled Japanese greeting without enabling practice. No translation service or extra translation request runs. Practice requires a Japanese-capable selected local TTS backend. Its PTT capture explicitly selects multilingual WhisperKit base, with automatic language detection, preparation status and no capture before preparation completes. python3 scripts/setup-whisperkit.py --multilingual provisions that optional local model and pinned tokenizer. Runtime never downloads it; standard mode retains the configured provider and English base.en policy. Opt-in WAV qualification uses PACE_LANGUAGE_PRACTICE_FIXTURE_MANIFEST, an array of local filePath / expectedFragment pairs.