workspai 0.47.0 → 0.49.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 (103) hide show
  1. package/README.md +247 -136
  2. package/contracts/agent-customization-pack.v1.json +5 -0
  3. package/contracts/cli-runtime-command-inventory.v1.snapshot.json +4 -0
  4. package/contracts/extension-cli-compatibility.v1.json +8 -2
  5. package/contracts/published-contract-catalog.v1.json +33 -1
  6. package/contracts/runtime-command-surface.v1.json +163 -3
  7. package/contracts/workspace-intelligence/model-usage-event.v1.json +82 -0
  8. package/contracts/workspace-intelligence/workspace-graph-stream.v1.json +262 -0
  9. package/contracts/workspace-intelligence/workspace-intelligence-evaluation-comparison.v1.json +53 -0
  10. package/contracts/workspace-intelligence/workspace-intelligence-evaluation.v1.json +120 -0
  11. package/contracts/workspace-intelligence-architecture.v1.json +31 -2
  12. package/contracts/workspace-intelligence-chain.v1.json +44 -3
  13. package/dist/analyze-EEEU3MIF.js +1 -0
  14. package/dist/{artifact-remediation-plan-EPALZ2LC.js → artifact-remediation-plan-SPOUHMK5.js} +1 -1
  15. package/dist/autopilot-release-R4XRTWEM.js +1 -0
  16. package/dist/{chunk-2TEDAKP6.js → chunk-32OJDBIG.js} +1 -1
  17. package/dist/{chunk-ZDN7RHXJ.js → chunk-37CVKXBD.js} +1 -1
  18. package/dist/{chunk-YCL3I2JO.js → chunk-3NU32T4A.js} +1 -1
  19. package/dist/chunk-3VFA7D5T.js +1 -0
  20. package/dist/{chunk-CW7PGBIQ.js → chunk-4HDYADHT.js} +1 -1
  21. package/dist/{chunk-PBHP6JNY.js → chunk-54EP5CEV.js} +1 -1
  22. package/dist/{chunk-NOFM7MNA.js → chunk-AFL3ACCR.js} +1 -1
  23. package/dist/{chunk-MEMHNE7Y.js → chunk-BFLJ2R4D.js} +1 -1
  24. package/dist/{chunk-6SWRNA47.js → chunk-BGPXQQNY.js} +1 -1
  25. package/dist/chunk-BMWFQXGW.js +1 -0
  26. package/dist/{chunk-2GHUZDYA.js → chunk-CRHYBQI3.js} +1 -1
  27. package/dist/{chunk-KZZ36CK5.js → chunk-E2KJ5QWY.js} +1 -1
  28. package/dist/{chunk-BSRVO52Y.js → chunk-EKZLUMCS.js} +2 -2
  29. package/dist/{chunk-76YOPAOT.js → chunk-ESLPI3XZ.js} +1 -1
  30. package/dist/{chunk-DV6GJD4K.js → chunk-HDXNIN4N.js} +1 -1
  31. package/dist/{chunk-TNQI5VCW.js → chunk-HZDXO65G.js} +14 -14
  32. package/dist/{chunk-COARSXRC.js → chunk-J5ENLXDF.js} +1 -1
  33. package/dist/{chunk-QDWYIRHR.js → chunk-K4X3DM7R.js} +1 -1
  34. package/dist/chunk-LHOZXC2M.js +2 -0
  35. package/dist/{chunk-RWRLFSKW.js → chunk-NAJCUQ4X.js} +1 -1
  36. package/dist/{chunk-ZM5NQ5Z2.js → chunk-OW42TZFB.js} +1 -1
  37. package/dist/{chunk-SK6XRKGG.js → chunk-P3D5YQB2.js} +1 -1
  38. package/dist/{chunk-TWNFECMN.js → chunk-PHXQR6PX.js} +1 -1
  39. package/dist/{chunk-ITCAMC2E.js → chunk-PRTR2DQ2.js} +1 -1
  40. package/dist/{chunk-7VLCK5JW.js → chunk-RHQW3DTP.js} +1 -1
  41. package/dist/{chunk-22NJ2ZMG.js → chunk-T4YR4RAI.js} +1 -1
  42. package/dist/{chunk-VBSQ7MF6.js → chunk-TIE2XMGH.js} +20 -20
  43. package/dist/{chunk-HSGFUKCN.js → chunk-VU7NZHPM.js} +1 -1
  44. package/dist/{chunk-U5EZHZBX.js → chunk-YJZOMRAS.js} +1 -1
  45. package/dist/{create-7JKJDAQV.js → create-S64IWHAP.js} +1 -1
  46. package/dist/{doctor-PGPNIS76.js → doctor-4NNUDNGZ.js} +1 -1
  47. package/dist/{dotnet-webapi-clean-6TVFBTVI.js → dotnet-webapi-clean-A6MVDYXX.js} +4 -4
  48. package/dist/{gofiber-standard-2BL7GWZB.js → gofiber-standard-I5YPQG5V.js} +1 -1
  49. package/dist/{gogin-standard-XGP3KBXA.js → gogin-standard-VY2L4QT5.js} +1 -1
  50. package/dist/index.d.ts +35 -11
  51. package/dist/index.js +138 -136
  52. package/dist/{pipeline-IB6ILJSV.js → pipeline-LHTPE3DR.js} +1 -1
  53. package/dist/{springboot-standard-JJNUID6M.js → springboot-standard-55XKCBIZ.js} +4 -4
  54. package/dist/{workspace-H3QXBFGB.js → workspace-PJPRBUMQ.js} +1 -1
  55. package/dist/{workspace-agent-sync-C7SG2Z5W.js → workspace-agent-sync-662QHXGF.js} +1 -1
  56. package/dist/{workspace-context-BKQBKA4C.js → workspace-context-23YYCUCP.js} +1 -1
  57. package/dist/{workspace-contract-RPQQBQXR.js → workspace-contract-TU2I7GC2.js} +1 -1
  58. package/dist/{workspace-dependency-graph-23BI2HG7.js → workspace-dependency-graph-BP4EXYQ5.js} +1 -1
  59. package/dist/workspace-explain-MWUEN643.js +1 -0
  60. package/dist/workspace-explain-contract-ZPI3JXJU.js +1 -0
  61. package/dist/{workspace-feedback-WAID3IOE.js → workspace-feedback-SUVH2LUJ.js} +1 -1
  62. package/dist/{workspace-foundation-5OOJEO2D.js → workspace-foundation-WPLD7OEO.js} +1 -1
  63. package/dist/workspace-graph-stream-KAGGQPJT.js +1 -0
  64. package/dist/{workspace-history-C6OP3IAQ.js → workspace-history-BANOJRQ2.js} +1 -1
  65. package/dist/{workspace-intelligence-VKDL3H2J.js → workspace-intelligence-MFJE7W67.js} +1 -1
  66. package/dist/workspace-intelligence-evaluation-IPH7M3WV.js +1 -0
  67. package/dist/{workspace-intelligence-runner-LVALAZY7.js → workspace-intelligence-runner-OTYTHV6B.js} +1 -1
  68. package/dist/{workspace-knowledge-graph-FE2NTZKV.js → workspace-knowledge-graph-ARDC6HHG.js} +1 -1
  69. package/dist/workspace-knowledge-graph-export-UYAYFTWX.js +10 -0
  70. package/dist/workspace-mcp-serve-EZR6O76D.js +3 -0
  71. package/dist/{workspace-model-S33CIB2R.js → workspace-model-7OU2M3LE.js} +1 -1
  72. package/dist/{workspace-registry-summary-A3YDL63D.js → workspace-registry-summary-ORDK7A36.js} +1 -1
  73. package/dist/workspace-run-QND2SIYA.js +1 -0
  74. package/dist/{workspace-verify-ZGH3NXAH.js → workspace-verify-EBVL7FWT.js} +1 -1
  75. package/dist/workspace-watch-7HWGA5TF.js +1 -0
  76. package/docs/GLOSSARY.md +28 -24
  77. package/docs/OPEN_SOURCE_USER_SCENARIOS.md +11 -8
  78. package/docs/README.md +62 -23
  79. package/docs/README_CONTENT_CONTRACT.md +154 -0
  80. package/docs/ci-workflows.md +3 -3
  81. package/docs/commands-reference.md +16 -3
  82. package/docs/contracts/ARTIFACT_CATALOG.md +35 -20
  83. package/docs/contracts/README.md +3 -0
  84. package/docs/creating-workspaces-and-projects.md +16 -12
  85. package/docs/doctor-command.md +30 -28
  86. package/docs/examples/ci-agent-grounding.yml +1 -1
  87. package/docs/from-code-to-shared-understanding.md +2 -2
  88. package/docs/graph-benchmark-methodology.md +2 -2
  89. package/docs/workspace-intelligence-evaluation.md +149 -0
  90. package/docs/workspace-intelligence-runner.md +17 -6
  91. package/docs/workspace-knowledge-graph.md +31 -10
  92. package/docs/workspace-operations.md +13 -5
  93. package/package.json +9 -4
  94. package/templates/kits/fastapi-ddd/README.md.j2 +1 -1
  95. package/dist/analyze-UVXPRGYZ.js +0 -1
  96. package/dist/autopilot-release-5BQ6F5L2.js +0 -1
  97. package/dist/chunk-LNRAB7UY.js +0 -1
  98. package/dist/chunk-NRYS4CLR.js +0 -2
  99. package/dist/workspace-explain-WVN7JH3U.js +0 -1
  100. package/dist/workspace-explain-contract-SEFTVF6J.js +0 -1
  101. package/dist/workspace-mcp-serve-KT2I676Z.js +0 -3
  102. package/dist/workspace-run-M4LNJILC.js +0 -1
  103. package/dist/workspace-watch-EVBJTMV7.js +0 -1
@@ -0,0 +1,154 @@
1
+ # README Content Contract
2
+
3
+ The repository README is Workspai's primary product entry point. It must help a
4
+ new user understand the problem, see a concrete result, run a safe quickstart,
5
+ and choose the next document without first learning the internal architecture.
6
+
7
+ This contract keeps that experience aligned with the CLI's machine-readable
8
+ contracts. It applies to the root `README.md`; the package README may add detail
9
+ but must not contradict it.
10
+
11
+ The npm package README at `packages/cli/README.md` is the operational product
12
+ entry point. It follows the same truth boundaries but adds beginner definitions,
13
+ a copyable workspace onboarding path, exact exit semantics, command families,
14
+ durable outputs, requirements, and troubleshooting.
15
+
16
+ ## Required reader journey
17
+
18
+ The root README keeps these sections in this order:
19
+
20
+ 1. `Workspace Intelligence for software systems` — the category, slogan, and
21
+ three user outcomes;
22
+ 2. `See your workspace as a system` — a concrete before/after mental model;
23
+ 3. `Start in two minutes` — install, connect software, run the canonical chain;
24
+ 4. `What Workspai gives you` — user questions mapped to product outcomes;
25
+ 5. `How Workspace Intelligence works` — sources, facts, model, graph, decisions,
26
+ and consumers;
27
+ 6. `Evidence, not guesses` — identity, proof, bounded retrieval, and unknown
28
+ relationships;
29
+ 7. `Measure context honestly` — reproducible numbers and claim boundaries;
30
+ 8. `One contract-backed intelligence chain` — the canonical runner and its
31
+ distinction from `pipeline`;
32
+ 9. `Choose your workflow` — goal-oriented routing;
33
+ 10. `Open outputs for every consumer` — human, CI, agent, MCP, IDE, and graph
34
+ interoperability surfaces;
35
+ 11. documentation, packages, contributor, community, and license routes.
36
+
37
+ Do not move package internals, exhaustive flags, troubleshooting, or contributor
38
+ implementation details above the user value and quickstart.
39
+
40
+ ## CLI package README journey
41
+
42
+ The CLI README keeps these sections in order:
43
+
44
+ 1. product category and the `See / Ask with proof / Act with confidence` value;
45
+ 2. plain-language definitions of Workspace, Project, Model, Graph, Evidence,
46
+ and Artifact;
47
+ 3. a copyable two-minute path that creates a minimal workspace, adopts source,
48
+ and runs the canonical chain;
49
+ 4. the Model → derived Graph architecture and its unknown-relationship rule;
50
+ 5. the exact intelligence chain, evidence, and bounded measurement semantics;
51
+ 6. grouped commands, outputs, onboarding choices, integrations, requirements,
52
+ documentation, and troubleshooting.
53
+
54
+ Measurement tables must not precede installation or the first successful run.
55
+ Advanced command inventories must be grouped by user goal instead of appearing
56
+ as one undifferentiated command wall.
57
+
58
+ ## Architectural statements that must remain true
59
+
60
+ - The **Workspace Model is the canonical source of truth**.
61
+ - The Knowledge Graph is a **derived, revision-bound representation** of
62
+ governed workspace knowledge.
63
+ - Providers emit facts and proofs; they do not independently own the canonical
64
+ graph.
65
+ - Missing relationships mean **not proven**, not independent.
66
+ - The graph is broader than a code graph, but it is not the entire product.
67
+ - The canonical runner is
68
+ `npx workspai workspace intelligence run --for-agent generic --strict --json`.
69
+ - `pipeline` is a broader governance/release orchestrator and must not be taught
70
+ as a replacement for the intelligence chain.
71
+ - The integrated CLI already exposes current capabilities. Future standalone
72
+ packages are extraction boundaries, not promises to add currently missing CLI
73
+ features.
74
+
75
+ Normative machine sources:
76
+
77
+ | Statement | Source of truth |
78
+ | ------------------------------ | ------------------------------------------------------- |
79
+ | Ordered intelligence chain | `contracts/workspace-intelligence-chain.v1.json` |
80
+ | Runtime commands and flags | `contracts/runtime-command-surface.v1.json` |
81
+ | Published schemas and paths | `contracts/published-contract-catalog.v1.json` |
82
+ | Architecture boundaries | `contracts/workspace-intelligence-architecture.v1.json` |
83
+ | Artifact writers and consumers | `docs/contracts/ARTIFACT_CATALOG.md` |
84
+
85
+ Markdown summarizes these contracts; it does not redefine them.
86
+
87
+ ## Claim policy
88
+
89
+ Every performance or token statement must identify:
90
+
91
+ - the workspace or pinned corpus;
92
+ - the query and result limit;
93
+ - whether token counts are estimated, tokenizer-counted, or provider-reported;
94
+ - the baseline;
95
+ - the date or revision;
96
+ - what the measurement does not prove.
97
+
98
+ The current fixture may be used only with wording equivalent to:
99
+
100
+ > On the current 16-project development fixture, one bounded query reduced the
101
+ > estimated retrieval payload by 97.9%; results vary by workspace and query.
102
+
103
+ Never turn a retrieval-payload result into a universal model-cost, answer-quality,
104
+ or task-success claim. Use `workspace eval` and a verified outcome before making
105
+ execution-efficiency comparisons.
106
+
107
+ ## Command policy
108
+
109
+ - Quickstarts must be copyable and use the canonical `workspai` package.
110
+ - `wspai` is described only as an optional short alias.
111
+ - A partial sequence such as `model → context` must not be taught as a replacement
112
+ for the canonical intelligence chain.
113
+ - Every documented command must exist in the runtime command surface or be an
114
+ ordinary shell command such as `cd` or `npm install`.
115
+ - Durable filenames must come from published contracts or the Artifact Catalog.
116
+
117
+ ## Information hierarchy
118
+
119
+ Write for three reading depths:
120
+
121
+ 1. **Ten seconds:** category, user problem, three outcomes.
122
+ 2. **Two minutes:** quickstart, concrete artifacts, architecture, proof example.
123
+ 3. **Deep evaluation:** measurements, contracts, guides, boundaries, contributor
124
+ material.
125
+
126
+ Prefer user questions and outcomes over internal phase names. Define unavoidable
127
+ terms in plain language and link to the glossary.
128
+
129
+ ## Validation
130
+
131
+ Run from `packages/cli`:
132
+
133
+ ```bash
134
+ npm run validate:docs
135
+ npm run check:generated-contracts
136
+ npm run check:contracts
137
+ ```
138
+
139
+ `docs-drift-guard.mjs` enforces the required root headings, their order,
140
+ canonical runner, Model/Graph truth boundary, honest measurement language,
141
+ documentation routes, and package-status semantics. `smoke-readme-commands.mjs`
142
+ executes representative documented CLI help surfaces.
143
+
144
+ ## Review checklist
145
+
146
+ Before merging a README change, confirm:
147
+
148
+ - a new user can explain Workspai without saying “chatbot” or “code generator”;
149
+ - the first quickstart reaches a durable evidence artifact;
150
+ - every architecture statement agrees with the generated contracts;
151
+ - every number is reproducible and bounded;
152
+ - every promised output exists today or is explicitly labelled as future work;
153
+ - links route users by goal rather than exposing the documentation tree;
154
+ - the package table cannot be read as a list of missing product capabilities.
@@ -12,9 +12,9 @@ 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 |
15
+ | Manual npm release | `.github/workflows/release-npm-manual.yml` | Maintainer-only release gate and publish workflow |
16
16
  | Contributor onboarding | `.github/workflows/contributor-onboarding.yml` | Accepted-contributor onboarding automation |
17
- | Welcome | `.github/workflows/welcome.yml` | First-issue and first-contribution messages |
17
+ | Welcome | `.github/workflows/welcome.yml` | First-issue and first-contribution messages |
18
18
 
19
19
  The release workflow requires `Frontend Generator Smoke` for the exact release
20
20
  SHA. Maintainers must dispatch that workflow against the intended release ref
@@ -29,7 +29,7 @@ For Workspai **consumer workspaces** (not this CLI repo), use the copy-paste tem
29
29
  Minimal job:
30
30
 
31
31
  ```yaml
32
- - run: npx workspai workspace intelligence run --for-agent codex --strict --json
32
+ - run: npx workspai workspace intelligence run --for-agent generic --strict --json
33
33
  - run: npx workspai pipeline --json --strict --no-agent-sync
34
34
  - run: node ./node_modules/workspai/scripts/check-agent-customization-drift.mjs --workspace .
35
35
  ```
@@ -18,7 +18,7 @@ npx workspai autopilot release [--mode <audit|safe-fix|enforce>] [--json] [--out
18
18
  Recommended CI:
19
19
 
20
20
  ```bash
21
- npx workspai workspace intelligence run --for-agent codex --strict --json
21
+ npx workspai workspace intelligence run --for-agent generic --strict --json
22
22
  ```
23
23
 
24
24
  Run the broader governance and release orchestrators as separate gates; they
@@ -65,8 +65,9 @@ npx workspai workspace snapshot [--workspace <path>] [--json] [--include-paths]
65
65
  npx workspai workspace diff --from <snapshot-or-report|git[:ref]> [--workspace <path>] [--json] [--include-paths] [--include-evidence] [--scan-depth <count>] [--strict]
66
66
  npx workspai workspace impact --from <workspace-diff-report> [--workspace <path>] [--scope project:<name>] [--json] [--include-paths] [--include-evidence] [--scan-depth <count>] [--strict]
67
67
  npx workspai workspace verify [--from-impact <file>] [--workspace <path>] [--scope project:<name>] [--strict] [--json] [--include-paths] [--include-evidence] [--scan-depth <count>]
68
- npx workspai workspace graph [emit|explain|search|benchmark|entities|evidence|path|overlay|dot|mermaid] [key] [value] [--from <graph.json>] [--limit <1..100>] [--workspace <path>] [--scope project:<name>] [--json] [--include-paths] [--include-evidence] [--scan-depth <count>]
69
- npx workspai workspace watch [--workspace <path>] [--json] [--once] [--scan-depth <count>]
68
+ 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>]
69
+ npx workspai workspace eval [init <task> [strategy]|record|status|report|compare --from <report>] [--workspace <path>] [--output <file>] [--json]
70
+ npx workspai workspace watch [--workspace <path>] [--json] [--graph-stream] [--once] [--scan-depth <count>]
70
71
  npx workspai workspace explain|why <target> [--workspace <path>] [--json] [--write]
71
72
  npx workspai workspace trace --from <workspace-diff-report> [--workspace <path>] [--json] [--write]
72
73
  printf '%s\n' '{"actionId":"fix-api","summary":"API tests passed","outcome":"ok"}' | npx workspai workspace feedback record [--workspace <path>] --json
@@ -144,6 +145,18 @@ that retrieval payload with the readable proof-indexed corpus using a labelled
144
145
  `characters / 4` estimate. It measures payload reduction only; it does not
145
146
  assert equivalent answer quality or model-specific billing savings.
146
147
 
148
+ `workspace graph jsonld|graphml|gexf` exports the current derived,
149
+ evidence-backed Knowledge Graph for semantic, graph-analysis, and interactive
150
+ 2D/3D consumers.
151
+ Use `--output <file>` for a durable export; Mermaid and DOT remain the compact
152
+ documentation-oriented renderings.
153
+
154
+ `workspace eval` records provider/tokenizer/estimate provenance, tool activity,
155
+ cost, latency, and verified task outcome. `eval record` accepts a
156
+ `model-usage-event.v1` JSON document on stdin. The live and finalized artifacts
157
+ are suitable for IDE dashboards and conform to
158
+ `workspace-intelligence-evaluation.v1`.
159
+
147
160
  `workspace model --write` also materializes the derived, contract-validated
148
161
  knowledge graph at `.workspai/reports/workspace-knowledge-graph.json`. The
149
162
  unified intelligence runner treats that artifact as a required output of the
@@ -76,25 +76,27 @@ Bare artifact names in this table are relative to `.workspai/reports/`.
76
76
  Entries beginning with `reports/` are relative to `.workspai/`; paths such as
77
77
  `AGENTS.md` are relative to the workspace root.
78
78
 
79
- | Command | Artifact | Schema | Contract file |
80
- | ---------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | -------------------------------------- | -------------------------------------------------------------------------- |
81
- | `workspace model --write` | `workspace-model.json` | `workspace-model.v1` | `contracts/workspace-intelligence/workspace-model.v1.json` |
82
- | `workspace model --write` | `workspace-knowledge-graph.json` | `workspace-knowledge-graph.v1` | `contracts/workspace-intelligence/workspace-knowledge-graph.v1.json` |
83
- | `workspace snapshot` | `workspace-model-snapshot.json` | `workspace-model-snapshot.v1` | `contracts/workspace-intelligence/workspace-model-snapshot.v1.json` |
84
- | `workspace diff` | `workspace-model-diff-last-run.json` | `workspace-model-diff.v1` | `contracts/workspace-intelligence/workspace-model-diff.v1.json` |
85
- | `workspace impact --from <diff>` | `workspace-impact-last-run.json` | `workspace-impact.v1` | `contracts/workspace-intelligence/workspace-impact.v1.json` |
86
- | `analyze --json` | `analyze-last-run.json` | `rapidkit-analyze-v1` | `contracts/analyze-last-run.v1.json` |
87
- | `workspace verify` | `workspace-verify-last-run.json` | `workspace-verify.v1` | `contracts/workspace-intelligence/workspace-verify.v1.json` |
88
- | `workspace context --write` | `workspace-context-agent.json` | `workspace-context.v1` | `contracts/workspace-intelligence/workspace-context.v1.json` |
89
- | `workspace agent-sync --write` | `reports/agent-customization-pack.json` | `rapidkit-agent-customization-pack.v1` | `contracts/workspace-intelligence/agent-customization-pack-report.v1.json` |
90
- | `workspace agent-sync --write` | `reports/INDEX.json` | `rapidkit-agent-reports-index.v1` | `contracts/workspace-intelligence/agent-reports-index.v1.json` |
91
- | `workspace agent-sync --write` | `reports/workspace-skills-index.json` | `workspace-skills-index.v1` | `contracts/workspace-intelligence/workspace-skills-index.v1.json` |
92
- | `workspace agent-sync --write` | `reports/workspai-mcp-design.json`, `.workspai/skills/*.md`, `.workspai/AGENT-GROUNDING.md`, `AGENTS.md`, IDE agent surfaces | Mixed generated surfaces | See customization pack output inventory |
93
- | `workspace explain --write` | `workspace-explain-last-run.json` | `workspace-explain.v1` | `contracts/workspace-intelligence/workspace-explain.v1.json` |
94
- | `workspace why --write` | `workspace-why-last-run.json` | `workspace-explain.v1` | `contracts/workspace-intelligence/workspace-explain.v1.json` |
95
- | `workspace trace --write` | `workspace-trace-last-run.json` | `workspace-explain.v1` | `contracts/workspace-intelligence/workspace-explain.v1.json` |
96
- | `workspace intelligence run` | `workspace-intelligence-run-last-run.json` | `workspace-intelligence-run.v1` | `contracts/workspace-intelligence/workspace-intelligence-run.v1.json` |
97
- | `workspace feedback record` / `doctor * --fix` | `workspace-intelligence-history.json` (`kind: agent-action`, `doctor-fix`) | `workspace-intelligence-history.v1` | `contracts/workspace-intelligence/workspace-intelligence-history.v1.json` |
79
+ | Command | Artifact | Schema | Contract file |
80
+ | ----------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | -------------------------------------- | ---------------------------------------------------------------------------- |
81
+ | `workspace model --write` | `workspace-model.json` | `workspace-model.v1` | `contracts/workspace-intelligence/workspace-model.v1.json` |
82
+ | `workspace model --write` | `workspace-knowledge-graph.json` | `workspace-knowledge-graph.v1` | `contracts/workspace-intelligence/workspace-knowledge-graph.v1.json` |
83
+ | `workspace snapshot` | `workspace-model-snapshot.json` | `workspace-model-snapshot.v1` | `contracts/workspace-intelligence/workspace-model-snapshot.v1.json` |
84
+ | `workspace diff` | `workspace-model-diff-last-run.json` | `workspace-model-diff.v1` | `contracts/workspace-intelligence/workspace-model-diff.v1.json` |
85
+ | `workspace impact --from <diff>` | `workspace-impact-last-run.json` | `workspace-impact.v1` | `contracts/workspace-intelligence/workspace-impact.v1.json` |
86
+ | `analyze --json` | `analyze-last-run.json` | `rapidkit-analyze-v1` | `contracts/analyze-last-run.v1.json` |
87
+ | `workspace verify` | `workspace-verify-last-run.json` | `workspace-verify.v1` | `contracts/workspace-intelligence/workspace-verify.v1.json` |
88
+ | `workspace context --write` | `workspace-context-agent.json` | `workspace-context.v1` | `contracts/workspace-intelligence/workspace-context.v1.json` |
89
+ | `workspace agent-sync --write` | `reports/agent-customization-pack.json` | `rapidkit-agent-customization-pack.v1` | `contracts/workspace-intelligence/agent-customization-pack-report.v1.json` |
90
+ | `workspace agent-sync --write` | `reports/INDEX.json` | `rapidkit-agent-reports-index.v1` | `contracts/workspace-intelligence/agent-reports-index.v1.json` |
91
+ | `workspace agent-sync --write` | `reports/workspace-skills-index.json` | `workspace-skills-index.v1` | `contracts/workspace-intelligence/workspace-skills-index.v1.json` |
92
+ | `workspace agent-sync --write` | `reports/workspai-mcp-design.json`, `.workspai/skills/*.md`, `.workspai/AGENT-GROUNDING.md`, `AGENTS.md`, IDE agent surfaces | Mixed generated surfaces | See customization pack output inventory |
93
+ | `workspace explain --write` | `workspace-explain-last-run.json` | `workspace-explain.v1` | `contracts/workspace-intelligence/workspace-explain.v1.json` |
94
+ | `workspace why --write` | `workspace-why-last-run.json` | `workspace-explain.v1` | `contracts/workspace-intelligence/workspace-explain.v1.json` |
95
+ | `workspace trace --write` | `workspace-trace-last-run.json` | `workspace-explain.v1` | `contracts/workspace-intelligence/workspace-explain.v1.json` |
96
+ | `workspace intelligence run` | `workspace-intelligence-run-last-run.json` | `workspace-intelligence-run.v1` | `contracts/workspace-intelligence/workspace-intelligence-run.v1.json` |
97
+ | `workspace feedback record` / `doctor * --fix` | `workspace-intelligence-history.json` (`kind: agent-action`, `doctor-fix`) | `workspace-intelligence-history.v1` | `contracts/workspace-intelligence/workspace-intelligence-history.v1.json` |
98
+ | `workspace eval init` / `workspace eval record` | `workspace-intelligence-evaluation-live.json` | `workspace-intelligence-evaluation.v1` | `contracts/workspace-intelligence/workspace-intelligence-evaluation.v1.json` |
99
+ | `workspace eval report` | `workspace-intelligence-evaluation-last-run.json` | `workspace-intelligence-evaluation.v1` | `contracts/workspace-intelligence/workspace-intelligence-evaluation.v1.json` |
98
100
 
99
101
  The unified runner report separates its execution envelope from the canonical
100
102
  intelligence chain. `preflight` always contains exactly `sync` and `baseline`;
@@ -111,6 +113,13 @@ recoverable artifact transaction. The graph carries a SHA-256 `source` binding
111
113
  to the canonical model, so consumers must reject a graph whose source hash does
112
114
  not equal the current structural model hash.
113
115
 
116
+ `workspace graph jsonld|graphml|gexf --output <path>` creates explicit interchange
117
+ projections from that bound graph. These files are portable exports, not competing
118
+ canonical or `last-run` artifacts: JSON-LD preserves semantic identifiers,
119
+ GraphML targets general graph tooling, and GEXF targets exploration and
120
+ visualization tools. Mermaid and DOT remain bounded text projections for docs
121
+ and diagrams.
122
+
114
123
  **CLI semantics:** `workspace diff --from` expects a **model or snapshot** baseline. `workspace impact --from` expects a **diff report**.
115
124
  Persisted artifacts retain their artifact schema. JSON command projections that add operation metadata
116
125
  such as `outputPath`, `status`, or structured errors use
@@ -182,6 +191,12 @@ on each settled change, driven by graph-aware incremental rebuilds. Events carry
182
191
  removed projects, graph edge deltas, structural `modelHash`, and `mode`/`durationMs`. Canonical
183
192
  source: `src/workspace-watch.ts`.
184
193
 
194
+ Use `workspace watch --graph-stream --json` for the transport-neutral
195
+ `workspace-graph-stream.v1` feed consumed by IDEs. The first line is an
196
+ authoritative snapshot; subsequent lines are hash-linked, revisioned deltas.
197
+ Consumers must request a new snapshot after any revision, identity, generation,
198
+ schema, validation, or hash-continuity failure.
199
+
185
200
  **Health/impact history.** Each `workspace verify` run appends a compact record to
186
201
  `.workspai/reports/workspace-intelligence-history.json` (`workspace-intelligence-history.v1`),
187
202
  a ring buffer capped at the 50 most-recent entries (verdict, risk, freshness, gate, counts).
@@ -347,7 +362,7 @@ canonical file. Legacy files remain readable during the compatibility window.
347
362
  ## Consumer rules
348
363
 
349
364
  1. **Project count:** read `workspace-registry.v1.json` (or run `workspace registry status --json`).
350
- 2. **Workspace Intelligence chain:** run `workspace intelligence run --for-agent codex --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.
365
+ 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.
351
366
  3. **Do not** use `workspace.json.projects` (removed in schema 1.0).
352
367
  4. Prefer `schemaVersion` constants in each artifact; legacy `v1` on readiness is accepted when reading old reports.
353
368
  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. Follow returned proof paths to source evidence. Read the full context, model, or graph only when the bounded result is insufficient.
@@ -81,6 +81,9 @@ Workspace intelligence (`../../contracts/workspace-intelligence/`):
81
81
  - `workspace-knowledge-graph-change-overlay.v1.json` — proposed/change-set facts and relations without mutating the base graph
82
82
  - `workspace-knowledge-search.v1.json` — bounded ranked retrieval for CLI, MCP, IDE, and agent consumers
83
83
  - `workspace-graph-token-efficiency.v1.json` — reproducible corpus-versus-retrieval payload measurement
84
+ - `model-usage-event.v1.json` — privacy-bounded model, tool, milestone, and verified-outcome events with explicit measurement provenance
85
+ - `workspace-intelligence-evaluation.v1.json` — live/final token, cost, latency, activity, and verified-outcome evaluation
86
+ - `workspace-intelligence-evaluation-comparison.v1.json` — task-aligned comparison of two completed evaluation strategies
84
87
  - `workspace-model-snapshot.v1.json`
85
88
  - `workspace-model-diff.v1.json`
86
89
  - `workspace-impact.v1.json`
@@ -1,16 +1,20 @@
1
1
  # Creating Workspaces and Projects
2
2
 
3
- This guide explains, in plain language, what Workspai does when you create a
4
- workspace or a project. It covers interactive commands, automation, project
5
- locations, workspace linking, supported kits, and the most important flags.
3
+ Use this guide when you want to start a new software system or add a new
4
+ application to an existing one. Workspai creates the files, records where the
5
+ project belongs, and makes it visible to the same checks and tools as the rest
6
+ of the workspace.
7
+
8
+ The sections below explain project locations, supported starters, interactive
9
+ commands, automation, and the most useful options.
6
10
 
7
11
  For a compact list of command syntax, see
8
12
  [commands-reference.md](./commands-reference.md).
9
13
 
10
14
  ## The two things you can create
11
15
 
12
- A **workspace** is the governed boundary that holds project registrations,
13
- policies, contracts, and Workspace Intelligence reports.
16
+ A **workspace** is the shared home for related projects, rules, and saved
17
+ Workspai reports.
14
18
 
15
19
  A **project** is an application or service, such as a FastAPI API, Go service,
16
20
  Spring Boot service, .NET API, or frontend application.
@@ -588,13 +592,13 @@ native, official, and existing-project lanes.
588
592
 
589
593
  # Failure and cleanup behavior
590
594
 
591
- | Situation | Result |
592
- | -------------------------------------------------------- | -------------------------------------- |
593
- | Invalid name | Stops before normal scaffold writes |
594
- | Target directory already exists | Stops without merging or overwriting |
595
- | Project scaffold fails | Workspace linking does not run |
596
- | Git initialization fails | Usually warns and keeps the scaffold |
597
- | Go or Maven dependency warm-up fails | Warns and keeps the scaffold |
595
+ | Situation | Result |
596
+ | -------------------------------------------------------- | --------------------------------------------------------------------------- |
597
+ | Invalid name | Stops before normal scaffold writes |
598
+ | Target directory already exists | Stops without merging or overwriting |
599
+ | Project scaffold fails | Workspace linking does not run |
600
+ | Git initialization fails | Usually warns and keeps the scaffold |
601
+ | Go or Maven dependency warm-up fails | Warns and keeps the scaffold |
598
602
  | Workspace registration/finalization fails after scaffold | Lifecycle rollback restores metadata and removes a newly owned project tree |
599
603
 
600
604
  Create finalization uses a durable lifecycle transaction. On failure it restores
@@ -1,6 +1,8 @@
1
1
  # Workspai Doctor Command
2
2
 
3
- `doctor` checks health for the npm wrapper environment in system, workspace, or project scope.
3
+ Use `doctor` to find setup and dependency problems before they interrupt
4
+ development or block a release. It can check the computer, an entire workspace,
5
+ or one project, and reports what is wrong and which fixes are available.
4
6
 
5
7
  **Related:** [workspace-operations.md](./workspace-operations.md) · [commands-reference.md](./commands-reference.md) · [Documentation index](./README.md)
6
8
 
@@ -20,7 +22,7 @@ Checks host prerequisites:
20
22
  - RapidKit Core availability
21
23
  - Go (optional)
22
24
 
23
- ### 2) Workspace Check (Canonical)
25
+ ### 2) Workspace Check
24
26
 
25
27
  ```bash
26
28
  cd my-workspace
@@ -87,11 +89,11 @@ npx workspai doctor workspace --profile enterprise-strict --json
87
89
  Doctor supports policy profiles so the same evidence can be interpreted correctly in local,
88
90
  CI, release, and enterprise gates:
89
91
 
90
- | Profile | Use when | Warning behavior |
91
- | ------------------- | -------------------------------- | ---------------------------------------- |
92
- | `local` | Developer diagnostics | Report warnings, do not block |
93
- | `ci` | CI feedback loop | Exit `2` on warnings, `1` on errors |
94
- | `release` | Release readiness gate | Exit `1` on warnings or errors |
92
+ | Profile | Use when | Warning behavior |
93
+ | ------------------- | --------------------------------- | --------------------------------------------------------- |
94
+ | `local` | Developer diagnostics | Report warnings, do not block |
95
+ | `ci` | CI feedback loop | Exit `2` on warnings, `1` on errors |
96
+ | `release` | Release readiness gate | Exit `1` on warnings or errors |
95
97
  | `enterprise-strict` | Enterprise/studio repair workflow | Exit `1`; every warning needs evidence or repair guidance |
96
98
 
97
99
  `--strict` maps to the `release` profile and `--ci` maps to the `ci` profile for backward
@@ -101,11 +103,11 @@ card is advisory locally but blocking for release.
101
103
  Doctor also attaches a **freshness contract** to evidence so tools do not treat live state as
102
104
  durable structure:
103
105
 
104
- | Freshness category | Meaning | Default TTL |
105
- | ------------------ | -------------------------------------------- | ----------- |
106
- | `structure` | Durable project/workspace shape and markers | 7 days |
106
+ | Freshness category | Meaning | Default TTL |
107
+ | ------------------ | --------------------------------------------- | ----------- |
108
+ | `structure` | Durable project/workspace shape and markers | 7 days |
107
109
  | `verification` | Test, script, lint, quality, and probe checks | 24 hours |
108
- | `state` | Live dependency/security state | 5 minutes |
110
+ | `state` | Live dependency/security state | 5 minutes |
109
111
 
110
112
  Each probe can include `freshness`, and each JSON artifact includes `evidenceFreshness`.
111
113
  Workspai and CI should refresh stale or `verifyBeforeUse` evidence before claiming a project is
@@ -113,10 +115,10 @@ ready, repaired, or release-safe.
113
115
 
114
116
  Doctor probes also include an **issue taxonomy** and **repair intent** for Studio-driven repair:
115
117
 
116
- | Field | Purpose |
117
- | ------------------- | ----------------------------------------------------------------------- |
118
- | `issueClass` | Stable category such as `security`, `test`, `container`, or `dependency` |
119
- | `operationalImpact` | Product impact such as `ci-risk`, `release-risk`, or `security-risk` |
118
+ | Field | Purpose |
119
+ | ------------------- | ------------------------------------------------------------------------------------------------------------- |
120
+ | `issueClass` | Stable category such as `security`, `test`, `container`, or `dependency` |
121
+ | `operationalImpact` | Product impact such as `ci-risk`, `release-risk`, or `security-risk` |
120
122
  | `repairIntent.mode` | Studio action mode: `edit-file`, `run-command`, `review-required`, `verify-before-fix`, or `refresh-evidence` |
121
123
 
122
124
  This lets Workspai distinguish "show guidance" from "apply an approved file edit", "run a command",
@@ -164,15 +166,15 @@ same repair evidence without guessing the workspace root.
164
166
 
165
167
  The remediation plan is intentionally ordered for Studio execution:
166
168
 
167
- | Phase | Purpose |
168
- | --- | --- |
169
- | `dependency-baseline` | Restore package/runtime dependency baselines before other fixes |
170
- | `local-environment` | Seed local env files without overwriting operator-owned values |
171
- | `source-hygiene` | Apply safe project-scoped hygiene files such as `.dockerignore` or `.gitignore` rules |
172
- | `command-contract` | Add missing test, quality, audit, or runtime command contracts |
173
- | `runtime-governance` | Run RapidKit/workspace initializers that may touch multiple project surfaces |
174
- | `manual-review` | Surface guidance that requires a human decision |
175
- | `generic-execution` | Last-resort shell remediation when no typed operation exists |
169
+ | Phase | Purpose |
170
+ | --------------------- | ------------------------------------------------------------------------------------- |
171
+ | `dependency-baseline` | Restore package/runtime dependency baselines before other fixes |
172
+ | `local-environment` | Seed local env files without overwriting operator-owned values |
173
+ | `source-hygiene` | Apply safe project-scoped hygiene files such as `.dockerignore` or `.gitignore` rules |
174
+ | `command-contract` | Add missing test, quality, audit, or runtime command contracts |
175
+ | `runtime-governance` | Run RapidKit/workspace initializers that may touch multiple project surfaces |
176
+ | `manual-review` | Surface guidance that requires a human decision |
177
+ | `generic-execution` | Last-resort shell remediation when no typed operation exists |
176
178
 
177
179
  `dependsOn` lets Workspai avoid false loops: for example, a missing test script repair can depend on
178
180
  the project dependency baseline step, so Studio can run or ask for approval in the same order Doctor
@@ -311,11 +313,11 @@ jobs:
311
313
 
312
314
  ## Exit Codes
313
315
 
314
- | Code | Meaning |
315
- | ---- | ------------------------------ |
316
- | `0` | Passed; local-profile warnings remain advisory |
316
+ | Code | Meaning |
317
+ | ---- | ------------------------------------------------------------------ |
318
+ | `0` | Passed; local-profile warnings remain advisory |
317
319
  | `1` | Errors, or warnings under `release`/`enterprise-strict`/`--strict` |
318
- | `2` | Warning-only result under the `ci` profile or `--ci` |
320
+ | `2` | Warning-only result under the `ci` profile or `--ci` |
319
321
 
320
322
  ## Enterprise Probe Extensions
321
323
 
@@ -39,7 +39,7 @@ jobs:
39
39
  # Exit 1 = hard execution failure; exit 2 = completed but evidence-blocked.
40
40
  # Continue here only so the durable run report and blocker evidence can
41
41
  # always be uploaded; the final step below still fails either outcome.
42
- run: npx workspai workspace intelligence run --for-agent codex --strict --json
42
+ run: npx workspai workspace intelligence run --for-agent generic --strict --json
43
43
  continue-on-error: true
44
44
  id: intelligence
45
45
 
@@ -62,14 +62,14 @@ render Mermaid. When this source changes, regenerate
62
62
  Run the complete canonical chain in its versioned order:
63
63
 
64
64
  ```bash
65
- npx workspai workspace intelligence run --for-agent codex --json
65
+ npx workspai workspace intelligence run --for-agent generic --json
66
66
  ```
67
67
 
68
68
  For enterprise CI and release enforcement, add `--strict`. A warning or
69
69
  needs-attention verdict then produces a blocked report and exit code `2`:
70
70
 
71
71
  ```bash
72
- npx workspai workspace intelligence run --for-agent codex --strict --json
72
+ npx workspai workspace intelligence run --for-agent generic --strict --json
73
73
  ```
74
74
 
75
75
  `pipeline` is the broader governance/release orchestrator. It does not replace
@@ -52,8 +52,8 @@ language, model, or tokenizer.
52
52
 
53
53
  ## Current fixture observation
54
54
 
55
- The 16-project development workspace produced the following result on
56
- 2026-07-21 for `api endpoint --limit 8`:
55
+ The 16-project development workspace reproduced the following result on
56
+ 2026-07-22 for `api endpoint --limit 8`:
57
57
 
58
58
  | Measure | Observed value |
59
59
  | ------------------------------- | -------------: |