workspai 0.43.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 (255) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +624 -0
  3. package/contracts/agent-customization-pack.v1.json +229 -0
  4. package/contracts/analyze-last-run.v1.json +106 -0
  5. package/contracts/artifact-remediation-plan.v1.json +163 -0
  6. package/contracts/backend-import-stack-parity.snapshot.json +37 -0
  7. package/contracts/cli-log-event.v1.json +51 -0
  8. package/contracts/create-planner-capabilities.v1.json +251 -0
  9. package/contracts/doctor-project-evidence.v1.json +304 -0
  10. package/contracts/doctor-remediation-plan.v1.json +496 -0
  11. package/contracts/doctor-workspace-evidence.v1.json +315 -0
  12. package/contracts/extension-cli-compatibility.v1.json +26 -0
  13. package/contracts/infra-stack.v1.json +305 -0
  14. package/contracts/module-layout.v1.json +34 -0
  15. package/contracts/module-support.v1.json +20 -0
  16. package/contracts/pipeline-last-run.v1.json +80 -0
  17. package/contracts/release-readiness.v1.json +60 -0
  18. package/contracts/runtime-command-surface.v1.json +364 -0
  19. package/contracts/workspace-intelligence/agent-action-outcome.v1.json +38 -0
  20. package/contracts/workspace-intelligence/blocker-resolution.v1.json +65 -0
  21. package/contracts/workspace-intelligence/doctor-fix-result.v1.json +44 -0
  22. package/contracts/workspace-intelligence/fact-freshness.v1.json +58 -0
  23. package/contracts/workspace-intelligence/studio-blocker-handoff.v1.json +115 -0
  24. package/contracts/workspace-intelligence/workspace-context.v1.json +142 -0
  25. package/contracts/workspace-intelligence/workspace-contract-verify.v1.json +51 -0
  26. package/contracts/workspace-intelligence/workspace-dependency-graph.v1.json +152 -0
  27. package/contracts/workspace-intelligence/workspace-explain.v1.json +31 -0
  28. package/contracts/workspace-intelligence/workspace-impact.v1.json +114 -0
  29. package/contracts/workspace-intelligence/workspace-intelligence-history.v1.json +40 -0
  30. package/contracts/workspace-intelligence/workspace-model-diff.v1.json +105 -0
  31. package/contracts/workspace-intelligence/workspace-model-snapshot.v1.json +36 -0
  32. package/contracts/workspace-intelligence/workspace-model.v1.json +135 -0
  33. package/contracts/workspace-intelligence/workspace-operational-skill.v1.json +37 -0
  34. package/contracts/workspace-intelligence/workspace-skills-index.v1.json +27 -0
  35. package/contracts/workspace-intelligence/workspace-verify.v1.json +213 -0
  36. package/contracts/workspace-registry.v1.json +83 -0
  37. package/contracts/workspace-run-last.v1.json +112 -0
  38. package/data/modules-embeddings.json +16953 -0
  39. package/dist/analyze-5BU4QIPK.js +1 -0
  40. package/dist/artifact-remediation-plan-5GJWPPRS.js +3 -0
  41. package/dist/autopilot-release-QYUOVB26.js +1 -0
  42. package/dist/chunk-22DT744Z.js +1 -0
  43. package/dist/chunk-2E6WGUN6.js +1 -0
  44. package/dist/chunk-2FIX2MDC.js +1 -0
  45. package/dist/chunk-3KXW53QI.js +1 -0
  46. package/dist/chunk-3ZK2GU7C.js +1 -0
  47. package/dist/chunk-4KUIFXHM.js +5 -0
  48. package/dist/chunk-54XJNLYC.js +13 -0
  49. package/dist/chunk-5SWNSJGW.js +1 -0
  50. package/dist/chunk-5XATWNME.js +1 -0
  51. package/dist/chunk-753LOKFZ.js +2 -0
  52. package/dist/chunk-7YHK5NM3.js +2 -0
  53. package/dist/chunk-A5FBGRJA.js +1 -0
  54. package/dist/chunk-AAKUNWPR.js +78 -0
  55. package/dist/chunk-AFSZHLQT.js +1 -0
  56. package/dist/chunk-AQ4XZZC6.js +1 -0
  57. package/dist/chunk-CVTCPPEF.js +1 -0
  58. package/dist/chunk-DNAY5ALC.js +1 -0
  59. package/dist/chunk-EWYYLJQY.js +2 -0
  60. package/dist/chunk-GSWPGELT.js +2 -0
  61. package/dist/chunk-GZTYAEWX.js +1 -0
  62. package/dist/chunk-HTYMXMQM.js +1 -0
  63. package/dist/chunk-IBJEQHJR.js +205 -0
  64. package/dist/chunk-ICGWHIMK.js +1 -0
  65. package/dist/chunk-JEI6BTZI.js +3 -0
  66. package/dist/chunk-JHC6SCJC.js +1 -0
  67. package/dist/chunk-LO4C4VXR.js +4 -0
  68. package/dist/chunk-LPZFK3Y6.js +920 -0
  69. package/dist/chunk-LUP4U6EE.js +1 -0
  70. package/dist/chunk-LYC6AIF2.js +2 -0
  71. package/dist/chunk-LZQNVH7D.js +1 -0
  72. package/dist/chunk-NAAQMSO3.js +1 -0
  73. package/dist/chunk-NFUXULIF.js +1 -0
  74. package/dist/chunk-OCGZNSOE.js +1 -0
  75. package/dist/chunk-OJEWQO3Z.js +33 -0
  76. package/dist/chunk-OL64GWQC.js +9 -0
  77. package/dist/chunk-PI5KUXDA.js +7 -0
  78. package/dist/chunk-PYCJWW4B.js +1 -0
  79. package/dist/chunk-RE773WOX.js +13 -0
  80. package/dist/chunk-RO73VVHW.js +2 -0
  81. package/dist/chunk-S5KTATOU.js +1 -0
  82. package/dist/chunk-SI3AQKIP.js +1 -0
  83. package/dist/chunk-T3GJ7YVG.js +1 -0
  84. package/dist/chunk-T6OR6YOI.js +2 -0
  85. package/dist/chunk-VRDF2J46.js +653 -0
  86. package/dist/chunk-VZKSNUEE.js +2 -0
  87. package/dist/chunk-WU4ZRRA5.js +4 -0
  88. package/dist/chunk-XEJD4KCV.js +33 -0
  89. package/dist/chunk-XZGVNGRB.js +1 -0
  90. package/dist/chunk-Y45WZR5N.js +5 -0
  91. package/dist/create-WRZO4HK2.js +1 -0
  92. package/dist/demo-kit-AJ5LIM5G.js +149 -0
  93. package/dist/doctor-MF3M3FS3.js +1 -0
  94. package/dist/dotnet-webapi-clean-IPY3MCGQ.js +425 -0
  95. package/dist/gofiber-standard-N5N3QGH3.js +1397 -0
  96. package/dist/gogin-standard-LAWQTBWL.js +1459 -0
  97. package/dist/imported-projects-registry-FOIE27WT.js +1 -0
  98. package/dist/index.d.ts +141 -0
  99. package/dist/index.js +454 -0
  100. package/dist/managed-agent-markers-AXUM75OE.js +8 -0
  101. package/dist/module-layout-NZ43RSC5.js +1 -0
  102. package/dist/pipeline-QCUHFWDY.js +5 -0
  103. package/dist/platform-capabilities-XAVU4HSM.js +1 -0
  104. package/dist/pythonRapidkitExec-3L3XJBSY.js +1 -0
  105. package/dist/springboot-standard-OZYF7ZM7.js +697 -0
  106. package/dist/workspace-PR6VZRBG.js +1 -0
  107. package/dist/workspace-agent-sync-KTYF3HQR.js +1 -0
  108. package/dist/workspace-archive-GCZNI44O.js +3 -0
  109. package/dist/workspace-context-QUTOP2XV.js +1 -0
  110. package/dist/workspace-contract-XUGMCUSQ.js +1 -0
  111. package/dist/workspace-explain-JEONEGZZ.js +1 -0
  112. package/dist/workspace-explain-contract-DNS2YEL7.js +1 -0
  113. package/dist/workspace-feedback-R6H4UFZB.js +1 -0
  114. package/dist/workspace-foundation-KGSV4E6D.js +1 -0
  115. package/dist/workspace-graph-2A5THUCI.js +1 -0
  116. package/dist/workspace-history-CGCK2DJI.js +1 -0
  117. package/dist/workspace-intelligence-QJGVL37U.js +1 -0
  118. package/dist/workspace-marker-SMBC3Z2Q.js +1 -0
  119. package/dist/workspace-mcp-serve-AK4MYEHQ.js +3 -0
  120. package/dist/workspace-model-PNXXOGPO.js +1 -0
  121. package/dist/workspace-python-engine-state-MTWIIZPY.js +2 -0
  122. package/dist/workspace-registry-summary-RUJE6RPH.js +1 -0
  123. package/dist/workspace-run-Y7YMUIHX.js +1 -0
  124. package/dist/workspace-verify-WSDUUTR5.js +1 -0
  125. package/dist/workspace-watch-AGPOJ74Q.js +1 -0
  126. package/docs/AI_DYNAMIC_INTEGRATION.md +440 -0
  127. package/docs/AI_EXAMPLES.md +419 -0
  128. package/docs/AI_FEATURES.md +460 -0
  129. package/docs/AI_QUICKSTART.md +245 -0
  130. package/docs/DEVELOPMENT.md +90 -0
  131. package/docs/From Code to Shared Understanding.png +0 -0
  132. package/docs/OPEN_SOURCE_USER_SCENARIOS.md +170 -0
  133. package/docs/OPTIMIZATION_GUIDE.md +504 -0
  134. package/docs/PACKAGE_MANAGER_POLICY.md +25 -0
  135. package/docs/README.md +125 -0
  136. package/docs/SECURITY.md +63 -0
  137. package/docs/SETUP.md +107 -0
  138. package/docs/UTILITIES.md +221 -0
  139. package/docs/WORKSPACE_MARKER_SPEC.md +276 -0
  140. package/docs/ci-workflows.md +59 -0
  141. package/docs/commands-reference.md +172 -0
  142. package/docs/config-file-guide.md +299 -0
  143. package/docs/contracts/ARTIFACT_CATALOG.md +333 -0
  144. package/docs/contracts/CLI_LOG_EVENT_STREAM.md +123 -0
  145. package/docs/contracts/COMMAND_OWNERSHIP_MATRIX.md +138 -0
  146. package/docs/contracts/NAMING_AND_COEXISTENCE.md +60 -0
  147. package/docs/contracts/README.md +86 -0
  148. package/docs/contracts/RUNTIME_ACCEPTANCE_MATRIX.md +98 -0
  149. package/docs/contracts/RUNTIME_SUPPORT_MATRIX.md +75 -0
  150. package/docs/contracts/rapidkit-cli-contracts.json +239 -0
  151. package/docs/create-planner-capabilities.md +81 -0
  152. package/docs/doctor-command.md +467 -0
  153. package/docs/examples/ci-agent-grounding.yml +65 -0
  154. package/docs/from-code-to-shared-understanding.md +45 -0
  155. package/docs/governance-policy.enterprise.example.json +40 -0
  156. package/docs/mirror-config.enterprise.example.json +60 -0
  157. package/docs/policies.workspace.example.yml +23 -0
  158. package/docs/workspace-operations.md +160 -0
  159. package/docs/workspace-run.md +104 -0
  160. package/package.json +179 -0
  161. package/rapidkit.config.example.cjs +62 -0
  162. package/scripts/check-agent-customization-drift.mjs +78 -0
  163. package/scripts/check-cli-resolution.cjs +72 -0
  164. package/scripts/enforce-package-manager.cjs +10 -0
  165. package/scripts/enterprise-package-smoke.mjs +463 -0
  166. package/scripts/prepack-enterprise.mjs +43 -0
  167. package/templates/generator.js +179 -0
  168. package/templates/kits/fastapi-ddd/README.md.j2 +117 -0
  169. package/templates/kits/fastapi-ddd/common/env.example.j2 +10 -0
  170. package/templates/kits/fastapi-ddd/env.example.j2 +1 -0
  171. package/templates/kits/fastapi-ddd/pyproject.toml.j2 +64 -0
  172. package/templates/kits/fastapi-ddd/src/__init__.py.j2 +3 -0
  173. package/templates/kits/fastapi-ddd/src/app/__init__.py.j2 +11 -0
  174. package/templates/kits/fastapi-ddd/src/app/application/__init__.py.j2 +5 -0
  175. package/templates/kits/fastapi-ddd/src/app/application/interfaces.py.j2 +43 -0
  176. package/templates/kits/fastapi-ddd/src/app/application/use_cases/__init__.py.j2 +6 -0
  177. package/templates/kits/fastapi-ddd/src/app/application/use_cases/health.py.j2 +14 -0
  178. package/templates/kits/fastapi-ddd/src/app/application/use_cases/notes.py.j2 +24 -0
  179. package/templates/kits/fastapi-ddd/src/app/config/__init__.py.j2 +16 -0
  180. package/templates/kits/fastapi-ddd/src/app/domain/__init__.py.j2 +3 -0
  181. package/templates/kits/fastapi-ddd/src/app/domain/models/__init__.py.j2 +6 -0
  182. package/templates/kits/fastapi-ddd/src/app/domain/models/health.py.j2 +16 -0
  183. package/templates/kits/fastapi-ddd/src/app/domain/models/note.py.j2 +27 -0
  184. package/templates/kits/fastapi-ddd/src/app/infrastructure/__init__.py.j2 +5 -0
  185. package/templates/kits/fastapi-ddd/src/app/infrastructure/repositories/__init__.py.j2 +6 -0
  186. package/templates/kits/fastapi-ddd/src/app/infrastructure/repositories/health.py.j2 +17 -0
  187. package/templates/kits/fastapi-ddd/src/app/infrastructure/repositories/notes.py.j2 +28 -0
  188. package/templates/kits/fastapi-ddd/src/app/main.py.j2 +61 -0
  189. package/templates/kits/fastapi-ddd/src/app/presentation/__init__.py.j2 +3 -0
  190. package/templates/kits/fastapi-ddd/src/app/presentation/api/__init__.py.j2 +5 -0
  191. package/templates/kits/fastapi-ddd/src/app/presentation/api/dependencies/__init__.py.j2 +19 -0
  192. package/templates/kits/fastapi-ddd/src/app/presentation/api/router.py.j2 +10 -0
  193. package/templates/kits/fastapi-ddd/src/app/presentation/api/routes/__init__.py.j2 +5 -0
  194. package/templates/kits/fastapi-ddd/src/app/presentation/api/routes/health.py.j2 +27 -0
  195. package/templates/kits/fastapi-ddd/src/app/presentation/api/routes/notes.py.j2 +50 -0
  196. package/templates/kits/fastapi-ddd/src/app/shared/__init__.py.j2 +5 -0
  197. package/templates/kits/fastapi-ddd/src/app/shared/result.py.j2 +28 -0
  198. package/templates/kits/fastapi-ddd/src/cli.py.j2 +170 -0
  199. package/templates/kits/fastapi-ddd/src/main.py.j2 +35 -0
  200. package/templates/kits/fastapi-ddd/src/modules/__init__.py.j2 +3 -0
  201. package/templates/kits/fastapi-ddd/src/routing/__init__.py.j2 +13 -0
  202. package/templates/kits/fastapi-ddd/src/routing/health.py.j2 +7 -0
  203. package/templates/kits/fastapi-ddd/src/routing/notes.py.j2 +7 -0
  204. package/templates/kits/fastapi-ddd/tests/__init__.py.j2 +1 -0
  205. package/templates/kits/fastapi-ddd/tests/test_app_factory.py.j2 +22 -0
  206. package/templates/kits/fastapi-ddd/tests/test_health.py.j2 +17 -0
  207. package/templates/kits/fastapi-ddd/tests/test_notes.py.j2 +27 -0
  208. package/templates/kits/fastapi-standard/README.md.j2 +140 -0
  209. package/templates/kits/fastapi-standard/common/env.example.j2 +10 -0
  210. package/templates/kits/fastapi-standard/env.example.j2 +1 -0
  211. package/templates/kits/fastapi-standard/pyproject.toml.j2 +64 -0
  212. package/templates/kits/fastapi-standard/src/__init__.py.j2 +3 -0
  213. package/templates/kits/fastapi-standard/src/cli.py.j2 +171 -0
  214. package/templates/kits/fastapi-standard/src/main.py.j2 +66 -0
  215. package/templates/kits/fastapi-standard/src/modules/__init__.py.j2 +3 -0
  216. package/templates/kits/fastapi-standard/src/routing/__init__.py.j2 +16 -0
  217. package/templates/kits/fastapi-standard/src/routing/examples.py.j2 +71 -0
  218. package/templates/kits/fastapi-standard/src/routing/health.py.j2 +22 -0
  219. package/templates/kits/fastapi-standard/tests/__init__.py.j2 +1 -0
  220. package/templates/kits/fastapi-standard/tests/test_examples.py.j2 +29 -0
  221. package/templates/kits/fastapi-standard/tests/test_health.py.j2 +17 -0
  222. package/templates/kits/nestjs-standard/Dockerfile.j2 +41 -0
  223. package/templates/kits/nestjs-standard/README.md.j2 +134 -0
  224. package/templates/kits/nestjs-standard/docker-compose.yml.j2 +94 -0
  225. package/templates/kits/nestjs-standard/docs/README.md.j2 +15 -0
  226. package/templates/kits/nestjs-standard/env.example.j2 +18 -0
  227. package/templates/kits/nestjs-standard/eslint.config.cjs.j2 +9 -0
  228. package/templates/kits/nestjs-standard/jest.config.ts.j2 +28 -0
  229. package/templates/kits/nestjs-standard/nest-cli.json.j2 +10 -0
  230. package/templates/kits/nestjs-standard/package.json.j2 +101 -0
  231. package/templates/kits/nestjs-standard/src/app.controller.ts.j2 +14 -0
  232. package/templates/kits/nestjs-standard/src/app.module.ts.j2 +26 -0
  233. package/templates/kits/nestjs-standard/src/app.service.ts.j2 +16 -0
  234. package/templates/kits/nestjs-standard/src/auth/auth.controller.ts.j2 +20 -0
  235. package/templates/kits/nestjs-standard/src/auth/auth.module.ts.j2 +13 -0
  236. package/templates/kits/nestjs-standard/src/auth/auth.service.ts.j2 +6 -0
  237. package/templates/kits/nestjs-standard/src/auth/entities/token.entity.ts.j2 +3 -0
  238. package/templates/kits/nestjs-standard/src/auth/entities/user.entity.ts.j2 +3 -0
  239. package/templates/kits/nestjs-standard/src/auth/entities/webauthn.entity.ts.j2 +3 -0
  240. package/templates/kits/nestjs-standard/src/config/configuration.ts.j2 +85 -0
  241. package/templates/kits/nestjs-standard/src/config/index.ts.j2 +2 -0
  242. package/templates/kits/nestjs-standard/src/config/validation.ts.j2 +21 -0
  243. package/templates/kits/nestjs-standard/src/examples/dto/create-note.dto.ts.j2 +11 -0
  244. package/templates/kits/nestjs-standard/src/examples/examples.controller.ts.j2 +24 -0
  245. package/templates/kits/nestjs-standard/src/examples/examples.module.ts.j2 +10 -0
  246. package/templates/kits/nestjs-standard/src/examples/examples.service.ts.j2 +33 -0
  247. package/templates/kits/nestjs-standard/src/main.ts.j2 +53 -0
  248. package/templates/kits/nestjs-standard/src/modules/index.ts.j2 +25 -0
  249. package/templates/kits/nestjs-standard/test/app.controller.spec.ts.j2 +24 -0
  250. package/templates/kits/nestjs-standard/test/app.e2e-spec.ts.j2 +60 -0
  251. package/templates/kits/nestjs-standard/test/examples.controller.spec.ts.j2 +28 -0
  252. package/templates/kits/nestjs-standard/test/jest-e2e.json.j2 +15 -0
  253. package/templates/kits/nestjs-standard/tsconfig.build.json.j2 +12 -0
  254. package/templates/kits/nestjs-standard/tsconfig.json.j2 +26 -0
  255. package/workspai.config.example.cjs +62 -0
@@ -0,0 +1,172 @@
1
+ # Commands Reference
2
+
3
+ Complete CLI syntax for the Workspai CLI. For behavior and workflows, see [workspace-operations.md](./workspace-operations.md) and [OPEN_SOURCE_USER_SCENARIOS.md](./OPEN_SOURCE_USER_SCENARIOS.md).
4
+
5
+ ## Workspace lifecycle
6
+
7
+ ```bash
8
+ npx workspai create # Prompts: workspace | project
9
+ npx workspai create workspace <name> [--profile <profile>] [--author <name>] [--yes] [--here|--output <parent-dir>] [--skip-python-engine]
10
+ npx workspai bootstrap [--profile <profile>] [--ci] [--json] [--compliance-only]
11
+ npx workspai setup <python|node|go|java|dotnet> [--warm-deps]
12
+ npx workspai pipeline [--json] [--strict] [--skip-verify] [--skip-analyze] [--skip-autopilot] [--autopilot-mode <audit|safe-fix|enforce>]
13
+ npx workspai analyze [--workspace <path>] [--json] [--strict] [--output <file>]
14
+ npx workspai readiness [--json] [--strict] [--skip-verify]
15
+ npx workspai autopilot release [--mode <audit|safe-fix|enforce>] [--json] [--output <file>] [--since <ref>] [--parallel] [--max-workers <n>]
16
+ ```
17
+
18
+ Recommended CI:
19
+
20
+ ```bash
21
+ npx workspai pipeline --json --strict
22
+ npx workspai autopilot release --mode enforce --json --output .workspai/reports/autopilot-release.json
23
+ ```
24
+
25
+ `bootstrap --ci --json --compliance-only` runs deterministic compliance checks only (skips init). Default `bootstrap --ci --json` still runs init after compliance checks.
26
+
27
+ `create workspace --skip-python-engine` keeps Python-aware profiles such as
28
+ `python-only`, `polyglot`, and `enterprise` available for Workspace Intelligence
29
+ while skipping the immediate `rapidkit-core` install. Use it when you want
30
+ model/context/verify/adopt/import governance first. To add the workspace-local
31
+ Python engine later for RapidKit Core module-enabled kits, create or register the
32
+ Workspai-owned project first and then run `npx workspai workspace run init` from
33
+ the workspace root. Empty skipped workspaces and arbitrary adopted/imported
34
+ Python projects keep the Python engine skipped; use `npx workspai bootstrap
35
+ --profile <profile>` only when you need to change or realign the workspace
36
+ profile.
37
+
38
+ ```bash
39
+ npx workspai workspace sync [--json]
40
+ npx workspai workspace policy show
41
+ npx workspai workspace policy set <key> <value>
42
+ npx workspai doctor
43
+ npx workspai doctor workspace [--json] [--strict] [--ci] [--fix] [--plan] [--apply]
44
+ npx workspai doctor project [--json] [--strict] [--ci] [--fix] [--plan] [--apply]
45
+ npx workspai workspace list
46
+ npx workspai workspace foundation ensure [--force] [--json]
47
+ npx workspai workspace share [--output <file>] [--include-paths] [--no-doctor]
48
+ npx workspai workspace contract init [--force] [--json]
49
+ npx workspai workspace contract inspect [--json]
50
+ npx workspai workspace contract verify [--strict] [--json]
51
+ npx workspai workspace contract graph [--json]
52
+ npx workspai workspace model [--json] [--write] [--strict]
53
+ npx workspai workspace context --for-agent [codex|claude|cursor|orca] [--json] [--write] [--no-agent-sync]
54
+ npx workspai workspace agent-sync [--write] [--refresh-context] [--strict] [--json] [--preset minimal|enterprise] [--target all|vscode|copilot,cursor,claude] [--experimental-hooks]
55
+ npx workspai workspace remediation-plan [--json] [--write] [--ci] [--include-paths]
56
+ npx workspai workspace snapshot [--json]
57
+ npx workspai workspace diff --from <snapshot-or-report|git[:ref]> [--json]
58
+ npx workspai workspace impact --from <snapshot-or-report> [--scope project:<name>] [--json]
59
+ npx workspai workspace verify [--from-impact <file>] [--scope project:<name>] [--strict] [--json]
60
+ npx workspai workspace export --output team-workspace.workspai-archive.zip
61
+ npx workspai workspace archive inspect team-workspace.workspai-archive.zip [--json]
62
+ npx workspai workspace archive verify team-workspace.workspai-archive.zip [--strict] [--json]
63
+ npx workspai workspace archive doctor team-workspace.workspai-archive.zip [--strict] [--json]
64
+ npx workspai workspace hydrate team-workspace.workspai-archive.zip --output ./team-workspace
65
+ npx workspai import <path|git-url> [--workspace <path>] [--name <project-name>] [--git] [--json]
66
+ npx workspai adopt [path] [--workspace <path>] [--name <project-name>] [--dry-run] [--json]
67
+ npx workspai snapshot create [name] [--include-projects] [--reason <text>] [--json]
68
+ npx workspai snapshot list [--json]
69
+ npx workspai snapshot inspect <name> [--json]
70
+ npx workspai snapshot restore <name> [--dry-run] [--force] [--json]
71
+ npx workspai project archive <name> [--reason <text>] [--dry-run] [--json]
72
+ npx workspai project archives [--json]
73
+ npx workspai project restore <archive> [--name <project-name>] [--force] [--dry-run] [--json]
74
+ npx workspai project delete <name> [--permanent --confirm <name>] [--dry-run] [--json]
75
+ npx workspai workspace init
76
+ npx workspai workspace run <init|test|build|start> [--affected] [--blast-radius] [--since <ref>] [--parallel] [--max-workers <n>] [--strict] [--json]
77
+ npx workspai infra plan [--workspace <path>] [--json] [--dry-run] [--verbose]
78
+ npx workspai infra up [--workspace <path>] [--no-plan] [--build]
79
+ npx workspai infra down [--workspace <path>] [--volumes]
80
+ npx workspai infra status [--workspace <path>] [--json] [--strict]
81
+ ```
82
+
83
+ See [workspace-run.md](./workspace-run.md) for fleet orchestration semantics.
84
+
85
+ Workspace profile compatibility is enforced consistently across `create project`,
86
+ `import`, `adopt`, and `bootstrap` compliance. In default `warn` policy mode,
87
+ cross-runtime additions are allowed with a recommendation such as
88
+ `npx workspai bootstrap --profile polyglot`; in `strict` mode, mismatches are
89
+ blocked before the project is registered. Observed runtimes such as Rust, C,
90
+ and C++ are counted in the workspace runtime mix even when Workspai does not own
91
+ a native scaffold for them.
92
+
93
+ Core module/template commands are intentionally narrower than runtime detection.
94
+ RapidKit Core modules are guaranteed only for RapidKit Core module-enabled kits:
95
+ `fastapi.standard`, `fastapi.ddd`, and `nestjs.standard`. They are not enabled
96
+ for every project that happens to use a first-class framework. For example, an
97
+ arbitrary existing FastAPI application can be adopted and modeled as a
98
+ Python/FastAPI project, but module mutation remains disabled unless its RapidKit
99
+ project metadata identifies one of those module-enabled kits.
100
+
101
+ ## Project lifecycle
102
+
103
+ ```bash
104
+ npx workspai create project <kit> <name> [--yes] [--skip-install] [--skip-git] [--output <dir>]
105
+ npx workspai project commands [--json]
106
+ npx workspai commands --scope project [--json]
107
+ npx workspai init
108
+ npx workspai dev
109
+ npx workspai test
110
+ npx workspai build
111
+ npx workspai start
112
+ ```
113
+
114
+ Examples:
115
+
116
+ ```bash
117
+ npx workspai create project fastapi.standard my-api --yes
118
+ npx workspai create project nextjs my-web --yes
119
+ ```
120
+
121
+ `create frontend <id> <name>` is still accepted and routes to the same generators.
122
+
123
+ `project commands` shows the effective command contract for the current project. Core-backed FastAPI/NestJS projects can use module commands such as `add` and `modules`. Frontend apps, Go, Spring Boot, .NET, and adopted/imported repositories use runtime lifecycle commands and workspace governance while Core module mutation remains disabled.
124
+
125
+ ## Operations
126
+
127
+ ```bash
128
+ npx workspai cache <status|clear|prune|repair>
129
+ npx workspai mirror <status|sync|verify|rotate>
130
+ npx workspai infra <plan|up|down|status>
131
+ ```
132
+
133
+ See [workspace-operations.md](./workspace-operations.md#workspace-infrastructure-sidecar) for infra discovery rules.
134
+
135
+ ## Profiles
136
+
137
+ - `minimal` โ€” baseline workspace scaffolding
138
+ - `java-only` โ€” Java-focused workspace
139
+ - `python-only` โ€” Python-focused workspace
140
+ - `node-only` โ€” Node.js-focused workspace
141
+ - `go-only` โ€” Go-focused workspace
142
+ - `polyglot` โ€” Python + Node.js + Go + Java
143
+ - `enterprise` โ€” polyglot + governance-oriented checks
144
+
145
+ ## Policy modes
146
+
147
+ `mode` in `.workspai/policies.yml`:
148
+
149
+ - `warn` (default): report violations, continue
150
+ - `strict`: block incompatible operations
151
+
152
+ ```bash
153
+ npx workspai workspace policy show
154
+ npx workspai workspace policy set mode strict
155
+ npx workspai workspace policy set dependency_sharing_mode shared-runtime-caches
156
+ npx workspai workspace policy set rules.enforce_toolchain_lock true
157
+ ```
158
+
159
+ Supported keys: `mode`, `dependency_sharing_mode`, `rules.enforce_workspace_marker`, `rules.enforce_toolchain_lock`, `rules.disallow_untrusted_tool_sources`, `rules.enforce_compatibility_matrix`, `rules.require_mirror_lock_for_offline`.
160
+
161
+ ## Setup and warm dependencies
162
+
163
+ `setup <runtime>` validates toolchain and updates `.workspai/toolchain.lock`.
164
+
165
+ `--warm-deps` adds optional dependency warm-up (Node lock/deps, Go modules). Warm-deps is non-fatal and reports `completed` / `failed` / `skipped`.
166
+
167
+ ## See also
168
+
169
+ - [Documentation index](./README.md)
170
+ - [workspace-operations.md](./workspace-operations.md)
171
+ - [workspace-run.md](./workspace-run.md)
172
+ - [contracts/COMMAND_OWNERSHIP_MATRIX.md](./contracts/COMMAND_OWNERSHIP_MATRIX.md)
@@ -0,0 +1,299 @@
1
+ # ๐Ÿ“– Workspai Config File Guide
2
+
3
+ ## ๐ŸŽฏ Purpose of `workspai.config.cjs`
4
+
5
+ The `workspai.config.cjs` file is an **optional configuration file** that allows you to define default settings for creating workspaces and projects.
6
+
7
+ ---
8
+
9
+ ## ๐Ÿ“ File Location
10
+
11
+ ```
12
+ ๐Ÿ“ Your Project Directory (where you run npx workspai)
13
+ โ”œโ”€โ”€ workspai.config.cjs โ† Config file (create manually)
14
+ โ”œโ”€โ”€ package.json
15
+ โ””โ”€โ”€ ...
16
+ ```
17
+
18
+ **Important Note**: This file is **not automatically created**. You must create it manually.
19
+
20
+ ---
21
+
22
+ ## ๐Ÿ” When to Use
23
+
24
+ ### 1๏ธโƒฃ **Team Development**
25
+
26
+ ```javascript
27
+ // workspai.config.cjs
28
+ module.exports = {
29
+ workspace: {
30
+ defaultAuthor: 'Your Team Name',
31
+ pythonVersion: '3.10',
32
+ installMethod: 'poetry'
33
+ }
34
+ }
35
+ ```
36
+
37
+ **Result**: All team members create workspaces with identical settings.
38
+
39
+ ---
40
+
41
+ ### 2๏ธโƒฃ **CI/CD Automation**
42
+
43
+ ```javascript
44
+ // workspai.config.cjs for CI/CD
45
+ module.exports = {
46
+ workspace: {
47
+ defaultAuthor: 'CI Bot',
48
+ pythonVersion: '3.11',
49
+ installMethod: 'venv'
50
+ },
51
+ projects: {
52
+ skipGit: true, // No git init needed in CI
53
+ skipInstall: false
54
+ }
55
+ }
56
+ ```
57
+
58
+ **Usage**:
59
+ ```bash
60
+ # In CI/CD pipeline
61
+ npx workspai my-workspace --yes
62
+ # Uses config without prompts
63
+ ```
64
+
65
+ ---
66
+
67
+ ### 3๏ธโƒฃ **Personal Projects**
68
+
69
+ ```javascript
70
+ // workspai.config.cjs
71
+ module.exports = {
72
+ workspace: {
73
+ defaultAuthor: 'John Doe',
74
+ pythonVersion: '3.12'
75
+ },
76
+ projects: {
77
+ defaultKit: 'fastapi.standard', // Always use FastAPI standard template
78
+ addDefaultModules: [
79
+ 'prisma',
80
+ 'redis',
81
+ 'auth-jwt',
82
+ 'monitoring'
83
+ ]
84
+ }
85
+ }
86
+ ```
87
+
88
+ **Result**: Every new project comes with these modules pre-configured.
89
+
90
+ ---
91
+
92
+ ## ๐Ÿ“ Supported File Formats
93
+
94
+ | File | Description |
95
+ |------|-------------|
96
+ | `workspai.config.cjs` | CommonJS explicit, safest across package types |
97
+ | `workspai.config.js` | CommonJS unless the project package uses `"type": "module"` |
98
+ | `workspai.config.mjs` | Explicit ES Module |
99
+ | `rapidkit.config.*` | Legacy fallback, still read during migration |
100
+
101
+ Use `workspai.config.mjs` when you prefer `export default`.
102
+
103
+ ---
104
+
105
+ ## โš™๏ธ Available Configuration Options
106
+
107
+ ### **workspace** (Workspace Settings)
108
+
109
+ ```typescript
110
+ workspace: {
111
+ defaultAuthor?: string; // Author/team name
112
+ pythonVersion?: '3.10' | '3.11' | '3.12'; // Python version
113
+ installMethod?: 'poetry' | 'venv' | 'pipx'; // Core installation method
114
+ }
115
+ ```
116
+
117
+ ### **projects** (Project Settings)
118
+
119
+ ```typescript
120
+ projects: {
121
+ defaultKit?: string; // Default template
122
+ addDefaultModules?: string[]; // Default modules to install
123
+ skipGit?: boolean; // Skip git initialization
124
+ skipInstall?: boolean; // Skip npm install
125
+ }
126
+ ```
127
+
128
+ ---
129
+
130
+ ## ๐Ÿ”„ Configuration Priority
131
+
132
+ ```
133
+ CLI Arguments > workspai.config.* > .workspairc.json > legacy rapidkit config > Defaults
134
+ ```
135
+
136
+ **Example**:
137
+ ```bash
138
+ # Config file: author='Team A'
139
+ npx workspai my-workspace --author "Team B"
140
+ # Result: author='Team B' (CLI overrides config)
141
+ ```
142
+
143
+ ---
144
+
145
+ ## ๐Ÿ“‹ Complete Example
146
+
147
+ ```javascript
148
+ /**
149
+ * Workspai Configuration
150
+ * Place in project root before running `npx workspai`
151
+ */
152
+ module.exports = {
153
+ // Workspace settings
154
+ workspace: {
155
+ defaultAuthor: 'Workspai Dev Team',
156
+ pythonVersion: '3.10',
157
+ installMethod: 'poetry',
158
+ },
159
+
160
+ // Project settings
161
+ projects: {
162
+ defaultKit: 'fastapi.standard',
163
+
164
+ // Auto-add these modules to new projects
165
+ addDefaultModules: [
166
+ 'prisma', // Database ORM
167
+ 'redis', // Caching
168
+ 'auth-jwt', // Authentication
169
+ 'monitoring', // Observability
170
+ ],
171
+
172
+ skipGit: false,
173
+ skipInstall: false,
174
+ },
175
+ };
176
+ ```
177
+
178
+ ---
179
+
180
+ ## ๐Ÿš€ Usage Examples
181
+
182
+ ### Without Config File (Interactive):
183
+ ```bash
184
+ npx workspai my-workspace
185
+ # โ“ Prompts:
186
+ # - Author name?
187
+ # - Python version?
188
+ # - Install method?
189
+ ```
190
+
191
+ ### With Config File (Automated):
192
+ ```bash
193
+ # 1. Create config
194
+ cat > workspai.config.cjs << 'EOF'
195
+ module.exports = {
196
+ workspace: {
197
+ defaultAuthor: 'My Team',
198
+ pythonVersion: '3.10',
199
+ installMethod: 'poetry'
200
+ }
201
+ }
202
+ EOF
203
+
204
+ # 2. Run Workspai
205
+ npx workspai my-workspace --yes
206
+ # โœ… No prompts, uses config defaults
207
+ ```
208
+
209
+ ---
210
+
211
+ ## ๐Ÿ” Debugging Configuration
212
+
213
+ ```bash
214
+ # Enable debug mode to see loaded config
215
+ npx workspai my-workspace --debug
216
+ ```
217
+
218
+ Output:
219
+ ```
220
+ [DEBUG] User config loaded {}
221
+ [DEBUG] Workspai config loaded { workspace: { defaultAuthor: 'Team' } }
222
+ [DEBUG] Merged config { author: 'Team', pythonVersion: '3.10' }
223
+ ```
224
+
225
+ ---
226
+
227
+ ## ๐ŸŽฏ Common Use Cases
228
+
229
+ ### โœ… Recommended Uses:
230
+
231
+ 1. **Large Teams**: Standardize settings across developers
232
+ 2. **CI/CD**: Automate workspace creation
233
+ 3. **Personal Templates**: Always start with specific modules
234
+ 4. **Training/Workshops**: Ensure all participants have identical settings
235
+
236
+ ### โŒ Not Recommended:
237
+
238
+ 1. **One-time Use**: If you're only creating one workspace
239
+ 2. **Variable Settings**: If you need different settings each time
240
+ 3. **Quick Development**: For rapid testing, interactive prompts are faster
241
+
242
+ ---
243
+
244
+ ## Additional resources
245
+
246
+ - [Example config](../workspai.config.example.cjs)
247
+ - [commands-reference.md](./commands-reference.md) โ€” CLI syntax
248
+ - [Documentation](https://workspai.dev/docs/config) (external)
249
+
250
+ ---
251
+
252
+ ## ๐Ÿ’ก Tips
253
+
254
+ 1. **Config is Optional**: You don't need to create this file
255
+ 2. **CLI Overrides**: You can always override config with command-line flags
256
+ 3. **Auto-detection**: CLI automatically discovers config files
257
+ 4. **Type Safety**: Use TypeScript types for IntelliSense support
258
+
259
+ ---
260
+
261
+ ## ๐Ÿ”— Related Commands
262
+
263
+ ```bash
264
+ # Create workspace with config
265
+ npx workspai my-workspace --yes
266
+
267
+ # Override config author
268
+ npx workspai my-workspace --author "Different Author"
269
+
270
+ # Check environment
271
+ npx workspai doctor
272
+
273
+ # Inspect/set workspace policy (recommended over manual YAML edits)
274
+ npx workspai workspace policy show
275
+ npx workspai workspace policy set mode strict
276
+ npx workspai workspace policy set dependency_sharing_mode shared-runtime-caches
277
+ npx workspai workspace policy set rules.enforce_toolchain_lock true
278
+
279
+ # List available kits
280
+ npx workspai list
281
+ ```
282
+
283
+ ---
284
+
285
+ ## ๐Ÿ›ก๏ธ Workspace Policy vs `workspai.config.*`
286
+
287
+ - `workspai.config.js|mjs|cjs` defines creation defaults and prompt behavior.
288
+ - `rapidkit.config.*` remains supported as a legacy fallback.
289
+ - `.workspai/policies.yml` defines runtime governance and enforcement behavior after workspace creation.
290
+ - Preferred policy management path:
291
+
292
+ ```bash
293
+ npx workspai workspace policy show
294
+ npx workspai workspace policy set <key> <value>
295
+ ```
296
+
297
+ ---
298
+
299
+ **Last updated:** June 2026 ยท **CLI version:** 0.35.x