Workspace Spec
The workspace spec (workspace.yaml) is the kernel-level configuration file that defines the runtime environment for a LumenFlow workspace. It declares which packs are loaded, which lanes exist, what security boundaries apply, and where events and memory are stored.
Full Schema
Section titled “Full Schema”Root-Level Fields
Section titled “Root-Level Fields”All ten root keys recognized by the kernel’s WorkspaceSpecSchema:
| Field | Type | Required | Managed By | Description |
|---|---|---|---|---|
id | string | Yes | workspace-init | Unique workspace identifier |
name | string | Yes | workspace-init | Human-readable workspace name |
packs | PackPin[] | No | pack:install | Array of pack pins to load |
lanes | LaneSpec[] | No | lane:edit | Array of lane definitions |
policies | object | No | policy:set | Workspace-level policy overrides |
security | object | No | security:set | Workspace-level security config |
software_delivery | object | No | config:set (pack config) | Software Delivery pack configuration (see below) |
control_plane | object | No | config:set (writable root key) | Control plane connection and sync settings |
memory_namespace | string | No | config:set (writable root key) | Namespace for memory layer isolation |
event_namespace | string | No | config:set (writable root key) | Namespace for kernel event stream isolation |
Key categories
Section titled “Key categories”Root keys fall into three categories based on how they are modified:
- Writable root keys —
control_plane,memory_namespace,event_namespace. These can be written directly withconfig:set. - Pack config keys — Keys like
software_deliverythat are declared by a pack’sconfig_keyfield in its manifest. Written withconfig:setand validated against the pack’s config schema. - Managed root keys —
id,name,packs,lanes,policies,security. These require dedicated CLI commands (shown in the table above). Runningconfig:seton a managed key produces an error with guidance on which command to use instead.
Pack config keys
Section titled “Pack config keys”When a pack declares a config_key in its manifest, that key becomes a valid root-level field in workspace.yaml. For example, the Software Delivery pack declares config_key: software_delivery, which makes the software_delivery root key available.
The software_delivery field is optional. If the Software Delivery pack is not pinned in the packs array, the workspace boots without it. This allows workspaces that use other domain packs (or no packs at all) to operate with a minimal kernel-only configuration.
Pack Pins
Section titled “Pack Pins”Each entry in the packs array is a pack pin — a versioned, integrity-checked reference to a domain pack that the kernel loads at startup.
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Pack identifier (e.g., software-delivery) |
version | string | Yes | Semantic version (e.g., 0.1.0) |
integrity | string | Yes | sha256:<64-hex> hash or dev for local development |
source | string | Yes | One of local, git, or registry |
url | string | No | Source URL (required for git and registry sources) |
registry_url | string | No | Override the default pack registry URL |
Integrity Verification
Section titled “Integrity Verification”The integrity field ensures packs cannot be tampered with. It uses the same sha256:<hex> format as Subresource Integrity (SRI):
sha256:<64-char-hex>— Production mode. The kernel verifies the pack manifest hash matches before loading.dev— Development mode. Skips integrity verification for local pack development.
Lane Definitions
Section titled “Lane Definitions”Each entry in lanes defines a lane at the kernel level (separate from delivery lane definitions under software_delivery.lanes.definitions).
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Lane identifier (kebab-case, e.g., framework-core) |
title | string | Yes | Human-readable name (e.g., Framework: Core) |
allowed_scopes | ToolScope[] | No | Scopes this lane grants (defaults to []) |
wip_limit | integer | No | Maximum concurrent active tasks |
policy_overrides | object | No | Lane-level policy configuration |
The lane’s allowed_scopes are used as the second level of the scope intersection algorithm:
Security
Section titled “Security”The security object defines the workspace-level permission boundary — the outermost layer of the scope intersection.
| Field | Type | Required | Description |
|---|---|---|---|
allowed_scopes | ToolScope[] | Yes | Maximum permissions any tool can receive |
network_default | string | Yes | Default network posture: off or full |
deny_overlays | string[] | Yes | Glob patterns for unconditionally denied paths |
Scope Types
Section titled “Scope Types”Scopes can be path or network types:
Network scope schema
Section titled “Network scope schema”The network scope posture field accepts three values:
| Posture | Description |
|---|---|
off | All network access blocked |
allowlist | Only traffic to listed hosts/CIDRs is permitted |
full | Unrestricted network access |
When posture is allowlist, the allowlist_entries field is required:
| Field | Type | Required | Description |
|---|---|---|---|
allowlist_entries | string[] | Yes (when posture=allowlist) | Array of permitted host:port or CIDR entries |
The kernel validates that allowlist_entries is present and non-empty when posture is allowlist. Omitting it or passing an empty array produces a Zod validation error at startup.
Network scopes participate in scope intersection across all four layers (workspace, lane, task, tool). See the scope intersection page for the deny-wins semantics and entry-level set intersection behavior.
Deny Overlays
Section titled “Deny Overlays”Paths in deny_overlays are unconditionally denied regardless of scope intersection. The kernel checks these before any other authorization step:
Validation
Section titled “Validation”The kernel validates workspace.yaml against WorkspaceSpecSchema (defined in @lumenflow/kernel) at startup. Invalid specs cause initializeKernelRuntime() to throw with a Zod validation error.
Relationship to software_delivery
Section titled “Relationship to software_delivery”The software_delivery root key is a pack config block owned by the Software Delivery pack. It exists in workspace.yaml only when the pack is pinned and declares config_key: software_delivery in its manifest.
| Concern | workspace.yaml top-level (kernel) | workspace.yaml > software_delivery (pack) |
|---|---|---|
| Audience | Kernel runtime | CLI and tooling layer |
| Lanes | LaneSpec (id, scopes, wip) | Lane definitions (name, code_paths) |
| Packs | PackPin (id, version, integrity) | Not present |
| Security | Scope intersection boundaries | Git hooks, safe-git wrapper |
| Gates | Pack policies (on_completion) | Gate commands (format, lint, test) |
| Validation | Zod WorkspaceSpecSchema at init | Pack config schema via config:set |
Next Steps
Section titled “Next Steps”- Kernel Runtime — How the workspace spec is loaded and used
- Packs — Domain pack architecture and the Software Delivery Pack
- Scope Intersection — How workspace security becomes effective permissions
- Configuration —
software_deliveryconfiguration reference