Workspace operations / Capability contract
Workspace Intelligence Chain V1
Defines the versioned workspace intelligence chain v1 boundary used by Workspai and its consumers.
- Schema version
workspai-workspace-intelligence-chain-v1- Contract path
contracts/workspace-intelligence-chain.v1.json- Publication
- json-schema
- Defined fields
- 161
- Artifact bindings
- 0
Why this contract exists
Architecture role
Defines a versioned interoperability boundary used by Workspai and contract-aware consumers.
Consumption boundary
- • Workspai CLI
- • Workspace Intelligence consumers
- • IDEs and agents
Related commands
Commands are linked only when the runtime contract identifies a direct production relationship. Supporting contracts may be consumed without having a single producer command.
Produced artifacts
These durable files are emitted by registered commands and validated against this contract.
No canonical file artifact is registered for this contract. It may describe capabilities, embedded data, runtime exchange, or supporting state instead of a standalone report.
Field reference
Every declared schema property or published capability path is listed here. Required means the contract declares or publishes that field at the shown boundary.
| Field path | Type | Required | Meaning | Constraints |
|---|---|---|---|---|
| auxiliaryCapabilities | array | Yes | Published auxiliarycapabilities capability data. | — |
| auxiliaryCapabilities[] | object | Yes | Published auxiliarycapabilities[] capability data. | — |
| auxiliaryCapabilities[].chainStep | boolean | Yes | Published chainstep capability data. | — |
| auxiliaryCapabilities[].commands | array | Yes | Published commands capability data. | — |
| auxiliaryCapabilities[].commands[] | string | Yes | Published commands[] capability data. | — |
| auxiliaryCapabilities[].id | string | Yes | Published id capability data. | — |
| auxiliaryCapabilities[].reads | array | Yes | Published reads capability data. | — |
| auxiliaryCapabilities[].reads[] | string | Yes | Published reads[] capability data. | — |
| auxiliaryCapabilities[].role | string | Yes | Published role capability data. | — |
| boundaries | object | Yes | Published boundaries capability data. | — |
| boundaries.consumers | array | Yes | Published consumers capability data. | — |
| boundaries.consumers[] | object | Yes | Published consumers[] capability data. | — |
| boundaries.consumers[].channels | array | Yes | Published channels capability data. | — |
| boundaries.consumers[].channels[] | string | Yes | Published channels[] capability data. | — |
| boundaries.consumers[].id | string | Yes | Published id capability data. | — |
| boundaries.consumers[].label | string | Yes | Published label capability data. | — |
| boundaries.inputs | array | Yes | Published inputs capability data. | — |
| boundaries.inputs[] | object | Yes | Published inputs[] capability data. | — |
| boundaries.inputs[].entersAt | string | Yes | Published entersat capability data. | — |
| boundaries.inputs[].id | string | Yes | Published id capability data. | — |
| boundaries.inputs[].label | string | Yes | Published label capability data. | — |
| boundaries.inputs[].sources | array | Yes | Published sources capability data. | — |
| boundaries.inputs[].sources[] | string | Yes | Published sources[] capability data. | — |
| boundaries.outputs | array | Yes | Published outputs capability data. | — |
| boundaries.outputs[] | object | Yes | Published outputs[] capability data. | — |
| boundaries.outputs[].artifacts | array | Yes | Published artifacts capability data. | — |
| boundaries.outputs[].artifacts[] | string | Yes | Published artifacts[] capability data. | — |
| boundaries.outputs[].id | string | Yes | Published id capability data. | — |
| boundaries.outputs[].inventory | string | Yes | Published inventory capability data. | — |
| boundaries.outputs[].inventoryContract | string | Yes | Published inventorycontract capability data. | — |
| boundaries.outputs[].label | string | Yes | Published label capability data. | — |
| boundaries.outputs[].producedBy | array | Yes | Published producedby capability data. | — |
| boundaries.outputs[].producedBy[] | string | Yes | Published producedby[] capability data. | — |
| consumers | object | Yes | Published consumers capability data. | — |
| consumers.agents | object | Yes | Published agents capability data. | — |
| consumers.agents.canonicalReadOrder | array | Yes | Published canonicalreadorder capability data. | — |
| consumers.agents.canonicalReadOrder[] | string | Yes | Published canonicalreadorder[] capability data. | — |
| consumers.agents.entrypoints | array | Yes | Published entrypoints capability data. | — |
| consumers.agents.entrypoints[] | string | Yes | Published entrypoints[] capability data. | — |
| consumers.agents.rule | string | Yes | Published rule capability data. | — |
| consumers.docsAndDiagrams | object | Yes | Published docsanddiagrams capability data. | — |
| consumers.docsAndDiagrams.rule | string | Yes | Published rule capability data. | — |
| consumers.ideAndCi | object | Yes | Published ideandci capability data. | — |
| consumers.ideAndCi.requiredArtifacts | array | Yes | Published requiredartifacts capability data. | — |
| consumers.ideAndCi.requiredArtifacts[] | string | Yes | Published requiredartifacts[] capability data. | — |
| consumers.ideAndCi.rule | string | Yes | Published rule capability data. | — |
| contractPath | string | Yes | Published contractpath capability data. | — |
| deliveryChannels | array | Yes | Published deliverychannels capability data. | — |
| deliveryChannels[] | object | Yes | Published deliverychannels[] capability data. | — |
| deliveryChannels[].authority | string | Yes | Published authority capability data. | — |
| deliveryChannels[].carries | array | Yes | Published carries capability data. | — |
| deliveryChannels[].carries[] | string | Yes | Published carries[] capability data. | — |
| deliveryChannels[].id | string | Yes | Published id capability data. | — |
| diagram | object | Yes | Published diagram capability data. | — |
| diagram.direction | string | Yes | Published direction capability data. | — |
| diagram.edges | array | Yes | Published edges capability data. | — |
| diagram.edges[] | object | Yes | Published edges[] capability data. | — |
| diagram.edges[].from | string | Yes | Published from capability data. | — |
| diagram.edges[].meaning | string | Yes | Published meaning capability data. | — |
| diagram.edges[].to | string | Yes | Published to capability data. | — |
| diagram.nodes | array | Yes | Published nodes capability data. | — |
| diagram.nodes[] | object | Yes | Published nodes[] capability data. | — |
| diagram.nodes[].id | string | Yes | Published id capability data. | — |
| diagram.nodes[].label | string | Yes | Published label capability data. | — |
| diagram.nodes[].phase | string | Yes | Published phase capability data. | — |
| feedback | object | Yes | Published feedback capability data. | — |
| feedback.from | array | Yes | Published from capability data. | — |
| feedback.from[] | string | Yes | Published from[] capability data. | — |
| feedback.reentersThrough | array | Yes | Published reentersthrough capability data. | — |
| feedback.reentersThrough[] | string | Yes | Published reentersthrough[] capability data. | — |
| feedback.rule | string | Yes | Published rule capability data. | — |
| feedback.signals | array | Yes | Published signals capability data. | — |
| feedback.signals[] | string | Yes | Published signals[] capability data. | — |
| invariant | string | Yes | Published invariant capability data. | — |
| invariants | array | Yes | Published invariants capability data. | — |
| invariants[] | string | Yes | Published invariants[] capability data. | — |
| name | string | Yes | Published name capability data. | — |
| presentations | object | Yes | Published presentations capability data. | — |
| presentations.advanced | object | Yes | Published advanced capability data. | — |
| presentations.advanced.requiredFields | array | Yes | Published requiredfields capability data. | — |
| presentations.advanced.requiredFields[] | string | Yes | Published requiredfields[] capability data. | — |
| presentations.advanced.rule | string | Yes | Published rule capability data. | — |
| presentations.advanced.steps | array | Yes | Published steps capability data. | — |
| presentations.advanced.steps[] | string | Yes | Published steps[] capability data. | — |
| presentations.simple | object | Yes | Published simple capability data. | — |
| presentations.simple.layers | array | Yes | Published layers capability data. | — |
| presentations.simple.layers[] | string | Yes | Published layers[] capability data. | — |
| presentations.simple.nodes | array | Yes | Published nodes capability data. | — |
| presentations.simple.nodes[] | object | Yes | Published nodes[] capability data. | — |
| presentations.simple.nodes[].contractRefs | array | Yes | Published contractrefs capability data. | — |
| presentations.simple.nodes[].contractRefs[] | string | Yes | Published contractrefs[] capability data. | — |
| presentations.simple.nodes[].id | string | Yes | Published id capability data. | — |
| presentations.simple.nodes[].kind | string | Yes | Published kind capability data. | — |
| presentations.simple.nodes[].label | string | Yes | Published label capability data. | — |
| presentations.simple.nodes[].summary | string | Yes | Published summary capability data. | — |
| presentations.simple.rule | string | Yes | Published rule capability data. | — |
| presentations.standard | object | Yes | Published standard capability data. | — |
| presentations.standard.nodes | array | Yes | Published nodes capability data. | — |
| presentations.standard.nodes[] | object | Yes | Published nodes[] capability data. | — |
| presentations.standard.nodes[].id | string | Yes | Published id capability data. | — |
| presentations.standard.nodes[].label | string | Yes | Published label capability data. | — |
| presentations.standard.nodes[].question | string | Yes | Published question capability data. | — |
| presentations.standard.nodes[].stepRefs | array | Yes | Published steprefs capability data. | — |
| presentations.standard.nodes[].stepRefs[] | string | Yes | Published steprefs[] capability data. | — |
| presentations.standard.phases | array | Yes | Published phases capability data. | — |
| presentations.standard.phases[] | string | Yes | Published phases[] capability data. | — |
| presentations.standard.rule | string | Yes | Published rule capability data. | — |
| runtimeRegistry | object | Yes | Published runtimeregistry capability data. | — |
| runtimeRegistry.artifacts | array | Yes | Published artifacts capability data. | — |
| runtimeRegistry.artifacts[] | object | Yes | Published artifacts[] capability data. | — |
| runtimeRegistry.artifacts[].id | string | Yes | Published id capability data. | — |
| runtimeRegistry.artifacts[].path | string | Yes | Published path capability data. | — |
| runtimeRegistry.artifacts[].schemaContract | string | null | Yes | Published schemacontract capability data. | — |
| runtimeRegistry.artifacts[].schemaVersion | string | null | Yes | Published schemaversion capability data. | — |
| runtimeRegistry.authority | string | Yes | Published authority capability data. | — |
| schemaVersion | string | Yes | Published schemaversion capability data. | — |
| semantics | object | Yes | Published semantics capability data. | — |
| semantics.artifact | string | Yes | Published artifact capability data. | — |
| semantics.evidence | string | Yes | Published evidence capability data. | — |
| semantics.gate | string | Yes | Published gate capability data. | — |
| semantics.project | string | Yes | Published project capability data. | — |
| semantics.repository | string | Yes | Published repository capability data. | — |
| semantics.workspace | string | Yes | Published workspace capability data. | — |
| steps | array | Yes | Published steps capability data. | — |
| steps[] | object | Yes | Published steps[] capability data. | — |
| steps[].command | array | Yes | Published command capability data. | — |
| steps[].command[] | string | Yes | Published command[] capability data. | — |
| steps[].consumerArgs | object | Yes | Published consumerargs capability data. | — |
| steps[].consumerArgs.vscode | array | Yes | Published vscode capability data. | — |
| steps[].consumerArgs.vscode[] | string | Yes | Published vscode[] capability data. | — |
| steps[].consumes | array | Yes | Published consumes capability data. | — |
| steps[].consumes[] | string | Yes | Published consumes[] capability data. | — |
| steps[].consumesArtifacts | array | Yes | Published consumesartifacts capability data. | — |
| steps[].consumesArtifacts[] | string | Yes | Published consumesartifacts[] capability data. | — |
| steps[].dependsOn | array | Yes | Published dependson capability data. | — |
| steps[].dependsOn[] | string | Yes | Published dependson[] capability data. | — |
| steps[].exitPolicy | string | Yes | Published exitpolicy capability data. | — |
| steps[].id | string | Yes | Published id capability data. | — |
| steps[].inputRefs | array | Yes | Published inputrefs capability data. | — |
| steps[].inputRefs[] | string | Yes | Published inputrefs[] capability data. | — |
| steps[].label | string | Yes | Published label capability data. | — |
| steps[].ordinal | number | Yes | Published ordinal capability data. | — |
| steps[].phase | string | Yes | Published phase capability data. | — |
| steps[].produces | array | Yes | Published produces capability data. | — |
| steps[].produces[] | string | Yes | Published produces[] capability data. | — |
| steps[].purpose | string | Yes | Published purpose capability data. | — |
| workspaceLifecycle | object | Yes | Published workspacelifecycle capability data. | — |
| workspaceLifecycle.durableState | array | Yes | Published durablestate capability data. | — |
| workspaceLifecycle.durableState[] | object | Yes | Published durablestate[] capability data. | — |
| workspaceLifecycle.durableState[].id | string | Yes | Published id capability data. | — |
| workspaceLifecycle.durableState[].paths | array | Yes | Published paths capability data. | — |
| workspaceLifecycle.durableState[].paths[] | string | Yes | Published paths[] capability data. | — |
| workspaceLifecycle.durableState[].purpose | string | Yes | Published purpose capability data. | — |
| workspaceLifecycle.ingestionRoutes | array | Yes | Published ingestionroutes capability data. | — |
| workspaceLifecycle.ingestionRoutes[] | object | Yes | Published ingestionroutes[] capability data. | — |
| workspaceLifecycle.ingestionRoutes[].commands | array | Yes | Published commands capability data. | — |
| workspaceLifecycle.ingestionRoutes[].commands[] | string | Yes | Published commands[] capability data. | — |
| workspaceLifecycle.ingestionRoutes[].id | string | Yes | Published id capability data. | — |
| workspaceLifecycle.ingestionRoutes[].label | string | Yes | Published label capability data. | — |
| workspaceLifecycle.ingestionRoutes[].result | string | Yes | Published result capability data. | — |
| workspaceLifecycle.rule | string | Yes | Published rule capability data. | — |
Canonical machine-readable definition
The raw synchronized contract remains authoritative. The educational sections above are projections of this definition.
Show raw JSON
{
"schemaVersion": "workspai-workspace-intelligence-chain-v1",
"name": "Workspace Intelligence Chain",
"contractPath": "contracts/workspace-intelligence-chain.v1.json",
"invariant": "Every consumer must preserve step identity, dependencies, artifact flow, and verdict semantics; presentation may change, chain meaning may not.",
"invariants": [
"Missing or unreadable input is unknown or unavailable; it must not be presented as verified absence.",
"Freshness and provenance travel with evidence and must not be discarded by projections.",
"The current graph is a workspace dependency graph, not a complete cross-language symbol or call graph.",
"Simple and standard presentations summarize the contract; their contractRefs must preserve complete traceability.",
"Conditional provider outputs must be resolved through their dedicated inventory contract.",
"Auxiliary capabilities expose or refresh intelligence but are not mandatory execution-chain steps.",
"Canonical step commands are stage-pure: they must not implicitly execute a downstream chain step or regenerate an upstream artifact.",
"Canonical JSON artifacts must satisfy their registered schema both when produced and when consumed across CLI, MCP, IDE, and CI trust boundaries.",
"Schema validity is necessary but not sufficient: hashes, embedded models, summaries, counts, graph statistics, and artifact references must remain semantically coherent.",
"Persisted impact evidence must be rejected as stale when the current workspace model or Git observation no longer matches its embedded diff.",
"Canonical artifact replacement must be atomic and workspace-contained; an interrupted or denied write must preserve the last valid artifact.",
"Concurrent history updates must be serialized without silently dropping entries, and invalid history must never be overwritten as if it were absent.",
"The canonical global registry is ~/.workspai/workspaces.json; ~/.rapidkit/workspaces.json is a non-authoritative compatibility mirror for legacy consumers and must not diverge after a CLI registry mutation."
],
"semantics": {
"workspace": "The governed operating boundary that relates one or more projects and repositories to shared metadata, policies, contracts, evidence, and consumers.",
"repository": "A source-control boundary that may contain one or more projects and may live inside or outside the workspace root.",
"project": "A discoverable build or runtime unit with its own path, metadata or observable manifests, command capabilities, and evidence.",
"evidence": "A sourced observation or generated verification result with provenance and freshness; evidence may be consumed by a later run.",
"artifact": "A durable generated file that another command or consumer can read without parsing terminal prose.",
"gate": "A structured verdict with reasons and exit semantics derived from current evidence."
},
"workspaceLifecycle": {
"ingestionRoutes": [
{
"id": "create",
"label": "Create",
"commands": [
"create workspace",
"create project"
],
"result": "Create a workspace or supported project and write canonical Workspai metadata."
},
{
"id": "adopt",
"label": "Adopt",
"commands": [
"adopt"
],
"result": "Register an existing project in place without requiring source relocation."
},
{
"id": "import",
"label": "Import",
"commands": [
"import",
"workspace import"
],
"result": "Attach an existing project or repository path to the workspace inventory."
}
],
"durableState": [
{
"id": "workspace-identity",
"paths": [
".workspai-workspace",
".workspai/workspace.json"
],
"purpose": "Identify the workspace boundary, profile, and canonical root."
},
{
"id": "project-inventory",
"paths": [
".workspai/project.json",
".workspai/context.json",
".workspai/adopt.json",
"~/.workspai/workspaces.json",
"~/.rapidkit/workspaces.json (legacy compatibility mirror)"
],
"purpose": "Record native, adopted, imported, and globally registered project locations while preserving a non-authoritative mirror for legacy extension discovery."
},
{
"id": "governance",
"paths": [
".workspai/policies.yml",
".workspai/workspace.contract.json"
],
"purpose": "Define workspace policy and explicit structural relationships."
},
{
"id": "graph-overrides",
"paths": [
".workspai/workspace-graph.overrides.json"
],
"purpose": "Provide explicit dependency edges that override inferred relationships."
}
],
"rule": "Create, adopt, and import are ingestion routes, not intelligence facts. Their durable state becomes observable input to Model."
},
"runtimeRegistry": {
"authority": "contracts/workspace-intelligence-runtime-registry.ts",
"artifacts": [
{
"id": "model",
"path": ".workspai/reports/workspace-model.json",
"schemaVersion": "workspace-model.v1",
"schemaContract": "contracts/workspace-intelligence/workspace-model.v1.json"
},
{
"id": "snapshot",
"path": ".workspai/reports/workspace-model-snapshot.json",
"schemaVersion": "workspace-model-snapshot.v1",
"schemaContract": "contracts/workspace-intelligence/workspace-model-snapshot.v1.json"
},
{
"id": "diff",
"path": ".workspai/reports/workspace-model-diff-last-run.json",
"schemaVersion": "workspace-model-diff.v1",
"schemaContract": "contracts/workspace-intelligence/workspace-model-diff.v1.json"
},
{
"id": "impact",
"path": ".workspai/reports/workspace-impact-last-run.json",
"schemaVersion": "workspace-impact.v1",
"schemaContract": "contracts/workspace-intelligence/workspace-impact.v1.json"
},
{
"id": "analyze",
"path": ".workspai/reports/analyze-last-run.json",
"schemaVersion": "rapidkit-analyze-v1",
"schemaContract": "contracts/analyze-last-run.v1.json"
},
{
"id": "doctor",
"path": ".workspai/reports/doctor-last-run.json",
"schemaVersion": "doctor-workspace-evidence-v1",
"schemaContract": "contracts/doctor-workspace-evidence.v1.json"
},
{
"id": "contractVerify",
"path": ".workspai/reports/workspace-contract-verify-last-run.json",
"schemaVersion": "workspace-contract-verify.v1",
"schemaContract": "contracts/workspace-intelligence/workspace-contract-verify.v1.json"
},
{
"id": "readiness",
"path": ".workspai/reports/release-readiness-last-run.json",
"schemaVersion": "release-readiness-v1",
"schemaContract": "contracts/release-readiness.v1.json"
},
{
"id": "verify",
"path": ".workspai/reports/workspace-verify-last-run.json",
"schemaVersion": "workspace-verify.v1",
"schemaContract": "contracts/workspace-intelligence/workspace-verify.v1.json"
},
{
"id": "history",
"path": ".workspai/reports/workspace-intelligence-history.json",
"schemaVersion": "workspace-intelligence-history.v1",
"schemaContract": "contracts/workspace-intelligence/workspace-intelligence-history.v1.json"
},
{
"id": "agentContext",
"path": ".workspai/reports/workspace-context-agent.json",
"schemaVersion": "workspace-context.v1",
"schemaContract": "contracts/workspace-intelligence/workspace-context.v1.json"
},
{
"id": "agentIndex",
"path": ".workspai/reports/INDEX.json",
"schemaVersion": "rapidkit-agent-reports-index.v1",
"schemaContract": "contracts/workspace-intelligence/agent-reports-index.v1.json"
},
{
"id": "agentCustomizationPack",
"path": ".workspai/reports/agent-customization-pack.json",
"schemaVersion": "rapidkit-agent-customization-pack.v1",
"schemaContract": "contracts/workspace-intelligence/agent-customization-pack-report.v1.json"
},
{
"id": "skillsIndex",
"path": ".workspai/reports/workspace-skills-index.json",
"schemaVersion": "workspace-skills-index.v1",
"schemaContract": "contracts/workspace-intelligence/workspace-skills-index.v1.json"
},
{
"id": "agents",
"path": "AGENTS.md",
"schemaVersion": null,
"schemaContract": null
},
{
"id": "explain",
"path": ".workspai/reports/workspace-explain-last-run.json",
"schemaVersion": "workspace-explain.v1",
"schemaContract": "contracts/workspace-intelligence/workspace-explain.v1.json"
}
]
},
"boundaries": {
"inputs": [
{
"id": "projects-repositories",
"label": "Projects and repositories",
"sources": [
"projects",
"repositories",
"services",
"modules",
"imported paths"
],
"entersAt": "model"
},
{
"id": "runtime-dependencies",
"label": "Runtime and dependencies",
"sources": [
"runtime manifests",
"lockfiles",
"scripts",
"framework markers",
"package dependencies",
"supported source imports (currently bounded JavaScript and TypeScript scanning)"
],
"entersAt": "model"
},
{
"id": "workspace-rules",
"label": "Workspace rules",
"sources": [
"workspace markers",
"registry",
"project metadata",
"contracts",
"policies",
"ownership",
"graph overrides"
],
"entersAt": "model"
},
{
"id": "changes",
"label": "Changes",
"sources": [
"repository state",
"git state",
"model baseline",
"workspace diff"
],
"entersAt": "diff"
},
{
"id": "model-baseline",
"label": "Explicit model baseline",
"sources": [
".workspai/reports/workspace-model-snapshot.json"
],
"entersAt": "diff"
},
{
"id": "existing-evidence",
"label": "Existing evidence",
"sources": [
"doctor reports",
"analysis reports",
"contract verification",
"release readiness",
"pipeline results",
"tests and runtime evidence",
"previous intelligence artifacts"
],
"entersAt": "doctor-evidence"
}
],
"outputs": [
{
"id": "understanding",
"label": "System understanding",
"artifacts": [
".workspai/reports/workspace-model.json",
".workspai/reports/workspace-model-diff-last-run.json",
".workspai/reports/workspace-impact-last-run.json"
],
"producedBy": [
"model",
"diff",
"impact"
],
"inventory": "complete-for-chain"
},
{
"id": "governance-evidence",
"label": "Governance evidence",
"artifacts": [
".workspai/reports/doctor-last-run.json",
".workspai/reports/workspace-contract-verify-last-run.json",
".workspai/reports/analyze-last-run.json",
".workspai/reports/release-readiness-last-run.json",
".workspai/reports/workspace-verify-last-run.json",
".workspai/reports/workspace-intelligence-history.json"
],
"producedBy": [
"doctor-evidence",
"contract-evidence",
"analyze-evidence",
"readiness-evidence",
"verify"
],
"inventory": "complete-for-chain"
},
{
"id": "agent-grounding",
"label": "Agent grounding",
"artifacts": [
".workspai/reports/workspace-context-agent.json",
".workspai/reports/INDEX.json",
".workspai/reports/agent-customization-pack.json",
".workspai/reports/workspace-skills-index.json",
"AGENTS.md"
],
"producedBy": [
"context",
"agent-sync"
],
"inventory": "canonical-minimum",
"inventoryContract": "contracts/agent-customization-pack.v1.json"
},
{
"id": "explanations",
"label": "Explainable decisions",
"artifacts": [
".workspai/reports/workspace-explain-last-run.json"
],
"producedBy": [
"explain"
],
"inventory": "complete-for-chain"
}
],
"consumers": [
{
"id": "developers",
"label": "Developers",
"channels": [
"CLI",
"reports",
"AGENTS.md"
]
},
{
"id": "ci",
"label": "CI",
"channels": [
"JSON artifacts",
"exit codes",
"release gates"
]
},
{
"id": "ides",
"label": "IDEs",
"channels": [
"synced contracts",
"extension",
"agent context"
]
},
{
"id": "ai-agents",
"label": "AI agents",
"channels": [
"INDEX.json",
"context",
"skills",
"MCP"
]
}
]
},
"deliveryChannels": [
{
"id": "artifacts",
"carries": [
"reports",
"models",
"context",
"grounding",
"skills"
],
"authority": "canonical"
},
{
"id": "json-stdout",
"carries": [
"structured command results"
],
"authority": "projection"
},
{
"id": "human-cli",
"carries": [
"summaries",
"diagnostics",
"next actions"
],
"authority": "projection"
},
{
"id": "exit-codes",
"carries": [
"gate and command status"
],
"authority": "projection"
},
{
"id": "watch-events",
"carries": [
"incremental workspace change events"
],
"authority": "projection"
},
{
"id": "mcp",
"carries": [
"read-mostly access to current workspace artifacts"
],
"authority": "projection"
}
],
"feedback": {
"from": [
"developers",
"ci",
"ides",
"ai-agents"
],
"signals": [
"source commits",
"dependency updates",
"policy and contract edits",
"repairs",
"test and runtime results",
"agent action outcomes"
],
"reentersThrough": [
"projects-repositories",
"runtime-dependencies",
"workspace-rules",
"changes",
"existing-evidence"
],
"rule": "Consumer actions are not silently treated as truth. They re-enter as observable changes or evidence and must be modeled and verified again."
},
"auxiliaryCapabilities": [
{
"id": "graph",
"commands": [
"workspace graph emit",
"workspace graph explain",
"workspace graph dot",
"workspace graph mermaid"
],
"reads": [
".workspai/reports/workspace-model.json#graph"
],
"role": "Inspect or render the graph already embedded in the workspace model.",
"chainStep": false
},
{
"id": "watch",
"commands": [
"workspace watch"
],
"reads": [
"workspace inputs",
".workspai/reports/workspace-model.json"
],
"role": "Refresh the model incrementally and emit deterministic change events.",
"chainStep": false
},
{
"id": "mcp",
"commands": [
"workspace mcp serve"
],
"reads": [
"workspace evidence artifacts"
],
"role": "Expose read-mostly workspace evidence to compatible clients.",
"chainStep": false
}
],
"presentations": {
"simple": {
"layers": [
"inputs",
"intelligence",
"outputs",
"consumers"
],
"nodes": [
{
"id": "input-layer",
"kind": "inputs",
"label": "Input Layer",
"summary": "Projects · Repositories · Dependencies · Changes",
"contractRefs": [
"projects-repositories",
"runtime-dependencies",
"workspace-rules",
"changes",
"model-baseline",
"existing-evidence"
]
},
{
"id": "workspace-intelligence",
"kind": "intelligence",
"label": "Workspace Intelligence",
"summary": "Model · Graph · Impact · Verify",
"contractRefs": [
"model",
"diff",
"impact",
"doctor-evidence",
"contract-evidence",
"analyze-evidence",
"readiness-evidence",
"verify",
"context",
"agent-sync",
"explain"
]
},
{
"id": "agent-grounding",
"kind": "outputs",
"label": "Agent Grounding",
"summary": "AGENTS.md · Skills · Context",
"contractRefs": [
"agent-grounding"
]
},
{
"id": "evidence-and-decisions",
"kind": "outputs",
"label": "Evidence Contracts",
"summary": "Reports · Artifacts · Gates",
"contractRefs": [
"understanding",
"governance-evidence",
"explanations"
]
},
{
"id": "shared-consumers",
"kind": "consumers",
"label": "Shared Consumers",
"summary": "Developers · CI · IDEs · AI agents",
"contractRefs": [
"developers",
"ci",
"ides",
"ai-agents"
]
}
],
"rule": "Use concrete user-facing language for first-contact explanations. Every input, output, consumer, and chain step must remain traceable through contractRefs even when details are summarized."
},
"standard": {
"phases": [
"understand",
"change",
"evidence",
"gate",
"ground",
"distribute",
"explain"
],
"nodes": [
{
"id": "understand",
"label": "Understand",
"question": "What exists in the current workspace?",
"stepRefs": [
"model"
]
},
{
"id": "change",
"label": "Change",
"question": "What changed, and what can it affect?",
"stepRefs": [
"diff",
"impact"
]
},
{
"id": "evidence",
"label": "Evidence",
"question": "What health, contract, and readiness facts were observed?",
"stepRefs": [
"doctor-evidence",
"contract-evidence",
"analyze-evidence",
"readiness-evidence"
]
},
{
"id": "gate",
"label": "Gate",
"question": "Is the current state acceptable and trustworthy?",
"stepRefs": [
"verify"
]
},
{
"id": "ground",
"label": "Ground",
"question": "What should an agent know before acting?",
"stepRefs": [
"context"
]
},
{
"id": "distribute",
"label": "Distribute",
"question": "Which durable agent and IDE surfaces receive that context?",
"stepRefs": [
"agent-sync"
]
},
{
"id": "explain",
"label": "Explain",
"question": "Why did the system reach this result or verdict?",
"stepRefs": [
"explain"
]
}
],
"rule": "Use for architecture education and product surfaces. Every phase must appear once and in order."
},
"advanced": {
"steps": [
"model",
"diff",
"impact",
"doctor-evidence",
"contract-evidence",
"analyze-evidence",
"readiness-evidence",
"verify",
"context",
"agent-sync",
"explain"
],
"requiredFields": [
"command",
"inputRefs",
"consumesArtifacts",
"produces",
"dependsOn",
"exitPolicy",
"purpose"
],
"rule": "Use for implementers, adapters, IDEs, and CI. Preserve every step and its artifact and verdict semantics."
}
},
"steps": [
{
"id": "model",
"ordinal": 1,
"phase": "understand",
"label": "Model",
"command": [
"workspace",
"model",
"--json",
"--write"
],
"consumes": [
"workspace markers",
"project metadata",
"registry",
"contract",
"policies"
],
"inputRefs": [
"projects-repositories",
"runtime-dependencies",
"workspace-rules",
"existing-evidence"
],
"consumesArtifacts": [],
"produces": [
".workspai/reports/workspace-model.json"
],
"dependsOn": [],
"exitPolicy": "stop-on-error",
"purpose": "Build the canonical current model of the software system."
},
{
"id": "diff",
"ordinal": 2,
"phase": "change",
"label": "Diff",
"command": [
"workspace",
"diff",
"--from",
".workspai/reports/workspace-model-snapshot.json",
"--json"
],
"consumes": [
".workspai/reports/workspace-model.json",
".workspai/reports/workspace-model-snapshot.json"
],
"inputRefs": [
"changes",
"model-baseline"
],
"consumesArtifacts": [
".workspai/reports/workspace-model.json",
".workspai/reports/workspace-model-snapshot.json"
],
"produces": [
".workspai/reports/workspace-model-diff-last-run.json"
],
"dependsOn": [
"model"
],
"exitPolicy": "stop-on-error",
"purpose": "Describe structural change against the selected baseline."
},
{
"id": "impact",
"ordinal": 3,
"phase": "change",
"label": "Impact",
"command": [
"workspace",
"impact",
"--from",
".workspai/reports/workspace-model-diff-last-run.json",
"--json"
],
"consumes": [
".workspai/reports/workspace-model.json",
".workspai/reports/workspace-model-diff-last-run.json"
],
"inputRefs": [],
"consumesArtifacts": [
".workspai/reports/workspace-model.json",
".workspai/reports/workspace-model-diff-last-run.json"
],
"produces": [
".workspai/reports/workspace-impact-last-run.json"
],
"dependsOn": [
"diff"
],
"exitPolicy": "stop-on-error",
"purpose": "Calculate transitive blast radius over the workspace graph."
},
{
"id": "doctor-evidence",
"ordinal": 4,
"phase": "evidence",
"label": "Doctor Evidence",
"command": [
"doctor",
"workspace",
"--json"
],
"consumes": [
"workspace runtime and project health signals"
],
"inputRefs": [
"projects-repositories",
"runtime-dependencies",
"existing-evidence"
],
"consumesArtifacts": [],
"produces": [
".workspai/reports/doctor-last-run.json"
],
"dependsOn": [
"impact"
],
"exitPolicy": "continue-on-structured-verdict",
"purpose": "Refresh health evidence after the impact artifact exists."
},
{
"id": "contract-evidence",
"ordinal": 5,
"phase": "evidence",
"label": "Contract Evidence",
"command": [
"workspace",
"contract",
"verify",
"--strict",
"--json"
],
"consumes": [
".workspai/workspace.contract.json"
],
"inputRefs": [
"workspace-rules"
],
"consumesArtifacts": [],
"produces": [
".workspai/reports/workspace-contract-verify-last-run.json"
],
"dependsOn": [
"impact"
],
"exitPolicy": "continue-on-structured-verdict",
"purpose": "Refresh structural contract evidence without hiding failed verdicts."
},
{
"id": "analyze-evidence",
"ordinal": 6,
"phase": "evidence",
"label": "Analyze Evidence",
"command": [
"analyze",
"--json"
],
"consumes": [
".workspai/reports/workspace-model.json",
"workspace runtime and dependency signals"
],
"inputRefs": [
"projects-repositories",
"runtime-dependencies",
"workspace-rules"
],
"consumesArtifacts": [
".workspai/reports/workspace-model.json"
],
"produces": [
".workspai/reports/analyze-last-run.json"
],
"dependsOn": [
"impact"
],
"exitPolicy": "continue-on-structured-verdict",
"purpose": "Refresh analysis evidence required by the release-readiness gate."
},
{
"id": "readiness-evidence",
"ordinal": 7,
"phase": "evidence",
"label": "Readiness Evidence",
"command": [
"readiness",
"--json"
],
"consumes": [
"doctor, analysis, runtime, and release signals"
],
"inputRefs": [
"runtime-dependencies",
"existing-evidence"
],
"consumesArtifacts": [
".workspai/reports/doctor-last-run.json",
".workspai/reports/workspace-contract-verify-last-run.json",
".workspai/reports/analyze-last-run.json"
],
"produces": [
".workspai/reports/release-readiness-last-run.json"
],
"dependsOn": [
"doctor-evidence",
"contract-evidence",
"analyze-evidence"
],
"exitPolicy": "continue-on-structured-verdict",
"purpose": "Refresh release-readiness evidence before the definitive gate."
},
{
"id": "verify",
"ordinal": 8,
"phase": "gate",
"label": "Verify",
"command": [
"workspace",
"verify",
"--from-impact",
".workspai/reports/workspace-impact-last-run.json",
"--json"
],
"consumes": [
".workspai/reports/workspace-impact-last-run.json",
".workspai/reports/doctor-last-run.json",
".workspai/reports/workspace-contract-verify-last-run.json",
".workspai/reports/release-readiness-last-run.json"
],
"inputRefs": [],
"consumesArtifacts": [
".workspai/reports/workspace-impact-last-run.json",
".workspai/reports/doctor-last-run.json",
".workspai/reports/workspace-contract-verify-last-run.json",
".workspai/reports/release-readiness-last-run.json"
],
"produces": [
".workspai/reports/workspace-verify-last-run.json",
".workspai/reports/workspace-intelligence-history.json"
],
"dependsOn": [
"impact",
"doctor-evidence",
"contract-evidence",
"analyze-evidence",
"readiness-evidence"
],
"exitPolicy": "continue-on-structured-verdict",
"purpose": "Emit the definitive evidence-backed workspace gate."
},
{
"id": "context",
"ordinal": 9,
"phase": "ground",
"label": "Agent Context",
"command": [
"workspace",
"context",
"--for-agent",
"--json",
"--write",
"--no-agent-sync"
],
"consumes": [
".workspai/reports/workspace-model.json",
".workspai/reports/workspace-impact-last-run.json",
".workspai/reports/workspace-verify-last-run.json"
],
"inputRefs": [],
"consumesArtifacts": [
".workspai/reports/workspace-model.json",
".workspai/reports/workspace-impact-last-run.json",
".workspai/reports/workspace-verify-last-run.json"
],
"produces": [
".workspai/reports/workspace-context-agent.json"
],
"dependsOn": [
"verify"
],
"exitPolicy": "stop-on-error",
"purpose": "Build compact agent context from the same verified evidence."
},
{
"id": "agent-sync",
"ordinal": 10,
"phase": "distribute",
"label": "Agent Grounding",
"command": [
"workspace",
"agent-sync",
"--write",
"--json",
"--preset",
"enterprise"
],
"consumerArgs": {
"vscode": [
"--target",
"vscode"
]
},
"consumes": [
".workspai/reports/workspace-context-agent.json"
],
"inputRefs": [],
"consumesArtifacts": [
".workspai/reports/workspace-context-agent.json"
],
"produces": [
".workspai/reports/INDEX.json",
".workspai/reports/agent-customization-pack.json",
".workspai/reports/workspace-skills-index.json",
"AGENTS.md"
],
"dependsOn": [
"context"
],
"exitPolicy": "stop-on-error",
"purpose": "Distribute one context into portable agent and IDE surfaces."
},
{
"id": "explain",
"ordinal": 11,
"phase": "explain",
"label": "Explain",
"command": [
"workspace",
"explain",
"release-blocked",
"--json",
"--write"
],
"consumes": [
".workspai/reports/workspace-verify-last-run.json",
".workspai/reports/workspace-impact-last-run.json"
],
"inputRefs": [],
"consumesArtifacts": [
".workspai/reports/workspace-verify-last-run.json",
".workspai/reports/workspace-impact-last-run.json"
],
"produces": [
".workspai/reports/workspace-explain-last-run.json"
],
"dependsOn": [
"verify"
],
"exitPolicy": "continue-on-structured-verdict",
"purpose": "Translate evidence and blockers into a human and agent-readable narrative."
}
],
"diagram": {
"direction": "TB",
"nodes": [
{
"id": "model",
"label": "Model",
"phase": "understand"
},
{
"id": "diff",
"label": "Diff",
"phase": "change"
},
{
"id": "impact",
"label": "Impact",
"phase": "change"
},
{
"id": "doctor-evidence",
"label": "Doctor Evidence",
"phase": "evidence"
},
{
"id": "contract-evidence",
"label": "Contract Evidence",
"phase": "evidence"
},
{
"id": "analyze-evidence",
"label": "Analyze Evidence",
"phase": "evidence"
},
{
"id": "readiness-evidence",
"label": "Readiness Evidence",
"phase": "evidence"
},
{
"id": "verify",
"label": "Verify",
"phase": "gate"
},
{
"id": "context",
"label": "Agent Context",
"phase": "ground"
},
{
"id": "agent-sync",
"label": "Agent Grounding",
"phase": "distribute"
},
{
"id": "explain",
"label": "Explain",
"phase": "explain"
}
],
"edges": [
{
"from": "model",
"to": "diff",
"meaning": "required before"
},
{
"from": "diff",
"to": "impact",
"meaning": "required before"
},
{
"from": "impact",
"to": "doctor-evidence",
"meaning": "required before"
},
{
"from": "impact",
"to": "contract-evidence",
"meaning": "required before"
},
{
"from": "impact",
"to": "analyze-evidence",
"meaning": "required before"
},
{
"from": "doctor-evidence",
"to": "readiness-evidence",
"meaning": "required before"
},
{
"from": "contract-evidence",
"to": "readiness-evidence",
"meaning": "required before"
},
{
"from": "analyze-evidence",
"to": "readiness-evidence",
"meaning": "required before"
},
{
"from": "impact",
"to": "verify",
"meaning": "required before"
},
{
"from": "doctor-evidence",
"to": "verify",
"meaning": "required before"
},
{
"from": "contract-evidence",
"to": "verify",
"meaning": "required before"
},
{
"from": "analyze-evidence",
"to": "verify",
"meaning": "required before"
},
{
"from": "readiness-evidence",
"to": "verify",
"meaning": "required before"
},
{
"from": "verify",
"to": "context",
"meaning": "required before"
},
{
"from": "context",
"to": "agent-sync",
"meaning": "required before"
},
{
"from": "verify",
"to": "explain",
"meaning": "required before"
}
]
},
"consumers": {
"agents": {
"canonicalReadOrder": [
".workspai/reports/INDEX.json",
".workspai/reports/workspace-context-agent.json",
".workspai/reports/workspace-verify-last-run.json",
".workspai/reports/workspace-impact-last-run.json",
".workspai/reports/workspace-explain-last-run.json",
".workspai/reports/workspace-model.json",
".workspai/reports/agent-customization-pack.json",
".workspai/reports/workspace-skills-index.json"
],
"entrypoints": [
"AGENTS.md",
".workspai/AGENT-GROUNDING.md"
],
"rule": "Agents must cite current artifacts, preserve verified versus inferred status, and re-run the producing step when evidence is missing or stale."
},
"ideAndCi": {
"requiredArtifacts": [
".workspai/reports/workspace-model.json",
".workspai/reports/workspace-impact-last-run.json",
".workspai/reports/workspace-verify-last-run.json"
],
"rule": "IDEs and CI must consume structured artifacts and verdict exit semantics rather than parse human help or terminal prose."
},
"docsAndDiagrams": {
"rule": "Documentation and diagrams must derive labels, ordering, and edges from this contract and must not invent implemented steps."
}
}
}