workspai 0.45.0 → 0.47.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 (177) hide show
  1. package/README.md +307 -532
  2. package/contracts/agent-customization-pack.v1.json +6 -1
  3. package/contracts/bootstrap-compliance.v1.json +14 -0
  4. package/contracts/cli-runtime-command-inventory.v1.snapshot.json +8 -0
  5. package/contracts/extension-cli-compatibility.v1.json +9 -2
  6. package/contracts/mirror-ops.v1.json +16 -0
  7. package/contracts/published-contract-catalog.v1.json +38 -1
  8. package/contracts/runtime-command-surface.v1.json +190 -7
  9. package/contracts/transparency-evidence.v1.json +13 -0
  10. package/contracts/workspace-archive-capabilities.v1.json +17 -6
  11. package/contracts/workspace-contract.v1.json +78 -0
  12. package/contracts/workspace-intelligence/studio-blocker-handoff.v1.json +4 -0
  13. package/contracts/workspace-intelligence/workspace-context.v1.json +20 -0
  14. package/contracts/workspace-intelligence/workspace-graph-token-efficiency.v1.json +72 -0
  15. package/contracts/workspace-intelligence/workspace-intelligence-run.v1.json +212 -0
  16. package/contracts/workspace-intelligence/workspace-knowledge-graph-change-overlay.v1.json +200 -0
  17. package/contracts/workspace-intelligence/workspace-knowledge-graph.v1.json +260 -0
  18. package/contracts/workspace-intelligence/workspace-knowledge-search.v1.json +60 -0
  19. package/contracts/workspace-intelligence-architecture.v1.json +7 -4
  20. package/contracts/workspace-intelligence-chain.v1.json +51 -4
  21. package/contracts/workspace-share-bundle.v1.json +16 -0
  22. package/dist/analyze-UVXPRGYZ.js +1 -0
  23. package/dist/artifact-remediation-plan-EPALZ2LC.js +3 -0
  24. package/dist/autopilot-release-5BQ6F5L2.js +1 -0
  25. package/dist/chunk-22NJ2ZMG.js +2 -0
  26. package/dist/{chunk-XIVFLY6G.js → chunk-2GHUZDYA.js} +1 -1
  27. package/dist/chunk-2TEDAKP6.js +2 -0
  28. package/dist/chunk-52PBRX7F.js +1 -0
  29. package/dist/chunk-6SWRNA47.js +4 -0
  30. package/dist/chunk-76YOPAOT.js +1 -0
  31. package/dist/chunk-7VLCK5JW.js +1 -0
  32. package/dist/{chunk-DXPU4DDV.js → chunk-BSRVO52Y.js} +92 -78
  33. package/dist/chunk-COARSXRC.js +1 -0
  34. package/dist/chunk-CV5HKU4P.js +1 -0
  35. package/dist/chunk-CW7PGBIQ.js +13 -0
  36. package/dist/{chunk-KU4S7RCM.js → chunk-DV6GJD4K.js} +1 -1
  37. package/dist/chunk-EYJ2CQSK.js +1 -0
  38. package/dist/chunk-FB7SCXAZ.js +1 -0
  39. package/dist/chunk-FPJNWPKU.js +1 -0
  40. package/dist/{chunk-JP25YL3J.js → chunk-FTY7GGXJ.js} +2 -2
  41. package/dist/chunk-FXQJX34Z.js +1 -0
  42. package/dist/{chunk-J4AICQFB.js → chunk-HSGFUKCN.js} +1 -1
  43. package/dist/{chunk-OOOPYUL2.js → chunk-ITCAMC2E.js} +1 -1
  44. package/dist/chunk-KB44JP4M.js +2 -0
  45. package/dist/{chunk-WANW4QA4.js → chunk-KZZ36CK5.js} +1 -1
  46. package/dist/chunk-LNRAB7UY.js +1 -0
  47. package/dist/chunk-MEMHNE7Y.js +80 -0
  48. package/dist/chunk-MER6ZBN2.js +13 -0
  49. package/dist/chunk-NOFM7MNA.js +2 -0
  50. package/dist/chunk-NRYS4CLR.js +2 -0
  51. package/dist/chunk-OA537ZQ5.js +1 -0
  52. package/dist/chunk-PBHP6JNY.js +8 -0
  53. package/dist/chunk-QDWYIRHR.js +8 -0
  54. package/dist/chunk-RWRLFSKW.js +2 -0
  55. package/dist/chunk-SK6XRKGG.js +1 -0
  56. package/dist/chunk-THIOE2PB.js +2 -0
  57. package/dist/chunk-TNQI5VCW.js +36 -0
  58. package/dist/chunk-TWNFECMN.js +2 -0
  59. package/dist/{chunk-2QOWRBQD.js → chunk-U5EZHZBX.js} +1 -1
  60. package/dist/{chunk-K63BSU56.js → chunk-VBSQ7MF6.js} +62 -51
  61. package/dist/chunk-WDKNMTJQ.js +1 -0
  62. package/dist/chunk-YCL3I2JO.js +2 -0
  63. package/dist/chunk-ZDN7RHXJ.js +1 -0
  64. package/dist/chunk-ZM5NQ5Z2.js +1 -0
  65. package/dist/{create-KFR6FLRT.js → create-7JKJDAQV.js} +1 -1
  66. package/dist/doctor-PGPNIS76.js +1 -0
  67. package/dist/{dotnet-webapi-clean-BYUUHX5Y.js → dotnet-webapi-clean-6TVFBTVI.js} +20 -20
  68. package/dist/{gofiber-standard-B6UK5GR7.js → gofiber-standard-2BL7GWZB.js} +1 -1
  69. package/dist/{gogin-standard-BXU44VEM.js → gogin-standard-XGP3KBXA.js} +1 -1
  70. package/dist/index.d.ts +112 -16
  71. package/dist/index.js +198 -195
  72. package/dist/pipeline-IB6ILJSV.js +5 -0
  73. package/dist/{platform-capabilities-YICBF4FA.js → platform-capabilities-2B4QMZXE.js} +1 -1
  74. package/dist/{pythonRapidkitExec-UJYIB6FL.js → pythonRapidkitExec-CVCIK225.js} +1 -1
  75. package/dist/{springboot-standard-PEHDKH2L.js → springboot-standard-JJNUID6M.js} +6 -6
  76. package/dist/workspace-H3QXBFGB.js +1 -0
  77. package/dist/{workspace-agent-sync-G5YVI3BJ.js → workspace-agent-sync-C7SG2Z5W.js} +1 -1
  78. package/dist/workspace-archive-P76EDIUG.js +10 -0
  79. package/dist/{workspace-context-E3UFWL5X.js → workspace-context-BKQBKA4C.js} +1 -1
  80. package/dist/workspace-contract-RPQQBQXR.js +1 -0
  81. package/dist/workspace-dependency-graph-23BI2HG7.js +1 -0
  82. package/dist/workspace-explain-WVN7JH3U.js +1 -0
  83. package/dist/workspace-explain-contract-SEFTVF6J.js +1 -0
  84. package/dist/{workspace-feedback-YY6WQPWQ.js → workspace-feedback-WAID3IOE.js} +1 -1
  85. package/dist/{workspace-foundation-3C2DLCVI.js → workspace-foundation-5OOJEO2D.js} +1 -1
  86. package/dist/workspace-graph-token-efficiency-CFGFCJ5V.js +1 -0
  87. package/dist/{workspace-history-VF3CHDYQ.js → workspace-history-C6OP3IAQ.js} +1 -1
  88. package/dist/workspace-intelligence-VKDL3H2J.js +1 -0
  89. package/dist/workspace-intelligence-runner-LVALAZY7.js +1 -0
  90. package/dist/workspace-knowledge-graph-FE2NTZKV.js +1 -0
  91. package/dist/workspace-knowledge-graph-change-overlay-XG6FC4IX.js +1 -0
  92. package/dist/workspace-knowledge-graph-query-VOSPPH4W.js +1 -0
  93. package/dist/workspace-mcp-serve-KT2I676Z.js +3 -0
  94. package/dist/workspace-model-S33CIB2R.js +1 -0
  95. package/dist/workspace-model-hash-MHXK5MEI.js +1 -0
  96. package/dist/workspace-python-engine-state-2MLKJYQG.js +2 -0
  97. package/dist/workspace-registry-summary-A3YDL63D.js +1 -0
  98. package/dist/workspace-run-M4LNJILC.js +1 -0
  99. package/dist/{workspace-verify-ZNT6JX7D.js → workspace-verify-ZGH3NXAH.js} +1 -1
  100. package/dist/workspace-watch-EVBJTMV7.js +1 -0
  101. package/docs/AI_DYNAMIC_INTEGRATION.md +73 -432
  102. package/docs/AI_EXAMPLES.md +37 -395
  103. package/docs/AI_FEATURES.md +76 -465
  104. package/docs/AI_QUICKSTART.md +49 -209
  105. package/docs/DEVELOPMENT.md +5 -5
  106. package/docs/From Code to Shared Understanding.png +0 -0
  107. package/docs/GLOSSARY.md +60 -0
  108. package/docs/OPEN_SOURCE_USER_SCENARIOS.md +91 -9
  109. package/docs/OPTIMIZATION_GUIDE.md +19 -51
  110. package/docs/PACKAGE_MANAGER_POLICY.md +4 -1
  111. package/docs/README.md +91 -42
  112. package/docs/SECURITY.md +13 -6
  113. package/docs/SETUP.md +6 -3
  114. package/docs/UTILITIES.md +8 -20
  115. package/docs/WORKSPACE_MARKER_SPEC.md +27 -20
  116. package/docs/ci-workflows.md +19 -5
  117. package/docs/commands-reference.md +88 -13
  118. package/docs/config-file-guide.md +67 -246
  119. package/docs/contracts/ARTIFACT_CATALOG.md +78 -36
  120. package/docs/contracts/CLI_LOG_EVENT_STREAM.md +1 -1
  121. package/docs/contracts/README.md +48 -9
  122. package/docs/contracts/RUNTIME_ACCEPTANCE_MATRIX.md +4 -4
  123. package/docs/contracts/RUNTIME_SUPPORT_MATRIX.md +14 -10
  124. package/docs/creating-workspaces-and-projects.md +649 -0
  125. package/docs/doctor-command.md +5 -4
  126. package/docs/examples/ci-agent-grounding.yml +16 -10
  127. package/docs/from-code-to-shared-understanding.md +69 -38
  128. package/docs/graph-benchmark-methodology.md +121 -0
  129. package/docs/workspace-intelligence-runner.md +186 -0
  130. package/docs/workspace-knowledge-graph.md +295 -0
  131. package/docs/workspace-operations.md +78 -11
  132. package/docs/workspace-run.md +4 -1
  133. package/package.json +10 -8
  134. package/rapidkit.config.example.cjs +5 -5
  135. package/scripts/enforce-package-manager.cjs +1 -1
  136. package/scripts/prepack-enterprise.mjs +4 -0
  137. package/workspai.config.example.cjs +12 -47
  138. package/dist/analyze-YLV7NVLF.js +0 -1
  139. package/dist/artifact-remediation-plan-WLZGROUU.js +0 -3
  140. package/dist/autopilot-release-YBN3SWAA.js +0 -1
  141. package/dist/chunk-2K3GYCPS.js +0 -1
  142. package/dist/chunk-42G2OK64.js +0 -1
  143. package/dist/chunk-5AKYMAIL.js +0 -1
  144. package/dist/chunk-5GNT4RJI.js +0 -8
  145. package/dist/chunk-5PVEQ6CZ.js +0 -13
  146. package/dist/chunk-6AA3WWQZ.js +0 -2
  147. package/dist/chunk-6ZENXBMG.js +0 -33
  148. package/dist/chunk-7RIWU5TZ.js +0 -1
  149. package/dist/chunk-7UZVOYF5.js +0 -2
  150. package/dist/chunk-BJLE5CH7.js +0 -4
  151. package/dist/chunk-G3H5R3RR.js +0 -1
  152. package/dist/chunk-HYJK7W3B.js +0 -1
  153. package/dist/chunk-IMUU5Q2V.js +0 -13
  154. package/dist/chunk-KPPGZCUW.js +0 -78
  155. package/dist/chunk-LCRROMRR.js +0 -2
  156. package/dist/chunk-LG6RFLPZ.js +0 -1
  157. package/dist/chunk-P424XYHP.js +0 -1
  158. package/dist/chunk-P7SCWJFG.js +0 -8
  159. package/dist/chunk-QWU2CZBG.js +0 -2
  160. package/dist/chunk-V2H2KRMZ.js +0 -1
  161. package/dist/chunk-XZGVNGRB.js +0 -1
  162. package/dist/chunk-ZWO6K24C.js +0 -2
  163. package/dist/doctor-YJDM5XBH.js +0 -1
  164. package/dist/imported-projects-registry-FOIE27WT.js +0 -1
  165. package/dist/pipeline-FEDYO3IA.js +0 -5
  166. package/dist/workspace-PLXOO6ST.js +0 -1
  167. package/dist/workspace-archive-EEGLHZDW.js +0 -10
  168. package/dist/workspace-contract-LQJDZV36.js +0 -1
  169. package/dist/workspace-explain-G74ZIF23.js +0 -1
  170. package/dist/workspace-explain-contract-KT757JGQ.js +0 -1
  171. package/dist/workspace-intelligence-3GG7GEDQ.js +0 -1
  172. package/dist/workspace-mcp-serve-MJMUV4RY.js +0 -3
  173. package/dist/workspace-model-NG45SRM5.js +0 -1
  174. package/dist/workspace-python-engine-state-MTWIIZPY.js +0 -2
  175. package/dist/workspace-registry-summary-JM2XY52C.js +0 -1
  176. package/dist/workspace-run-WEQYIERE.js +0 -1
  177. package/dist/workspace-watch-W47T4RX2.js +0 -1
@@ -2,6 +2,10 @@
2
2
 
3
3
  Optimization ideas for the Workspai CLI codebase.
4
4
 
5
+ > This is a proposal backlog, not a description of shipped APIs, benchmarks, CI,
6
+ > or release policy. Validate every proposal against the current package manifest,
7
+ > workflows, and [Development Guide](./DEVELOPMENT.md) before implementation.
8
+
5
9
  **Users:** [../README.md](../README.md) · [OPEN_SOURCE_USER_SCENARIOS.md](./OPEN_SOURCE_USER_SCENARIOS.md) · [Documentation index](./README.md)
6
10
 
7
11
  ## 1. Performance Optimizations
@@ -350,7 +354,10 @@ npm install -D typedoc
350
354
  }
351
355
  ```
352
356
 
353
- ### 7.2 Interactive Examples
357
+ ### 7.2 Proposed public API example
358
+
359
+ The package currently guarantees a CLI binary, not this programmatic API. The
360
+ following is illustrative only and must not be used by consumers:
354
361
  ```typescript
355
362
  // examples/programmatic-usage.ts
356
363
  import { createProject } from 'workspai';
@@ -380,7 +387,7 @@ jobs:
380
387
  strategy:
381
388
  matrix:
382
389
  os: [ubuntu-latest, macos-latest, windows-latest]
383
- node-version: [18, 20, 22]
390
+ node-version: ['20.19.0', 22]
384
391
 
385
392
  steps:
386
393
  - uses: actions/checkout@v3
@@ -392,28 +399,12 @@ jobs:
392
399
  - run: npm run build
393
400
  ```
394
401
 
395
- ### 8.2 Automated Releases
396
- ```yaml
397
- # .github/workflows/release.yml
398
- name: Release
399
-
400
- on:
401
- push:
402
- tags:
403
- - 'v*'
402
+ ### 8.2 Releases
404
403
 
405
- jobs:
406
- release:
407
- runs-on: ubuntu-latest
408
- steps:
409
- - uses: actions/checkout@v3
410
- - uses: actions/setup-node@v3
411
- - run: npm ci
412
- - run: npm run build
413
- - run: npm publish
414
- env:
415
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
416
- ```
404
+ Do not publish directly from a tag-triggered example. Releases use the
405
+ maintainer-only `.github/workflows/release-npm-manual.yml` workflow and package
406
+ release scripts after all required exact-SHA gates pass. See
407
+ [CI Workflows](./ci-workflows.md) and [Setup](./SETUP.md).
417
408
 
418
409
  ## 9. Monitoring & Analytics Optimizations
419
410
 
@@ -474,31 +465,8 @@ const createDemoWorkspace = async () => {
474
465
  };
475
466
  ```
476
467
 
477
- ## Implementation Priority
478
-
479
- ### 🔴 High Priority (Week 1)
480
- 1. ESLint + Prettier setup
481
- 2. Better error messages with suggestions
482
- 3. Input validation improvements
483
- 4. Bundle size optimization
484
-
485
- ### 🟡 Medium Priority (Weeks 2-3)
486
- 1. Plugin system
487
- 2. Integration tests
488
- 3. Performance benchmarks
489
- 4. CI/CD workflows (optional)
490
-
491
- ### 🟢 Low Priority (Month 2+)
492
- 1. Telemetry system
493
- 2. Advanced caching
494
- 3. Multi-language support
495
- 4. Interactive documentation
496
-
497
- ## Summary
498
-
499
- These optimizations can achieve:
500
- - **Performance**: ~40% faster installation
501
- - **Bundle Size**: ~30% reduction
502
- - **User Experience**: Significant improvements in error handling and progress tracking
503
- - **Code Quality**: Higher coverage and better maintainability
504
- - **Security**: Reduced attack surface and better validation
468
+ ## Evaluation requirements
469
+
470
+ Proposals need an owner, measured baseline, target platform matrix, compatibility
471
+ analysis, and tests before implementation. Do not claim performance or bundle
472
+ improvements without committed, reproducible benchmark evidence.
@@ -18,7 +18,10 @@ This repository is **npm-only** for development and CI workflows.
18
18
 
19
19
  ## Enforcement
20
20
 
21
- A `preinstall` guard blocks non-npm package managers during local install.
21
+ `npm run check:package-manager` from `packages/cli`, or
22
+ `npm --workspace workspai run check:package-manager` from the monorepo root,
23
+ enforces the policy in package validation and quality workflows. There is no
24
+ install-time `preinstall` guard.
22
25
 
23
26
  ## Notes
24
27
 
package/docs/README.md CHANGED
@@ -2,8 +2,32 @@
2
2
 
3
3
  Hub for user and contributor documentation. Start with the [main README](../README.md) for install and quickstarts.
4
4
 
5
+ `workspai` is the canonical package and command; `wspai` is only an optional
6
+ short `npx` alias. Install with `npm install -g workspai`, or run the current
7
+ release with `npx workspai@latest --help`.
8
+
9
+ ## Canonical quickstart
10
+
11
+ ```bash
12
+ npx workspai adopt /path/to/project --json
13
+ cd ~/.workspai/workspaces/workspai
14
+ npx workspai workspace intelligence run --for-agent codex --strict --json
15
+ ```
16
+
17
+ The broader governance/release pipeline is a separate gate:
18
+
19
+ ```bash
20
+ npx workspai pipeline --json --strict
21
+ ```
22
+
23
+ Adoption keeps source in place. The runner preserves contract order and writes
24
+ the authoritative `.workspai/reports/workspace-intelligence-run-last-run.json`
25
+ result alongside the model, agent context, report index, and generated
26
+ instructions; see the [Artifact Catalog](./contracts/ARTIFACT_CATALOG.md).
27
+
5
28
  ## Table of contents
6
29
 
30
+ - [Choose a guide by goal](#choose-a-guide-by-goal)
7
31
  - [User documentation](#user-documentation)
8
32
  - [Operations & security](#operations--security)
9
33
  - [AI module recommendations](#ai-module-recommendations)
@@ -11,78 +35,103 @@ Hub for user and contributor documentation. Start with the [main README](../READ
11
35
  - [Contributor documentation](#contributor-documentation)
12
36
  - [Validation commands](#validation-commands)
13
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
+ | Integrate CI or release gates | [CI workflows](./ci-workflows.md) | Machine-readable exit codes and uploadable evidence |
47
+ | Find the writer, schema, or path for an output | [Artifact Catalog](./contracts/ARTIFACT_CATALOG.md) | One canonical source instead of path guessing |
48
+ | Understand Workspai terminology | [Glossary](./GLOSSARY.md) | Shared meanings for model, graph, evidence, gate, and artifacts |
49
+ | Contribute to the CLI | [Development](./DEVELOPMENT.md) | Local build, test, contract, and documentation gates |
50
+
51
+ There are two different AI-facing features. Workspace Intelligence is
52
+ deterministic, proof-backed, and does not require an AI API key. The optional
53
+ module recommender uses embeddings to suggest FastAPI or NestJS modules; start
54
+ with [AI Quickstart](./AI_QUICKSTART.md) only when that is your goal.
55
+
14
56
  ## User documentation
15
57
 
16
- | Document | Description |
17
- | --- | --- |
18
- | [commands-reference.md](./commands-reference.md) | Full CLI syntax, profiles, and policy keys |
19
- | [workspace-operations.md](./workspace-operations.md) | Import, adopt, snapshots, archives, contracts, infra |
20
- | [workspace-run.md](./workspace-run.md) | Polyglot fleet orchestration (`workspace run`) |
21
- | [create-planner-capabilities.md](./create-planner-capabilities.md) | Native create, official, and existing lanes |
22
- | [../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 |
23
- | [from-code-to-shared-understanding.md](./from-code-to-shared-understanding.md) | GitHub-rendered Workspace Intelligence diagram |
24
- | [OPEN_SOURCE_USER_SCENARIOS.md](./OPEN_SOURCE_USER_SCENARIOS.md) | Role-based workflows (junior enterprise) |
25
- | [doctor-command.md](./doctor-command.md) | Doctor scopes, CI exit codes, JSON evidence |
26
- | [config-file-guide.md](./config-file-guide.md) | User config file (`~/.workspairc.json`, `workspai.config.*`, with legacy fallbacks) |
27
- | [WORKSPACE_MARKER_SPEC.md](./WORKSPACE_MARKER_SPEC.md) | Workspace marker format |
28
- | [PACKAGE_MANAGER_POLICY.md](./PACKAGE_MANAGER_POLICY.md) | npm-only policy for this repository |
58
+ | Document | Description |
59
+ | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
60
+ | [creating-workspaces-and-projects.md](./creating-workspaces-and-projects.md) | Plain-language guide to every workspace and project creation scenario |
61
+ | [commands-reference.md](./commands-reference.md) | Full CLI syntax, profiles, and policy keys |
62
+ | [workspace-operations.md](./workspace-operations.md) | Import, adopt, snapshots, archives, contracts, infra |
63
+ | [workspace-run.md](./workspace-run.md) | Polyglot fleet orchestration (`workspace run`) |
64
+ | [workspace-intelligence-runner.md](./workspace-intelligence-runner.md) | Canonical unified runner, execution envelope, report schema, exit codes, failure propagation, and CI consumption |
65
+ | [workspace-knowledge-graph.md](./workspace-knowledge-graph.md) | Two-minute graph quickstart, proof model, AI/MCP consumption, performance, and honest token-efficiency measurement |
66
+ | [graph-benchmark-methodology.md](./graph-benchmark-methodology.md) | Reproducible payload-reduction benchmark, formulas, claim boundaries, and publication rules |
67
+ | [GLOSSARY.md](./GLOSSARY.md) | Plain-language definitions for workspace, model, graph, evidence, gates, and AI integrations |
68
+ | [create-planner-capabilities.md](./create-planner-capabilities.md) | Native create, official, and existing lanes |
69
+ | [../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 |
70
+ | [from-code-to-shared-understanding.md](./from-code-to-shared-understanding.md) | GitHub-rendered Workspace Intelligence diagram |
71
+ | [OPEN_SOURCE_USER_SCENARIOS.md](./OPEN_SOURCE_USER_SCENARIOS.md) | Role-based workflows (junior → enterprise) |
72
+ | [doctor-command.md](./doctor-command.md) | Doctor scopes, CI exit codes, JSON evidence |
73
+ | [config-file-guide.md](./config-file-guide.md) | User config file (`~/.workspairc.json`, `workspai.config.*`, with legacy fallbacks) |
74
+ | [WORKSPACE_MARKER_SPEC.md](./WORKSPACE_MARKER_SPEC.md) | Workspace marker format |
75
+ | [PACKAGE_MANAGER_POLICY.md](./PACKAGE_MANAGER_POLICY.md) | npm-only policy for this repository |
29
76
 
30
77
  **Common tasks**
31
78
 
79
+ - Create a workspace or project: [creating-workspaces-and-projects.md](./creating-workspaces-and-projects.md)
32
80
  - Adopt an existing repo: [workspace-operations.md#import-and-adoption](./workspace-operations.md#import-and-adoption)
33
81
  - Scaffold a frontend app: [commands-reference.md](./commands-reference.md) (`create project nextjs <name>`)
34
- - CI release gate: [commands-reference.md](./commands-reference.md) (`pipeline`, `readiness`)
35
- - Agent context: `workspace model` / `workspace context` — schemas in [contracts/workspace-intelligence/](../contracts/workspace-intelligence/)
82
+ - Canonical intelligence gate: `workspace intelligence run --for-agent codex --strict --json`
83
+ - Broader CI release gate: [commands-reference.md](./commands-reference.md) (`pipeline`, `readiness`)
84
+ - Targeted model/context inspection — schemas in [contracts/workspace-intelligence/](../contracts/workspace-intelligence/)
36
85
 
37
86
  ## Operations & security
38
87
 
39
- | Document | Description |
40
- | --- | --- |
41
- | [SECURITY.md](./SECURITY.md) | Vulnerability reporting and supported versions |
42
- | [policies.workspace.example.yml](./policies.workspace.example.yml) | Workspace policy template |
43
- | [governance-policy.enterprise.example.json](./governance-policy.enterprise.example.json) | Sigstore governance allowlist template |
44
- | [mirror-config.enterprise.example.json](./mirror-config.enterprise.example.json) | Mirror + evidence export template |
88
+ | Document | Description |
89
+ | ---------------------------------------------------------------------------------------- | ---------------------------------------------- |
90
+ | [SECURITY.md](./SECURITY.md) | Vulnerability reporting and supported versions |
91
+ | [policies.workspace.example.yml](./policies.workspace.example.yml) | Workspace policy template |
92
+ | [governance-policy.enterprise.example.json](./governance-policy.enterprise.example.json) | Sigstore governance allowlist template |
93
+ | [mirror-config.enterprise.example.json](./mirror-config.enterprise.example.json) | Mirror + evidence export template |
45
94
 
46
95
  ## AI module recommendations
47
96
 
48
97
  FastAPI/NestJS module suggestions via OpenAI embeddings (optional).
49
98
 
50
- | Document | Description |
51
- | --- | --- |
52
- | [AI_QUICKSTART.md](./AI_QUICKSTART.md) | 60-second setup |
53
- | [AI_FEATURES.md](./AI_FEATURES.md) | Complete feature reference |
54
- | [AI_EXAMPLES.md](./AI_EXAMPLES.md) | Use-case examples |
55
- | [AI_DYNAMIC_INTEGRATION.md](./AI_DYNAMIC_INTEGRATION.md) | Integration architecture |
99
+ | Document | Description |
100
+ | -------------------------------------------------------- | -------------------------- |
101
+ | [AI_QUICKSTART.md](./AI_QUICKSTART.md) | 60-second setup |
102
+ | [AI_FEATURES.md](./AI_FEATURES.md) | Complete feature reference |
103
+ | [AI_EXAMPLES.md](./AI_EXAMPLES.md) | Use-case examples |
104
+ | [AI_DYNAMIC_INTEGRATION.md](./AI_DYNAMIC_INTEGRATION.md) | Integration architecture |
56
105
 
57
106
  ## Technical contracts
58
107
 
59
108
  JSON schemas and ownership rules for tooling parity.
60
109
 
61
- | Location | Description |
62
- | --- | --- |
63
- | [contracts/README.md](./contracts/README.md) | Core CLI JSON contracts + generator scripts |
64
- | [contracts/COMMAND_OWNERSHIP_MATRIX.md](./contracts/COMMAND_OWNERSHIP_MATRIX.md) | npm wrapper vs Core command ownership |
65
- | [contracts/RUNTIME_SUPPORT_MATRIX.md](./contracts/RUNTIME_SUPPORT_MATRIX.md) | Scaffold/import/lifecycle support tiers |
66
- | [contracts/RUNTIME_ACCEPTANCE_MATRIX.md](./contracts/RUNTIME_ACCEPTANCE_MATRIX.md) | Runtime acceptance test expectations |
67
- | [../contracts/](../contracts/) | Canonical JSON schemas (published in npm tarball) |
110
+ | Location | Description |
111
+ | ---------------------------------------------------------------------------------- | ------------------------------------------------- |
112
+ | [contracts/README.md](./contracts/README.md) | Core CLI JSON contracts + generator scripts |
113
+ | [contracts/COMMAND_OWNERSHIP_MATRIX.md](./contracts/COMMAND_OWNERSHIP_MATRIX.md) | npm wrapper vs Core command ownership |
114
+ | [contracts/RUNTIME_SUPPORT_MATRIX.md](./contracts/RUNTIME_SUPPORT_MATRIX.md) | Scaffold/import/lifecycle support tiers |
115
+ | [contracts/RUNTIME_ACCEPTANCE_MATRIX.md](./contracts/RUNTIME_ACCEPTANCE_MATRIX.md) | Runtime acceptance test expectations |
116
+ | [../contracts/](../contracts/) | Canonical JSON schemas (published in npm tarball) |
68
117
 
69
118
  Regenerate and verify:
70
119
 
71
120
  ```bash
72
121
  npm run generate:contracts
73
122
  npm run check:generated-contracts
74
- npm run validate:contracts
123
+ npm run contracts:validate
75
124
  ```
76
125
 
77
126
  ## Contributor documentation
78
127
 
79
- | Document | Description |
80
- | --- | --- |
81
- | [DEVELOPMENT.md](./DEVELOPMENT.md) | Local dev, testing, debugging |
82
- | [SETUP.md](./SETUP.md) | Build gates, smoke flows, release hygiene |
83
- | [ci-workflows.md](./ci-workflows.md) | GitHub Actions workflow map |
84
- | [OPTIMIZATION_GUIDE.md](./OPTIMIZATION_GUIDE.md) | Performance and improvement notes |
85
- | [UTILITIES.md](./UTILITIES.md) | Internal cache and metrics helpers |
128
+ | Document | Description |
129
+ | ------------------------------------------------ | ----------------------------------------- |
130
+ | [DEVELOPMENT.md](./DEVELOPMENT.md) | Local dev, testing, debugging |
131
+ | [SETUP.md](./SETUP.md) | Build gates, smoke flows, release hygiene |
132
+ | [ci-workflows.md](./ci-workflows.md) | GitHub Actions workflow map |
133
+ | [OPTIMIZATION_GUIDE.md](./OPTIMIZATION_GUIDE.md) | Performance and improvement notes |
134
+ | [UTILITIES.md](./UTILITIES.md) | Internal cache and metrics helpers |
86
135
 
87
136
  Also see [../CONTRIBUTING.md](../CONTRIBUTING.md) and [../CHANGELOG.md](../CHANGELOG.md).
88
137
 
package/docs/SECURITY.md CHANGED
@@ -2,12 +2,10 @@
2
2
 
3
3
  ## Supported Versions
4
4
 
5
- | Version | Supported |
6
- | ------- | ------------------ |
7
- | 0.35.x (latest minor) | :white_check_mark: |
8
- | < 0.35.0 | :x: |
9
-
10
- During the `0.x` phase, only the latest minor line receives security fixes.
5
+ During the `0.x` phase, only the latest published minor line receives security
6
+ fixes. Check the [npm package](https://www.npmjs.com/package/workspai) and
7
+ [changelog](../CHANGELOG.md) for the current supported line; older minor lines
8
+ are unsupported.
11
9
 
12
10
  ## Known Security Considerations
13
11
 
@@ -46,12 +44,21 @@ When using Workspai:
46
44
  2. **Review generated code**: Always review the workspace structure before deployment
47
45
  3. **Use official releases**: Install from npm registry, not from git directly
48
46
  4. **Verify package integrity**: Use `npm audit` on your generated project
47
+ 5. **Treat executable config as code**: Prefer `workspai.config.json`; only use
48
+ `--trust-config` after reviewing JavaScript configuration.
49
+ 6. **Keep remote archives public-network-only**: Private and loopback archive
50
+ URLs are rejected unless `--allow-private-network` is explicitly supplied.
51
+ 7. **Constrain mirror targets**: Artifact targets are restricted to the managed
52
+ mirror directory and are committed only after integrity/policy verification.
49
53
 
50
54
  ## Security Scanning
51
55
 
52
56
  We use:
53
57
  - GitHub Security Advisories
54
58
  - npm audit (production dependencies)
59
+ - CodeQL static analysis
60
+ - Pull-request dependency review
61
+ - CycloneDX SBOM generation
55
62
  - Dependabot for automated updates
56
63
  - Regular manual security reviews
57
64
 
package/docs/SETUP.md CHANGED
@@ -4,6 +4,9 @@ Canonical setup reference for **maintainers** of the Workspai CLI.
4
4
 
5
5
  **End users:** start with [../README.md](../README.md), [OPEN_SOURCE_USER_SCENARIOS.md](./OPEN_SOURCE_USER_SCENARIOS.md), and [workspace-operations.md](./workspace-operations.md).
6
6
 
7
+ Unless noted otherwise, run commands in this guide from `packages/cli`. From the
8
+ monorepo root, use `npm --workspace workspai run <script>`.
9
+
7
10
  ## Prerequisites
8
11
 
9
12
  - Node.js `>= 20.19.0`
@@ -19,14 +22,14 @@ npm ci
19
22
  npm run build
20
23
  npm run validate
21
24
  npm run validate:docs
22
- npm run validate:contracts
25
+ npm run contracts:validate
23
26
  ```
24
27
 
25
28
  | Command | Purpose |
26
29
  | --- | --- |
27
30
  | `validate` | typecheck + lint + format + tests |
28
31
  | `validate:docs` | markdown links, drift guard, doc examples, README smoke |
29
- | `validate:contracts` | generated JSON contracts + parity tests |
32
+ | `contracts:validate` | generated/shared contracts, parity, runtime conformance, and adversarial gates |
30
33
 
31
34
  See [ci-workflows.md](./ci-workflows.md) for GitHub Actions mapping.
32
35
 
@@ -38,7 +41,7 @@ npm run build
38
41
  node dist/index.js --help
39
42
  node dist/index.js --version
40
43
 
41
- node dist/index.js create workspace test-ws --yes --profile polyglot
44
+ node dist/index.js create workspace test-ws --here --yes --profile polyglot
42
45
  node dist/index.js workspace list
43
46
  cd test-ws
44
47
  node ../dist/index.js bootstrap --profile polyglot
package/docs/UTILITIES.md CHANGED
@@ -36,9 +36,9 @@ await cache.clear();
36
36
  ### Cache Features
37
37
  - **Memory cache** for fast access
38
38
  - **Disk cache** for persistence
39
- - **TTL**: 24 hours (configurable)
39
+ - **TTL**: fixed at 24 hours
40
40
  - **Versioning**: Version support
41
- - **Automatic cleanup**: Auto-removal of expired cache
41
+ - **Lazy cleanup**: Expired disk entries are removed when read
42
42
 
43
43
  ## Performance Monitoring
44
44
 
@@ -138,18 +138,11 @@ const user = await fetchUserData('123');
138
138
  // Second time: Reads from cache (fast)
139
139
  ```
140
140
 
141
- ## Environment Variables
141
+ ## Debugging
142
142
 
143
- ```bash
144
- # Enable debug mode to see cache hits/misses
145
- DEBUG=rapidkit:cache npm run dev
146
-
147
- # Enable performance logging
148
- DEBUG=rapidkit:perf npm run dev
149
-
150
- # Enable all
151
- DEBUG=rapidkit:* npm run dev
152
- ```
143
+ These utilities do not implement `DEBUG=rapidkit:*` namespace handling. Use the
144
+ CLI's supported `--debug` flag where available, or enable `logger.setDebug(true)`
145
+ in a focused maintainer harness.
153
146
 
154
147
  ## Testing
155
148
 
@@ -211,11 +204,6 @@ chmod 700 "$HOME/.workspai/cache"
211
204
  ```
212
205
 
213
206
  ### Incorrect performance metrics
214
- ```bash
215
- # Make sure you're in debug mode
216
- export DEBUG=rapidkit:perf
217
- npm run dev
218
207
 
219
- # Check memory usage
220
- node --expose-gc --max-old-space-size=4096 dist/index.js
221
- ```
208
+ Verify that each timer is started and ended exactly once. For focused memory
209
+ diagnostics, run `node --expose-gc --max-old-space-size=4096 dist/index.js`.
@@ -12,7 +12,7 @@ The `.workspai-workspace` file is the canonical marker that identifies a Workspa
12
12
  {
13
13
  "signature": "RAPIDKIT_WORKSPACE",
14
14
  "createdBy": "workspai-cli",
15
- "version": "0.15.1",
15
+ "version": "<workspai-version>",
16
16
  "createdAt": "2026-02-01T12:23:31.993Z",
17
17
  "name": "workspace-name",
18
18
  "metadata": { ... }
@@ -36,20 +36,22 @@ The metadata layer allows each tool to store its own information without conflic
36
36
  {
37
37
  "metadata": {
38
38
  "vscode": {
39
- "extensionVersion": "0.5.0",
39
+ "extensionVersion": "<extension-version>",
40
40
  "createdViaExtension": true,
41
41
  "lastOpenedAt": "2026-02-01T14:30:00.000Z",
42
42
  "openCount": 5
43
43
  },
44
44
  "npm": {
45
- "packageVersion": "0.15.1",
45
+ "packageVersion": "<workspai-version>",
46
46
  "installMethod": "poetry",
47
47
  "lastUsedAt": "2026-02-01T12:23:31.993Z"
48
48
  },
49
49
  "python": {
50
- "coreVersion": "0.2.1",
50
+ "coreVersion": "<rapidkit-core-version>",
51
51
  "pythonVersion": "3.10",
52
- "venvPath": ".venv"
52
+ "venvPath": ".venv",
53
+ "coreStatus": "installed",
54
+ "coreReason": "workspace profile requires Python Core"
53
55
  },
54
56
  "custom": {
55
57
  "myTool": "data"
@@ -82,6 +84,8 @@ The metadata layer allows each tool to store its own information without conflic
82
84
  | `coreVersion` | `string` | RapidKit Core version |
83
85
  | `pythonVersion` | `string` | Python version used |
84
86
  | `venvPath` | `string` | Virtual environment path (relative) |
87
+ | `coreStatus` | `"installed" \| "skipped"` | Whether the optional Python engine is installed |
88
+ | `coreReason` | `string` | Reason for the current engine state |
85
89
 
86
90
  ## Usage Guidelines
87
91
 
@@ -91,7 +95,7 @@ The metadata layer allows each tool to store its own information without conflic
91
95
  ```typescript
92
96
  import { createNpmWorkspaceMarker, writeWorkspaceMarker } from './workspace-marker';
93
97
 
94
- const marker = createNpmWorkspaceMarker('my-workspace', '0.15.1', 'poetry');
98
+ const marker = createNpmWorkspaceMarker('my-workspace', '<workspai-version>', 'poetry');
95
99
  await writeWorkspaceMarker('/path/to/workspace', marker);
96
100
  ```
97
101
 
@@ -100,7 +104,7 @@ await writeWorkspaceMarker('/path/to/workspace', marker);
100
104
  // Let npm create the marker, then add VS Code metadata
101
105
  await updateWorkspaceMetadata(workspacePath, {
102
106
  vscode: {
103
- extensionVersion: '0.5.0',
107
+ extensionVersion: '<extension-version>',
104
108
  createdViaExtension: true,
105
109
  lastOpenedAt: new Date().toISOString(),
106
110
  openCount: 1,
@@ -127,18 +131,21 @@ if (marker) {
127
131
 
128
132
  ### Updating Metadata
129
133
 
130
- **Always use `updateWorkspaceMetadata()` to preserve existing metadata:**
134
+ Prefer `updateWorkspaceMetadata()` for nested metadata updates. The marker writer
135
+ preserves existing top-level metadata namespaces, but can replace core fields or
136
+ an individual nested namespace value; it is not a deep-merge API.
131
137
 
132
138
  ```typescript
133
139
  // ✅ Correct - preserves other metadata
134
140
  await updateWorkspaceMetadata(workspacePath, {
135
141
  vscode: {
136
- extensionVersion: '0.5.0',
142
+ extensionVersion: '<extension-version>',
143
+ createdViaExtension: false,
137
144
  lastOpenedAt: new Date().toISOString(),
138
145
  },
139
146
  });
140
147
 
141
- // Wrong - overwrites entire marker
148
+ // Use direct writes only when intentionally replacing core marker fields.
142
149
  await writeWorkspaceMarker(workspacePath, newMarker);
143
150
  ```
144
151
 
@@ -172,10 +179,10 @@ Old format (Extension-specific):
172
179
  {
173
180
  "signature": "RAPIDKIT_WORKSPACE",
174
181
  "createdBy": "rapidkit-vscode",
175
- "version": "0.15.1",
182
+ "version": "<legacy-tool-version>",
176
183
  "createdAt": "2026-02-01T12:24:21.830Z",
177
184
  "name": "alef",
178
- "vscodeVersion": "0.5.0",
185
+ "vscodeVersion": "<legacy-extension-version>",
179
186
  "originalCreatedBy": "rapidkit-npm"
180
187
  }
181
188
  ```
@@ -185,12 +192,12 @@ New format (standardized):
185
192
  {
186
193
  "signature": "RAPIDKIT_WORKSPACE",
187
194
  "createdBy": "workspai-cli",
188
- "version": "0.15.1",
195
+ "version": "<workspai-version>",
189
196
  "createdAt": "2026-02-01T12:24:21.830Z",
190
197
  "name": "alef",
191
198
  "metadata": {
192
199
  "vscode": {
193
- "extensionVersion": "0.5.0",
200
+ "extensionVersion": "<extension-version>",
194
201
  "createdViaExtension": true,
195
202
  "lastOpenedAt": "2026-02-01T12:24:21.830Z",
196
203
  "openCount": 1
@@ -222,16 +229,16 @@ Result:
222
229
  {
223
230
  "signature": "RAPIDKIT_WORKSPACE",
224
231
  "createdBy": "workspai-cli",
225
- "version": "0.15.1",
232
+ "version": "<workspai-version>",
226
233
  "createdAt": "2026-02-01T10:00:00.000Z",
227
234
  "name": "my-workspace",
228
235
  "metadata": {
229
236
  "npm": {
230
- "packageVersion": "0.15.1",
237
+ "packageVersion": "<workspai-version>",
231
238
  "installMethod": "poetry"
232
239
  },
233
240
  "vscode": {
234
- "extensionVersion": "0.5.0",
241
+ "extensionVersion": "<extension-version>",
235
242
  "createdViaExtension": false,
236
243
  "lastOpenedAt": "2026-02-01T11:00:00.000Z",
237
244
  "openCount": 1
@@ -253,16 +260,16 @@ Result:
253
260
  {
254
261
  "signature": "RAPIDKIT_WORKSPACE",
255
262
  "createdBy": "workspai-cli",
256
- "version": "0.15.1",
263
+ "version": "<workspai-version>",
257
264
  "createdAt": "2026-02-01T10:00:00.000Z",
258
265
  "name": "my-workspace",
259
266
  "metadata": {
260
267
  "npm": {
261
- "packageVersion": "0.15.1",
268
+ "packageVersion": "<workspai-version>",
262
269
  "installMethod": "poetry"
263
270
  },
264
271
  "vscode": {
265
- "extensionVersion": "0.5.0",
272
+ "extensionVersion": "<extension-version>",
266
273
  "createdViaExtension": true,
267
274
  "lastOpenedAt": "2026-02-01T10:00:00.000Z",
268
275
  "openCount": 1
@@ -12,6 +12,13 @@ Map of GitHub Actions workflows in this repository. Use this when editing CI to
12
12
  | E2E smoke | `.github/workflows/e2e-smoke.yml` | Focused bridge regression smoke |
13
13
  | Frontend generator smoke | `.github/workflows/frontend-generator-smoke.yml` | Official frontend generator drift gate |
14
14
  | Security | `.github/workflows/security.yml` | Security scanning and policy checks |
15
+ | Manual npm release | `.github/workflows/release-npm-manual.yml` | Maintainer-only release gate and publish workflow |
16
+ | Contributor onboarding | `.github/workflows/contributor-onboarding.yml` | Accepted-contributor onboarding automation |
17
+ | Welcome | `.github/workflows/welcome.yml` | First-issue and first-contribution messages |
18
+
19
+ The release workflow requires `Frontend Generator Smoke` for the exact release
20
+ SHA. Maintainers must dispatch that workflow against the intended release ref
21
+ before starting a manual npm release if no matching run exists.
15
22
 
16
23
  ## Consumer workspace: agent grounding CI
17
24
 
@@ -22,13 +29,20 @@ For Workspai **consumer workspaces** (not this CLI repo), use the copy-paste tem
22
29
  Minimal job:
23
30
 
24
31
  ```yaml
25
- - run: npx workspai pipeline --json --strict
26
- - run: npx workspai workspace agent-sync --write --refresh-context --strict --json --preset enterprise
32
+ - run: npx workspai workspace intelligence run --for-agent codex --strict --json
33
+ - run: npx workspai pipeline --json --strict --no-agent-sync
27
34
  - run: node ./node_modules/workspai/scripts/check-agent-customization-drift.mjs --workspace .
28
35
  ```
29
36
 
30
- `pipeline` writes governance evidence and **auto-syncs** agent grounding (`AGENTS.md`, Copilot, Cursor, Claude) unless `RAPIDKIT_NO_AGENT_SYNC=1` or `--no-agent-sync`.
31
- Run the drift check after `agent-sync --write` so CI fails when generated agent customization files are stale.
37
+ The canonical runner owns ordered evidence and agent grounding. The separate
38
+ pipeline uses `--no-agent-sync` so it cannot rewrite those surfaces afterward.
39
+ Run the drift check last so CI fails when generated customization files are stale.
40
+ Runner exit `1` is a hard execution failure; exit `2` is a completed but
41
+ evidence-blocked run and must also block release. When evidence must be uploaded
42
+ after either outcome, follow the `continue-on-error` plus final-failure pattern
43
+ in the template. See
44
+ [Unified Workspace Intelligence Runner](./workspace-intelligence-runner.md) for
45
+ the exact preflight, 11-stage, artifact, and exit contract.
32
46
 
33
47
  ## Local validation scripts
34
48
 
@@ -48,7 +62,7 @@ Run the drift check after `agent-sync --write` so CI fails when generated agent
48
62
  npm run validate
49
63
  npm run validate:docs
50
64
  npm run security
51
- npm run security
65
+ npm run contracts:validate
52
66
  npm run test:runtime-matrix:full
53
67
  ```
54
68