Skip to content

ui-react: configure and select live-conversation personas through Settings #3617

Closed

Description

@schlessera

Out of scope

Voice cloning, adding speech providers, replacing the ordinary agent's system prompt or permissions, automatic personality inference, changing dictation, paid listening experiments, or deploying an instance. A persona is customization, never a grant of tool or data authority.

Context

The maintainer requests configurable live-conversation personas, selectable through Settings. A persona includes a voice and context/instructions that personalize manner of speech. This is separate from choosing the live provider and the ordinary task backend. Part of #54; coordinate with live-provider-default Settings #3616.

Source navigation rechecked at main 1619741f291f525d17cde4970a5ada40644117c1:

  • generationConfig / systemInstruction setup fields, packages/ui-server/src/voice/gemini-conversation.ts:137-138, uses a fixed Kore voice and host instructions.
  • model / audio / instructions setup fields, packages/ui-server/src/voice/gpt-live-conversation.ts:128-130, uses a fixed marin voice and host instructions.
  • LiveConversationOpenOptions, packages/ui-sdk/src/server/conversation.ts:191-201, currently carries no persona configuration.
  • SECTIONS (packages/ui-react/src/components/settings/settings-panel.tsx:28) and SettingsPanel (packages/ui-react/src/components/settings/settings-panel.tsx:42), provides the existing Settings frame; getSetting (packages/ui-server/src/db/settings.ts:27) and setSetting (packages/ui-server/src/db/settings.ts:44), supplies an existing operational preference store, not an already-decided persona-content storage design.

Scope

Let users configure identifiable personas, choose their voice and author personalization context/instructions, and select the persona used for live conversation through Settings. Examples of personalization dimensions are tone, brevity and manner of speech; fixtures must use the established Odysseus corpus. Wire the selected persona through the host boundary into both existing live adapters while preserving host-owned policy and history.

The maintainer has selected P1–P4 below. Complete the concrete schema, authorization, storage/persistence, lifecycle and interaction design using those branches and the coordinated Voice pane from #3616. Authored persona Markdown is the source of truth; selection is an operational preference. Provider-specific voice identifiers are not portable, and the byte ceilings are application limits rather than provider capability guarantees.

Acceptance criteria

  • The recorded design incorporates the settled P1–P4 branches below, a concrete schema/storage/authorization/lifecycle specification, editing/selection in the Voice Settings pane at 320px and desktop width, and explicit unsupported-voice/provider states. Coordinate with ui-react: configure the default live-conversation provider through Settings #3616 without inventing a circular dependency.
  • Authored personas are Markdown files at _voice/personas/<id>.md, with name/provider-specific voice configuration and plain-text personalization instructions. Operational selection uses the server's persisted settings store; no authored text or authoritative selection is placed in disposable brain.db. Specify file-write authorization, conflict/revision handling, backup and direct-file-edit behavior.
  • Omission of a per-provider voice uses that provider's default, explicitly named as the default before Start. A saved but invalid/stale voice is distinct from an omission and requires visible recovery; no silent replacement or provider switch.
  • Persona instructions have provider-specific exact UTF-8 limits: 2,000 bytes for GPT-Live, 6,000 bytes for Gemini. Over-limit combinations block Start with a clear shorten/change-provider recovery; do not truncate instructions silently. Reconcile the brief's separate character/serialized-section limits with these selected instruction-byte caps, and charge escaping/framing plus all existing orientation/history against the combined startup-context ceiling.
  • Ship only the built-in Standard persona initially. It preserves the existing default voices/instructions behavior; custom personas remain user-authored. No example style personas are installed by this feature.
  • Users can save and edit a persona's identity, voice configuration and personalization context/instructions, and select it through Settings. Saved configuration and selection survive reload/restart according to the agreed ownership scope.
  • The selected persona is visibly identifiable before Start and supplies the agreed voice and personalization configuration to each supported provider adapter. An uncustomized/default path preserves documented existing behavior.
  • Voice choices are validated against the selected provider's actual supported controls, verified against upstream documentation/installed SDK during implementation. Unsupported or stale combinations receive the agreed visible recovery behavior; no hidden provider or voice substitution is presented as the user's chosen persona.
  • Persona instructions augment the designated personalization portion without replacing host-owned delegation, permission, disclosure or historical-context rules. No persona field changes tool authority, credentials, task admission or history ownership; tests prove those structural boundaries without claiming model obedience from prompting alone.
  • Selection changes, edits and deletion have explicit behavior for active conversations. They do not rewrite any earlier provider-facing prompt, tools or messages, or silently change destination; apply through the agreed session/epoch boundary consistent with existing disclosure and Start rules.
  • Inputs are bounded and validated; unauthorized reads/writes are refused under the agreed scope. Personalization text is not rendered as executable markup or exposed in routine logs/errors. Define what personalization is sent to the provider before capture/start.
  • User-facing and integration documentation explain persona configuration, provider/voice compatibility, persistence and activation behavior.
  • _voice is added to DEFAULT_EXCLUDE.dirs (packages/core/src/lib/config.ts:525). A test proves an Odysseus persona file under _voice/personas/ is never returned by search or context assembly, and the default exclusion is documented (P5).

Verification

Use keyless schema, authorization, persistence and adapter serialization tests, asserting the actual fixed startup instructions/voice values for both adapters and byte-identical subsequent provider-facing history. Cover default, invalid, stale, missing and selected-persona edit/delete cases. Real browser tests must configure and select personas, reload Settings, show validation, and exercise Start with the selected configuration. Include meaningful failing-first/mutation evidence for persona propagation and protected host policy/history, run the provider-history guard and required PR preflight. Actual voice sound/style qualification remains separate and requires explicit bounded authorization; mocked serialization does not prove how a voice sounds.

Contract impact

Expect additive persona/settings APIs and SDK/wire configuration. Inventory and update docs/integration-contract.md and the relevant authoritative components with the implementation, preserve consumers that supply no persona, and follow CONTRACT/minor-release rules. Any breaking proposal requires the existing maintainer ruling process. Binding records: docs/decisions/live-conversation.md, docs/decisions/provider-history.md, docs/decisions/voice-permission.md (including later supersessions), and ROADMAP's Markdown source-of-truth and extension-seam rules. The storage design must distinguish authored persona content from operational preferences rather than assuming brain.db is authoritative.

No release milestone is committed by this request.

Maintainer decision — 2026-11-08

  • P1: Store authored persona Markdown at _voice/personas/<id>.md.
  • P2: An omitted voice uses and discloses the selected provider's default. An explicitly saved voice that becomes invalid still requires visible recovery.
  • P3: Keep provider-specific instruction caps: 2,000 UTF-8 bytes for GPT-Live and 6,000 for Gemini. Switching providers may require shortening a persona before Start.
  • P4: Ship Standard only initially; users create their own additional personas.

Use the existing design brief and mocks with these choices settled. Authored content stays in Markdown, selection stays in persisted operational settings, and each conversation freezes its disclosed persona at Start so later edits/select/delete cannot rewrite its provider history or alter a reconnect. Persona customization never grants authority.

The original P1–P4 scope choices above are resolved; the later amendment below introduces the remaining review questions. Retain the existing needs: design until the schema, mounted-route authorization, file-write/conflict handling, selected/missing/deleted lifecycle, exact byte accounting and Start/reconnect disclosures are reconciled and reviewed. In particular, correct the brief's claim that brain.db stores selection: the disposable content index is not the server settings store. Its character/section caps and byte-identical-history test wording must agree with the chosen provider-specific limits and startup budget reservation; byte identity is mandatory across an existing conversation, while the initial historical selection can differ when a persona consumes budget. Preserve the existing prompt/mocks and fold the amended interaction into this body before implementation readiness.

Triage 2026-11-08 at main 1619741f291f525d17cde4970a5ada40644117c1: Reconciled the later proposal without selecting open choices and refreshed moved source pointers. Existing p2 ranking and voice-epic membership remain; no release or audio qualification is inferred.

2026-11-08 decision reconciliation: incorporated the maintainer's P1–P4 selections, the Voice pane coordination and precise Markdown/operational-store distinction. Kept the existing design prerequisite for the remaining schema/lifecycle/byte-accounting review; no runtime, release or acoustic result is claimed.

Current design reconciliation (P5 ruled and design signed off below)

The latest reconciliation supersedes the earlier selection-in-brain.db claim, character/serialized-section limits and ambiguous history-identity wording. Its proposed exact schema/lifecycle is folded below; it is not a sign-off. The remaining P5 question is whether _voice/ persona instruction text is excluded from content indexing/search or indexed as ordinary content. Recommendation is exclusion, preserving authored files on disk. The maintainer must record the selected ingestion behavior and its consequences for search/context and default/config compatibility; existing underscore behavior must be verified rather than inferred. After P5, review/sign off the reconciled design and its concrete authorized write/conflict/byte-budget behavior before readiness.

Design reconciliation: schema, authorization, lifecycle and byte budget (P1–P4 applied)

This finishes the brief with the 2026-11-08 rulings applied. The editor and list mocks from that brief still stand. The Start screen is now the Start card (#3690 / #3698), where P2 is state S3, a stale voice is S3b and P3 is S3c.

Correction to the brief: the selection is not stored in brain.db. It lives in the ui-server settings store (getSetting/setSetting), which is persisted server state, separate from the disposable content index.

1. Persona file (authored source of truth, P1)

Path: _voice/personas/<id>.md, where id matches [a-z0-9-]{1,48}, comes from the file name and never changes.

---
schema: 1
name: Ithaca steward
voices:
  gemini-live: Kore
  gpt-live: marin
---
Calm, brief, plain words. Speak like a ship's steward reporting to Odysseus:
lead with what changed, then one detail.
  • name: 1–40 characters after trimming, no control characters.
  • voices: a map from provider id to that provider's voice id. Each key is optional; an omitted key means the provider's default (P2). Unknown provider keys are kept and shown as " (not on this host)".
  • Instructions: the body, with line endings normalized to LF and leading and trailing whitespace trimmed. Plain text, never rendered as Markdown or HTML.
  • Storage limit: 6,000 UTF-8 bytes of instructions. A file over that, with unreadable front matter, or with schema ≠ 1 is invalid. It is listed as "Can't be used: " and cannot be selected.
  • At most 20 personas. Files beyond the 20th, ordered by name, are listed but cannot be selected.
  • Standard is built in and read-only, with no file (P4). It has empty instructions and today's fixed adapter voices. Selecting it produces today's exact setup payload.

2. Selection (operational preference)

Selected File state Start card
standard — Standard
id valid that persona
id missing (deleted or moved outside Settings) Standard, disclosed: "Ithaca steward isn't available — using Standard". selectedMissing: true
id invalid blocking: "Ithaca steward can't be used ()", with Edit persona or Use Standard this time

3. Authorization, writes and conflicts

  • Read (GET /api/voice/personas, GET /api/voice/personas/:id): any authenticated human session. The list returns id, name, voices, the byte count of the instructions, a validity reason and the revision. Instruction text is returned only by the single-persona GET.
  • Write (PUT /api/voice/personas/:id, DELETE /api/voice/personas/:id, POST /api/voice/personas to create): the same new owner-only guard as ui-react: configure the default live-conversation provider through Settings #3616. Device, agent, worker and delegated principals get 403 with an empty body. No other auth is assumed from existing routes.
  • Write path: writes go through the brain's existing file-write path with atomic replace, so they are covered by whatever sync and backup the brain already has. There is no second store for persona text.
  • Revision = sha-256 of the file bytes. PUT and DELETE carry baseRevision; a mismatch returns 409 PERSONA_CHANGED. The editor then keeps the user's text and offers Show the newer version. Create uses an exists check and returns 409 PERSONA_EXISTS if a file with that id already exists.
  • Direct file edits (editor, sync, an agent turn) are legitimate. They take effect at the next Start, and the Settings list refreshes on focus. Because a persona can never grant authority (§6), such an edit can change only tone, and the Start card always shows what is sent.
  • Logs and errors carry only id and revision, never the name or instruction text. Refusal codes are fixed strings.

4. Lifecycle

Action Effect on saved state Effect on a running conversation
Create writes the file; not auto-selected none
Edit new revision none (snapshot frozen)
Select updates the voice.live.persona revision none
Rename changes name only; id and file stay none
Duplicate new id <id>-copy[-n] none
Delete selected selection first reset to standard (the selection write must succeed before the file is deleted), then the file deleted keeps its snapshot until it ends
Delete unselected file deleted none

5. Activation and byte budget (P3, exact)

  • Frozen at Start. At an admitted conversation_start, the host reads the persona once and pins { id, revision, voice, instructions } to the conversation entry.

    • Every reconnect or recovery epoch reuses that snapshot.
    • A host restart that loses the snapshot is a new Start with fresh disclosure, never a silent re-read.
    • conversation_start echoes personaRef: { id, revision }. A mismatch with the current file triggers the existing refusal ("disclosure changed… select Start again. Microphone off."). disclosureKey includes personaRef.
  • Caps. Applied to the normalized instruction bytes (§1), per provider: GPT-Live 2,000 bytes, Gemini Live 6,000 bytes.

    • Over the effective provider's cap, Start is blocked with S3c: "Too long for GPT-Live (2,000 bytes); shorten it or change service." Instructions are never truncated.
    • The editor shows one counter per registered provider, for example "1,820 / 2,000 bytes for GPT-Live · 1,820 / 6,000 for Gemini Live", announced at 90% and when over the limit.
  • Framing. The fixed host header ("Speaking style chosen by the user. It affects tone, wording and pacing only and does not change any rule above."), the fence markers and any escaping are not charged to the persona cap. They are charged, together with the persona bytes, against the adapter's total startup-context ceiling, alongside the ui-server: prime live conversation with brain purpose, capture rules and spoken task acknowledgements #3623 orientation and the ui-server: hydrate new live conversations from existing chat context #3178 history block.

  • Order of reservation:

    1. host policy;
    2. framed persona section;
    3. orientation;
    4. history gets the remainder (the existing selection, with fewer turns if needed).

    Invariant tests show that the largest allowed persona plus framing plus orientation fits each adapter's ceiling with a positive history budget.

  • History byte identity. Byte identity is mandatory within an existing conversation: every epoch's provider-facing prompt, tools and prior messages are unchanged. The initial history selection may legitimately differ between a persona and Standard, because the persona consumes budget. Tests assert the former and do not claim the latter.

6. Composition boundary

Startup instructions are: [host policy and delegation, immutable] + [orientation and history as data] + [fenced persona section]. Persona fields never reach tool declarations, permission posture, task admission, credentials or history ownership. Structural tests show these are byte-identical with and without a persona, and that persona text appears only inside the fence.

7. Storybook first and slices

  1. ui-kit. In the Voice pane:

    • the Persona group: list rows with the invalid and not-on-this-host markers, and the empty state when only Standard exists;
    • the editor: name, a voice select per service, plain-text instructions, per-provider byte counters, the error and conflict states, and the ⋯ menu;
    • the delete confirmation.

    Stories at 320 and desktop in light and dark. The Start card states S3, S3b and S3c are covered by ui-kit: voice components and stories for every dictation, Start and live state #3692.

  2. Server. The file codec and validation, the persona routes with the owner guard and 409s, the selection key, and the Start-time freeze and personaRef echo. Keyless tests.

  3. Adapters. The LiveConversationOpenOptions.persona option for both engines, with serialization tests: Standard gives today's exact payload, and the budget invariant holds.

  4. Integration (prerequisites: 1–3, ui-kit: voice components and stories for every dictation, Start and live state #3692 and ui-react: configure the default live-conversation provider through Settings #3616): pane and editor wiring, plus Start card data. Browser proof: create, edit, select, delete and reload; a conflicting edit; a reconnect that keeps the snapshot.

CONTRACT: additive minor: ConversationProfile.voices, LiveConversationOpenOptions.persona, conversation_start.personaRef, the persona routes, the persona field on the settings route, and hello livePersona: { selected, selectedMissing, selectedInvalid }.

Open question (resolved: exclude)

  • P5, indexing _voice/. Should persona files be excluded from the content index and search, so instruction text doesn't surface in brain search or agent context? Recommended: exclude _voice/ from indexing, keeping the files plainly editable on disk. The alternative is to index them as ordinary documents. Verify the indexer's current handling of _-prefixed folders at implementation.

Shared UI context: #3709 now supplies VoiceTab (packages/ui-react/src/components/settings/voice-tab.tsx:11) with an independent DictationSettings group. Add the live/persona groups without overwriting dictation state or its revision. #3698 owns Start-card presentation; #3616 supplies the live-service data. The source-of-truth distinction and all P1–P4 rulings remain binding.

Triage 2026-11-08 at main 8752570331ffebdbb9233196412781f6cd71f3d9: Folded the later exact schema, lifecycle and byte-accounting proposal plus P5 into the body, retaining the decision and still-required design review. Corrected the shared-pane baseline without approving indexing, a persona schema or a new live-route policy.

Maintainer decision — 2026-11-08 (P5 and sign-off)

  • P5: exclude _voice/ from the content index. Add _voice to DEFAULT_EXCLUDE.dirs (packages/core/src/lib/config.ts:525). This is needed because underscore-prefixed folders are not excluded by default today. Persona files stay in Git and plainly editable on disk, but they never appear in search, briefings or agent context. Existing brains drop them from the index on the next brain index. Document the new default exclusion with the config docs and the contract component that lists the default exclusions.
  • Design sign-off: the reconciled design in the body (§1 file schema, §2 selection, §3 owner-only authorization/revision conflicts, §4 lifecycle, §5 Start freeze and byte budget, §6 composition boundary, §7 Storybook-first slices) is approved as the implementation specification. needs: design is removed. Implementation follows the §7 slice order; the integration slice still requires ui-react: configure the default live-conversation provider through Settings #3616 and ui-kit: voice components and stories for every dictation, Start and live state #3692.

2026-11-08: recorded P5 and the design sign-off; removed needs: decision and needs: design, added agent-ready.

Activity

  1. added
    type: feat
    area: ui-sdk
    area: ui-server
    area: ui-react
    priority: p2
    needs: design
    contract
    on Nov 5, 2026
  2. schlessera commented on Nov 5, 2026

    @schlessera
    OwnerAuthor

    The requested persona includes both voice and personalization context/instructions, and must be configurable and selectable through Settings. Its ownership, content storage, lifecycle, provider compatibility and activation behavior remain to be designed; hardcoded adapter voices are not a portable persona model. Prepare a proposal here, coordinated with #3616, before implementation readiness is granted.

    Design #3617 in schlessera/brain-kit, under voice-conversation epic #54, coordinated with live-provider-default Settings #3616. Users must be able to configure and select live-conversation personas containing voice plus context/instructions for manner of speech. Persona customization is independent of the task backend and never grants authority.
    
    Read first:
    - The full bodies of #3617, #3616 and #54; architecture ruling #317 and existing-chat context delivery #3178.
    - generationConfig/systemInstruction setup, packages/ui-server/src/voice/gemini-conversation.ts:137-138: fixed Kore voice and host instructions.
    - model/audio/instructions setup, packages/ui-server/src/voice/gpt-live-conversation.ts:128-130: fixed marin voice and host instructions.
    - LiveConversationOpenOptions, packages/ui-sdk/src/server/conversation.ts:191-201: current host-to-adapter startup context.
    - SECTIONS, packages/ui-react/src/components/settings/settings-panel.tsx:27-36, and getSetting/setSetting, packages/ui-server/src/db/settings.ts:26-48: existing Settings surface and operational preference storage.
    - ROADMAP.md, What binds future work; docs/decisions/live-conversation.md; docs/decisions/provider-history.md; docs/decisions/voice-permission.md including its later supersessions; docs/plans/voice-conversation.md; docs/integration-contract.md and relevant SDK/wire/HTTP components. Verify source locations before relying on them.
    
    Problem: live voices/instructions are fixed in two adapters; Settings has no persona authoring or selection. Voice identifiers and supported customization can differ by provider.
    
    Design these decisions explicitly:
    1. Minimum persona schema: stable identity/display name, personalization context/instructions, voice configuration, defaults and bounds. Define create/edit/select and deletion/retirement behavior and whether a neutral built-in persona is needed.
    2. Ownership/read/write authorization, storage/source of truth for authored content versus operational preferences, cross-device persistence, concurrency and backup/recovery expectations. Markdown content must not become authoritative brain.db state.
    3. Shared versus provider-specific voice configuration, supported-voice discovery/validation and stale/unsupported combinations. Verify upstream/installed capabilities rather than inventing voice portability; define visible recovery without hidden substitution.
    4. Settings navigation and editing/selection flow, saved versus effective persona, default precedence and coordination with #3616. Show pending/unsaved/error/empty states and context disclosure before Start.
    5. When selecting or editing a persona takes effect, including active sessions, reconnect and deletion of a selected persona. Preserve byte-identical provider-facing history for an existing session; propose explicit session/epoch boundaries rather than rewriting prompts.
    6. How personalization is composed with immutable host-owned policy and bounded authorized historical context, with field limits, safe rendering, redacted diagnostics and testable host authority boundaries. Never treat persona text as permission or an execution instruction to the host.
    
    Requirements to hold: maintain the existing host-owned task/permission model and destination disclosure/explicit Start. No data or audio transfer from opening/saving Settings alone. Provider/voice labels must be honest about unsupported/unproven behavior. Use existing components, accessible names, keyboard/focus behavior, touch targets and legible 320px layouts. Fixtures use the established Odysseus corpus; no personal content. Voice cloning, new providers, paid experiments and replacement of ordinary agent policy are outside scope.
    
    Deliverable: a recommended design with alternatives/tradeoffs, concrete schema and persistence/auth proposal, ASCII mocks at 320px and desktop, provider/voice and lifecycle state tables, activation/consent sequence, proposed contracts and a staged testable implementation plan coordinated with #3616. Record unresolved rulings explicitly. A documented limitation or recommendation to defer a particular optional control is acceptable; removing voice or personalization instructions from the requested persona is not. Update the issue body/readiness after design review; do not implement during this pass.
    

    Navigation refresh 2026-11-08: source locations checked at main 1619741f291f525d17cde4970a5ada40644117c1. Read the later proposed design and the current issue-body approval gap together with this prompt; no open recommendation is promoted to approval.

  3. schlessera commented on Nov 6, 2026

    @schlessera
    OwnerAuthor

    Design brief: live-conversation personas (coordinated with #3616)

    Read at main: the fixed generationConfig/systemInstruction setup in gemini-conversation.ts (Kore) and model/audio/instructions in gpt-live-conversation.ts (marin), LiveConversationOpenOptions / ConversationOrientation (ui-sdk/src/server/conversation.ts), SECTIONS (settings-panel.tsx), getSetting/setSetting (db/settings.ts), disclosureKey + conversation_start (conversation-client.ts), docs/decisions/live-conversation.md (#3623 orientation, #3178 Start correction, #3200 byte ceilings).

    #3617 persona editor, delete, Start sheet and recovery states at 320
    The Voice pane with the Persona list at 320/desktop is on #3616 (same pane).

    1. Schema

    interface LivePersona {          // authored content
      id: string;                    // slug from file name, [a-z0-9-]{1,48}, immutable
      name: string;                  // 1–40 chars, no control chars, trimmed
      voices: Partial<Record<ProviderId, string>>; // per-service voice id; absent = service default
      instructions: string;          // plain text, ≤ 2,000 chars and ≤ 6,000 UTF-8 bytes; may be empty
      revision: string;              // content hash (sha-256 of the file bytes), server-computed
    }
    • Built-in standard (read-only, not a file): no instructions, voices = today's fixed adapter values. Selecting it is byte-identical to today's startup → the documented default/neutral path.
    • Max 20 personas (list stays one screen; raise later if needed).
    • Voice ids are per service, never shared. Each adapter adds voices: { id, label }[] to its ConversationProfile, a static list verified at implementation against the installed @google/genai / openai declarations and docs; no runtime probing, no invented portability.

    2. Storage, ownership, authorization

    • Authored content = Markdown in the brain (per ROADMAP source-of-truth rule), one file per persona; front matter name + voices, body = instructions. Proposed path _voice/personas/<id>.md (see P1). Git history/backup is whatever the brain already has; nothing new.
    • Operational selection = settings KV voice.live.persona = "<id>" | "standard" (brain-wide, beside ui-react: configure the default live-conversation provider through Settings #3616's voice.live.defaultProvider). Missing/deleted id → standard, reported as selectedMissing: true (Settings shows "Selected persona was removed; using Standard").
    • Read/write: Settings routes GET/PUT/DELETE /api/voice/personas[/:id] and PUT /api/settings/voice for the selection; human owner session only (same guard as the Models default); device/agent principals 403. Writes go through the existing brain file write path (atomic replace); PUT carries revision → 409 PERSONA_CHANGED on mismatch (B2 copy: newer version offered, editor text kept).
    • Edits outside Settings (editor, sync, an agent turn) are legitimate content edits; they are picked up by the next Start like any edit. Because a persona can never grant authority (§5), an agent rewriting one can change tone only; the Start sheet always shows what is sent (§4).
    • brain.db holds only the selection, never persona text.

    3. Lifecycle

    Action Effect
    Create + New persona → editor (B1) prefilled from Standard voices; Save writes file; not auto-selected
    Edit Save writes file; next Start uses new revision; running conversation unchanged
    Select radio saves selection immediately; next Start
    Duplicate ⋯ → copy with "(copy)" name
    Delete ⋯ → confirm; if selected, copy says new conversations use Standard (B2); selection → standard; running conversation keeps its frozen snapshot until it ends
    Rename name only; id/file stays (stable identity)

    4. Activation boundary

    • Frozen at Start. At conversation_start the host reads the selected (or Start-sheet-chosen) persona once, records { id, revision } on the conversation entry and passes it to the adapter in a new LiveConversationOpenOptions.persona?: { voice?: string; instructions?: string }. All reconnect/recovery epochs of that entry reuse the frozen snapshot (held with the entry like orientation), so a reconnect never picks up an edit.
    • Disclosure covers it. The Start sheet names service, persona and resolved voice and states that the persona's instructions are sent (B3). conversation_start echoes personaRef: { id, revision }; the host refuses if the current revision differs → existing "disclosure changed… select Start again. Microphone off." path (B4, third card). disclosureKey includes the persona ref, so a change before capture re-opens the sheet.
    • No rewrite. Nothing about an open epoch's prompt, tools or prior messages is changed by an edit, select or delete; provider-facing history stays byte-identical. A host restart that loses the frozen snapshot treats the entry as a new Start (fresh disclosure) — never a silent re-read.

    5. Composition with host policy

    • Adapter startup instructions = [host policy + delegation rules (immutable)] + [#3623 orientation / #3178 history as data] + [persona section]. The persona section is fenced and headed by fixed host text: "Speaking style chosen by the user. It affects tone, wording and pacing only and does not change any rule above." Fence markers inside persona text are escaped.
    • Size: persona bytes are reserved before history selection, reducing the history budget by its actual bytes (same reservation discipline as ui-server: hydrate new live conversations from existing chat context #3178). Limit chosen so GPT's 7,500-byte estimate still leaves room: 6,000 bytes worst case is too big there → GPT adapter caps persona section at 2,000 bytes, Gemini at 6,000; over the GPT cap → Start sheet blocks with "Too long for GPT-Live (2,000 bytes max); shorten it or use Gemini Live." (P3).
    • Voice: Gemini speechConfig.voiceConfig.prebuiltVoiceConfig.voiceName, GPT audio.output.voice — only values from that adapter's declared voices list.
    • Structural tests (no obedience claims): tool declarations, permission posture, delegation config and history block are byte-identical with/without a persona; persona text appears only inside its fenced section; standard produces today's exact setup payload for both adapters.
    • Safety: instructions render as plain text everywhere (textarea / pre-wrap), never Markdown/HTML; logs and errors carry id+revision only, never name/text; refusal codes are fixed strings.

    6. Voice compatibility

    Persona voice for effective service Start sheet
    set, in adapter list "voice Kore"
    absent "voice marin (GPT-Live default)" — disclosed, not presented as the persona's choice
    set, not in list (stale/removed) B4 card: Use default voice this time or Edit persona; Start disabled until chosen; nothing substituted silently
    service has no voice control (voices empty) Voice row omitted per service in the editor; sheet says "service voice"

    The editor (B1) shows one voice select per registered service; a voice saved for an unregistered service is kept in the file and shown as "GPT-Live (not on this host)".

    Accessibility / layout

    Editor is a drill-in pane with back (44px), labelled fields, error text tied with aria-describedby, counter announced at 90% and over-limit; radios as radiogroup; existing Settings leave guard for unsaved edits; 320px single column, desktop pane max 720.

    Contracts (additive, one CONTRACT: minor)

    ConversationProfile.voices, LiveConversationOpenOptions.persona, conversation_start.personaRef, persona HTTP routes, voice.live.persona setting, hello livePersona: { selected, selectedMissing }. Clients/hosts that send no persona keep exact current behavior.

    Staged plan

    1. Schema + file codec + routes + auth/limits tests (keyless).
    2. Adapter persona option for both engines + structural/serialization tests; standard byte-identity.
    3. Start-time freeze, personaRef echo/refusal, reconnect reuses snapshot.
    4. Persona group in the ui-react: configure the default live-conversation provider through Settings #3616 Voice pane, editor, delete, Start sheet rows and recovery; browser tests at 320/1280, reload persistence.
    5. Docs: user guide + integration contract. Voice sound qualification stays out (ui: qualify both live conversation engines on real devices before activation #961).

    Open decisions

    • P1 File location for persona Markdown: _voice/personas/<id>.md (proposed) vs. an existing settings/config folder convention in the brain — need the maintainer's preferred home.
    • P2 Missing per-service voice: disclose service default (recommended) vs. block Start like a stale voice.
    • P3 Per-adapter persona byte caps (GPT 2,000 / Gemini 6,000) vs. one shared 2,000-byte cap for simplicity.
    • P4 Built-in Standard as the only shipped persona (recommended) vs. shipping one or two Odysseus-neutral examples.

    Design source: Voice Settings 3616 3617.dc.html (project mockups).

  4. added
    needs: decision
    needs: design
    and removed
    needs: design
    on Nov 6, 2026
  5. schlessera commented on Nov 8, 2026

    @schlessera
    OwnerAuthor

    Decision (maintainer, 2026-11-08):

    • P1: _voice/personas/<id>.md for authored persona Markdown.
    • P2: Use and disclose the provider default for an omitted voice; an explicitly configured stale/invalid voice still needs visible recovery.
    • P3: Provider-specific instruction limits: 2,000 UTF-8 bytes for GPT-Live, 6,000 for Gemini. A provider change may require shortening the instructions before Start.
    • P4: Ship Standard only; additional personas are user-authored.

    The body and acceptance criteria now select these branches. Use the Voice pane ruled on #3616, Markdown as authored source, persisted server settings for selection, and Start-frozen persona snapshots. Correct the proposal's brain.db selection claim and reconcile its character/serialized-section limits with the chosen instruction-byte caps and total startup context.

    Remove needs: decision. Keep the existing needs: design while the concrete schema, authorization/conflicts, lifecycle and byte-budget/activation interaction are reconciled and reviewed; the existing prompt and mocks remain the starting point. No agent-ready label is added while that prerequisite remains.

  6. removed
    needs: decision
    on Nov 8, 2026
  7. 5 remaining items

  8. schlessera commented on Nov 8, 2026

    @schlessera
    OwnerAuthor

    Design sign-off: Persona group in the delivered Voice pane

    3616-3617-voice-pane.png

    The reconciliation folded into the body is design signed off: the schema, owner-only writes, sha-256 revision with 409 handling, lifecycle, freeze at Start, and byte reservation. The UI is the same under either answer to P5: indexing changes search and agent context, not the pane. P5 stays with the maintainer (needs: decision kept).

    Fit to #3709's VoiceTab

    • Placement: Persona is the third independent group, after Dictation and Live service (ui-react: configure the default live-conversation provider through Settings #3616). It has its own routes (/api/voice/personas…) and the persona field on the settings route with its own revision. A persona 409 or save error affects only this group.
    • Rows:
      • 52 px radio rows: Standard ("built in · default voices") first, then the user's personas in name order.
      • Each row's mono meta shows the per-service voices and the byte count, for example "Kore · marin · 412 bytes".
      • At 320, each row has a 44 px ⋯ menu (Edit, Rename, Duplicate, Delete). Desktop shows a visible Edit text button.
    • Below the rows:
      • With only Standard: the line "Only Standard so far. Personas you add appear here."
      • Always: + New persona (44 px row).
    • Invalid or excess files are listed with "Can't be used: {reason}". They cannot be selected and still offer Edit.
    • Editor: unchanged from the brief. Name, one voice select per registered service (with "Service default (Kore)" as the omitted choice, P2), plain-text instructions, and one byte counter per service, announced at 90% and when over. A conflict keeps the user's text and offers Show the newer version.
    • Accessibility: a radiogroup named "Persona". The ⋯ button is named "More for Ithaca steward".

    ui-kit slice (one addition)

    Same list as the reconciliation. Added: the full-pane story with all three groups (shared with #3616), in light and dark at 320 and desktop.

    needs: design removed. needs: decision stays for P5 only.

  9. removed
    needs: design
    on Nov 8, 2026
  10. uploads-sh commented on Nov 8, 2026

    @uploads-sh

    3616-3617-voice-pane.png
    Voice pane with Dictation, Live service and Persona groups at 320 and desktop

    3617-persona-start.png
    Persona editor, errors, delete, Start sheet naming service/persona/voice, recovery states at 320

    View on uploads.sh

    uploads put <file> --issue 3617 · docs

  11. added
    agent-ready
    and removed
    needs: decision
    on Nov 8, 2026
  12. schlessera commented on Nov 8, 2026

    @schlessera
    OwnerAuthor

    Decision (maintainer, 2026-11-08):

    • P5: exclude _voice/ from the content index. Add _voice to DEFAULT_EXCLUDE.dirs (packages/core/src/lib/config.ts:525). This is needed because underscore-prefixed folders are not excluded by default today. Persona files stay in Git and plainly editable on disk, but they never appear in search, briefings or agent context. Existing brains drop them from the index on the next brain index. Document the new default exclusion with the config docs and the contract component that lists the default exclusions.
    • Design sign-off: the reconciled design in the body (§1 file schema, §2 selection, §3 owner-only authorization/revision conflicts, §4 lifecycle, §5 Start freeze and byte budget, §6 composition boundary, §7 Storybook-first slices) is approved as the implementation specification. needs: design is removed. Implementation follows the §7 slice order; the integration slice still requires ui-react: configure the default live-conversation provider through Settings #3616 and ui-kit: voice components and stories for every dictation, Start and live state #3692.
  13. self-assigned this
    on Nov 10, 2026
  14. schlessera commented on Nov 10, 2026

    @schlessera
    OwnerAuthor

    Claiming for implementation (claim token p3617-cc1e), branch feat/3617-live-personas. Scope: persona schema/storage, routes and owner-only authorization, SDK/wire (persona option, personaRef, hello livePersona), adapter wiring into Gemini Live and GPT-Live, the Persona group in the existing Voice pane, P5 _voice exclusion, and contract docs. Start-card presentation (S3/S3b/S3c) stays with #3698. #3616 is being worked in parallel and touches the same pane/settings store; I'll merge main and adapt if it lands first.

  15. schlessera commented on Nov 10, 2026

    @schlessera
    OwnerAuthor

    Maintainer answers (2026-11-10) to three wire questions the signed-off design left open, recorded before implementation:

    1. Stale saved voice, one-time default (S3b). conversation_start.personaRef gains optional voice: "default". Without it the host refuses a stale saved voice with CONVERSATION_PERSONA_VOICE; with it the Start uses the service default. Nothing is substituted silently.
    2. Profile shape. LiveConversationProvider and ConversationProfile gain three flat optional fields: voices, defaultVoice and personaInstructionBytes. They are excluded from the disclosure a Start must echo, so legacy clients keep starting.
    3. Refresh. An additive live_persona server frame carries a fresh LivePersonaStatus to human sessions after any persona write or selection, and to the refusing socket just before a personaRef mismatch refusal.
  16. added this to the 0.45.0 milestone on Nov 10, 2026
  17. schlessera commented on Nov 11, 2026

    @schlessera
    OwnerAuthor

    Delivered in #3955, merged as e3bf372 (milestone 0.45.0); it is on main. Main's own CI run for that commit was still in progress at closure.

    For #3698 (Start card): read root.connection.conversation.state.livePersona (LivePersonaStatus). providers[serviceId] gives voice, voiceSource (S3), staleVoice (S3b), overLimit and maxInstructionBytes (S3c). selectedMissing and selectedInvalid cover the missing and invalid files. Start echoes personaRef. Send personaRef: { id: "standard", revision: "builtin" } for Use Standard this time, and add voice: "default" for Use the default voice this time. The refusal codes are CONVERSATION_PERSONA_CHANGED, CONVERSATION_PERSONA, CONVERSATION_PERSONA_TOO_LONG and CONVERSATION_PERSONA_VOICE. ConversationProfile carries voices, defaultVoice and personaInstructionBytes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

agent-readyarea: ui-reactarea: ui-sdkarea: ui-servercontractpriority: p2type: feat

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions