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,60 @@
1
+ # Naming and coexistence (Phase 4.0)
2
+
3
+ Rules for **operational intelligence** artifacts so npm CLI, VS Code extension, and agent tools share one canonical layout without duplicate generators.
4
+
5
+ ## Canonical vs generated surfaces
6
+
7
+ | Layer | Canonical (workspace-native) | Generated (agent-sync) |
8
+ | ----- | ---------------------------- | ---------------------- |
9
+ | Operational playbooks | `.workspai/skills/{skillId}.md` | Legacy `.rapidkit/skills/{legacySkillId}.md` read fallback |
10
+ | Skills index | `.workspai/reports/workspace-skills-index.json` | — |
11
+ | Copilot skill umbrella | `.github/skills/workspai-workspace-intelligence/SKILL.md` | `.github/skills/rapidkit-workspace-intelligence/SKILL.md` legacy consumer surface |
12
+ | Explain report | `.workspai/reports/workspace-explain-last-run.json` | — |
13
+ | Action / repair feedback | `.workspai/reports/workspace-intelligence-history.json` (`kind: agent-action`, `doctor-fix`) | — |
14
+
15
+ **Rule:** Never add a standalone `workspace skills generate` command. Operational skills are produced only by `workspace agent-sync --write` (extend the Agent Customization Pack).
16
+
17
+ ## Skill identifiers
18
+
19
+ Built-in operational skill ids use the `workspai-*` prefix:
20
+
21
+ - `workspai-diagnose-api-failure`
22
+ - `workspai-release-readiness`
23
+ - `workspai-safe-schema-migration`
24
+ - `workspai-dependency-upgrade`
25
+ - `workspai-rename-contract`
26
+
27
+ Paths are derived from id via `operationalSkillPath()` in `src/contracts/workspace-artifact-paths.ts`.
28
+ Legacy `rapidkit-*` skill and prompt paths may remain for older consumers during the rebrand window; new consumers should read the `workspai-*` paths first.
29
+
30
+ ## Command coexistence
31
+
32
+ | User intent | Command | Notes |
33
+ | ----------- | ------- | ----- |
34
+ | Project / release / blocker narrative | `workspace explain …` | Primary explain surface |
35
+ | Shorthand alias | `workspace why …` | Same parser as `explain` |
36
+ | Diff → blast radius → gates | `workspace trace --from <diff>` | Slice of explain (`kind: trace`) |
37
+ | Graph node centrality | `workspace graph explain <project>` | Graph-topology slice; see **Graph explain coexistence** below |
38
+ | Record agent outcome | `workspace feedback record --json` | Appends `kind: agent-action` to history, no separate feedback file |
39
+ | Record Doctor repair outcome | `doctor workspace|project --fix --json` | Writes `doctor-fix-result-last-run.json` and appends `kind: doctor-fix` to history |
40
+ | MCP read bridge | `workspace mcp serve` | Read-mostly stdio JSON-RPC; maps Phase 4 explain + skills tools |
41
+
42
+ ## Graph explain coexistence (4.11)
43
+
44
+ `workspace graph explain <project>` remains the **graph-topology slice** — centrality, direct/transitive dependents via `explainGraphNode` in `workspace-graph.ts`.
45
+
46
+ `workspace explain project:<name>` is the **unified narrative** — consumers, contracts, verification plan, release risk from reports.
47
+
48
+ Do not duplicate BFS/traversal: graph explain stays single-sourced in `workspace-graph.ts`; unified explain composes it when building project sections.
49
+
50
+ ## Extension alignment
51
+
52
+ Schema versions advertised by `workspai --version --json` and `commands --json` must match files under `contracts/workspace-intelligence/`. Run `npm run sync:shared-contracts` after npm changes so `rapidkit-vscode/contracts` stays aligned.
53
+
54
+ ## Answer contract (shared)
55
+
56
+ All operational skills and the workspace-intelligence Copilot skill use the same answer shape:
57
+
58
+ **Scope → Evidence → Diagnosis → Fix Plan → Run → Verify → Assumptions**
59
+
60
+ Defined in `src/contracts/standard-answer-contract.ts` and referenced by the agent customization pack.
@@ -0,0 +1,86 @@
1
+ # Workspai CLI Contracts
2
+
3
+ Contract documentation for JSON payloads, support matrices, and cross-repo parity.
4
+
5
+ ## Monorepo workflow
6
+
7
+ Canonical JSON lives in **`../../contracts/`** (CLI package root, published in the tarball).
8
+
9
+ | Script | Purpose |
10
+ | ----------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
11
+ | `npm run generate:contracts` | Regenerate runtime surface, create planner, agent customization pack, import-stack parity, module-layout, infra-stack |
12
+ | `npm run check:generated-contracts` | Verify committed JSON matches generators |
13
+ | `npm run sync:parity-snapshot` | Copy canonical → vscode `contracts/` mirror |
14
+ | `npm run check:parity-snapshot` | Verify mirrors match canonical |
15
+ | `npm run validate:contracts` | Generate check + mirror check + contract tests |
16
+ | `npm run check:agent-customization-drift` | Verify generated agent customization files are committed in a consumer workspace |
17
+
18
+ Workflow: change code → `npm run generate:contracts` → `npm run sync:parity-snapshot` → commit npm + vscode `contracts/`.
19
+
20
+ ## Documents in this folder
21
+
22
+ | File | Purpose |
23
+ | -------------------------------------------------------------- | ----------------------------------------------------------- |
24
+ | [ARTIFACT_CATALOG.md](./ARTIFACT_CATALOG.md) | On-disk artifact paths, schema versions, and consumer rules |
25
+ | [COMMAND_OWNERSHIP_MATRIX.md](./COMMAND_OWNERSHIP_MATRIX.md) | Which commands the npm wrapper owns vs Python Core |
26
+ | [NAMING_AND_COEXISTENCE.md](./NAMING_AND_COEXISTENCE.md) | Workspace Intelligence command naming and generated surface rules |
27
+ | [RUNTIME_SUPPORT_MATRIX.md](./RUNTIME_SUPPORT_MATRIX.md) | Scaffold, import, lifecycle, and module support tiers |
28
+ | [RUNTIME_ACCEPTANCE_MATRIX.md](./RUNTIME_ACCEPTANCE_MATRIX.md) | Runtime acceptance matrix expectations |
29
+ | [rapidkit-cli-contracts.json](./rapidkit-cli-contracts.json) | Core CLI JSON schema fragments |
30
+
31
+ ## Workspace intelligence schemas
32
+
33
+ Published under `../../contracts/` (not duplicated in this folder):
34
+
35
+ - `workspace-registry.v1.json` — canonical project registry summary (see [ARTIFACT_CATALOG.md](./ARTIFACT_CATALOG.md))
36
+ - `release-readiness.v1.json` — release readiness gate evidence
37
+ - `workspace-run-last.v1.json` — multi-stage workspace run evidence
38
+ - `doctor-workspace-evidence.v1.json` / `doctor-project-evidence.v1.json` — doctor evidence
39
+ - `doctor-remediation-plan.v1.json` — persisted Doctor fix/plan Studio handoff contract
40
+ - `artifact-remediation-plan.v1.json` — cross-artifact Studio handoff for Bootstrap, Analyze, Readiness, Pipeline, Workspace Run, Workspace Verify, and Doctor plan bridging
41
+ - `analyze-last-run.v1.json` — analyze evidence
42
+ - `pipeline-last-run.v1.json` — governance pipeline orchestration
43
+ - `create-planner-capabilities.v1.json` — native-create, external-create-adopt, and adopt-only capability lanes
44
+ - `agent-customization-pack.v1.json` — generated instructions, prompts, skills, agents, optional hooks, MCP-ready design metadata, target matrix, and drift state for AI agent surfaces
45
+
46
+ Workspace intelligence (`../../contracts/workspace-intelligence/`):
47
+
48
+ - `workspace-model.v1.json`
49
+ - `workspace-context.v1.json`
50
+ - `workspace-dependency-graph.v1.json`
51
+ - `workspace-model-snapshot.v1.json`
52
+ - `workspace-model-diff.v1.json`
53
+ - `workspace-impact.v1.json`
54
+ - `workspace-verify.v1.json`
55
+ - `workspace-explain.v1.json`
56
+ - `workspace-intelligence-history.v1.json`
57
+ - `workspace-operational-skill.v1.json`
58
+ - `workspace-skills-index.v1.json`
59
+ - `workspace-contract-verify.v1.json`
60
+ - `agent-action-outcome.v1.json`
61
+ - `blocker-resolution.v1.json`
62
+ - `doctor-fix-result.v1.json`
63
+ - `studio-blocker-handoff.v1.json`
64
+
65
+ CLI commands: see [commands-reference.md](../commands-reference.md) and [../README.md](../README.md#workspace-intelligence).
66
+
67
+ ## Core CLI JSON payloads
68
+
69
+ `rapidkit-cli-contracts.json` describes:
70
+
71
+ - `VersionResponse` — `rapidkit version --json`
72
+ - `CommandsResponse` — `workspai commands --json`
73
+ - `ProjectDetectResponse` — `rapidkit project detect --json`
74
+ - `ModulesListResponseV1` — `rapidkit modules list --json-schema 1`
75
+
76
+ ## Versioning
77
+
78
+ - Payloads include `schema_version` where applicable.
79
+ - Backward-compatible changes keep the same schema version.
80
+ - Breaking changes require a schema bump and updated tests in `src/__tests__/contracts/`.
81
+
82
+ ## See also
83
+
84
+ - [Documentation index](../README.md)
85
+ - [commands-reference.md](../commands-reference.md)
86
+ - [workspace-operations.md](../workspace-operations.md)
@@ -0,0 +1,98 @@
1
+ # Workspai Runtime Acceptance Matrix
2
+
3
+ Last updated: 2026-06-05
4
+
5
+ This document defines the executable acceptance gate for Workspai workspace
6
+ and project orchestration. It complements
7
+ [RUNTIME_SUPPORT_MATRIX.md](RUNTIME_SUPPORT_MATRIX.md): the support matrix says
8
+ what Workspai promises; this acceptance matrix verifies the promise with a real
9
+ workspace.
10
+
11
+ ## Command
12
+
13
+ ```bash
14
+ npm run test:runtime-matrix
15
+ ```
16
+
17
+ For a stricter prepared-machine run where Go, Java, .NET, Python, and Node
18
+ toolchains are expected to be installed:
19
+
20
+ ```bash
21
+ npm run test:runtime-matrix:full
22
+ ```
23
+
24
+ The script can also be invoked directly:
25
+
26
+ ```bash
27
+ node scripts/runtime-acceptance-matrix.mjs --report ./runtime-acceptance-report.json
28
+ ```
29
+
30
+ ## Modes
31
+
32
+ | Mode | Purpose | External runtime requirement |
33
+ | -------- | ----------------------------------------------------------------------- | ---------------------------- |
34
+ | default | Scaffold, import, contract, doctor, archive, and actionable diagnostics | no |
35
+ | `--full` | Everything in default plus lifecycle commands must pass | yes |
36
+
37
+ Default mode is intentionally network-safe. It creates a minimal workspace,
38
+ uses `--skip-install` for scaffolded projects, and accepts missing-runtime
39
+ lifecycle failures only when the CLI prints actionable diagnostics such as
40
+ `Reason`, `Command`, and `Hint`.
41
+
42
+ ## Coverage
43
+
44
+ The matrix verifies:
45
+
46
+ - npm-owned global entrypoints: `--version` and `-v`.
47
+ - global command ownership contract via `commands --json`, plus core-owned
48
+ catalog commands in default/full modes: `version`, `commands`, `list`,
49
+ `info`, `frameworks`, `modules`, and `license`.
50
+ - `create workspace` with a Python-free minimal profile.
51
+ - `create project` for npm-backed Go Fiber, Go Gin, Spring Boot, and ASP.NET
52
+ Core Clean Web API kits.
53
+ - `create project` for core-backed FastAPI and NestJS kits through the current
54
+ bridge/fallback path.
55
+ - `import` for observed runtime projects without first-class kits, including
56
+ Laravel/PHP, Rails/Ruby, Axum/Rust, and generic unknown backends.
57
+ - `workspace sync`, `workspace policy show/set`.
58
+ - Snapshot safety flows: create/list/inspect/restore dry-run.
59
+ - Project safety flows: archive list, archive dry-run, and delete dry-run.
60
+ - `workspace contract init/inspect/verify/graph`.
61
+ - `doctor workspace` and `doctor project`.
62
+ - `project commands --json` capability reporting for every generated/imported
63
+ project.
64
+ - Project lifecycle `init`, `help`, `test`, `build`, `lint`, and `format` in
65
+ default and full modes, with missing runtime/tooling reported as actionable
66
+ setup diagnostics in default mode.
67
+ - `workspace run init/test/build`, including default-mode actionable setup
68
+ failures and full-mode hard pass requirements.
69
+ - Rejection of unsupported fleet stages such as `workspace run dev`.
70
+ - Portable archive export, inspect, strict verify, doctor, and hydrate preview.
71
+
72
+ ## Report Contract
73
+
74
+ Each run writes a JSON report with:
75
+
76
+ - `kind: rapidkit.runtime.acceptance.matrix`
77
+ - runtime preflight availability
78
+ - per-scenario command, cwd, exit code, duration, status, and output tails
79
+ - final summary and exit code
80
+
81
+ By default, reports are written under the system temp report directory and are
82
+ not deleted with the temporary workspace. Use `--report <file>` when you need a
83
+ stable release-evidence path inside the repository or an artifact directory.
84
+
85
+ ## Release Rule
86
+
87
+ This gate is intentionally **manual/local-only for now**. Do not add it to
88
+ regular GitHub Actions until it has a dedicated scheduled/manual workflow with
89
+ runtime caches and explicit cost controls.
90
+
91
+ For npm releases:
92
+
93
+ 1. Run `npm run test:runtime-matrix` locally before publishing a release
94
+ candidate.
95
+ 2. Run `npm run test:runtime-matrix:full` on at least one prepared release
96
+ machine with Go, Java, .NET, Python, and Node installed.
97
+ 3. Any newly added first-class or extended runtime must add at least one matrix
98
+ scenario before release.
@@ -0,0 +1,75 @@
1
+ # Workspai Runtime Support Matrix
2
+
3
+ Last updated: 2026-06-15
4
+
5
+ This document defines the public support contract for Workspai workspace projects.
6
+ It separates three concerns:
7
+
8
+ - **First-class**: curated RapidKit kit/framework with scaffold/import/govern/lifecycle support. Module mutation still follows the runtime row below.
9
+ - **Extended**: scaffold/import/govern/lifecycle or import/govern workflows are supported, but Core module mutation is disabled unless explicitly added later.
10
+ - **Observed**: import/govern/contract visibility is supported; lifecycle commands may require manual project scripts or future adapters.
11
+
12
+ ## Runtime Tiers
13
+
14
+ | Runtime | Tier | Scaffold | Import | Lifecycle Commands | Module Commands | Doctor |
15
+ | ------------------- | ----------- | -------: | -----: | ------------------------------------------------- | --------------: | --------- |
16
+ | Python | first-class | yes | yes | init, dev, start, build, test, lint, format, help | yes | full |
17
+ | Node.js | extended | yes | yes | init, dev, start, build, test, lint, format, help | yes | full |
18
+ | Go | extended | yes | yes | init, dev, start, build, test, lint, format, help | no | readiness |
19
+ | Java / Spring Boot | extended | yes | yes | init, dev, start, build, test, lint, format, help | no | readiness |
20
+ | .NET / ASP.NET Core | extended | yes | yes | init, dev, start, build, test, lint, format, help | no | readiness |
21
+ | PHP | observed | no | yes | help | no | observed |
22
+ | Ruby | observed | no | yes | help | no | observed |
23
+ | Rust | observed | no | yes | help | no | observed |
24
+ | Elixir | observed | no | yes | help | no | observed |
25
+ | Clojure | observed | no | yes | help | no | observed |
26
+ | Scala | observed | no | yes | help | no | observed |
27
+ | Kotlin | observed | no | yes | help | no | observed |
28
+ | Deno | observed | no | yes | help | no | observed |
29
+ | Bun | observed | no | yes | help | no | observed |
30
+ | Unknown | observed | no | yes | help | no | observed |
31
+
32
+ ## Framework Tiers
33
+
34
+ > **Runtime vs framework:** Python **runtime** stays first-class (Core-backed modules). Node.js **runtime** is extended; **NestJS** is the first-class Node framework. Frontend stacks (Next.js, Remix, Vite variants, Nuxt, Angular, Astro, SvelteKit) are extended frameworks on the Node runtime.
35
+
36
+ | Tier | Frameworks |
37
+ | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
38
+ | first-class | FastAPI, NestJS |
39
+ | extended | Go/Fiber, Go/Gin, Spring Boot, ASP.NET Core, Django, Flask, Express, Fastify, Koa, Echo, Laravel, Symfony, Rails, Sinatra, Actix, Axum, Rocket, Phoenix, Next.js, Remix, React, Vue, Svelte, Solid, Nuxt, Angular, Astro, SvelteKit |
40
+ | observed | Python, Node.js, Go, Java, PHP, Ruby, Rust, Elixir, Unknown/generic projects |
41
+
42
+ ## Import Policy
43
+
44
+ Imported projects are **observed and governed by default**:
45
+
46
+ - Workspai writes `.workspai/project.json` so workspace contract, graph, doctor, and sharing flows can discover the project.
47
+ - Workspai writes canonical project metadata to `.workspai/project.json` and reads legacy `.rapidkit/project.json` as fallback for older projects.
48
+ - Workspai writes `.workspai/import.json` and `.workspai/import-readiness.json` for auditability, with legacy mirrors when needed.
49
+ - Secrets and dependency/build caches are not copied during local-folder import.
50
+ - `module_support` defaults to `false` for imported projects unless existing RapidKit metadata explicitly opts in.
51
+
52
+ This keeps imports safe for arbitrary repositories while still enabling workspace-level visibility and lifecycle support where adapters exist.
53
+
54
+ ## Executable Acceptance Gate
55
+
56
+ The runtime support contract is validated by
57
+ [RUNTIME_ACCEPTANCE_MATRIX.md](RUNTIME_ACCEPTANCE_MATRIX.md).
58
+
59
+ Run the default, network-safe gate locally before release:
60
+
61
+ ```bash
62
+ npm run test:runtime-matrix
63
+ ```
64
+
65
+ Run the full lifecycle gate on a prepared machine with Go, Java, .NET, Python,
66
+ and Node installed:
67
+
68
+ ```bash
69
+ npm run test:runtime-matrix:full
70
+ ```
71
+
72
+ This gate is not wired into regular GitHub Actions yet because it creates real
73
+ workspaces and projects across multiple runtimes. Keep it manual/local until a
74
+ dedicated scheduled or manually dispatched workflow has runtime caches and cost
75
+ controls.
@@ -0,0 +1,239 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://getrapidkit.com/schemas/rapidkit-cli-contracts.json",
4
+ "title": "RapidKit Core CLI Contracts",
5
+ "type": "object",
6
+ "definitions": {
7
+ "VersionResponse": {
8
+ "type": "object",
9
+ "required": [
10
+ "schema_version",
11
+ "version"
12
+ ],
13
+ "properties": {
14
+ "schema_version": {
15
+ "const": 1
16
+ },
17
+ "version": {
18
+ "type": "string",
19
+ "minLength": 1
20
+ }
21
+ },
22
+ "additionalProperties": true
23
+ },
24
+ "CommandsResponse": {
25
+ "type": "object",
26
+ "required": [
27
+ "schema_version",
28
+ "commands"
29
+ ],
30
+ "properties": {
31
+ "schema_version": {
32
+ "const": 1
33
+ },
34
+ "commands": {
35
+ "type": "array",
36
+ "items": {
37
+ "type": "string",
38
+ "minLength": 1
39
+ },
40
+ "minItems": 1
41
+ },
42
+ "descriptions": {
43
+ "type": "object",
44
+ "additionalProperties": {
45
+ "type": "string"
46
+ }
47
+ }
48
+ },
49
+ "additionalProperties": true
50
+ },
51
+ "ProjectDetectResponse": {
52
+ "type": "object",
53
+ "required": [
54
+ "schema_version",
55
+ "input",
56
+ "confidence",
57
+ "isRapidkitProject",
58
+ "projectRoot",
59
+ "engine",
60
+ "markers"
61
+ ],
62
+ "properties": {
63
+ "schema_version": {
64
+ "const": 1
65
+ },
66
+ "input": {
67
+ "type": "string"
68
+ },
69
+ "confidence": {
70
+ "enum": [
71
+ "strong",
72
+ "weak",
73
+ "none"
74
+ ]
75
+ },
76
+ "isRapidkitProject": {
77
+ "type": "boolean"
78
+ },
79
+ "projectRoot": {
80
+ "type": [
81
+ "string",
82
+ "null"
83
+ ]
84
+ },
85
+ "engine": {
86
+ "type": "string"
87
+ },
88
+ "markers": {
89
+ "type": "object"
90
+ }
91
+ },
92
+ "additionalProperties": true
93
+ },
94
+ "ModulesListResponseV1": {
95
+ "type": "object",
96
+ "required": [
97
+ "schema_version",
98
+ "generated_at",
99
+ "filters",
100
+ "stats",
101
+ "modules"
102
+ ],
103
+ "properties": {
104
+ "schema_version": {
105
+ "const": 1
106
+ },
107
+ "generated_at": {
108
+ "type": "string",
109
+ "format": "date-time"
110
+ },
111
+ "etag": {
112
+ "type": "string",
113
+ "minLength": 1
114
+ },
115
+ "filters": {
116
+ "type": "object",
117
+ "properties": {
118
+ "category": {
119
+ "type": [
120
+ "string",
121
+ "null"
122
+ ]
123
+ },
124
+ "tag": {
125
+ "type": [
126
+ "string",
127
+ "null"
128
+ ]
129
+ },
130
+ "detailed": {
131
+ "type": "boolean"
132
+ }
133
+ },
134
+ "additionalProperties": true
135
+ },
136
+ "stats": {
137
+ "type": "object",
138
+ "required": [
139
+ "total",
140
+ "returned",
141
+ "invalid"
142
+ ],
143
+ "properties": {
144
+ "total": {
145
+ "type": "integer",
146
+ "minimum": 0
147
+ },
148
+ "returned": {
149
+ "type": "integer",
150
+ "minimum": 0
151
+ },
152
+ "invalid": {
153
+ "type": "integer",
154
+ "minimum": 0
155
+ }
156
+ },
157
+ "additionalProperties": true
158
+ },
159
+ "modules": {
160
+ "type": "array",
161
+ "items": {
162
+ "type": "object",
163
+ "required": [
164
+ "name",
165
+ "version",
166
+ "category",
167
+ "status",
168
+ "slug"
169
+ ],
170
+ "properties": {
171
+ "name": {
172
+ "type": "string"
173
+ },
174
+ "display_name": {
175
+ "type": "string"
176
+ },
177
+ "version": {
178
+ "type": "string"
179
+ },
180
+ "category": {
181
+ "type": "string"
182
+ },
183
+ "status": {
184
+ "type": "string"
185
+ },
186
+ "description": {
187
+ "type": "string"
188
+ },
189
+ "tags": {
190
+ "type": "array",
191
+ "items": {
192
+ "type": "string"
193
+ }
194
+ },
195
+ "slug": {
196
+ "type": "string"
197
+ }
198
+ },
199
+ "additionalProperties": true
200
+ }
201
+ },
202
+ "invalid_modules": {
203
+ "type": "array",
204
+ "items": {
205
+ "type": "object",
206
+ "required": [
207
+ "slug"
208
+ ],
209
+ "properties": {
210
+ "slug": {
211
+ "type": "string"
212
+ },
213
+ "messages": {
214
+ "type": "array",
215
+ "items": {
216
+ "type": "string"
217
+ }
218
+ }
219
+ },
220
+ "additionalProperties": true
221
+ }
222
+ },
223
+ "warnings": {
224
+ "type": "array",
225
+ "items": {
226
+ "type": "string"
227
+ }
228
+ },
229
+ "errors": {
230
+ "type": "array",
231
+ "items": {
232
+ "type": "string"
233
+ }
234
+ }
235
+ },
236
+ "additionalProperties": true
237
+ }
238
+ }
239
+ }
@@ -0,0 +1,81 @@
1
+ # Create Planner Capabilities
2
+
3
+ Workspai is a Workspace Intelligence platform, not a blind scaffold wrapper.
4
+ The create planner separates project creation into three lanes so developers,
5
+ CI, and AI agents share the same expectations.
6
+
7
+ ## Lanes
8
+
9
+ | Lane | Status | Meaning |
10
+ | ----------------------- | --------- | --------------------------------------------------------------------------------------------------- |
11
+ | `native-create` | Available | Workspai owns the scaffold contract, marker, registry, doctor, bootstrap, and workspace model path. |
12
+ | `external-create-adopt` | Planned | A stable ecosystem generator exists, but Workspai does not yet own the full post-create contract. |
13
+ | `adopt-only` | Available | The project enters Workspace Intelligence through import/adopt, not native create. |
14
+
15
+ ## Native create
16
+
17
+ Native create is reserved for kits with deterministic Workspai contracts:
18
+
19
+ - FastAPI
20
+ - NestJS
21
+ - Go Fiber and Go Gin
22
+ - Spring Boot
23
+ - ASP.NET Core Web API
24
+ - Frontend kits (`frontend.nextjs`, `frontend.vite-react`, `frontend.angular`, and related frontend generators)
25
+
26
+ These kits can be exposed through `workspai create project` because Workspai can
27
+ create the project and immediately produce the expected `.workspai` metadata,
28
+ workspace registry entries, doctor evidence, and workspace model data.
29
+
30
+ ## External create, then adopt
31
+
32
+ Some ecosystems have stable external commands but are not RapidKit-native create
33
+ targets yet:
34
+
35
+ - WordPress site: `wp core download`, `wp config create`, `wp db create`, `wp core install`
36
+ - WordPress block/plugin: `npx @wordpress/create-block@latest <slug>`
37
+ - Laravel: `composer create-project laravel/laravel <name>`
38
+ - Symfony: `composer create-project symfony/skeleton <name>`
39
+ - Rails: `rails new <name>`
40
+
41
+ These are `external-create-adopt` candidates, not active native kits. Until the
42
+ post-create contract is implemented end to end, Workspai should guide users to
43
+ create externally and then adopt/import the project.
44
+
45
+ ## Adopt only
46
+
47
+ If a project already exists, or if the requested runtime has no Workspai-owned
48
+ create contract, the correct lane is `adopt-only`.
49
+
50
+ Adoption still gives the project Workspace Intelligence:
51
+
52
+ - framework and runtime detection
53
+ - workspace registry membership
54
+ - doctor and analyze evidence
55
+ - workspace model and context generation
56
+ - governance, Advisor, Studio, and agent grounding
57
+
58
+ ## Product rule
59
+
60
+ Do not convert an unsupported or ambiguous stack request into a different native
61
+ kit. For example, a PHP, WordPress, Laravel, Symfony, or Rails request must not
62
+ be translated into FastAPI, NestJS, Go, Java, .NET, or a frontend kit.
63
+
64
+ If native create is unavailable, the planner should explain the supported lane
65
+ and guide the user to `adopt-only` or a future `external-create-adopt` flow.
66
+
67
+ ## CLI guard
68
+
69
+ `workspai create project <kit> <name>` must check the capability lane before
70
+ running any native generator or delegating to the Core engine.
71
+
72
+ If the request resolves to `external-create-adopt` or an explicit `adopt-only`
73
+ runtime, the CLI must stop early and explain:
74
+
75
+ - native create is not available yet for the requested stack
76
+ - whether the future lane is `external-create-adopt` or current `adopt-only`
77
+ - which external generator commands are relevant, when known
78
+ - how to run `npx workspai adopt <project-path>` after the project exists
79
+
80
+ This keeps AI surfaces, CI, and developer terminals aligned: unsupported stacks
81
+ are never silently rewritten into unrelated native kits.