apps/web/src/lib/workspace/workspace-contract.ts and is currently at WORKSPACE_CONTRACT_VERSION = 1.
Canonical boundary
agent-workspace/ is the canonical durable adaptive state.
- Durable memory, skills, plans, evals, and artifacts remain path-backed files.
- Workspace-installed Pi resources and policy material follow the same rule: reviewable files win over caches, rows, or hidden runtime state.
scratch/is non-canonical temporary space. It can hold disposable working files, but it is not durable adaptive memory.agent-workspace/indexes/stores non-canonical projection data. Projection rows may accelerate search, health, provenance, or query flows, but canonical files still decide what Fleet Pi knows.
Accepted workspace shape
agent-workspace/manifest.json describes the workspace shape and the versioned policy of the adaptive layer. Bootstrap may seed missing artifacts later, but the names and semantics of the sections above are fixed.
Section families and kinds
Every top-level section has a kind that the workspace server enforces:| Section | Kind | Purpose |
|---|---|---|
instructions/ | canonical | Durable orientation and operational guidance that survives sessions. |
system/ | canonical | Workspace policy and system-level instructions (e.g., workspace-policy.md). |
memory/ | canonical | Durable project knowledge, daily notes, and research. |
plans/ | canonical | Explicit execution plans and backlog state (active/, completed/, abandoned/). |
skills/ | canonical | Repo-local agent skills and supporting examples/evals. |
evals/ | canonical | Checklists, scorecards, and regression-oriented evaluation material. |
artifacts/ | canonical | Durable reports, datasets, traces, and reusable outputs. |
pi/ | canonical | Workspace-installed Pi skills, prompts, extensions, and packages. |
scratch/ | temporary | Disposable working files only — never durable memory. |
indexes/ | projection | Projection / query state only — never canonical. |
WORKSPACE_SECTION_KINDS = ["canonical", "temporary", "projection"].
Workspace-installed Pi resources
The canonical home for chat-installed Pi resources is insideagent-workspace/pi/:
agent-workspace/pi/skillsagent-workspace/pi/promptsagent-workspace/pi/extensions(withenabled/andstaged/subdirectories)agent-workspace/pi/packages
Workspace policy files
The contract seeds a small set of policy files when missing. The current default issystem/workspace-policy.md, which states:
agent-workspace/ is Fleet Pi’s canonical durable adaptive state. Bootstrap should preserve user-authored files.
Bootstrap never overwrites user-authored content. It only fills in absent canonical paths and the manifest.
.pi/settings.json compatibility bridge
.pi/settings.json remains the compatibility bridge between the Pi runtime and workspace-native resources. It may point Pi at agent-workspace/pi/*, but it does not replace the workspace as the durable store.
That means:
- Committed
.pi/configuration can keep loading project-local built-ins. - Workspace-installed resources still live under
agent-workspace/pi/. - Changing the bridge must not imply changing where the canonical resource content lives.
Non-regression rules
- Never promote
indexes/rows above canonical files. - Never treat session state as durable memory.
- Never write durable memory outside of the section families above.
- Bootstrap, health, indexing, and query surfaces must remain projections — they read canonical files, they do not replace them.
- Existing canonical files under
agent-workspace/remain authoritative until bootstrap and indexing milestones land.
Related
Agent workspace
Human-facing tour of what lives in
agent-workspace/.Architecture
How the workspace, web app, and Pi runtime fit together.
Runtime SDK seams
Safe extension points for workspace bootstrap, indexing, and provenance.
Chat modes
workspace_write and resource_install in Harness mode.