Skip to main content

Manage voice packs in Cortex

Status: Ready

Truth label: Current

Audience: Fleet operator

Reader outcome: Use manage voice packs in Cortex in Cortex, with every control, its verification, and its limits stated.

Last verified: 2026-09-13

Open Chat > Voice and drafts > Voice packs, samples, rules, and history. This manages external operator packs and their complete content. It complements the quick profile editor and the learned-draft workflow in Cortex writing.

Create, activate, and order packs​

Open Pack directories and active order inside Voice and drafts. Enter an absolute directory on the Brain host and choose Create empty inactive pack, with a unique ID and name. Initialization requires a new directory outside the repository and runtime data. Or register an existing valid external pack. Both actions leave the pack inactive so its content can be inspected, imported or authored before use.

Select a registered pack, toggle its active state, and move it earlier or later. Preview lists the effective packs, shadowed IDs, voices and lenses. Apply to persist the reviewed order. Later active packs override earlier definitions; built-in defaults load first. Current default protection rejects a configuration that removes the selected default voice or lens. Deactivating preserves authored files and content history. Inactive packs remain available in the full-content editor.

History restores a saved configuration into the editor for preview and reapplication. Packs registered since that version remain inactive. Unregister inactive directory, keep files removes its current configuration entry while retaining external content. Register that directory again to recover it. A missing inactive directory can be unregistered without disrupting the other packs. This action does not clean up content snapshots.

Before the first Cortex configuration save, VOICE_PACK_DIR and VOICE_PACKS supply the initial order. Afterward, voice-pack-settings.json under the Brain data root is authoritative for that host, with versioned history. The API reports bootstrap paths separately. Changing environment pack paths does not silently replace saved Cortex choices. An initial server connection and filesystem visibility are still required; paths refer to the serving Brain host. Other Brain processes reload saved settings at startup or through their existing reload path.

Review and apply changes​

  1. Open the destination pack. Built-in definitions can be inspected and exported; author changes in an external operator pack.
  2. Select a resource: voice profiles, reasoning lenses, static writing samples, style vocabulary/limits, or the pack's evaluation corpus.
  3. Open an item, edit its fields, and choose Keep item changes in editor. A new profile ID clones the definition. Removal changes the editor until you apply the pack. Corpus editing uses the existing JSON structure corresponding to its TOML file.
  4. Select Validate and preview pack changes. The preview names changed sections and added, changed, or removed profiles/lenses. Invalid IDs, values, references, and stale versions prevent publication.
  5. Select Apply reviewed pack. For an active pack, the serving Brain reloads the validated voices, examples, and rules for subsequent requests. An inactive pack saves its contents without activating them. An in-flight request retains its already resolved context. Other Brain processes still require their existing reload path.

Static samples in an active applied pack are approved writing examples. Review the request, operator wording, category, and local/cloud availability before applying. A sample's paragraphs are entered one per line. The existing pack limits and trusted-content validation remain enforced. New or edited samples overlapping retained held-out evaluation writing are rejected; unchanged legacy samples remain in the pack but are excluded by comparison-time leakage filtering. Dynamic draft examples retain their separate approval, history, and index in the Studio.

Style controls include filler openings, banned wording, separate polish-gate and evaluation hedge lists, punctuation handling, and sentence/paragraph limits. They use the same rules loader as the live linter and voice revision gate. Applying rules does not measure improved voice quality or guarantee detector results.

Retirement, history, and restoration​

Use a profile or lens's Retired checkbox to keep its definition while preventing new selection. Retired voices also stop supplying static examples. Choose another operator default before retiring its voice. A configured default lens must be changed before retirement. Saved tasks and completed comparisons retain their frozen context and evidence.

Retirement does not delete approved drafts, historical answers, or evaluation records. Restoring the definition makes it selectable again. Removing a definition entirely can expose an override from an earlier pack; retirement is the explicit way to keep that ID unavailable.

Each distinct content snapshot is retained in the external pack's .cortex-history directory. Quick profile and lens saves also capture complete pack snapshots. Select a version and restore it into the editor, then validate and apply it. Restoring content does not rewrite prior comparison records. Identical restored content shares its previous content hash; this history records distinct contents rather than every button click.

A full-pack publication writes new content files under .cortex-versions, then switches the manifest with one atomic file replacement. Failed publication restores the prior manifest. External edits change the content revision and stale Cortex writes fail with 409. Existing individual profile edits keep their narrow file writer. History snapshots retain authored content independently of those working files. Generated-file paths and TOML formatting may change on a complete save; unrelated unreferenced files remain in place.

Select where a static sample applies​

The static sample editor now includes audience and format lists, an optional scope, a retirement switch, and a provenance/review note. Empty audience/format lists and an empty scope retain the existing broad applicability. A nonempty field requires a case-insensitive exact match; if the current request has no value, a restricted sample is excluded. Category remains descriptive and does not silently become a matching rule.

Set audience and format in the Chat controls and scope in Chat scope. The selected voice supplies only samples matching those values and the local/cloud availability rule. The active voice instructions still apply when all optional samples are excluded. Generation settings name excluded samples and their reasons. The selection is resolved once per request and is also used by its optional polish pass.

Retire a sample to stop future selection while retaining its content in history and exports. Review notes stay metadata and are not inserted into the model's style guidance. Whole-pack JSON and CLI TOML exports preserve these optional fields. Older pack readers that reject unknown keys require the current loader before reading authored applicability fields.

Writing comparisons match the case's audience and genre. They carry no client scope, so scoped samples are excluded. Their manifest records exclusions. A queued comparison detects changed sample metadata; legacy queued snapshots remain valid when newly introduced optional fields retain their empty defaults. These controls improve selection, but authentic evaluation and operator preference evidence still determine whether writing improves.

Import and export​

Export complete saved pack downloads the portable agent-asian-voice-pack-v1 JSON bundle and its content revision. It includes the manifest metadata, profiles, lenses, full static samples with provider availability, style rules, and optional tone corpus. Unsaved editor changes and learned-draft records are excluded. The CLI's agent voice-pack export also now preserves effective operator style rules and corpus rather than substituting built-in files.

Import pack into editor replaces the editor's content, retaining the destination pack ID. Review all content before applying. Cortex removes reserved none and default definitions when importing a built-in export; those remain supplied by the built-in pack. Referenced source groups must exist before applying changed lenses. Import does not trust supplied filesystem paths or overwrite the destination immediately. The editing limit is 2 MB per bundle.

An export captures the selected pack's own definitions. Other configured packs can override them according to existing load order. The pack list reports shadowed IDs. Use the live selector and generation report to inspect the effective voice. The configuration editor manages initialization and active order separately from these content changes.

Storage, tests, and remaining work​

Retain external pack files, .cortex-history, and .cortex-versions with the operator content backup. The runtime SQLite backup does not include them. Historical snapshots and superseded content consume disk until a separate cleanup workflow removes them. This implementation does not change live operator content or restart services.

Pack tests cover full restoration, conflicts, retirement/default protection, held-out writing restrictions, failed publication, history from quick profile edits, and effective-rule export. Browser acceptance covers profile creation, static samples, rules, preview, apply, retirement/restoration, reload, and complete export/import through real Cortex forms and an isolated fixture API.

Snapshot cleanup and contextual preference suggestion/management follow-through remain tracked. Configuration history is retained without automatic deletion. Authentic held-out writing and operator review remain necessary to establish writing-quality gains.

Pack lifecycle tests in tests/test_pack_lifecycle.py and tests/browser/pack-lifecycle.mjs cover inactive authoring, preview, persistence, ordering, default protection, deactivation, and registration boundaries. Back up voice-pack-settings.json with runtime settings and pack contents separately.

tests/test_sample_applicability.py and tests/browser/sample-applicability.mjs verify audience/format/scope selection, provenance persistence, retirement, actual chat prompt inclusion/exclusion, and comparison/export compatibility.