workspai 0.55.1 → 0.57.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 +36 -8
- package/contracts/adopt-effects.v1.json +72 -0
- package/contracts/artifact-remediation-plan.v1.json +110 -2
- package/contracts/cli-runtime-command-inventory.v1.snapshot.json +33 -1
- package/contracts/doctor-project-evidence.v1.json +95 -2
- package/contracts/doctor-remediation-plan.v1.json +29 -2
- package/contracts/doctor-workspace-evidence.v1.json +97 -2
- package/contracts/extension-cli-compatibility.v1.json +7 -1
- package/contracts/published-contract-catalog.v1.json +30 -0
- package/contracts/runtime-command-surface.v1.json +63 -0
- package/contracts/workspace-intelligence/doctor-capabilities.v1.json +133 -0
- package/contracts/workspace-intelligence/doctor-diagnosis.v1.json +273 -0
- package/contracts/workspace-intelligence/doctor-graph-diagnosis.v1.json +3 -0
- package/contracts/workspace-intelligence/doctor-receipt.v1.json +136 -0
- package/contracts/workspace-intelligence/doctor-summary.v1.json +101 -0
- package/contracts/workspace-intelligence/doctor-validation.v1.json +109 -0
- package/contracts/workspace-intelligence/project-context-agent.v1.json +110 -0
- package/contracts/workspace-intelligence/studio-blocker-handoff.v1.json +25 -0
- package/contracts/workspace-intelligence/workspace-knowledge-graph.v1.json +36 -0
- package/contracts/workspace-intelligence/workspace-knowledge-search.v1.json +54 -0
- package/dist/analyze-HJ774J3E.js +1 -0
- package/dist/{artifact-remediation-plan-O3YIULQN.js → artifact-remediation-plan-BPLON5VX.js} +1 -1
- package/dist/autopilot-release-WIFFFQKW.js +1 -0
- package/dist/capabilities-command-44JVOE5S.js +1 -0
- package/dist/chunk-2647BYBC.js +1 -0
- package/dist/chunk-3U4VLIGW.js +1 -0
- package/dist/chunk-5EPPPMAS.js +1 -0
- package/dist/{chunk-AMB42V2F.js → chunk-64JUYYRC.js} +1 -1
- package/dist/chunk-6OFGLNFS.js +1 -0
- package/dist/chunk-75HOCFNH.js +1 -0
- package/dist/{chunk-M5ICGR55.js → chunk-7WUT5ZSO.js} +1 -1
- package/dist/chunk-AA4PNQKR.js +1 -0
- package/dist/{chunk-WIO6L24E.js → chunk-ADL3CK44.js} +1 -1
- package/dist/chunk-AO2ZI42U.js +4 -0
- package/dist/chunk-CNWUIXF3.js +1 -0
- package/dist/chunk-D4RST2HE.js +1 -0
- package/dist/chunk-DF4NWPB7.js +8 -0
- package/dist/chunk-DT4X7I5M.js +81 -0
- package/dist/{chunk-HY3RMPW5.js → chunk-E53BGUOW.js} +1 -1
- package/dist/chunk-GBMCHFOV.js +1 -0
- package/dist/chunk-GDKFN3CM.js +8 -0
- package/dist/chunk-GTJY55QK.js +5 -0
- package/dist/chunk-GXTCU4WF.js +1 -0
- package/dist/{chunk-WSAFBPS5.js → chunk-IUYZ3NHS.js} +4 -4
- package/dist/chunk-IXOLHPTN.js +6 -0
- package/dist/chunk-IZLEMTES.js +1 -0
- package/dist/chunk-L36ZASME.js +1 -0
- package/dist/chunk-LYVDRRDO.js +2 -0
- package/dist/chunk-N2BIIUDH.js +4 -0
- package/dist/{chunk-IBPPMOHM.js → chunk-NHTLE3WN.js} +1 -1
- package/dist/chunk-NS53IPAC.js +1 -0
- package/dist/{chunk-NWQ5VWUW.js → chunk-P475BOJW.js} +1 -1
- package/dist/chunk-PKIRVQLG.js +1 -0
- package/dist/chunk-QHY6F4SS.js +2 -0
- package/dist/chunk-QK5QOXOE.js +13 -0
- package/dist/chunk-RPHM7LQW.js +36 -0
- package/dist/chunk-SNO3WG4V.js +2 -0
- package/dist/chunk-T5YRFRJV.js +1 -0
- package/dist/chunk-TTFQWH55.js +91 -0
- package/dist/chunk-UQEQ6CXU.js +1 -0
- package/dist/chunk-V5EYVQ63.js +1 -0
- package/dist/{chunk-HUPLAFZQ.js → chunk-VL3APTVB.js} +1 -1
- package/dist/chunk-VUR7H2FU.js +2 -0
- package/dist/chunk-VZPWIILU.js +1 -0
- package/dist/{chunk-MRFN5ZQP.js → chunk-W5ZFXKSL.js} +1 -1
- package/dist/chunk-WP3CXMVA.js +2 -0
- package/dist/chunk-X7FYEKLI.js +1 -0
- package/dist/{chunk-KFKZOPZC.js → chunk-XMTLKDPP.js} +1 -1
- package/dist/chunk-YJTEMJFV.js +3 -0
- package/dist/chunk-YM77FQB3.js +8 -0
- package/dist/{chunk-FZCYTRBQ.js → chunk-Z57G62KE.js} +1 -1
- package/dist/chunk-ZCPT6KC3.js +6 -0
- package/dist/chunk-ZPA6ECBJ.js +7 -0
- package/dist/{create-3NSOY7CA.js → create-O2KLTN5H.js} +1 -1
- package/dist/doctor-AL5YWO5X.js +1 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +169 -167
- package/dist/pipeline-4ST4BQWY.js +5 -0
- package/dist/{project-intelligence-lens-ZOAWXYC5.js → project-intelligence-lens-JHYECYOK.js} +1 -1
- package/dist/project-test-coverage-FRMVYTFB.js +1 -0
- package/dist/verified-goal-KFNRGOKT.js +1 -0
- package/dist/{workspace-C4UETGY7.js → workspace-O4E5CCGK.js} +1 -1
- package/dist/{workspace-agent-sync-446AXPHJ.js → workspace-agent-sync-N5DPGU2E.js} +1 -1
- package/dist/{workspace-archive-VHUPOBAV.js → workspace-archive-BA3ONVXX.js} +1 -1
- package/dist/{workspace-context-XSECHC7O.js → workspace-context-ETZNEHOJ.js} +1 -1
- package/dist/workspace-contract-OSI7NBXS.js +1 -0
- package/dist/workspace-explain-EM7IUV6L.js +1 -0
- package/dist/workspace-explain-contract-KVQO57RC.js +1 -0
- package/dist/{workspace-feedback-WXE7NVMV.js → workspace-feedback-PCZKXG5R.js} +1 -1
- package/dist/{workspace-foundation-3EVAQ5X6.js → workspace-foundation-QQHX66KE.js} +1 -1
- package/dist/{workspace-graph-stream-AJPS45FD.js → workspace-graph-stream-UZJQ75XZ.js} +1 -1
- package/dist/workspace-graph-token-efficiency-TF23UYEF.js +1 -0
- package/dist/{workspace-history-YY7YRDOH.js → workspace-history-CHJOABME.js} +1 -1
- package/dist/{workspace-intelligence-FWRB47EJ.js → workspace-intelligence-A7O7MN6T.js} +1 -1
- package/dist/workspace-intelligence-evaluation-YMY3C5AW.js +1 -0
- package/dist/{workspace-intelligence-runner-SMEAB4CO.js → workspace-intelligence-runner-4EF66L66.js} +1 -1
- package/dist/workspace-intelligence-runtime-registry-NCVHKCMP.js +1 -0
- package/dist/workspace-knowledge-graph-BVN4NTJ6.js +1 -0
- package/dist/{workspace-knowledge-graph-query-EKHIE3E2.js → workspace-knowledge-graph-query-6DAOXGGT.js} +1 -1
- package/dist/workspace-knowledge-graph-snapshot-XSQADCNR.js +1 -0
- package/dist/workspace-mcp-serve-TKX4J3SX.js +3 -0
- package/dist/{workspace-model-MNJOGBPP.js → workspace-model-7ESEP366.js} +1 -1
- package/dist/{workspace-onboarding-5KO7Z7AD.js → workspace-onboarding-SY255V7L.js} +1 -1
- package/dist/{workspace-readme-4S6PJ74A.js → workspace-readme-IVJXSIBS.js} +1 -1
- package/dist/{workspace-registry-summary-GPJEL7K7.js → workspace-registry-summary-7ISKYEPM.js} +1 -1
- package/dist/workspace-repair-engine-GMA2YTCF.js +3 -0
- package/dist/workspace-run-ZZXVNFUS.js +1 -0
- package/dist/{workspace-verify-C6HWHRLJ.js → workspace-verify-CNXZPWS5.js} +1 -1
- package/dist/{workspace-watch-DLPHLF5R.js → workspace-watch-HGFL2EU3.js} +1 -1
- package/docs/From Code to Shared Understanding-B.png +0 -0
- package/docs/From Code to Shared Understanding.png +0 -0
- package/docs/README_CONTENT_CONTRACT.md +25 -12
- package/docs/ci-workflows.md +9 -1
- package/docs/commands-reference.md +36 -7
- package/docs/contracts/ARTIFACT_CATALOG.md +6 -1
- package/docs/contracts/README.md +21 -12
- package/docs/doctor-command.md +189 -14
- package/docs/from-code-to-shared-understanding.md +22 -17
- package/docs/graph-benchmark-methodology.md +13 -0
- package/docs/real-world-qualification.md +73 -0
- package/docs/workspace-intelligence-runner.md +4 -0
- package/docs/workspace-knowledge-graph.md +77 -7
- package/docs/workspace-operations.md +14 -2
- package/docs/workspace-run.md +30 -7
- package/package.json +14 -3
- package/dist/analyze-AAZEJ4FC.js +0 -1
- package/dist/autopilot-release-3H5FTF6H.js +0 -1
- package/dist/chunk-2PY65U6X.js +0 -5
- package/dist/chunk-3DONU3DU.js +0 -1
- package/dist/chunk-44VJHNZB.js +0 -1
- package/dist/chunk-5XDPQ3CB.js +0 -1
- package/dist/chunk-6HJJHEL6.js +0 -2
- package/dist/chunk-7AR5PDLD.js +0 -1
- package/dist/chunk-7KKP7RNB.js +0 -3
- package/dist/chunk-7S4QNH5A.js +0 -5
- package/dist/chunk-7T4TSV5C.js +0 -1
- package/dist/chunk-BYVTHIC3.js +0 -2
- package/dist/chunk-CEIJIFY7.js +0 -88
- package/dist/chunk-D37NEYV6.js +0 -1
- package/dist/chunk-DPMO4U3Z.js +0 -8
- package/dist/chunk-DS4UYMLX.js +0 -1
- package/dist/chunk-FQLB4BIC.js +0 -7
- package/dist/chunk-GDU7VP6G.js +0 -1
- package/dist/chunk-H7P7SSUW.js +0 -75
- package/dist/chunk-KVUYAYTY.js +0 -8
- package/dist/chunk-MQ73VS4E.js +0 -2
- package/dist/chunk-NYHVCFBT.js +0 -1
- package/dist/chunk-OUBBBC7T.js +0 -36
- package/dist/chunk-P7K5RHJC.js +0 -2
- package/dist/chunk-PS5F4DCT.js +0 -1
- package/dist/chunk-QZ7PNMVP.js +0 -1
- package/dist/chunk-RA24WQLF.js +0 -1
- package/dist/chunk-RMXXK64P.js +0 -4
- package/dist/chunk-S7Z4DP3P.js +0 -2
- package/dist/chunk-SJLUE6AY.js +0 -1
- package/dist/chunk-TEHQ7XKK.js +0 -3
- package/dist/chunk-UFOCUHG3.js +0 -1
- package/dist/chunk-WD2XDMGB.js +0 -1
- package/dist/chunk-XVRJVKOX.js +0 -1
- package/dist/chunk-YTLUT6IA.js +0 -13
- package/dist/doctor-UEFFNAUD.js +0 -1
- package/dist/pipeline-B5S6P36F.js +0 -5
- package/dist/project-test-coverage-44ZPCOPV.js +0 -1
- package/dist/verified-goal-KOU3WJYN.js +0 -1
- package/dist/workspace-contract-AYFTZIKM.js +0 -1
- package/dist/workspace-explain-ZEWVKDBF.js +0 -1
- package/dist/workspace-explain-contract-6CCC26QT.js +0 -1
- package/dist/workspace-graph-token-efficiency-5FNH4JZ5.js +0 -1
- package/dist/workspace-intelligence-evaluation-UP2K3L35.js +0 -1
- package/dist/workspace-intelligence-runtime-registry-MRSF7RTT.js +0 -1
- package/dist/workspace-knowledge-graph-BMMM2FUE.js +0 -1
- package/dist/workspace-mcp-serve-X6C3AWTA.js +0 -3
- package/dist/workspace-repair-engine-GWTXVVKB.js +0 -3
- package/dist/workspace-run-FJTBX4JQ.js +0 -1
|
@@ -18,21 +18,23 @@ versioned contracts and focused guides.
|
|
|
18
18
|
|
|
19
19
|
The root README keeps this order:
|
|
20
20
|
|
|
21
|
-
1. product
|
|
22
|
-
2.
|
|
23
|
-
3.
|
|
24
|
-
4.
|
|
25
|
-
5.
|
|
26
|
-
6.
|
|
21
|
+
1. a problem-first product promise, slogan, and copyable first run;
|
|
22
|
+
2. product category and three durable outcomes;
|
|
23
|
+
3. one copyable path for existing software and one guided path for new software;
|
|
24
|
+
4. a short outcome-oriented view of what Workspai provides;
|
|
25
|
+
5. the canonical Model → derived Graph boundary and intelligence chain;
|
|
26
|
+
6. consumer surfaces and goal-based documentation links;
|
|
27
|
+
7. package, contributor, community, and license routes.
|
|
27
28
|
|
|
28
29
|
The CLI README keeps this order:
|
|
29
30
|
|
|
30
|
-
1. product
|
|
31
|
-
2.
|
|
32
|
-
3.
|
|
33
|
-
4. the
|
|
34
|
-
5.
|
|
35
|
-
6.
|
|
31
|
+
1. a problem-first product promise, slogan, and copyable first run;
|
|
32
|
+
2. product category and durable value;
|
|
33
|
+
3. a two-minute existing-project path and the guided create path;
|
|
34
|
+
4. the small set of durable outputs a user should recognize;
|
|
35
|
+
5. the canonical Model → derived Graph boundary and intelligence chain;
|
|
36
|
+
6. everyday workflows grouped by goal;
|
|
37
|
+
7. outputs, requirements, documentation, troubleshooting, and contribution.
|
|
36
38
|
|
|
37
39
|
## What does not belong in a main README
|
|
38
40
|
|
|
@@ -110,6 +112,17 @@ task-success claim.
|
|
|
110
112
|
- Link to deeper guidance instead of duplicating it.
|
|
111
113
|
- Do not add a README section for every feature or release.
|
|
112
114
|
|
|
115
|
+
## Media policy
|
|
116
|
+
|
|
117
|
+
- Keep videos outside the npm package tarball; use a stable website, CDN, or
|
|
118
|
+
GitHub Release asset.
|
|
119
|
+
- npm READMEs may use a lightweight poster or a bounded, silent GIF instead of
|
|
120
|
+
relying on an embedded video player. Link to the hosted MP4 when full
|
|
121
|
+
resolution or audio matters.
|
|
122
|
+
- Keep the poster or first GIF frame meaningful without playback and give it
|
|
123
|
+
useful alternative text.
|
|
124
|
+
- Do not commit generated social-video masters under `packages/cli/docs/`.
|
|
125
|
+
|
|
113
126
|
## Validation
|
|
114
127
|
|
|
115
128
|
Run from `packages/cli`:
|
package/docs/ci-workflows.md
CHANGED
|
@@ -46,7 +46,7 @@ Validate or preview the current CLI announcement locally:
|
|
|
46
46
|
npm --workspace workspai run check:release-announcement
|
|
47
47
|
npm --workspace workspai run release:announcement -- \
|
|
48
48
|
--product workspai-cli \
|
|
49
|
-
--tag v0.
|
|
49
|
+
--tag v0.57.0 \
|
|
50
50
|
--markdown-output /tmp/workspai-discord-announcement.md
|
|
51
51
|
```
|
|
52
52
|
|
|
@@ -93,6 +93,14 @@ the exact preflight, 11-stage, artifact, and exit contract.
|
|
|
93
93
|
| Docs drift guard | `npm run check:docs-drift` |
|
|
94
94
|
| README command smoke | `npm run smoke:readme` |
|
|
95
95
|
| Agent customization drift | `npm run check:agent-customization-drift -- --workspace <workspace-root>` |
|
|
96
|
+
| Cross-platform lockfile | `npm run check:cross-platform-lockfile` |
|
|
97
|
+
|
|
98
|
+
The root `postinstall` lifecycle runs the lockfile check before build or test
|
|
99
|
+
jobs can start. This prevents a lockfile regenerated from a platform-pruned
|
|
100
|
+
`node_modules` tree from reaching native Vitest/Rolldown startup on another
|
|
101
|
+
operating system. Restore an accidentally deleted lockfile from Git; perform a
|
|
102
|
+
deliberate full regeneration only with both the lockfile and `node_modules`
|
|
103
|
+
absent.
|
|
96
104
|
|
|
97
105
|
## Recommended pre-release checks
|
|
98
106
|
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
# Commands Reference
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Human-readable CLI syntax for the Workspai CLI. The machine-complete command,
|
|
4
|
+
argument, option, alias, ownership, and integrity inventory is available through
|
|
5
|
+
`workspai commands --json` and
|
|
6
|
+
[`runtime-command-surface.v1.json`](../contracts/runtime-command-surface.v1.json).
|
|
7
|
+
For behavior and workflows, see
|
|
8
|
+
[workspace-operations.md](./workspace-operations.md) and
|
|
9
|
+
[OPEN_SOURCE_USER_SCENARIOS.md](./OPEN_SOURCE_USER_SCENARIOS.md).
|
|
4
10
|
|
|
5
11
|
## Workspace lifecycle
|
|
6
12
|
|
|
@@ -44,6 +50,7 @@ profile.
|
|
|
44
50
|
|
|
45
51
|
```bash
|
|
46
52
|
npx workspai workspace sync [--json]
|
|
53
|
+
npx workspai workspace registry [--json]
|
|
47
54
|
npx workspai workspace policy show
|
|
48
55
|
npx workspai workspace policy set <key> <value>
|
|
49
56
|
npx workspai doctor
|
|
@@ -56,7 +63,7 @@ npx workspai workspace share [--output <file>] [--include-paths] [--no-doctor]
|
|
|
56
63
|
npx workspai workspace contract init [--force] [--json]
|
|
57
64
|
npx workspai workspace contract inspect [--json]
|
|
58
65
|
npx workspai workspace contract verify [--strict] [--json]
|
|
59
|
-
npx workspai workspace contract graph [--json]
|
|
66
|
+
npx workspai workspace contract graph [--output <graph.json>] [--json]
|
|
60
67
|
npx workspai workspace intelligence run [--workspace <path>] [--for-agent <agent>] [--strict] [--json]
|
|
61
68
|
npx workspai workspace goal plan <release-readiness|dependency-security|test-coverage> [--scope project:<name>] [--target <0-100>] [--allow-breaking] [--allow-force] [--no-build] [--no-tests] [--json]
|
|
62
69
|
npx workspai workspace goal status <goal-id> [--json]
|
|
@@ -70,10 +77,11 @@ npx workspai workspace snapshot [--workspace <path>] [--json] [--include-paths]
|
|
|
70
77
|
npx workspai workspace diff --from <snapshot-or-model|git[:ref]> [--workspace <path>] [--json] [--include-paths] [--include-evidence] [--scan-depth <count>] [--strict]
|
|
71
78
|
npx workspai workspace impact --from <workspace-diff-report> [--workspace <path>] [--scope project:<name>] [--json] [--include-paths] [--include-evidence] [--scan-depth <count>] [--strict]
|
|
72
79
|
npx workspai workspace verify [--from-impact <file>] [--workspace <path>] [--scope project:<name>] [--strict] [--json] [--include-paths] [--include-evidence] [--scan-depth <count>]
|
|
73
|
-
npx workspai workspace graph [emit|explain|search|benchmark|entities|evidence|path|overlay|dot|mermaid|jsonld|graphml|gexf] [key] [value] [--from <graph.json>] [--output <file>] [--limit <1..100>] [--workspace <path>] [--scope project:<name>] [--json] [--include-paths] [--include-evidence] [--scan-depth <count>]
|
|
80
|
+
npx workspai workspace graph [emit|explain|search|benchmark|entities|evidence|path|overlay|dot|mermaid|jsonld|graphml|gexf] [key] [value] [--from <graph.json>] [--output <file>] [--limit <1..100>] [--workspace <path>] [--scope project:<name>] [--refresh-graph] [--json] [--include-paths] [--include-evidence] [--scan-depth <count>]
|
|
74
81
|
npx workspai workspace eval [init <task> [strategy]|record|status|report|compare --from <report>] [--workspace <path>] [--output <file>] [--json]
|
|
75
82
|
npx workspai workspace watch [--workspace <path>] [--json] [--graph-stream] [--once] [--scan-depth <count>]
|
|
76
|
-
npx workspai workspace explain
|
|
83
|
+
npx workspai workspace explain <target> [--workspace <path>] [--json] [--write]
|
|
84
|
+
npx workspai workspace why <target> [--workspace <path>] [--json] [--write]
|
|
77
85
|
npx workspai workspace trace --from <workspace-diff-report> [--workspace <path>] [--json] [--write]
|
|
78
86
|
printf '%s\n' '{"actionId":"fix-api","summary":"API tests passed","outcome":"ok"}' | npx workspai workspace feedback record [--workspace <path>] --json
|
|
79
87
|
npx workspai workspace mcp serve [--workspace <path>] [--json]
|
|
@@ -96,7 +104,7 @@ npx workspai project restore <archive> [--name <project-name>] [--force] [--dry-
|
|
|
96
104
|
npx workspai project delete <name> [--permanent --confirm <name>] [--dry-run] [--json]
|
|
97
105
|
npx workspai project workspace [status|relink] [--workspace <path>] [--project <path>] [--json]
|
|
98
106
|
npx workspai workspace init
|
|
99
|
-
npx workspai workspace run <init|test|build|start|custom-stage> [--workspace <path>] [--scope project:<name>] [--affected] [--blast-radius] [--since <ref>] [--parallel] [--max-workers <n>] [--continue-on-error] [--reuse-passed] [--strict] [--no-gates] [--json]
|
|
107
|
+
npx workspai workspace run <init|test|build|start|custom-stage> [--workspace <path>] [--scope project:<name>] [--plan] [--runtime <runtime>] [--affected] [--blast-radius] [--since <ref>] [--parallel] [--max-workers <n>] [--continue-on-error] [--reuse-passed] [--strict] [--no-gates] [--json]
|
|
100
108
|
npx workspai infra plan [--workspace <path>] [--json] [--dry-run] [--verbose]
|
|
101
109
|
npx workspai infra up [--workspace <path>] [--no-plan] [--build]
|
|
102
110
|
npx workspai infra down [--workspace <path>] [--volumes]
|
|
@@ -183,6 +191,15 @@ that retrieval payload with the readable proof-indexed corpus using a labelled
|
|
|
183
191
|
`characters / 4` estimate. It measures payload reduction only; it does not
|
|
184
192
|
assert equivalent answer quality or model-specific billing savings.
|
|
185
193
|
|
|
194
|
+
Add `--scope project:<name>` to retrieve project-owned facts plus
|
|
195
|
+
workspace-level shared entities proven to be connected to that project. The
|
|
196
|
+
agent projection reports explicit omission budgets for relations, related
|
|
197
|
+
entities, proofs, aliases, attributes, and proof references. Read-oriented
|
|
198
|
+
`search`, `entities`, `evidence`, `path`, and `benchmark` modes reuse the
|
|
199
|
+
persisted graph only when its model binding, proofs, project scopes, and live
|
|
200
|
+
Git/Merkle input fingerprint still match. `--refresh-graph` bypasses that
|
|
201
|
+
compatible snapshot and rebuilds from current sources.
|
|
202
|
+
|
|
186
203
|
`workspace graph jsonld|graphml|gexf` exports the current derived,
|
|
187
204
|
evidence-backed Knowledge Graph for semantic, graph-analysis, and interactive
|
|
188
205
|
2D/3D consumers. All five export modes accept `--output <file>`; Mermaid and
|
|
@@ -230,8 +247,11 @@ cross-runtime additions are allowed with a recommendation such as
|
|
|
230
247
|
blocked before the project is registered. Rust is an extended runtime with
|
|
231
248
|
Axum/Tauri scaffolding and Cargo lifecycle support. PHP is extended through
|
|
232
249
|
Laravel and Composer lifecycle support. Observed runtimes such as C and C++ are
|
|
233
|
-
|
|
234
|
-
|
|
250
|
+
counted in the workspace runtime mix even when Workspai does not own a native
|
|
251
|
+
scaffold for them. Existing CMake and Meson projects can also expose discovered
|
|
252
|
+
lifecycle units to `workspace run`; inspect them without execution using
|
|
253
|
+
`workspace run <stage> --plan`, and select one runtime family with
|
|
254
|
+
`--runtime <runtime>`.
|
|
235
255
|
|
|
236
256
|
Core module/template commands are intentionally narrower than runtime detection.
|
|
237
257
|
RapidKit Core modules are guaranteed only for RapidKit Core module-enabled kits:
|
|
@@ -287,8 +307,17 @@ governance while Core module mutation remains disabled.
|
|
|
287
307
|
npx workspai cache <status|clear|prune|repair>
|
|
288
308
|
npx workspai mirror <status|sync|verify|rotate>
|
|
289
309
|
npx workspai infra <plan|up|down|status>
|
|
310
|
+
npx workspai ai <info|recommend|generate-embeddings|update-embeddings>
|
|
311
|
+
npx workspai config <show|ai|set-api-key|remove-api-key>
|
|
312
|
+
npx workspai product <manifest|plan>
|
|
313
|
+
npx workspai shell
|
|
290
314
|
```
|
|
291
315
|
|
|
316
|
+
These groups are part of the public CLI surface, but availability of an
|
|
317
|
+
operation can still depend on project runtime, optional provider configuration,
|
|
318
|
+
or product metadata. Use the action's `--help` and `workspai commands --json`
|
|
319
|
+
instead of inferring support from this compact synopsis.
|
|
320
|
+
|
|
292
321
|
See [workspace-operations.md](./workspace-operations.md#workspace-infrastructure-sidecar) for infra discovery rules.
|
|
293
322
|
|
|
294
323
|
## Profiles
|
|
@@ -258,6 +258,11 @@ return bounded Knowledge Graph projections with proof references; `benchmark`
|
|
|
258
258
|
measures corpus-versus-retrieval payload; `overlay --from` compares a proposed
|
|
259
259
|
or earlier graph with the current graph; `emit` returns the complete
|
|
260
260
|
interchange graph; and `dot|mermaid` render deterministic dependency views.
|
|
261
|
+
Read-oriented modes accept a persisted graph only after model binding, proof
|
|
262
|
+
freshness, canonical project scopes, and the live `hybrid-git-content-v2`
|
|
263
|
+
fingerprint pass. `--refresh-graph` bypasses that snapshot. Search and benchmark
|
|
264
|
+
accept `--scope project:<name>` and the agent projection reports explicit
|
|
265
|
+
omission budgets instead of silently expanding its payload.
|
|
261
266
|
Canonical sources are `src/workspace-graph.ts`,
|
|
262
267
|
`src/workspace-knowledge-graph-query.ts`,
|
|
263
268
|
`src/workspace-knowledge-graph-change-overlay.ts`, and
|
|
@@ -409,7 +414,7 @@ canonical file. Legacy files remain readable during the compatibility window.
|
|
|
409
414
|
2. **Workspace Intelligence chain:** run `workspace intelligence run --for-agent generic --strict --json` to preserve Model → Diff → Impact → Doctor + Contract Verify + Analyze → Readiness → Verify → Context → Agent Sync → Explain. `pipeline` is the broader governance/release orchestrator and `autopilot` is a separate release surface; neither redefines the canonical chain. Use `pipeline-last-run.json` only for the pipeline orchestration summary.
|
|
410
415
|
3. **Do not** use `workspace.json.projects` (removed in schema 1.0).
|
|
411
416
|
4. Prefer `schemaVersion` constants in each artifact; legacy `v1` on readiness is accepted when reading old reports.
|
|
412
|
-
5. **Agent retrieval:** start with `AGENTS.md` and `.workspai/reports/INDEX.json`, then use `workspace graph search <query> --limit <n> --json` or MCP `searchWorkspaceGraph` for question-sized facts.
|
|
417
|
+
5. **Agent retrieval:** start with `AGENTS.md` and `.workspai/reports/INDEX.json`, then use `workspace graph search <query> --limit <n> --json` or MCP `searchWorkspaceGraph` for question-sized facts. Use `--scope project:<name>` when the task has one registered project boundary, inspect `budget.omitted` before assuming the result is complete, and follow returned proof paths to source evidence. Read the full context, model, or graph only when the bounded result is insufficient.
|
|
413
418
|
6. **Agent customization state:** use `.workspai/reports/agent-customization-pack.json` to inspect generated surfaces and drift; regenerate with `workspace agent-sync --write --refresh-context --preset enterprise`.
|
|
414
419
|
|
|
415
420
|
## Agent customization files (repo hooks)
|
package/docs/contracts/README.md
CHANGED
|
@@ -24,15 +24,17 @@ Do not copy a schema from `main` and assume it matches an older installed CLI.
|
|
|
24
24
|
|
|
25
25
|
Canonical JSON lives in **`../../contracts/`** (CLI package root, published in the tarball).
|
|
26
26
|
|
|
27
|
-
| Script
|
|
28
|
-
|
|
|
29
|
-
| `npm run generate:contracts`
|
|
30
|
-
| `npm run check:generated-contracts`
|
|
31
|
-
| `npm run sync:parity-snapshot`
|
|
32
|
-
| `npm run check:parity-snapshot`
|
|
33
|
-
| `npm run validate:contracts`
|
|
34
|
-
| `npm run contracts:validate`
|
|
35
|
-
| `npm run check:agent-customization-drift`
|
|
27
|
+
| Script | Purpose |
|
|
28
|
+
| ------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
|
|
29
|
+
| `npm run generate:contracts` | Regenerate runtime surface, create planner, agent customization pack, import-stack parity, module-layout, infra-stack |
|
|
30
|
+
| `npm run check:generated-contracts` | Verify committed JSON matches generators |
|
|
31
|
+
| `npm run sync:parity-snapshot` | Copy canonical → vscode `contracts/` mirror |
|
|
32
|
+
| `npm run check:parity-snapshot` | Verify mirrors match canonical |
|
|
33
|
+
| `npm run validate:contracts` | Shared-contract checks and focused contract tests |
|
|
34
|
+
| `npm run contracts:validate` | Comprehensive generated/shared contract, parity, runtime-conformance, and adversarial gate |
|
|
35
|
+
| `npm run check:agent-customization-drift` | Verify generated agent customization files are committed in a consumer workspace |
|
|
36
|
+
| `npm run test:real-world -- ...` | Qualify explicitly selected linked repositories in isolated or cumulative workspaces |
|
|
37
|
+
| `npm run test:real-world:enterprise -- ...` | Exercise the read-mostly, export, archive, agent dry-run, snapshot, and destructive dry-run command surface |
|
|
36
38
|
|
|
37
39
|
Workflow: change code → `npm run generate:contracts` → `npm run sync:parity-snapshot` → commit npm + vscode `contracts/`.
|
|
38
40
|
|
|
@@ -59,6 +61,11 @@ Published under `../../contracts/` (not duplicated in this folder):
|
|
|
59
61
|
- `release-readiness.v1.json` — release readiness gate evidence
|
|
60
62
|
- `workspace-run-last.v1.json` — multi-stage workspace run evidence
|
|
61
63
|
- `doctor-workspace-evidence.v1.json` / `doctor-project-evidence.v1.json` — doctor evidence
|
|
64
|
+
- `workspace-intelligence/doctor-diagnosis.v1.json` — runtime-neutral causal findings, proof bindings, confidence, unknowns, contradictions, and repair disposition embedded in Doctor evidence
|
|
65
|
+
- `workspace-intelligence/doctor-capabilities.v1.json` — fail-closed runtime/framework ownership, six-domain support levels, platform boundaries, repair modes, and extraction-safe adapter inventory
|
|
66
|
+
- `workspace-intelligence/doctor-validation.v1.json` — versioned disease-corpus results across every registered adapter, with bounded synthetic precision/recall and explicit limitations
|
|
67
|
+
- `workspace-intelligence/doctor-receipt.v1.json` — compact Doctor verdict, unambiguous counts, freshness, affected projects, blockers, and next-action handoff; full evidence remains canonical
|
|
68
|
+
- `workspace-intelligence/doctor-summary.v1.json` — bounded stdout contract emitted by `doctor --json=summary` for system, workspace, and project consumers
|
|
62
69
|
- `doctor-remediation-plan.v2.json` — canonical persisted Doctor fix/plan Studio handoff contract (`v1` path is a deprecated compatibility alias)
|
|
63
70
|
- `artifact-remediation-plan.v1.json` — cross-artifact Studio handoff for Bootstrap, Analyze, Readiness, Pipeline, Workspace Run, Workspace Verify, and Doctor plan bridging
|
|
64
71
|
- `workspace-intelligence/workspace-repair-proposal.v1.json` — bounded, hash-pinned source changes and optional runtime-native validation proposed by an IDE model; proposals never execute themselves
|
|
@@ -67,6 +74,7 @@ Published under `../../contracts/` (not duplicated in this folder):
|
|
|
67
74
|
- `analyze-last-run.v1.json` — analyze evidence
|
|
68
75
|
- `pipeline-last-run.v1.json` — governance pipeline orchestration
|
|
69
76
|
- `project-entry-capability.v1.json` — open-ended adopt/import contract for readable projects
|
|
77
|
+
- `adopt-effects.v1.json` — dry-run disclosure of project metadata, conditional repository-control reconciliation, and workspace operations before adoption
|
|
70
78
|
- `create-planner-capabilities.v1.json` — native, official, and existing capability lanes
|
|
71
79
|
- `agent-customization-pack.v1.json` — generated instructions, prompts, skills, agents, optional hooks, MCP-ready design metadata, target matrix, and drift state for AI agent surfaces
|
|
72
80
|
- `workspace-list.v1.json`, `workspace-sync.v1.json`, and `compatibility-matrix.v1.json` — workspace discovery, synchronization, and platform compatibility
|
|
@@ -114,10 +122,10 @@ CLI commands: see [commands-reference.md](../commands-reference.md) and the
|
|
|
114
122
|
|
|
115
123
|
`rapidkit-cli-contracts.json` describes:
|
|
116
124
|
|
|
117
|
-
- `VersionResponse` — `
|
|
125
|
+
- `VersionResponse` — `workspai version --json`
|
|
118
126
|
- `CommandsResponse` — `workspai commands --json`
|
|
119
|
-
- `ProjectDetectResponse` — `
|
|
120
|
-
- `ModulesListResponseV1` — `
|
|
127
|
+
- `ProjectDetectResponse` — `workspai project detect --json`
|
|
128
|
+
- `ModulesListResponseV1` — `workspai modules list --json-schema 1`
|
|
121
129
|
|
|
122
130
|
## Versioning
|
|
123
131
|
|
|
@@ -130,3 +138,4 @@ CLI commands: see [commands-reference.md](../commands-reference.md) and the
|
|
|
130
138
|
- [Documentation index](../README.md)
|
|
131
139
|
- [commands-reference.md](../commands-reference.md)
|
|
132
140
|
- [workspace-operations.md](../workspace-operations.md)
|
|
141
|
+
- [real-world-qualification.md](../real-world-qualification.md)
|
package/docs/doctor-command.md
CHANGED
|
@@ -39,6 +39,10 @@ Checks:
|
|
|
39
39
|
|
|
40
40
|
> Compatibility note: `npx workspai doctor --workspace` still works, but `doctor workspace` is the canonical form.
|
|
41
41
|
|
|
42
|
+
Both workspace forms use the canonical project-to-workspace resolver. After a
|
|
43
|
+
project is adopted, imported, or relinked, they can be launched from that
|
|
44
|
+
project directory and resolve its validated machine-local workspace binding.
|
|
45
|
+
|
|
42
46
|
### 3) Project Check (Canonical)
|
|
43
47
|
|
|
44
48
|
```bash
|
|
@@ -59,6 +63,49 @@ Checks:
|
|
|
59
63
|
|
|
60
64
|
> Compatibility note: `npx workspai doctor --project` also works.
|
|
61
65
|
|
|
66
|
+
### 4) Capability truth and validation
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
# Complete runtime/domain matrix
|
|
70
|
+
npx workspai doctor capabilities --json
|
|
71
|
+
|
|
72
|
+
# Ask what Doctor can prove for one runtime or framework
|
|
73
|
+
npx workspai doctor capabilities --runtime node --json
|
|
74
|
+
npx workspai doctor capabilities --framework "Spring Boot" --json
|
|
75
|
+
|
|
76
|
+
# Exercise every registered adapter against the versioned disease corpus
|
|
77
|
+
npx workspai doctor capabilities --validate --json
|
|
78
|
+
|
|
79
|
+
# Persist both governed artifacts in a workspace
|
|
80
|
+
npx workspai doctor capabilities --validate --write --workspace . --json
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Runtime and framework filters narrow only the command response. With `--write`, Doctor persists the
|
|
84
|
+
complete capability registry, never a filtered subset, so downstream consumers cannot mistake a
|
|
85
|
+
query result for canonical capability truth. Conflicting runtime/framework ownership fails closed
|
|
86
|
+
to the unknown adapter and records the conflict as an explicit limitation.
|
|
87
|
+
|
|
88
|
+
The capability matrix never turns absence into success. Each adapter declares all six diagnostic
|
|
89
|
+
domains as `native`, `portable`, `observable`, or `unsupported`, plus its limitations, platforms,
|
|
90
|
+
repair modes, runtime aliases, and framework ownership. An unknown runtime resolves to the
|
|
91
|
+
fail-closed fallback adapter: unsupported or unobserved evidence stays unknown and cannot produce a
|
|
92
|
+
healthy security claim.
|
|
93
|
+
|
|
94
|
+
`--validate` runs the same versioned disease classes through every registered runtime adapter. Its
|
|
95
|
+
precision and recall describe that deterministic synthetic corpus only. Real tool execution,
|
|
96
|
+
runtime-native fixtures, and Linux/macOS/Windows acceptance remain separate gates; the report says
|
|
97
|
+
so explicitly instead of presenting synthetic coverage as production accuracy.
|
|
98
|
+
|
|
99
|
+
With `--write`, consumers can read:
|
|
100
|
+
|
|
101
|
+
- `.workspai/reports/doctor-capabilities.json`
|
|
102
|
+
- `.workspai/reports/doctor-validation-last-run.json`
|
|
103
|
+
|
|
104
|
+
Contracts:
|
|
105
|
+
|
|
106
|
+
- `contracts/workspace-intelligence/doctor-capabilities.v1.json`
|
|
107
|
+
- `contracts/workspace-intelligence/doctor-validation.v1.json`
|
|
108
|
+
|
|
62
109
|
## Typical Usage
|
|
63
110
|
|
|
64
111
|
```bash
|
|
@@ -68,12 +115,21 @@ npx workspai doctor
|
|
|
68
115
|
# Full check inside a workspace
|
|
69
116
|
npx workspai doctor workspace
|
|
70
117
|
|
|
118
|
+
# Expand every probe and lifecycle capability (default output is summary-first)
|
|
119
|
+
npx workspai doctor workspace --verbose
|
|
120
|
+
|
|
71
121
|
# Focus only on current project
|
|
72
122
|
npx workspai doctor project
|
|
73
123
|
|
|
74
124
|
# Machine-readable output
|
|
75
125
|
npx workspai doctor workspace --json
|
|
76
126
|
|
|
127
|
+
# Compact agent/CI projection; full evidence is still written
|
|
128
|
+
npx workspai doctor workspace --fresh --json=summary
|
|
129
|
+
|
|
130
|
+
# Review the governed plan before mutation
|
|
131
|
+
npx workspai doctor workspace --plan
|
|
132
|
+
|
|
77
133
|
# Attempt safe fixes (interactive)
|
|
78
134
|
npx workspai doctor workspace --fix
|
|
79
135
|
|
|
@@ -87,7 +143,19 @@ npx workspai doctor project --json
|
|
|
87
143
|
npx workspai doctor workspace --profile enterprise-strict --json
|
|
88
144
|
```
|
|
89
145
|
|
|
90
|
-
|
|
146
|
+
`--json` remains the complete backward-compatible payload. `--json=summary` returns a bounded
|
|
147
|
+
projection with the verdict, affected projects, explicit count categories, freshness, and artifact
|
|
148
|
+
locations. It never replaces or weakens the full Doctor evidence. `--fresh` bypasses the project
|
|
149
|
+
scan cache; the default cache also expires after five minutes (configurable with
|
|
150
|
+
`WORKSPAI_DOCTOR_CACHE_MAX_AGE_SECONDS`) so live security state cannot be reused indefinitely.
|
|
151
|
+
|
|
152
|
+
Every project or workspace run also writes
|
|
153
|
+
`.workspai/reports/doctor-receipt-last-run.json`. The receipt is a small governed handoff for IDEs,
|
|
154
|
+
CI, and agents: it distinguishes blocking causes, advisory findings, unknowns, dependency advisory
|
|
155
|
+
subjects, vulnerability findings, not-applicable checks, and the next safe action. The complete
|
|
156
|
+
probe and diagnosis evidence remains in `doctor-last-run.json` or `doctor-project-last-run.json`.
|
|
157
|
+
|
|
158
|
+
## One verdict, multi-axis accounting
|
|
91
159
|
|
|
92
160
|
Doctor calculates one verdict from the host and every project probe:
|
|
93
161
|
|
|
@@ -95,12 +163,92 @@ Doctor calculates one verdict from the host and every project probe:
|
|
|
95
163
|
- **Needs attention** means the current profile found advisory work.
|
|
96
164
|
- **Blocked** means at least one error-level probe failed.
|
|
97
165
|
|
|
98
|
-
The
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
166
|
+
The verdict is authoritative. Human output presents blocking, advisory,
|
|
167
|
+
unknown, contradictory, and not-applicable counts separately; it never calls a
|
|
168
|
+
single percentage “health.” The additive `healthScore.presentation` contract
|
|
169
|
+
labels its percentage as a diagnostic pass rate for accounting only. A failed
|
|
170
|
+
security, coverage, or runtime probe therefore cannot be hidden behind a high
|
|
171
|
+
percentage or a healthy host. Existing score fields remain readable for older
|
|
172
|
+
IDEs, while updated consumers prefer the multi-axis projection.
|
|
173
|
+
|
|
174
|
+
Doctor also publishes `projectArchetype` independently from `projectKind`.
|
|
175
|
+
`projectKind` describes the technical surface (backend, frontend, extension,
|
|
176
|
+
and so on); the archetype describes the product role (service, application,
|
|
177
|
+
library, SDK, platform, plugin, or monorepo). Service-only checks such as a
|
|
178
|
+
runtime health endpoint, database migrations, or an executable boot entrypoint
|
|
179
|
+
are retained as explicit `not-applicable` evidence for non-deployable
|
|
180
|
+
archetypes instead of becoming false warnings.
|
|
181
|
+
|
|
182
|
+
The default terminal view is summary-first and uses portable boundaries such
|
|
183
|
+
as `$WORKSPACE`, `$PROJECT`, and `external/<project>`. `--verbose` expands all
|
|
184
|
+
probes and lifecycle capabilities. JSON continues to retain canonical absolute
|
|
185
|
+
paths because local machine consumers need them for governed operations.
|
|
186
|
+
|
|
187
|
+
## Universal diagnosis core
|
|
188
|
+
|
|
189
|
+
Doctor normalizes every runtime-specific observation through one internal diagnosis boundary
|
|
190
|
+
before CLI, Studio, CI, or an agent consumes it. This boundary is intentionally kept inside the
|
|
191
|
+
CLI until its contracts stabilize; it does not depend on Commander, terminal rendering, or the
|
|
192
|
+
VS Code extension.
|
|
193
|
+
|
|
194
|
+
Project and workspace evidence publish the result under `project.diagnosis`:
|
|
195
|
+
|
|
196
|
+
- a stable causal key and typed finding status for every non-passing observation;
|
|
197
|
+
- confidence and diagnosis state (`confirmed`, `candidate`, or `unknown`) rather than fabricated
|
|
198
|
+
certainty;
|
|
199
|
+
- proof bindings for the originating probe, affected dependency, structured command, and repair
|
|
200
|
+
targets;
|
|
201
|
+
- repair disposition (`automatic`, `approval-required`, `manual`, or `unavailable`);
|
|
202
|
+
- causal groups that let Repair close one disease family without mixing unrelated guidance;
|
|
203
|
+
- explicit unknowns and contradictions when providers disagree or evidence is stale;
|
|
204
|
+
- diagnosis completeness and repair-coverage counts that cannot silently score empty/unsupported
|
|
205
|
+
evidence as healthy.
|
|
206
|
+
|
|
207
|
+
Completeness is measured across six canonical diagnostic domains—runtime, dependency, security,
|
|
208
|
+
configuration, test, and quality. Every domain is explicitly `clean`, `findings`,
|
|
209
|
+
`not-applicable`, `not-run`, or `stale`. An explicit `not-applicable` observation is retained as
|
|
210
|
+
evidence but does not become a warning or inflate passing counts. A provider that did not run, or
|
|
211
|
+
evidence that is no longer fresh, increases unknowns and prevents a 100% completeness claim.
|
|
212
|
+
Readiness and Workspace Verify consume this canonical diagnosis instead of independently
|
|
213
|
+
recounting legacy issue strings.
|
|
214
|
+
|
|
215
|
+
The same diagnosis contract is used for Node, Python, Go, JVM, Rust, .NET, PHP, Ruby, Elixir,
|
|
216
|
+
Clojure, Deno, Bun, Scala, Kotlin, C, C++, and unknown/custom projects. Runtime adapters gather
|
|
217
|
+
different evidence; the diagnosis, causality, safety, and verification vocabulary stays the same.
|
|
218
|
+
Composite projects publish every detected family under `project.runtimeFamilies`; Doctor keeps a
|
|
219
|
+
primary runtime for compatibility. A detected cross-language platform is evaluated through primary
|
|
220
|
+
and portable evidence, and asks for explicit custom adapters only for runtime-specific checks the
|
|
221
|
+
portable contract cannot represent. Every unevaluated secondary runtime remains a diagnosis unknown
|
|
222
|
+
and proportionally lowers completeness; a primary-only polyglot scan can never report 100%.
|
|
223
|
+
|
|
224
|
+
Workspace project boundaries come from the canonical workspace contract/registry when available.
|
|
225
|
+
A nested solution, test project, or manifest inside a registered project is treated as evidence for
|
|
226
|
+
that project—not silently promoted into another workspace project. Unregistered monorepos remain
|
|
227
|
+
discoverable, while an explicitly registered nested project remains an independent boundary.
|
|
228
|
+
|
|
229
|
+
Contract: `contracts/workspace-intelligence/doctor-diagnosis.v1.json`.
|
|
230
|
+
|
|
231
|
+
The internal ownership boundaries are deliberately narrow:
|
|
232
|
+
|
|
233
|
+
| Boundary | Owns | Must not own |
|
|
234
|
+
| ------------------- | ------------------------------------------------------------------------------- | ----------------------------------------------- |
|
|
235
|
+
| Runtime sensors | Observable runtime, manifest, tool, source, and audit facts | Verdicts or speculative causality |
|
|
236
|
+
| Universal diagnosis | Causal reconciliation, confidence, proof binding, unknowns, and contradictions | File mutation or terminal/UI rendering |
|
|
237
|
+
| Doctor policy | Blocking/advisory projection, health score, and profile-specific gate semantics | Re-running sensors or inventing repairs |
|
|
238
|
+
| Remediation planner | Typed operations bound to `diagnosisFindingId` and `causalKey` | Reclassifying the disease |
|
|
239
|
+
| Repair engine | Approval, checkpoint, execution, validation, canonical verify, and rollback | Silently weakening Doctor policy |
|
|
240
|
+
| Consumers | Rendering and user/model interaction | Recomputing or overriding diagnosis and verdict |
|
|
241
|
+
|
|
242
|
+
This keeps Doctor internal today without turning `doctor.ts` into a public dependency boundary. A
|
|
243
|
+
future package extraction can move the diagnosis contract and engine without changing the evidence
|
|
244
|
+
or remediation protocol consumed by the CLI, Studio, CI, and agents.
|
|
245
|
+
|
|
246
|
+
The extraction seam is enforced in source and tests. `adapter-contract.ts`,
|
|
247
|
+
`capability-registry.ts`, `diagnosis-engine.ts`, and `validation-corpus.ts` are pure core modules:
|
|
248
|
+
they cannot import Commander, terminal styling, workspace discovery, or extension/UI code.
|
|
249
|
+
`capabilities-command.ts` is the CLI adapter that owns workspace resolution, artifact persistence,
|
|
250
|
+
and human rendering. A future `@workspai/doctor` package can therefore take the pure core without
|
|
251
|
+
moving command UX or creating a second source of truth.
|
|
104
252
|
|
|
105
253
|
## Graph-aware diagnosis
|
|
106
254
|
|
|
@@ -128,6 +276,12 @@ This data is available under `project.graphDiagnosis` in project and workspace
|
|
|
128
276
|
Doctor JSON evidence. Doctor rejects stale, invalid, or model-unbound graph
|
|
129
277
|
evidence instead of presenting it as current.
|
|
130
278
|
|
|
279
|
+
Graph enrichment is deliberately bounded per finding and restricted to the selected project's
|
|
280
|
+
graph neighborhood. Doctor publishes a small set of affected candidates, verification targets,
|
|
281
|
+
source artifacts, and shortest proof paths; consumers can query the canonical graph for deeper
|
|
282
|
+
exploration. This prevents unrelated projects and repeated graph payloads from consuming an
|
|
283
|
+
agent's context budget.
|
|
284
|
+
|
|
131
285
|
Graph reachability is deliberately described as a **structural impact
|
|
132
286
|
candidate**, not runtime causality. It narrows investigation and gives Studio a
|
|
133
287
|
proof-carrying starting point; final verification still comes from the
|
|
@@ -291,12 +445,12 @@ The remediation plan is intentionally ordered for Studio execution:
|
|
|
291
445
|
| Phase | Purpose |
|
|
292
446
|
| --------------------- | ------------------------------------------------------------------------------------- |
|
|
293
447
|
| `dependency-baseline` | Restore package/runtime dependency baselines before other fixes |
|
|
294
|
-
| `local-environment` |
|
|
448
|
+
| `local-environment` | Repair declared configuration contracts without inventing local secrets |
|
|
295
449
|
| `source-hygiene` | Apply safe project-scoped hygiene files such as `.dockerignore` or `.gitignore` rules |
|
|
296
450
|
| `command-contract` | Add missing test, quality, audit, or runtime command contracts |
|
|
297
451
|
| `runtime-governance` | Run RapidKit/workspace initializers that may touch multiple project surfaces |
|
|
298
452
|
| `manual-review` | Surface guidance that requires a human decision |
|
|
299
|
-
| `generic-execution` |
|
|
453
|
+
| `generic-execution` | Review-only legacy guidance when no typed operation or invocation exists |
|
|
300
454
|
|
|
301
455
|
`dependsOn` lets Workspai avoid false loops: for example, a missing test script repair can depend on
|
|
302
456
|
the project dependency baseline step, so Studio can run or ask for approval in the same order Doctor
|
|
@@ -371,9 +525,11 @@ safe `file-create` operation, and a `.gitignore` missing env-file rules can prod
|
|
|
371
525
|
`file-append` operation. Workspai can render those operations as reviewable file edits before the
|
|
372
526
|
operator approves the fix.
|
|
373
527
|
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
528
|
+
`.env.example`, a config schema, or environment documentation is the portable configuration
|
|
529
|
+
contract. Doctor does **not** create `.env` implicitly: that file can contain operator-owned secrets
|
|
530
|
+
and its absence is not a health defect when a portable contract exists. A product-specific typed
|
|
531
|
+
operation may still create a non-secret local file when its own contract explicitly requires it and
|
|
532
|
+
the user approves the change.
|
|
377
533
|
|
|
378
534
|
For Node projects without a security audit script, Doctor can emit a guarded
|
|
379
535
|
`package-json-script` operation for `scripts.audit="npm audit --audit-level=moderate"`, giving CI,
|
|
@@ -419,6 +575,16 @@ These probes are intentionally evidence-first. Missing optional surfaces are sur
|
|
|
419
575
|
or manual repair capabilities, while deterministic repairs are promoted into `--fix` only when the
|
|
420
576
|
change is safe enough for Doctor to apply with approval and post-fix verification.
|
|
421
577
|
|
|
578
|
+
Workspace scans are bounded and cache-safe. Doctor fingerprints manifests plus relevant source,
|
|
579
|
+
test, and module trees, includes content hashes for small files, writes cache artifacts atomically,
|
|
580
|
+
and limits project concurrency (four workers by default; configurable with
|
|
581
|
+
`RAPIDKIT_DOCTOR_SCAN_CONCURRENCY`). Dependency trees and build outputs are represented by bounded
|
|
582
|
+
materialization sensors rather than recursively traversed. Repair/plan/apply always bypass scan
|
|
583
|
+
cache, and Java warm-up uses workspace-local Maven/Gradle cache paths so its postcondition is both
|
|
584
|
+
portable and observable. Dependency-audit cache keys hash the complete governed manifest/lockfile
|
|
585
|
+
inputs and use a bounded in-memory cache, so same-size lockfile changes cannot reuse stale security
|
|
586
|
+
evidence.
|
|
587
|
+
|
|
422
588
|
Runtime-native probes add a second layer on top of the generic surface checks:
|
|
423
589
|
|
|
424
590
|
| Runtime family | Native signals sampled by Doctor |
|
|
@@ -581,7 +747,7 @@ These fields are designed for release gates and extension timeline cards that mu
|
|
|
581
747
|
|
|
582
748
|
## Workspace JSON fields (AI/automation)
|
|
583
749
|
|
|
584
|
-
`npx workspai doctor workspace --json` includes per-project metadata: `framework`, `frameworkKey`, `importStack`, `runtimeFamily`, `projectKind`, `supportTier`, `frameworkConfidence`, `probes`, and `repairCapabilities`.
|
|
750
|
+
`npx workspai doctor workspace --json` includes per-project metadata: `framework`, `frameworkKey`, `importStack`, `runtimeFamily`, `runtimeFamilies`, `projectKind`, `supportTier`, `frameworkConfidence`, `probes`, and `repairCapabilities`. Passing probes never retain an executable repair capability; only non-passing evidence can enter remediation planning.
|
|
585
751
|
|
|
586
752
|
## Project scope behavior
|
|
587
753
|
|
|
@@ -600,7 +766,16 @@ These fields are designed for release gates and extension timeline cards that mu
|
|
|
600
766
|
- Project evidence: `doctor-project-evidence-v1`
|
|
601
767
|
- Workspace scan cache: `doctor-workspace-cache-v2`
|
|
602
768
|
|
|
603
|
-
|
|
769
|
+
Recognizable legacy evidence without `schemaVersion` remains readable only when it exposes an
|
|
770
|
+
actual workspace/project Doctor shape. Arbitrary JSON objects, unknown versions, contradictory
|
|
771
|
+
score accounting, malformed typed repairs, and semantically invalid canonical diagnosis are
|
|
772
|
+
treated as missing or invalid evidence. Readiness and Workspace Verify enforce the same fail-closed
|
|
773
|
+
semantic boundary.
|
|
774
|
+
|
|
775
|
+
Typed file repairs resolve existing ancestors through the filesystem before mutation. A lexical
|
|
776
|
+
path under the project is rejected if a symbolic link escapes the governed project/workspace
|
|
777
|
+
boundary. The checkpointed `package-json-script` target is the exact file that is edited; JSON
|
|
778
|
+
pointer prototype segments and hidden multiline env/append values are rejected before execution.
|
|
604
779
|
|
|
605
780
|
## Related Workspace Commands
|
|
606
781
|
|
|
@@ -5,26 +5,28 @@ you to replace your frameworks or move existing source code.
|
|
|
5
5
|
|
|
6
6
|
```mermaid
|
|
7
7
|
flowchart TB
|
|
8
|
-
|
|
8
|
+
Sources["Projects · APIs · packages<br/>infrastructure · docs · CI"]
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Connect["Create · Adopt in place · Import"]
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Model["Canonical Workspace Model<br/>identity · inventory · boundaries"]
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
Graph["Derived Knowledge Graph<br/>relationships · facts · canonical proof"]
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
Decide["Diff · Impact · Evidence gates<br/>Readiness · Verify"]
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
Routes --> Workspace
|
|
20
|
-
Workspace --> Change
|
|
21
|
-
Change --> Outputs
|
|
18
|
+
Ground["Reports · bounded context<br/>Agent sync · Explain"]
|
|
22
19
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
20
|
+
Sources --> Connect
|
|
21
|
+
Connect --> Model
|
|
22
|
+
Model -->|derives, revision-bound| Graph
|
|
23
|
+
Model --> Decide
|
|
24
|
+
Graph --> Decide
|
|
25
|
+
Decide --> Ground
|
|
26
|
+
|
|
27
|
+
Ground --> Humans["Developers"]
|
|
28
|
+
Ground --> Automation["CI · releases"]
|
|
29
|
+
Ground --> Tools["IDEs · MCP · AI agents"]
|
|
28
30
|
```
|
|
29
31
|
|
|
30
32
|
## What This Means
|
|
@@ -40,8 +42,8 @@ flowchart TB
|
|
|
40
42
|
the evidence needed for a safe decision.
|
|
41
43
|
4. **Share the result.** Developers, CI, IDEs, AI agents, and MCP clients consume
|
|
42
44
|
the same workspace truth instead of building separate assumptions. The
|
|
43
|
-
current CLI exposes
|
|
44
|
-
`
|
|
45
|
+
current CLI exposes the governed evidence through its reports, agent context,
|
|
46
|
+
graph queries, and read-mostly `workspace mcp serve` bridge.
|
|
45
47
|
|
|
46
48
|
This is the user-facing view. The implementation uses a versioned chain of
|
|
47
49
|
model, change, evidence, verification, context, grounding, and explanation
|
|
@@ -57,7 +59,10 @@ baseline lifecycle, exit codes, and failure propagation are specified in
|
|
|
57
59
|
[Unified Workspace Intelligence Runner](./workspace-intelligence-runner.md).
|
|
58
60
|
|
|
59
61
|
The npm README uses a PNG rendering because npm package pages do not reliably
|
|
60
|
-
render Mermaid.
|
|
62
|
+
render Mermaid. npm also does not provide a dependable embedded-video player
|
|
63
|
+
for package READMEs. Keep the full MP4 outside the published package. For inline
|
|
64
|
+
motion, use a bounded, silent GIF hosted as a public asset; retain a linked MP4
|
|
65
|
+
for full-resolution playback and audio. When this source changes, regenerate
|
|
61
66
|
`From Code to Shared Understanding.png` before publishing.
|
|
62
67
|
|
|
63
68
|
## Execute the Contract
|