Skip to main content

Brain as a reasoning and retrieval service

Status: Ready

Article ID: 021

Truth label: Current

Audience: New builder

Reader outcome: Explain what Brain owns, how it prepares a chat response, and which execution and state responsibilities belong elsewhere.

Related articles: 002, 007, 031

Target week: 09

Last verified: 2026-09-13

Technical reviewer: Codex source audit

Editorial reviewer: Codex editorial audit

Give Brain a precise job​

Brain is the chat, retrieval, memory, and response-shaping service. It accepts a question, selects the requested model configuration, gathers bounded context, runs the chat tool loop, shapes the answer, and records the completed turn. It also exposes the knowledge, CPMI, rules, feedback, conversation, and chat-trace APIs used by the rest of the system, and the editors behind the Manage Cortex menu: sources and research, writing drafts and voice packs, briefs and memory, chat defaults, local processing hosts, and context budgets.

Brain does not claim tasks, lease work, decide checkpoint transitions, or run a coding engine inside a repository. Forge Central owns task truth. Workers own execution. Cortex displays and controls those services through their APIs. Keeping these boundaries clear prevents a helpful chat answer from being mistaken for an authorized change.

Follow one chat request​

For a normal or streaming chat request, Brain performs a recognizable sequence:

  1. Resolve provider and model.
  2. Resolve the reasoning lens and voice register from active voice packs.
  3. Retrieve eligible voice examples and tone rules matching the active register.
  4. Search relevant memory, influence books, and project-memory records.
  5. Label retrieved material as untrusted evidence.
  6. Run the provider-backed tool loop.
  7. Lint the output and optionally run the local revision pass.
  8. Record settings, retrieval provenance, usage, and turn lineage.

Each step has a different purpose. Retrieval supplies evidence. A lens supplies trusted analytical guidance from the active voice pack directory. A voice register changes expression. The built-in pack ships baseline definitions only, while user-supplied influence books are configured through an influence pack. None of them grants permission to edit a repository.

Treat retrieval as evidence​

Brain can search general knowledge, prior conversations, learnings, rules, voice examples, and canonical project memory. Search rank is not authority. The chat pipeline places retrieved text inside an explicit untrusted-context boundary so instructions found in a document do not automatically become system instructions.

Current scope filtering is stronger than a global unfiltered search, but the security boundaries still list incomplete client-isolation paths. Use Brain within the trusted operator boundary until every retrieval and direct-read path shares one enforced scope gateway.

Know when Forge should take over​

Use Brain to explain a problem, compare options, find relevant records, or prepare a bounded brief. Use Forge when the intended outcome requires a task state, an assigned worker, a lease, an execution engine, verification, or a checkpoint decision.

A practical handoff contains the desired outcome, repository, limits, verification command, and supervision mode. Brain can help draft that handoff. Forge and the worker make it operational and traceable.

Draw the boundary yourself​

Take one request such as “repair the failing import test.” Mark each part:

  • Brain can retrieve the related decision and explain the likely cause.
  • Forge can create and track the task.
  • A worker can open the repository and run the selected engine.
  • Cortex can show progress and collect an approval.

If one component appears to own all four actions, revisit the architecture.

Current limits​

Brain sends prompts and selected context to the chosen provider. Cloud providers are external data processors. Retrieved content can be stale or malicious, and current client-scope enforcement is not complete across every read path. Brain guidance is not execution authority or proof of correctness.

Next lesson​

Continue with Stream a Brain response.

Derivative map​

  • Weekly package: WEEK-09
  • Long video: VIDEO-W09-LONG
  • Shorts: SHORT-W09-PROBLEM, SHORT-W09-MECHANISM, SHORT-W09-WARNING
  • Email: EMAIL-W09
  • LinkedIn: LI-W09-A, LI-W09-B
  • X: X-W09-A, X-W09-B
  • Visual: VISUAL-W09

Review record​

  • Brain, Forge, worker, and Cortex ownership checked against current architecture and runtime source.
  • Retrieval trust, provider egress, and client-scope limits reviewed.
  • Example is synthetic and grants no execution authority.
  • Internal links and repository voice reviewed.

Review completed: 2026-09-03

Re-audited against the running product: 2026-09-13