workspai 0.78.0 → 0.79.1

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 (75) hide show
  1. package/README.md +117 -236
  2. package/contracts/create-planner-capabilities.v1.json +1 -1
  3. package/dist/analyze-SKOIUD6F.js +1 -0
  4. package/dist/autopilot-release-E7ADQH2B.js +1 -0
  5. package/dist/{chunk-5FVREPQC.js → chunk-2ZVE7VE2.js} +1 -1
  6. package/dist/{chunk-4KAYWMNE.js → chunk-3O344BX3.js} +1 -1
  7. package/dist/{chunk-HMWZWT7B.js → chunk-5MRDPZU7.js} +1 -1
  8. package/dist/{chunk-RJESUJQF.js → chunk-5NS322HT.js} +28 -28
  9. package/dist/{chunk-B6FJ6RG6.js → chunk-6CZQXEZ7.js} +1 -1
  10. package/dist/{chunk-75WJOYWT.js → chunk-CAGOLU4Q.js} +1 -1
  11. package/dist/{chunk-2CUT4GLE.js → chunk-DYSFGHV5.js} +1 -1
  12. package/dist/{chunk-4AAXIWYY.js → chunk-ETTZXKAS.js} +1 -1
  13. package/dist/{chunk-FLAGHVSH.js → chunk-FJMUBFXO.js} +1 -1
  14. package/dist/{chunk-RHF2IZOW.js → chunk-GIP7YFWR.js} +1 -1
  15. package/dist/{chunk-YWC5MKIL.js → chunk-IF2OWXNY.js} +1 -1
  16. package/dist/{chunk-UVIBPWOG.js → chunk-L3O2QXKH.js} +2 -2
  17. package/dist/{chunk-ONUFNCRN.js → chunk-LQYMYRGI.js} +1 -1
  18. package/dist/{chunk-YHQK4S3H.js → chunk-MJYWGRCY.js} +1 -1
  19. package/dist/{chunk-MN5S462C.js → chunk-MNZAJ6PP.js} +1 -1
  20. package/dist/{chunk-VRZAN3WS.js → chunk-NZQKHGPE.js} +1 -1
  21. package/dist/{chunk-QDM6TWFK.js → chunk-O4TZKLEC.js} +1 -1
  22. package/dist/{chunk-5OKNWBAN.js → chunk-R7R5FX4B.js} +1 -1
  23. package/dist/{chunk-HB3ZYG2Z.js → chunk-RRZQPFFR.js} +69 -60
  24. package/dist/{chunk-VEMGICT4.js → chunk-SKHRUHXO.js} +1 -1
  25. package/dist/{chunk-AMGIXK6Z.js → chunk-TQW2SZHH.js} +1 -1
  26. package/dist/{chunk-TJRVWVAZ.js → chunk-U5WP4HDH.js} +1 -1
  27. package/dist/{chunk-QMNJTI65.js → chunk-VT4WPXTO.js} +1 -1
  28. package/dist/chunk-WJKQTX4V.js +2 -0
  29. package/dist/{chunk-MD4CHXV3.js → chunk-WU5M6UP7.js} +1 -1
  30. package/dist/{chunk-IQJL3LBM.js → chunk-ZONAHZBG.js} +1 -1
  31. package/dist/{chunk-ZQ36CTLF.js → chunk-ZXYTWF2R.js} +1 -1
  32. package/dist/{create-WB5YQ7C6.js → create-2ETTECFU.js} +1 -1
  33. package/dist/{doctor-HOSHQ7II.js → doctor-3F7OUVYQ.js} +1 -1
  34. package/dist/{goal-interactive-selection-6YJOK4WC.js → goal-interactive-selection-EMHAM5TM.js} +1 -1
  35. package/dist/{goal-lifecycle-UEJMTUFV.js → goal-lifecycle-PR5O7T6B.js} +1 -1
  36. package/dist/{goal-pack-YGZMG3RQ.js → goal-pack-TEK2PHAV.js} +1 -1
  37. package/dist/index.js +159 -159
  38. package/dist/{pipeline-Z4JOJ4PX.js → pipeline-E6YY65GU.js} +1 -1
  39. package/dist/{project-agent-entry-ZMDQWJ6I.js → project-agent-entry-MXAHZSQR.js} +1 -1
  40. package/dist/{project-intelligence-lens-FSWQKY3E.js → project-intelligence-lens-IUM66OV2.js} +1 -1
  41. package/dist/{proof-carrying-change-M2RNYQ7E.js → proof-carrying-change-XA5HRGSB.js} +1 -1
  42. package/dist/{verified-goal-UAUCEDZZ.js → verified-goal-V5OVULY7.js} +1 -1
  43. package/dist/{workspace-J5QYWAE3.js → workspace-XVPKQG5W.js} +1 -1
  44. package/dist/{workspace-agent-sync-GLG36KQZ.js → workspace-agent-sync-46L7ZOQQ.js} +1 -1
  45. package/dist/{workspace-context-BZV4ZFKZ.js → workspace-context-VVZARI5K.js} +1 -1
  46. package/dist/{workspace-contract-XDNIB5JX.js → workspace-contract-N2BJCAJ7.js} +1 -1
  47. package/dist/{workspace-explain-V3XDMONQ.js → workspace-explain-5WKK6ENK.js} +1 -1
  48. package/dist/{workspace-foundation-EDTKW2RB.js → workspace-foundation-PZNZWUJ4.js} +1 -1
  49. package/dist/{workspace-graph-stream-UPASFCAF.js → workspace-graph-stream-26ME2JJS.js} +1 -1
  50. package/dist/{workspace-intelligence-24MZRG2S.js → workspace-intelligence-ZTET7JHS.js} +1 -1
  51. package/dist/{workspace-intelligence-runner-HISKHQLG.js → workspace-intelligence-runner-NZFRFCPN.js} +1 -1
  52. package/dist/{workspace-knowledge-graph-5EECTGXQ.js → workspace-knowledge-graph-4RSZTEFJ.js} +1 -1
  53. package/dist/workspace-knowledge-graph-snapshot-UTJHALST.js +1 -0
  54. package/dist/{workspace-mcp-serve-S3TWO4RI.js → workspace-mcp-serve-TIYCW364.js} +1 -1
  55. package/dist/{workspace-model-J757KSDE.js → workspace-model-LBICKRVI.js} +1 -1
  56. package/dist/{workspace-onboarding-3TLME4HP.js → workspace-onboarding-WUO6KCLF.js} +1 -1
  57. package/dist/{workspace-registry-summary-ZC5CFZXP.js → workspace-registry-summary-3PXZENLC.js} +1 -1
  58. package/dist/{workspace-repair-engine-C26C7OIB.js → workspace-repair-engine-V4Z7TJGS.js} +1 -1
  59. package/dist/workspace-run-T65CCZIN.js +1 -0
  60. package/dist/{workspace-verify-KFBWQ37C.js → workspace-verify-UQWAFGNQ.js} +1 -1
  61. package/dist/{workspace-watch-LNP5JPD4.js → workspace-watch-BKIZQ2SM.js} +1 -1
  62. package/docs/README.md +48 -116
  63. package/docs/agent-framework-adapters.md +32 -26
  64. package/docs/ci-workflows.md +8 -2
  65. package/docs/commands-reference.md +13 -12
  66. package/docs/create-planner-capabilities.md +1 -1
  67. package/docs/creating-workspaces-and-projects.md +29 -22
  68. package/docs/model-gateways.md +23 -23
  69. package/package.json +2 -2
  70. package/dist/analyze-X76YV667.js +0 -1
  71. package/dist/autopilot-release-6OV2FLRS.js +0 -1
  72. package/dist/chunk-3PGXGAHC.js +0 -2
  73. package/dist/workspace-knowledge-graph-snapshot-T6ZJGWLC.js +0 -1
  74. package/dist/workspace-run-2KBTMGG7.js +0 -1
  75. /package/dist/{chunk-QLHRGWUW.js → chunk-GOOY7I36.js} +0 -0
package/README.md CHANGED
@@ -7,149 +7,96 @@
7
7
 
8
8
  ## Give your AI agent the system, not just the repository
9
9
 
10
- **Your AI coding agent wastes time guessing your project structure. Workspai fixes that.**
10
+ **Less rediscovery. More time building.**
11
+
12
+ Give your coding agent a system map, source references, and saved project context.
13
+ Use the same evidence yourself to understand the code and decide what to do next.
11
14
 
12
15
  > One workspace. One truth. Humans and AI aligned.
13
16
 
14
17
  ## Workspace Intelligence for software systems
15
18
 
16
- Workspai is an open-source CLI that gives people and AI tools one governed view
17
- of the software system they are changing.
18
-
19
- ```bash
20
- npx workspai adopt .
21
- npx workspai workspace intelligence run --for-agent generic
22
- ```
23
-
24
- Two commands. Your project gains a bounded, evidence-backed system view:
25
-
26
- ### Before vs After
27
-
28
- | Before Workspai | After Workspai |
29
- | -------------------------------------------- | ----------------------------------------------------- |
30
- | Agent scans thousands of files for context | Agent starts from bounded entry and context artifacts |
31
- | No dependency map between services | Searchable graph with source-level proof |
32
- | Broken test blocks release, no one knows why | Doctor localizes the blocker and next target |
33
- | Every AI session starts from scratch | Sessions resume from durable evidence |
34
-
35
- Here is what you get:
36
-
37
- | What it produces | Why it matters |
38
- | ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
39
- | **Workspace Model** | A canonical inventory of registered projects, detected runtimes, frameworks, and proven dependencies |
40
- | **Knowledge Graph** | Searchable relationships between projects, backed by source-level proof |
41
- | **Health & Readiness** | Doctor checks, verification gates, and release posture based on evidence, not guesses |
42
- | **Agent Context** | Bounded, focused instructions so AI tools read what they need, not the entire repo |
43
- | **Agent Rules** | Ready-to-use grounding for Cursor, Copilot, Claude, Codex, Gemini, and more |
44
- | **Agent Skills** | Runtime-, polyglot-, test-, and delivery-aware operational playbooks, with portable `SKILL.md` projections where the host supports Agent Skills |
45
- | **MCP Server** | Versioned read-oriented tools for querying evidence, graph, blockers, and context live |
46
-
47
- `generic` is the safe default when you do not yet know which agent will use the
48
- project: Workspai builds one portable context and prepares discovery adapters
49
- for every supported host, without duplicating the Model or Graph.
19
+ Workspai is an open-source CLI that helps you understand software and prepare
20
+ focused context for Codex, Claude Code, Cursor, and GitHub Copilot.
21
+ The system map and checks do not require an AI API key.
50
22
 
51
- ### What the output looks like
52
-
53
- The canonical workspace owns the Model, Graph, context, evidence index, and
54
- Skills. Each linked project keeps only its portable entry, scoped context, and
55
- workspace binding:
56
-
57
- ```text
58
- your-workspace/
59
- ├── .workspai/
60
- │ ├── reports/ # Model, Graph, verification, context
61
- │ └── skills/ # evidence-derived playbooks
62
- ├── AGENTS.md · .codex/ · .cursor/ · .claude/ · .github/ · .agents/
63
- └── project/.workspai/
64
- ├── agent-entry.v1.json # portable project entry
65
- └── workspace-link.local.json # machine-local binding
66
- ```
67
-
68
- Your agent starts with `agent-entry.v1.json`, compact workspace context, and the
69
- Skills index; it then retrieves task-scoped Graph evidence and targeted source.
70
-
71
- ![Workspai CLI adopting and analyzing the gRPC repository](https://raw.githubusercontent.com/chistiq/workspai/main/packages/cli/docs/workspai-grpc-readme-cli.gif)
72
-
73
- [Get started](#start-in-two-minutes) ·
74
- [See what you get](#what-happens-after-the-first-run) ·
75
- [How it works](#how-workspace-intelligence-works) ·
23
+ [Quickstart](#start-in-two-minutes) ·
24
+ [Agent setup](docs/agent-entry.md) ·
76
25
  [Documentation](docs/README.md)
77
26
 
78
27
  ## Start in two minutes
79
28
 
80
- ### Use an existing project
81
-
82
- Open the project and adopt it:
29
+ From the directory of your existing project:
83
30
 
84
31
  ```bash
85
- cd /absolute/path/to/project
86
32
  npx workspai adopt .
33
+ npx workspai workspace intelligence run --for-agent generic
87
34
  ```
88
35
 
89
- The project stays where it is. Workspai creates or reuses a minimal workspace
90
- in the default system location and records a validated local link.
36
+ Requires **Node.js 20.19+ and npm**. Your source stays in place. Workspai adds
37
+ project metadata and agent entry files, creates or reuses a linked workspace,
38
+ and saves shared reports there. `generic` prepares context for supported agent
39
+ hosts without requiring you to choose one yet. Run time depends on your project.
91
40
 
92
- Stay in the same project directory and run Workspace Intelligence:
41
+ **Read the terminal summary:** which projects were detected, where context was
42
+ saved, and which checks need attention. Rerun the intelligence command after
43
+ changes to refresh the saved view.
93
44
 
94
- ```bash
95
- npx workspai workspace intelligence run --for-agent generic
96
- ```
45
+ ![Workspai adopting and analyzing the gRPC repository](https://raw.githubusercontent.com/chistiq/workspai/main/packages/cli/docs/workspai-grpc-readme-cli.gif)
97
46
 
98
- Workspai now knows which workspace owns the project. You only need
99
- `--workspace <path>` when a moved or ambiguous binding cannot be resolved.
100
- The shorter command is intended for a human-readable first run. CI, agents, and
101
- other machine consumers should use the strict JSON form shown in
102
- [How Workspace Intelligence works](#how-workspace-intelligence-works).
47
+ ### Create a workspace or a new project
103
48
 
104
- ### Start new software
105
-
106
- Use the guided flow:
49
+ Build from a starter instead of setting up every project by hand:
107
50
 
108
51
  ```bash
109
52
  npx workspai create
110
53
  ```
111
54
 
112
- Choose whether to create a workspace, scaffold a project, or add existing
113
- software. Project starters are grouped as Backend, Frontend, Desktop, AI
114
- Agent, AI Gateway, Extension, and Gaming.
55
+ - **Create a workspace:** organize your projects with shared context and checks.
56
+ - **Create a project:** pick a category, kit, and name; scaffold and register it.
57
+ - **Add existing software:** connect a local project, Git repository, or workspace.
115
58
 
116
- ```bash
117
- # Optional global installation
118
- npm install -g workspai
119
- workspai --version
120
- ```
59
+ | Build… | Choose from starters such as… |
60
+ | --- | --- |
61
+ | A backend | FastAPI, NestJS, Go, ASP.NET Core, Rust Axum, Spring Boot |
62
+ | A frontend | Next.js, React + Vite, Vue, Angular, Astro, SvelteKit |
63
+ | An AI agent | Google ADK, OpenAI Agents SDK, Microsoft Agent Framework |
64
+ | A model gateway | OpenRouter with Python or TypeScript |
65
+ | A desktop app or extension | Browse the matching category in the picker |
66
+
67
+ The picker shows each kit's support status.
68
+
69
+ Install once with `npm install -g workspai` to use `workspai create`.
70
+ The optional `wspai` package provides the shorter `wspai create` command.
71
+
72
+ [All workspace and project setup options](docs/creating-workspaces-and-projects.md)
121
73
 
122
74
  ## Give your agent a goal, not an open-ended prompt
123
75
 
124
- Describe the outcome in plain language from the adopted project:
76
+ From your linked project:
125
77
 
126
78
  ```bash
127
79
  npx workspai goal "Raise test coverage to 85%" --for-agent generic
128
- npx workspai goal "Raise test coverage to 85%" --runtime cpp --for-agent generic
129
- npx workspai goal "Add retry with exponential backoff" --for-agent generic
130
80
  ```
131
81
 
132
- Workspai turns it into a bounded, evidence-backed handoff:
82
+ Workspai prepares scope, acceptance criteria, and an agent handoff.
83
+ The agent gets a focused objective, not permission to scan or change everything.
84
+ The command does not edit source or claim that the outcome is complete.
85
+ Your agent performs the implementation; verification checks the result.
133
86
 
134
- ```text
135
- Intent → project scope → proof-backed context → governed plan → safe execution
136
- ```
87
+ [Goal guide, including multi-project and runtime choices](docs/goal-packs.md)
137
88
 
138
- The agent gets a focused objective, not permission to scan or change
139
- everything. Workspai keeps approval, verification, and rollback under CLI
140
- control. The command prepares governed work; it does not edit source or claim
141
- that the outcome is complete. Exact coverage, dependency-security, and release
142
- Goals have deterministic CLI verifiers; other outcomes retain CLI safety and
143
- rollback while the consumer performs an evidence-backed outcome review.
144
- Multi-project scope and polyglot runtime choices are explicit. Interactive
145
- users get bounded choices from the canonical Workspace Model; automation gets
146
- a machine-readable decision and can use `--scope` and `--runtime`.
89
+ ## Make every agent change carry proof
147
90
 
148
- [Learn how Goal Packs work](docs/goal-packs.md)
91
+ Need an audit trail? **Proof-Carrying Change** connects the goal to authorized
92
+ changes, observed effects, and independent verification.
93
+ Prediction can guide work but can never prove its own result.
149
94
 
150
- ## Make every agent change carry proof
95
+ <details>
96
+ <summary>Example change lifecycle — after creating a Goal</summary>
151
97
 
152
- For source-changing work, begin a Goal-bound change before mutation:
98
+ Begin before the first source change; replace placeholders with your change ID
99
+ and actual effect receipt. See the guide for receipt creation and the full loop.
153
100
 
154
101
  ```bash
155
102
  npx workspai change begin --json
@@ -159,186 +106,120 @@ npx workspai change verify --change <change-id> --strict --json
159
106
  npx workspai change capsule validate --change <change-id> --json
160
107
  ```
161
108
 
162
- The resulting capsule binds intent, baseline architecture, authorization,
163
- observed effects, predicted-versus-actual Graph changes, verification receipts,
164
- and remaining uncertainty. Prediction can guide work but can never prove its
165
- own result. [Learn how Proof-Carrying Change works](docs/proof-carrying-change.md).
109
+ ![Workspai records and verifies a Goal-bound change](https://raw.githubusercontent.com/chistiq/workspai/main/packages/cli/docs/workspai-pcc-readme-cli.gif)
166
110
 
167
- ![Workspai creates a Goal-bound Proof-Carrying Change before source mutation](https://raw.githubusercontent.com/chistiq/workspai/main/packages/cli/docs/workspai-pcc-readme-cli.gif)
111
+ </details>
168
112
 
169
- ## What happens after the first run
113
+ [Record and verify a change](docs/proof-carrying-change.md)
170
114
 
171
- The key outputs for each audience are:
115
+ ## What happens after the first run
172
116
 
173
- | Audience | What to read |
174
- | ------------------- | ---------------------------------------------------------------------------- |
175
- | **AI agent** | `agent-entry.v1.json` (project) → `workspace-context-agent.json` (workspace) |
176
- | **Developer** | Terminal summary, or `workspace-explain-last-run.json` for diagnosis |
177
- | **CI / automation** | `workspace-verify-last-run.json` (exit code 0 = pass, 2 = blocked) |
178
- | **MCP client** | `workspace mcp serve` (versioned read-oriented tools over JSON-RPC) |
179
- | **IDE extension** | Same artifacts + watch events |
117
+ Your project keeps its agent entry and scoped context. The linked workspace
118
+ keeps shared reports under `.workspai/reports/`. You can stay in the project terminal.
180
119
 
181
- An agent can prove that it entered through governed evidence before scanning
182
- the repository:
120
+ To check the entry before handing work to an agent:
183
121
 
184
122
  ```bash
185
- npx workspai agent bootstrap --for-agent codex --strict --json
123
+ npx workspai agent bootstrap --for-agent generic --strict --json
186
124
  ```
187
125
 
188
- The receipt validates workspace membership, artifact integrity, Model/Graph
189
- freshness, and the active Goal handoff. A blocked receipt prevents architecture
190
- claims; it never falls back silently to a broad source scan. [Learn about
191
- canonical-first agent entry](docs/agent-entry.md).
192
-
193
- A blocked result is useful evidence, not a crashed command. Workspai names what
194
- is missing or failing and keeps the generated reports available for inspection.
126
+ A blocked result is useful evidence, not a crashed command.
127
+ Inspect the named check and its report before claiming readiness.
128
+ [Agent setup and entry checks](docs/agent-entry.md)
195
129
 
196
130
  ## How Workspace Intelligence works
197
131
 
198
- ```text
199
- Workspace sources
200
- │
201
- ▼
202
- Canonical Workspace Model
203
- │
204
- ▼
205
- Evidence-backed Knowledge Graph
206
- │
207
- ▼
208
- Impact · Doctor · Verify · Context · Explain
209
- │
210
- ▼
211
- Humans · CI · IDEs · MCP · AI agents
212
- ```
213
-
214
- The **Workspace Model is the canonical source of truth**. The Knowledge Graph is
215
- a **derived, revision-bound representation** of that model. It can add
216
- proof-backed detail without becoming a second source of truth or mutating the
217
- model that authorized the run.
132
+ Workspai reads the workspace, builds a map, checks evidence, and prepares context.
133
+ The **Workspace Model is the canonical source of truth**. The graph is a
134
+ **derived, revision-bound representation**; providers enrich it without rewriting
135
+ the model during the same run.
218
136
 
219
- A missing relationship means **not proven by current evidence**, not "these
220
- projects are independent."
137
+ A missing relationship means **not proven**, not "these projects are independent."
221
138
 
222
- The full contract-backed chain is:
139
+ <details>
140
+ <summary>The full intelligence chain and CI command</summary>
223
141
 
224
142
  ```text
225
143
  Model → Diff → Impact → Doctor + Contract Verify + Analyze → Readiness
226
144
  → Verify → Context → Agent Sync → Explain
227
145
  ```
228
146
 
229
- Run it with:
230
-
231
147
  ```bash
232
148
  npx workspai workspace intelligence run --for-agent generic --strict --json
233
149
  ```
234
150
 
235
- `pipeline --json --strict` is the broader release and governance workflow. It
236
- complements this chain; it does not replace it.
151
+ `pipeline --json --strict` is the broader release/governance workflow and
152
+ complements this runner.
153
+
154
+ </details>
237
155
 
238
- The deterministic model, graph, and checks do not require an AI API key.
156
+ [Runner behavior and exit codes](docs/workspace-intelligence-runner.md)
239
157
 
240
- ### See the evidence-backed graph
158
+ <details>
159
+ <summary>See a workspace graph</summary>
241
160
 
242
- The graph connects projects, APIs, packages, tests, infrastructure, ownership,
243
- and runtime topology only when current evidence supports the relationship.
244
- Every visible relationship can retain proof, while missing relationships stay
245
- explicitly unproven.
161
+ ![Interactive view of a Workspai workspace graph](https://raw.githubusercontent.com/chistiq/workspai/main/packages/cli/docs/workspace-graph.gif)
246
162
 
247
- ![Interactive 3D view of a real Workspai workspace graph](https://raw.githubusercontent.com/chistiq/workspai/main/packages/cli/docs/workspace-graph.gif)
163
+ [Explore the graph](docs/workspace-knowledge-graph.md)
248
164
 
249
- [Query, explain, and export the graph](docs/workspace-knowledge-graph.md)
165
+ </details>
250
166
 
251
167
  ## Everyday workflows
252
168
 
253
- | Goal | Command |
254
- | ------------------------------------------- | ------------------------------------------------------------------------------------------------ |
255
- | Use guided setup | `npx workspai create` |
256
- | Link a project without moving it | `npx workspai adopt .` |
257
- | Initialize workspace and project dependencies | `npx workspai init` |
258
- | Refresh the complete system view | `npx workspai workspace intelligence run --for-agent generic --strict --json` |
259
- | Turn an outcome into governed work | `npx workspai goal "Raise test coverage to 85%"` |
260
- | Prove an agent change from intent to verify | `npx workspai change begin --json` |
261
- | Ground an agent before source discovery | `npx workspai agent bootstrap --for-agent generic --strict --json` |
262
- | Copy or clone a project into a workspace | `npx workspai import <path-or-git-url> --workspace <path>` |
263
- | Diagnose project or workspace health | `npx workspai doctor project` / `npx workspai doctor workspace` |
264
- | Observe CLI and Studio activity | `npx workspai live --once --json --projection board` |
265
- | Ask a focused architecture question | `npx workspai workspace graph search "authentication service" --limit 12 --json` |
266
- | Verify current evidence | `npx workspai workspace verify --strict --json` |
267
- | Inspect a governed repair before execution | `npx workspai workspace repair capabilities --json` |
268
- | Refresh agent and IDE context | `npx workspai workspace agent-sync --write --preset enterprise --json` |
269
- | Run the broader release gate | `npx workspai pipeline --strict --json` |
270
- | Start MCP server for workspace queries | `npx workspai workspace mcp serve` |
271
-
272
- For every command and flag, use the
273
- [Command Reference](docs/commands-reference.md).
169
+ | You want to… | Run |
170
+ | --- | --- |
171
+ | Refresh context and checks | `npx workspai workspace intelligence run --for-agent generic` |
172
+ | Explore a topic from your code | `npx workspai workspace graph search "authentication" --limit 5 --json` |
173
+ | Diagnose your project or workspace | `npx workspai doctor project` / `npx workspai doctor workspace` |
174
+ | Start a new project | `npx workspai create` |
175
+ | Serve workspace queries to an MCP client | `npx workspai workspace mcp serve` |
274
176
 
275
- ## Outputs and integrations
177
+ Search results include evidence references. Follow them before changing code.
178
+ [All commands and flags](docs/commands-reference.md)
276
179
 
277
- Workspai exposes the same governed data through several stable surfaces:
180
+ ## Outputs and integrations
278
181
 
279
- - human-readable terminal summaries;
280
- - JSON output for scripts and CI;
281
- - versioned artifacts under `.workspai/reports/`;
282
- - focused context and instructions for AI agents;
283
- - MCP server with versioned read-oriented workspace tools (`workspace mcp serve`);
284
- - Live activity projections and reports for IDEs and dashboards;
285
- - JSON, JSON-LD, Mermaid, DOT, GraphML, and GEXF graph exports.
182
+ Use terminal summaries for a first look, JSON for automation, and saved context
183
+ for coding agents. Graph exports include JSON, Mermaid, DOT, GraphML, and GEXF.
184
+ Live activity projections and reports for IDEs and dashboards show current activity;
185
+ activity alone does not prove a change is correct.
286
186
 
287
- The [Workspai VS Code extension](https://marketplace.visualstudio.com/items?itemName=rapidkit.rapidkit-vscode)
288
- uses this CLI, so visual and terminal workflows share the same contracts and
289
- artifacts.
187
+ The [VS Code extension](https://marketplace.visualstudio.com/items?itemName=rapidkit.rapidkit-vscode)
188
+ uses the same CLI and workspace artifacts.
290
189
 
291
190
  ## Requirements
292
191
 
293
- - Node.js `>=20.19.0`
294
- - npm
295
-
296
- Python, Go, Java, .NET, Rust, or PHP are needed only for workflows that use
297
- those runtimes. Python is not required for Python-free workspaces or npm-owned
298
- project generators.
299
-
300
- RapidKit Core is the optional Python engine for Python/Core-dependent kits and
301
- modules; Workspai remains the workspace-level CLI.
192
+ Node.js **20.19+** and npm. Other runtimes are needed only for projects and
193
+ workflows that use them. Python is not required for Python-free workflows;
194
+ RapidKit Core supports the Python/Core-dependent kits and modules.
302
195
 
303
196
  ## Documentation
304
197
 
305
- | Goal | Guide |
306
- | --------------------------------------------- | ---------------------------------------------------------------------------------------------- |
307
- | Learn the main terms | [Glossary](docs/GLOSSARY.md) |
308
- | Create, adopt, import, or connect software | [Creating workspaces and projects](docs/creating-workspaces-and-projects.md) |
309
- | Query Graph and inspect proof | [Workspace Knowledge Graph](docs/workspace-knowledge-graph.md) |
310
- | Understand the exact decision loop | [Workspace Intelligence runner](docs/workspace-intelligence-runner.md) |
311
- | Run dependency, test, and build stages | [Workspace Run](docs/workspace-run.md) |
312
- | Observe CLI and Studio activity | [Workspai Live](docs/workspace-live-activity.md) |
313
- | Plan, approve, execute, or roll back a repair | [Workspace Repair Engine](docs/workspace-repair-engine.md) |
314
- | Set a release, security, or coverage outcome | [Verified engineering goals](docs/workspace-intelligence-runner.md#verified-engineering-goals) |
315
- | Compile plain language into a governed plan | [Goal Packs](docs/goal-packs.md) |
316
- | Prove what an agent changed and why | [Proof-Carrying Change](docs/proof-carrying-change.md) |
317
- | Ground an agent in canonical project evidence | [Canonical-first agent entry](docs/agent-entry.md) |
318
- | Measure bounded retrieval and model usage | [Evaluation](docs/workspace-intelligence-evaluation.md) and [benchmark](docs/workspace-intelligence-benchmark.md) |
319
- | Integrate CI | [CI workflows](docs/ci-workflows.md) |
320
- | Find generated files and schemas | [Artifact Catalog](docs/contracts/ARTIFACT_CATALOG.md) |
321
- | Browse all documentation | [Documentation index](docs/README.md) |
198
+ | Next step | Guide |
199
+ | --- | --- |
200
+ | Create, adopt, or import a project | [Getting started](docs/creating-workspaces-and-projects.md) |
201
+ | Connect your coding agent | [Agent entry](docs/agent-entry.md) |
202
+ | Understand relationships | [Knowledge Graph](docs/workspace-knowledge-graph.md) |
203
+ | Add checks to CI | [CI workflows](docs/ci-workflows.md) |
204
+ | Find a command or understand a term | [Command reference](docs/commands-reference.md) · [Glossary](docs/GLOSSARY.md) |
205
+
206
+ [Browse all guides](docs/README.md)
322
207
 
323
208
  ## Troubleshooting
324
209
 
325
- | Problem | Next step |
326
- | ------------------------------------ | ---------------------------------------------------------------------------------------- |
327
- | The workspace is not detected | Run from the project/workspace or inspect `npx workspai project workspace status --json` |
328
- | A check reports stale evidence | Re-run the complete Workspace Intelligence command |
329
- | A runtime is missing | Install only the runtime required by that project |
330
- | An agent cannot find current context | Run `npx workspai workspace agent-sync --write --refresh-context --json` |
331
- | You need a specific flag | Open the [Command Reference](docs/commands-reference.md) |
210
+ - **Workspace not detected?** Run from your linked project, or inspect
211
+ `npx workspai project workspace status --json`.
212
+ - **Context is stale?** Rerun the intelligence command.
213
+ - **A check is blocked?** Read the named report; adoption does not certify project health.
214
+ - **Agent files need refreshing?** Run
215
+ `npx workspai workspace agent-sync --write --refresh-context --json`.
332
216
 
333
217
  ## Contributing
334
218
 
335
- Workspai is developed in the open by
336
- [Chistiq](https://chistiq.com/), the intelligence infrastructure company behind
337
- RapidKit and Workspai.
219
+ [Contribution guide](CONTRIBUTING.md) · [Development](docs/DEVELOPMENT.md) ·
220
+ [Security](docs/SECURITY.md)
338
221
 
339
- Read [CONTRIBUTING.md](CONTRIBUTING.md), the
340
- [Development Guide](docs/DEVELOPMENT.md), and the
341
- [Security Policy](docs/SECURITY.md).
222
+ Built by [Chistiq](https://chistiq.com/), the team behind RapidKit and Workspai.
342
223
 
343
224
  ## License
344
225
 
@@ -518,7 +518,7 @@
518
518
  "canExecuteCreate": true,
519
519
  "versionPolicy": "latest-stable",
520
520
  "officialCommands": [
521
- "npx create-electron-app@latest <name> --template=vite-typescript"
521
+ "npx create-electron-app@latest <name> --template vite --typescript"
522
522
  ],
523
523
  "adoptAfterCreate": true,
524
524
  "category": "desktop"
@@ -0,0 +1 @@
1
+ export{b as printAnalyzeReport,a as runAnalyze}from'./chunk-VT4WPXTO.js';
@@ -0,0 +1 @@
1
+ export{b as AUTOPILOT_RELEASE_ALIAS_FILENAME,a as AUTOPILOT_RELEASE_LAST_RUN_FILENAME,c as runAutopilotRelease}from'./chunk-MJYWGRCY.js';
@@ -1 +1 @@
1
- import {d,n}from'./chunk-QDM6TWFK.js';import {a,b}from'./chunk-S5KTATOU.js';function u(r){let s=new Map;for(let n of r.projects)s.has(n.name)||s.set(n.name,d(n));return s}function w(r){let s=u(r),n$1=n(r)??{nodes:r.projects.map(t=>({id:t.name,path:t.path})),edges:[]},a$1=a(n$1),o=new Map;for(let t of n$1.nodes){let e=s.get(t.id)??d({missing:t.id}),l=[...b(a$1,[t.id],{direction:"dependencies"}).keys()].filter(c=>c!==t.id).sort((c,f)=>c.localeCompare(f)).map(c=>({id:c,hash:s.get(c)??"<unknown>"}));o.set(t.id,{id:t.id,ownHash:e,transitiveInputsHash:d({own:e,dependencies:l})});}return o}function y(r,s){if(!s||Object.keys(s).length===0)return {verdict:"unknown",baseline:"none",changed:[],added:[],removed:[]};let n=[],a=[];for(let[e,i]of r.entries())e in s?s[e]!==i.transitiveInputsHash&&n.push(e):a.push(e);let o=[];for(let e of Object.keys(s))r.has(e)||o.push(e);return n.sort((e,i)=>e.localeCompare(i)),a.sort((e,i)=>e.localeCompare(i)),o.sort((e,i)=>e.localeCompare(i)),{verdict:n.length>0||a.length>0||o.length>0?"stale":"fresh",baseline:"recorded",changed:n,added:a,removed:o}}function M(r){let s={};for(let[n,a]of [...r.entries()].sort((o,t)=>o[0].localeCompare(t[0])))s[n]=a.transitiveInputsHash;return s}export{u as a,w as b,y as c,M as d};
1
+ import {d,n}from'./chunk-O4TZKLEC.js';import {a,b}from'./chunk-S5KTATOU.js';function u(r){let s=new Map;for(let n of r.projects)s.has(n.name)||s.set(n.name,d(n));return s}function w(r){let s=u(r),n$1=n(r)??{nodes:r.projects.map(t=>({id:t.name,path:t.path})),edges:[]},a$1=a(n$1),o=new Map;for(let t of n$1.nodes){let e=s.get(t.id)??d({missing:t.id}),l=[...b(a$1,[t.id],{direction:"dependencies"}).keys()].filter(c=>c!==t.id).sort((c,f)=>c.localeCompare(f)).map(c=>({id:c,hash:s.get(c)??"<unknown>"}));o.set(t.id,{id:t.id,ownHash:e,transitiveInputsHash:d({own:e,dependencies:l})});}return o}function y(r,s){if(!s||Object.keys(s).length===0)return {verdict:"unknown",baseline:"none",changed:[],added:[],removed:[]};let n=[],a=[];for(let[e,i]of r.entries())e in s?s[e]!==i.transitiveInputsHash&&n.push(e):a.push(e);let o=[];for(let e of Object.keys(s))r.has(e)||o.push(e);return n.sort((e,i)=>e.localeCompare(i)),a.sort((e,i)=>e.localeCompare(i)),o.sort((e,i)=>e.localeCompare(i)),{verdict:n.length>0||a.length>0||o.length>0?"stale":"fresh",baseline:"recorded",changed:n,added:a,removed:o}}function M(r){let s={};for(let[n,a]of [...r.entries()].sort((o,t)=>o[0].localeCompare(t[0])))s[n]=a.transitiveInputsHash;return s}export{u as a,w as b,y as c,M as d};
@@ -1,4 +1,4 @@
1
- import {a as a$1}from'./chunk-JEI6BTZI.js';import {a}from'./chunk-IVYPC36J.js';import {c,e,d}from'./chunk-QYEQVNBF.js';import {d as d$1,b}from'./chunk-IQJL3LBM.js';import {g}from'./chunk-VEMGICT4.js';import {r,n}from'./chunk-QDM6TWFK.js';import {p,d as d$2}from'./chunk-MD4CHXV3.js';import {h}from'./chunk-BLEIUQL6.js';import {b as b$1}from'./chunk-VN2MKTQO.js';import {a as a$2}from'./chunk-AFIFZTOY.js';import j from'path';import P from'fs-extra';function Y(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:{}}function Q(e$1){switch(e$1){case "why":return d;case "trace":return e;default:return c}}async function E(e,n,o){try{if(!await P.pathExists(e))return null;let r=await P.readJson(e);return n?b$1(n,r,e):o&&a$2(r,o,e),r}catch(r){if((n||o)&&await P.pathExists(e))throw r;return null}}function q(e,n){if(!e)return null;let o=n.trim().toLowerCase();return e.projects.find(r=>r.slug.toLowerCase()===o||r.relativePath.toLowerCase()===o)??null}function U(e,n$1,o){let r=o.trim().toLowerCase(),t=(n(e)?.nodes.map(a=>a.id)??e.projects.map(a=>a.name)).find(a=>a.toLowerCase()===r);if(t)return t;let m=e.projects.find(a=>[a.name,a.path,j.basename(a.path)].filter(u=>u.trim().length>0).some(u=>u.toLowerCase()===r));if(m)return m.name;let p=q(n$1,o);if(p){let a=e.projects.find(u=>u.path===p.relativePath||u.path.endsWith(`/${p.relativePath}`));if(a)return a.name}return o}function Z(e,n){if(!e)return [];let o=n.trim().toLowerCase(),r=new Set;for(let d of e.projects){d.contracts.dependsOn?.some(t=>t.toLowerCase()===o)&&r.add(d.slug);for(let t of d.contracts.consumes??[])for(let m of e.projects)m.contracts.publishes?.includes(t)&&m.slug===o&&r.add(d.slug);}return [...r].sort()}function ee(e,n){if(!e)return [];let o=n.trim().toLowerCase();return e.steps.filter(r=>r.scope==="project"&&r.project?.toLowerCase()===o&&r.command?.display).map(r=>r.command.display).slice(0,8)}function l(e,n,o){return {id:e,title:n,body:o.trim()}}async function he(e){let n$1=j.resolve(e.workspacePath),o=(e.now??new Date).toISOString(),r$1=e.model??await r({workspacePath:n$1,includeEvidence:true}),d=e.contract;if(d===void 0)try{d=(await p({workspacePath:n$1})).contract;}catch{d=null;}let t=e.verify;t===void 0&&(t=await E(j.join(n$1,d$1),d$1));let m=e.impact;if(m===void 0&&(m=await E(j.join(n$1,g),g)),e.target.kind==="release-blocked"){let s=t?.blockingReasons??[],c=(r$1.summary?.projectCount??r$1.projects.length)===0,g=[l("verdict",c?"Workspace scaffold posture":"Release verdict",t?c?`Scaffold posture: **${t.summary.verdict}** (exit ${t.summary.exitCode}). Freshness: **${t.freshness.verdict}**. No registered projects yet \u2014 release gates apply after the first project is added.`:`Verdict: **${t.summary.verdict}** (exit ${t.summary.exitCode}). Risk: **${t.impact.risk}**. Freshness: **${t.freshness.verdict}**.`:"No workspace verify report found. Run `npx workspai workspace verify --json --write` first."),l("blockers",c?"Pre-project signals":"Blocking reasons",s.length?s.map(h=>`- ${h}`).join(`
1
+ import {a as a$1}from'./chunk-JEI6BTZI.js';import {a}from'./chunk-IVYPC36J.js';import {c,e,d}from'./chunk-QYEQVNBF.js';import {d as d$1,b}from'./chunk-ZONAHZBG.js';import {g}from'./chunk-SKHRUHXO.js';import {r,n}from'./chunk-O4TZKLEC.js';import {p,d as d$2}from'./chunk-WU5M6UP7.js';import {h}from'./chunk-BLEIUQL6.js';import {b as b$1}from'./chunk-VN2MKTQO.js';import {a as a$2}from'./chunk-AFIFZTOY.js';import j from'path';import P from'fs-extra';function Y(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:{}}function Q(e$1){switch(e$1){case "why":return d;case "trace":return e;default:return c}}async function E(e,n,o){try{if(!await P.pathExists(e))return null;let r=await P.readJson(e);return n?b$1(n,r,e):o&&a$2(r,o,e),r}catch(r){if((n||o)&&await P.pathExists(e))throw r;return null}}function q(e,n){if(!e)return null;let o=n.trim().toLowerCase();return e.projects.find(r=>r.slug.toLowerCase()===o||r.relativePath.toLowerCase()===o)??null}function U(e,n$1,o){let r=o.trim().toLowerCase(),t=(n(e)?.nodes.map(a=>a.id)??e.projects.map(a=>a.name)).find(a=>a.toLowerCase()===r);if(t)return t;let m=e.projects.find(a=>[a.name,a.path,j.basename(a.path)].filter(u=>u.trim().length>0).some(u=>u.toLowerCase()===r));if(m)return m.name;let p=q(n$1,o);if(p){let a=e.projects.find(u=>u.path===p.relativePath||u.path.endsWith(`/${p.relativePath}`));if(a)return a.name}return o}function Z(e,n){if(!e)return [];let o=n.trim().toLowerCase(),r=new Set;for(let d of e.projects){d.contracts.dependsOn?.some(t=>t.toLowerCase()===o)&&r.add(d.slug);for(let t of d.contracts.consumes??[])for(let m of e.projects)m.contracts.publishes?.includes(t)&&m.slug===o&&r.add(d.slug);}return [...r].sort()}function ee(e,n){if(!e)return [];let o=n.trim().toLowerCase();return e.steps.filter(r=>r.scope==="project"&&r.project?.toLowerCase()===o&&r.command?.display).map(r=>r.command.display).slice(0,8)}function l(e,n,o){return {id:e,title:n,body:o.trim()}}async function he(e){let n$1=j.resolve(e.workspacePath),o=(e.now??new Date).toISOString(),r$1=e.model??await r({workspacePath:n$1,includeEvidence:true}),d=e.contract;if(d===void 0)try{d=(await p({workspacePath:n$1})).contract;}catch{d=null;}let t=e.verify;t===void 0&&(t=await E(j.join(n$1,d$1),d$1));let m=e.impact;if(m===void 0&&(m=await E(j.join(n$1,g),g)),e.target.kind==="release-blocked"){let s=t?.blockingReasons??[],c=(r$1.summary?.projectCount??r$1.projects.length)===0,g=[l("verdict",c?"Workspace scaffold posture":"Release verdict",t?c?`Scaffold posture: **${t.summary.verdict}** (exit ${t.summary.exitCode}). Freshness: **${t.freshness.verdict}**. No registered projects yet \u2014 release gates apply after the first project is added.`:`Verdict: **${t.summary.verdict}** (exit ${t.summary.exitCode}). Risk: **${t.impact.risk}**. Freshness: **${t.freshness.verdict}**.`:"No workspace verify report found. Run `npx workspai workspace verify --json --write` first."),l("blockers",c?"Pre-project signals":"Blocking reasons",s.length?s.map(h=>`- ${h}`).join(`
2
2
  `):c?"No pre-project signals in the latest verify report.":"No blocking reasons in the latest verify report.")];return t?.resolutionHints?.length&&g.push(l("resolution","Resolution hints",t.resolutionHints.map(h=>`- **${h.blockerId}** (${h.resolutionClass}): ${h.commandRetryHint??h.fixHints[0]?.detail??"See fix hints"}`).join(`
3
3
  `))),{schemaVersion:a,generatedAt:o,workspacePath:n$1,target:e.target,summary:t?c?b(s.length,t.summary.verdict):s.length>0||t.summary.verdict==="blocked"?`Release blocked: ${t.summary.verdict} with ${s.length} blocking reason(s).`:t.summary.verdict==="needs-attention"?"Release needs attention: advisory or incomplete verification evidence remains; no blocking reason was reported.":`Release posture: ${t.summary.verdict}; no blocking reason was reported.`:"Release posture unknown \u2014 verify report missing.",sections:g,releaseVerdict:t?.summary.verdict,evidenceFreshness:t?.freshness.verdict,blocking:!!(t&&(t.summary.verdict==="blocked"||s.length>0)),releaseRisk:t?.impact.risk,blockingReasons:s,resolutionHints:t?.resolutionHints}}if(e.target.kind==="blocker"){let s=e.target,f=t?.resolutionHints?.find(g=>g.blockerId===s.blockerId),c=t?.blockingReasons.find(g=>g.includes(s.blockerId))??t?.blockingReasons[0];return {schemaVersion:a,generatedAt:o,workspacePath:n$1,target:s,summary:f?`Blocker ${s.blockerId}: ${f.resolutionClass}`:`Blocker ${s.blockerId} (no structured hint)`,sections:[l("reason","Blocking signal",c??"No matching blocking reason in verify."),l("hint","Resolution class",f?`${f.resolutionClass}
4
4
 
@@ -1 +1 @@
1
- import a from'path';import Y from'fs-extra';import q from'chalk';async function U(p,n={}){let e=a.resolve(p),{WORKSPACE_CONTRACT_PATH:l,syncWorkspaceContract:d,verifyWorkspaceContract:S,writeWorkspaceContractVerifyEvidence:j}=await import('./workspace-contract-XDNIB5JX.js'),w=await d({workspacePath:e,strict:true}),{syncWorkspaceReadme:E,WORKSPACE_README_PATH:R}=await import('./workspace-readme-4FCKAQME.js'),x=await E({workspacePath:e,workspaceName:w.contract.workspace.name,profile:w.contract.workspace.profile??"minimal",projectCount:w.contract.projects.length}),{buildWorkspaceModel:h,writeWorkspaceModel:g}=await import('./workspace-model-J757KSDE.js'),r=await h({workspacePath:e,includeEvidence:true}),k=await g(r,e),{buildWorkspaceImpact:G,buildWorkspaceModelSnapshot:O,diffWorkspaceModel:$,writeWorkspaceImpact:M,writeWorkspaceModelDiff:T,writeWorkspaceModelSnapshot:_}=await import('./workspace-intelligence-24MZRG2S.js'),{WORKSPACE_INTELLIGENCE_ARTIFACTS:s}=await import('./workspace-intelligence-runtime-registry-ZLPF7BAY.js'),{syncWorkspaceAgentGrounding:P}=await import('./workspace-agent-sync-GLG36KQZ.js'),W=await P({workspacePath:e,model:r,write:true,refreshContext:true,strict:false,preset:"enterprise",targets:["all"],projectGrounding:n.projectGrounding??"managed"}),v=new Set(W.writtenFiles),i=new Set(W.projectLenses?.skipped.map(t=>`${t.name}: ${t.reason}`)??[]),{readWorkspaceKnowledgeGraphSnapshot:C}=await import('./workspace-knowledge-graph-snapshot-T6ZJGWLC.js'),o=await C(e),y=false;if(o.status==="miss"){if(o.reason!=="live-input-mismatch")throw new Error(`Workspace consumer sync could not validate canonical Model/Graph evidence (${o.reason}).`);r=await h({workspacePath:e,includeEvidence:true}),k=await g(r,e);let{buildWorkspaceAgentContext:t,writeWorkspaceAgentContext:f}=await import('./workspace-context-BZV4ZFKZ.js'),m=await t({workspacePath:e,model:r,agent:"generic",includeEvidence:true});await f(m,e);let b=await P({workspacePath:e,model:r,write:true,refreshContext:false,strict:false,preset:"enterprise",targets:["all"],projectGrounding:n.projectGrounding??"managed"});for(let c of b.writtenFiles)v.add(c);for(let c of b.projectLenses?.skipped??[])i.add(`${c.name}: ${c.reason}`);if(o=await C(e),o.status==="miss")throw new Error(`Workspace consumer reconciliation did not produce fresh canonical evidence (${o.reason}).`);y=true;}let F=a.join(e,s.snapshot),u=false;if(!await Y.pathExists(F)){let t=await O({workspacePath:e,model:r});await _(t,e),u=true;}let I=await $({workspacePath:e,fromPath:s.snapshot,model:r}),N=await T(I,e),L=await G({workspacePath:e,fromPath:s.diff}),K=await M(L,e),z=await S({workspacePath:e,strict:true}),H=await j({workspacePath:e,result:z}),V=(o.graph.source.inputs?.scopes??[]).filter(t=>t.truncated);for(let t of V)i.add(`${t.kind}:${t.id} graph inventory reached its ${t.fileLimit}-file emergency bound; inventory completeness is bounded.`);let A=o.graph.quality.completeness?.providers.bounded??0;A>0&&i.add(`${A} graph provider(s) used declared adaptive semantic/deep budgets; inspect provider inputCoverage before making exhaustive symbol-level claims.`);let D=[l,(await import('./workspace-registry-summary-ZC5CFZXP.js')).WORKSPACE_REGISTRY_SUMMARY_RELATIVE_PATH,a.relative(e,x).split(a.sep).join("/")||R,a.relative(e,k).split(a.sep).join("/"),s.knowledgeGraph,...u?[s.snapshot]:[],a.relative(e,N).split(a.sep).join("/"),a.relative(e,K).split(a.sep).join("/"),a.relative(e,H).split(a.sep).join("/"),...v].filter((t,f,m)=>m.indexOf(t)===f);return n.silent||console.log(q.gray(`\u2713 Workspace Intelligence synced \xB7 ${r.summary.projectCount} project(s) \xB7 model + graph + agent grounding \xB7 freshness sealed`)),{workspacePath:e,projectCount:r.summary.projectCount,baselineCreated:u,freshnessSealed:true,reconciledAfterGrounding:y,writtenFiles:D,warnings:[...i].sort()}}async function ee(p,n={}){let e=a.resolve(p),l=n.workspaceName??a.basename(e),{registerWorkspaceStrict:d}=await import('./workspace-J5QYWAE3.js');return await d(e,l),U(e,{silent:n.silent})}export{U as a,ee as b};
1
+ import a from'path';import Y from'fs-extra';import q from'chalk';async function U(p,n={}){let e=a.resolve(p),{WORKSPACE_CONTRACT_PATH:l,syncWorkspaceContract:d,verifyWorkspaceContract:S,writeWorkspaceContractVerifyEvidence:j}=await import('./workspace-contract-N2BJCAJ7.js'),w=await d({workspacePath:e,strict:true}),{syncWorkspaceReadme:E,WORKSPACE_README_PATH:R}=await import('./workspace-readme-4FCKAQME.js'),x=await E({workspacePath:e,workspaceName:w.contract.workspace.name,profile:w.contract.workspace.profile??"minimal",projectCount:w.contract.projects.length}),{buildWorkspaceModel:h,writeWorkspaceModel:g}=await import('./workspace-model-LBICKRVI.js'),r=await h({workspacePath:e,includeEvidence:true}),k=await g(r,e),{buildWorkspaceImpact:G,buildWorkspaceModelSnapshot:O,diffWorkspaceModel:$,writeWorkspaceImpact:M,writeWorkspaceModelDiff:T,writeWorkspaceModelSnapshot:_}=await import('./workspace-intelligence-ZTET7JHS.js'),{WORKSPACE_INTELLIGENCE_ARTIFACTS:s}=await import('./workspace-intelligence-runtime-registry-ZLPF7BAY.js'),{syncWorkspaceAgentGrounding:P}=await import('./workspace-agent-sync-46L7ZOQQ.js'),W=await P({workspacePath:e,model:r,write:true,refreshContext:true,strict:false,preset:"enterprise",targets:["all"],projectGrounding:n.projectGrounding??"managed"}),v=new Set(W.writtenFiles),i=new Set(W.projectLenses?.skipped.map(t=>`${t.name}: ${t.reason}`)??[]),{readWorkspaceKnowledgeGraphSnapshot:C}=await import('./workspace-knowledge-graph-snapshot-UTJHALST.js'),o=await C(e),y=false;if(o.status==="miss"){if(o.reason!=="live-input-mismatch")throw new Error(`Workspace consumer sync could not validate canonical Model/Graph evidence (${o.reason}).`);r=await h({workspacePath:e,includeEvidence:true}),k=await g(r,e);let{buildWorkspaceAgentContext:t,writeWorkspaceAgentContext:f}=await import('./workspace-context-VVZARI5K.js'),m=await t({workspacePath:e,model:r,agent:"generic",includeEvidence:true});await f(m,e);let b=await P({workspacePath:e,model:r,write:true,refreshContext:false,strict:false,preset:"enterprise",targets:["all"],projectGrounding:n.projectGrounding??"managed"});for(let c of b.writtenFiles)v.add(c);for(let c of b.projectLenses?.skipped??[])i.add(`${c.name}: ${c.reason}`);if(o=await C(e),o.status==="miss")throw new Error(`Workspace consumer reconciliation did not produce fresh canonical evidence (${o.reason}).`);y=true;}let F=a.join(e,s.snapshot),u=false;if(!await Y.pathExists(F)){let t=await O({workspacePath:e,model:r});await _(t,e),u=true;}let I=await $({workspacePath:e,fromPath:s.snapshot,model:r}),N=await T(I,e),L=await G({workspacePath:e,fromPath:s.diff}),K=await M(L,e),z=await S({workspacePath:e,strict:true}),H=await j({workspacePath:e,result:z}),V=(o.graph.source.inputs?.scopes??[]).filter(t=>t.truncated);for(let t of V)i.add(`${t.kind}:${t.id} graph inventory reached its ${t.fileLimit}-file emergency bound; inventory completeness is bounded.`);let A=o.graph.quality.completeness?.providers.bounded??0;A>0&&i.add(`${A} graph provider(s) used declared adaptive semantic/deep budgets; inspect provider inputCoverage before making exhaustive symbol-level claims.`);let D=[l,(await import('./workspace-registry-summary-3PXZENLC.js')).WORKSPACE_REGISTRY_SUMMARY_RELATIVE_PATH,a.relative(e,x).split(a.sep).join("/")||R,a.relative(e,k).split(a.sep).join("/"),s.knowledgeGraph,...u?[s.snapshot]:[],a.relative(e,N).split(a.sep).join("/"),a.relative(e,K).split(a.sep).join("/"),a.relative(e,H).split(a.sep).join("/"),...v].filter((t,f,m)=>m.indexOf(t)===f);return n.silent||console.log(q.gray(`\u2713 Workspace Intelligence synced \xB7 ${r.summary.projectCount} project(s) \xB7 model + graph + agent grounding \xB7 freshness sealed`)),{workspacePath:e,projectCount:r.summary.projectCount,baselineCreated:u,freshnessSealed:true,reconciledAfterGrounding:y,writtenFiles:D,warnings:[...i].sort()}}async function ee(p,n={}){let e=a.resolve(p),l=n.workspaceName??a.basename(e),{registerWorkspaceStrict:d}=await import('./workspace-XVPKQG5W.js');return await d(e,l),U(e,{silent:n.silent})}export{U as a,ee as b};