Layer 8 · place
workspace
The files an agent works on: a checkout, a scratch copy or a worktree, at a base revision. A lease names who works in it; it is requested, then granted, and an exclusive workspace has at most one live lease. Only the holder of a live lease writes, and a change leaves the workspace only as a proposal, which is merged, rejected or superseded. A proposal hands its change back as an artifact of a store (agentic.store). A workspace with no live lease may be removed; it names the archive it can be recovered from and takes no lease afterwards.
Depends on
- channel · layer 7 · 8 references
- authority · layer 6 · 5 references
- store · layer 3 · 10 references
- shared · layer 0 · 10 references
Used by
- deployment · layer 9 · 4 references
Entities
Lease
A party's right to work in a workspace until it expires.
Identified by lease_id (LeaseId).
| field | type | meaning |
|---|---|---|
workspace_id | WorkspaceId | |
holder | PartyId | |
sharing | Sharing | The workspace's sharing when the lease was requested. |
expires_at | timestamp | |
writes | integer |
More columns: swipe horizontally, or focus the table and use the arrow keys.
Relations:
workspacereferences Workspace (one, byworkspace_id)
Always holds: writes >= 0.
Lifecycle of Lease
Expired, Released.Proposal
A change leaving a workspace, made under a live lease.
Identified by proposal_id (ProposalId).
| field | type | meaning |
|---|---|---|
workspace_id | WorkspaceId | |
lease_id | LeaseId | |
proposed_by | PartyId | |
base_revision | Revision | |
change | Content | |
merged_revision | optional Revision | |
superseded_by | optional ProposalId | |
handback | optional RecordId | The artifact the change is handed back as, a record of an artifact store (agentic.). |
head_revision | optional Revision | The revision the change ends at when it was proposed. |
merged_under | optional GrantId | The standing grant under which it was merged without asking, when one was. |
More columns: swipe horizontally, or focus the table and use the arrow keys.
Relations:
workspacereferences Workspace (one, byworkspace_id)leasereferences Lease (one, bylease_id)successorreferences Proposal (one, bysuperseded_by)merge_grantreferences Grant of authority (one, bymerged_under)handback_artifactreferences Record of store (one, byhandback)
Lifecycle of Proposal
Merged, Rejected, Superseded.Workspace
One set of files at a base revision, shared as its sharing says.
Identified by workspace_id (WorkspaceId).
| field | type | meaning |
|---|---|---|
kind | WorkspaceKind | |
sharing | Sharing | |
base_revision | Revision | |
archive | optional RecordId | The record of an artifact store (agentic.) that holds the archive the workspace can be recovered from, once it is removed. |
More columns: swipe horizontally, or focus the table and use the arrow keys.
Relations:
archive_artifactreferences Record of store (one, byarchive)
Lifecycle of Workspace
Removed.Commands
CreateWorkspace
Create a workspace.
Called by: Worker.
| field | type |
|---|---|
kind | WorkspaceKind |
sharing | Sharing |
base_revision | Revision |
More columns: swipe horizontally, or focus the table and use the arrow keys.
| outcome | when | result |
|---|---|---|
created | otherwise | creates a Workspace in Ready; emits Workspace |
More columns: swipe horizontally, or focus the table and use the arrow keys.
ExpireLease
Expire a lease.
Called by: Keeper.
| field | type |
|---|---|
lease_id | LeaseId |
More columns: swipe horizontally, or focus the table and use the arrow keys.
| outcome | when | result |
|---|---|---|
unknown refused | no such Lease | Unknown: No lease has this identity. |
not-expired refused | expires_ | Not: The lease has not reached its expiry. |
expired | otherwise | moves the Lease Live → Expired; moves each Workspace with workspace_ to Ready; emits Lease |
wrong-state refused | the Lease is in a state that does not allow it | Lease: The lease is not in a state this command acts from. |
More columns: swipe horizontally, or focus the table and use the arrow keys.
GrantLease
Grant a lease. A requested lease goes live; an exclusive workspace is held by it.
Called by: Keeper.
| field | type |
|---|---|
lease_id | LeaseId |
More columns: swipe horizontally, or focus the table and use the arrow keys.
| outcome | when | result |
|---|---|---|
unknown refused | no such Lease | Unknown: No lease has this identity. |
workspace-removed refused | the Workspace of workspace_ has state == Removed | Workspace: The workspace is removed; it takes no lease. |
exclusive-held refused | the Workspace of workspace_ has state == Held | Lease: The workspace is exclusive and another live lease holds it. |
granted-exclusive | the Workspace of workspace_ has sharing == Exclusive | moves the Lease Requested → Live; moves each Workspace with workspace_ to Held; emits Lease |
granted-shared | otherwise | moves the Lease Requested → Live; emits Lease |
wrong-state refused | the Lease is in a state that does not allow it | Lease: The lease is not in a state this command acts from. |
More columns: swipe horizontally, or focus the table and use the arrow keys.
MergeProposal
Merge a proposal.
Called by: Keeper.
| field | type |
|---|---|
proposal_id | ProposalId |
merged_revision | Revision |
merged_under | optional GrantId |
More columns: swipe horizontally, or focus the table and use the arrow keys.
| outcome | when | result |
|---|---|---|
unknown refused | no such Proposal | Unknown: No proposal has this identity. |
merged | otherwise | moves the Proposal Proposed → Merged; emits Proposal |
wrong-state refused | the Proposal is in a state that does not allow it | Proposal: The proposal is no longer Proposed. |
More columns: swipe horizontally, or focus the table and use the arrow keys.
Propose
Propose a change. A change leaves the workspace of a live lease as a proposal.
Called by: Worker.
| field | type |
|---|---|
lease_id | LeaseId |
holder | PartyId |
base_revision | Revision |
change | Content |
handback | optional RecordId |
head_revision | optional Revision |
More columns: swipe horizontally, or focus the table and use the arrow keys.
| outcome | when | result |
|---|---|---|
holder-not-the-caller refused | holder != caller. | Not: Only the holder of the lease acts under it. |
no-lease refused | no Lease for lease_ | No: The proposal names no lease that exists. |
lease-not-live refused | the Lease of lease_ has state != Live | Lease: The lease is not live; it is requested, released or expired. |
not-the-holder refused | the Lease of lease_ has holder != input. | Not: Only the holder of the lease acts under it. |
past-expiry refused | the Lease of lease_ has expires_ | Lease: The lease has reached its expiry; nothing is done under it any more. |
proposed | otherwise | creates a Proposal in Proposed; emits Change |
More columns: swipe horizontally, or focus the table and use the arrow keys.
RecordWrite
Record a write. The holder of a live lease writes one path of the workspace.
Called by: Worker.
More columns: swipe horizontally, or focus the table and use the arrow keys.
| outcome | when | result |
|---|---|---|
unknown refused | no such Lease | Unknown: No lease has this identity. |
not-the-holder refused | holder != caller. | Not: Only the holder of the lease acts under it. |
read-only refused | sharing == Shared | Read: The workspace is shared read-only; nothing is written in it. |
past-expiry refused | expires_ | Lease: The lease has reached its expiry; nothing is done under it any more. |
written | the Lease is Live | updates the Lease; emits Path |
not-live refused | otherwise | Lease: The lease is not live; it is requested, released or expired. |
More columns: swipe horizontally, or focus the table and use the arrow keys.
RejectProposal
Reject a proposal.
Called by: Keeper.
| field | type |
|---|---|
proposal_id | ProposalId |
More columns: swipe horizontally, or focus the table and use the arrow keys.
| outcome | when | result |
|---|---|---|
unknown refused | no such Proposal | Unknown: No proposal has this identity. |
rejected | otherwise | moves the Proposal Proposed → Rejected; emits Proposal |
wrong-state refused | the Proposal is in a state that does not allow it | Proposal: The proposal is no longer Proposed. |
More columns: swipe horizontally, or focus the table and use the arrow keys.
ReleaseLease
Release a lease.
Called by: Worker.
| field | type |
|---|---|
lease_id | LeaseId |
More columns: swipe horizontally, or focus the table and use the arrow keys.
| outcome | when | result |
|---|---|---|
unknown refused | no such Lease | Unknown: No lease has this identity. |
not-the-holder refused | holder != caller. | Not: Only the holder of the lease acts under it. |
released | otherwise | moves the Lease Live → Released; moves each Workspace with workspace_ to Ready; emits Lease |
wrong-state refused | the Lease is in a state that does not allow it | Lease: The lease is not in a state this command acts from. |
More columns: swipe horizontally, or focus the table and use the arrow keys.
RemoveWorkspace
Remove a workspace. The workspace ends (a checkout deleted, a worktree pruned) and names the archive it can be recovered from. Refused while a lease on it is live; a removed workspace takes no lease.
Called by: Keeper.
| field | type |
|---|---|
workspace_id | WorkspaceId |
archive | optional RecordId |
at | timestamp |
More columns: swipe horizontally, or focus the table and use the arrow keys.
| outcome | when | result |
|---|---|---|
unknown refused | no such Workspace | Unknown: No workspace has this identity. |
leases-live refused | a Lease with workspace_ | Leases: A lease on the workspace is live; a workspace is removed only when none is. |
removed | otherwise | moves the Workspace Held, Ready → Removed; emits Workspace |
wrong-state refused | the Workspace is in a state that does not allow it | Workspace: The workspace is not in a state this command acts from. |
More columns: swipe horizontally, or focus the table and use the arrow keys.
RequestLease
Request a lease. The caller asks for a lease on a workspace until it expires.
Called by: Worker.
| field | type |
|---|---|
workspace_id | WorkspaceId |
expires_at | timestamp |
More columns: swipe horizontally, or focus the table and use the arrow keys.
| outcome | when | result |
|---|---|---|
unknown-workspace refused | no Workspace for workspace_ | Unknown: No workspace has this identity. |
workspace-removed refused | the Workspace of workspace_ has state == Removed | Workspace: The workspace is removed; it takes no lease. |
requested | otherwise | creates a Lease in Requested; emits Lease |
More columns: swipe horizontally, or focus the table and use the arrow keys.
SupersedeProposal
Supersede a proposal. A newer proposal replaces this one.
Called by: Keeper.
| field | type |
|---|---|
proposal_id | ProposalId |
superseded_by | ProposalId |
More columns: swipe horizontally, or focus the table and use the arrow keys.
| outcome | when | result |
|---|---|---|
superseded-by-itself refused | proposal_ | Superseded: A proposal is replaced by another proposal, never by itself. |
unknown refused | no such Proposal | Unknown: No proposal has this identity. |
unknown-successor refused | no Proposal for superseded_ | Unknown: No proposal has this identity. |
successor-not-proposed refused | the Proposal of superseded_ has state != Proposed | Successor: A proposal is replaced by a proposal that is still Proposed, not by one already merged, rejected or superseded. |
superseded | otherwise | moves the Proposal Proposed → Superseded; emits Proposal |
wrong-state refused | the Proposal is in a state that does not allow it | Proposal: The proposal is no longer Proposed. |
More columns: swipe horizontally, or focus the table and use the arrow keys.
Events
| event | fields | emitted by |
|---|---|---|
ChangeProposed | proposal_ ProposalId, lease_ LeaseId, proposed_ PartyId, base_ Revision, handback optional RecordId, head_ optional Revision | Propose |
LeaseExpired | lease_ LeaseId | Expire |
LeaseGranted | lease_ LeaseId, workspace_ WorkspaceId | Grant |
LeaseReleased | lease_ LeaseId | Release |
LeaseRequested | lease_ LeaseId, workspace_ WorkspaceId, holder PartyId, expires_ timestamp | Request |
PathWritten | lease_ LeaseId, workspace_ WorkspaceId, path Path | Record |
ProposalMerged | proposal_ ProposalId, merged_ Revision, merged_ optional GrantId | Merge |
ProposalRejected | proposal_ ProposalId | Reject |
ProposalSuperseded | proposal_ ProposalId, superseded_ ProposalId | Supersede |
WorkspaceCreated | workspace_ WorkspaceId, kind WorkspaceKind, sharing Sharing, base_ Revision | Create |
WorkspaceRemoved | workspace_ WorkspaceId, archive optional RecordId, at timestamp | Remove |
More columns: swipe horizontally, or focus the table and use the arrow keys.
Views
| view | rows | fields |
|---|---|---|
LeasesLeases | each Lease | lease_ LeaseId, workspace_ WorkspaceId, holder PartyId, sharing Sharing, expires_ timestamp, writes integer, state State |
ProposalsProposals | each Proposal | proposal_ ProposalId, workspace_ WorkspaceId, lease_ LeaseId, proposed_ PartyId, base_ Revision, change Content, merged_ optional Revision, superseded_ optional ProposalId, handback optional RecordId, head_ optional Revision, merged_ optional GrantId, state State |
WorkspacesWorkspaces | each Workspace | workspace_ WorkspaceId, kind WorkspaceKind, sharing Sharing, base_ Revision, archive optional RecordId, state State |
More columns: swipe horizontally, or focus the table and use the arrow keys.
Types
| type | is | values or fields |
|---|---|---|
PathA path inside the workspace. | an identifier or value | string |
RevisionA revision of the files, as the version control system names it. | an identifier or value | string |
WorkspaceKind | one of | Checkout, Scratch, Worktree |
More columns: swipe horizontally, or focus the table and use the arrow keys.
KPIs
2 KPIs from the KPI catalogue. A gate must be zero for a variant of an architecture to count.
Correctness
| KPI | unit | better | gate | status |
|---|---|---|---|---|
writes_without_leaseWrites to a workspace by a holder with no live lease. How: PathWritten events whose agent holds no LeaseGranted that is unreleased and unexpired at that moment. Must be 0. | count | lower | gate | planned source: research/2609.00252 |
More columns: swipe horizontally, or focus the table and use the arrow keys.
Quality
| KPI | unit | better | gate | status |
|---|---|---|---|---|
lease_wait_secondsTime a run waited for a workspace lease. How: Seconds between LeaseRequested and LeaseGranted, median and 90th percentile. | seconds | lower | – | planned source: design |
More columns: swipe horizontally, or focus the table and use the arrow keys.
Settings
The settings a part of this block carries in an architecture document. agenticspec sim check refuses any other setting (setting_unknown) and a value outside its type (setting_invalid), and a part that lacks a setting marked required in the default column; the contract copies a setting into the ports it narrows. The last rows of each table are the settings every part takes. What no setting here types (a file, a path, an audience, the use of a model) goes into the part's notes, a map with free keys and values that the check takes as written and nothing reads.
A part workspace:
| setting | type | unit | default | contract | what |
|---|---|---|---|---|---|
kind | enum Workspace: checkout, scratch_, worktree | every port | What kind of workspace the part provides: a checkout of the files, a scratch copy of them, or a worktree of a repository. | ||
sharing | enum Sharing: exclusive, shared_, shared_ | every port | Whether more than one holder may use one workspace. | ||
count | integer of at least 1 | 1 | How many copies of the part run. | ||
per | part | One copy of the part for each copy of the named part. | |||
notes | notes | Free notes on the part, a map with keys and values of any kind: what no setting of its block types. The check takes any map; the simulator, the search and the contract never read it. |
More columns: swipe horizontally, or focus the table and use the arrow keys.