-
Notifications
You must be signed in to change notification settings - Fork 0
primitives
Nik edited this page Aug 6, 2026
·
1 revision
Domain types that every Foundry surface shares. They live in apps/desktop/src/shared/types.ts as the contract between main and renderer. Engine code implements their behaviour; the UI only ever sees these shapes over IPC.
| Primitive | Role |
|---|---|
| Phase | One step in a pipeline: agent, code, or engineer. Status lifecycle and earned success. |
| Envelope | Typed JSON report from an agent phase. Zod schemas, kind-specific fields, schema-generated prompt examples. |
| Gate | Post-envelope check that returns evidence (GateCheck[]), not a bare verdict. Six builtins; unknown names fail. |
| Pipeline | Ordered PhaseDef[] plus an acceptance criterion and optional isolation flag. |
| Agent | Roster entry: model, effort, prompts, tools, write boundary, envelope kind. |
- A phase is born fail. Success is earned by a clean finish (plus envelope and gates for agent phases).
- Code owns the loop. Agents work inside one phase; the engine owns sequencing, retries, and acceptance.
- Typed seams. Context crosses phases only as validated envelopes (and handoff files).
-
Gates return evidence. One
GateCheckper examined item; a green gate says what it verified. - Write boundaries are enforced after the call by diffing git status, not by trusting the agent.
Overview
Snapshot and history
How to contribute
Apps
Systems
Features
Primitives
Background and security
Reference