Cortex voice and draft workflow
Status: Ready
Truth label: Current
Audience: Fleet operator
Reader outcome: Use cortex voice and draft workflow in Cortex, with every control, its verification, and its limits stated.
Last verified: 2026-09-13
Open Manage Cortex > Voice and drafts. See Cortex management for search and keyboard access.
Implemented 2026-09-08 as the first working slice of the feature plan. This is retrieval from approved examples, not model training.
The next slice adds Compare writing in Cortex Chat: versioned evaluation cases, three writing setups, blind operator review, and saved comparison evidence. It does not automatically change the operator default.
Use it
- Open Cortex Chat. Choose Use operator default or an explicit voice. Audience and format are optional writing context fields. The selected reasoning lens remains independent.
- Choose Edit and teach under an answer. Cortex opens the original text beside an editable draft and retains the original request, conversation/turn identity, voice, and generation report where available.
- Edit the wording and label its audience, format, topic, and correction reason. I accept this wording records acceptance. Use this as an approved example for future writing is a separate learning choice. Select local-only or local-and-cloud availability.
- Save. The result names its saved version and learning state. Ready means the approved example was indexed. Withdrawn means it is excluded from the learning index. Pending means the draft was saved but indexing needs a retry. The editor never claims that saving alone proved retrieval.
- Use Preview examples for a writing request to inspect the exact selected IDs, reasons, and text for the draft's settings and current chat provider. A later matching chat uses the same example retrieval service.
Voice and drafts opens saved drafts independently of the browser's chat history. It also offers Add my writing for an operator-authored sample. Reopening a draft restores its saved content, context, version, and consent. Restoring old wording creates an unsaved successor; review and save it as a new version.
Uncheck learning approval and save to withdraw an example. Archive also excludes it from learning. Canonical approval and revision checks prevent an old index entry from being used after withdrawal, including when index cleanup fails. Existing drafts and generated answers remain historical records. Delete draft and history removes that Studio draft and its versions, while previous chat answers and trace records remain separate histories.
Export the draft and versions as JSON, or download the current wording as Markdown. A conflicting edit returns a conflict and preserves the current editor text. Reload the saved version or export/copy your unsaved wording before replacing it.
Voices and defaults
Use Create or edit a voice profile to load an existing definition, change its name, description, or instructions, or create a new ID. Each instruction is one line; the existing pack schema permits up to eight instructions of 300 characters each. Reserved default and none definitions cannot be overwritten. Use a new ID to create an operator voice from a reserved definition.
Profiles remain TOML files in the configured external operator pack. Cortex validates them with the existing loader, checks the pack revision, writes through temporary-file replacement, and reloads the active registry. Existing user-defined profiles are edited in the configured pack that supplies their definition. New profiles go in the primary pack. Unrelated pack files are preserved. Adding a register updates the manifest through the existing TOML emitter; that manifest's comments and formatting may be normalized.
Save default persists the operator choice on Brain. A chat request with an explicit voice_register wins; an omitted/null register uses the saved operator default, then existing configured fallback behavior. Use configured default removes the operator override. The browser no longer applies an invisible voice default from localStorage. Explicit conversation controls persist in the conversation cache and named snapshots. Chat defaults manages the wider provider, lens, source, writing and polish defaults with effective preview and history. If an externally removed profile invalidates the saved default, the Studio names the problem and still permits reset or replacement.
Complete pack import/export, static-sample and style-rule editing, and profile/lens retirement and history now ship in Voice pack management. Source-library and group/lens editing now ship in Sources. Profile exports contain the editable definition; they are not complete pack backups.
Briefs and memory now manages persistent context and scoped preferences. A saved draft can open a proposed preference using its correction note and version reference. Activation remains explicit.
Learning and execution
Approval, exact voice, provider eligibility, and an explicitly supplied format filter apply before the retrieval limit. Audience compatibility and canonical draft revision checks are applied to candidates, with backfill up to 4,096 candidates. Up to three examples are supplied to the prompt. The generation report includes selected example IDs, draft revisions, and selection reasons. A loopback or explicitly declared local Ollama endpoint can use local-only examples. Declare LAN hosts through Local models in Cortex; undeclared endpoints and hosted providers require cloud-allowed examples.
Brain-created Forge tasks carry a JSON writing snapshot with the resolved voice instructions, lens/source-group definition, audience, format, and eligible retrieved examples. Its content hash identifies the snapshot. Only cloud-allowed retrieved examples are forwarded because the worker engine may differ from the Brain provider. The task, worker prompt, and Cortex task drawer retain the snapshot. Queued follow-ups inherit it. Chat task creation now inherits project supervision when no override is requested.
This transport records lens groups and individual source choices. Managed worker retrieval now applies the assigned task's saved policy through Brain; see the source workflow. Direct task forms and schedules do not yet offer the full writing-management form.
The optional polish pass remains off by default. Its editor receives the original request and a bounded reference to the selected examples. Exact fact locks now also cover common outcome verbs such as succeeded/failed, approved/rejected, and increased/decreased. These are deterministic regression protections, not a general semantic-equivalence guarantee.
Storage and deployment
<DATA_DIR>/writing.sqlite3 owns draft records, immutable draft versions, learning consent, projection status, and the operator default. Chroma remains the derived retrieval store for Studio examples. Legacy voice examples remain readable through their existing collection and API; this release does not migrate all older records into the new database. The existing backup script discovers top-level SQLite databases, so writing.sqlite3 is included. External profile files still require the operator content backup.
Brain's Compose voice mount is now writable so Cortex can save profiles. Preflight and the other content mounts retain their current access. The data root remains the existing named volume; workers remain native. Existing containers need recreation to apply the changed mount. This implementation task does not recreate the live stack or edit the operator's live pack.
Verification and remaining evaluation
The regression suite exercises draft creation retries, version conflicts, immutable originals, approval and withdrawal, index outages, provider restrictions, contextual selection/backfill, default inheritance/reset, profile validation, and task snapshot transport. A chat assembly test verifies that a saved example reaches a subsequent prompt and disappears from future learning injection after withdrawal.
The browser acceptance script is tests/browser/writing-studio.mjs. It uses the real Cortex UI and an isolated API from tests/writing_browser_server.py, with deterministic embeddings and no live generation. Run the fixture server with the repository Python environment, then run the browser script with Playwright available. PLAYWRIGHT_MODULE, BROWSER_CHANNEL, and WRITING_TEST_API can select the installed runtime/browser and reachable fixture address. The fixture server supports WRITING_TEST_HOST and WRITING_TEST_PORT; its defaults are loopback and port 18081.
Behavioral tests do not establish better personal voice or detector outcomes. The comparison workflow now records blind preference, edited wording, self-reported editing time, and mechanical checks. Authentic held-out cases and repeated operator review are still needed to measure improvement. Broader evaluation, remaining pack activation controls, contextual preferences, and source/context work remain in S0/S1/S2.
Writing modes and turn inspection adds explicit operator-perspective drafts, shared stream/non-stream assembly, and inspection/export of actual allocated inputs and retained polish versions.
Conversation workspaces can pin an explicitly accepted draft version for later revisions. This choice is separate from learning approval.
Polish meaning review now shows before/after clauses, request coverage, optional local model checks and operator judgments. Meaning-change judgments become editable private regression cases; example learning still requires the existing approval controls.
Reply ratings records good voice, generic phrasing, wrong tone and other reasons against each retained chat turn. Cortex filters, corrects, exports and deletes these judgments independently of learning approval.