workspai 0.46.0 → 0.48.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 (143) hide show
  1. package/README.md +225 -81
  2. package/contracts/agent-customization-pack.v1.json +11 -1
  3. package/contracts/bootstrap-compliance.v1.json +14 -0
  4. package/contracts/cli-runtime-command-inventory.v1.snapshot.json +4 -0
  5. package/contracts/extension-cli-compatibility.v1.json +13 -2
  6. package/contracts/mirror-ops.v1.json +16 -0
  7. package/contracts/published-contract-catalog.v1.json +59 -1
  8. package/contracts/runtime-command-surface.v1.json +294 -2
  9. package/contracts/transparency-evidence.v1.json +13 -0
  10. package/contracts/workspace-contract.v1.json +78 -0
  11. package/contracts/workspace-intelligence/model-usage-event.v1.json +82 -0
  12. package/contracts/workspace-intelligence/workspace-context.v1.json +20 -0
  13. package/contracts/workspace-intelligence/workspace-graph-token-efficiency.v1.json +72 -0
  14. package/contracts/workspace-intelligence/workspace-intelligence-evaluation-comparison.v1.json +53 -0
  15. package/contracts/workspace-intelligence/workspace-intelligence-evaluation.v1.json +120 -0
  16. package/contracts/workspace-intelligence/workspace-intelligence-run.v1.json +6 -1
  17. package/contracts/workspace-intelligence/workspace-knowledge-graph-change-overlay.v1.json +200 -0
  18. package/contracts/workspace-intelligence/workspace-knowledge-graph.v1.json +260 -0
  19. package/contracts/workspace-intelligence/workspace-knowledge-search.v1.json +60 -0
  20. package/contracts/workspace-intelligence-architecture.v1.json +37 -5
  21. package/contracts/workspace-intelligence-chain.v1.json +58 -6
  22. package/contracts/workspace-share-bundle.v1.json +16 -0
  23. package/dist/analyze-EEEU3MIF.js +1 -0
  24. package/dist/artifact-remediation-plan-SPOUHMK5.js +3 -0
  25. package/dist/autopilot-release-XGVXPOZI.js +1 -0
  26. package/dist/chunk-32OJDBIG.js +2 -0
  27. package/dist/chunk-37CVKXBD.js +1 -0
  28. package/dist/chunk-3NU32T4A.js +2 -0
  29. package/dist/chunk-3VFA7D5T.js +1 -0
  30. package/dist/chunk-4HDYADHT.js +13 -0
  31. package/dist/chunk-54EP5CEV.js +8 -0
  32. package/dist/chunk-5S3DJQEP.js +8 -0
  33. package/dist/chunk-AFL3ACCR.js +2 -0
  34. package/dist/{chunk-VFDM65IE.js → chunk-BFLJ2R4D.js} +22 -22
  35. package/dist/chunk-BGPXQQNY.js +4 -0
  36. package/dist/chunk-BMWFQXGW.js +1 -0
  37. package/dist/{chunk-UQWOVV6V.js → chunk-CRHYBQI3.js} +1 -1
  38. package/dist/chunk-CV5HKU4P.js +1 -0
  39. package/dist/chunk-ESLPI3XZ.js +1 -0
  40. package/dist/chunk-FB7SCXAZ.js +1 -0
  41. package/dist/{chunk-WPEEC5BX.js → chunk-HDXNIN4N.js} +1 -1
  42. package/dist/chunk-HZDXO65G.js +36 -0
  43. package/dist/{chunk-J5PIZCAU.js → chunk-I46XEIPL.js} +1 -1
  44. package/dist/chunk-J5ENLXDF.js +1 -0
  45. package/dist/chunk-KB44JP4M.js +2 -0
  46. package/dist/chunk-LHOZXC2M.js +2 -0
  47. package/dist/chunk-NAJCUQ4X.js +2 -0
  48. package/dist/chunk-OA537ZQ5.js +1 -0
  49. package/dist/chunk-OW42TZFB.js +1 -0
  50. package/dist/chunk-P3D5YQB2.js +1 -0
  51. package/dist/chunk-PHXQR6PX.js +2 -0
  52. package/dist/{chunk-ZKAI3PJE.js → chunk-PRTR2DQ2.js} +1 -1
  53. package/dist/{chunk-QA5BGEQW.js → chunk-QNONOO4F.js} +1 -1
  54. package/dist/chunk-RHQW3DTP.js +1 -0
  55. package/dist/chunk-T4YR4RAI.js +2 -0
  56. package/dist/chunk-THIOE2PB.js +2 -0
  57. package/dist/{chunk-4LGXSBCN.js → chunk-VU7NZHPM.js} +1 -1
  58. package/dist/chunk-WDKNMTJQ.js +1 -0
  59. package/dist/{chunk-YUATNVOT.js → chunk-Y5UJLPS4.js} +16 -16
  60. package/dist/{chunk-6IIZJQLV.js → chunk-YJZOMRAS.js} +1 -1
  61. package/dist/{create-WCV3L6XH.js → create-DBQNAMKP.js} +1 -1
  62. package/dist/{doctor-5BWM2EMJ.js → doctor-4NNUDNGZ.js} +1 -1
  63. package/dist/{dotnet-webapi-clean-6TVFBTVI.js → dotnet-webapi-clean-A6MVDYXX.js} +4 -4
  64. package/dist/{gofiber-standard-2BL7GWZB.js → gofiber-standard-I5YPQG5V.js} +1 -1
  65. package/dist/{gogin-standard-XGP3KBXA.js → gogin-standard-VY2L4QT5.js} +1 -1
  66. package/dist/index.d.ts +56 -14
  67. package/dist/index.js +322 -320
  68. package/dist/pipeline-TQM43A3K.js +5 -0
  69. package/dist/{springboot-standard-JJNUID6M.js → springboot-standard-55XKCBIZ.js} +4 -4
  70. package/dist/{workspace-7OXW5YTJ.js → workspace-NCWRINEF.js} +1 -1
  71. package/dist/{workspace-agent-sync-O4IA6VOA.js → workspace-agent-sync-662QHXGF.js} +1 -1
  72. package/dist/{workspace-archive-H74NBBNW.js → workspace-archive-P76EDIUG.js} +1 -1
  73. package/dist/{workspace-context-R7IPUBPG.js → workspace-context-23YYCUCP.js} +1 -1
  74. package/dist/workspace-contract-TU2I7GC2.js +1 -0
  75. package/dist/workspace-dependency-graph-BP4EXYQ5.js +1 -0
  76. package/dist/workspace-explain-MWUEN643.js +1 -0
  77. package/dist/workspace-explain-contract-ZPI3JXJU.js +1 -0
  78. package/dist/{workspace-feedback-REOS36ZZ.js → workspace-feedback-SUVH2LUJ.js} +1 -1
  79. package/dist/{workspace-foundation-KXT4QI5O.js → workspace-foundation-WXJ6I7ES.js} +1 -1
  80. package/dist/workspace-graph-token-efficiency-CFGFCJ5V.js +1 -0
  81. package/dist/{workspace-history-OGOVSKZG.js → workspace-history-BANOJRQ2.js} +1 -1
  82. package/dist/workspace-intelligence-MFJE7W67.js +1 -0
  83. package/dist/workspace-intelligence-evaluation-IPH7M3WV.js +1 -0
  84. package/dist/workspace-intelligence-runner-THYLHHMF.js +1 -0
  85. package/dist/workspace-knowledge-graph-ARDC6HHG.js +1 -0
  86. package/dist/workspace-knowledge-graph-change-overlay-XG6FC4IX.js +1 -0
  87. package/dist/workspace-knowledge-graph-export-UYAYFTWX.js +10 -0
  88. package/dist/workspace-knowledge-graph-query-VOSPPH4W.js +1 -0
  89. package/dist/workspace-mcp-serve-EZR6O76D.js +3 -0
  90. package/dist/workspace-model-7OU2M3LE.js +1 -0
  91. package/dist/workspace-model-hash-MHXK5MEI.js +1 -0
  92. package/dist/{workspace-registry-summary-SZ46R5PD.js → workspace-registry-summary-ORDK7A36.js} +1 -1
  93. package/dist/workspace-run-RLIYSOTN.js +1 -0
  94. package/dist/{workspace-verify-MFQ7IXGD.js → workspace-verify-EBVL7FWT.js} +1 -1
  95. package/dist/workspace-watch-3BPGLFLB.js +1 -0
  96. package/docs/AI_DYNAMIC_INTEGRATION.md +73 -428
  97. package/docs/AI_EXAMPLES.md +37 -395
  98. package/docs/AI_FEATURES.md +76 -456
  99. package/docs/AI_QUICKSTART.md +49 -212
  100. package/docs/GLOSSARY.md +64 -0
  101. package/docs/OPEN_SOURCE_USER_SCENARIOS.md +68 -7
  102. package/docs/README.md +70 -41
  103. package/docs/README_CONTENT_CONTRACT.md +154 -0
  104. package/docs/commands-reference.md +64 -4
  105. package/docs/config-file-guide.md +6 -2
  106. package/docs/contracts/ARTIFACT_CATALOG.md +76 -37
  107. package/docs/contracts/README.md +47 -8
  108. package/docs/graph-benchmark-methodology.md +121 -0
  109. package/docs/workspace-intelligence-evaluation.md +147 -0
  110. package/docs/workspace-knowledge-graph.md +316 -0
  111. package/docs/workspace-operations.md +49 -0
  112. package/package.json +2 -1
  113. package/dist/analyze-BEBEZSZK.js +0 -1
  114. package/dist/artifact-remediation-plan-FFQSESAM.js +0 -3
  115. package/dist/autopilot-release-WUR4CQIT.js +0 -1
  116. package/dist/chunk-2G7FASAO.js +0 -2
  117. package/dist/chunk-4EPHWD27.js +0 -8
  118. package/dist/chunk-CVHMUSRX.js +0 -1
  119. package/dist/chunk-DIPD72H4.js +0 -2
  120. package/dist/chunk-EFYHGCGX.js +0 -2
  121. package/dist/chunk-FWRXA435.js +0 -2
  122. package/dist/chunk-HDURFXW5.js +0 -2
  123. package/dist/chunk-HMUKBW2S.js +0 -4
  124. package/dist/chunk-K4WNYXKK.js +0 -33
  125. package/dist/chunk-LG6RFLPZ.js +0 -1
  126. package/dist/chunk-N7DV5L7C.js +0 -1
  127. package/dist/chunk-PRBVYW3T.js +0 -1
  128. package/dist/chunk-QZLIURER.js +0 -13
  129. package/dist/chunk-RIEF2DDX.js +0 -8
  130. package/dist/chunk-SXMTSV5M.js +0 -1
  131. package/dist/chunk-SXPY523X.js +0 -1
  132. package/dist/chunk-V3LRQZ36.js +0 -1
  133. package/dist/chunk-WYFPXTTS.js +0 -2
  134. package/dist/pipeline-ORIWVVYM.js +0 -5
  135. package/dist/workspace-contract-HKCMOMFE.js +0 -1
  136. package/dist/workspace-explain-GOPQYTPQ.js +0 -1
  137. package/dist/workspace-explain-contract-SVFJAAEI.js +0 -1
  138. package/dist/workspace-intelligence-7IESQSXY.js +0 -1
  139. package/dist/workspace-intelligence-runner-6GJ5M4HB.js +0 -1
  140. package/dist/workspace-mcp-serve-FRVWBO36.js +0 -3
  141. package/dist/workspace-model-PPYX7B4S.js +0 -1
  142. package/dist/workspace-run-V3KKHTVF.js +0 -1
  143. package/dist/workspace-watch-SOPZHRWA.js +0 -1
@@ -1,248 +1,85 @@
1
- # 🚀 AI Features - Quick Start Guide
1
+ # Optional AI Module Recommendations
2
2
 
3
- Get started with Workspai AI recommendations in 60 seconds!
3
+ Workspai has two different AI-facing capabilities:
4
4
 
5
- ## Option 1: Use the bundled catalog (Recommended) ⚡
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
- Just run it - AI will guide you through everything:
11
+ ## Try it without an API key
8
12
 
9
13
  ```bash
10
- npx workspai ai recommend "user authentication"
14
+ npx workspai ai recommend "authentication with email"
11
15
  ```
12
16
 
13
- Published Workspai packages normally include `data/modules-embeddings.json`, so
14
- recommendations can use the bundled catalog after an API key is configured.
15
- If that file is missing, the CLI offers this recovery flow:
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.
16
20
 
17
- ```
18
- ⚠️ Module embeddings not found
19
- AI recommendations require embeddings to be generated.
20
-
21
- ? What would you like to do?
22
- 🚀 Generate embeddings now (requires OpenAI API key)
23
- 📝 Show me how to generate them manually
24
- ❌ Cancel
25
- ```
26
-
27
- Select option 1 to rebuild the missing data, or use the manual refresh flow below.
28
-
29
- ## Option 2: Manual Setup (For Advanced Users)
30
-
31
- ### Step 1: Get API Key (2 minutes)
32
-
33
- 1. Visit [OpenAI Platform](https://platform.openai.com/api-keys)
34
- 2. Click "Create new secret key"
35
- 3. Copy your key
36
-
37
- ### Step 2: Configure Key (30 seconds)
38
-
39
- ```bash
40
- npx workspai config set-api-key
41
- # Paste your API key when prompted
42
- ```
43
-
44
- Or set as environment variable:
45
- ```bash
46
- export OPENAI_API_KEY="<YOUR_OPENAI_API_KEY>"
47
- ```
48
-
49
- ### Step 3: Generate Embeddings (typically about a minute, provider-cost dependent)
50
-
51
- ```bash
52
- npx workspai ai generate-embeddings
53
- ```
54
-
55
- You'll see:
56
- ```
57
- 🤖 Generating AI embeddings for Workspai modules...
58
- 📡 Fetching modules from Workspai...
59
- ✓ Found <N> modules
60
-
61
- 💰 Estimated cost: shown by CLI at runtime
62
- (depends on current provider pricing and module count)
63
-
64
- ? Generate embeddings now? Yes
65
- ```
66
-
67
- Embeddings are reusable until the module catalog, embedding model, or desired
68
- coverage changes.
69
-
70
- ### Step 4: Use It! (Instant)
71
-
72
- ```bash
73
- npx workspai ai recommend "authentication with social login"
74
- ```
75
-
76
- Output:
77
- ```
78
- 📦 Recommended Modules:
79
-
80
- 1. Authentication Core
81
- Complete authentication with JWT, OAuth 2.0, secure sessions
82
- Match: 95.2% - Matches: auth, login, oauth
83
- Category: auth
84
-
85
- 2. Users Core
86
- User management with profiles, roles, permissions
87
- Match: 88.7% - Matches: user, social
88
- Category: auth
89
- Requires: authentication-core
90
-
91
- 💡 Quick install (top 3):
92
- workspai add module authentication-core users-core
93
-
94
- ? Would you like to install these modules now? Yes
95
- ✅ Selected modules installed successfully
96
- ```
97
-
98
- ## Option 3: Test Without API Key (Mock Mode)
99
-
100
- No API key? No problem! Try it in mock mode:
101
-
102
- ```bash
103
- npx workspai ai recommend "database with caching"
104
- ```
105
-
106
- You'll see:
107
- ```
108
- ⚠️ OpenAI API key not configured - using MOCK MODE for testing
109
-
110
- 📝 Note: Mock embeddings provide approximate results for testing.
111
- For production, configure your OpenAI API key:
112
- ...
113
- ```
114
-
115
- Mock mode gives realistic (but not perfect) results for free!
21
+ ## Use provider-backed recommendations
116
22
 
117
- ## 🎯 Common Use Cases
23
+ Prefer an environment variable in CI or short-lived shells:
118
24
 
119
- ### Find Authentication Modules
120
25
  ```bash
121
- npx workspai ai recommend "user authentication with email and password"
122
- npx workspai ai recommend "social login with Google and Facebook"
123
- npx workspai ai recommend "two-factor authentication"
26
+ export OPENAI_API_KEY="<your-key>"
27
+ npx workspai ai recommend "authentication with email" --number 5
124
28
  ```
125
29
 
126
- ### Find Database Modules
127
- ```bash
128
- npx workspai ai recommend "PostgreSQL database with migrations"
129
- npx workspai ai recommend "MongoDB with async operations"
130
- npx workspai ai recommend "database caching with Redis"
131
- ```
132
-
133
- ### Find Payment Modules
134
- ```bash
135
- npx workspai ai recommend "payment processing with Stripe"
136
- npx workspai ai recommend "subscription billing"
137
- npx workspai ai recommend "invoice generation"
138
- ```
30
+ For local interactive use, Workspai can store the key in the user configuration:
139
31
 
140
- ### Find Communication Modules
141
32
  ```bash
142
- npx workspai ai recommend "email notifications with templates"
143
- npx workspai ai recommend "SMS verification codes"
144
- npx workspai ai recommend "real-time notifications"
145
- ```
146
-
147
- ### Find Infrastructure Modules
148
- ```bash
149
- npx workspai ai recommend "background job processing"
150
- npx workspai ai recommend "file storage with S3"
151
- npx workspai ai recommend "rate limiting for APIs"
152
- ```
153
-
154
- ## 💡 Pro Tips
155
-
156
- ### 1. Be Specific
157
- ❌ Bad: "authentication"
158
- ✅ Good: "user authentication with JWT and OAuth 2.0"
159
-
160
- ### 2. Mention Technologies
161
- ❌ Bad: "database"
162
- ✅ Good: "PostgreSQL database with async support"
163
-
164
- ### 3. Describe Your Use Case
165
- ❌ Bad: "payments"
166
- ✅ Good: "subscription payments with recurring billing"
167
-
168
- ### 4. Use Natural Language
169
- ❌ Don't: "auth jwt oauth session redis"
170
- ✅ Do: "I need authentication with JWT tokens and Redis sessions"
171
-
172
- ### 5. Get More/Less Results
173
- ```bash
174
- # Get top 3 only
175
- npx workspai ai recommend "auth" --number 3
176
-
177
- # Get top 10
178
- npx workspai ai recommend "auth" --number 10
33
+ npx workspai config set-api-key
34
+ npx workspai config show
179
35
  ```
180
36
 
181
- ### 6. JSON Output for Scripts
182
- ```bash
183
- npx workspai ai recommend "database" --json | jq '.recommendations[0].module.id'
184
- ```
37
+ Do not pass secrets through `--key` in shared terminals or CI logs. Use an
38
+ environment secret instead.
185
39
 
186
- ## 🔧 Quick Commands
40
+ Published packages normally include the module embedding catalog. If the
41
+ catalog is missing or intentionally being refreshed:
187
42
 
188
43
  ```bash
189
- # Get recommendations
190
- npx workspai ai recommend "query here"
191
-
192
- # Generate embeddings (one-time)
193
44
  npx workspai ai generate-embeddings
194
-
195
- # Update embeddings (after Workspai update)
196
45
  npx workspai ai update-embeddings
46
+ ```
197
47
 
198
- # View info and pricing
199
- npx workspai ai info
48
+ Both commands require a provider key and may incur provider charges.
200
49
 
201
- # Configure API key
202
- npx workspai config set-api-key
50
+ ## Script-friendly output
203
51
 
204
- # Check current config
205
- npx workspai config show
52
+ ```bash
53
+ npx workspai ai recommend "database caching" --number 3 --json
206
54
  ```
207
55
 
208
- ## 💰 Pricing Summary
209
-
210
- | Item | Cost | When |
211
- |------|------|------|
212
- | Setup (embeddings) | Varies | One-time only |
213
- | Per query | Varies | Every query |
214
- | 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.
215
59
 
216
- **Note:** pricing changes over time. Check your provider dashboard for current rates.
60
+ ## Install a selected module
217
61
 
218
- ## Troubleshooting
62
+ Module installation is available only in projects whose validated Core bridge
63
+ reports the `add` capability:
219
64
 
220
- ### "Module embeddings not found"
221
- 👉 Just follow the interactive prompts - they'll guide you!
222
-
223
- ### "Invalid API key"
224
65
  ```bash
225
- npx workspai config set-api-key
226
- # Enter your correct API key
66
+ npx workspai add module <module-id>
227
67
  ```
228
68
 
229
- ### "Quota exceeded"
230
- 👉 Check your billing: https://platform.openai.com/account/billing
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.
231
71
 
232
- ### Want to test without spending money?
233
- 👉 Use mock mode - it works without an API key!
72
+ ## Troubleshooting
234
73
 
235
- ## 🎓 Learn More
236
-
237
- - **Full Guide:** [AI_FEATURES.md](AI_FEATURES.md)
238
- - **Technical Details:** [AI_DYNAMIC_INTEGRATION.md](AI_DYNAMIC_INTEGRATION.md)
239
- - **Main README:** [../README.md](../README.md)
240
-
241
- ## 🚀 Ready to Build?
242
-
243
- Start exploring modules with AI:
244
- ```bash
245
- npx workspai ai recommend "what I want to build"
246
- ```
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 |
247
83
 
248
- That's it! Happy building! 🎉
84
+ For full behavior and architecture, see [AI_FEATURES.md](./AI_FEATURES.md) and
85
+ [AI_DYNAMIC_INTEGRATION.md](./AI_DYNAMIC_INTEGRATION.md).
@@ -0,0 +1,64 @@
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
+ | Evaluation | A provenance-aware record of model calls, tool activity, cost, latency, and verified task outcome produced by `workspace eval`. |
44
+ | Verified outcome | A task result supported by the workspace verification path; smaller context alone is not treated as task success. |
45
+
46
+ ## AI and integration
47
+
48
+ | Term | Plain-language meaning |
49
+ | ------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
50
+ | Agent grounding | Instructions and evidence references that keep an AI agent inside the correct workspace, contracts, and command loop. |
51
+ | Bounded retrieval | Returning only the most relevant entities and proof paths for a question instead of injecting the complete graph or model. |
52
+ | Retrieval benchmark | A deterministic comparison of readable proof-source corpus size with one bounded graph response; it is not billing evidence. |
53
+ | Token provenance | Whether a token value was provider-reported, counted by a named tokenizer, estimated, or unavailable. |
54
+ | MCP | Model Context Protocol; Workspai exposes read-oriented workspace tools through `workspace mcp serve`. |
55
+ | Module recommender | The optional embedding-based FastAPI/NestJS recommendation feature. It is separate from deterministic Workspace Intelligence. |
56
+ | Canonical path | The current `.workspai` path that new writers and consumers should prefer. |
57
+ | Legacy path | A `.rapidkit` compatibility path read for older workspaces; it is not the target for new integrations. |
58
+
59
+ ## Where to continue
60
+
61
+ - Run the full loop: [Unified Workspace Intelligence Runner](./workspace-intelligence-runner.md)
62
+ - Query evidence: [Workspace Knowledge Graph](./workspace-knowledge-graph.md)
63
+ - Find an output: [Artifact Catalog](./contracts/ARTIFACT_CATALOG.md)
64
+ - Look up syntax: [Command Reference](./commands-reference.md)
@@ -37,14 +37,20 @@ cd my-workspace
37
37
  npx workspai create project nextjs marketing-web --yes
38
38
  ```
39
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
+
40
44
  ## What changed from the old flow?
41
45
 
42
46
  Old flow (typical):
47
+
43
48
  - Create workspace/project
44
49
  - Run `init` / `dev`
45
50
  - Minimal governance and supply-chain controls
46
51
 
47
52
  Current flow (new baseline):
53
+
48
54
  - Same developer-friendly start
49
55
  - Plus optional mirror/offline controls, checksum/attestation verification, Sigstore governance, and auditable reports
50
56
  - Works for both small teams and enterprise adoption paths
@@ -76,11 +82,15 @@ npx workspai workspace intelligence run --for-agent codex --strict --json
76
82
  ```
77
83
 
78
84
  The canonical durable outputs are `.workspai/reports/workspace-model.json`,
85
+ `.workspai/reports/workspace-knowledge-graph.json`,
79
86
  `.workspai/reports/workspace-context-agent.json`, `.workspai/reports/INDEX.json`,
80
87
  `.workspai/reports/workspace-intelligence-run-last-run.json`, and `AGENTS.md`.
81
88
  Use `npx workspai pipeline --json --strict` separately as the broader governance
82
89
  and release gate.
83
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
+
84
94
  ### When manual vs automatic?
85
95
 
86
96
  - Manual: run commands directly in local dev.
@@ -92,8 +102,8 @@ Goal: improve stability and repeatability using mirror artifacts.
92
102
 
93
103
  ### Steps
94
104
 
95
- 1) Define minimal mirror config (`.workspai/mirror-config.json`) with artifact sources and checksums.
96
- 2) Run:
105
+ 1. Define minimal mirror config (`.workspai/mirror-config.json`) with artifact sources and checksums.
106
+ 2. Run:
97
107
 
98
108
  ```bash
99
109
  cd my-workspace
@@ -107,6 +117,9 @@ npx workspai init
107
117
  npx workspai dev
108
118
  ```
109
119
 
120
+ Success check: `mirror verify` succeeds and its latest report exists under
121
+ `.workspai/reports/` before build or test begins.
122
+
110
123
  ### When manual vs automatic?
111
124
 
112
125
  - Manual: initial mirror setup and local validation.
@@ -118,13 +131,14 @@ Goal: enforce stronger security controls (attestation + Sigstore governance) in
118
131
 
119
132
  ### Steps
120
133
 
121
- 1) Configure `mirror-config.json` with:
134
+ 1. Configure `mirror-config.json` with:
135
+
122
136
  - `security.requireAttestation: true`
123
137
  - `security.requireSigstore: true`
124
138
  - `security.requireTransparencyLog: true`
125
139
  - environment policy allowlists (`identity`, `issuer`, `rekorUrl`)
126
140
 
127
- 2) Run:
141
+ 2. Run:
128
142
 
129
143
  ```bash
130
144
  RAPIDKIT_ENV=stage npx workspai mirror sync --json
@@ -132,6 +146,9 @@ RAPIDKIT_ENV=stage npx workspai mirror verify --json
132
146
  npx workspai bootstrap --profile=enterprise --ci --offline --json
133
147
  ```
134
148
 
149
+ Success check: the bootstrap compliance report records the enterprise profile,
150
+ offline mode, checksum/attestation decisions, and a machine-readable exit.
151
+
135
152
  ### When manual vs automatic?
136
153
 
137
154
  - Manual: initial policy authoring and first dry run.
@@ -143,17 +160,19 @@ Goal: enforce signed governance policy bundle, generate and export audit evidenc
143
160
 
144
161
  ### Steps
145
162
 
146
- 1) Add signed governance bundle:
163
+ 1. Add signed governance bundle:
164
+
147
165
  - `.workspai/governance-policy.json`
148
166
  - `.workspai/governance-policy.sig`
149
167
  - `.workspai/governance-public.pem`
150
168
 
151
- 2) Configure in `mirror-config.json`:
169
+ 2. Configure in `mirror-config.json`:
170
+
152
171
  - `security.requireSignedGovernance: true`
153
172
  - `security.governanceBundle: { ... }`
154
173
  - `security.evidenceExport: { target: "file" | "http", ... }`
155
174
 
156
- 3) Run:
175
+ 3. Run:
157
176
 
158
177
  ```bash
159
178
  RAPIDKIT_ENV=prod npx workspai mirror sync --json
@@ -161,19 +180,58 @@ RAPIDKIT_ENV=prod npx workspai mirror verify --json
161
180
  RAPIDKIT_ENV=prod npx workspai bootstrap --profile=enterprise --ci --offline --json
162
181
  ```
163
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
+
164
186
  ### When manual vs automatic?
165
187
 
166
188
  - Manual: key management, policy signing, endpoint provisioning.
167
189
  - Automatic: all command execution in CI/CD and release pipelines.
168
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
+
169
225
  ## Operational outputs (for automation and auditing)
170
226
 
171
227
  Generated reports:
228
+
172
229
  - `.workspai/reports/bootstrap-compliance.latest.json`
173
230
  - `.workspai/reports/mirror-ops.latest.json`
174
231
  - `.workspai/reports/transparency-evidence.latest.json`
175
232
 
176
233
  Optional exported evidence sinks:
234
+
177
235
  - file sink (NDJSON/JSON append strategy)
178
236
  - HTTP webhook sink (SIEM/GRC intake)
179
237
 
@@ -182,6 +240,7 @@ Optional exported evidence sinks:
182
240
  - Individuals/small teams: start with Scenario 0 → 1 → 2.
183
241
  - Product teams/platform teams: adopt Scenario 3.
184
242
  - Regulated/high-compliance environments: run Scenario 4 by default.
243
+ - AI/IDE integrations: add Scenario 5 after the workspace is registered.
185
244
 
186
245
  ## See also
187
246
 
@@ -189,3 +248,5 @@ Optional exported evidence sinks:
189
248
  - [workspace-operations.md](./workspace-operations.md)
190
249
  - [doctor-command.md](./doctor-command.md)
191
250
  - [ci-workflows.md](./ci-workflows.md) (`pipeline --json --strict`)
251
+ - [workspace-knowledge-graph.md](./workspace-knowledge-graph.md)
252
+ - [GLOSSARY.md](./GLOSSARY.md)