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/docs/README.md CHANGED
@@ -27,6 +27,7 @@ instructions; see the [Artifact Catalog](./contracts/ARTIFACT_CATALOG.md).
27
27
 
28
28
  ## Table of contents
29
29
 
30
+ - [Choose a guide by goal](#choose-a-guide-by-goal)
30
31
  - [User documentation](#user-documentation)
31
32
  - [Operations & security](#operations--security)
32
33
  - [AI module recommendations](#ai-module-recommendations)
@@ -34,23 +35,48 @@ instructions; see the [Artifact Catalog](./contracts/ARTIFACT_CATALOG.md).
34
35
  - [Contributor documentation](#contributor-documentation)
35
36
  - [Validation commands](#validation-commands)
36
37
 
38
+ ## Choose a guide by goal
39
+
40
+ | I want to… | Start here | Expected outcome |
41
+ | ------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------- |
42
+ | Create a workspace or project | [Creating workspaces and projects](./creating-workspaces-and-projects.md) | A registered project with canonical `.workspai` metadata |
43
+ | Bring an existing repository under governance | [Workspace operations](./workspace-operations.md#import-and-adoption) | Source stays in place with `adopt`, or is copied/cloned with `import` |
44
+ | Run the complete intelligence loop | [Unified runner](./workspace-intelligence-runner.md) | One ordered run report with durable stage evidence |
45
+ | Ask an architecture or dependency question | [Workspace Knowledge Graph](./workspace-knowledge-graph.md) | A bounded answer with proof references rather than the whole graph |
46
+ | Measure agent token, cost, and outcome efficiency | [Workspace Intelligence Evaluation](./workspace-intelligence-evaluation.md) | A live, provenance-aware report suitable for CLI, IDE, and CI |
47
+ | Integrate CI or release gates | [CI workflows](./ci-workflows.md) | Machine-readable exit codes and uploadable evidence |
48
+ | Find the writer, schema, or path for an output | [Artifact Catalog](./contracts/ARTIFACT_CATALOG.md) | One canonical source instead of path guessing |
49
+ | Understand Workspai terminology | [Glossary](./GLOSSARY.md) | Shared meanings for model, graph, evidence, gate, and artifacts |
50
+ | Review or change the main product README | [README content contract](./README_CONTENT_CONTRACT.md) | Stable narrative, claim boundaries, and machine-enforced drift rules |
51
+ | Contribute to the CLI | [Development](./DEVELOPMENT.md) | Local build, test, contract, and documentation gates |
52
+
53
+ There are two different AI-facing features. Workspace Intelligence is
54
+ deterministic, proof-backed, and does not require an AI API key. The optional
55
+ module recommender uses embeddings to suggest FastAPI or NestJS modules; start
56
+ with [AI Quickstart](./AI_QUICKSTART.md) only when that is your goal.
57
+
37
58
  ## User documentation
38
59
 
39
- | Document | Description |
40
- | --- | --- |
41
- | [creating-workspaces-and-projects.md](./creating-workspaces-and-projects.md) | Plain-language guide to every workspace and project creation scenario |
42
- | [commands-reference.md](./commands-reference.md) | Full CLI syntax, profiles, and policy keys |
43
- | [workspace-operations.md](./workspace-operations.md) | Import, adopt, snapshots, archives, contracts, infra |
44
- | [workspace-run.md](./workspace-run.md) | Polyglot fleet orchestration (`workspace run`) |
45
- | [workspace-intelligence-runner.md](./workspace-intelligence-runner.md) | Canonical unified runner, execution envelope, report schema, exit codes, failure propagation, and CI consumption |
46
- | [create-planner-capabilities.md](./create-planner-capabilities.md) | Native create, official, and existing lanes |
47
- | [../contracts/project-entry-capability.v1.json](../contracts/project-entry-capability.v1.json) | Contract: any readable project can enter through adopt/import when it can be registered |
48
- | [from-code-to-shared-understanding.md](./from-code-to-shared-understanding.md) | GitHub-rendered Workspace Intelligence diagram |
49
- | [OPEN_SOURCE_USER_SCENARIOS.md](./OPEN_SOURCE_USER_SCENARIOS.md) | Role-based workflows (junior enterprise) |
50
- | [doctor-command.md](./doctor-command.md) | Doctor scopes, CI exit codes, JSON evidence |
51
- | [config-file-guide.md](./config-file-guide.md) | User config file (`~/.workspairc.json`, `workspai.config.*`, with legacy fallbacks) |
52
- | [WORKSPACE_MARKER_SPEC.md](./WORKSPACE_MARKER_SPEC.md) | Workspace marker format |
53
- | [PACKAGE_MANAGER_POLICY.md](./PACKAGE_MANAGER_POLICY.md) | npm-only policy for this repository |
60
+ | Document | Description |
61
+ | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
62
+ | [creating-workspaces-and-projects.md](./creating-workspaces-and-projects.md) | Plain-language guide to every workspace and project creation scenario |
63
+ | [commands-reference.md](./commands-reference.md) | Full CLI syntax, profiles, and policy keys |
64
+ | [workspace-operations.md](./workspace-operations.md) | Import, adopt, snapshots, archives, contracts, infra |
65
+ | [workspace-run.md](./workspace-run.md) | Polyglot fleet orchestration (`workspace run`) |
66
+ | [workspace-intelligence-runner.md](./workspace-intelligence-runner.md) | Canonical unified runner, execution envelope, report schema, exit codes, failure propagation, and CI consumption |
67
+ | [workspace-knowledge-graph.md](./workspace-knowledge-graph.md) | Two-minute graph quickstart, proof model, AI/MCP consumption, performance, and honest token-efficiency measurement |
68
+ | [graph-benchmark-methodology.md](./graph-benchmark-methodology.md) | Reproducible payload-reduction benchmark, formulas, claim boundaries, and publication rules |
69
+ | [workspace-intelligence-evaluation.md](./workspace-intelligence-evaluation.md) | Provider usage, cost provenance, verified outcomes, comparison, and extension consumption |
70
+ | [GLOSSARY.md](./GLOSSARY.md) | Plain-language definitions for workspace, model, graph, evidence, gates, and AI integrations |
71
+ | [README_CONTENT_CONTRACT.md](./README_CONTENT_CONTRACT.md) | Required root README journey, architecture statements, claim policy, and drift guard |
72
+ | [create-planner-capabilities.md](./create-planner-capabilities.md) | Native create, official, and existing lanes |
73
+ | [../contracts/project-entry-capability.v1.json](../contracts/project-entry-capability.v1.json) | Contract: any readable project can enter through adopt/import when it can be registered |
74
+ | [from-code-to-shared-understanding.md](./from-code-to-shared-understanding.md) | GitHub-rendered Workspace Intelligence diagram |
75
+ | [OPEN_SOURCE_USER_SCENARIOS.md](./OPEN_SOURCE_USER_SCENARIOS.md) | Role-based workflows (junior → enterprise) |
76
+ | [doctor-command.md](./doctor-command.md) | Doctor scopes, CI exit codes, JSON evidence |
77
+ | [config-file-guide.md](./config-file-guide.md) | User config file (`~/.workspairc.json`, `workspai.config.*`, with legacy fallbacks) |
78
+ | [WORKSPACE_MARKER_SPEC.md](./WORKSPACE_MARKER_SPEC.md) | Workspace marker format |
79
+ | [PACKAGE_MANAGER_POLICY.md](./PACKAGE_MANAGER_POLICY.md) | npm-only policy for this repository |
54
80
 
55
81
  **Common tasks**
56
82
 
@@ -63,35 +89,35 @@ instructions; see the [Artifact Catalog](./contracts/ARTIFACT_CATALOG.md).
63
89
 
64
90
  ## Operations & security
65
91
 
66
- | Document | Description |
67
- | --- | --- |
68
- | [SECURITY.md](./SECURITY.md) | Vulnerability reporting and supported versions |
69
- | [policies.workspace.example.yml](./policies.workspace.example.yml) | Workspace policy template |
70
- | [governance-policy.enterprise.example.json](./governance-policy.enterprise.example.json) | Sigstore governance allowlist template |
71
- | [mirror-config.enterprise.example.json](./mirror-config.enterprise.example.json) | Mirror + evidence export template |
92
+ | Document | Description |
93
+ | ---------------------------------------------------------------------------------------- | ---------------------------------------------- |
94
+ | [SECURITY.md](./SECURITY.md) | Vulnerability reporting and supported versions |
95
+ | [policies.workspace.example.yml](./policies.workspace.example.yml) | Workspace policy template |
96
+ | [governance-policy.enterprise.example.json](./governance-policy.enterprise.example.json) | Sigstore governance allowlist template |
97
+ | [mirror-config.enterprise.example.json](./mirror-config.enterprise.example.json) | Mirror + evidence export template |
72
98
 
73
99
  ## AI module recommendations
74
100
 
75
101
  FastAPI/NestJS module suggestions via OpenAI embeddings (optional).
76
102
 
77
- | Document | Description |
78
- | --- | --- |
79
- | [AI_QUICKSTART.md](./AI_QUICKSTART.md) | 60-second setup |
80
- | [AI_FEATURES.md](./AI_FEATURES.md) | Complete feature reference |
81
- | [AI_EXAMPLES.md](./AI_EXAMPLES.md) | Use-case examples |
82
- | [AI_DYNAMIC_INTEGRATION.md](./AI_DYNAMIC_INTEGRATION.md) | Integration architecture |
103
+ | Document | Description |
104
+ | -------------------------------------------------------- | -------------------------- |
105
+ | [AI_QUICKSTART.md](./AI_QUICKSTART.md) | 60-second setup |
106
+ | [AI_FEATURES.md](./AI_FEATURES.md) | Complete feature reference |
107
+ | [AI_EXAMPLES.md](./AI_EXAMPLES.md) | Use-case examples |
108
+ | [AI_DYNAMIC_INTEGRATION.md](./AI_DYNAMIC_INTEGRATION.md) | Integration architecture |
83
109
 
84
110
  ## Technical contracts
85
111
 
86
112
  JSON schemas and ownership rules for tooling parity.
87
113
 
88
- | Location | Description |
89
- | --- | --- |
90
- | [contracts/README.md](./contracts/README.md) | Core CLI JSON contracts + generator scripts |
91
- | [contracts/COMMAND_OWNERSHIP_MATRIX.md](./contracts/COMMAND_OWNERSHIP_MATRIX.md) | npm wrapper vs Core command ownership |
92
- | [contracts/RUNTIME_SUPPORT_MATRIX.md](./contracts/RUNTIME_SUPPORT_MATRIX.md) | Scaffold/import/lifecycle support tiers |
93
- | [contracts/RUNTIME_ACCEPTANCE_MATRIX.md](./contracts/RUNTIME_ACCEPTANCE_MATRIX.md) | Runtime acceptance test expectations |
94
- | [../contracts/](../contracts/) | Canonical JSON schemas (published in npm tarball) |
114
+ | Location | Description |
115
+ | ---------------------------------------------------------------------------------- | ------------------------------------------------- |
116
+ | [contracts/README.md](./contracts/README.md) | Core CLI JSON contracts + generator scripts |
117
+ | [contracts/COMMAND_OWNERSHIP_MATRIX.md](./contracts/COMMAND_OWNERSHIP_MATRIX.md) | npm wrapper vs Core command ownership |
118
+ | [contracts/RUNTIME_SUPPORT_MATRIX.md](./contracts/RUNTIME_SUPPORT_MATRIX.md) | Scaffold/import/lifecycle support tiers |
119
+ | [contracts/RUNTIME_ACCEPTANCE_MATRIX.md](./contracts/RUNTIME_ACCEPTANCE_MATRIX.md) | Runtime acceptance test expectations |
120
+ | [../contracts/](../contracts/) | Canonical JSON schemas (published in npm tarball) |
95
121
 
96
122
  Regenerate and verify:
97
123
 
@@ -103,13 +129,13 @@ npm run contracts:validate
103
129
 
104
130
  ## Contributor documentation
105
131
 
106
- | Document | Description |
107
- | --- | --- |
108
- | [DEVELOPMENT.md](./DEVELOPMENT.md) | Local dev, testing, debugging |
109
- | [SETUP.md](./SETUP.md) | Build gates, smoke flows, release hygiene |
110
- | [ci-workflows.md](./ci-workflows.md) | GitHub Actions workflow map |
111
- | [OPTIMIZATION_GUIDE.md](./OPTIMIZATION_GUIDE.md) | Performance and improvement notes |
112
- | [UTILITIES.md](./UTILITIES.md) | Internal cache and metrics helpers |
132
+ | Document | Description |
133
+ | ------------------------------------------------ | ----------------------------------------- |
134
+ | [DEVELOPMENT.md](./DEVELOPMENT.md) | Local dev, testing, debugging |
135
+ | [SETUP.md](./SETUP.md) | Build gates, smoke flows, release hygiene |
136
+ | [ci-workflows.md](./ci-workflows.md) | GitHub Actions workflow map |
137
+ | [OPTIMIZATION_GUIDE.md](./OPTIMIZATION_GUIDE.md) | Performance and improvement notes |
138
+ | [UTILITIES.md](./UTILITIES.md) | Internal cache and metrics helpers |
113
139
 
114
140
  Also see [../CONTRIBUTING.md](../CONTRIBUTING.md) and [../CHANGELOG.md](../CHANGELOG.md).
115
141
 
@@ -136,7 +162,10 @@ workspai/
136
162
  ├── releases/ # Per-version release notes
137
163
  └── docs/
138
164
  ├── README.md # This index
165
+ ├── README_CONTENT_CONTRACT.md
139
166
  ├── commands-reference.md
167
+ ├── workspace-knowledge-graph.md
168
+ ├── workspace-intelligence-evaluation.md
140
169
  ├── workspace-operations.md
141
170
  ├── workspace-run.md
142
171
  ├── ci-workflows.md
@@ -0,0 +1,154 @@
1
+ # README Content Contract
2
+
3
+ The repository README is Workspai's primary product entry point. It must help a
4
+ new user understand the problem, see a concrete result, run a safe quickstart,
5
+ and choose the next document without first learning the internal architecture.
6
+
7
+ This contract keeps that experience aligned with the CLI's machine-readable
8
+ contracts. It applies to the root `README.md`; the package README may add detail
9
+ but must not contradict it.
10
+
11
+ The npm package README at `packages/cli/README.md` is the operational product
12
+ entry point. It follows the same truth boundaries but adds beginner definitions,
13
+ a copyable workspace onboarding path, exact exit semantics, command families,
14
+ durable outputs, requirements, and troubleshooting.
15
+
16
+ ## Required reader journey
17
+
18
+ The root README keeps these sections in this order:
19
+
20
+ 1. `Workspace Intelligence for software systems` — the category, slogan, and
21
+ three user outcomes;
22
+ 2. `See your workspace as a system` — a concrete before/after mental model;
23
+ 3. `Start in two minutes` — install, connect software, run the canonical chain;
24
+ 4. `What Workspai gives you` — user questions mapped to product outcomes;
25
+ 5. `How Workspace Intelligence works` — sources, facts, model, graph, decisions,
26
+ and consumers;
27
+ 6. `Evidence, not guesses` — identity, proof, bounded retrieval, and unknown
28
+ relationships;
29
+ 7. `Measure context honestly` — reproducible numbers and claim boundaries;
30
+ 8. `One contract-backed intelligence chain` — the canonical runner and its
31
+ distinction from `pipeline`;
32
+ 9. `Choose your workflow` — goal-oriented routing;
33
+ 10. `Open outputs for every consumer` — human, CI, agent, MCP, IDE, and graph
34
+ interoperability surfaces;
35
+ 11. documentation, packages, contributor, community, and license routes.
36
+
37
+ Do not move package internals, exhaustive flags, troubleshooting, or contributor
38
+ implementation details above the user value and quickstart.
39
+
40
+ ## CLI package README journey
41
+
42
+ The CLI README keeps these sections in order:
43
+
44
+ 1. product category and the `See / Ask with proof / Act with confidence` value;
45
+ 2. plain-language definitions of Workspace, Project, Model, Graph, Evidence,
46
+ and Artifact;
47
+ 3. a copyable two-minute path that creates a minimal workspace, adopts source,
48
+ and runs the canonical chain;
49
+ 4. the Model → derived Graph architecture and its unknown-relationship rule;
50
+ 5. the exact intelligence chain, evidence, and bounded measurement semantics;
51
+ 6. grouped commands, outputs, onboarding choices, integrations, requirements,
52
+ documentation, and troubleshooting.
53
+
54
+ Measurement tables must not precede installation or the first successful run.
55
+ Advanced command inventories must be grouped by user goal instead of appearing
56
+ as one undifferentiated command wall.
57
+
58
+ ## Architectural statements that must remain true
59
+
60
+ - The **Workspace Model is the canonical source of truth**.
61
+ - The Knowledge Graph is a **derived, revision-bound representation** of
62
+ governed workspace knowledge.
63
+ - Providers emit facts and proofs; they do not independently own the canonical
64
+ graph.
65
+ - Missing relationships mean **not proven**, not independent.
66
+ - The graph is broader than a code graph, but it is not the entire product.
67
+ - The canonical runner is
68
+ `npx workspai workspace intelligence run --for-agent codex --strict --json`.
69
+ - `pipeline` is a broader governance/release orchestrator and must not be taught
70
+ as a replacement for the intelligence chain.
71
+ - The integrated CLI already exposes current capabilities. Future standalone
72
+ packages are extraction boundaries, not promises to add currently missing CLI
73
+ features.
74
+
75
+ Normative machine sources:
76
+
77
+ | Statement | Source of truth |
78
+ | ------------------------------ | ------------------------------------------------------- |
79
+ | Ordered intelligence chain | `contracts/workspace-intelligence-chain.v1.json` |
80
+ | Runtime commands and flags | `contracts/runtime-command-surface.v1.json` |
81
+ | Published schemas and paths | `contracts/published-contract-catalog.v1.json` |
82
+ | Architecture boundaries | `contracts/workspace-intelligence-architecture.v1.json` |
83
+ | Artifact writers and consumers | `docs/contracts/ARTIFACT_CATALOG.md` |
84
+
85
+ Markdown summarizes these contracts; it does not redefine them.
86
+
87
+ ## Claim policy
88
+
89
+ Every performance or token statement must identify:
90
+
91
+ - the workspace or pinned corpus;
92
+ - the query and result limit;
93
+ - whether token counts are estimated, tokenizer-counted, or provider-reported;
94
+ - the baseline;
95
+ - the date or revision;
96
+ - what the measurement does not prove.
97
+
98
+ The current fixture may be used only with wording equivalent to:
99
+
100
+ > On the current 16-project development fixture, one bounded query reduced the
101
+ > estimated retrieval payload by 97.9%; results vary by workspace and query.
102
+
103
+ Never turn a retrieval-payload result into a universal model-cost, answer-quality,
104
+ or task-success claim. Use `workspace eval` and a verified outcome before making
105
+ execution-efficiency comparisons.
106
+
107
+ ## Command policy
108
+
109
+ - Quickstarts must be copyable and use the canonical `workspai` package.
110
+ - `wspai` is described only as an optional short alias.
111
+ - A partial sequence such as `model → context` must not be taught as a replacement
112
+ for the canonical intelligence chain.
113
+ - Every documented command must exist in the runtime command surface or be an
114
+ ordinary shell command such as `cd` or `npm install`.
115
+ - Durable filenames must come from published contracts or the Artifact Catalog.
116
+
117
+ ## Information hierarchy
118
+
119
+ Write for three reading depths:
120
+
121
+ 1. **Ten seconds:** category, user problem, three outcomes.
122
+ 2. **Two minutes:** quickstart, concrete artifacts, architecture, proof example.
123
+ 3. **Deep evaluation:** measurements, contracts, guides, boundaries, contributor
124
+ material.
125
+
126
+ Prefer user questions and outcomes over internal phase names. Define unavoidable
127
+ terms in plain language and link to the glossary.
128
+
129
+ ## Validation
130
+
131
+ Run from `packages/cli`:
132
+
133
+ ```bash
134
+ npm run validate:docs
135
+ npm run check:generated-contracts
136
+ npm run check:contracts
137
+ ```
138
+
139
+ `docs-drift-guard.mjs` enforces the required root headings, their order,
140
+ canonical runner, Model/Graph truth boundary, honest measurement language,
141
+ documentation routes, and package-status semantics. `smoke-readme-commands.mjs`
142
+ executes representative documented CLI help surfaces.
143
+
144
+ ## Review checklist
145
+
146
+ Before merging a README change, confirm:
147
+
148
+ - a new user can explain Workspai without saying “chatbot” or “code generator”;
149
+ - the first quickstart reaches a durable evidence artifact;
150
+ - every architecture statement agrees with the generated contracts;
151
+ - every number is reproducible and bounded;
152
+ - every promised output exists today or is explicitly labelled as future work;
153
+ - links route users by goal rather than exposing the documentation tree;
154
+ - the package table cannot be read as a list of missing product capabilities.
@@ -65,7 +65,8 @@ npx workspai workspace snapshot [--workspace <path>] [--json] [--include-paths]
65
65
  npx workspai workspace diff --from <snapshot-or-report|git[:ref]> [--workspace <path>] [--json] [--include-paths] [--include-evidence] [--scan-depth <count>] [--strict]
66
66
  npx workspai workspace impact --from <workspace-diff-report> [--workspace <path>] [--scope project:<name>] [--json] [--include-paths] [--include-evidence] [--scan-depth <count>] [--strict]
67
67
  npx workspai workspace verify [--from-impact <file>] [--workspace <path>] [--scope project:<name>] [--strict] [--json] [--include-paths] [--include-evidence] [--scan-depth <count>]
68
- npx workspai workspace graph [emit|explain|dot|mermaid] [key] [--workspace <path>] [--scope project:<name>] [--json] [--include-paths] [--include-evidence] [--scan-depth <count>]
68
+ npx workspai workspace graph [emit|explain|search|benchmark|entities|evidence|path|overlay|dot|mermaid|jsonld|graphml|gexf] [key] [value] [--from <graph.json>] [--output <file>] [--limit <1..100>] [--workspace <path>] [--scope project:<name>] [--json] [--include-paths] [--include-evidence] [--scan-depth <count>]
69
+ npx workspai workspace eval [init <task> [strategy]|record|status|report|compare --from <report>] [--workspace <path>] [--output <file>] [--json]
69
70
  npx workspai workspace watch [--workspace <path>] [--json] [--once] [--scan-depth <count>]
70
71
  npx workspai workspace explain|why <target> [--workspace <path>] [--json] [--write]
71
72
  npx workspai workspace trace --from <workspace-diff-report> [--workspace <path>] [--json] [--write]
@@ -94,6 +95,17 @@ npx workspai infra down [--workspace <path>] [--volumes]
94
95
  npx workspai infra status [--workspace <path>] [--json] [--strict]
95
96
  ```
96
97
 
98
+ The contract graph includes its backward-compatible service projection, the
99
+ canonical `workspace-dependency-graph.v1` project topology, and the portable
100
+ `workspace-knowledge-graph.v1` evidence graph. The knowledge projection covers
101
+ workspace/project structure, packages and dependencies, source files, modules,
102
+ symbols, HTTP endpoints, OpenAPI/GraphQL/Protocol Buffers/AsyncAPI contracts,
103
+ Compose/Kubernetes/Dockerfile/Terraform/Helm infrastructure, CI workflows,
104
+ documentation, ADRs, tests, owners, environments, databases, and queues.
105
+ Every entity and relation has stable identity and portable proof paths; proof
106
+ taxonomy separates authored, extracted, and inferred facts and records trust,
107
+ confidence, and freshness. Environment and secret values are never emitted.
108
+
97
109
  `workspace intelligence run` writes
98
110
  `.workspai/reports/workspace-intelligence-run-last-run.json`. Its `preflight`
99
111
  contains exactly `sync` and `baseline`, while `stages` contains exactly the 11
@@ -114,9 +126,57 @@ records are appended to
114
126
  `.workspai/reports/workspace-intelligence-history.json`; no separate feedback
115
127
  artifact is created.
116
128
 
117
- `workspace graph dot` and `workspace graph mermaid` intentionally emit raw DOT
118
- and Mermaid text for direct piping to renderers. Use `workspace graph emit
119
- --json` or `workspace graph explain <project> --json` for structured JSON.
129
+ `workspace graph emit --json` returns both the compatibility project graph and
130
+ the knowledge graph. Use `workspace graph entities [kind]`, `workspace graph
131
+ evidence <id-or-unique-label>`, and `workspace graph path <from> <to>` for
132
+ indexed queries. `workspace graph overlay --from <prior-graph.json>` produces a
133
+ portable change/PR overlay with additions, removals, changed fields, proof
134
+ artifacts, proof additions/removals/content changes, bounded one-hop impact,
135
+ and a risk summary. Observation timestamps and freshness alone do not create
136
+ false change noise. Query indexes are cached
137
+ per immutable graph object and invalidated automatically when a new graph is
138
+ built. `dot` and `mermaid` intentionally remain project-topology renderers and
139
+ emit raw text for direct piping.
140
+
141
+ `workspace graph search <query> --limit <n> --json` returns bounded entities,
142
+ one-hop relations, related entity summaries, and portable proofs instead of the
143
+ complete graph. `workspace graph benchmark <query> --limit <n> --json` compares
144
+ that retrieval payload with the readable proof-indexed corpus using a labelled
145
+ `characters / 4` estimate. It measures payload reduction only; it does not
146
+ assert equivalent answer quality or model-specific billing savings.
147
+
148
+ `workspace graph jsonld|graphml|gexf` exports the current derived,
149
+ evidence-backed Knowledge Graph for semantic, graph-analysis, and interactive
150
+ 2D/3D consumers.
151
+ Use `--output <file>` for a durable export; Mermaid and DOT remain the compact
152
+ documentation-oriented renderings.
153
+
154
+ `workspace eval` records provider/tokenizer/estimate provenance, tool activity,
155
+ cost, latency, and verified task outcome. `eval record` accepts a
156
+ `model-usage-event.v1` JSON document on stdin. The live and finalized artifacts
157
+ are suitable for IDE dashboards and conform to
158
+ `workspace-intelligence-evaluation.v1`.
159
+
160
+ `workspace model --write` also materializes the derived, contract-validated
161
+ knowledge graph at `.workspai/reports/workspace-knowledge-graph.json`. The
162
+ unified intelligence runner treats that artifact as a required output of the
163
+ Model step, so CI, IDE adapters, agent grounding, and MCP all observe the same
164
+ revision. Agent contexts carry its reference, quality counts, and bounded query
165
+ commands instead of copying the entire graph into every prompt. MCP exposes
166
+ `getWorkspaceKnowledgeGraph`, `searchWorkspaceGraph`, `queryWorkspaceEntities`,
167
+ `getWorkspaceGraphEvidence`, and `findWorkspaceGraphPath`.
168
+
169
+ Source extraction is bounded and language-neutral by contract. It recognizes
170
+ the primary source formats for TypeScript/JavaScript, Python, Go, Java/Kotlin,
171
+ .NET/F#, Rust, Ruby, PHP, Swift, Dart, Elixir, Scala, Clojure, Lua, R, C/C++,
172
+ Vue, and Svelte. Package baselines also recognize npm/Deno, Python, Go, Cargo,
173
+ Maven/Gradle, NuGet, Composer, Ruby, Elixir, Dart, SwiftPM, CMake, Bazel, and SBT.
174
+ Regex-backed
175
+ source facts are marked `observed` with medium confidence; authored manifests
176
+ and interface/infrastructure specifications remain authoritative. This avoids
177
+ presenting heuristic symbol discovery as compiler-grade truth while keeping the
178
+ current CLI useful until deeper language providers move into the standalone
179
+ graph package.
120
180
 
121
181
  See [workspace-run.md](./workspace-run.md) for fleet orchestration semantics.
122
182
 
@@ -14,7 +14,7 @@ Supported fields include:
14
14
  {
15
15
  "defaultKit": "fastapi.standard",
16
16
  "defaultInstallMethod": "poetry",
17
- "pythonVersion": "3.11",
17
+ "pythonVersion": "3.10",
18
18
  "author": "Platform Team",
19
19
  "license": "MIT",
20
20
  "skipGit": false,
@@ -56,7 +56,7 @@ Example:
56
56
  module.exports = {
57
57
  workspace: {
58
58
  defaultAuthor: 'Platform Team',
59
- pythonVersion: '3.11',
59
+ pythonVersion: '3.10',
60
60
  installMethod: 'poetry',
61
61
  },
62
62
  projects: {
@@ -66,6 +66,10 @@ module.exports = {
66
66
  };
67
67
  ```
68
68
 
69
+ Python-backed workflows require Python 3.10 or newer. `pythonVersion` selects a
70
+ project target; it does not make Python a dependency for Node-only or other
71
+ Python-free Workspai workflows.
72
+
69
73
  ## Command coverage
70
74
 
71
75
  Directory configuration is currently consumed by the legacy top-level creation