openspec/initiatives/context-store-and-initiatives/direction.md
Status: historical beta direction.
This document preserves the earlier context-store and workspace direction from the workspace/initiative discussion. It is useful transition evidence, but it is not the current product authority for the simplification work.
For current direction, start with:
openspec/work/simplify-context-and-workspace-model/goal.mdopenspec/work/simplify-context-and-workspace-model/roadmap.mdThe main historical shift captured here was that "workspace" should not be the durable shared planning object. In this earlier model, the durable shared object was a synced context store, and initiatives were one opinionated collection inside it.
Context Store
= synced shared content container
Collection
= mounted content system inside a store
Initiatives
= first major collection for cross-team implementation context
Workspace
= local working view over context stores and repos
Change
= repo/team-owned implementation plan
The clean rule:
Context stores sync truth.
Collections shape truth.
Initiatives coordinate work.
Workspaces open local views.
Changes implement repo-owned slices.
The workspace-to-initiative pivot was the product boundary for this beta coordination work:
This supersedes the older model where a workspace-level changes/ tree owned
the canonical shared plan for cross-repo work. Existing workspace-planning
behavior can remain as beta or legacy infrastructure, but it should not steer
new lifecycle design.
Workspace roadmap disposition:
workspace update.The primary user experience for initiatives is expected to be agent-driven:
Using initiative billing-launch, explore the API work and create a proposal.
The user should not need to know every command. OpenSpec should expose small, structured CLI primitives that an agent can use to:
The CLI is therefore the agent's tool surface, not the whole user workflow.
Prefer explicit, machine-readable commands such as initiative show --json,
new change --initiative ..., and workspace local-view commands over broad
interactive flows as the first slice.
Canonical initiative context should stay in the context store. Repo-local changes should reference the initiative rather than checking in copied snapshots of initiative prose. If an agent needs a compact context pack, OpenSpec can generate that as command output from the live initiative context.
A context store is the shared/synced folder of files. It is content-agnostic. It should not know what an initiative is.
Example:
acme-context/
initiatives/
decisions/
api-catalog/
playbooks/
The first backend should be Git:
create/update/delete files
-> commit
-> push
-> other users pull
-> local views update
But the application should talk to a store abstraction, not directly to Git, so the backend can later become a cloud database.
A backend provides persistence and sync for a context store.
Examples:
git backend: local clone, pull, commit, push, watchcloud backend: database records, subscriptions, hosted syncmemory backend: tests and local prototypesThe backend should expose generic file/object operations:
read
write
delete
list
sync
watch
It should not contain initiative-specific behavior.
A collection is a mounted content system inside a context store. It is plugin-like, but "collection" is the user-facing term.
Each collection owns:
Example:
context-store/
initiatives/ # Initiative collection
decisions/ # Decision collection
api-catalog/ # API catalog collection
Core should enforce that a collection only writes inside its mount.
The initiative collection is the first enterprise-oriented collection.
An initiative is shared, agent-consumable implementation context for a coordinated outcome. It can span teams, repos, services, APIs, contracts, and capabilities.
Default shape:
initiatives/
launch-billing-flow/
initiative.yaml
requirements.md
design.md
contracts/
decisions.md
questions.md
tasks.md
This describes the runtime initiative collection shape in context stores. This
roadmap folder may still contain legacy .initiative.yaml progress metadata
while the initiative itself is being used to manage the migration; that legacy
tracker is not the model new context-store initiatives should copy.
The default structure should be opinionated for the enterprise design partnership, but the collection system should allow other structures later.
Initiatives should own implementation-relevant shared context:
Initiatives should not try to become all of Jira or Confluence. The focused positioning is:
OpenSpec stores agreed implementation context.
Jira tracks work.
Confluence stores broad prose.
GitHub/GitLab store code.
An initiative can span one or many OpenSpec changes.
Those changes may live:
The initiative stores shared coordination context. Workspace views can associate that context with local repos and repo-owned changes without making the initiative store machine-local checkout links.
This keeps grouping separate from storage:
Initiative = shared grouping/context
Change = execution artifact
Workspace = local opened view of initiative + repos
A workspace is a local working view, not the source of truth.
It can map context stores and project identifiers to local paths, configure an opener, and launch coding agents with the right folders visible.
A workspace can open an initiative by resolving:
The durable workspace record should stay tiny and private. It records this runtime's local view choices, not generated agent files or shared initiative content.
getGlobalDataDir()/workspaces/<workspace-name>/
workspace.yaml
The workspace name is the local identity. The workspace record can optionally store a selected context store and initiative, plus stable link names to local paths and opener preferences. Initiative references are data inside the record, not path segments.
Opening a workspace materializes opener-specific runtime files at the managed workspace root. Those files can contain generated agent guidance, skills, and editor workspace files. Machine-readable context is returned by JSON command output. These are regenerated local support, not source of truth.
private local view record
-> generated runtime files
-> opener-specific launch
-> initiative context + selected local repos/folders
Workspaces should be regenerable and runtime-specific. They should not be the canonical home for initiative content, checked-in collaboration state, branches, worktrees, clones, or implementation progress.
Repo-local changes remain the team-owned implementation plan.
An engineering team should be able to pull relevant initiative context into a repo and create a linked OpenSpec change.
Example:
repo/
openspec/
changes/
add-billing-api/
.openspec.yaml
proposal.md
design.md
specs/
tasks.md
The local change should reference the initiative in metadata, for example:
initiative:
store: platform
id: billing-launch
This metadata is durable repo context and should be checked in. It should not contain machine-local paths. Agents should read the initiative's canonical files from the registered context store when they need the shared context.
Context Store
contains Collections
Collection
defines structure/rules for a mounted folder
Initiative Collection
defines initiatives/
Initiative
coordinates one shared outcome
Workspace
opens local views of context stores and repos
Repo Change
implements one team's/repo's part of an initiative
End-to-end flow:
Product/program/architect creates initiative
-> initiative syncs through context store
-> engineers open local workspace
-> repo team pulls relevant initiative context
-> repo team creates linked OpenSpec change
-> repo team implements locally
-> workspace view surfaces local progress alongside initiative context
The app should use dependency injection:
const store = createStore({
id: "acme-context",
backend: gitBackend({
remote: "[email protected]:acme/context.git",
localPath: "~/.openspec/stores/acme-context",
autoSync: true,
}),
collections: [
initiativeCollection({ mount: "initiatives" }),
],
});
Usage:
const initiatives = store.collection("initiatives");
await initiatives.create({ id: "launch-billing-flow" });
await initiatives.update("launch-billing-flow", patch);
await store.sync();
Important separation:
Git backend knows Git.
Store knows sync/lifecycle/events.
Collection knows content structure.
Initiative collection knows initiatives.
The UI should be content-agnostic at the core:
Collections can add richer views:
The UI should work no matter which collections are mounted.
context, store, or something more product-facing?After the initial store, collection, and initiative create/list foundations, build the next slices in this order:
initiative show --json and
registered-store lookup.--initiative.initiative resolve; local path mapping belongs to
workspaces, not initiative commands.