workspai 0.45.0 → 0.47.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +307 -532
- package/contracts/agent-customization-pack.v1.json +6 -1
- package/contracts/bootstrap-compliance.v1.json +14 -0
- package/contracts/cli-runtime-command-inventory.v1.snapshot.json +8 -0
- package/contracts/extension-cli-compatibility.v1.json +9 -2
- package/contracts/mirror-ops.v1.json +16 -0
- package/contracts/published-contract-catalog.v1.json +38 -1
- package/contracts/runtime-command-surface.v1.json +190 -7
- package/contracts/transparency-evidence.v1.json +13 -0
- package/contracts/workspace-archive-capabilities.v1.json +17 -6
- package/contracts/workspace-contract.v1.json +78 -0
- package/contracts/workspace-intelligence/studio-blocker-handoff.v1.json +4 -0
- package/contracts/workspace-intelligence/workspace-context.v1.json +20 -0
- package/contracts/workspace-intelligence/workspace-graph-token-efficiency.v1.json +72 -0
- package/contracts/workspace-intelligence/workspace-intelligence-run.v1.json +212 -0
- package/contracts/workspace-intelligence/workspace-knowledge-graph-change-overlay.v1.json +200 -0
- package/contracts/workspace-intelligence/workspace-knowledge-graph.v1.json +260 -0
- package/contracts/workspace-intelligence/workspace-knowledge-search.v1.json +60 -0
- package/contracts/workspace-intelligence-architecture.v1.json +7 -4
- package/contracts/workspace-intelligence-chain.v1.json +51 -4
- package/contracts/workspace-share-bundle.v1.json +16 -0
- package/dist/analyze-UVXPRGYZ.js +1 -0
- package/dist/artifact-remediation-plan-EPALZ2LC.js +3 -0
- package/dist/autopilot-release-5BQ6F5L2.js +1 -0
- package/dist/chunk-22NJ2ZMG.js +2 -0
- package/dist/{chunk-XIVFLY6G.js → chunk-2GHUZDYA.js} +1 -1
- package/dist/chunk-2TEDAKP6.js +2 -0
- package/dist/chunk-52PBRX7F.js +1 -0
- package/dist/chunk-6SWRNA47.js +4 -0
- package/dist/chunk-76YOPAOT.js +1 -0
- package/dist/chunk-7VLCK5JW.js +1 -0
- package/dist/{chunk-DXPU4DDV.js → chunk-BSRVO52Y.js} +92 -78
- package/dist/chunk-COARSXRC.js +1 -0
- package/dist/chunk-CV5HKU4P.js +1 -0
- package/dist/chunk-CW7PGBIQ.js +13 -0
- package/dist/{chunk-KU4S7RCM.js → chunk-DV6GJD4K.js} +1 -1
- package/dist/chunk-EYJ2CQSK.js +1 -0
- package/dist/chunk-FB7SCXAZ.js +1 -0
- package/dist/chunk-FPJNWPKU.js +1 -0
- package/dist/{chunk-JP25YL3J.js → chunk-FTY7GGXJ.js} +2 -2
- package/dist/chunk-FXQJX34Z.js +1 -0
- package/dist/{chunk-J4AICQFB.js → chunk-HSGFUKCN.js} +1 -1
- package/dist/{chunk-OOOPYUL2.js → chunk-ITCAMC2E.js} +1 -1
- package/dist/chunk-KB44JP4M.js +2 -0
- package/dist/{chunk-WANW4QA4.js → chunk-KZZ36CK5.js} +1 -1
- package/dist/chunk-LNRAB7UY.js +1 -0
- package/dist/chunk-MEMHNE7Y.js +80 -0
- package/dist/chunk-MER6ZBN2.js +13 -0
- package/dist/chunk-NOFM7MNA.js +2 -0
- package/dist/chunk-NRYS4CLR.js +2 -0
- package/dist/chunk-OA537ZQ5.js +1 -0
- package/dist/chunk-PBHP6JNY.js +8 -0
- package/dist/chunk-QDWYIRHR.js +8 -0
- package/dist/chunk-RWRLFSKW.js +2 -0
- package/dist/chunk-SK6XRKGG.js +1 -0
- package/dist/chunk-THIOE2PB.js +2 -0
- package/dist/chunk-TNQI5VCW.js +36 -0
- package/dist/chunk-TWNFECMN.js +2 -0
- package/dist/{chunk-2QOWRBQD.js → chunk-U5EZHZBX.js} +1 -1
- package/dist/{chunk-K63BSU56.js → chunk-VBSQ7MF6.js} +62 -51
- package/dist/chunk-WDKNMTJQ.js +1 -0
- package/dist/chunk-YCL3I2JO.js +2 -0
- package/dist/chunk-ZDN7RHXJ.js +1 -0
- package/dist/chunk-ZM5NQ5Z2.js +1 -0
- package/dist/{create-KFR6FLRT.js → create-7JKJDAQV.js} +1 -1
- package/dist/doctor-PGPNIS76.js +1 -0
- package/dist/{dotnet-webapi-clean-BYUUHX5Y.js → dotnet-webapi-clean-6TVFBTVI.js} +20 -20
- package/dist/{gofiber-standard-B6UK5GR7.js → gofiber-standard-2BL7GWZB.js} +1 -1
- package/dist/{gogin-standard-BXU44VEM.js → gogin-standard-XGP3KBXA.js} +1 -1
- package/dist/index.d.ts +112 -16
- package/dist/index.js +198 -195
- package/dist/pipeline-IB6ILJSV.js +5 -0
- package/dist/{platform-capabilities-YICBF4FA.js → platform-capabilities-2B4QMZXE.js} +1 -1
- package/dist/{pythonRapidkitExec-UJYIB6FL.js → pythonRapidkitExec-CVCIK225.js} +1 -1
- package/dist/{springboot-standard-PEHDKH2L.js → springboot-standard-JJNUID6M.js} +6 -6
- package/dist/workspace-H3QXBFGB.js +1 -0
- package/dist/{workspace-agent-sync-G5YVI3BJ.js → workspace-agent-sync-C7SG2Z5W.js} +1 -1
- package/dist/workspace-archive-P76EDIUG.js +10 -0
- package/dist/{workspace-context-E3UFWL5X.js → workspace-context-BKQBKA4C.js} +1 -1
- package/dist/workspace-contract-RPQQBQXR.js +1 -0
- package/dist/workspace-dependency-graph-23BI2HG7.js +1 -0
- package/dist/workspace-explain-WVN7JH3U.js +1 -0
- package/dist/workspace-explain-contract-SEFTVF6J.js +1 -0
- package/dist/{workspace-feedback-YY6WQPWQ.js → workspace-feedback-WAID3IOE.js} +1 -1
- package/dist/{workspace-foundation-3C2DLCVI.js → workspace-foundation-5OOJEO2D.js} +1 -1
- package/dist/workspace-graph-token-efficiency-CFGFCJ5V.js +1 -0
- package/dist/{workspace-history-VF3CHDYQ.js → workspace-history-C6OP3IAQ.js} +1 -1
- package/dist/workspace-intelligence-VKDL3H2J.js +1 -0
- package/dist/workspace-intelligence-runner-LVALAZY7.js +1 -0
- package/dist/workspace-knowledge-graph-FE2NTZKV.js +1 -0
- package/dist/workspace-knowledge-graph-change-overlay-XG6FC4IX.js +1 -0
- package/dist/workspace-knowledge-graph-query-VOSPPH4W.js +1 -0
- package/dist/workspace-mcp-serve-KT2I676Z.js +3 -0
- package/dist/workspace-model-S33CIB2R.js +1 -0
- package/dist/workspace-model-hash-MHXK5MEI.js +1 -0
- package/dist/workspace-python-engine-state-2MLKJYQG.js +2 -0
- package/dist/workspace-registry-summary-A3YDL63D.js +1 -0
- package/dist/workspace-run-M4LNJILC.js +1 -0
- package/dist/{workspace-verify-ZNT6JX7D.js → workspace-verify-ZGH3NXAH.js} +1 -1
- package/dist/workspace-watch-EVBJTMV7.js +1 -0
- package/docs/AI_DYNAMIC_INTEGRATION.md +73 -432
- package/docs/AI_EXAMPLES.md +37 -395
- package/docs/AI_FEATURES.md +76 -465
- package/docs/AI_QUICKSTART.md +49 -209
- package/docs/DEVELOPMENT.md +5 -5
- package/docs/From Code to Shared Understanding.png +0 -0
- package/docs/GLOSSARY.md +60 -0
- package/docs/OPEN_SOURCE_USER_SCENARIOS.md +91 -9
- package/docs/OPTIMIZATION_GUIDE.md +19 -51
- package/docs/PACKAGE_MANAGER_POLICY.md +4 -1
- package/docs/README.md +91 -42
- package/docs/SECURITY.md +13 -6
- package/docs/SETUP.md +6 -3
- package/docs/UTILITIES.md +8 -20
- package/docs/WORKSPACE_MARKER_SPEC.md +27 -20
- package/docs/ci-workflows.md +19 -5
- package/docs/commands-reference.md +88 -13
- package/docs/config-file-guide.md +67 -246
- package/docs/contracts/ARTIFACT_CATALOG.md +78 -36
- package/docs/contracts/CLI_LOG_EVENT_STREAM.md +1 -1
- package/docs/contracts/README.md +48 -9
- package/docs/contracts/RUNTIME_ACCEPTANCE_MATRIX.md +4 -4
- package/docs/contracts/RUNTIME_SUPPORT_MATRIX.md +14 -10
- package/docs/creating-workspaces-and-projects.md +649 -0
- package/docs/doctor-command.md +5 -4
- package/docs/examples/ci-agent-grounding.yml +16 -10
- package/docs/from-code-to-shared-understanding.md +69 -38
- package/docs/graph-benchmark-methodology.md +121 -0
- package/docs/workspace-intelligence-runner.md +186 -0
- package/docs/workspace-knowledge-graph.md +295 -0
- package/docs/workspace-operations.md +78 -11
- package/docs/workspace-run.md +4 -1
- package/package.json +10 -8
- package/rapidkit.config.example.cjs +5 -5
- package/scripts/enforce-package-manager.cjs +1 -1
- package/scripts/prepack-enterprise.mjs +4 -0
- package/workspai.config.example.cjs +12 -47
- package/dist/analyze-YLV7NVLF.js +0 -1
- package/dist/artifact-remediation-plan-WLZGROUU.js +0 -3
- package/dist/autopilot-release-YBN3SWAA.js +0 -1
- package/dist/chunk-2K3GYCPS.js +0 -1
- package/dist/chunk-42G2OK64.js +0 -1
- package/dist/chunk-5AKYMAIL.js +0 -1
- package/dist/chunk-5GNT4RJI.js +0 -8
- package/dist/chunk-5PVEQ6CZ.js +0 -13
- package/dist/chunk-6AA3WWQZ.js +0 -2
- package/dist/chunk-6ZENXBMG.js +0 -33
- package/dist/chunk-7RIWU5TZ.js +0 -1
- package/dist/chunk-7UZVOYF5.js +0 -2
- package/dist/chunk-BJLE5CH7.js +0 -4
- package/dist/chunk-G3H5R3RR.js +0 -1
- package/dist/chunk-HYJK7W3B.js +0 -1
- package/dist/chunk-IMUU5Q2V.js +0 -13
- package/dist/chunk-KPPGZCUW.js +0 -78
- package/dist/chunk-LCRROMRR.js +0 -2
- package/dist/chunk-LG6RFLPZ.js +0 -1
- package/dist/chunk-P424XYHP.js +0 -1
- package/dist/chunk-P7SCWJFG.js +0 -8
- package/dist/chunk-QWU2CZBG.js +0 -2
- package/dist/chunk-V2H2KRMZ.js +0 -1
- package/dist/chunk-XZGVNGRB.js +0 -1
- package/dist/chunk-ZWO6K24C.js +0 -2
- package/dist/doctor-YJDM5XBH.js +0 -1
- package/dist/imported-projects-registry-FOIE27WT.js +0 -1
- package/dist/pipeline-FEDYO3IA.js +0 -5
- package/dist/workspace-PLXOO6ST.js +0 -1
- package/dist/workspace-archive-EEGLHZDW.js +0 -10
- package/dist/workspace-contract-LQJDZV36.js +0 -1
- package/dist/workspace-explain-G74ZIF23.js +0 -1
- package/dist/workspace-explain-contract-KT757JGQ.js +0 -1
- package/dist/workspace-intelligence-3GG7GEDQ.js +0 -1
- package/dist/workspace-mcp-serve-MJMUV4RY.js +0 -3
- package/dist/workspace-model-NG45SRM5.js +0 -1
- package/dist/workspace-python-engine-state-MTWIIZPY.js +0 -2
- package/dist/workspace-registry-summary-JM2XY52C.js +0 -1
- package/dist/workspace-run-WEQYIERE.js +0 -1
- package/dist/workspace-watch-W47T4RX2.js +0 -1
package/docs/AI_QUICKSTART.md
CHANGED
|
@@ -1,245 +1,85 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Optional AI Module Recommendations
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Workspai has two different AI-facing capabilities:
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
1. **Workspace Intelligence** builds deterministic model, graph, impact,
|
|
6
|
+
verification, context, and agent artifacts. It does not require an API key.
|
|
7
|
+
2. **AI module recommendations** use embeddings to suggest optional RapidKit
|
|
8
|
+
modules from a natural-language description. This page covers only that
|
|
9
|
+
optional recommender.
|
|
6
10
|
|
|
7
|
-
|
|
11
|
+
## Try it without an API key
|
|
8
12
|
|
|
9
13
|
```bash
|
|
10
|
-
npx workspai ai recommend "
|
|
14
|
+
npx workspai ai recommend "authentication with email"
|
|
11
15
|
```
|
|
12
16
|
|
|
13
|
-
|
|
17
|
+
When no OpenAI key is configured, the command uses deterministic mock mode. Mock
|
|
18
|
+
mode is useful for testing the command flow; its ranking is not suitable for a
|
|
19
|
+
production module decision.
|
|
14
20
|
|
|
15
|
-
|
|
16
|
-
⚠️ Module embeddings not found
|
|
17
|
-
AI recommendations require embeddings to be generated.
|
|
18
|
-
|
|
19
|
-
? What would you like to do?
|
|
20
|
-
🚀 Generate embeddings now (requires OpenAI API key)
|
|
21
|
-
📝 Show me how to generate them manually
|
|
22
|
-
❌ Cancel
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
Select option 1, provide your OpenAI API key, and you're done! 🎉
|
|
26
|
-
|
|
27
|
-
## Option 2: Manual Setup (For Advanced Users)
|
|
28
|
-
|
|
29
|
-
### Step 1: Get API Key (2 minutes)
|
|
30
|
-
|
|
31
|
-
1. Visit [OpenAI Platform](https://platform.openai.com/api-keys)
|
|
32
|
-
2. Click "Create new secret key"
|
|
33
|
-
3. Copy your key
|
|
34
|
-
|
|
35
|
-
### Step 2: Configure Key (30 seconds)
|
|
36
|
-
|
|
37
|
-
```bash
|
|
38
|
-
npx workspai config set-api-key
|
|
39
|
-
# Paste your API key when prompted
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
Or set as environment variable:
|
|
43
|
-
```bash
|
|
44
|
-
export OPENAI_API_KEY="<YOUR_OPENAI_API_KEY>"
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
### Step 3: Generate Embeddings (typically about a minute, provider-cost dependent)
|
|
48
|
-
|
|
49
|
-
```bash
|
|
50
|
-
npx workspai ai generate-embeddings
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
You'll see:
|
|
54
|
-
```
|
|
55
|
-
🤖 Generating AI embeddings for Workspai modules...
|
|
56
|
-
📡 Fetching modules from Workspai...
|
|
57
|
-
✓ Found <N> modules
|
|
58
|
-
|
|
59
|
-
💰 Estimated cost: shown by CLI at runtime
|
|
60
|
-
(depends on current provider pricing and module count)
|
|
61
|
-
|
|
62
|
-
? Generate embeddings now? Yes
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
**This is a ONE-TIME cost!** Embeddings last forever.
|
|
66
|
-
|
|
67
|
-
### Step 4: Use It! (Instant)
|
|
68
|
-
|
|
69
|
-
```bash
|
|
70
|
-
npx workspai ai recommend "authentication with social login"
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
Output:
|
|
74
|
-
```
|
|
75
|
-
📦 Recommended Modules:
|
|
76
|
-
|
|
77
|
-
1. Authentication Core
|
|
78
|
-
Complete authentication with JWT, OAuth 2.0, secure sessions
|
|
79
|
-
Match: 95.2% - Matches: auth, login, oauth
|
|
80
|
-
Category: auth
|
|
81
|
-
|
|
82
|
-
2. Users Core
|
|
83
|
-
User management with profiles, roles, permissions
|
|
84
|
-
Match: 88.7% - Matches: user, social
|
|
85
|
-
Category: auth
|
|
86
|
-
Requires: authentication-core
|
|
87
|
-
|
|
88
|
-
💡 Quick install (top 3):
|
|
89
|
-
workspai add module authentication-core users-core
|
|
90
|
-
|
|
91
|
-
? Would you like to install these modules now? Yes
|
|
92
|
-
✅ Selected modules installed successfully
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
## Option 3: Test Without API Key (Mock Mode)
|
|
96
|
-
|
|
97
|
-
No API key? No problem! Try it in mock mode:
|
|
98
|
-
|
|
99
|
-
```bash
|
|
100
|
-
npx workspai ai recommend "database with caching"
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
You'll see:
|
|
104
|
-
```
|
|
105
|
-
⚠️ OpenAI API key not configured - using MOCK MODE for testing
|
|
106
|
-
|
|
107
|
-
📝 Note: Mock embeddings provide approximate results for testing.
|
|
108
|
-
For production, configure your OpenAI API key:
|
|
109
|
-
...
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
Mock mode gives realistic (but not perfect) results for free!
|
|
21
|
+
## Use provider-backed recommendations
|
|
113
22
|
|
|
114
|
-
|
|
23
|
+
Prefer an environment variable in CI or short-lived shells:
|
|
115
24
|
|
|
116
|
-
### Find Authentication Modules
|
|
117
25
|
```bash
|
|
118
|
-
|
|
119
|
-
npx workspai ai recommend "
|
|
120
|
-
npx workspai ai recommend "two-factor authentication"
|
|
26
|
+
export OPENAI_API_KEY="<your-key>"
|
|
27
|
+
npx workspai ai recommend "authentication with email" --number 5
|
|
121
28
|
```
|
|
122
29
|
|
|
123
|
-
|
|
124
|
-
```bash
|
|
125
|
-
npx workspai ai recommend "PostgreSQL database with migrations"
|
|
126
|
-
npx workspai ai recommend "MongoDB with async operations"
|
|
127
|
-
npx workspai ai recommend "database caching with Redis"
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
### Find Payment Modules
|
|
131
|
-
```bash
|
|
132
|
-
npx workspai ai recommend "payment processing with Stripe"
|
|
133
|
-
npx workspai ai recommend "subscription billing"
|
|
134
|
-
npx workspai ai recommend "invoice generation"
|
|
135
|
-
```
|
|
30
|
+
For local interactive use, Workspai can store the key in the user configuration:
|
|
136
31
|
|
|
137
|
-
### Find Communication Modules
|
|
138
32
|
```bash
|
|
139
|
-
npx workspai
|
|
140
|
-
npx workspai
|
|
141
|
-
npx workspai ai recommend "real-time notifications"
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
### Find Infrastructure Modules
|
|
145
|
-
```bash
|
|
146
|
-
npx workspai ai recommend "background job processing"
|
|
147
|
-
npx workspai ai recommend "file storage with S3"
|
|
148
|
-
npx workspai ai recommend "rate limiting for APIs"
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
## 💡 Pro Tips
|
|
152
|
-
|
|
153
|
-
### 1. Be Specific
|
|
154
|
-
❌ Bad: "authentication"
|
|
155
|
-
✅ Good: "user authentication with JWT and OAuth 2.0"
|
|
156
|
-
|
|
157
|
-
### 2. Mention Technologies
|
|
158
|
-
❌ Bad: "database"
|
|
159
|
-
✅ Good: "PostgreSQL database with async support"
|
|
160
|
-
|
|
161
|
-
### 3. Describe Your Use Case
|
|
162
|
-
❌ Bad: "payments"
|
|
163
|
-
✅ Good: "subscription payments with recurring billing"
|
|
164
|
-
|
|
165
|
-
### 4. Use Natural Language
|
|
166
|
-
❌ Don't: "auth jwt oauth session redis"
|
|
167
|
-
✅ Do: "I need authentication with JWT tokens and Redis sessions"
|
|
168
|
-
|
|
169
|
-
### 5. Get More/Less Results
|
|
170
|
-
```bash
|
|
171
|
-
# Get top 3 only
|
|
172
|
-
npx workspai ai recommend "auth" --number 3
|
|
173
|
-
|
|
174
|
-
# Get top 10
|
|
175
|
-
npx workspai ai recommend "auth" --number 10
|
|
33
|
+
npx workspai config set-api-key
|
|
34
|
+
npx workspai config show
|
|
176
35
|
```
|
|
177
36
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
npx workspai ai recommend "database" --json | jq '.recommendations[0].module.id'
|
|
181
|
-
```
|
|
37
|
+
Do not pass secrets through `--key` in shared terminals or CI logs. Use an
|
|
38
|
+
environment secret instead.
|
|
182
39
|
|
|
183
|
-
|
|
40
|
+
Published packages normally include the module embedding catalog. If the
|
|
41
|
+
catalog is missing or intentionally being refreshed:
|
|
184
42
|
|
|
185
43
|
```bash
|
|
186
|
-
# Get recommendations
|
|
187
|
-
npx workspai ai recommend "query here"
|
|
188
|
-
|
|
189
|
-
# Generate embeddings (one-time)
|
|
190
44
|
npx workspai ai generate-embeddings
|
|
191
|
-
|
|
192
|
-
# Update embeddings (after Workspai update)
|
|
193
45
|
npx workspai ai update-embeddings
|
|
46
|
+
```
|
|
194
47
|
|
|
195
|
-
|
|
196
|
-
npx workspai ai info
|
|
48
|
+
Both commands require a provider key and may incur provider charges.
|
|
197
49
|
|
|
198
|
-
|
|
199
|
-
npx workspai config set-api-key
|
|
50
|
+
## Script-friendly output
|
|
200
51
|
|
|
201
|
-
|
|
202
|
-
npx workspai
|
|
52
|
+
```bash
|
|
53
|
+
npx workspai ai recommend "database caching" --number 3 --json
|
|
203
54
|
```
|
|
204
55
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|------|------|------|
|
|
209
|
-
| Setup (embeddings) | Varies | One-time only |
|
|
210
|
-
| Per query | Varies | Every query |
|
|
211
|
-
| Ongoing usage | Varies | After setup |
|
|
56
|
+
Recommendation scores are embedding similarity values. They are not confidence
|
|
57
|
+
probabilities, security approvals, compatibility guarantees, or measured task
|
|
58
|
+
accuracy. Verify runtime compatibility and module dependencies before install.
|
|
212
59
|
|
|
213
|
-
|
|
60
|
+
## Install a selected module
|
|
214
61
|
|
|
215
|
-
|
|
62
|
+
Module installation is available only in projects whose validated Core bridge
|
|
63
|
+
reports the `add` capability:
|
|
216
64
|
|
|
217
|
-
### "Module embeddings not found"
|
|
218
|
-
👉 Just follow the interactive prompts - they'll guide you!
|
|
219
|
-
|
|
220
|
-
### "Invalid API key"
|
|
221
65
|
```bash
|
|
222
|
-
npx workspai
|
|
223
|
-
# Enter your correct API key
|
|
66
|
+
npx workspai add module <module-id>
|
|
224
67
|
```
|
|
225
68
|
|
|
226
|
-
|
|
227
|
-
|
|
69
|
+
If the project does not expose that capability, the recommender can still return
|
|
70
|
+
suggestions but Workspai will refuse the installation step with a reason.
|
|
228
71
|
|
|
229
|
-
|
|
230
|
-
👉 Use mock mode - it works without an API key!
|
|
72
|
+
## Troubleshooting
|
|
231
73
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
```bash
|
|
242
|
-
npx workspai ai recommend "what I want to build"
|
|
243
|
-
```
|
|
74
|
+
| Symptom | What to do |
|
|
75
|
+
| ------------------------------- | -------------------------------------------------------------------------- |
|
|
76
|
+
| AI features are disabled | `npx workspai config ai enable` |
|
|
77
|
+
| Provider key is missing | Use mock mode or set `OPENAI_API_KEY` |
|
|
78
|
+
| Embedding catalog is missing | Run `npx workspai ai generate-embeddings` |
|
|
79
|
+
| Provider returns 401 | Replace the key; never paste it into an issue |
|
|
80
|
+
| Provider returns 429 | Check the provider quota/rate limit and retry later |
|
|
81
|
+
| Recommendation looks irrelevant | Use a clearer requirement and treat the score as similarity, not certainty |
|
|
82
|
+
| Module install is refused | Run the command inside a module-enabled project and inspect its capability |
|
|
244
83
|
|
|
245
|
-
|
|
84
|
+
For full behavior and architecture, see [AI_FEATURES.md](./AI_FEATURES.md) and
|
|
85
|
+
[AI_DYNAMIC_INTEGRATION.md](./AI_DYNAMIC_INTEGRATION.md).
|
package/docs/DEVELOPMENT.md
CHANGED
|
@@ -6,7 +6,7 @@ Maintainer reference for the Workspai CLI (Node/TypeScript bridge to Python Core
|
|
|
6
6
|
|
|
7
7
|
## Prerequisites
|
|
8
8
|
|
|
9
|
-
- Node.js `>=
|
|
9
|
+
- Node.js `>=20.19.0`
|
|
10
10
|
- npm — see [PACKAGE_MANAGER_POLICY.md](./PACKAGE_MANAGER_POLICY.md)
|
|
11
11
|
|
|
12
12
|
```bash
|
|
@@ -18,7 +18,7 @@ npm run build
|
|
|
18
18
|
|
|
19
19
|
```bash
|
|
20
20
|
npm run validate
|
|
21
|
-
npm run validate
|
|
21
|
+
npm run contracts:validate
|
|
22
22
|
npm run test:drift
|
|
23
23
|
```
|
|
24
24
|
|
|
@@ -30,11 +30,11 @@ User defaults: [config-file-guide.md](./config-file-guide.md) (`$HOME/.workspair
|
|
|
30
30
|
|
|
31
31
|
Priority: CLI flags > environment variables > config file > defaults.
|
|
32
32
|
|
|
33
|
-
###
|
|
33
|
+
### Local Core checkout
|
|
34
34
|
|
|
35
35
|
```bash
|
|
36
36
|
export WORKSPAI_DEV_PATH=/path/to/local/rapidkit-core
|
|
37
|
-
npx workspai my-workspace
|
|
37
|
+
npx workspai my-workspace
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
`RAPIDKIT_DEV_PATH` remains supported as a legacy fallback.
|
|
@@ -47,7 +47,7 @@ npx workspai create project fastapi.standard my-api --output .
|
|
|
47
47
|
npx workspai create project nextjs my-web --yes
|
|
48
48
|
|
|
49
49
|
# Workspace mode
|
|
50
|
-
npx workspai create workspace my-workspace --yes --profile polyglot
|
|
50
|
+
npx workspai create workspace my-workspace --here --yes --profile polyglot
|
|
51
51
|
cd my-workspace
|
|
52
52
|
npx workspai bootstrap --profile polyglot
|
|
53
53
|
npx workspai create project
|
|
Binary file
|
package/docs/GLOSSARY.md
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Workspai Glossary
|
|
2
|
+
|
|
3
|
+
Short definitions for terms used by the CLI, its reports, IDE integrations,
|
|
4
|
+
CI workflows, and AI consumers.
|
|
5
|
+
|
|
6
|
+
## Core concepts
|
|
7
|
+
|
|
8
|
+
| Term | Plain-language meaning |
|
|
9
|
+
| ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
10
|
+
| Workspace | A governed collection of one or more registered projects. It is not required to be a Git monorepo. |
|
|
11
|
+
| Project | One registered application, service, library, or infrastructure unit inside or linked to a workspace. |
|
|
12
|
+
| Workspace manifest | `.workspai/workspace.json`; workspace identity, profile, engine, and bootstrap metadata. It is not the project registry. |
|
|
13
|
+
| Workspace contract | `.workspai/workspace.contract.json`; the operational registry of projects and their declared ports, APIs, ownership, and relationships. |
|
|
14
|
+
| Registry summary | `.workspai/workspace-registry.v1.json`; the canonical lightweight project count and registry status for UI and CI. |
|
|
15
|
+
| Workspace Model | The canonical, deterministic structural description produced from registered projects, manifests, contracts, policies, and detected facts. |
|
|
16
|
+
| Knowledge Graph | A proof-backed representation derived from the Workspace Model. It makes entities and relationships queryable; it is not the source of truth for the model. |
|
|
17
|
+
| Dependency graph | The project-to-project dependency subgraph embedded in the Workspace Model and used by impact and verification. |
|
|
18
|
+
| Provider | A deterministic source adapter that emits facts from code, manifests, APIs, infrastructure, documentation, Git, or another supported source. |
|
|
19
|
+
| Fact | A normalized observation about the workspace, such as a package, endpoint, import, deployment, or owner. |
|
|
20
|
+
| Evidence / proof | The source location and extraction details that justify a fact or relationship. |
|
|
21
|
+
| Proof path | A traceable route from a query result or relationship back to its supporting evidence. |
|
|
22
|
+
| Artifact | A versioned file written under `.workspai/`, usually `.workspai/reports/`, for people or automation to consume. |
|
|
23
|
+
| Command projection | The JSON returned on stdout for one command. It can include status and output metadata around a canonical artifact payload. |
|
|
24
|
+
|
|
25
|
+
## Intelligence and governance
|
|
26
|
+
|
|
27
|
+
| Term | Plain-language meaning |
|
|
28
|
+
| --------------- | -------------------------------------------------------------------------------------------------------------------------------- |
|
|
29
|
+
| Unified runner | `workspace intelligence run`; the supported way to execute the complete intelligence chain in contract order. |
|
|
30
|
+
| Preflight | `sync` and baseline resolution. These prepare the run but are not stages in the 11-stage intelligence chain. |
|
|
31
|
+
| Stage | One contract-defined operation in the intelligence chain. Stage order comes from `workspace-intelligence-chain.v1.json`. |
|
|
32
|
+
| Gate | A decision that can pass, need attention, or block automation according to evidence and policy. |
|
|
33
|
+
| Blocked | The command completed, but evidence or policy prevents the requested release/action. The unified runner uses exit code `2`. |
|
|
34
|
+
| Failed | Execution itself failed. The unified runner uses exit code `1`. |
|
|
35
|
+
| Needs attention | Evidence is usable but contains warnings or non-blocking gaps. Strict policy can promote it to a blocking result. |
|
|
36
|
+
| Fresh / stale | Whether an artifact still matches its governed inputs and dependency closure. A recent timestamp alone does not prove freshness. |
|
|
37
|
+
| Snapshot | A stable baseline of the model used for later comparison. |
|
|
38
|
+
| Diff | The structural change between the current model and a baseline model or snapshot. |
|
|
39
|
+
| Impact | Direct and transitive consequences of a model diff, including verification scope and risk. |
|
|
40
|
+
| Verify | The evidence-backed gate over the affected dependency subgraph and workspace policies. |
|
|
41
|
+
| Context | A bounded, agent-oriented projection of current workspace evidence. |
|
|
42
|
+
| Agent sync | Generation of tool-specific instructions, skills, prompts, indexes, and MCP metadata from canonical evidence. |
|
|
43
|
+
|
|
44
|
+
## AI and integration
|
|
45
|
+
|
|
46
|
+
| Term | Plain-language meaning |
|
|
47
|
+
| ------------------ | ----------------------------------------------------------------------------------------------------------------------------- |
|
|
48
|
+
| Agent grounding | Instructions and evidence references that keep an AI agent inside the correct workspace, contracts, and command loop. |
|
|
49
|
+
| Bounded retrieval | Returning only the most relevant entities and proof paths for a question instead of injecting the complete graph or model. |
|
|
50
|
+
| MCP | Model Context Protocol; Workspai exposes read-oriented workspace tools through `workspace mcp serve`. |
|
|
51
|
+
| Module recommender | The optional embedding-based FastAPI/NestJS recommendation feature. It is separate from deterministic Workspace Intelligence. |
|
|
52
|
+
| Canonical path | The current `.workspai` path that new writers and consumers should prefer. |
|
|
53
|
+
| Legacy path | A `.rapidkit` compatibility path read for older workspaces; it is not the target for new integrations. |
|
|
54
|
+
|
|
55
|
+
## Where to continue
|
|
56
|
+
|
|
57
|
+
- Run the full loop: [Unified Workspace Intelligence Runner](./workspace-intelligence-runner.md)
|
|
58
|
+
- Query evidence: [Workspace Knowledge Graph](./workspace-knowledge-graph.md)
|
|
59
|
+
- Find an output: [Artifact Catalog](./contracts/ARTIFACT_CATALOG.md)
|
|
60
|
+
- Look up syntax: [Command Reference](./commands-reference.md)
|
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Practical workflows for OSS teams using the npm CLI. Command syntax: [commands-reference.md](./commands-reference.md). Import/adopt details: [workspace-operations.md](./workspace-operations.md).
|
|
4
4
|
|
|
5
|
+
All scenarios use the same [Unified Workspace Intelligence Runner](./workspace-intelligence-runner.md):
|
|
6
|
+
`sync` and baseline resolution are reported separately from the exact 11-stage
|
|
7
|
+
chain. Treat exit `1` as an execution failure and exit `2` as an evidence-blocked
|
|
8
|
+
completed run that requires remediation before release.
|
|
9
|
+
|
|
5
10
|
## Scenario 0 — Existing project (adopt or import)
|
|
6
11
|
|
|
7
12
|
Goal: connect code you already have without reshuffling repositories.
|
|
@@ -10,7 +15,9 @@ Goal: connect code you already have without reshuffling repositories.
|
|
|
10
15
|
|
|
11
16
|
```bash
|
|
12
17
|
npx workspai adopt /path/to/existing-app --workspace /path/to/workspace --json
|
|
13
|
-
|
|
18
|
+
cd /path/to/workspace
|
|
19
|
+
npx workspai workspace intelligence run --for-agent codex --strict --json
|
|
20
|
+
cd /path/to/existing-app
|
|
14
21
|
npx workspai doctor project --json
|
|
15
22
|
```
|
|
16
23
|
|
|
@@ -30,14 +37,20 @@ cd my-workspace
|
|
|
30
37
|
npx workspai create project nextjs marketing-web --yes
|
|
31
38
|
```
|
|
32
39
|
|
|
40
|
+
Success check: `workspace registry status --json` lists each project once and
|
|
41
|
+
the unified runner writes
|
|
42
|
+
`.workspai/reports/workspace-intelligence-run-last-run.json`.
|
|
43
|
+
|
|
33
44
|
## What changed from the old flow?
|
|
34
45
|
|
|
35
46
|
Old flow (typical):
|
|
47
|
+
|
|
36
48
|
- Create workspace/project
|
|
37
49
|
- Run `init` / `dev`
|
|
38
50
|
- Minimal governance and supply-chain controls
|
|
39
51
|
|
|
40
52
|
Current flow (new baseline):
|
|
53
|
+
|
|
41
54
|
- Same developer-friendly start
|
|
42
55
|
- Plus optional mirror/offline controls, checksum/attestation verification, Sigstore governance, and auditable reports
|
|
43
56
|
- Works for both small teams and enterprise adoption paths
|
|
@@ -49,7 +62,7 @@ Goal: get productive quickly with minimal complexity.
|
|
|
49
62
|
### Steps
|
|
50
63
|
|
|
51
64
|
```bash
|
|
52
|
-
npx workspai my-workspace
|
|
65
|
+
npx workspai create workspace my-workspace --here --yes --profile polyglot
|
|
53
66
|
cd my-workspace
|
|
54
67
|
npx workspai bootstrap --profile polyglot
|
|
55
68
|
npx workspai setup python
|
|
@@ -60,6 +73,24 @@ npx workspai init
|
|
|
60
73
|
npx workspai dev
|
|
61
74
|
```
|
|
62
75
|
|
|
76
|
+
Run the canonical chain from the workspace before treating its evidence as a
|
|
77
|
+
release or agent input:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
cd ..
|
|
81
|
+
npx workspai workspace intelligence run --for-agent codex --strict --json
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
The canonical durable outputs are `.workspai/reports/workspace-model.json`,
|
|
85
|
+
`.workspai/reports/workspace-knowledge-graph.json`,
|
|
86
|
+
`.workspai/reports/workspace-context-agent.json`, `.workspai/reports/INDEX.json`,
|
|
87
|
+
`.workspai/reports/workspace-intelligence-run-last-run.json`, and `AGENTS.md`.
|
|
88
|
+
Use `npx workspai pipeline --json --strict` separately as the broader governance
|
|
89
|
+
and release gate.
|
|
90
|
+
|
|
91
|
+
Success check: the application starts locally, project Doctor reports the
|
|
92
|
+
expected runtime, and the unified run report contains all 11 ordered stages.
|
|
93
|
+
|
|
63
94
|
### When manual vs automatic?
|
|
64
95
|
|
|
65
96
|
- Manual: run commands directly in local dev.
|
|
@@ -71,8 +102,8 @@ Goal: improve stability and repeatability using mirror artifacts.
|
|
|
71
102
|
|
|
72
103
|
### Steps
|
|
73
104
|
|
|
74
|
-
1
|
|
75
|
-
2
|
|
105
|
+
1. Define minimal mirror config (`.workspai/mirror-config.json`) with artifact sources and checksums.
|
|
106
|
+
2. Run:
|
|
76
107
|
|
|
77
108
|
```bash
|
|
78
109
|
cd my-workspace
|
|
@@ -86,6 +117,9 @@ npx workspai init
|
|
|
86
117
|
npx workspai dev
|
|
87
118
|
```
|
|
88
119
|
|
|
120
|
+
Success check: `mirror verify` succeeds and its latest report exists under
|
|
121
|
+
`.workspai/reports/` before build or test begins.
|
|
122
|
+
|
|
89
123
|
### When manual vs automatic?
|
|
90
124
|
|
|
91
125
|
- Manual: initial mirror setup and local validation.
|
|
@@ -97,13 +131,14 @@ Goal: enforce stronger security controls (attestation + Sigstore governance) in
|
|
|
97
131
|
|
|
98
132
|
### Steps
|
|
99
133
|
|
|
100
|
-
1
|
|
134
|
+
1. Configure `mirror-config.json` with:
|
|
135
|
+
|
|
101
136
|
- `security.requireAttestation: true`
|
|
102
137
|
- `security.requireSigstore: true`
|
|
103
138
|
- `security.requireTransparencyLog: true`
|
|
104
139
|
- environment policy allowlists (`identity`, `issuer`, `rekorUrl`)
|
|
105
140
|
|
|
106
|
-
2
|
|
141
|
+
2. Run:
|
|
107
142
|
|
|
108
143
|
```bash
|
|
109
144
|
RAPIDKIT_ENV=stage npx workspai mirror sync --json
|
|
@@ -111,6 +146,9 @@ RAPIDKIT_ENV=stage npx workspai mirror verify --json
|
|
|
111
146
|
npx workspai bootstrap --profile=enterprise --ci --offline --json
|
|
112
147
|
```
|
|
113
148
|
|
|
149
|
+
Success check: the bootstrap compliance report records the enterprise profile,
|
|
150
|
+
offline mode, checksum/attestation decisions, and a machine-readable exit.
|
|
151
|
+
|
|
114
152
|
### When manual vs automatic?
|
|
115
153
|
|
|
116
154
|
- Manual: initial policy authoring and first dry run.
|
|
@@ -122,17 +160,19 @@ Goal: enforce signed governance policy bundle, generate and export audit evidenc
|
|
|
122
160
|
|
|
123
161
|
### Steps
|
|
124
162
|
|
|
125
|
-
1
|
|
163
|
+
1. Add signed governance bundle:
|
|
164
|
+
|
|
126
165
|
- `.workspai/governance-policy.json`
|
|
127
166
|
- `.workspai/governance-policy.sig`
|
|
128
167
|
- `.workspai/governance-public.pem`
|
|
129
168
|
|
|
130
|
-
2
|
|
169
|
+
2. Configure in `mirror-config.json`:
|
|
170
|
+
|
|
131
171
|
- `security.requireSignedGovernance: true`
|
|
132
172
|
- `security.governanceBundle: { ... }`
|
|
133
173
|
- `security.evidenceExport: { target: "file" | "http", ... }`
|
|
134
174
|
|
|
135
|
-
3
|
|
175
|
+
3. Run:
|
|
136
176
|
|
|
137
177
|
```bash
|
|
138
178
|
RAPIDKIT_ENV=prod npx workspai mirror sync --json
|
|
@@ -140,19 +180,58 @@ RAPIDKIT_ENV=prod npx workspai mirror verify --json
|
|
|
140
180
|
RAPIDKIT_ENV=prod npx workspai bootstrap --profile=enterprise --ci --offline --json
|
|
141
181
|
```
|
|
142
182
|
|
|
183
|
+
Success check: signed-policy verification passes and the configured evidence
|
|
184
|
+
sink receives the same governed run identity as the local report.
|
|
185
|
+
|
|
143
186
|
### When manual vs automatic?
|
|
144
187
|
|
|
145
188
|
- Manual: key management, policy signing, endpoint provisioning.
|
|
146
189
|
- Automatic: all command execution in CI/CD and release pipelines.
|
|
147
190
|
|
|
191
|
+
## Scenario 5 — AI agent or IDE consumer
|
|
192
|
+
|
|
193
|
+
Goal: answer a workspace question with bounded, traceable evidence instead of
|
|
194
|
+
loading every source file or the complete graph into a model prompt.
|
|
195
|
+
|
|
196
|
+
### Steps
|
|
197
|
+
|
|
198
|
+
```bash
|
|
199
|
+
cd my-workspace
|
|
200
|
+
npx workspai workspace intelligence run --for-agent codex --strict --json
|
|
201
|
+
npx workspai workspace graph search "authentication endpoint" --limit 12 --json
|
|
202
|
+
npx workspai workspace graph benchmark "authentication endpoint" --limit 12 --json
|
|
203
|
+
npx workspai workspace mcp serve
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
The runner creates and validates the model, knowledge graph, context, and agent
|
|
207
|
+
surfaces. CLI consumers should start with `AGENTS.md` and
|
|
208
|
+
`.workspai/reports/INDEX.json`, then call `workspace graph search` for a bounded
|
|
209
|
+
result. MCP consumers should call `searchWorkspaceGraph`, follow returned proof
|
|
210
|
+
references, and request the full graph only when the bounded evidence is not
|
|
211
|
+
enough.
|
|
212
|
+
|
|
213
|
+
The benchmark compares readable proof-source payload with the bounded retrieval
|
|
214
|
+
payload. Its token value is an estimate, not a universal model-cost or
|
|
215
|
+
answer-quality claim; see [Graph Benchmark Methodology](./graph-benchmark-methodology.md).
|
|
216
|
+
|
|
217
|
+
### You are done when
|
|
218
|
+
|
|
219
|
+
- the unified runner returns exit `0` for a release-ready workspace, or exit `2`
|
|
220
|
+
with explicit remediation evidence rather than an execution failure;
|
|
221
|
+
- every search result identifies evidence or a proof path;
|
|
222
|
+
- the consumer can answer the question without injecting the complete model or
|
|
223
|
+
graph by default.
|
|
224
|
+
|
|
148
225
|
## Operational outputs (for automation and auditing)
|
|
149
226
|
|
|
150
227
|
Generated reports:
|
|
228
|
+
|
|
151
229
|
- `.workspai/reports/bootstrap-compliance.latest.json`
|
|
152
230
|
- `.workspai/reports/mirror-ops.latest.json`
|
|
153
231
|
- `.workspai/reports/transparency-evidence.latest.json`
|
|
154
232
|
|
|
155
233
|
Optional exported evidence sinks:
|
|
234
|
+
|
|
156
235
|
- file sink (NDJSON/JSON append strategy)
|
|
157
236
|
- HTTP webhook sink (SIEM/GRC intake)
|
|
158
237
|
|
|
@@ -161,6 +240,7 @@ Optional exported evidence sinks:
|
|
|
161
240
|
- Individuals/small teams: start with Scenario 0 → 1 → 2.
|
|
162
241
|
- Product teams/platform teams: adopt Scenario 3.
|
|
163
242
|
- Regulated/high-compliance environments: run Scenario 4 by default.
|
|
243
|
+
- AI/IDE integrations: add Scenario 5 after the workspace is registered.
|
|
164
244
|
|
|
165
245
|
## See also
|
|
166
246
|
|
|
@@ -168,3 +248,5 @@ Optional exported evidence sinks:
|
|
|
168
248
|
- [workspace-operations.md](./workspace-operations.md)
|
|
169
249
|
- [doctor-command.md](./doctor-command.md)
|
|
170
250
|
- [ci-workflows.md](./ci-workflows.md) (`pipeline --json --strict`)
|
|
251
|
+
- [workspace-knowledge-graph.md](./workspace-knowledge-graph.md)
|
|
252
|
+
- [GLOSSARY.md](./GLOSSARY.md)
|