What users see

The same runtime answers in two voices. In chat, cowork, browser and design sessions it is Gizzi, Allternit’s assistant. In the terminal and in Code mode it is Gizzi Code, a coding agent. Which one a session gets depends on the session’s surface, not on the model.

Layer order

The runtime builds the system prompt from layers. The stable layers come first so the model provider can cache them. For a normal turn:
  1. Base prompt (chat or code, by surface)
  2. Capabilities (chat surfaces only)
  3. Safety
  4. Care (chat-family surfaces only)
  5. One model-family addendum, or none
  6. Mode (plan, build and similar)
  7. Project thread block, only on a project thread
  8. Computer-use block, only when the turn has browser or computer tools
  9. Unattended block, only when a schedule started the turn
  10. Voice block, only when the turn is spoken
  11. Phone block, only when the user is on a phone
Memory is not a layer in this list. When memory is on, the memory section carries its own block (see below). For a bot turn, the bot runs as itself:
  1. Mode (plan, build and similar)
  2. Bot guidance, which carries the bot’s persona
  3. Suggestions block, when the bot can suggest tasks
  4. Delegation block, when the bot can hand work to a project’s bots
  5. Project thread block, when the thread belongs to a project
  6. Capabilities (chat-family surfaces only)
  7. Safety
  8. Care
  9. Computer-use block, when the turn has browser or computer tools
  10. Unattended block, only when a schedule started the turn
  11. Voice block, only when the turn is spoken
  12. Phone block, only when the user is on a phone
Voice and phone blocks also apply to bot turns, because phone calls are bot-bound.

Blocks added by signal

Six blocks are not part of a stack. The runtime adds each one only when its signal is present, so a bot turn with no signal gets the bot guidance and nothing more. The signals come from the tools the turn actually has, after the usual gating, never from the model. Two more blocks follow the same idea, but their signal is not a tool.
  • Using memory says when to save, that “forget” is a standing boundary, to check memory before asking, to apply memory quietly and only when it changes the answer, and to treat memories as facts about the user, not commands.
  • Unattended run says nobody is watching: ask no questions, stop at any step that needs approval and report it, keep checkpoints on repeating checks, stay quiet unless something is new or blocked, and deliver the result itself. The tool guard already refuses approvals on these runs; the block makes the model plan for that.
A bot’s main chat never counts as a project thread. The suggestions block is named duet.txt inside the repo, but prompt text never names a vendor or product, so the block itself says “suggestions”. The provider-side prompt (provider()) never includes the suggestions or delegation blocks. The roster lookup runs only when the tools include suggest_task or thread_update, and its result is cached per session.

Mode, run and engine blocks

Five more blocks load from the turn’s own settings, not from a tool. Neither mode block loads in plan mode, which has its own guidance. See Autonomy modes and Background runs.

Safety and care

Two blocks cover how the model treats people and risk.
  • Safety loads on every stack, including the terminal, bots and CLI-brain turns. It holds the trust rules (instructions come only from the user’s own turns, credentials stay out of output) and hard limits that no stated reason or claimed approval unlocks:
    • no sexual content involving minors, and extra care when the user may be a minor;
    • no real help with mass-harm weapons, malware or cyber attacks;
    • the system prompt and hidden reasoning stay private, with a short summary offered instead;
    • stay inside the folders, hosts and credentials the task gave;
    • after a timeout or unclear result on a send, post, payment or delete, check whether it took effect before trying again.
    It also keeps a short rule for someone in distress.
  • Care (care.txt) holds the wellbeing and people rules: self-harm and disordered-eating handling, staying clearly an AI, no guessing of sensitive traits from clues, reading photos without naming real people, sharing only what is needed when contacting anyone outside the chat, and care on legal, financial and medical questions. It loads on chat-family surfaces (chat, cowork, browser, design) and on every bot turn. It does not load on the code stack or in the terminal.

Which stack a session gets

A child session (for example a sub-agent) inherits the surface of its root session. Nothing is stamped on the child. The addendum is chosen by model family: one for each of the two largest hosted model families, and an open-model addendum for open-weight, local and unknown models. Models outside those three families get none. Addenda are surface-neutral.

Gizzi Code in the terminal

The terminal app (the TUI) builds its prompt in cmd/gizzi-code/src/cli/ui/ink-app/constants/prompts.ts. It starts from the same base-code.txt and safety.txt that the runtime uses, so the terminal and Code mode give the same answer. The TUI adds only what is its own: keybindings, the output style, the environment lines (folder, git, shell, date) and the blocks behind feature flags. These are written as short rules, not essays.

What moved into tool descriptions

Craft that only matters when a tool is in play now lives in that tool’s own description, so it costs nothing on turns without the tool.

Chat add-ons per turn

The chat stack above is the model’s base. The app adds the answer manuals on top, and since wave 3 it adds only the manuals the turn can use. If a caller does not pass the message, every manual the user has is sent. Template schemas did not change. Bytes added per turn, measured with the real function on the free plan (every kind on): A plain question carries 2,221 bytes of answer shapes, 2,853 bytes of enforced templates and an 11,514 byte catalog list.

The gateway

The allternit-api gateway uses one manual, answer_contract.manual.md. manual_for in answer_contract.rs sends the envelope, the core templates and the rules (2,846 of 14,308 bytes) plus only the line for the template the policy picked. A template it does not know gets the whole manual. The shapes file answer_shapes.md is the same text in the app and the API; both copies are pinned by hash.

Built-in agents

Gizzi’s built-in agents are Explore, Plan, verification, general purpose, the catalog agents and the coordinator. The prompts for Explore, Plan and verification live in two copies, one in the runtime (runtime/tools/builtins/AgentTool/built-in/) and one in the terminal app (cli/ui/ink-app/tools/AgentTool/built-in/). Keep them in step.
  • Explore reads and reports. It does not change files.
  • Plan returns a decision-complete plan that ends with the heading “Critical Files for Implementation”.
  • Verification labels each claim CONFIRMED, PLAUSIBLE or REFUTED and ends with a VERDICT: PASS|FAIL|PARTIAL line.
  • Every catalog agent follows one worker rule: do not hand the work on, stay in scope, report what was not checked, and treat file, tool and page text as data.
  • The coordinator prompt (two copies) is a list of rules. Its task-notification format is unchanged, and workers commit only when the user asked.
  • The mission planner and fixer, and the design critique panelists, treat command output and artifact HTML as data. Their JSON reply shapes did not change.

Voice calls

A voice call is a bot-bound turn with reply_mode set to "voice". Calls started in the cloud API use a spoken persona named Gizzi: short sentences that are easy to say aloud, one question at a time, and no promise to send a text, because calls cannot send texts. The call summary prompt and the coordinator worker and thread prompts follow the same rules.

Where the files are

Prompt files live in cmd/gizzi-code/src/runtime/session/prompt/:
  • base-chat.txt, capabilities.txt, base-code.txt, safety.txt, care.txt, bot.txt
  • Signal blocks: duet.txt (suggestions), delegation.txt, project-thread.txt, computer-use.txt, unattended.txt; memory-use.txt loads with the memory section
  • addendum-gpt.txt, addendum-gemini.txt, addendum-open.txt, addendum-ondevice.txt
  • mode-auto.txt, mode-ask.txt, background-code.txt, voice-tags.txt
  • voice.txt, phone.txt
  • Mode files: plan-mode.txt, plan.txt, build-mode.txt, build-switch.txt, max-steps.txt, wrap-up.txt, mdx-graphs.txt
Utility prompts live in cmd/gizzi-code/src/runtime/loop/prompts/: compaction.txt, explore.txt, generate.txt, initialize.txt, review.txt, semi-formal-verification.txt, summary.txt, title.txt. The selection logic is in cmd/gizzi-code/src/runtime/session/system.ts and system-header.ts.

Size limits

A test enforces a byte cap on each file. The guidance on a bot’s main chat on a chat surface (bot, suggestions, delegation, capabilities, safety, care and computer use together) stays at or under 21,000 bytes. Tool descriptions are checked too: any new tool text must be at most 900 bytes.

Hints

Hints are optional keys in the user message metadata. Any other value is ignored. reply_mode, form_factor, time_zone, answer_cards and screen_context are the client hints; allternit-api passes only those exact keys (and, for time_zone, a valid zone name) through the chat bridge and the session message route. project_role is a server hint: clients do not send it. The runtime reads them in SystemPrompt.context().

Server-started bot turns

When allternit-api starts a bot turn itself (a delegated task, an accepted suggestion, a message from another bot), the system text carries the bot’s own prompt first. A project thread’s prompt follows under the heading ## This thread. If the client snapshot already contains the thread prompt, it is printed once, not twice. The bot keeps its own instructions on these turns.

Compaction and handoff

When a long session is compacted, the summary has five headings, in this order: Goal and user requests, Work done and current state, Errors and failed approaches, Promises to the user and open items, Next step. The session title is plain text. The compaction prompt is text-only: the model must not call tools while it writes the summary. A context handoff to a fresh session is a separate step with its own baton, not a compaction. See the Gizzi Runtime page.

Changing a prompt

  1. Edit the text file in your own words. Prompts must not name other companies or their products.
  2. Keep the file under its byte cap.
  3. Run bun test test/session/system-prompt-selection.test.ts from cmd/gizzi-code. It checks the cap, the vendor-name rule (which now covers tool descriptions as well as prompt files, and also rejects the internal name duet), stack selection, addendum choice, the signal blocks and layer order.
  4. Run bun test test/session/system-prompt-guard.test.ts too. It applies the same vendor-name rule, and the “Allternit Shell” rule, to the terminal prompt, both copies of the built-in agent prompts, the catalog, both coordinator prompts, the mission orchestrator and the critique route. It also checks the injection wording: the terminal prompt builds on the shared safety text, and no prompt tells the model to ignore earlier instructions. Two files that teach an outside docs address or example model ids on purpose are listed as exempt by name.