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.
- package/README.md +243 -513
- package/contracts/cli-runtime-command-inventory.v1.snapshot.json +1372 -0
- package/contracts/command-capabilities.v1.json +166 -1
- package/contracts/extension-cli-compatibility.v1.json +4 -2
- package/contracts/published-contract-catalog.v1.json +12 -1
- package/contracts/runtime-command-surface.v1.json +1478 -3
- package/contracts/workspace-archive-capabilities.v1.json +17 -6
- package/contracts/workspace-intelligence/studio-blocker-handoff.v1.json +4 -0
- package/contracts/workspace-intelligence/workspace-intelligence-run.v1.json +207 -0
- package/contracts/workspace-intelligence-architecture.v1.json +1 -1
- package/contracts/workspace-intelligence-chain.v1.json +37 -1
- package/dist/analyze-BEBEZSZK.js +1 -0
- package/dist/{artifact-remediation-plan-Z7OCSME3.js → artifact-remediation-plan-FFQSESAM.js} +1 -1
- package/dist/autopilot-release-WUR4CQIT.js +1 -0
- package/dist/chunk-2G7FASAO.js +2 -0
- package/dist/{chunk-CL6TGI4Q.js → chunk-4EPHWD27.js} +1 -1
- package/dist/{chunk-J4AICQFB.js → chunk-4LGXSBCN.js} +1 -1
- package/dist/chunk-52PBRX7F.js +1 -0
- package/dist/{chunk-2QOWRBQD.js → chunk-6IIZJQLV.js} +1 -1
- package/dist/{chunk-JICOD2GI.js → chunk-CVHMUSRX.js} +1 -1
- package/dist/{chunk-7UZVOYF5.js → chunk-DIPD72H4.js} +1 -1
- package/dist/chunk-EFYHGCGX.js +2 -0
- package/dist/chunk-EYJ2CQSK.js +1 -0
- package/dist/chunk-FPJNWPKU.js +1 -0
- package/dist/{chunk-JP25YL3J.js → chunk-FTY7GGXJ.js} +2 -2
- package/dist/chunk-FWRXA435.js +2 -0
- package/dist/chunk-FXQJX34Z.js +1 -0
- package/dist/chunk-HDURFXW5.js +2 -0
- package/dist/chunk-HMUKBW2S.js +4 -0
- package/dist/{chunk-OW4UNG27.js → chunk-J5PIZCAU.js} +92 -78
- package/dist/{chunk-P4SWTY5X.js → chunk-K4WNYXKK.js} +7 -7
- package/dist/chunk-MER6ZBN2.js +13 -0
- package/dist/chunk-N7DV5L7C.js +1 -0
- package/dist/{chunk-JHC6SCJC.js → chunk-NHN4QXPP.js} +1 -1
- package/dist/{chunk-P424XYHP.js → chunk-PRBVYW3T.js} +1 -1
- package/dist/{chunk-NTXO7BMH.js → chunk-QA5BGEQW.js} +1 -1
- package/dist/chunk-QZLIURER.js +13 -0
- package/dist/{chunk-L3E6IRUQ.js → chunk-RIEF2DDX.js} +1 -1
- package/dist/{chunk-L2Q7B2OJ.js → chunk-SXMTSV5M.js} +1 -1
- package/dist/chunk-SXPY523X.js +1 -0
- package/dist/{chunk-XIVFLY6G.js → chunk-UQWOVV6V.js} +1 -1
- package/dist/chunk-V3LRQZ36.js +1 -0
- package/dist/chunk-VFDM65IE.js +80 -0
- package/dist/{chunk-B66A4TVP.js → chunk-WPEEC5BX.js} +1 -1
- package/dist/chunk-WYFPXTTS.js +2 -0
- package/dist/{chunk-M4VITK6X.js → chunk-YUATNVOT.js} +62 -51
- package/dist/{chunk-7IHLTPZ6.js → chunk-ZKAI3PJE.js} +1 -1
- package/dist/{create-DFAWAS5C.js → create-WCV3L6XH.js} +1 -1
- package/dist/doctor-5BWM2EMJ.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 +123 -15
- package/dist/index.js +337 -323
- package/dist/pipeline-ORIWVVYM.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-7OXW5YTJ.js +1 -0
- package/dist/{workspace-agent-sync-ZYCPXTU3.js → workspace-agent-sync-O4IA6VOA.js} +1 -1
- package/dist/workspace-archive-H74NBBNW.js +10 -0
- package/dist/{workspace-context-WAGGJCDL.js → workspace-context-R7IPUBPG.js} +1 -1
- package/dist/workspace-contract-HKCMOMFE.js +1 -0
- package/dist/workspace-explain-GOPQYTPQ.js +1 -0
- package/dist/workspace-explain-contract-SVFJAAEI.js +1 -0
- package/dist/{workspace-feedback-RCB25NFO.js → workspace-feedback-REOS36ZZ.js} +1 -1
- package/dist/{workspace-foundation-KXDL6P6X.js → workspace-foundation-KXT4QI5O.js} +1 -1
- package/dist/{workspace-history-M4QQBIPB.js → workspace-history-OGOVSKZG.js} +1 -1
- package/dist/{workspace-intelligence-QOGD2TZS.js → workspace-intelligence-7IESQSXY.js} +1 -1
- package/dist/workspace-intelligence-runner-6GJ5M4HB.js +1 -0
- package/dist/{workspace-mcp-serve-CEFKEMYG.js → workspace-mcp-serve-FRVWBO36.js} +1 -1
- package/dist/{workspace-model-GMSRBICO.js → workspace-model-PPYX7B4S.js} +1 -1
- package/dist/workspace-python-engine-state-2MLKJYQG.js +2 -0
- package/dist/workspace-registry-summary-SZ46R5PD.js +1 -0
- package/dist/workspace-run-V3KKHTVF.js +1 -0
- package/dist/{workspace-verify-NP4GMFSV.js → workspace-verify-MFQ7IXGD.js} +1 -1
- package/dist/{workspace-watch-IIBH3Y25.js → workspace-watch-SOPZHRWA.js} +1 -1
- package/docs/AI_DYNAMIC_INTEGRATION.md +29 -33
- package/docs/AI_FEATURES.md +18 -27
- package/docs/AI_QUICKSTART.md +7 -4
- package/docs/DEVELOPMENT.md +5 -5
- package/docs/From Code to Shared Understanding.png +0 -0
- package/docs/OPEN_SOURCE_USER_SCENARIOS.md +23 -2
- package/docs/OPTIMIZATION_GUIDE.md +19 -51
- package/docs/PACKAGE_MANAGER_POLICY.md +4 -1
- package/docs/README.md +30 -3
- 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 +51 -10
- package/docs/config-file-guide.md +64 -247
- package/docs/contracts/ARTIFACT_CATALOG.md +14 -2
- package/docs/contracts/CLI_LOG_EVENT_STREAM.md +1 -1
- package/docs/contracts/COMMAND_OWNERSHIP_MATRIX.md +27 -6
- package/docs/contracts/README.md +5 -2
- 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/workspace-intelligence-runner.md +186 -0
- package/docs/workspace-operations.md +29 -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 +8 -0
- package/workspai.config.example.cjs +12 -47
- package/dist/analyze-6OCBM4ID.js +0 -1
- package/dist/autopilot-release-LI2WJCEW.js +0 -1
- package/dist/chunk-2K3GYCPS.js +0 -1
- package/dist/chunk-2QN6BMM7.js +0 -2
- package/dist/chunk-5AKYMAIL.js +0 -1
- package/dist/chunk-5PVEQ6CZ.js +0 -13
- package/dist/chunk-7EIMPQR3.js +0 -1
- package/dist/chunk-7RIWU5TZ.js +0 -1
- package/dist/chunk-FWJV7CCI.js +0 -2
- package/dist/chunk-LGP6WXS2.js +0 -4
- package/dist/chunk-TRMDODFM.js +0 -13
- package/dist/chunk-UNF72FTB.js +0 -1
- package/dist/chunk-V5JN4TDX.js +0 -2
- package/dist/chunk-VA5MRHKM.js +0 -2
- package/dist/chunk-XZGVNGRB.js +0 -1
- package/dist/chunk-YUX4YFGL.js +0 -78
- package/dist/doctor-PVSWDBJL.js +0 -1
- package/dist/imported-projects-registry-FOIE27WT.js +0 -1
- package/dist/pipeline-ND734AJM.js +0 -5
- package/dist/workspace-FQT3QIRS.js +0 -1
- package/dist/workspace-archive-EEGLHZDW.js +0 -10
- package/dist/workspace-contract-SEI4SNSG.js +0 -1
- package/dist/workspace-explain-MVGGRCDN.js +0 -1
- package/dist/workspace-explain-contract-KT757JGQ.js +0 -1
- package/dist/workspace-python-engine-state-MTWIIZPY.js +0 -2
- package/dist/workspace-registry-summary-S52SEJAG.js +0 -1
- package/dist/workspace-run-VC4OUPRF.js +0 -1
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
|
|
@@ -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
|
|
|
@@ -49,7 +56,7 @@ Goal: get productive quickly with minimal complexity.
|
|
|
49
56
|
### Steps
|
|
50
57
|
|
|
51
58
|
```bash
|
|
52
|
-
npx workspai my-workspace
|
|
59
|
+
npx workspai create workspace my-workspace --here --yes --profile polyglot
|
|
53
60
|
cd my-workspace
|
|
54
61
|
npx workspai bootstrap --profile polyglot
|
|
55
62
|
npx workspai setup python
|
|
@@ -60,6 +67,20 @@ npx workspai init
|
|
|
60
67
|
npx workspai dev
|
|
61
68
|
```
|
|
62
69
|
|
|
70
|
+
Run the canonical chain from the workspace before treating its evidence as a
|
|
71
|
+
release or agent input:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
cd ..
|
|
75
|
+
npx workspai workspace intelligence run --for-agent codex --strict --json
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
The canonical durable outputs are `.workspai/reports/workspace-model.json`,
|
|
79
|
+
`.workspai/reports/workspace-context-agent.json`, `.workspai/reports/INDEX.json`,
|
|
80
|
+
`.workspai/reports/workspace-intelligence-run-last-run.json`, and `AGENTS.md`.
|
|
81
|
+
Use `npx workspai pipeline --json --strict` separately as the broader governance
|
|
82
|
+
and release gate.
|
|
83
|
+
|
|
63
84
|
### When manual vs automatic?
|
|
64
85
|
|
|
65
86
|
- Manual: run commands directly in local dev.
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Optimization ideas for the Workspai CLI codebase.
|
|
4
4
|
|
|
5
|
+
> This is a proposal backlog, not a description of shipped APIs, benchmarks, CI,
|
|
6
|
+
> or release policy. Validate every proposal against the current package manifest,
|
|
7
|
+
> workflows, and [Development Guide](./DEVELOPMENT.md) before implementation.
|
|
8
|
+
|
|
5
9
|
**Users:** [../README.md](../README.md) · [OPEN_SOURCE_USER_SCENARIOS.md](./OPEN_SOURCE_USER_SCENARIOS.md) · [Documentation index](./README.md)
|
|
6
10
|
|
|
7
11
|
## 1. Performance Optimizations
|
|
@@ -350,7 +354,10 @@ npm install -D typedoc
|
|
|
350
354
|
}
|
|
351
355
|
```
|
|
352
356
|
|
|
353
|
-
### 7.2
|
|
357
|
+
### 7.2 Proposed public API example
|
|
358
|
+
|
|
359
|
+
The package currently guarantees a CLI binary, not this programmatic API. The
|
|
360
|
+
following is illustrative only and must not be used by consumers:
|
|
354
361
|
```typescript
|
|
355
362
|
// examples/programmatic-usage.ts
|
|
356
363
|
import { createProject } from 'workspai';
|
|
@@ -380,7 +387,7 @@ jobs:
|
|
|
380
387
|
strategy:
|
|
381
388
|
matrix:
|
|
382
389
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
383
|
-
node-version: [
|
|
390
|
+
node-version: ['20.19.0', 22]
|
|
384
391
|
|
|
385
392
|
steps:
|
|
386
393
|
- uses: actions/checkout@v3
|
|
@@ -392,28 +399,12 @@ jobs:
|
|
|
392
399
|
- run: npm run build
|
|
393
400
|
```
|
|
394
401
|
|
|
395
|
-
### 8.2
|
|
396
|
-
```yaml
|
|
397
|
-
# .github/workflows/release.yml
|
|
398
|
-
name: Release
|
|
399
|
-
|
|
400
|
-
on:
|
|
401
|
-
push:
|
|
402
|
-
tags:
|
|
403
|
-
- 'v*'
|
|
402
|
+
### 8.2 Releases
|
|
404
403
|
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
- uses: actions/checkout@v3
|
|
410
|
-
- uses: actions/setup-node@v3
|
|
411
|
-
- run: npm ci
|
|
412
|
-
- run: npm run build
|
|
413
|
-
- run: npm publish
|
|
414
|
-
env:
|
|
415
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
416
|
-
```
|
|
404
|
+
Do not publish directly from a tag-triggered example. Releases use the
|
|
405
|
+
maintainer-only `.github/workflows/release-npm-manual.yml` workflow and package
|
|
406
|
+
release scripts after all required exact-SHA gates pass. See
|
|
407
|
+
[CI Workflows](./ci-workflows.md) and [Setup](./SETUP.md).
|
|
417
408
|
|
|
418
409
|
## 9. Monitoring & Analytics Optimizations
|
|
419
410
|
|
|
@@ -474,31 +465,8 @@ const createDemoWorkspace = async () => {
|
|
|
474
465
|
};
|
|
475
466
|
```
|
|
476
467
|
|
|
477
|
-
##
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
3. Input validation improvements
|
|
483
|
-
4. Bundle size optimization
|
|
484
|
-
|
|
485
|
-
### 🟡 Medium Priority (Weeks 2-3)
|
|
486
|
-
1. Plugin system
|
|
487
|
-
2. Integration tests
|
|
488
|
-
3. Performance benchmarks
|
|
489
|
-
4. CI/CD workflows (optional)
|
|
490
|
-
|
|
491
|
-
### 🟢 Low Priority (Month 2+)
|
|
492
|
-
1. Telemetry system
|
|
493
|
-
2. Advanced caching
|
|
494
|
-
3. Multi-language support
|
|
495
|
-
4. Interactive documentation
|
|
496
|
-
|
|
497
|
-
## Summary
|
|
498
|
-
|
|
499
|
-
These optimizations can achieve:
|
|
500
|
-
- **Performance**: ~40% faster installation
|
|
501
|
-
- **Bundle Size**: ~30% reduction
|
|
502
|
-
- **User Experience**: Significant improvements in error handling and progress tracking
|
|
503
|
-
- **Code Quality**: Higher coverage and better maintainability
|
|
504
|
-
- **Security**: Reduced attack surface and better validation
|
|
468
|
+
## Evaluation requirements
|
|
469
|
+
|
|
470
|
+
Proposals need an owner, measured baseline, target platform matrix, compatibility
|
|
471
|
+
analysis, and tests before implementation. Do not claim performance or bundle
|
|
472
|
+
improvements without committed, reproducible benchmark evidence.
|
|
@@ -18,7 +18,10 @@ This repository is **npm-only** for development and CI workflows.
|
|
|
18
18
|
|
|
19
19
|
## Enforcement
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
`npm run check:package-manager` from `packages/cli`, or
|
|
22
|
+
`npm --workspace workspai run check:package-manager` from the monorepo root,
|
|
23
|
+
enforces the policy in package validation and quality workflows. There is no
|
|
24
|
+
install-time `preinstall` guard.
|
|
22
25
|
|
|
23
26
|
## Notes
|
|
24
27
|
|
package/docs/README.md
CHANGED
|
@@ -2,6 +2,29 @@
|
|
|
2
2
|
|
|
3
3
|
Hub for user and contributor documentation. Start with the [main README](../README.md) for install and quickstarts.
|
|
4
4
|
|
|
5
|
+
`workspai` is the canonical package and command; `wspai` is only an optional
|
|
6
|
+
short `npx` alias. Install with `npm install -g workspai`, or run the current
|
|
7
|
+
release with `npx workspai@latest --help`.
|
|
8
|
+
|
|
9
|
+
## Canonical quickstart
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npx workspai adopt /path/to/project --json
|
|
13
|
+
cd ~/.workspai/workspaces/workspai
|
|
14
|
+
npx workspai workspace intelligence run --for-agent codex --strict --json
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
The broader governance/release pipeline is a separate gate:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npx workspai pipeline --json --strict
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Adoption keeps source in place. The runner preserves contract order and writes
|
|
24
|
+
the authoritative `.workspai/reports/workspace-intelligence-run-last-run.json`
|
|
25
|
+
result alongside the model, agent context, report index, and generated
|
|
26
|
+
instructions; see the [Artifact Catalog](./contracts/ARTIFACT_CATALOG.md).
|
|
27
|
+
|
|
5
28
|
## Table of contents
|
|
6
29
|
|
|
7
30
|
- [User documentation](#user-documentation)
|
|
@@ -15,9 +38,11 @@ Hub for user and contributor documentation. Start with the [main README](../READ
|
|
|
15
38
|
|
|
16
39
|
| Document | Description |
|
|
17
40
|
| --- | --- |
|
|
41
|
+
| [creating-workspaces-and-projects.md](./creating-workspaces-and-projects.md) | Plain-language guide to every workspace and project creation scenario |
|
|
18
42
|
| [commands-reference.md](./commands-reference.md) | Full CLI syntax, profiles, and policy keys |
|
|
19
43
|
| [workspace-operations.md](./workspace-operations.md) | Import, adopt, snapshots, archives, contracts, infra |
|
|
20
44
|
| [workspace-run.md](./workspace-run.md) | Polyglot fleet orchestration (`workspace run`) |
|
|
45
|
+
| [workspace-intelligence-runner.md](./workspace-intelligence-runner.md) | Canonical unified runner, execution envelope, report schema, exit codes, failure propagation, and CI consumption |
|
|
21
46
|
| [create-planner-capabilities.md](./create-planner-capabilities.md) | Native create, official, and existing lanes |
|
|
22
47
|
| [../contracts/project-entry-capability.v1.json](../contracts/project-entry-capability.v1.json) | Contract: any readable project can enter through adopt/import when it can be registered |
|
|
23
48
|
| [from-code-to-shared-understanding.md](./from-code-to-shared-understanding.md) | GitHub-rendered Workspace Intelligence diagram |
|
|
@@ -29,10 +54,12 @@ Hub for user and contributor documentation. Start with the [main README](../READ
|
|
|
29
54
|
|
|
30
55
|
**Common tasks**
|
|
31
56
|
|
|
57
|
+
- Create a workspace or project: [creating-workspaces-and-projects.md](./creating-workspaces-and-projects.md)
|
|
32
58
|
- Adopt an existing repo: [workspace-operations.md#import-and-adoption](./workspace-operations.md#import-and-adoption)
|
|
33
59
|
- Scaffold a frontend app: [commands-reference.md](./commands-reference.md) (`create project nextjs <name>`)
|
|
34
|
-
-
|
|
35
|
-
-
|
|
60
|
+
- Canonical intelligence gate: `workspace intelligence run --for-agent codex --strict --json`
|
|
61
|
+
- Broader CI release gate: [commands-reference.md](./commands-reference.md) (`pipeline`, `readiness`)
|
|
62
|
+
- Targeted model/context inspection — schemas in [contracts/workspace-intelligence/](../contracts/workspace-intelligence/)
|
|
36
63
|
|
|
37
64
|
## Operations & security
|
|
38
65
|
|
|
@@ -71,7 +98,7 @@ Regenerate and verify:
|
|
|
71
98
|
```bash
|
|
72
99
|
npm run generate:contracts
|
|
73
100
|
npm run check:generated-contracts
|
|
74
|
-
npm run validate
|
|
101
|
+
npm run contracts:validate
|
|
75
102
|
```
|
|
76
103
|
|
|
77
104
|
## Contributor documentation
|
package/docs/SECURITY.md
CHANGED
|
@@ -2,12 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
## Supported Versions
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
During the `0.x` phase, only the latest minor line receives security fixes.
|
|
5
|
+
During the `0.x` phase, only the latest published minor line receives security
|
|
6
|
+
fixes. Check the [npm package](https://www.npmjs.com/package/workspai) and
|
|
7
|
+
[changelog](../CHANGELOG.md) for the current supported line; older minor lines
|
|
8
|
+
are unsupported.
|
|
11
9
|
|
|
12
10
|
## Known Security Considerations
|
|
13
11
|
|
|
@@ -46,12 +44,21 @@ When using Workspai:
|
|
|
46
44
|
2. **Review generated code**: Always review the workspace structure before deployment
|
|
47
45
|
3. **Use official releases**: Install from npm registry, not from git directly
|
|
48
46
|
4. **Verify package integrity**: Use `npm audit` on your generated project
|
|
47
|
+
5. **Treat executable config as code**: Prefer `workspai.config.json`; only use
|
|
48
|
+
`--trust-config` after reviewing JavaScript configuration.
|
|
49
|
+
6. **Keep remote archives public-network-only**: Private and loopback archive
|
|
50
|
+
URLs are rejected unless `--allow-private-network` is explicitly supplied.
|
|
51
|
+
7. **Constrain mirror targets**: Artifact targets are restricted to the managed
|
|
52
|
+
mirror directory and are committed only after integrity/policy verification.
|
|
49
53
|
|
|
50
54
|
## Security Scanning
|
|
51
55
|
|
|
52
56
|
We use:
|
|
53
57
|
- GitHub Security Advisories
|
|
54
58
|
- npm audit (production dependencies)
|
|
59
|
+
- CodeQL static analysis
|
|
60
|
+
- Pull-request dependency review
|
|
61
|
+
- CycloneDX SBOM generation
|
|
55
62
|
- Dependabot for automated updates
|
|
56
63
|
- Regular manual security reviews
|
|
57
64
|
|
package/docs/SETUP.md
CHANGED
|
@@ -4,6 +4,9 @@ Canonical setup reference for **maintainers** of the Workspai CLI.
|
|
|
4
4
|
|
|
5
5
|
**End users:** start with [../README.md](../README.md), [OPEN_SOURCE_USER_SCENARIOS.md](./OPEN_SOURCE_USER_SCENARIOS.md), and [workspace-operations.md](./workspace-operations.md).
|
|
6
6
|
|
|
7
|
+
Unless noted otherwise, run commands in this guide from `packages/cli`. From the
|
|
8
|
+
monorepo root, use `npm --workspace workspai run <script>`.
|
|
9
|
+
|
|
7
10
|
## Prerequisites
|
|
8
11
|
|
|
9
12
|
- Node.js `>= 20.19.0`
|
|
@@ -19,14 +22,14 @@ npm ci
|
|
|
19
22
|
npm run build
|
|
20
23
|
npm run validate
|
|
21
24
|
npm run validate:docs
|
|
22
|
-
npm run validate
|
|
25
|
+
npm run contracts:validate
|
|
23
26
|
```
|
|
24
27
|
|
|
25
28
|
| Command | Purpose |
|
|
26
29
|
| --- | --- |
|
|
27
30
|
| `validate` | typecheck + lint + format + tests |
|
|
28
31
|
| `validate:docs` | markdown links, drift guard, doc examples, README smoke |
|
|
29
|
-
| `validate
|
|
32
|
+
| `contracts:validate` | generated/shared contracts, parity, runtime conformance, and adversarial gates |
|
|
30
33
|
|
|
31
34
|
See [ci-workflows.md](./ci-workflows.md) for GitHub Actions mapping.
|
|
32
35
|
|
|
@@ -38,7 +41,7 @@ npm run build
|
|
|
38
41
|
node dist/index.js --help
|
|
39
42
|
node dist/index.js --version
|
|
40
43
|
|
|
41
|
-
node dist/index.js create workspace test-ws --yes --profile polyglot
|
|
44
|
+
node dist/index.js create workspace test-ws --here --yes --profile polyglot
|
|
42
45
|
node dist/index.js workspace list
|
|
43
46
|
cd test-ws
|
|
44
47
|
node ../dist/index.js bootstrap --profile polyglot
|
package/docs/UTILITIES.md
CHANGED
|
@@ -36,9 +36,9 @@ await cache.clear();
|
|
|
36
36
|
### Cache Features
|
|
37
37
|
- **Memory cache** for fast access
|
|
38
38
|
- **Disk cache** for persistence
|
|
39
|
-
- **TTL**: 24 hours
|
|
39
|
+
- **TTL**: fixed at 24 hours
|
|
40
40
|
- **Versioning**: Version support
|
|
41
|
-
- **
|
|
41
|
+
- **Lazy cleanup**: Expired disk entries are removed when read
|
|
42
42
|
|
|
43
43
|
## Performance Monitoring
|
|
44
44
|
|
|
@@ -138,18 +138,11 @@ const user = await fetchUserData('123');
|
|
|
138
138
|
// Second time: Reads from cache (fast)
|
|
139
139
|
```
|
|
140
140
|
|
|
141
|
-
##
|
|
141
|
+
## Debugging
|
|
142
142
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
# Enable performance logging
|
|
148
|
-
DEBUG=rapidkit:perf npm run dev
|
|
149
|
-
|
|
150
|
-
# Enable all
|
|
151
|
-
DEBUG=rapidkit:* npm run dev
|
|
152
|
-
```
|
|
143
|
+
These utilities do not implement `DEBUG=rapidkit:*` namespace handling. Use the
|
|
144
|
+
CLI's supported `--debug` flag where available, or enable `logger.setDebug(true)`
|
|
145
|
+
in a focused maintainer harness.
|
|
153
146
|
|
|
154
147
|
## Testing
|
|
155
148
|
|
|
@@ -211,11 +204,6 @@ chmod 700 "$HOME/.workspai/cache"
|
|
|
211
204
|
```
|
|
212
205
|
|
|
213
206
|
### Incorrect performance metrics
|
|
214
|
-
```bash
|
|
215
|
-
# Make sure you're in debug mode
|
|
216
|
-
export DEBUG=rapidkit:perf
|
|
217
|
-
npm run dev
|
|
218
207
|
|
|
219
|
-
|
|
220
|
-
node --expose-gc --max-old-space-size=4096 dist/index.js
|
|
221
|
-
```
|
|
208
|
+
Verify that each timer is started and ended exactly once. For focused memory
|
|
209
|
+
diagnostics, run `node --expose-gc --max-old-space-size=4096 dist/index.js`.
|
|
@@ -12,7 +12,7 @@ The `.workspai-workspace` file is the canonical marker that identifies a Workspa
|
|
|
12
12
|
{
|
|
13
13
|
"signature": "RAPIDKIT_WORKSPACE",
|
|
14
14
|
"createdBy": "workspai-cli",
|
|
15
|
-
"version": "
|
|
15
|
+
"version": "<workspai-version>",
|
|
16
16
|
"createdAt": "2026-02-01T12:23:31.993Z",
|
|
17
17
|
"name": "workspace-name",
|
|
18
18
|
"metadata": { ... }
|
|
@@ -36,20 +36,22 @@ The metadata layer allows each tool to store its own information without conflic
|
|
|
36
36
|
{
|
|
37
37
|
"metadata": {
|
|
38
38
|
"vscode": {
|
|
39
|
-
"extensionVersion": "
|
|
39
|
+
"extensionVersion": "<extension-version>",
|
|
40
40
|
"createdViaExtension": true,
|
|
41
41
|
"lastOpenedAt": "2026-02-01T14:30:00.000Z",
|
|
42
42
|
"openCount": 5
|
|
43
43
|
},
|
|
44
44
|
"npm": {
|
|
45
|
-
"packageVersion": "
|
|
45
|
+
"packageVersion": "<workspai-version>",
|
|
46
46
|
"installMethod": "poetry",
|
|
47
47
|
"lastUsedAt": "2026-02-01T12:23:31.993Z"
|
|
48
48
|
},
|
|
49
49
|
"python": {
|
|
50
|
-
"coreVersion": "
|
|
50
|
+
"coreVersion": "<rapidkit-core-version>",
|
|
51
51
|
"pythonVersion": "3.10",
|
|
52
|
-
"venvPath": ".venv"
|
|
52
|
+
"venvPath": ".venv",
|
|
53
|
+
"coreStatus": "installed",
|
|
54
|
+
"coreReason": "workspace profile requires Python Core"
|
|
53
55
|
},
|
|
54
56
|
"custom": {
|
|
55
57
|
"myTool": "data"
|
|
@@ -82,6 +84,8 @@ The metadata layer allows each tool to store its own information without conflic
|
|
|
82
84
|
| `coreVersion` | `string` | RapidKit Core version |
|
|
83
85
|
| `pythonVersion` | `string` | Python version used |
|
|
84
86
|
| `venvPath` | `string` | Virtual environment path (relative) |
|
|
87
|
+
| `coreStatus` | `"installed" \| "skipped"` | Whether the optional Python engine is installed |
|
|
88
|
+
| `coreReason` | `string` | Reason for the current engine state |
|
|
85
89
|
|
|
86
90
|
## Usage Guidelines
|
|
87
91
|
|
|
@@ -91,7 +95,7 @@ The metadata layer allows each tool to store its own information without conflic
|
|
|
91
95
|
```typescript
|
|
92
96
|
import { createNpmWorkspaceMarker, writeWorkspaceMarker } from './workspace-marker';
|
|
93
97
|
|
|
94
|
-
const marker = createNpmWorkspaceMarker('my-workspace', '
|
|
98
|
+
const marker = createNpmWorkspaceMarker('my-workspace', '<workspai-version>', 'poetry');
|
|
95
99
|
await writeWorkspaceMarker('/path/to/workspace', marker);
|
|
96
100
|
```
|
|
97
101
|
|
|
@@ -100,7 +104,7 @@ await writeWorkspaceMarker('/path/to/workspace', marker);
|
|
|
100
104
|
// Let npm create the marker, then add VS Code metadata
|
|
101
105
|
await updateWorkspaceMetadata(workspacePath, {
|
|
102
106
|
vscode: {
|
|
103
|
-
extensionVersion: '
|
|
107
|
+
extensionVersion: '<extension-version>',
|
|
104
108
|
createdViaExtension: true,
|
|
105
109
|
lastOpenedAt: new Date().toISOString(),
|
|
106
110
|
openCount: 1,
|
|
@@ -127,18 +131,21 @@ if (marker) {
|
|
|
127
131
|
|
|
128
132
|
### Updating Metadata
|
|
129
133
|
|
|
130
|
-
|
|
134
|
+
Prefer `updateWorkspaceMetadata()` for nested metadata updates. The marker writer
|
|
135
|
+
preserves existing top-level metadata namespaces, but can replace core fields or
|
|
136
|
+
an individual nested namespace value; it is not a deep-merge API.
|
|
131
137
|
|
|
132
138
|
```typescript
|
|
133
139
|
// ✅ Correct - preserves other metadata
|
|
134
140
|
await updateWorkspaceMetadata(workspacePath, {
|
|
135
141
|
vscode: {
|
|
136
|
-
extensionVersion: '
|
|
142
|
+
extensionVersion: '<extension-version>',
|
|
143
|
+
createdViaExtension: false,
|
|
137
144
|
lastOpenedAt: new Date().toISOString(),
|
|
138
145
|
},
|
|
139
146
|
});
|
|
140
147
|
|
|
141
|
-
//
|
|
148
|
+
// Use direct writes only when intentionally replacing core marker fields.
|
|
142
149
|
await writeWorkspaceMarker(workspacePath, newMarker);
|
|
143
150
|
```
|
|
144
151
|
|
|
@@ -172,10 +179,10 @@ Old format (Extension-specific):
|
|
|
172
179
|
{
|
|
173
180
|
"signature": "RAPIDKIT_WORKSPACE",
|
|
174
181
|
"createdBy": "rapidkit-vscode",
|
|
175
|
-
"version": "
|
|
182
|
+
"version": "<legacy-tool-version>",
|
|
176
183
|
"createdAt": "2026-02-01T12:24:21.830Z",
|
|
177
184
|
"name": "alef",
|
|
178
|
-
"vscodeVersion": "
|
|
185
|
+
"vscodeVersion": "<legacy-extension-version>",
|
|
179
186
|
"originalCreatedBy": "rapidkit-npm"
|
|
180
187
|
}
|
|
181
188
|
```
|
|
@@ -185,12 +192,12 @@ New format (standardized):
|
|
|
185
192
|
{
|
|
186
193
|
"signature": "RAPIDKIT_WORKSPACE",
|
|
187
194
|
"createdBy": "workspai-cli",
|
|
188
|
-
"version": "
|
|
195
|
+
"version": "<workspai-version>",
|
|
189
196
|
"createdAt": "2026-02-01T12:24:21.830Z",
|
|
190
197
|
"name": "alef",
|
|
191
198
|
"metadata": {
|
|
192
199
|
"vscode": {
|
|
193
|
-
"extensionVersion": "
|
|
200
|
+
"extensionVersion": "<extension-version>",
|
|
194
201
|
"createdViaExtension": true,
|
|
195
202
|
"lastOpenedAt": "2026-02-01T12:24:21.830Z",
|
|
196
203
|
"openCount": 1
|
|
@@ -222,16 +229,16 @@ Result:
|
|
|
222
229
|
{
|
|
223
230
|
"signature": "RAPIDKIT_WORKSPACE",
|
|
224
231
|
"createdBy": "workspai-cli",
|
|
225
|
-
"version": "
|
|
232
|
+
"version": "<workspai-version>",
|
|
226
233
|
"createdAt": "2026-02-01T10:00:00.000Z",
|
|
227
234
|
"name": "my-workspace",
|
|
228
235
|
"metadata": {
|
|
229
236
|
"npm": {
|
|
230
|
-
"packageVersion": "
|
|
237
|
+
"packageVersion": "<workspai-version>",
|
|
231
238
|
"installMethod": "poetry"
|
|
232
239
|
},
|
|
233
240
|
"vscode": {
|
|
234
|
-
"extensionVersion": "
|
|
241
|
+
"extensionVersion": "<extension-version>",
|
|
235
242
|
"createdViaExtension": false,
|
|
236
243
|
"lastOpenedAt": "2026-02-01T11:00:00.000Z",
|
|
237
244
|
"openCount": 1
|
|
@@ -253,16 +260,16 @@ Result:
|
|
|
253
260
|
{
|
|
254
261
|
"signature": "RAPIDKIT_WORKSPACE",
|
|
255
262
|
"createdBy": "workspai-cli",
|
|
256
|
-
"version": "
|
|
263
|
+
"version": "<workspai-version>",
|
|
257
264
|
"createdAt": "2026-02-01T10:00:00.000Z",
|
|
258
265
|
"name": "my-workspace",
|
|
259
266
|
"metadata": {
|
|
260
267
|
"npm": {
|
|
261
|
-
"packageVersion": "
|
|
268
|
+
"packageVersion": "<workspai-version>",
|
|
262
269
|
"installMethod": "poetry"
|
|
263
270
|
},
|
|
264
271
|
"vscode": {
|
|
265
|
-
"extensionVersion": "
|
|
272
|
+
"extensionVersion": "<extension-version>",
|
|
266
273
|
"createdViaExtension": true,
|
|
267
274
|
"lastOpenedAt": "2026-02-01T10:00:00.000Z",
|
|
268
275
|
"openCount": 1
|
package/docs/ci-workflows.md
CHANGED
|
@@ -12,6 +12,13 @@ Map of GitHub Actions workflows in this repository. Use this when editing CI to
|
|
|
12
12
|
| E2E smoke | `.github/workflows/e2e-smoke.yml` | Focused bridge regression smoke |
|
|
13
13
|
| Frontend generator smoke | `.github/workflows/frontend-generator-smoke.yml` | Official frontend generator drift gate |
|
|
14
14
|
| Security | `.github/workflows/security.yml` | Security scanning and policy checks |
|
|
15
|
+
| Manual npm release | `.github/workflows/release-npm-manual.yml` | Maintainer-only release gate and publish workflow |
|
|
16
|
+
| Contributor onboarding | `.github/workflows/contributor-onboarding.yml` | Accepted-contributor onboarding automation |
|
|
17
|
+
| Welcome | `.github/workflows/welcome.yml` | First-issue and first-contribution messages |
|
|
18
|
+
|
|
19
|
+
The release workflow requires `Frontend Generator Smoke` for the exact release
|
|
20
|
+
SHA. Maintainers must dispatch that workflow against the intended release ref
|
|
21
|
+
before starting a manual npm release if no matching run exists.
|
|
15
22
|
|
|
16
23
|
## Consumer workspace: agent grounding CI
|
|
17
24
|
|
|
@@ -22,13 +29,20 @@ For Workspai **consumer workspaces** (not this CLI repo), use the copy-paste tem
|
|
|
22
29
|
Minimal job:
|
|
23
30
|
|
|
24
31
|
```yaml
|
|
25
|
-
- run: npx workspai
|
|
26
|
-
- run: npx workspai
|
|
32
|
+
- run: npx workspai workspace intelligence run --for-agent codex --strict --json
|
|
33
|
+
- run: npx workspai pipeline --json --strict --no-agent-sync
|
|
27
34
|
- run: node ./node_modules/workspai/scripts/check-agent-customization-drift.mjs --workspace .
|
|
28
35
|
```
|
|
29
36
|
|
|
30
|
-
|
|
31
|
-
|
|
37
|
+
The canonical runner owns ordered evidence and agent grounding. The separate
|
|
38
|
+
pipeline uses `--no-agent-sync` so it cannot rewrite those surfaces afterward.
|
|
39
|
+
Run the drift check last so CI fails when generated customization files are stale.
|
|
40
|
+
Runner exit `1` is a hard execution failure; exit `2` is a completed but
|
|
41
|
+
evidence-blocked run and must also block release. When evidence must be uploaded
|
|
42
|
+
after either outcome, follow the `continue-on-error` plus final-failure pattern
|
|
43
|
+
in the template. See
|
|
44
|
+
[Unified Workspace Intelligence Runner](./workspace-intelligence-runner.md) for
|
|
45
|
+
the exact preflight, 11-stage, artifact, and exit contract.
|
|
32
46
|
|
|
33
47
|
## Local validation scripts
|
|
34
48
|
|
|
@@ -48,7 +62,7 @@ Run the drift check after `agent-sync --write` so CI fails when generated agent
|
|
|
48
62
|
npm run validate
|
|
49
63
|
npm run validate:docs
|
|
50
64
|
npm run security
|
|
51
|
-
npm run
|
|
65
|
+
npm run contracts:validate
|
|
52
66
|
npm run test:runtime-matrix:full
|
|
53
67
|
```
|
|
54
68
|
|