workspai 0.44.0 → 0.46.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 (138) hide show
  1. package/README.md +243 -513
  2. package/contracts/cli-runtime-command-inventory.v1.snapshot.json +1372 -0
  3. package/contracts/command-capabilities.v1.json +166 -1
  4. package/contracts/extension-cli-compatibility.v1.json +4 -2
  5. package/contracts/published-contract-catalog.v1.json +12 -1
  6. package/contracts/runtime-command-surface.v1.json +1478 -3
  7. package/contracts/workspace-archive-capabilities.v1.json +17 -6
  8. package/contracts/workspace-intelligence/studio-blocker-handoff.v1.json +4 -0
  9. package/contracts/workspace-intelligence/workspace-intelligence-run.v1.json +207 -0
  10. package/contracts/workspace-intelligence-architecture.v1.json +1 -1
  11. package/contracts/workspace-intelligence-chain.v1.json +37 -1
  12. package/dist/analyze-BEBEZSZK.js +1 -0
  13. package/dist/{artifact-remediation-plan-Z7OCSME3.js → artifact-remediation-plan-FFQSESAM.js} +1 -1
  14. package/dist/autopilot-release-WUR4CQIT.js +1 -0
  15. package/dist/chunk-2G7FASAO.js +2 -0
  16. package/dist/{chunk-CL6TGI4Q.js → chunk-4EPHWD27.js} +1 -1
  17. package/dist/{chunk-J4AICQFB.js → chunk-4LGXSBCN.js} +1 -1
  18. package/dist/chunk-52PBRX7F.js +1 -0
  19. package/dist/{chunk-2QOWRBQD.js → chunk-6IIZJQLV.js} +1 -1
  20. package/dist/{chunk-JICOD2GI.js → chunk-CVHMUSRX.js} +1 -1
  21. package/dist/{chunk-7UZVOYF5.js → chunk-DIPD72H4.js} +1 -1
  22. package/dist/chunk-EFYHGCGX.js +2 -0
  23. package/dist/chunk-EYJ2CQSK.js +1 -0
  24. package/dist/chunk-FPJNWPKU.js +1 -0
  25. package/dist/{chunk-JP25YL3J.js → chunk-FTY7GGXJ.js} +2 -2
  26. package/dist/chunk-FWRXA435.js +2 -0
  27. package/dist/chunk-FXQJX34Z.js +1 -0
  28. package/dist/chunk-HDURFXW5.js +2 -0
  29. package/dist/chunk-HMUKBW2S.js +4 -0
  30. package/dist/{chunk-OW4UNG27.js → chunk-J5PIZCAU.js} +92 -78
  31. package/dist/{chunk-P4SWTY5X.js → chunk-K4WNYXKK.js} +7 -7
  32. package/dist/chunk-MER6ZBN2.js +13 -0
  33. package/dist/chunk-N7DV5L7C.js +1 -0
  34. package/dist/{chunk-JHC6SCJC.js → chunk-NHN4QXPP.js} +1 -1
  35. package/dist/{chunk-P424XYHP.js → chunk-PRBVYW3T.js} +1 -1
  36. package/dist/{chunk-NTXO7BMH.js → chunk-QA5BGEQW.js} +1 -1
  37. package/dist/chunk-QZLIURER.js +13 -0
  38. package/dist/{chunk-L3E6IRUQ.js → chunk-RIEF2DDX.js} +1 -1
  39. package/dist/{chunk-L2Q7B2OJ.js → chunk-SXMTSV5M.js} +1 -1
  40. package/dist/chunk-SXPY523X.js +1 -0
  41. package/dist/{chunk-XIVFLY6G.js → chunk-UQWOVV6V.js} +1 -1
  42. package/dist/chunk-V3LRQZ36.js +1 -0
  43. package/dist/chunk-VFDM65IE.js +80 -0
  44. package/dist/{chunk-B66A4TVP.js → chunk-WPEEC5BX.js} +1 -1
  45. package/dist/chunk-WYFPXTTS.js +2 -0
  46. package/dist/{chunk-M4VITK6X.js → chunk-YUATNVOT.js} +62 -51
  47. package/dist/{chunk-7IHLTPZ6.js → chunk-ZKAI3PJE.js} +1 -1
  48. package/dist/{create-DFAWAS5C.js → create-WCV3L6XH.js} +1 -1
  49. package/dist/doctor-5BWM2EMJ.js +1 -0
  50. package/dist/{dotnet-webapi-clean-BYUUHX5Y.js → dotnet-webapi-clean-6TVFBTVI.js} +20 -20
  51. package/dist/{gofiber-standard-B6UK5GR7.js → gofiber-standard-2BL7GWZB.js} +1 -1
  52. package/dist/{gogin-standard-BXU44VEM.js → gogin-standard-XGP3KBXA.js} +1 -1
  53. package/dist/index.d.ts +123 -15
  54. package/dist/index.js +337 -323
  55. package/dist/pipeline-ORIWVVYM.js +5 -0
  56. package/dist/{platform-capabilities-YICBF4FA.js → platform-capabilities-2B4QMZXE.js} +1 -1
  57. package/dist/{pythonRapidkitExec-UJYIB6FL.js → pythonRapidkitExec-CVCIK225.js} +1 -1
  58. package/dist/{springboot-standard-PEHDKH2L.js → springboot-standard-JJNUID6M.js} +6 -6
  59. package/dist/workspace-7OXW5YTJ.js +1 -0
  60. package/dist/{workspace-agent-sync-ZYCPXTU3.js → workspace-agent-sync-O4IA6VOA.js} +1 -1
  61. package/dist/workspace-archive-H74NBBNW.js +10 -0
  62. package/dist/{workspace-context-WAGGJCDL.js → workspace-context-R7IPUBPG.js} +1 -1
  63. package/dist/workspace-contract-HKCMOMFE.js +1 -0
  64. package/dist/workspace-explain-GOPQYTPQ.js +1 -0
  65. package/dist/workspace-explain-contract-SVFJAAEI.js +1 -0
  66. package/dist/{workspace-feedback-RCB25NFO.js → workspace-feedback-REOS36ZZ.js} +1 -1
  67. package/dist/{workspace-foundation-KXDL6P6X.js → workspace-foundation-KXT4QI5O.js} +1 -1
  68. package/dist/{workspace-history-M4QQBIPB.js → workspace-history-OGOVSKZG.js} +1 -1
  69. package/dist/{workspace-intelligence-QOGD2TZS.js → workspace-intelligence-7IESQSXY.js} +1 -1
  70. package/dist/workspace-intelligence-runner-6GJ5M4HB.js +1 -0
  71. package/dist/{workspace-mcp-serve-CEFKEMYG.js → workspace-mcp-serve-FRVWBO36.js} +1 -1
  72. package/dist/{workspace-model-GMSRBICO.js → workspace-model-PPYX7B4S.js} +1 -1
  73. package/dist/workspace-python-engine-state-2MLKJYQG.js +2 -0
  74. package/dist/workspace-registry-summary-SZ46R5PD.js +1 -0
  75. package/dist/workspace-run-V3KKHTVF.js +1 -0
  76. package/dist/{workspace-verify-NP4GMFSV.js → workspace-verify-MFQ7IXGD.js} +1 -1
  77. package/dist/{workspace-watch-IIBH3Y25.js → workspace-watch-SOPZHRWA.js} +1 -1
  78. package/docs/AI_DYNAMIC_INTEGRATION.md +29 -33
  79. package/docs/AI_FEATURES.md +18 -27
  80. package/docs/AI_QUICKSTART.md +7 -4
  81. package/docs/DEVELOPMENT.md +5 -5
  82. package/docs/From Code to Shared Understanding.png +0 -0
  83. package/docs/OPEN_SOURCE_USER_SCENARIOS.md +23 -2
  84. package/docs/OPTIMIZATION_GUIDE.md +19 -51
  85. package/docs/PACKAGE_MANAGER_POLICY.md +4 -1
  86. package/docs/README.md +30 -3
  87. package/docs/SECURITY.md +13 -6
  88. package/docs/SETUP.md +6 -3
  89. package/docs/UTILITIES.md +8 -20
  90. package/docs/WORKSPACE_MARKER_SPEC.md +27 -20
  91. package/docs/ci-workflows.md +19 -5
  92. package/docs/commands-reference.md +51 -10
  93. package/docs/config-file-guide.md +64 -247
  94. package/docs/contracts/ARTIFACT_CATALOG.md +14 -2
  95. package/docs/contracts/CLI_LOG_EVENT_STREAM.md +1 -1
  96. package/docs/contracts/COMMAND_OWNERSHIP_MATRIX.md +27 -6
  97. package/docs/contracts/README.md +5 -2
  98. package/docs/contracts/RUNTIME_ACCEPTANCE_MATRIX.md +4 -4
  99. package/docs/contracts/RUNTIME_SUPPORT_MATRIX.md +14 -10
  100. package/docs/creating-workspaces-and-projects.md +649 -0
  101. package/docs/doctor-command.md +5 -4
  102. package/docs/examples/ci-agent-grounding.yml +16 -10
  103. package/docs/from-code-to-shared-understanding.md +69 -38
  104. package/docs/workspace-intelligence-runner.md +186 -0
  105. package/docs/workspace-operations.md +29 -11
  106. package/docs/workspace-run.md +4 -1
  107. package/package.json +10 -8
  108. package/rapidkit.config.example.cjs +5 -5
  109. package/scripts/enforce-package-manager.cjs +1 -1
  110. package/scripts/prepack-enterprise.mjs +8 -0
  111. package/workspai.config.example.cjs +12 -47
  112. package/dist/analyze-6OCBM4ID.js +0 -1
  113. package/dist/autopilot-release-LI2WJCEW.js +0 -1
  114. package/dist/chunk-2K3GYCPS.js +0 -1
  115. package/dist/chunk-2QN6BMM7.js +0 -2
  116. package/dist/chunk-5AKYMAIL.js +0 -1
  117. package/dist/chunk-5PVEQ6CZ.js +0 -13
  118. package/dist/chunk-7EIMPQR3.js +0 -1
  119. package/dist/chunk-7RIWU5TZ.js +0 -1
  120. package/dist/chunk-FWJV7CCI.js +0 -2
  121. package/dist/chunk-LGP6WXS2.js +0 -4
  122. package/dist/chunk-TRMDODFM.js +0 -13
  123. package/dist/chunk-UNF72FTB.js +0 -1
  124. package/dist/chunk-V5JN4TDX.js +0 -2
  125. package/dist/chunk-VA5MRHKM.js +0 -2
  126. package/dist/chunk-XZGVNGRB.js +0 -1
  127. package/dist/chunk-YUX4YFGL.js +0 -78
  128. package/dist/doctor-PVSWDBJL.js +0 -1
  129. package/dist/imported-projects-registry-FOIE27WT.js +0 -1
  130. package/dist/pipeline-ND734AJM.js +0 -5
  131. package/dist/workspace-FQT3QIRS.js +0 -1
  132. package/dist/workspace-archive-EEGLHZDW.js +0 -10
  133. package/dist/workspace-contract-SEI4SNSG.js +0 -1
  134. package/dist/workspace-explain-MVGGRCDN.js +0 -1
  135. package/dist/workspace-explain-contract-KT757JGQ.js +0 -1
  136. package/dist/workspace-python-engine-state-MTWIIZPY.js +0 -2
  137. package/dist/workspace-registry-summary-S52SEJAG.js +0 -1
  138. package/dist/workspace-run-VC4OUPRF.js +0 -1
@@ -6,7 +6,7 @@ Complete CLI syntax for the Workspai CLI. For behavior and workflows, see [works
6
6
 
7
7
  ```bash
8
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]
9
+ npx workspai create workspace <name> [--profile <profile>] [--yes] [--here|--output <parent-dir>] [--skip-python-engine] [--skip-git] [--dry-run] [--install-method <poetry|venv|pipx>]
10
10
  npx workspai bootstrap [--profile <profile>] [--ci] [--json] [--compliance-only]
11
11
  npx workspai setup <python|node|go|java|dotnet> [--warm-deps]
12
12
  npx workspai pipeline [--json] [--strict] [--skip-verify] [--skip-analyze] [--skip-autopilot] [--autopilot-mode <audit|safe-fix|enforce>] [--agent-sync|--no-agent-sync]
@@ -17,6 +17,13 @@ npx workspai autopilot release [--mode <audit|safe-fix|enforce>] [--json] [--out
17
17
 
18
18
  Recommended CI:
19
19
 
20
+ ```bash
21
+ npx workspai workspace intelligence run --for-agent codex --strict --json
22
+ ```
23
+
24
+ Run the broader governance and release orchestrators as separate gates; they
25
+ do not extend or redefine the canonical Workspace Intelligence chain:
26
+
20
27
  ```bash
21
28
  npx workspai pipeline --json --strict
22
29
  npx workspai autopilot release --mode enforce --json --output .workspai/reports/autopilot-release.json
@@ -49,6 +56,7 @@ npx workspai workspace contract init [--force] [--json]
49
56
  npx workspai workspace contract inspect [--json]
50
57
  npx workspai workspace contract verify [--strict] [--json]
51
58
  npx workspai workspace contract graph [--json]
59
+ npx workspai workspace intelligence run [--workspace <path>] [--for-agent <agent>] [--strict] [--json]
52
60
  npx workspai workspace model [--workspace <path>] [--json] [--write] [--strict] [--cache] [--incremental] [--include-paths] [--include-evidence] [--scan-depth <count>]
53
61
  npx workspai workspace context --for-agent [codex|claude|cursor|orca] [--workspace <path>] [--json] [--write] [--agent-sync|--no-agent-sync] [--target <targets>] [--preset minimal|enterprise] [--include-evidence] [--scan-depth <count>]
54
62
  npx workspai workspace agent-sync [--workspace <path>] [--write] [--refresh-context] [--strict] [--json] [--preset minimal|enterprise] [--target all|vscode|agents,copilot,cursor,claude,codex,orca] [--experimental-hooks] [--hydrate-prompts]
@@ -61,15 +69,15 @@ npx workspai workspace graph [emit|explain|dot|mermaid] [key] [--workspace <path
61
69
  npx workspai workspace watch [--workspace <path>] [--json] [--once] [--scan-depth <count>]
62
70
  npx workspai workspace explain|why <target> [--workspace <path>] [--json] [--write]
63
71
  npx workspai workspace trace --from <workspace-diff-report> [--workspace <path>] [--json] [--write]
64
- npx workspai workspace feedback record [--workspace <path>] [--json]
72
+ printf '%s\n' '{"actionId":"fix-api","summary":"API tests passed","outcome":"ok"}' | npx workspai workspace feedback record [--workspace <path>] --json
65
73
  npx workspai workspace mcp serve [--workspace <path>] [--json]
66
74
  npx workspai workspace export --output team-workspace.workspai-archive.zip [--archive-compression store|deflate]
67
- npx workspai workspace archive inspect team-workspace.workspai-archive.zip [--max-download-size <size>] [--max-expanded-size <size>] [--download-timeout-ms <ms>] [--json]
68
- npx workspai workspace archive verify team-workspace.workspai-archive.zip [--max-download-size <size>] [--max-expanded-size <size>] [--download-timeout-ms <ms>] [--strict] [--json]
69
- npx workspai workspace archive doctor team-workspace.workspai-archive.zip [--max-download-size <size>] [--max-expanded-size <size>] [--download-timeout-ms <ms>] [--strict] [--json]
70
- npx workspai workspace hydrate team-workspace.workspai-archive.zip --output ./team-workspace [--max-download-size <size>] [--max-expanded-size <size>] [--download-timeout-ms <ms>]
71
- npx workspai import <path|git-url> [--workspace <path>] [--name <project-name>] [--git] [--json]
72
- npx workspai adopt [path] [--workspace <path>] [--name <project-name>] [--dry-run] [--json]
75
+ npx workspai workspace archive inspect team-workspace.workspai-archive.zip [--max-download-size <size>] [--max-expanded-size <size>] [--download-timeout-ms <ms>] [--allow-private-network] [--json]
76
+ npx workspai workspace archive verify team-workspace.workspai-archive.zip [--max-download-size <size>] [--max-expanded-size <size>] [--download-timeout-ms <ms>] [--allow-private-network] [--strict] [--json]
77
+ npx workspai workspace archive doctor team-workspace.workspai-archive.zip [--max-download-size <size>] [--max-expanded-size <size>] [--download-timeout-ms <ms>] [--allow-private-network] [--strict] [--json]
78
+ npx workspai workspace hydrate team-workspace.workspai-archive.zip --output ./team-workspace [--max-download-size <size>] [--max-expanded-size <size>] [--download-timeout-ms <ms>] [--allow-private-network]
79
+ npx workspai import <path|git-url> [--workspace <path>] [--name <project-name>] [--git] [--enable-modules] [--json]
80
+ npx workspai adopt [path] [--workspace <path>] [--name <project-name>] [--enable-modules] [--dry-run] [--json]
73
81
  npx workspai snapshot create [name] [--include-projects] [--reason <text>] [--json]
74
82
  npx workspai snapshot list [--json]
75
83
  npx workspai snapshot inspect <name> [--json]
@@ -86,6 +94,30 @@ npx workspai infra down [--workspace <path>] [--volumes]
86
94
  npx workspai infra status [--workspace <path>] [--json] [--strict]
87
95
  ```
88
96
 
97
+ `workspace intelligence run` writes
98
+ `.workspai/reports/workspace-intelligence-run-last-run.json`. Its `preflight`
99
+ contains exactly `sync` and `baseline`, while `stages` contains exactly the 11
100
+ ordered canonical chain steps. Exit `0` is passed, `1` is a hard execution
101
+ failure, and `2` is a completed but evidence-blocked run. With `--strict`,
102
+ warning-grade Analyze and Readiness verdicts can block the run without becoming
103
+ execution failures. See
104
+ [Unified Workspace Intelligence Runner](./workspace-intelligence-runner.md) for
105
+ baseline creation/reuse, JSON fields, artifact invariants, skip propagation, and
106
+ CI handling.
107
+
108
+ `workspace feedback record` is a non-interactive machine interface. It requires
109
+ exactly one JSON object on stdin and `--json`; an empty stdin or interactive TTY
110
+ is rejected. Required fields are `actionId`, `summary`, and `outcome`. The
111
+ accepted outcome values and optional scope/evidence fields are governed by
112
+ `contracts/workspace-intelligence/agent-action-outcome.v1.json`. Successful
113
+ records are appended to
114
+ `.workspai/reports/workspace-intelligence-history.json`; no separate feedback
115
+ artifact is created.
116
+
117
+ `workspace graph dot` and `workspace graph mermaid` intentionally emit raw DOT
118
+ and Mermaid text for direct piping to renderers. Use `workspace graph emit
119
+ --json` or `workspace graph explain <project> --json` for structured JSON.
120
+
89
121
  See [workspace-run.md](./workspace-run.md) for fleet orchestration semantics.
90
122
 
91
123
  After cloning or moving an existing workspace, `workspace sync` repairs its
@@ -109,11 +141,14 @@ for every project that happens to use a first-class framework. For example, an
109
141
  arbitrary existing FastAPI application can be adopted and modeled as a
110
142
  Python/FastAPI project, but module mutation remains disabled unless its RapidKit
111
143
  project metadata identifies one of those module-enabled kits.
144
+ `--enable-modules` preserves module commands only when existing RapidKit
145
+ metadata already identifies a module-enabled kit; it does not enable Core module
146
+ mutation for an arbitrary detected framework.
112
147
 
113
148
  ## Project lifecycle
114
149
 
115
150
  ```bash
116
- npx workspai create project <kit> <name> [--yes] [--skip-install] [--skip-git] [--output <dir>]
151
+ npx workspai create project <kit> <name> [--yes] [--skip-install] [--skip-git] [--dry-run] [--output <dir>] [--create-workspace|--no-workspace]
117
152
  npx workspai project commands [--json]
118
153
  npx workspai commands --scope project [--json]
119
154
  npx workspai init
@@ -130,6 +165,11 @@ npx workspai create project fastapi.standard my-api --yes
130
165
  npx workspai create project nextjs my-web --yes
131
166
  ```
132
167
 
168
+ Generator-specific options include `--port`, Spring Boot
169
+ `--java-version`/`--spring-version`/`--package-name`/`--group-id`/`--artifact-id`,
170
+ and .NET `--dotnet-version`/`--target-framework`/`--nullable`. Use
171
+ `npx workspai create project --help` for the live option inventory.
172
+
133
173
  `create frontend <id> <name>` is still accepted and routes to the same generators.
134
174
 
135
175
  `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.
@@ -151,7 +191,8 @@ See [workspace-operations.md](./workspace-operations.md#workspace-infrastructure
151
191
  - `python-only` — Python-focused workspace
152
192
  - `node-only` — Node.js-focused workspace
153
193
  - `go-only` — Go-focused workspace
154
- - `polyglot` — Python + Node.js + Go + Java
194
+ - `dotnet-only` — .NET-focused workspace
195
+ - `polyglot` — Python + Node.js + Go + Java + .NET
155
196
  - `enterprise` — polyglot + governance-oriented checks
156
197
 
157
198
  ## Policy modes
@@ -1,299 +1,116 @@
1
- # 📖 Workspai Config File Guide
1
+ # Workspai Configuration Guide
2
2
 
3
- ## 🎯 Purpose of `workspai.config.cjs`
3
+ Workspai has two configuration surfaces with different scopes. Command-line
4
+ flags remain authoritative when a command supports the corresponding option.
4
5
 
5
- The `workspai.config.cjs` file is an **optional configuration file** that allows you to define default settings for creating workspaces and projects.
6
+ ## User configuration
6
7
 
7
- ---
8
+ `~/.workspairc.json` stores user-level settings. The legacy
9
+ `~/.rapidkitrc.json` path is read only when the canonical file is absent.
8
10
 
9
- ## 📍 File Location
11
+ Supported fields include:
10
12
 
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
- }
13
+ ```json
14
+ {
15
+ "defaultKit": "fastapi.standard",
16
+ "defaultInstallMethod": "poetry",
17
+ "pythonVersion": "3.11",
18
+ "author": "Platform Team",
19
+ "license": "MIT",
20
+ "skipGit": false,
21
+ "aiEnabled": true,
22
+ "telemetry": false
85
23
  }
86
24
  ```
87
25
 
88
- **Result**: Every new project comes with these modules pre-configured.
89
-
90
- ---
91
-
92
- ## 📝 Supported File Formats
26
+ The `workspai config` command owns persisted AI settings such as the OpenAI API
27
+ key and `aiEnabled`. Do not commit user configuration or API keys.
93
28
 
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 |
29
+ ## Directory configuration
100
30
 
101
- Use `workspai.config.mjs` when you prefer `export default`.
31
+ The CLI can discover the nearest configuration file while walking from the
32
+ current directory toward the filesystem root:
102
33
 
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
- ```
34
+ - `workspai.config.json` (recommended; data-only and safe by default)
35
+ - `workspai.config.cjs`
36
+ - `workspai.config.mjs`
37
+ - `workspai.config.js`, when its syntax matches the containing package type
38
+ - `rapidkit.config.*`, as a legacy fallback
116
39
 
117
- ### **projects** (Project Settings)
40
+ JavaScript configuration is executable code. The CLI refuses to import it
41
+ unless trust is explicit:
118
42
 
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
43
  ```bash
138
- # Config file: author='Team A'
139
- npx workspai my-workspace --author "Team B"
140
- # Result: author='Team B' (CLI overrides config)
44
+ npx workspai my-workspace --trust-config
45
+ # Non-interactive equivalent for controlled CI:
46
+ WORKSPAI_TRUST_CONFIG=1 npx workspai my-workspace
141
47
  ```
142
48
 
143
- ---
49
+ Do not trust executable configuration from an unreviewed repository. Prefer
50
+ `workspai.config.json` whenever computed values are not required.
144
51
 
145
- ## 📋 Complete Example
52
+ Example:
146
53
 
147
54
  ```javascript
148
- /**
149
- * Workspai Configuration
150
- * Place in project root before running `npx workspai`
151
- */
55
+ // workspai.config.cjs
152
56
  module.exports = {
153
- // Workspace settings
154
57
  workspace: {
155
- defaultAuthor: 'Workspai Dev Team',
156
- pythonVersion: '3.10',
58
+ defaultAuthor: 'Platform Team',
59
+ pythonVersion: '3.11',
157
60
  installMethod: 'poetry',
158
61
  },
159
-
160
- // Project settings
161
62
  projects: {
162
63
  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
64
  skipGit: false,
173
- skipInstall: false,
174
65
  },
175
66
  };
176
67
  ```
177
68
 
178
- ---
69
+ ## Command coverage
179
70
 
180
- ## 🚀 Usage Examples
71
+ Directory configuration is currently consumed by the legacy top-level creation
72
+ shorthand, for example `npx workspai my-workspace`. Its effective precedence is:
181
73
 
182
- ### Without Config File (Interactive):
183
- ```bash
184
- npx workspai my-workspace
185
- # ❓ Prompts:
186
- # - Author name?
187
- # - Python version?
188
- # - Install method?
74
+ ```text
75
+ CLI flags > workspai.config.* > ~/.workspairc.json > legacy config > defaults
189
76
  ```
190
77
 
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
78
+ Canonical `create workspace` and `create project` flows do not currently apply
79
+ all directory-config project defaults. In particular, `addDefaultModules` and
80
+ `skipInstall` are reserved fields and are not automatically executed. Use
81
+ explicit canonical command flags instead:
203
82
 
204
- # 2. Run Workspai
205
- npx workspai my-workspace --yes
206
- # No prompts, uses config defaults
83
+ ```bash
84
+ npx workspai create workspace platform --profile polyglot --yes
85
+ npx workspai create project fastapi.standard api --skip-install --yes
207
86
  ```
208
87
 
209
- ---
88
+ Config discovery means a file can be loaded by a supported flow; it does not
89
+ mean every command consumes every field. The
90
+ [Command Reference](./commands-reference.md) is authoritative for command flags.
91
+
92
+ ## Debugging
210
93
 
211
- ## 🔍 Debugging Configuration
94
+ Use `--debug` on the legacy shorthand to inspect loaded and merged configuration:
212
95
 
213
96
  ```bash
214
- # Enable debug mode to see loaded config
215
97
  npx workspai my-workspace --debug
216
98
  ```
217
99
 
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:
100
+ A malformed or untrusted executable config fails closed with its path and an
101
+ actionable error.
230
102
 
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
103
+ ## Workspace policy is separate
235
104
 
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
105
+ Configuration files supply creation defaults. Runtime governance belongs to
106
+ `.workspai/policies.yml` and should normally be managed through:
262
107
 
263
108
  ```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
109
  npx workspai workspace policy show
275
110
  npx workspai workspace policy set mode strict
276
111
  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
112
  ```
296
113
 
297
- ---
298
-
299
- **Last updated:** June 2026 · **CLI version:** 0.35.x
114
+ See the [example config](../workspai.config.example.cjs),
115
+ [Creating Workspaces and Projects](./creating-workspaces-and-projects.md), and
116
+ [Command Reference](./commands-reference.md).
@@ -86,8 +86,19 @@ the same evidence without losing the workspace source of truth.
86
86
  | `workspace agent-sync --write` | `reports/workspace-skills-index.json` | `workspace-skills-index.v1` | `contracts/workspace-intelligence/workspace-skills-index.v1.json` |
87
87
  | `workspace agent-sync --write` | `reports/workspai-mcp-design.json`, `.workspai/skills/*.md`, `.workspai/AGENT-GROUNDING.md`, `AGENTS.md`, IDE agent surfaces | Mixed generated surfaces | See customization pack output inventory |
88
88
  | `workspace explain --write` | `workspace-explain-last-run.json` | `workspace-explain.v1` | `contracts/workspace-intelligence/workspace-explain.v1.json` |
89
+ | `workspace intelligence run` | `workspace-intelligence-run-last-run.json` | `workspace-intelligence-run.v1` | `contracts/workspace-intelligence/workspace-intelligence-run.v1.json` |
89
90
  | `workspace feedback record` / `doctor * --fix` | `workspace-intelligence-history.json` (`kind: agent-action`, `doctor-fix`) | `workspace-intelligence-history.v1` | `contracts/workspace-intelligence/workspace-intelligence-history.v1.json` |
90
91
 
92
+ The unified runner report separates its execution envelope from the canonical
93
+ intelligence chain. `preflight` always contains exactly `sync` and `baseline`;
94
+ baseline resolution runs after `model` and before `diff`, recording `created` or
95
+ `reused`. `stages` always contains exactly the 11 ordered steps declared by
96
+ `workspace-intelligence-chain.v1`. JSON Schema enforces the transport shape and
97
+ the runtime semantic validator additionally enforces artifact parity,
98
+ status/exit coherence, hard-failure skip propagation, and the aggregate verdict.
99
+ See [Unified Workspace Intelligence Runner](../workspace-intelligence-runner.md)
100
+ for the normative user and integration semantics.
101
+
91
102
  **CLI semantics:** `workspace diff --from` expects a **model or snapshot** baseline. `workspace impact --from` expects a **diff report**.
92
103
  Persisted artifacts retain their artifact schema. JSON command projections that add operation metadata
93
104
  such as `outputPath`, `status`, or structured errors use
@@ -261,7 +272,8 @@ Canonical source: `src/observability/run-correlation.ts` (`attachRunCorrelation`
261
272
  | `infra plan` | `infra-plan.json` | `rapidkit.infra-plan.v1` | — |
262
273
  | `workspace archive` | `.workspai/archive-manifest.json` inside ZIP/ZIP64 | Streaming handoff; workspace payload is unlimited by default and safety budgets are opt-in | `contracts/workspace-archive-manifest.v1.json` |
263
274
  | `workspace share` | `reports/share-bundle.json` (default) | Aggregation bundle | — |
264
- | `import` / `adopt` | `{project}/.workspai/import-readiness.json` | Per project | — |
275
+ | `import` | `{project}/.workspai/import.json`, `{project}/.workspai/import-readiness.json` | Copied/cloned project metadata and readiness | — |
276
+ | `adopt` | `{project}/.workspai/adopt.json`, `{project}/.workspai/adopt-readiness.json` | In-place project metadata and readiness | — |
265
277
  | `workspace contract verify` | `workspace-contract-verify-last-run.json` | CLI verify cache | `contracts/workspace-intelligence/workspace-contract-verify.v1.json` |
266
278
 
267
279
  ## Static capability contracts
@@ -311,7 +323,7 @@ Under `{project}/.workspai/reports/` when commands run at project scope (e.g. pr
311
323
  ## Consumer rules
312
324
 
313
325
  1. **Project count:** read `workspace-registry.v1.json` (or run `workspace registry status --json`).
314
- 2. **Release gates:** follow chain doctoranalyzereadinessverify → autopilot; use `pipeline-last-run.json` for orchestration summary.
326
+ 2. **Workspace Intelligence chain:** run `workspace intelligence run --for-agent codex --strict --json` to preserve Model DiffImpactDoctor + Contract Verify + Analyze Readiness → Verify → Context → Agent Sync → Explain. `pipeline` is the broader governance/release orchestrator and `autopilot` is a separate release surface; neither redefines the canonical chain. Use `pipeline-last-run.json` only for the pipeline orchestration summary.
315
327
  3. **Do not** use `workspace.json.projects` (removed in schema 1.0).
316
328
  4. Prefer `schemaVersion` constants in each artifact; legacy `v1` on readiness is accepted when reading old reports.
317
329
  5. **Agent customization:** read `.workspai/reports/agent-customization-pack.json` first for generated surfaces, then `.workspai/reports/INDEX.json` and `workspace-context-agent.json`; regenerate with `workspace agent-sync --write --refresh-context --preset enterprise`.
@@ -75,7 +75,7 @@ Each stderr line is a single JSON object:
75
75
  "component": "cli",
76
76
  "message": "CLI run started",
77
77
  "command": ["workspace", "model"],
78
- "metadata": { "cwd": "/path/to/workspace", "rapidkitVersion": "0.38.0" }
78
+ "metadata": { "cwd": "/path/to/workspace", "rapidkitVersion": "<workspai-version>" }
79
79
  }
80
80
  ```
81
81
 
@@ -32,23 +32,44 @@ These commands are implemented and orchestrated by Workspai CLI:
32
32
  - `product`
33
33
  - `infra`
34
34
  - `commands`
35
+ - `create`
36
+ - `project`
35
37
  - `shell activate`
36
38
 
37
39
  Reason: workspace-level policy, registry, and platform orchestration live in npm wrapper.
38
40
 
39
41
  ### 1.1) Wrapper-owned scoped commands
40
42
 
41
- These scoped commands are implemented and orchestrated by Workspai CLI:
42
-
43
+ These nested Commander commands are implemented and orchestrated by Workspai CLI:
44
+
45
+ - `ai generate-embeddings`
46
+ - `ai info`
47
+ - `ai recommend`
48
+ - `ai update-embeddings`
49
+ - `config ai`
50
+ - `config remove-api-key`
51
+ - `config set-api-key`
52
+ - `config show`
53
+ - `infra down`
54
+ - `infra plan`
55
+ - `infra status`
56
+ - `infra up`
57
+ - `product manifest`
58
+ - `product manifest create`
59
+ - `product plan`
43
60
  - `project commands`
44
61
  - `project archives`
45
62
  - `project archive`
46
63
  - `project restore`
47
64
  - `project delete`
48
-
49
- Reason: these are workspace project lifecycle and capability operations with
50
- archive manifests, safety snapshots, workspace registry side effects, and
51
- runtime-aware command discovery.
65
+ - `snapshot create`
66
+ - `snapshot inspect`
67
+ - `snapshot list`
68
+ - `snapshot restore`
69
+
70
+ Reason: these routes are registered directly in the npm wrapper's live
71
+ Commander tree. Their completeness is verified against `commands --json` and
72
+ the generated runtime command surface during tests and prepack.
52
73
 
53
74
  `project detect` remains Core-owned because it is the stable machine-readable
54
75
  contract used by wrappers to detect Python RapidKit projects.
@@ -12,7 +12,8 @@ Canonical JSON lives in **`../../contracts/`** (CLI package root, published in t
12
12
  | `npm run check:generated-contracts` | Verify committed JSON matches generators |
13
13
  | `npm run sync:parity-snapshot` | Copy canonical → vscode `contracts/` mirror |
14
14
  | `npm run check:parity-snapshot` | Verify mirrors match canonical |
15
- | `npm run validate:contracts` | Generate check + mirror check + contract tests |
15
+ | `npm run validate:contracts` | Shared-contract checks and focused contract tests |
16
+ | `npm run contracts:validate` | Comprehensive generated/shared contract, parity, runtime-conformance, and adversarial gate |
16
17
  | `npm run check:agent-customization-drift` | Verify generated agent customization files are committed in a consumer workspace |
17
18
 
18
19
  Workflow: change code → `npm run generate:contracts` → `npm run sync:parity-snapshot` → commit npm + vscode `contracts/`.
@@ -46,6 +47,7 @@ Published under `../../contracts/` (not duplicated in this folder):
46
47
 
47
48
  Workspace intelligence (`../../contracts/workspace-intelligence/`):
48
49
 
50
+ - `workspace-intelligence-run.v1.json` — authoritative full-chain result, stage outcomes, verdict, exit code, and durable artifact path
49
51
  - `workspace-model.v1.json`
50
52
  - `workspace-context.v1.json`
51
53
  - `workspace-dependency-graph.v1.json`
@@ -63,7 +65,8 @@ Workspace intelligence (`../../contracts/workspace-intelligence/`):
63
65
  - `doctor-fix-result.v1.json`
64
66
  - `studio-blocker-handoff.v1.json`
65
67
 
66
- CLI commands: see [commands-reference.md](../commands-reference.md) and [../README.md](../README.md#workspace-intelligence).
68
+ CLI commands: see [commands-reference.md](../commands-reference.md) and the
69
+ [CLI README](../../README.md#one-intelligence-chain).
67
70
 
68
71
  ## Core CLI JSON payloads
69
72
 
@@ -43,10 +43,10 @@ lifecycle failures only when the CLI prints actionable diagnostics such as
43
43
 
44
44
  The matrix verifies:
45
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`.
46
+ - npm-owned global entrypoints: `--version`, `-v`, and `commands --json`.
47
+ - delegated Core catalog surfaces in default/full modes: `version`, `list`,
48
+ `info`, `frameworks`, `modules`, and `license`. The normal
49
+ `workspai --version` path remains wrapper-owned.
50
50
  - `create workspace` with a Python-free minimal profile.
51
51
  - `create project` for npm-backed Go Fiber, Go Gin, Spring Boot, and ASP.NET
52
52
  Core Clean Web API kits.