Skip to main content

Briefs and reusable context

Status: Ready

Truth label: Current

Audience: Fleet operator

Reader outcome: Use briefs and reusable context in Cortex, with every control, its verification, and its limits stated.

Last verified: 2026-09-13

Open Manage Cortex > Briefs and memory. See Cortex management for search and keyboard access.

Open Chat > Briefs and memory. Save a durable brief, decision, writing preference, lesson, or rule. Each record has a title, wording, scope, applicability, processing availability, evidence references, and a revision. This workflow is separate from semantic knowledge search and approved writing examples.

Create and apply context​

  1. Choose a kind and enter the wording. New records are proposed by default and do not affect generation.
  2. Keep the current conversation restriction for a pinned brief, or clear it for reusable guidance. Optional project, voice, audience, and format restrictions narrow where it applies. Choose chat, tasks, or both.
  3. Choose local-only or local-and-cloud processing. Select Active only when the wording and applicability are ready.
  4. Save the context and activation choice. Open Preview what applies to inspect selected records, versions, text hashes, exclusions, and conflicts using the current chat settings.
  5. Start the next chat or task. Chat generation details show the applied record titles/versions and omission reasons. The Cortex task drawer shows the operator context recorded for each attempt.

The chat scope field chooses internal or an existing client scope. Its value is retained per conversation in this browser. Global context requires that scope; project context uses Central's current project-to-scope map. If a conversation's active context records link exactly one project, the resolver uses that project for project-wide guidance too. Multiple linked projects produce a visible ambiguity instead of selecting one arbitrarily. Missing Central scope information excludes project context.

Audience and format comparisons are exact after case folding. These are explicit applicability rules, not semantic relevance scores. A writing preference can be reusable for one voice and one format while a project decision remains factual context for that project. The current request remains primary.

Context from an edit​

In Voice and drafts, save your draft and correction note, then choose Propose a reusable preference. Cortex opens a proposal containing the note, draft/version reference, voice, audience, format, and provider availability. Edit the proposed wording and scope before activating it. If the note is empty, enter the reusable preference yourself. Accepting a draft or adding this proposal does not automatically create an active rule or approve a learning example.

Evidence references remain operator-supplied provenance. The interface does not claim that an arbitrary reference proves a lesson, or that a successful task proves a universally useful rule.

History, conflicts, and lifecycle​

Cortex supports create, open, edit, clone, retire, restore, export, import, delete, and paginated browsing. Every save adds a version. Conflicting saves return 409 and retain unsaved wording. Restoration loads prior wording and applicability as a proposal; review its activation choice before saving. Import creates a new proposal and does not overwrite another record or adopt imported history. Export includes the saved record and its versions, excluding unsaved edits.

A shared conflict key declares alternative guidance. More specific conversation/project/applicability restrictions win, then explicit priority. Equally ranked alternatives with different wording are excluded and reported as unresolved. Identical alternatives are deduplicated. This does not detect arbitrary semantic contradictions between records with different keys.

Retirement excludes future resolution while preserving versions. Deletion removes the canonical record and its versions. Earlier chat reports and task snapshots remain historical copies; deleting context does not rewrite them.

Chat and tasks​

Chat resolves approved context once for the request and appends complete selected records after the current request context. Briefs and decisions receive priority within a 12,000-character context allocation. A record that does not fit is omitted whole and named in the report. At most 10,000 catalog records are inspected, with an explicit limit event. This allocation bounds this context section; a complete provider/model-aware allocation across dialogue, examples, attachments, tools, and answer reserve remains separate work.

Chat-created tasks freeze context for the destination project's current scope and task applicability at dispatch. Other task entry points resolve context at attempt start through Central's verified task assignment. CLI, agentic, and legacy prompts receive it. Run metadata retains exact selected records, revisions, and exclusions. Tasks with an existing chat snapshot keep it; a later record edit does not change that saved snapshot. Tasks resolving at a new attempt start use the then-active records.

Worker provider location is not assumed from Brain's provider, so automatic task context includes only cloud-allowed records. Unavailable or incompatible context services yield an explicit context-unavailable event; existing task execution continues. General-memory exclusions also skip worker learnings/CPMI, while pinned operator context remains independently selected guidance. Worker learning search now requires the same verified source-response contract as other worker source lookup.

This adds a common lifecycle for new approved context. It does not migrate legacy Chroma rules/learnings, replace canonical CPMI files, generate session summaries, or infer lessons from task success. Those remain distinct follow-through work.

Storage and verification​

Brain stores canonical records and versions in <DATA_DIR>/context.sqlite3. The existing top-level SQLite backup includes it. There is no embedding/index projection for this context; retirement is effective on the next resolver read. Authored voice packs remain external and learned drafts remain in writing.sqlite3.

Context tests cover activation/history, stale edits, retirement/deletion, exact applicability, provider restrictions, project-scope changes/outages, declared conflicts, complete-record budgets, chat/stream prompt assembly, task dispatch snapshots, and worker attempt prompts/metadata. Worker retrieval tests cover general-memory exclusion and the source contract. Browser acceptance covers saving, preview, reload, prompt capture, retirement/restoration, conflicts, export, deletion, and import as a proposal. These use isolated content and deterministic responses, not live operator-quality judgments.

Brain context budgets now protect selected authored context inside the shared chat/tool-round input allocation and report optional material omitted around it. Worker CLI internals remain outside that allocation.

Review a preference's supporting edit​

In Voice and drafts, save the correction and explain it in Why I changed it. Propose a reusable preference opens that note as proposed wording, with the voice, audience, format and processing availability carried into the editor. Inspect linked evidence shows the original draft, exact saved wording, request, line diff, and the current draft's acceptance/learning/archive status. Review applicability before activating. Saving a proposal alone does not make it apply.

Evidence references use draft:<id>:v<revision> or context:<id>:v<revision>. They resolve exact retained versions even after newer edits. Missing or deleted versions are labeled unavailable. Other text stays a note and is never fetched as a URL or interpreted as a filesystem path. Each inspection accepts up to 20 references of 1,000 characters each. Large diffs are marked truncated.

Activating a preference and approving a writing example are separate choices. Withdrawing an example does not silently retire an independently activated preference; inspect its evidence and retire the preference in this editor when needed. The proposal is operator-led. No model-derived preference is activated by this workflow, and one correction is not treated as measured global guidance.

Named conversation snapshots preserve conversation identity and settings. Reopening the same ID keeps conversation-restricted context applicable. Copying creates a new ID and does not clone pinned context records or attachments.

Accepted research findings can open this editor as inactive proposals. Research references retain the exact finding version and inspected passages. Activation checks current acceptance; later resolutions exclude changed findings or excluded evidence with a visible reason. The wording and scope remain editable here. See research review.