The layer stack
From the bottom of the prompt up:- The runtime’s own prompt. Claude Code, Codex and the others keep their base instructions. Allternit never replaces them.
- Allternit harness layer. The session’s instructions: answer shapes, the plan or build mode contract, and how to use gizzi’s session tools.
- Bot layer. The bot’s own workspace files (SOUL.md, USER.md, AGENTS.md), which allternit-api puts into the bot’s persona text.
- Task contract. What this turn asks for.
- Brain. The model the user picked runs with all of the above.
A prompt is not a boundary
A model can ignore, forget or be talked out of any instruction. So Allternit does not rely on the prompt to keep a bot inside its limits. The rules that matter are enforced where the tool runs:- The tool broker. When a runtime asks to run a tool, gizzi answers. A bot’s allowlist and approval gates decide, or the caller asks its user (the Gizzi terminal’s permission prompt). ACP runtimes also pass the Allternit spawn gate first.
- Runtime flags. Claude Code bot turns run with settings isolation and the bot’s tool allowlist, not with Claude’s skip-permissions mode. Plan and tools-off turns on Codex run in its read-only sandbox.
How each runtime gets the layer
Each runtime entry in the runtime registry says how its layer is added, insystemLayer.via. The driver reads it with systemLayerVia() (cmd/gizzi-code/src/runtime/drivers/cli-session-flags.ts) and only ever appends.
When a turn runs on an adapter with no channel, the layer goes into the message instead. An example is Antigravity’s
--print fallback when its ACP start fails. The layer is never sent twice and never dropped.
Which runtimes are brokered
“Brokered” means each tool call the runtime wants to make reaches gizzi’s broker before it runs.toolCallsBrokered() in the same file records this per runtime.
Gizzi cannot stop a tool call on a runtime that is not brokered. Those runtimes work in the session’s folder with their own permissions, so pick a brokered runtime for a bot that must ask before it writes. When a caller that approves tools picks one of them, gizzi logs that its tools are not brokered. On a brokered runtime, gizzi never accepts a request on the caller’s behalf while the caller approves tools.