workspai 0.46.0 → 0.48.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (143) hide show
  1. package/README.md +225 -81
  2. package/contracts/agent-customization-pack.v1.json +11 -1
  3. package/contracts/bootstrap-compliance.v1.json +14 -0
  4. package/contracts/cli-runtime-command-inventory.v1.snapshot.json +4 -0
  5. package/contracts/extension-cli-compatibility.v1.json +13 -2
  6. package/contracts/mirror-ops.v1.json +16 -0
  7. package/contracts/published-contract-catalog.v1.json +59 -1
  8. package/contracts/runtime-command-surface.v1.json +294 -2
  9. package/contracts/transparency-evidence.v1.json +13 -0
  10. package/contracts/workspace-contract.v1.json +78 -0
  11. package/contracts/workspace-intelligence/model-usage-event.v1.json +82 -0
  12. package/contracts/workspace-intelligence/workspace-context.v1.json +20 -0
  13. package/contracts/workspace-intelligence/workspace-graph-token-efficiency.v1.json +72 -0
  14. package/contracts/workspace-intelligence/workspace-intelligence-evaluation-comparison.v1.json +53 -0
  15. package/contracts/workspace-intelligence/workspace-intelligence-evaluation.v1.json +120 -0
  16. package/contracts/workspace-intelligence/workspace-intelligence-run.v1.json +6 -1
  17. package/contracts/workspace-intelligence/workspace-knowledge-graph-change-overlay.v1.json +200 -0
  18. package/contracts/workspace-intelligence/workspace-knowledge-graph.v1.json +260 -0
  19. package/contracts/workspace-intelligence/workspace-knowledge-search.v1.json +60 -0
  20. package/contracts/workspace-intelligence-architecture.v1.json +37 -5
  21. package/contracts/workspace-intelligence-chain.v1.json +58 -6
  22. package/contracts/workspace-share-bundle.v1.json +16 -0
  23. package/dist/analyze-EEEU3MIF.js +1 -0
  24. package/dist/artifact-remediation-plan-SPOUHMK5.js +3 -0
  25. package/dist/autopilot-release-XGVXPOZI.js +1 -0
  26. package/dist/chunk-32OJDBIG.js +2 -0
  27. package/dist/chunk-37CVKXBD.js +1 -0
  28. package/dist/chunk-3NU32T4A.js +2 -0
  29. package/dist/chunk-3VFA7D5T.js +1 -0
  30. package/dist/chunk-4HDYADHT.js +13 -0
  31. package/dist/chunk-54EP5CEV.js +8 -0
  32. package/dist/chunk-5S3DJQEP.js +8 -0
  33. package/dist/chunk-AFL3ACCR.js +2 -0
  34. package/dist/{chunk-VFDM65IE.js → chunk-BFLJ2R4D.js} +22 -22
  35. package/dist/chunk-BGPXQQNY.js +4 -0
  36. package/dist/chunk-BMWFQXGW.js +1 -0
  37. package/dist/{chunk-UQWOVV6V.js → chunk-CRHYBQI3.js} +1 -1
  38. package/dist/chunk-CV5HKU4P.js +1 -0
  39. package/dist/chunk-ESLPI3XZ.js +1 -0
  40. package/dist/chunk-FB7SCXAZ.js +1 -0
  41. package/dist/{chunk-WPEEC5BX.js → chunk-HDXNIN4N.js} +1 -1
  42. package/dist/chunk-HZDXO65G.js +36 -0
  43. package/dist/{chunk-J5PIZCAU.js → chunk-I46XEIPL.js} +1 -1
  44. package/dist/chunk-J5ENLXDF.js +1 -0
  45. package/dist/chunk-KB44JP4M.js +2 -0
  46. package/dist/chunk-LHOZXC2M.js +2 -0
  47. package/dist/chunk-NAJCUQ4X.js +2 -0
  48. package/dist/chunk-OA537ZQ5.js +1 -0
  49. package/dist/chunk-OW42TZFB.js +1 -0
  50. package/dist/chunk-P3D5YQB2.js +1 -0
  51. package/dist/chunk-PHXQR6PX.js +2 -0
  52. package/dist/{chunk-ZKAI3PJE.js → chunk-PRTR2DQ2.js} +1 -1
  53. package/dist/{chunk-QA5BGEQW.js → chunk-QNONOO4F.js} +1 -1
  54. package/dist/chunk-RHQW3DTP.js +1 -0
  55. package/dist/chunk-T4YR4RAI.js +2 -0
  56. package/dist/chunk-THIOE2PB.js +2 -0
  57. package/dist/{chunk-4LGXSBCN.js → chunk-VU7NZHPM.js} +1 -1
  58. package/dist/chunk-WDKNMTJQ.js +1 -0
  59. package/dist/{chunk-YUATNVOT.js → chunk-Y5UJLPS4.js} +16 -16
  60. package/dist/{chunk-6IIZJQLV.js → chunk-YJZOMRAS.js} +1 -1
  61. package/dist/{create-WCV3L6XH.js → create-DBQNAMKP.js} +1 -1
  62. package/dist/{doctor-5BWM2EMJ.js → doctor-4NNUDNGZ.js} +1 -1
  63. package/dist/{dotnet-webapi-clean-6TVFBTVI.js → dotnet-webapi-clean-A6MVDYXX.js} +4 -4
  64. package/dist/{gofiber-standard-2BL7GWZB.js → gofiber-standard-I5YPQG5V.js} +1 -1
  65. package/dist/{gogin-standard-XGP3KBXA.js → gogin-standard-VY2L4QT5.js} +1 -1
  66. package/dist/index.d.ts +56 -14
  67. package/dist/index.js +322 -320
  68. package/dist/pipeline-TQM43A3K.js +5 -0
  69. package/dist/{springboot-standard-JJNUID6M.js → springboot-standard-55XKCBIZ.js} +4 -4
  70. package/dist/{workspace-7OXW5YTJ.js → workspace-NCWRINEF.js} +1 -1
  71. package/dist/{workspace-agent-sync-O4IA6VOA.js → workspace-agent-sync-662QHXGF.js} +1 -1
  72. package/dist/{workspace-archive-H74NBBNW.js → workspace-archive-P76EDIUG.js} +1 -1
  73. package/dist/{workspace-context-R7IPUBPG.js → workspace-context-23YYCUCP.js} +1 -1
  74. package/dist/workspace-contract-TU2I7GC2.js +1 -0
  75. package/dist/workspace-dependency-graph-BP4EXYQ5.js +1 -0
  76. package/dist/workspace-explain-MWUEN643.js +1 -0
  77. package/dist/workspace-explain-contract-ZPI3JXJU.js +1 -0
  78. package/dist/{workspace-feedback-REOS36ZZ.js → workspace-feedback-SUVH2LUJ.js} +1 -1
  79. package/dist/{workspace-foundation-KXT4QI5O.js → workspace-foundation-WXJ6I7ES.js} +1 -1
  80. package/dist/workspace-graph-token-efficiency-CFGFCJ5V.js +1 -0
  81. package/dist/{workspace-history-OGOVSKZG.js → workspace-history-BANOJRQ2.js} +1 -1
  82. package/dist/workspace-intelligence-MFJE7W67.js +1 -0
  83. package/dist/workspace-intelligence-evaluation-IPH7M3WV.js +1 -0
  84. package/dist/workspace-intelligence-runner-THYLHHMF.js +1 -0
  85. package/dist/workspace-knowledge-graph-ARDC6HHG.js +1 -0
  86. package/dist/workspace-knowledge-graph-change-overlay-XG6FC4IX.js +1 -0
  87. package/dist/workspace-knowledge-graph-export-UYAYFTWX.js +10 -0
  88. package/dist/workspace-knowledge-graph-query-VOSPPH4W.js +1 -0
  89. package/dist/workspace-mcp-serve-EZR6O76D.js +3 -0
  90. package/dist/workspace-model-7OU2M3LE.js +1 -0
  91. package/dist/workspace-model-hash-MHXK5MEI.js +1 -0
  92. package/dist/{workspace-registry-summary-SZ46R5PD.js → workspace-registry-summary-ORDK7A36.js} +1 -1
  93. package/dist/workspace-run-RLIYSOTN.js +1 -0
  94. package/dist/{workspace-verify-MFQ7IXGD.js → workspace-verify-EBVL7FWT.js} +1 -1
  95. package/dist/workspace-watch-3BPGLFLB.js +1 -0
  96. package/docs/AI_DYNAMIC_INTEGRATION.md +73 -428
  97. package/docs/AI_EXAMPLES.md +37 -395
  98. package/docs/AI_FEATURES.md +76 -456
  99. package/docs/AI_QUICKSTART.md +49 -212
  100. package/docs/GLOSSARY.md +64 -0
  101. package/docs/OPEN_SOURCE_USER_SCENARIOS.md +68 -7
  102. package/docs/README.md +70 -41
  103. package/docs/README_CONTENT_CONTRACT.md +154 -0
  104. package/docs/commands-reference.md +64 -4
  105. package/docs/config-file-guide.md +6 -2
  106. package/docs/contracts/ARTIFACT_CATALOG.md +76 -37
  107. package/docs/contracts/README.md +47 -8
  108. package/docs/graph-benchmark-methodology.md +121 -0
  109. package/docs/workspace-intelligence-evaluation.md +147 -0
  110. package/docs/workspace-knowledge-graph.md +316 -0
  111. package/docs/workspace-operations.md +49 -0
  112. package/package.json +2 -1
  113. package/dist/analyze-BEBEZSZK.js +0 -1
  114. package/dist/artifact-remediation-plan-FFQSESAM.js +0 -3
  115. package/dist/autopilot-release-WUR4CQIT.js +0 -1
  116. package/dist/chunk-2G7FASAO.js +0 -2
  117. package/dist/chunk-4EPHWD27.js +0 -8
  118. package/dist/chunk-CVHMUSRX.js +0 -1
  119. package/dist/chunk-DIPD72H4.js +0 -2
  120. package/dist/chunk-EFYHGCGX.js +0 -2
  121. package/dist/chunk-FWRXA435.js +0 -2
  122. package/dist/chunk-HDURFXW5.js +0 -2
  123. package/dist/chunk-HMUKBW2S.js +0 -4
  124. package/dist/chunk-K4WNYXKK.js +0 -33
  125. package/dist/chunk-LG6RFLPZ.js +0 -1
  126. package/dist/chunk-N7DV5L7C.js +0 -1
  127. package/dist/chunk-PRBVYW3T.js +0 -1
  128. package/dist/chunk-QZLIURER.js +0 -13
  129. package/dist/chunk-RIEF2DDX.js +0 -8
  130. package/dist/chunk-SXMTSV5M.js +0 -1
  131. package/dist/chunk-SXPY523X.js +0 -1
  132. package/dist/chunk-V3LRQZ36.js +0 -1
  133. package/dist/chunk-WYFPXTTS.js +0 -2
  134. package/dist/pipeline-ORIWVVYM.js +0 -5
  135. package/dist/workspace-contract-HKCMOMFE.js +0 -1
  136. package/dist/workspace-explain-GOPQYTPQ.js +0 -1
  137. package/dist/workspace-explain-contract-SVFJAAEI.js +0 -1
  138. package/dist/workspace-intelligence-7IESQSXY.js +0 -1
  139. package/dist/workspace-intelligence-runner-6GJ5M4HB.js +0 -1
  140. package/dist/workspace-mcp-serve-FRVWBO36.js +0 -3
  141. package/dist/workspace-model-PPYX7B4S.js +0 -1
  142. package/dist/workspace-run-V3KKHTVF.js +0 -1
  143. package/dist/workspace-watch-SOPZHRWA.js +0 -1
package/README.md CHANGED
@@ -1,87 +1,121 @@
1
1
  # Workspai CLI
2
2
 
3
- ## Open-Source Workspace Intelligence for Software Systems
4
-
5
3
  [![npm version](https://img.shields.io/npm/v/workspai.svg?style=flat-square)](https://www.npmjs.com/package/workspai)
6
4
  [![Downloads](https://img.shields.io/npm/dm/workspai.svg?style=flat-square)](https://www.npmjs.com/package/workspai)
7
5
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square)](LICENSE)
8
6
  [![Built by Workspai](https://img.shields.io/badge/Built%20by-Workspai-0f172a?logo=github)](https://workspai.dev)
9
7
 
10
- Not another AI coding assistant.
11
- Not another agent framework.
12
- Not another context engine.
8
+ ## Workspace Intelligence for software systems
13
9
 
14
10
  > One workspace. One truth. Humans and AI aligned.
15
11
 
16
- Workspai turns scattered projects into a governed, agent-ready workspace.
12
+ Workspai is an open-source CLI that turns one or many software projects into an
13
+ organized, evidence-backed view of the whole system. Developers, CI, IDEs,
14
+ MCP-compatible tools, and AI agents can use the same current model instead of
15
+ rebuilding a different picture from scattered files.
16
+
17
+ - **See the system:** projects, runtimes, APIs, dependencies, infrastructure,
18
+ documentation, policies, and release state in one model.
19
+ - **Ask with proof:** bounded graph answers linked to the files and facts that
20
+ support them.
21
+ - **Act with confidence:** change impact, health, verification, readiness, and
22
+ agent context from one defined and versioned intelligence chain.
23
+
24
+ [Quickstart](#start-in-two-minutes) ·
25
+ [Architecture](#from-code-to-shared-understanding) ·
26
+ [Commands](#core-workflows) ·
27
+ [Outputs](#outputs-and-consumers) ·
28
+ [Documentation](#documentation)
29
+
30
+ ## Understand Workspai in one minute
17
31
 
18
- It gives developers, CI, IDEs, and AI agents the same evidence-backed source of
19
- truth: workspace model, agent context, impact analysis, verification evidence,
20
- contracts, and release gates.
32
+ Your software system is more than a repository. It may include several
33
+ applications and services, shared packages, API contracts, deployment files,
34
+ documentation, tests, ownership, and CI evidence. Workspai connects those
35
+ surfaces without making AI the source of truth.
21
36
 
22
- ## Start here
37
+ | Term | Plain-language meaning |
38
+ | ------------------- | ------------------------------------------------------------------------------------ |
39
+ | **Workspace** | The managed boundary containing registered projects, policy, contracts, and evidence |
40
+ | **Project** | An application, service, library, or existing source tree connected to the workspace |
41
+ | **Workspace Model** | The authoritative structured record used to generate the other views and artifacts |
42
+ | **Knowledge Graph** | A queryable representation derived from the model, with typed relations and proofs |
43
+ | **Evidence** | The source, observation, hash, or report that justifies a fact or decision |
44
+ | **Artifact** | A durable file under `.workspai/` that another tool can safely consume |
23
45
 
24
- ### Install
46
+ The Workspace Model is the canonical source of truth. The Knowledge Graph is a
47
+ derived, revision-bound representation—not a competing truth and not an
48
+ LLM-generated guess.
49
+
50
+ The deterministic model, graph, contracts, and verification chain do not
51
+ require an AI API key. Optional AI-backed features declare that dependency
52
+ separately.
53
+
54
+ ## Start in two minutes
55
+
56
+ ### 1. Install or use `npx`
25
57
 
26
58
  ```bash
27
59
  npm install -g workspai
28
60
  workspai --help
29
61
  ```
30
62
 
31
- For short `npx` workflows, use the separate alias package:
63
+ Global installation is optional. Every example below also works with
64
+ `npx workspai`. The separate `wspai` package is only a short alias:
32
65
 
33
66
  ```bash
34
67
  npx wspai --help
35
68
  ```
36
69
 
37
70
  `workspai` is the canonical npm package and command. `wspai` is an optional
38
- short alias for `npx` workflows. RapidKit Core is the optional Python engine
39
- used only by Python/Core-dependent workflows; it is not a replacement CLI.
40
- This package is the active CLI boundary in the
71
+ short alias for `npx` workflows. This package is the active CLI boundary in the
41
72
  [Workspai monorepo](../../README.md).
42
73
 
43
- ### CLI help
44
-
45
- Browse all commands from the latest release without a global install:
74
+ ### 2. Create a lightweight workspace and connect existing source
46
75
 
47
76
  ```bash
48
- npx workspai@latest --help
77
+ npx workspai create workspace platform --profile minimal --yes
78
+ npx workspai adopt /absolute/path/to/project \
79
+ --workspace ~/.workspai/workspaces/platform \
80
+ --json
81
+ cd ~/.workspai/workspaces/platform
49
82
  ```
50
83
 
51
- ## Get Workspace Intelligence
52
-
53
- Project creation, import, and adoption are entry routes. The core experience
54
- starts when Workspai builds a durable model of the whole workspace and turns it
55
- into evidence that different tools can consume.
84
+ `adopt` registers the project without moving or copying it. To create new
85
+ software instead, start with `npx workspai create` or read
86
+ [Creating Workspaces and Projects](docs/creating-workspaces-and-projects.md).
56
87
 
57
- Connect an existing project without moving or copying its source:
58
-
59
- ```bash
60
- npx workspai adopt /path/to/project --json
61
- cd ~/.workspai/workspaces/workspai
62
- ```
63
-
64
- Execute the canonical chain and persist the shared model, evidence, and
65
- agent-ready context:
88
+ ### 3. Run the complete Workspace Intelligence chain
66
89
 
67
90
  ```bash
68
91
  npx workspai workspace intelligence run --for-agent codex --strict --json
69
92
  ```
70
93
 
71
- You now have a common source of truth for projects, runtimes, dependencies,
72
- commands, policies, contracts, health, and release evidence. The first durable
73
- outputs include:
94
+ `codex` selects the generated agent-facing surface; use another supported agent
95
+ identifier when needed. The underlying intelligence chain and evidence remain
96
+ the same.
97
+
98
+ The run creates durable, discoverable output:
74
99
 
75
100
  ```text
76
- .workspai/reports/workspace-model.json
77
- .workspai/reports/workspace-context-agent.json
78
- .workspai/reports/INDEX.json
79
- .workspai/reports/workspace-intelligence-run-last-run.json
101
+ .workspai/
102
+ ├── workspace.json
103
+ ├── workspace.contract.json
104
+ ├── AGENT-GROUNDING.md
105
+ └── reports/
106
+ ├── workspace-model.json
107
+ ├── workspace-knowledge-graph.json
108
+ ├── workspace-impact-last-run.json
109
+ ├── workspace-verify-last-run.json
110
+ ├── workspace-context-agent.json
111
+ ├── workspace-intelligence-run-last-run.json
112
+ └── INDEX.json
80
113
  AGENTS.md
81
114
  ```
82
115
 
83
- Already inside a Workspai workspace? Start directly with the canonical
84
- `workspace intelligence run --for-agent codex --strict --json` runner.
116
+ Exit code `0` means passed, `1` means execution failed, and `2` means the run
117
+ completed but current evidence blocks the requested decision. A blocked result
118
+ is useful evidence, not a crashed command.
85
119
 
86
120
  The broader governance and release pipeline is a separate gate when you are
87
121
  ready; it is not a substitute for the canonical chain:
@@ -98,6 +132,24 @@ npx workspai pipeline --json --strict
98
132
 
99
133
  Workspai is the deterministic layer between source code and its consumers:
100
134
 
135
+ ```text
136
+ Code · packages · APIs · infrastructure · docs · CI · policies
137
+
138
+ deterministic providers
139
+
140
+ facts + proofs
141
+
142
+ Canonical Workspace Model
143
+ │ │
144
+ │ └── Evidence-backed Knowledge Graph
145
+ │ │
146
+ └──────────┬──────────────┘
147
+
148
+ diff · impact · verify · context · explain
149
+
150
+ Developers · CI · IDEs · MCP · AI agents
151
+ ```
152
+
101
153
  | Capability | What it answers |
102
154
  | --------------------- | ------------------------------------------------------------------------------------------- |
103
155
  | **Model** | What projects, runtimes, frameworks, commands, policies, contracts, and dependencies exist? |
@@ -113,6 +165,10 @@ Create, import, and adopt add software to this boundary. Workspace Intelligence
113
165
  then models and governs every registered project, whether Workspai created it or
114
166
  it already existed.
115
167
 
168
+ Unlike repository-only code intelligence, the workspace boundary can connect
169
+ evidence across multiple projects and repositories. A missing relationship
170
+ means **not proven by current evidence**, not "these projects are independent."
171
+
116
172
  ## One Intelligence Chain
117
173
 
118
174
  The canonical execution order is versioned in
@@ -140,23 +196,81 @@ and enforce this exact contract-backed order. `pipeline --json --strict` remains
140
196
  the broader governance/release orchestrator (`sync → doctor → analyze → readiness
141
197
  → autopilot`); it is not an alias for the canonical intelligence chain.
142
198
 
199
+ ## Evidence and measurable context
200
+
201
+ Without bounded retrieval, a developer or agent often has to search and read a
202
+ large part of the workspace before answering a local question. Workspai can
203
+ return the matching entities, nearby relations, and source proofs first:
204
+
205
+ ```bash
206
+ npx workspai workspace graph search "who implements the login API?" --limit 8 --json
207
+ ```
208
+
209
+ Use the complete graph for interchange and audits; use bounded search for
210
+ normal questions and agent context. Workspai reports unknown or unproven
211
+ relationships instead of inventing an edge.
212
+
213
+ ### Current measured fixture
214
+
215
+ | Measure | Observed value |
216
+ | ------------------------------------ | -------------: |
217
+ | Registered projects | 16 |
218
+ | Knowledge Graph entities | 1,738 |
219
+ | Knowledge Graph relations | 2,244 |
220
+ | Portable proofs | 2,106 |
221
+ | Readable proof-source artifacts | 392 |
222
+ | Corpus size (`characters / 4`) | 134,105 tokens |
223
+ | `api endpoint --limit 8` retrieval | 2,812 tokens |
224
+ | Observed retrieval payload reduction | 97.9% |
225
+ | Observed corpus/retrieval ratio | 47.69× |
226
+
227
+ This is a reproducible observation from one 16-project development workspace on
228
+ 2026-07-22, not a universal token-cost, answer-quality, or task-success claim.
229
+ See [Graph Benchmark Methodology](docs/graph-benchmark-methodology.md) for the
230
+ source hash, formulas, limitations, and publication gate. Use
231
+ `workspace eval` when measuring provider-reported tokens, latency, cost, and a
232
+ verified execution outcome.
233
+
143
234
  ## Core Workflows
144
235
 
145
- | What you need | Command |
146
- | ------------------------------------------ | ---------------------------------------------------------------------------------------- |
147
- | Build and persist the current system model | `npx workspai workspace model --json --write` |
148
- | Generate agent-ready context | `npx workspai workspace context --for-agent --json --write` |
149
- | Generate portable agent and IDE surfaces | `npx workspai workspace agent-sync --write --refresh-context --preset enterprise --json` |
150
- | Save a model baseline | `npx workspai workspace snapshot --json` |
151
- | Compare with a baseline or Git state | `npx workspai workspace diff --from <snapshot-or-git-ref> --json` |
152
- | Calculate transitive blast radius | `npx workspai workspace impact --from <diff-report> --json` |
153
- | Verify affected projects and evidence | `npx workspai workspace verify --from-impact <impact-report> --json --strict` |
154
- | Explain a blocker | `npx workspai workspace explain release-blocked --json --write` |
155
- | Inspect a project in the dependency graph | `npx workspai workspace graph explain <project> --json` |
156
- | Run affected project tests | `npx workspai workspace run test --affected --blast-radius --json` |
157
- | Run the release/governance gate | `npx workspai pipeline --json --strict` |
158
- | Run the canonical intelligence chain | `npx workspai workspace intelligence run --for-agent codex --strict --json` |
159
- | Expose current evidence to MCP clients | `npx workspai workspace mcp serve` |
236
+ Use the complete intelligence runner for the normal end-to-end path. The
237
+ individual commands below are useful for inspection, automation, and targeted
238
+ reruns.
239
+
240
+ ### Model, change, and decisions
241
+
242
+ | What you need | Command |
243
+ | ------------------------------------------ | ----------------------------------------------------------------------------- |
244
+ | Build and persist the current system model | `npx workspai workspace model --json --write` |
245
+ | Save a model baseline | `npx workspai workspace snapshot --json` |
246
+ | Compare with a baseline or Git state | `npx workspai workspace diff --from <snapshot-or-git-ref> --json` |
247
+ | Calculate transitive blast radius | `npx workspai workspace impact --from <diff-report> --json` |
248
+ | Verify affected projects and evidence | `npx workspai workspace verify --from-impact <impact-report> --json --strict` |
249
+ | Explain a blocker | `npx workspai workspace explain release-blocked --json --write` |
250
+
251
+ ### Graph, agents, and interoperability
252
+
253
+ | What you need | Command |
254
+ | ----------------------------------------- | ---------------------------------------------------------------------------------------- |
255
+ | Inspect a project in the dependency graph | `npx workspai workspace graph explain <project> --json` |
256
+ | Query proof-backed workspace entities | `npx workspai workspace graph entities endpoint --json` |
257
+ | Retrieve bounded context for an agent | `npx workspai workspace graph search "authentication endpoint" --limit 12 --json` |
258
+ | Measure retrieval payload reduction | `npx workspai workspace graph benchmark "authentication endpoint" --limit 12 --json` |
259
+ | Start a model-usage evaluation | `npx workspai workspace eval init repair-readiness workspace-intelligence --json` |
260
+ | Export graph for semantic/visual tools | `npx workspai workspace graph graphml --output workspace-graph.graphml` |
261
+ | Trace a relationship and its evidence | `npx workspai workspace graph path <from> <to> --json` |
262
+ | Compare two knowledge-graph revisions | `npx workspai workspace graph overlay --from <graph.json> --json` |
263
+ | Generate agent-ready context | `npx workspai workspace context --for-agent --json --write` |
264
+ | Generate portable agent and IDE surfaces | `npx workspai workspace agent-sync --write --refresh-context --preset enterprise --json` |
265
+ | Expose current evidence to MCP clients | `npx workspai workspace mcp serve` |
266
+
267
+ ### Governance and operations
268
+
269
+ | What you need | Command |
270
+ | ------------------------------------ | --------------------------------------------------------------------------- |
271
+ | Run affected project tests | `npx workspai workspace run test --affected --blast-radius --json` |
272
+ | Run the release/governance gate | `npx workspai pipeline --json --strict` |
273
+ | Run the canonical intelligence chain | `npx workspai workspace intelligence run --for-agent codex --strict --json` |
160
274
 
161
275
  `workspace verify` consumes current impact, doctor, contract, analysis, and
162
276
  readiness evidence. Use `workspace intelligence run` for the canonical chain,
@@ -211,6 +325,11 @@ including `AGENTS.md`, report indexes, skills, and supported Copilot, Cursor,
211
325
  Claude, and Codex surfaces. AI tools begin with the same scope, commands,
212
326
  contracts, blockers, and verification evidence used by humans and CI.
213
327
 
328
+ For a user-focused graph quickstart, AI output paths, performance boundaries,
329
+ and reproducible token-efficiency methodology, see the
330
+ [Workspace Knowledge Graph guide](docs/workspace-knowledge-graph.md) and
331
+ [Graph Benchmark Methodology](docs/graph-benchmark-methodology.md).
332
+
214
333
  ## Outputs and Consumers
215
334
 
216
335
  Workspai separates human output, machine output, and durable cross-tool state:
@@ -227,21 +346,39 @@ Workspai separates human output, machine output, and durable cross-tool state:
227
346
 
228
347
  Important durable outputs:
229
348
 
230
- | Artifact | Producer | Used for |
231
- | ------------------------------------------------------- | ------------------------------ | ------------------------------------- |
232
- | `.workspai/reports/workspace-model.json` | `workspace model --write` | Canonical system structure |
233
- | `.workspai/reports/workspace-model-diff-last-run.json` | `workspace diff` | Structural change evidence |
234
- | `.workspai/reports/workspace-impact-last-run.json` | `workspace impact` | Blast radius and affected scope |
235
- | `.workspai/reports/workspace-verify-last-run.json` | `workspace verify` | Structured verification gate |
236
- | `.workspai/reports/workspace-context-agent.json` | `workspace context --write` | Canonical agent context |
237
- | `.workspai/reports/INDEX.json` | `workspace agent-sync --write` | Agent read order and report discovery |
238
- | `.workspai/reports/workspace-explain-last-run.json` | `workspace explain --write` | Evidence-backed narrative |
239
- | `.workspai/reports/workspace-intelligence-history.json` | Verify and feedback flows | Trends and audit history |
240
- | `.workspai/reports/pipeline-last-run.json` | `pipeline --json` | CI and release workflow result |
349
+ | Artifact | Producer | Used for |
350
+ | ------------------------------------------------------------------- | ------------------------------ | ------------------------------------------------ |
351
+ | `.workspai/reports/workspace-model.json` | `workspace model --write` | Canonical system structure |
352
+ | `.workspai/reports/workspace-knowledge-graph.json` | `workspace model --write` | Proof-backed retrieval and MCP |
353
+ | `.workspai/reports/workspace-model-diff-last-run.json` | `workspace diff` | Structural change evidence |
354
+ | `.workspai/reports/workspace-impact-last-run.json` | `workspace impact` | Blast radius and affected scope |
355
+ | `.workspai/reports/workspace-verify-last-run.json` | `workspace verify` | Structured verification gate |
356
+ | `.workspai/reports/workspace-context-agent.json` | `workspace context --write` | Canonical agent context |
357
+ | `.workspai/reports/INDEX.json` | `workspace agent-sync --write` | Agent read order and report discovery |
358
+ | `.workspai/reports/workspace-explain-last-run.json` | `workspace explain --write` | Evidence-backed narrative |
359
+ | `.workspai/reports/workspace-intelligence-history.json` | Verify and feedback flows | Trends and audit history |
360
+ | `.workspai/reports/workspace-intelligence-evaluation-live.json` | `workspace eval init/record` | Live provider/tokenizer usage and activity |
361
+ | `.workspai/reports/workspace-intelligence-evaluation-last-run.json` | `workspace eval report` | Final usage, cost, and verified outcome evidence |
362
+ | `.workspai/reports/pipeline-last-run.json` | `pipeline --json` | CI and release workflow result |
241
363
 
242
364
  See the [Artifact Catalog](docs/contracts/ARTIFACT_CATALOG.md) for the complete
243
365
  writer, schema, and consumer map.
244
366
 
367
+ ### Graph interchange formats
368
+
369
+ The canonical persisted graph is JSON. Explicit projections make the same
370
+ governed data usable in documentation, semantic systems, and visualization
371
+ tools without changing the source of truth:
372
+
373
+ | Format | Typical use | Command selector |
374
+ | ------- | --------------------------------------- | ----------------------------- |
375
+ | JSON | Canonical artifact and programmatic use | `workspace graph emit --json` |
376
+ | JSON-LD | Semantic-web and linked-data tools | `workspace graph jsonld` |
377
+ | Mermaid | Markdown documentation and diagrams | `workspace graph mermaid` |
378
+ | DOT | Graphviz rendering | `workspace graph dot` |
379
+ | GraphML | General graph analysis tools | `workspace graph graphml` |
380
+ | GEXF | Exploration and visualization tools | `workspace graph gexf` |
381
+
245
382
  ## Onboard Software
246
383
 
247
384
  All onboarding routes feed the same Workspace Intelligence model.
@@ -291,20 +428,27 @@ Python is not required for Python-free workspace profiles, npm-owned backend
291
428
  generators, frontend generators, or workspaces created with
292
429
  `--skip-python-engine`.
293
430
 
431
+ RapidKit Core is the optional Python engine used only by Python/Core-dependent
432
+ workflows; it is not a replacement CLI.
433
+
294
434
  ## Documentation
295
435
 
296
- | Documentation | Purpose |
297
- | ---------------------------------------------------------------------------- | -------------------------------------------------------- |
298
- | [Documentation index](docs/README.md) | All user, operator, contract, and contributor docs |
299
- | [Command reference](docs/commands-reference.md) | Complete command syntax and flags |
300
- | [Creating workspaces and projects](docs/creating-workspaces-and-projects.md) | Interactive, automated, location, and linking behavior |
301
- | [Workspace operations](docs/workspace-operations.md) | Adopt, import, snapshots, archives, contracts, and infra |
302
- | [Workspace run](docs/workspace-run.md) | Polyglot and affected-project execution |
303
- | [Doctor command](docs/doctor-command.md) | Health checks, evidence, fixes, and exit codes |
304
- | [CI workflows](docs/ci-workflows.md) | CI examples and repository validation |
305
- | [Configuration](docs/config-file-guide.md) | User configuration and precedence |
306
- | [Open-source scenarios](docs/OPEN_SOURCE_USER_SCENARIOS.md) | Role-oriented examples |
307
- | [Artifact Catalog](docs/contracts/ARTIFACT_CATALOG.md) | Canonical files, writers, schemas, and readers |
436
+ | Documentation | Purpose |
437
+ | ------------------------------------------------------------------------------ | ------------------------------------------------------------- |
438
+ | [Documentation index](docs/README.md) | All user, operator, contract, and contributor docs |
439
+ | [Command reference](docs/commands-reference.md) | Complete command syntax and flags |
440
+ | [Creating workspaces and projects](docs/creating-workspaces-and-projects.md) | Interactive, automated, location, and linking behavior |
441
+ | [Workspace operations](docs/workspace-operations.md) | Adopt, import, snapshots, archives, contracts, and infra |
442
+ | [Workspace run](docs/workspace-run.md) | Polyglot and affected-project execution |
443
+ | [Workspace Knowledge Graph](docs/workspace-knowledge-graph.md) | Proof-backed queries, AI/MCP retrieval, and graph outputs |
444
+ | [Graph benchmark methodology](docs/graph-benchmark-methodology.md) | Reproducible payload-reduction measurements and claim limits |
445
+ | [Workspace Intelligence Evaluation](docs/workspace-intelligence-evaluation.md) | Live token, cost, activity, and verified-outcome measurements |
446
+ | [Glossary](docs/GLOSSARY.md) | Plain-language meanings for model, graph, evidence, and gates |
447
+ | [Doctor command](docs/doctor-command.md) | Health checks, evidence, fixes, and exit codes |
448
+ | [CI workflows](docs/ci-workflows.md) | CI examples and repository validation |
449
+ | [Configuration](docs/config-file-guide.md) | User configuration and precedence |
450
+ | [Open-source scenarios](docs/OPEN_SOURCE_USER_SCENARIOS.md) | Role-oriented examples |
451
+ | [Artifact Catalog](docs/contracts/ARTIFACT_CATALOG.md) | Canonical files, writers, schemas, and readers |
308
452
 
309
453
  Repository workflows include
310
454
  [`.github/workflows/ci.yml`](../../.github/workflows/ci.yml),
@@ -327,7 +471,7 @@ contributor-automation map.
327
471
  | Python/Core workflow cannot start | `python3 --version` | Install Python 3.10+ or use a Python-free profile where supported |
328
472
  | Workspace is not detected | Look for `.workspai-workspace` | Run from the workspace or pass `--workspace <path>` |
329
473
  | Strict policy blocks a command | `.workspai/policies.yml` | Inspect `workspace policy show` before changing policy |
330
- | Reports are stale | Report timestamps | Re-run `pipeline` or the required chain stages |
474
+ | Reports are stale | Report timestamps | Re-run `workspace intelligence run` or the documented producing command |
331
475
  | AI tools ignore workspace evidence | `AGENTS.md` and `.workspai/reports/INDEX.json` | Run `workspace agent-sync --write --refresh-context` |
332
476
  | Project generator fails | Runtime and network output | Fix the reported prerequisite, then retry or create officially and adopt |
333
477
 
@@ -107,7 +107,17 @@
107
107
  },
108
108
  {
109
109
  "path": ".workspai/reports/workspace-model.json",
110
- "label": "Workspace model graph",
110
+ "label": "Workspace model",
111
+ "required": false
112
+ },
113
+ {
114
+ "path": ".workspai/reports/workspace-knowledge-graph.json",
115
+ "label": "Workspace knowledge graph",
116
+ "required": false
117
+ },
118
+ {
119
+ "path": ".workspai/reports/workspace-intelligence-evaluation-last-run.json",
120
+ "label": "Workspace Intelligence evaluation",
111
121
  "required": false
112
122
  },
113
123
  {
@@ -0,0 +1,14 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://getrapidkit.com/schemas/bootstrap-compliance.v1.json",
4
+ "type": "object",
5
+ "required": ["schemaVersion", "command", "timestamp", "result", "checks"],
6
+ "properties": {
7
+ "schemaVersion": { "const": "bootstrap-compliance.v1" },
8
+ "command": { "const": "bootstrap" },
9
+ "timestamp": { "type": "string", "format": "date-time" },
10
+ "result": { "enum": ["ok", "ok_with_warnings", "blocked", "failed"] },
11
+ "checks": { "type": "array", "items": { "type": "object" } }
12
+ },
13
+ "additionalProperties": true
14
+ }
@@ -1200,6 +1200,10 @@
1200
1200
  "flags": "--scan-depth <count>",
1201
1201
  "attributeName": "scanDepth"
1202
1202
  },
1203
+ {
1204
+ "flags": "--limit <count>",
1205
+ "attributeName": "limit"
1206
+ },
1203
1207
  {
1204
1208
  "flags": "--cache",
1205
1209
  "attributeName": "cache"
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "schemaVersion": "rapidkit-extension-cli-compatibility.v1",
3
3
  "cli": "workspai",
4
- "minimumVerifiedCliVersion": "0.46.0",
4
+ "minimumVerifiedCliVersion": "0.48.0",
5
5
  "publishedContractSchemas": {
6
+ "workspaceContract": 1,
6
7
  "runtimeCommandSurface": "rapidkit-runtime-command-surface-v1",
7
8
  "cliRuntimeCommandInventory": "workspai-cli-runtime-command-inventory-v1",
8
9
  "cliOperationResult": "workspai-cli-operation-result-v1",
@@ -15,6 +16,7 @@
15
16
  "workspaceIntelligenceChain": "workspai-workspace-intelligence-chain-v1",
16
17
  "workspaceIntelligenceArtifacts": {
17
18
  "model": "workspace-model.v1",
19
+ "knowledgeGraph": "workspace-knowledge-graph.v1",
18
20
  "snapshot": "workspace-model-snapshot.v1",
19
21
  "diff": "workspace-model-diff.v1",
20
22
  "impact": "workspace-impact.v1",
@@ -30,7 +32,9 @@
30
32
  "skillsIndex": "workspace-skills-index.v1",
31
33
  "agents": null,
32
34
  "explain": "workspace-explain.v1",
33
- "intelligenceRun": "workspace-intelligence-run.v1"
35
+ "intelligenceRun": "workspace-intelligence-run.v1",
36
+ "evaluationLive": "workspace-intelligence-evaluation.v1",
37
+ "evaluationLastRun": "workspace-intelligence-evaluation.v1"
34
38
  },
35
39
  "cliLogEvent": "cli-log-event-v1",
36
40
  "freshnessMetadata": "rapidkit-freshness-metadata-v1",
@@ -41,6 +45,13 @@
41
45
  "workspaceVerify": "workspace-verify.v1",
42
46
  "workspaceContext": "workspace-context.v1",
43
47
  "workspaceDependencyGraph": "workspace-dependency-graph.v1",
48
+ "workspaceKnowledgeGraph": "workspace-knowledge-graph.v1",
49
+ "workspaceKnowledgeGraphChangeOverlay": "workspace-knowledge-graph-change-overlay.v1",
50
+ "workspaceKnowledgeSearch": "workspace-knowledge-search.v1",
51
+ "workspaceGraphTokenEfficiency": "workspace-graph-token-efficiency.v1",
52
+ "modelUsageEvent": "model-usage-event.v1",
53
+ "workspaceIntelligenceEvaluation": "workspace-intelligence-evaluation.v1",
54
+ "workspaceIntelligenceEvaluationComparison": "workspace-intelligence-evaluation-comparison.v1",
44
55
  "workspaceIntelligenceHistory": "workspace-intelligence-history.v1",
45
56
  "agentCustomizationPackCapabilities": "workspai-agent-customization-pack-capabilities.v1",
46
57
  "agentCustomizationPackReport": "rapidkit-agent-customization-pack.v1",
@@ -0,0 +1,16 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://getrapidkit.com/schemas/mirror-ops.v1.json",
4
+ "type": "object",
5
+ "required": ["schemaVersion", "command", "action", "result", "timestamp", "workspacePath", "mirror"],
6
+ "properties": {
7
+ "schemaVersion": { "const": "mirror-ops.v1" },
8
+ "command": { "const": "mirror" },
9
+ "action": { "enum": ["status", "sync", "verify", "rotate"] },
10
+ "result": { "enum": ["ok", "failed"] },
11
+ "timestamp": { "type": "string", "format": "date-time" },
12
+ "workspacePath": { "type": "string", "minLength": 1 },
13
+ "mirror": { "type": "object" }
14
+ },
15
+ "additionalProperties": true
16
+ }
@@ -1,6 +1,11 @@
1
1
  {
2
2
  "schemaVersion": "workspai-published-contract-catalog-v1",
3
3
  "contracts": {
4
+ "workspaceContract": {
5
+ "schemaVersion": 1,
6
+ "contractPath": "contracts/workspace-contract.v1.json",
7
+ "publication": "json-schema"
8
+ },
4
9
  "runtimeCommandSurface": {
5
10
  "schemaVersion": "rapidkit-runtime-command-surface-v1",
6
11
  "contractPath": "contracts/runtime-command-surface.v1.json",
@@ -54,6 +59,7 @@
54
59
  "workspaceIntelligenceArtifacts": {
55
60
  "schemaVersion": {
56
61
  "model": "workspace-model.v1",
62
+ "knowledgeGraph": "workspace-knowledge-graph.v1",
57
63
  "snapshot": "workspace-model-snapshot.v1",
58
64
  "diff": "workspace-model-diff.v1",
59
65
  "impact": "workspace-impact.v1",
@@ -69,7 +75,9 @@
69
75
  "skillsIndex": "workspace-skills-index.v1",
70
76
  "agents": null,
71
77
  "explain": "workspace-explain.v1",
72
- "intelligenceRun": "workspace-intelligence-run.v1"
78
+ "intelligenceRun": "workspace-intelligence-run.v1",
79
+ "evaluationLive": "workspace-intelligence-evaluation.v1",
80
+ "evaluationLastRun": "workspace-intelligence-evaluation.v1"
73
81
  },
74
82
  "contractPath": null,
75
83
  "publication": "embedded-type",
@@ -79,6 +87,11 @@
79
87
  "schemaVersion": "workspace-model.v1",
80
88
  "contractPath": "contracts/workspace-intelligence/workspace-model.v1.json"
81
89
  },
90
+ "knowledgeGraph": {
91
+ "path": ".workspai/reports/workspace-knowledge-graph.json",
92
+ "schemaVersion": "workspace-knowledge-graph.v1",
93
+ "contractPath": "contracts/workspace-intelligence/workspace-knowledge-graph.v1.json"
94
+ },
82
95
  "snapshot": {
83
96
  "path": ".workspai/reports/workspace-model-snapshot.json",
84
97
  "schemaVersion": "workspace-model-snapshot.v1",
@@ -158,6 +171,16 @@
158
171
  "path": ".workspai/reports/workspace-intelligence-run-last-run.json",
159
172
  "schemaVersion": "workspace-intelligence-run.v1",
160
173
  "contractPath": "contracts/workspace-intelligence/workspace-intelligence-run.v1.json"
174
+ },
175
+ "evaluationLive": {
176
+ "path": ".workspai/reports/workspace-intelligence-evaluation-live.json",
177
+ "schemaVersion": "workspace-intelligence-evaluation.v1",
178
+ "contractPath": "contracts/workspace-intelligence/workspace-intelligence-evaluation.v1.json"
179
+ },
180
+ "evaluationLastRun": {
181
+ "path": ".workspai/reports/workspace-intelligence-evaluation-last-run.json",
182
+ "schemaVersion": "workspace-intelligence-evaluation.v1",
183
+ "contractPath": "contracts/workspace-intelligence/workspace-intelligence-evaluation.v1.json"
161
184
  }
162
185
  }
163
186
  },
@@ -206,6 +229,41 @@
206
229
  "contractPath": "contracts/workspace-intelligence/workspace-dependency-graph.v1.json",
207
230
  "publication": "json-schema"
208
231
  },
232
+ "workspaceKnowledgeGraph": {
233
+ "schemaVersion": "workspace-knowledge-graph.v1",
234
+ "contractPath": "contracts/workspace-intelligence/workspace-knowledge-graph.v1.json",
235
+ "publication": "json-schema"
236
+ },
237
+ "workspaceKnowledgeGraphChangeOverlay": {
238
+ "schemaVersion": "workspace-knowledge-graph-change-overlay.v1",
239
+ "contractPath": "contracts/workspace-intelligence/workspace-knowledge-graph-change-overlay.v1.json",
240
+ "publication": "json-schema"
241
+ },
242
+ "workspaceKnowledgeSearch": {
243
+ "schemaVersion": "workspace-knowledge-search.v1",
244
+ "contractPath": "contracts/workspace-intelligence/workspace-knowledge-search.v1.json",
245
+ "publication": "json-schema"
246
+ },
247
+ "workspaceGraphTokenEfficiency": {
248
+ "schemaVersion": "workspace-graph-token-efficiency.v1",
249
+ "contractPath": "contracts/workspace-intelligence/workspace-graph-token-efficiency.v1.json",
250
+ "publication": "json-schema"
251
+ },
252
+ "modelUsageEvent": {
253
+ "schemaVersion": "model-usage-event.v1",
254
+ "contractPath": "contracts/workspace-intelligence/model-usage-event.v1.json",
255
+ "publication": "json-schema"
256
+ },
257
+ "workspaceIntelligenceEvaluation": {
258
+ "schemaVersion": "workspace-intelligence-evaluation.v1",
259
+ "contractPath": "contracts/workspace-intelligence/workspace-intelligence-evaluation.v1.json",
260
+ "publication": "json-schema"
261
+ },
262
+ "workspaceIntelligenceEvaluationComparison": {
263
+ "schemaVersion": "workspace-intelligence-evaluation-comparison.v1",
264
+ "contractPath": "contracts/workspace-intelligence/workspace-intelligence-evaluation-comparison.v1.json",
265
+ "publication": "json-schema"
266
+ },
209
267
  "workspaceIntelligenceHistory": {
210
268
  "schemaVersion": "workspace-intelligence-history.v1",
211
269
  "contractPath": "contracts/workspace-intelligence/workspace-intelligence-history.v1.json",