workspai 0.50.0 → 0.51.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 (91) hide show
  1. package/README.md +126 -497
  2. package/contracts/create-planner-capabilities.v1.json +10 -1
  3. package/contracts/extension-cli-compatibility.v1.json +1 -1
  4. package/dist/analyze-4H33PAUB.js +1 -0
  5. package/dist/{artifact-remediation-plan-ICN3KOFG.js → artifact-remediation-plan-TQ6KTTXD.js} +1 -1
  6. package/dist/autopilot-release-BHZYM5KX.js +1 -0
  7. package/dist/chunk-3D2PAIRH.js +3 -0
  8. package/dist/{chunk-C35UXTDM.js → chunk-4WJC5QCD.js} +1 -1
  9. package/dist/{chunk-MV7KF75Q.js → chunk-6HLPTJZ3.js} +1 -1
  10. package/dist/{chunk-CV5HKU4P.js → chunk-7T4TSV5C.js} +1 -1
  11. package/dist/chunk-BBGNDMRU.js +2 -0
  12. package/dist/{chunk-VKTUWUS6.js → chunk-BG4FWJJ3.js} +1 -1
  13. package/dist/chunk-BYTFXQ6G.js +1 -0
  14. package/dist/chunk-DLM6C7FU.js +8 -0
  15. package/dist/chunk-E3CT7TYT.js +1 -0
  16. package/dist/chunk-EPVFKJF4.js +1 -0
  17. package/dist/{chunk-5EXZBCAZ.js → chunk-FKWB66NQ.js} +1 -1
  18. package/dist/{chunk-RTVRZFIJ.js → chunk-FZ76CF2W.js} +1 -1
  19. package/dist/{chunk-C3FLCDRN.js → chunk-GBAO4GSW.js} +1 -1
  20. package/dist/{chunk-AL2A7Q4X.js → chunk-GQRWRHSR.js} +31 -31
  21. package/dist/{chunk-BQGBU2Y3.js → chunk-HE4PUMU4.js} +1 -1
  22. package/dist/{chunk-KXG6E5VK.js → chunk-HMGPELXS.js} +1 -1
  23. package/dist/chunk-HSZCINFX.js +2 -0
  24. package/dist/chunk-L2E2Z4OE.js +5 -0
  25. package/dist/chunk-MAF3LLGK.js +691 -0
  26. package/dist/chunk-PS5F4DCT.js +1 -0
  27. package/dist/{chunk-LZQUZGXB.js → chunk-Q6TKQVKQ.js} +1 -1
  28. package/dist/chunk-TROHVI2V.js +2 -0
  29. package/dist/{chunk-IPJ5URDF.js → chunk-U2LR73E2.js} +1 -1
  30. package/dist/chunk-U2QL5733.js +36 -0
  31. package/dist/{chunk-DDQ3XK3H.js → chunk-VCW5HSPC.js} +2 -2
  32. package/dist/{chunk-6UTM5AJI.js → chunk-VU2BKKMB.js} +1 -1
  33. package/dist/chunk-WJVB6SSD.js +16 -0
  34. package/dist/{chunk-SS2VV3D5.js → chunk-XBM2P45G.js} +2 -2
  35. package/dist/{create-I23DC7SN.js → create-SBFBFXKN.js} +1 -1
  36. package/dist/{doctor-DOOMYLIH.js → doctor-OPCMTBJB.js} +1 -1
  37. package/dist/index.js +229 -229
  38. package/dist/{pipeline-U77HSINC.js → pipeline-7BUXAFS2.js} +1 -1
  39. package/dist/{project-test-coverage-4TEHZJFC.js → project-test-coverage-BALEHHTT.js} +1 -1
  40. package/dist/{workspace-ZEYUVR26.js → workspace-U6ZQLELX.js} +1 -1
  41. package/dist/{workspace-agent-sync-DKYJLUDP.js → workspace-agent-sync-L4SY7B4Q.js} +1 -1
  42. package/dist/workspace-context-KOBSLZTI.js +1 -0
  43. package/dist/{workspace-contract-PVLGPBBV.js → workspace-contract-SOD3OOVF.js} +1 -1
  44. package/dist/{workspace-explain-64HNKAHO.js → workspace-explain-2CTMW2YW.js} +1 -1
  45. package/dist/{workspace-feedback-RATRXFUC.js → workspace-feedback-ZZ4HPW2T.js} +1 -1
  46. package/dist/{workspace-foundation-D33LJLGT.js → workspace-foundation-PUIYBQUF.js} +1 -1
  47. package/dist/{workspace-graph-stream-THNG2T7R.js → workspace-graph-stream-BLKIC7VN.js} +1 -1
  48. package/dist/workspace-graph-token-efficiency-5FNH4JZ5.js +1 -0
  49. package/dist/{workspace-history-EWFPT74O.js → workspace-history-SPKNRHIX.js} +1 -1
  50. package/dist/{workspace-intelligence-MCNSWWDV.js → workspace-intelligence-I3ABOH2F.js} +1 -1
  51. package/dist/workspace-intelligence-runner-Q2XSR3ZL.js +1 -0
  52. package/dist/{workspace-knowledge-graph-2EYR7N56.js → workspace-knowledge-graph-5MKEI4Z5.js} +1 -1
  53. package/dist/{workspace-knowledge-graph-query-VOSPPH4W.js → workspace-knowledge-graph-query-EKHIE3E2.js} +1 -1
  54. package/dist/{workspace-mcp-serve-FLAVKWYW.js → workspace-mcp-serve-ETNUA72W.js} +1 -1
  55. package/dist/{workspace-model-FMFYLHE4.js → workspace-model-HHA37SNH.js} +1 -1
  56. package/dist/{workspace-onboarding-MYROZDI2.js → workspace-onboarding-ELHZABJE.js} +1 -1
  57. package/dist/workspace-readme-HGGZ4AZB.js +77 -0
  58. package/dist/{workspace-registry-summary-6VXIAQLX.js → workspace-registry-summary-D2QM5JF6.js} +1 -1
  59. package/dist/workspace-run-DAAZBCN7.js +1 -0
  60. package/dist/{workspace-verify-FKYI65UQ.js → workspace-verify-4WJTLXRA.js} +1 -1
  61. package/dist/{workspace-watch-RP5KMVP2.js → workspace-watch-2PIFTQ6B.js} +1 -1
  62. package/docs/README_CONTENT_CONTRACT.md +98 -124
  63. package/docs/ci-workflows.md +13 -4
  64. package/docs/commands-reference.md +4 -2
  65. package/docs/workspace-knowledge-graph.md +39 -0
  66. package/docs/workspace-operations.md +9 -6
  67. package/package.json +6 -3
  68. package/scripts/enterprise-package-smoke.mjs +11 -0
  69. package/templates/kits/fastapi-ddd/README.md.j2 +1 -1
  70. package/templates/kits/fastapi-standard/README.md.j2 +1 -1
  71. package/templates/kits/nestjs-standard/Dockerfile.j2 +1 -1
  72. package/templates/kits/nestjs-standard/README.md.j2 +1 -1
  73. package/templates/kits/nestjs-standard/package.json.j2 +11 -2
  74. package/dist/analyze-ZFQWTCJQ.js +0 -1
  75. package/dist/autopilot-release-VKXQ7BS7.js +0 -1
  76. package/dist/chunk-2AXEGYPL.js +0 -1
  77. package/dist/chunk-GNQRYISX.js +0 -5
  78. package/dist/chunk-I42F552T.js +0 -2
  79. package/dist/chunk-IDQKVJUF.js +0 -2
  80. package/dist/chunk-JFUD73OZ.js +0 -933
  81. package/dist/chunk-KKAOTTYO.js +0 -8
  82. package/dist/chunk-KMLPHFLD.js +0 -2
  83. package/dist/chunk-L2YK5RV2.js +0 -1
  84. package/dist/chunk-LAJM2SBP.js +0 -15
  85. package/dist/chunk-UETZ7USY.js +0 -36
  86. package/dist/chunk-WDKNMTJQ.js +0 -1
  87. package/dist/chunk-YPKNQCLK.js +0 -2
  88. package/dist/workspace-context-IHUFMZT3.js +0 -1
  89. package/dist/workspace-graph-token-efficiency-CFGFCJ5V.js +0 -1
  90. package/dist/workspace-intelligence-runner-TG2VLHNZ.js +0 -1
  91. package/dist/workspace-run-2ZI5UMJ2.js +0 -1
package/README.md CHANGED
@@ -3,584 +3,213 @@
3
3
  [![npm version](https://img.shields.io/npm/v/workspai.svg?style=flat-square)](https://www.npmjs.com/package/workspai)
4
4
  [![Downloads](https://img.shields.io/npm/dm/workspai.svg?style=flat-square)](https://www.npmjs.com/package/workspai)
5
5
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square)](LICENSE)
6
- [![Built by Workspai](https://img.shields.io/badge/Built%20by-Workspai-0f172a?logo=github)](https://workspai.dev)
7
6
 
8
7
  ## Workspace Intelligence for software systems
9
8
 
10
9
  > One workspace. One truth. Humans and AI aligned.
11
10
 
12
- Workspai is an open-source CLI that connects one or many software projects and
13
- keeps a current, checkable view of the whole system. Developers, CI, IDEs,
14
- MCP-compatible tools, and AI agents can use that same view instead of rebuilding
15
- different context from scattered files.
11
+ Workspai is an open-source CLI that brings related software projects together,
12
+ so people and AI tools can understand and work with the same system.
16
13
 
17
14
  - **See the system:** projects, runtimes, APIs, dependencies, infrastructure,
18
- documentation, policies, and release state in one model.
19
- - **Ask with proof:** get focused answers that link back to the supporting files
20
- and facts.
21
- - **Change with confidence:** see what may be affected, run the right checks,
22
- and prepare useful context for AI tools.
15
+ documentation, tests, policies, and release state.
16
+ - **Ask with proof:** search relationships and trace them back to source files.
17
+ - **Act with confidence:** understand impact, verify changes, and prepare focused
18
+ context for AI tools.
23
19
 
24
20
  [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
31
-
32
- Your software system is more than a repository. It may include several
33
- applications and services, shared packages, API definitions, deployment files,
34
- documentation, tests, owners, and CI results. Workspai connects those parts
35
- without asking an AI model to decide what is true.
36
-
37
- | Term | Plain-language meaning |
38
- | ------------------- | ------------------------------------------------------------------------------------ |
39
- | **Workspace** | A home for related projects, shared rules, and saved results |
40
- | **Project** | An application, service, library, or existing source folder connected to a workspace |
41
- | **Workspace Model** | The main saved record of what Workspai knows about the system |
42
- | **Knowledge Graph** | A searchable map built from the model, with links back to supporting files |
43
- | **Evidence** | The file, observation, hash, or report that supports an answer |
44
- | **Artifact** | A file under `.workspai/` that people and other tools can read |
45
-
46
- The Workspace Model is the canonical source of truth. This means it is the main
47
- saved record. The Knowledge Graph is built from that record to make
48
- relationships easy to search; it is not a second truth and it is not an AI
49
- guess. In the technical contract, the graph is a derived, revision-bound
50
- representation of the model.
51
-
52
- The deterministic model, graph, contracts, and verification chain do not
53
- require an AI API key. Optional AI-backed features declare that dependency
54
- separately.
21
+ [Everyday workflows](#everyday-workflows) ·
22
+ [How it works](#how-workspace-intelligence-works) ·
23
+ [Documentation](docs/README.md)
55
24
 
56
- ## Start in two minutes
57
-
58
- ### 1. Install or use `npx`
59
-
60
- ```bash
61
- npm install -g workspai
62
- workspai --help
63
- ```
64
-
65
- Global installation is optional. Every example below also works with
66
- `npx workspai`. The separate `wspai` package is only a short alias:
25
+ ![From Code to Shared Understanding](https://raw.githubusercontent.com/chistiq/workspai/main/packages/cli/docs/From%20Code%20to%20Shared%20Understanding.png)
67
26
 
68
- ```bash
69
- npx wspai --help
70
- ```
27
+ ## Start in two minutes
71
28
 
72
- `workspai` is the main npm package and command. `wspai` is an optional shorter
73
- name for interactive use. This package is the active CLI in the
74
- [Workspai monorepo](../../README.md).
29
+ ### Use an existing project
75
30
 
76
- ### 2. Connect an existing project
31
+ Open the project and adopt it:
77
32
 
78
33
  ```bash
79
34
  cd /absolute/path/to/project
80
35
  npx workspai adopt .
81
36
  ```
82
37
 
83
- `adopt` registers the project without moving or copying it. When run outside a
84
- workspace, it creates or reuses the minimal default workspace and binds the
85
- project to it.
86
-
87
- ### 3. Continue from the project
38
+ The project stays where it is. Workspai creates or reuses a minimal workspace
39
+ in the default system location and records a validated local link.
88
40
 
89
- The project is now a first-class entry point into its Workspai workspace. Stay
90
- in the project directory and run:
41
+ Stay in the same project directory and run the complete intelligence loop:
91
42
 
92
43
  ```bash
93
- npx workspai project workspace status --json
94
44
  npx workspai workspace intelligence run --for-agent generic --strict --json
95
45
  ```
96
46
 
97
- Workspai resolves the canonical workspace through a validated machine-local
98
- link. That link is gitignored; portable project grounding and bounded agent
99
- context are written under the project's `.workspai/` directory. The project
100
- lens carries bounded topology, related projects, API/deployment/test surfaces,
101
- current blockers, proof paths, and model/graph freshness without copying the
102
- full workspace graph. You only need `--workspace <path>` when resolving an
103
- ambiguous or moved binding.
47
+ Workspai now knows which workspace owns the project. You only need
48
+ `--workspace <path>` when a moved or ambiguous binding cannot be resolved.
104
49
 
105
- `generic` creates vendor-neutral context. Use `codex`, `claude`, `cursor`, or
106
- `orca` when you want context shaped for that agent. Agent Sync also writes the
107
- shared files used by GitHub Copilot, VS Code, and `AGENTS.md` consumers without
108
- changing the system information or the checks Workspai runs.
50
+ ### Start new software
109
51
 
110
- The run saves its results so people and tools can inspect and reuse them:
111
-
112
- ```text
113
- .workspai/
114
- ├── workspace.json
115
- ├── workspace.contract.json
116
- ├── AGENT-GROUNDING.md
117
- └── reports/
118
- ├── workspace-model.json
119
- ├── workspace-knowledge-graph.json
120
- ├── workspace-impact-last-run.json
121
- ├── workspace-verify-last-run.json
122
- ├── workspace-context-agent.json
123
- ├── workspace-intelligence-run-last-run.json
124
- └── INDEX.json
125
- AGENTS.md
126
- ```
127
-
128
- Each registered project also receives:
129
-
130
- ```text
131
- .workspai/
132
- ├── workspace-link.local.json # machine-local, gitignored
133
- ├── PROJECT-GROUNDING.md # portable entry guide
134
- └── reports/project-context-agent.json
135
- AGENTS.md # existing content preserved
136
- ```
137
-
138
- For automation details, including exit codes and blocked results, see the
139
- [Unified runner guide](docs/workspace-intelligence-runner.md). A blocked result
140
- is useful evidence, not a crashed command.
141
-
142
- When you are ready for the broader release workflow, run:
52
+ Use the guided flow:
143
53
 
144
54
  ```bash
145
- npx workspai pipeline --json --strict
55
+ npx workspai create
146
56
  ```
147
57
 
148
- Starting new software instead?
149
-
150
- ```bash
151
- npx workspai create workspace my-workspace --profile minimal --yes
152
- cd ~/.workspai/workspaces/my-workspace
153
- npx workspai create project nextjs web --yes
154
- ```
58
+ Choose whether to create a workspace, scaffold a project, or add existing
59
+ software. Project starters are grouped as Backend, Frontend, Desktop, and
60
+ Extension.
155
61
 
156
- The project picker is organized by **Backend**, **Frontend**, **Desktop**, and
157
- **Extension**. In addition to the existing web and service starters, Workspai
158
- can create Axum, Tauri, Electron, VS Code extension, and Laravel projects:
62
+ Global installation is optional:
159
63
 
160
64
  ```bash
161
- npx workspai create project rust.axum api
162
- npx workspai create project desktop.tauri desktop-app
163
- npx workspai create project desktop.electron admin-console
164
- npx workspai create project extension.vscode editor-tools
165
- npx workspai create project php.laravel web-api
65
+ npm install -g workspai
66
+ workspai --help
166
67
  ```
167
68
 
168
- Axum is a deterministic Workspai-owned baseline. Tauri, Electron, VS Code, and
169
- Laravel use their ecosystem generator, after which Workspai writes canonical
170
- project metadata and joins the project to the same Model, Doctor, Graph, and
171
- agent-context pipeline. All available official generators request their latest
172
- stable channel, enforce Node engine compatibility, check required local
173
- toolchains, and record that policy in project evidence. Frontend remains a
174
- first-class project category rather than being folded into a generic Node
175
- project.
69
+ `wspai` is an optional short alias for the same CLI.
176
70
 
177
- From the `my-workspace` terminal, create a project, use `adopt` to link one in
178
- place, or use `import` to copy or clone one into the workspace. See
179
- [Creating Workspaces and Projects](docs/creating-workspaces-and-projects.md)
180
- for supported starters.
71
+ ## What happens after the first run
181
72
 
182
- ## From Code to Shared Understanding
73
+ Workspai saves reusable results under `.workspai/`:
183
74
 
184
- ![From Code to Shared Understanding](https://raw.githubusercontent.com/chistiq/workspai/main/packages/cli/docs/From%20Code%20to%20Shared%20Understanding.png)
185
-
186
- [View the Mermaid source and explanation](docs/from-code-to-shared-understanding.md).
187
-
188
- Workspai is the deterministic layer between source code and its consumers:
189
-
190
- ```text
191
- Code · packages · APIs · infrastructure · docs · CI · policies
192
- │
193
- registration · detection · contract reconciliation
194
- │
195
- Canonical Workspace Model
196
- │
197
- bounded providers · facts · proofs
198
- │
199
- Evidence-backed Knowledge Graph
200
- │
201
- diff · impact · verify · context · explain
202
- │
203
- Developers · CI · IDEs · MCP · AI agents
204
- ```
205
-
206
- | Capability | What it answers |
207
- | --------------------- | ------------------------------------------------------------------------------------------- |
208
- | **Model** | What projects, runtimes, frameworks, commands, policies, contracts, and dependencies exist? |
209
- | **Snapshot and diff** | What changed between two known workspace states? |
210
- | **Impact** | Which projects and transitive dependents are affected? |
211
- | **Doctor** | Which runtime check failed, what graph evidence is related, and what should verify the fix? |
212
- | **Evidence** | What do health, analysis, contracts, and readiness reports prove? |
213
- | **Verify** | Is the affected workspace ready, blocked, stale, or missing evidence? |
214
- | **Context** | What should developers, IDEs, and AI agents know before acting? |
215
- | **Explain** | Why is a project, change, or release blocked, and what should happen next? |
216
- | **Sync** | How do tools stay aligned with the same current workspace truth? |
75
+ - `workspace-model.json` — the canonical description of the system.
76
+ - `workspace-knowledge-graph.json` — searchable relationships with proof.
77
+ - `workspace-verify-last-run.json` — the latest verification decision.
78
+ - `workspace-context-agent.json` — bounded context for agents and IDEs.
79
+ - `INDEX.json` — the current evidence inventory and recommended read order.
217
80
 
218
- Create, import, and adopt add software to this boundary. Workspace Intelligence
219
- then models and governs every registered project, whether Workspai created it or
220
- it already existed.
81
+ It also prepares `AGENTS.md` and supported agent/IDE surfaces. Developers, CI,
82
+ IDEs, MCP clients, and AI agents can therefore read the same current evidence.
221
83
 
222
- Unlike repository-only code intelligence, the workspace boundary can connect
223
- evidence across multiple projects and repositories. A missing relationship
224
- means **not proven by current evidence**, not "these projects are independent."
84
+ A blocked result is useful evidence, not a crashed command. Workspai names what
85
+ is missing or failing and keeps the generated reports available for inspection.
225
86
 
226
- ## One Intelligence Chain
227
-
228
- The canonical execution order is versioned in
229
- [`workspace-intelligence-chain.v1.json`](contracts/workspace-intelligence-chain.v1.json):
87
+ ## How Workspace Intelligence works
230
88
 
231
89
  ```text
232
- Model -> Diff -> Impact -> Doctor + Contract Verify + Analyze -> Readiness
233
- -> Verify -> Context -> Agent Sync -> Explain
234
- ```
235
-
236
- Each step declares what it consumes, what it produces, and whether its verdict
237
- continues or stops the chain. The CLI, CI, IDE integrations, generated agent
238
- instructions, and documentation can therefore use the same contract instead of
239
- inventing separate workflows.
240
-
241
- The execution envelope reports `sync` before Model and baseline resolution
242
- after Model/before Diff as exactly two `preflight` entries. They are not extra
243
- chain stages. The report always contains exactly 11 ordered `stages`; exit `0`
244
- means passed, `1` is a hard execution failure, and `2` is an evidence-blocked
245
- completed run. See [Unified Workspace Intelligence Runner](docs/workspace-intelligence-runner.md)
246
- for the complete report, baseline, failure-propagation, and CI contract.
247
-
248
- Use `workspace intelligence run --for-agent <agent> --strict --json` to execute
249
- and enforce this exact contract-backed order. `pipeline --json --strict` remains
250
- the broader governance/release orchestrator (`sync → doctor → analyze → readiness
251
- → autopilot`); it is not an alias for the canonical intelligence chain.
252
-
253
- ## Evidence and measurable context
90
+ Workspace sources
91
+ │
92
+ ▼
93
+ Canonical Workspace Model
94
+ │
95
+ ▼
96
+ Evidence-backed Knowledge Graph
97
+ │
98
+ ▼
99
+ Impact · Doctor · Verify · Context · Explain
100
+ │
101
+ ▼
102
+ Humans · CI · IDEs · MCP · AI agents
103
+ ```
104
+
105
+ The **Workspace Model is the canonical source of truth**. The Knowledge Graph is
106
+ a **derived, revision-bound representation** of that model. It can add
107
+ proof-backed detail without becoming a second source of truth or mutating the
108
+ model that authorized the run.
109
+
110
+ A missing relationship means **not proven by current evidence**, not "these
111
+ projects are independent."
112
+
113
+ The full contract-backed chain is:
254
114
 
255
- Without bounded retrieval, a developer or agent often has to search and read a
256
- large part of the workspace before answering a local question. Workspai can
257
- return the matching entities, nearby relations, and source proofs first:
258
-
259
- ```bash
260
- npx workspai workspace graph search "who implements the login API?" --limit 8 --json
115
+ ```text
116
+ Model → Diff → Impact → Doctor + Contract Verify + Analyze → Readiness
117
+ → Verify → Context → Agent Sync → Explain
261
118
  ```
262
119
 
263
- Use the complete graph for interchange and audits; use bounded search for
264
- normal questions and agent context. Workspai reports unknown or unproven
265
- relationships instead of inventing an edge.
266
-
267
- ### Current measured fixture
268
-
269
- | Measure | Observed value |
270
- | ------------------------------------ | -------------: |
271
- | Registered projects | 16 |
272
- | Knowledge Graph entities | 1,738 |
273
- | Knowledge Graph relations | 2,244 |
274
- | Portable proofs | 2,106 |
275
- | Readable proof-source artifacts | 392 |
276
- | Corpus size (`characters / 4`) | 134,105 tokens |
277
- | `api endpoint --limit 8` retrieval | 2,812 tokens |
278
- | Observed retrieval payload reduction | 97.9% |
279
- | Observed corpus/retrieval ratio | 47.69× |
280
-
281
- This is a reproducible observation from one 16-project development workspace on
282
- 2026-07-22, not a universal token-cost, answer-quality, or task-success claim.
283
- See [Graph Benchmark Methodology](docs/graph-benchmark-methodology.md) for the
284
- source hash, formulas, limitations, and publication gate. Use
285
- `workspace eval` when measuring provider-reported tokens, latency, cost, and a
286
- verified execution outcome.
287
-
288
- ## Core Workflows
289
-
290
- Use the complete intelligence runner for the normal end-to-end path. The
291
- individual commands below are useful for inspection, automation, and targeted
292
- reruns.
293
-
294
- ### Model, change, and decisions
295
-
296
- | What you need | Command |
297
- | ------------------------------------------ | ----------------------------------------------------------------------------- |
298
- | Build and persist the current system model | `npx workspai workspace model --json --write` |
299
- | Save a model baseline | `npx workspai workspace snapshot --json` |
300
- | Compare with a baseline or Git state | `npx workspai workspace diff --from <snapshot-or-git-ref> --json` |
301
- | Calculate transitive blast radius | `npx workspai workspace impact --from <diff-report> --json` |
302
- | Verify affected projects and evidence | `npx workspai workspace verify --from-impact <impact-report> --json --strict` |
303
- | Explain a blocker | `npx workspai workspace explain release-blocked --json --write` |
304
-
305
- ### Graph, agents, and interoperability
306
-
307
- | What you need | Command |
308
- | ----------------------------------------- | ---------------------------------------------------------------------------------------- |
309
- | Inspect a project in the dependency graph | `npx workspai workspace graph explain <project> --json` |
310
- | Query proof-backed workspace entities | `npx workspai workspace graph entities endpoint --json` |
311
- | Retrieve bounded context for an agent | `npx workspai workspace graph search "authentication endpoint" --limit 12 --json` |
312
- | Measure retrieval payload reduction | `npx workspai workspace graph benchmark "authentication endpoint" --limit 12 --json` |
313
- | Start a model-usage evaluation | `npx workspai workspace eval init repair-readiness workspace-intelligence --json` |
314
- | Export graph for semantic/visual tools | `npx workspai workspace graph graphml --output workspace-graph.graphml` |
315
- | Trace a relationship and its evidence | `npx workspai workspace graph path <from> <to> --json` |
316
- | Compare two knowledge-graph revisions | `npx workspai workspace graph overlay --from <graph.json> --json` |
317
- | Generate agent-ready context | `npx workspai workspace context --for-agent --json --write` |
318
- | Generate portable agent and IDE surfaces | `npx workspai workspace agent-sync --write --refresh-context --preset enterprise --json` |
319
- | Expose current evidence to MCP clients | `npx workspai workspace mcp serve` |
320
-
321
- ### Governance and operations
322
-
323
- | What you need | Command |
324
- | ------------------------------------ | ----------------------------------------------------------------------------- |
325
- | Run affected project tests | `npx workspai workspace run test --affected --blast-radius --json` |
326
- | Measure one project's test coverage | `npx workspai project coverage --run --target 80 --strict --json` |
327
- | Diagnose one project | `npx workspai doctor project --json` |
328
- | Run the release/governance gate | `npx workspai pipeline --json --strict` |
329
- | Run the canonical intelligence chain | `npx workspai workspace intelligence run --for-agent generic --strict --json` |
330
-
331
- `workspace verify` consumes current impact, doctor, contract, analysis, and
332
- readiness evidence. Use `workspace intelligence run` for the canonical chain,
333
- or `pipeline` for the broader governance/release workflow.
334
-
335
- Other useful operational commands:
120
+ Run it with:
336
121
 
337
122
  ```bash
338
- npx workspai doctor workspace
339
- npx workspai setup <python|node|go|java|dotnet|rust|php> [--warm-deps]
340
- npx workspai workspace list
341
- npx workspai cache <status|clear|prune|repair>
342
- npx workspai mirror <status|sync|verify|rotate>
123
+ npx workspai workspace intelligence run --for-agent generic --strict --json
343
124
  ```
344
125
 
345
- ### Understand a change
126
+ `pipeline --json --strict` is the broader release and governance workflow. It
127
+ complements this chain; it does not replace it.
346
128
 
347
- Create a baseline:
129
+ The deterministic model, graph, and checks do not require an AI API key.
348
130
 
349
- ```bash
350
- npx workspai workspace model --json --write
351
- npx workspai workspace snapshot --json
352
- ```
131
+ ## Everyday workflows
353
132
 
354
- After a change:
133
+ | Goal | Command |
134
+ | --- | --- |
135
+ | Use guided setup | `npx workspai create` |
136
+ | Link a project without moving it | `npx workspai adopt .` |
137
+ | Copy or clone a project into a workspace | `npx workspai import <path-or-git-url> --workspace <path>` |
138
+ | Check the current project | `npx workspai doctor project` |
139
+ | Check the whole workspace | `npx workspai doctor workspace` |
140
+ | Refresh Model and Graph | `npx workspai workspace model --write --json` |
141
+ | Ask a focused architecture question | `npx workspai workspace graph search "authentication service" --limit 12 --json` |
142
+ | Verify current evidence | `npx workspai workspace verify --strict --json` |
143
+ | Refresh agent and IDE context | `npx workspai workspace agent-sync --write --preset enterprise --json` |
355
144
 
356
- ```bash
357
- npx workspai workspace model --json --write
358
- npx workspai workspace diff \
359
- --from .workspai/reports/workspace-model-snapshot.json \
360
- --json
361
- npx workspai workspace impact \
362
- --from .workspai/reports/workspace-model-diff-last-run.json \
363
- --json
364
- ```
365
-
366
- Impact reports include affected projects and graph paths back to the change, so
367
- developers, CI, IDEs, and agents reason over the same blast radius.
145
+ For every command and flag, use the
146
+ [Command Reference](docs/commands-reference.md).
368
147
 
369
- ### Ground AI tools
148
+ ## Outputs and integrations
370
149
 
371
- Workspai creates the initial model, graph, context, `AGENTS.md`, report index,
372
- skills, and supported agent/IDE files with the workspace. It refreshes them
373
- after successful project creation, adoption, import, or workspace connection.
374
- Run Agent Sync directly only when you want an explicit refresh or different
375
- targets/preset:
150
+ Workspai exposes the same governed data through several stable surfaces:
376
151
 
377
- ```bash
378
- npx workspai workspace agent-sync \
379
- --write \
380
- --refresh-context \
381
- --preset enterprise \
382
- --json
383
- ```
152
+ - human-readable terminal summaries;
153
+ - JSON output for scripts and CI;
154
+ - versioned artifacts under `.workspai/reports/`;
155
+ - focused context and instructions for AI agents;
156
+ - MCP tools for read-oriented workspace queries;
157
+ - watch events and reports for IDEs and dashboards;
158
+ - JSON, JSON-LD, Mermaid, DOT, GraphML, and GEXF graph exports.
384
159
 
385
- This generates a versioned Agent Customization Pack from workspace evidence,
386
- including `AGENTS.md`, report indexes, skills, and supported Copilot, Cursor,
387
- Claude, and Codex surfaces. AI tools begin with the same scope, commands,
388
- contracts, blockers, and verification evidence used by humans and CI.
389
-
390
- For a user-focused graph quickstart, AI output paths, performance boundaries,
391
- and reproducible token-efficiency methodology, see the
392
- [Workspace Knowledge Graph guide](docs/workspace-knowledge-graph.md) and
393
- [Graph Benchmark Methodology](docs/graph-benchmark-methodology.md).
394
-
395
- The integrated CLI has one canonical direction: **Workspace Model → Knowledge
396
- Graph**. The model owns the workspace boundary and compact project topology;
397
- bounded providers enrich that inventory into proof-backed cross-domain
398
- relationships without writing back into the model. Both artifacts are published
399
- under one lock with rollback, and the graph contract fixes its source to
400
- `.workspai/reports/workspace-model.json` plus the model's stable structural
401
- SHA-256. Doctor, Context, MCP, and graph streaming reject a mismatched persisted
402
- graph.
403
-
404
- ## Outputs and Consumers
405
-
406
- Workspai separates human output, machine output, and durable cross-tool state:
407
-
408
- | Output | Primary consumers |
409
- | ----------------------------------------- | -------------------------------------------------- |
410
- | CLI summaries and next actions | Developers and operators |
411
- | JSON stdout | Scripts, CI jobs, IDE command bridges, and agents |
412
- | Exit codes | CI and release gates |
413
- | Persisted `.workspai/reports/*` artifacts | Developers, CI, IDEs, dashboards, and agents |
414
- | Generated grounding files | Copilot, Cursor, Claude, Codex, and other AI tools |
415
- | MCP stdio tools | MCP-compatible clients |
416
- | Workspace watch events | Incremental IDE and automation consumers |
417
-
418
- Important durable outputs:
419
-
420
- | Artifact | Producer | Used for |
421
- | ------------------------------------------------------------------- | ------------------------------ | ------------------------------------------------ |
422
- | `.workspai/reports/workspace-model.json` | `workspace model --write` | Canonical system structure |
423
- | `.workspai/reports/workspace-knowledge-graph.json` | `workspace model --write` | Proof-backed retrieval and MCP |
424
- | `.workspai/reports/workspace-model-diff-last-run.json` | `workspace diff` | Structural change evidence |
425
- | `.workspai/reports/workspace-impact-last-run.json` | `workspace impact` | Blast radius and affected scope |
426
- | `.workspai/reports/workspace-verify-last-run.json` | `workspace verify` | Structured verification gate |
427
- | `.workspai/reports/workspace-context-agent.json` | `workspace context --write` | Canonical agent context |
428
- | `.workspai/reports/INDEX.json` | `workspace agent-sync --write` | Agent read order and report discovery |
429
- | `.workspai/reports/workspace-explain-last-run.json` | `workspace explain --write` | Evidence-backed narrative |
430
- | `.workspai/reports/workspace-intelligence-history.json` | Verify and feedback flows | Trends and audit history |
431
- | `.workspai/reports/workspace-intelligence-evaluation-live.json` | `workspace eval init/record` | Live provider/tokenizer usage and activity |
432
- | `.workspai/reports/workspace-intelligence-evaluation-last-run.json` | `workspace eval report` | Final usage, cost, and verified outcome evidence |
433
- | `.workspai/reports/pipeline-last-run.json` | `pipeline --json` | CI and release workflow result |
434
-
435
- See the [Artifact Catalog](docs/contracts/ARTIFACT_CATALOG.md) for the complete
436
- writer, schema, and consumer map.
437
-
438
- ### Graph interchange formats
439
-
440
- The canonical persisted graph is JSON. Explicit projections make the same
441
- governed data usable in documentation, semantic systems, and visualization
442
- tools without changing the source of truth:
443
-
444
- | Format | Typical use | Command selector |
445
- | ------- | --------------------------------------- | ----------------------------- |
446
- | JSON | Canonical artifact and programmatic use | `workspace graph emit --json` |
447
- | JSON-LD | Semantic-web and linked-data tools | `workspace graph jsonld` |
448
- | Mermaid | Markdown documentation and diagrams | `workspace graph mermaid` |
449
- | DOT | Graphviz rendering | `workspace graph dot` |
450
- | GraphML | General graph analysis tools | `workspace graph graphml` |
451
- | GEXF | Exploration and visualization tools | `workspace graph gexf` |
452
-
453
- ## Onboard Software
454
-
455
- All onboarding routes feed the same Workspace Intelligence model.
456
-
457
- | Route | Use it when | Example |
458
- | ----------------- | ------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
459
- | Adopt | Existing source should stay in place | `npx workspai adopt /path/to/project --json` |
460
- | Import local | Existing source should be copied into a workspace | `npx workspai import ../orders-api --workspace /path/to/workspace --json` |
461
- | Import Git | A repository should be cloned into a workspace | `npx workspai import https://github.com/acme/orders-api.git --git --workspace /path/to/workspace --json` |
462
- | Connect workspace | An existing workspace should stay in place | `npx workspai workspace connect /path/to/workspace --json` |
463
- | Import workspace | A portable workspace archive should become active | `npx workspai workspace import team.workspai-archive.zip --output ./team --json` |
464
- | Create workspace | You need a new governed boundary | `npx workspai create workspace my-workspace --profile polyglot --yes` |
465
- | Create project | You need a supported new scaffold | `npx workspai create project nextjs web --yes` |
466
- | Interactive | You want Workspai to guide the choice | `npx workspai create` |
467
-
468
- Adopt and workspace connect never move or copy source. Project import copies or
469
- clones; workspace import verifies and materializes a portable archive before
470
- registration. `workspace hydrate` only extracts an archive and intentionally
471
- does not register it. Create can use a Workspai-managed kit or an available
472
- official ecosystem generator. Unsupported native create requests are directed
473
- toward official tooling followed by adoption.
474
-
475
- Detailed onboarding behavior:
476
-
477
- - [Creating Workspaces and Projects](docs/creating-workspaces-and-projects.md)
478
- - [Workspace Operations](docs/workspace-operations.md)
479
- - [Create Planner Capabilities](docs/create-planner-capabilities.md)
480
-
481
- ## Integrations
482
-
483
- - **AI tools:** Generate context, `AGENTS.md`, instructions, skills, and tool-specific surfaces with `workspace agent-sync`.
484
- - **CI:** Consume structured reports and exit codes with `pipeline --json --strict`.
485
- - **IDEs:** Read the same model, impact, verification, contract, and context artifacts used by CI.
486
- - **MCP:** Expose read-mostly workspace evidence with `workspace mcp serve`.
487
- - **VS Code:** Use the [Workspai extension](https://marketplace.visualstudio.com/items?itemName=rapidkit.rapidkit-vscode) for dashboards, impact, evidence, guided workflows, and Incident Studio.
488
-
489
- The VS Code extension invokes this npm CLI, so command-line and visual workflows
490
- share the same contracts and artifacts.
491
-
492
- The Marketplace listing may temporarily retain legacy `rapidkit` wording. The
493
- canonical package, command, metadata namespace, and Node.js requirement are the
494
- `workspai`, `.workspai`, and Node.js `>=20.19.0` contracts documented here.
160
+ The [Workspai VS Code extension](https://marketplace.visualstudio.com/items?itemName=rapidkit.rapidkit-vscode)
161
+ uses this CLI, so visual and terminal workflows share the same contracts and
162
+ artifacts.
495
163
 
496
164
  ## Requirements
497
165
 
498
166
  - Node.js `>=20.19.0`
499
167
  - npm
500
- - Python `>=3.10` only for Python/Core-dependent workflows
501
- - Java, Go, or .NET SDK only when operating those project types
502
168
 
503
- Python is not required for Python-free workspace profiles, npm-owned backend
504
- generators, frontend generators, or workspaces created with
505
- `--skip-python-engine`.
169
+ Python, Go, Java, .NET, Rust, or PHP are needed only for workflows that use
170
+ those runtimes. Python is not required for Python-free workspaces or npm-owned
171
+ project generators.
506
172
 
507
- RapidKit Core is the optional Python engine used only by Python/Core-dependent
508
- workflows; it is not a replacement CLI.
173
+ RapidKit Core is the optional Python engine for Python/Core-dependent kits and
174
+ modules; Workspai remains the workspace-level CLI.
509
175
 
510
176
  ## Documentation
511
177
 
512
- | Documentation | Purpose |
513
- | ------------------------------------------------------------------------------ | ------------------------------------------------------------- |
514
- | [Documentation index](docs/README.md) | All user, operator, contract, and contributor docs |
515
- | [Command reference](docs/commands-reference.md) | Complete command syntax and flags |
516
- | [Creating workspaces and projects](docs/creating-workspaces-and-projects.md) | Interactive, automated, location, and linking behavior |
517
- | [Workspace operations](docs/workspace-operations.md) | Adopt, import, snapshots, archives, contracts, and infra |
518
- | [Workspace run](docs/workspace-run.md) | Polyglot and affected-project execution |
519
- | [Workspace Knowledge Graph](docs/workspace-knowledge-graph.md) | Proof-backed queries, AI/MCP retrieval, and graph outputs |
520
- | [Graph benchmark methodology](docs/graph-benchmark-methodology.md) | Reproducible payload-reduction measurements and claim limits |
521
- | [Workspace Intelligence Evaluation](docs/workspace-intelligence-evaluation.md) | Live token, cost, activity, and verified-outcome measurements |
522
- | [Glossary](docs/GLOSSARY.md) | Plain-language meanings for model, graph, evidence, and gates |
523
- | [Doctor command](docs/doctor-command.md) | Health checks, evidence, fixes, and exit codes |
524
- | [CI workflows](docs/ci-workflows.md) | CI examples and repository validation |
525
- | [Configuration](docs/config-file-guide.md) | User configuration and precedence |
526
- | [Open-source scenarios](docs/OPEN_SOURCE_USER_SCENARIOS.md) | Role-oriented examples |
527
- | [Artifact Catalog](docs/contracts/ARTIFACT_CATALOG.md) | Canonical files, writers, schemas, and readers |
528
-
529
- Repository workflows include
530
- [`.github/workflows/ci.yml`](../../.github/workflows/ci.yml),
531
- [`.github/workflows/workspace-e2e-matrix.yml`](../../.github/workflows/workspace-e2e-matrix.yml),
532
- [`.github/workflows/windows-bridge-e2e.yml`](../../.github/workflows/windows-bridge-e2e.yml),
533
- [`.github/workflows/e2e-smoke.yml`](../../.github/workflows/e2e-smoke.yml),
534
- [`.github/workflows/frontend-generator-smoke.yml`](../../.github/workflows/frontend-generator-smoke.yml),
535
- [`.github/workflows/security.yml`](../../.github/workflows/security.yml), and the
536
- maintainer-only
537
- [`.github/workflows/release-npm-manual.yml`](../../.github/workflows/release-npm-manual.yml).
538
- See [CI Workflows](docs/ci-workflows.md) for the complete validation and
539
- contributor-automation map.
178
+ | Goal | Guide |
179
+ | --- | --- |
180
+ | Learn the main terms | [Glossary](docs/GLOSSARY.md) |
181
+ | Create, adopt, import, or connect software | [Creating workspaces and projects](docs/creating-workspaces-and-projects.md) |
182
+ | Query Graph and inspect proof | [Workspace Knowledge Graph](docs/workspace-knowledge-graph.md) |
183
+ | Understand the exact decision loop | [Workspace Intelligence runner](docs/workspace-intelligence-runner.md) |
184
+ | Integrate CI | [CI workflows](docs/ci-workflows.md) |
185
+ | Find generated files and schemas | [Artifact Catalog](docs/contracts/ARTIFACT_CATALOG.md) |
186
+ | Browse all documentation | [Documentation index](docs/README.md) |
540
187
 
541
188
  ## Troubleshooting
542
189
 
543
- | Problem | What to check | Next step |
544
- | ---------------------------------- | ---------------------------------------------- | ------------------------------------------------------------------------ |
545
- | Node version is rejected | `node --version` | Install Node.js `>=20.19.0` |
546
- | `npx` resolves an old CLI | `npx workspai --version` | Run `npx workspai@latest --version` or update the global package |
547
- | Python/Core workflow cannot start | `python3 --version` | Install Python 3.10+ or use a Python-free profile where supported |
548
- | Workspace is not detected | Look for `.workspai-workspace` | Run from the workspace or pass `--workspace <path>` |
549
- | Strict policy blocks a command | `.workspai/policies.yml` | Inspect `workspace policy show` before changing policy |
550
- | Reports are stale | Report timestamps | Re-run `workspace intelligence run` or the documented producing command |
551
- | AI tools ignore workspace evidence | `AGENTS.md` and `.workspai/reports/INDEX.json` | Run `workspace agent-sync --write --refresh-context` |
552
- | Project generator fails | Runtime and network output | Fix the reported prerequisite, then retry or create officially and adopt |
553
-
554
- For command-specific behavior, use the
555
- [Command Reference](docs/commands-reference.md) and
556
- [Documentation Index](docs/README.md).
557
-
558
- ## Contributing and Support
190
+ | Problem | Next step |
191
+ | --- | --- |
192
+ | The workspace is not detected | Run from the project/workspace or inspect `npx workspai project workspace status --json` |
193
+ | A check reports stale evidence | Re-run the complete Workspace Intelligence command |
194
+ | A runtime is missing | Install only the runtime required by that project |
195
+ | An agent cannot find current context | Run `npx workspai workspace agent-sync --write --refresh-context --json` |
196
+ | You need a specific flag | Open the [Command Reference](docs/commands-reference.md) |
559
197
 
560
- Workspai is MIT-licensed and developed in the open. Contributions to runtime
561
- support, contracts, documentation, tests, and Workspace Intelligence workflows
562
- are welcome. Workspai is built by [Chistiq](https://chistiq.com/).
198
+ ## Contributing
563
199
 
564
- From a source checkout:
200
+ Workspai is developed in the open by
201
+ [Chistiq](https://chistiq.com/), the intelligence infrastructure company behind
202
+ RapidKit and Workspai.
565
203
 
566
204
  ```bash
567
205
  npm ci
568
206
  npm run build
569
207
  npm test
570
- npm run validate
571
208
  ```
572
209
 
573
- Use the npm version declared by the repository's `packageManager` field. Python,
574
- Go, Java, and .NET are required only for workflows that exercise those runtimes.
575
- To validate only this package, run `npm --workspace workspai run validate` from
576
- the monorepo root.
577
-
578
- - Read [CONTRIBUTING.md](https://github.com/chistiq/workspai/blob/main/packages/cli/CONTRIBUTING.md) before submitting changes.
579
- - Use [GitHub Issues](https://github.com/chistiq/workspai/issues) for reproducible bugs and feature requests.
580
- - Use [GitHub Discussions](https://github.com/chistiq/workspai/discussions) for questions and design conversations.
581
- - Read the [Development Guide](docs/DEVELOPMENT.md) for local workflows.
582
- - Report vulnerabilities through the [Security Policy](docs/SECURITY.md), not a public issue.
583
- - Review the [Changelog](https://github.com/chistiq/workspai/blob/main/packages/cli/CHANGELOG.md) before upgrading.
210
+ Read [CONTRIBUTING.md](CONTRIBUTING.md), the
211
+ [Development Guide](docs/DEVELOPMENT.md), and the
212
+ [Security Policy](docs/SECURITY.md).
584
213
 
585
214
  ## License
586
215