rapidkit 0.41.1 → 0.41.3

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 (77) hide show
  1. package/README.md +132 -58
  2. package/contracts/agent-customization-pack.v1.json +15 -0
  3. package/contracts/doctor-project-evidence.v1.json +260 -2
  4. package/contracts/doctor-remediation-plan.v1.json +496 -0
  5. package/contracts/doctor-workspace-evidence.v1.json +260 -2
  6. package/contracts/extension-cli-compatibility.v1.json +5 -2
  7. package/contracts/runtime-command-surface.v1.json +3 -1
  8. package/contracts/workspace-intelligence/doctor-fix-result.v1.json +11 -1
  9. package/contracts/workspace-intelligence/fact-freshness.v1.json +58 -0
  10. package/contracts/workspace-intelligence/studio-blocker-handoff.v1.json +24 -0
  11. package/contracts/workspace-intelligence/workspace-context.v1.json +84 -1
  12. package/contracts/workspace-intelligence/workspace-intelligence-history.v1.json +6 -2
  13. package/contracts/workspace-intelligence/workspace-model.v1.json +80 -0
  14. package/dist/analyze-UTB3PNKM.js +1 -0
  15. package/dist/autopilot-release-GBH7PIIZ.js +1 -0
  16. package/dist/{chunk-CKXJR3YT.js → chunk-3CYEVV6H.js} +1 -1
  17. package/dist/{chunk-RSYUNEH7.js → chunk-42ARJBM7.js} +1 -1
  18. package/dist/chunk-6UBWN4EE.js +2 -0
  19. package/dist/chunk-7BEZH5LE.js +2 -0
  20. package/dist/{chunk-ITJ6RKUW.js → chunk-AM5OJWXF.js} +1 -1
  21. package/dist/{chunk-KIUSCFHF.js → chunk-C4ASE2DV.js} +1 -1
  22. package/dist/chunk-COBMOVUK.js +1 -0
  23. package/dist/{chunk-ELU3G6DQ.js → chunk-DKNVDNT4.js} +1 -1
  24. package/dist/chunk-GD6VML5K.js +32 -0
  25. package/dist/chunk-GH674HP5.js +4 -0
  26. package/dist/chunk-HT3G7HOV.js +78 -0
  27. package/dist/{chunk-BFEBZABL.js → chunk-KZLRUBQ5.js} +19 -19
  28. package/dist/chunk-O74N26AD.js +1 -0
  29. package/dist/chunk-TDSIF42O.js +1 -0
  30. package/dist/chunk-TSUQQTHI.js +1 -0
  31. package/dist/chunk-ULIVVMT6.js +1 -0
  32. package/dist/{chunk-CDPR2YKL.js → chunk-XRGBKUJO.js} +1 -1
  33. package/dist/chunk-XY3SGMAJ.js +2 -0
  34. package/dist/{create-RNP5ACQL.js → create-XTKHAYH7.js} +1 -1
  35. package/dist/doctor-4UQZIELO.js +1 -0
  36. package/dist/index.d.ts +11 -2
  37. package/dist/index.js +165 -140
  38. package/dist/pipeline-ZCJ6NVRC.js +5 -0
  39. package/dist/{workspace-E554C5SM.js → workspace-VKUBU4M4.js} +1 -1
  40. package/dist/{workspace-agent-sync-2HRPM5ZD.js → workspace-agent-sync-QJWXK3RT.js} +1 -1
  41. package/dist/{workspace-context-VJTXW3K4.js → workspace-context-I5OXR6XB.js} +1 -1
  42. package/dist/workspace-explain-YFKDZRVX.js +1 -0
  43. package/dist/{workspace-feedback-65NR3EZH.js → workspace-feedback-KCDFF7YS.js} +1 -1
  44. package/dist/{workspace-foundation-LISDH53T.js → workspace-foundation-V6SLZRBY.js} +1 -1
  45. package/dist/workspace-history-DSCH7PQZ.js +1 -0
  46. package/dist/{workspace-intelligence-E3KXEZCM.js → workspace-intelligence-4SGJDZ6H.js} +1 -1
  47. package/dist/{workspace-marker-IOPQ42A7.js → workspace-marker-HAC7BMEG.js} +1 -1
  48. package/dist/workspace-mcp-serve-4QN7ZU6C.js +3 -0
  49. package/dist/workspace-model-R6XYEQZO.js +1 -0
  50. package/dist/workspace-run-QRT3JJDB.js +1 -0
  51. package/dist/{workspace-verify-NRYH7RNB.js → workspace-verify-TEQWZOXM.js} +1 -1
  52. package/dist/{workspace-watch-H2AETGFI.js → workspace-watch-WERGZE5P.js} +1 -1
  53. package/docs/contracts/ARTIFACT_CATALOG.md +59 -20
  54. package/docs/contracts/NAMING_AND_COEXISTENCE.md +3 -2
  55. package/docs/contracts/README.md +12 -0
  56. package/docs/doctor-command.md +217 -13
  57. package/package.json +1 -1
  58. package/scripts/enterprise-package-smoke.mjs +50 -45
  59. package/dist/analyze-QYHMGLSG.js +0 -1
  60. package/dist/autopilot-release-AHMQEUFH.js +0 -1
  61. package/dist/chunk-33LR2QEM.js +0 -2
  62. package/dist/chunk-46AGNYI7.js +0 -50
  63. package/dist/chunk-EN6YCX36.js +0 -1
  64. package/dist/chunk-JW2FSKT3.js +0 -2
  65. package/dist/chunk-LKX3L7TE.js +0 -2
  66. package/dist/chunk-RV6HBTFC.js +0 -2
  67. package/dist/chunk-TJN7G2MA.js +0 -1
  68. package/dist/chunk-UQR6G7KH.js +0 -32
  69. package/dist/chunk-VKLL63TL.js +0 -1
  70. package/dist/chunk-VMJA36WD.js +0 -1
  71. package/dist/doctor-XM6QDTDC.js +0 -1
  72. package/dist/pipeline-DH6Z47O4.js +0 -5
  73. package/dist/workspace-explain-3WSJLIJ6.js +0 -1
  74. package/dist/workspace-history-VPDADQKG.js +0 -1
  75. package/dist/workspace-mcp-serve-RFYDCA2L.js +0 -3
  76. package/dist/workspace-model-YL7W3573.js +0 -1
  77. package/dist/workspace-run-GCIQD73R.js +0 -1
package/README.md CHANGED
@@ -1,12 +1,16 @@
1
1
  # RapidKit
2
2
 
3
- ### Open-Source Workspace Intelligence for Software Systems
3
+ ## Open-Source Workspace Intelligence for Software Systems
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/rapidkit.svg?style=flat-square)](https://www.npmjs.com/package/rapidkit)
6
6
  [![Downloads](https://img.shields.io/npm/dm/rapidkit.svg?style=flat-square)](https://www.npmjs.com/package/rapidkit)
7
7
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square)](https://opensource.org/licenses/MIT)
8
8
  [![Built by RapidKit](https://img.shields.io/badge/Built%20by-RapidKit-0f172a?logo=github)](https://www.getrapidkit.com)
9
9
 
10
+ Not another AI coding assistant.
11
+ Not another agent framework.
12
+ Not another context engine.
13
+
10
14
  > One workspace. One truth. Humans and AI aligned.
11
15
 
12
16
  RapidKit turns scattered projects into a governed, agent-ready workspace.
@@ -119,6 +123,7 @@ In RapidKit, Workspace Intelligence is not a chat feature. It is the determinist
119
123
  - **Impact** — what changed and which projects, commands, and release gates are affected
120
124
  - **Verify** — which evidence proves the workspace is ready, blocked, or needs attention
121
125
  - **Sync** — how developers, CI, Workspai, and AI agents stay grounded in the same truth
126
+ - **Freshness** — which facts are durable, derived, evidence-backed, live, or must be verified before use
122
127
 
123
128
  ## From Code to Shared Understanding
124
129
 
@@ -142,6 +147,7 @@ For the visual experience, install the [Workspai VS Code extension](https://mark
142
147
  - [From Code to Shared Understanding](#from-code-to-shared-understanding)
143
148
  - [Typical workflows](#typical-workflows)
144
149
  - [Mental model](#mental-model)
150
+ - [Why this architecture helps](#why-this-architecture-helps)
145
151
  - [Workspace Intelligence Commands](#workspace-intelligence-commands)
146
152
  - [Agent Customization Pack](#agent-customization-pack)
147
153
  - [Requirements](#requirements)
@@ -157,18 +163,18 @@ For the visual experience, install the [Workspai VS Code extension](https://mark
157
163
 
158
164
  ## Typical workflows
159
165
 
160
- | Question | Command |
161
- | --------------------------------------------- | ---------------------------------------------- |
162
- | What projects exist in this workspace? | `workspace model --json` |
163
- | What context should AI agents receive? | `workspace context --for-agent --json --write` |
164
- | What breaks if I change this? | `workspace impact --from <snapshot>` |
165
- | Why is release blocked? | `workspace explain release-blocked --json --write` |
166
+ | Question | Command |
167
+ | --------------------------------------------- | -------------------------------------------------------------------------------------------- |
168
+ | What projects exist in this workspace? | `workspace model --json` |
169
+ | What context should AI agents receive? | `workspace context --for-agent --json --write` |
170
+ | What breaks if I change this? | `workspace impact --from <snapshot>` |
171
+ | Why is release blocked? | `workspace explain release-blocked --json --write` |
166
172
  | Trace a diff through blast radius and gates? | `workspace trace --from .rapidkit/reports/workspace-model-diff-last-run.json --json --write` |
167
- | Can I safely release? | `pipeline --json --strict` |
168
- | How do I align AI tools and CI? | `workspace agent-sync --write` |
169
- | Expose workspace evidence to MCP clients? | `workspace mcp serve` |
170
- | How do I onboard an existing project? | `adopt` |
171
- | How do I bring repositories into a workspace? | `import` |
173
+ | Can I safely release? | `pipeline --json --strict` |
174
+ | How do I align AI tools and CI? | `workspace agent-sync --write` |
175
+ | Expose workspace evidence to MCP clients? | `workspace mcp serve` |
176
+ | How do I onboard an existing project? | `adopt` |
177
+ | How do I bring repositories into a workspace? | `import` |
172
178
 
173
179
  ### Existing project
174
180
 
@@ -211,49 +217,114 @@ New workspaces go under `~/rapidkit/workspaces/<name>`. Legacy `~/Workspai/rapid
211
217
 
212
218
  ## Mental model
213
219
 
214
- ### Two-layer model
220
+ ### Two capabilities, one workspace intelligence layer
215
221
 
216
222
  ```text
217
- First-class engine kitsFastAPI and NestJS (modules + deep generation)
218
- Workspace intelligence frontend apps, Go, Spring, .NET, adopted/imported repos
223
+ Workspace Intelligenceevery project in the workspace
224
+ Native generation first-class scaffolds and stack-specific project creation
225
+ Deep module generation → selected backend engine kits such as FastAPI and NestJS
219
226
  ```
220
227
 
221
- RapidKit treats the **workspace** as the operating boundary: policy, registry, evidence, contracts, and release readiness. Projects can live inside the workspace or be **adopted** from outside.
228
+ Workspace Intelligence is not limited to a framework lane. It works across
229
+ RapidKit-created projects, frontend apps, Go, Spring Boot, .NET, FastAPI, NestJS,
230
+ and adopted/imported repositories. The difference is generation depth:
231
+ some stacks have first-class scaffolds, some use official ecosystem generators,
232
+ and existing projects can be adopted in place.
233
+
234
+ RapidKit treats the **workspace** as the operating boundary: policy, registry,
235
+ evidence, contracts, and release readiness. Projects can live inside the
236
+ workspace or be **adopted** from outside.
222
237
 
223
238
  ```text
224
239
  workspace/
240
+ .rapidkit-workspace
225
241
  .rapidkit/workspace.json
226
242
  .rapidkit/reports/
243
+ workspace-model.json
244
+ workspace-context-agent.json
245
+ INDEX.json
246
+ agent-customization-pack.json
247
+ workspace-skills-index.json
248
+ rapidkit-mcp-design.json
249
+ .rapidkit/skills/
250
+ .rapidkit/AGENT-GROUNDING.md
227
251
  services/api/
252
+ .rapidkit/project.json
253
+ AGENTS.md
254
+ .github/copilot-instructions.md
255
+ .github/instructions/
256
+ .github/prompts/
257
+ .github/skills/
258
+ .github/agents/
259
+ .cursor/rules/rapidkit-grounding.mdc
260
+ CLAUDE.md
261
+ .vscode/rapidkit-agent-hooks.json
228
262
 
229
263
  external-project/
230
264
  .rapidkit/project.json
231
265
  .rapidkit/adopt.json
232
266
  ```
233
267
 
234
- Every tool gets the same answers: what projects exist, what stack they use, which commands are safe, what evidence exists, and what context agents should receive.
268
+ `.rapidkit/workspace.json` is the workspace manifest, not the project list.
269
+ Projects are discovered from workspace project metadata, imported/adopted
270
+ records, and workspace intelligence reports.
271
+
272
+ Agent-facing outputs are generated from the same evidence layer:
273
+ `workspace context --for-agent --write` writes the agent context report, and
274
+ `workspace agent-sync --write --refresh-context --preset enterprise` writes the
275
+ portable `AGENTS.md`, report index, skills, Copilot/Cursor/Claude surfaces, and
276
+ agent handoff files. The exact generated output inventory is recorded in
277
+ `.rapidkit/reports/agent-customization-pack.json` and summarized in the
278
+ [Agent Customization Pack](#agent-customization-pack) section below.
279
+
280
+ Every tool gets the same answers for every registered project: what projects
281
+ exist, what stack they use, which commands are safe, what evidence exists, what
282
+ changed, what release gates apply, and what context agents should receive.
283
+
284
+ ## Why this architecture helps
285
+
286
+ You do not have to change frameworks to benefit from RapidKit.
287
+
288
+ Use the frontend or backend stack that already fits your product: Next.js,
289
+ Vite, FastAPI, NestJS, Go, Spring Boot, .NET, or an existing repository you
290
+ adopt in place. RapidKit adds the workspace layer around it: project registry,
291
+ safe commands, evidence, impact analysis, agent context, verification, and
292
+ release gates.
293
+
294
+ That means you can move faster without turning the product into a fragile
295
+ prototype:
296
+
297
+ - Start new products with governed scaffolds when RapidKit owns the create path
298
+ - Adopt existing products without moving source code or rewriting the stack
299
+ - Give humans, CI, IDEs, and AI agents the same workspace truth
300
+ - Know what changed, what is affected, and what must be verified before release
301
+ - Keep framework stability while adding professional product-development
302
+ workflows around the codebase
303
+
304
+ The result is faster product development with clearer boundaries, safer AI
305
+ assistance, and release decisions backed by evidence instead of guesswork.
235
306
 
236
307
  ## Workspace Intelligence Commands
237
308
 
238
309
  Workspace Intelligence provides a shared understanding of projects, dependencies, operational context, and release readiness for developers, CI pipelines, and AI agents.
239
310
 
240
- | Command | Purpose |
241
- | ------------------------------------------------- | ------------------------------------------------------------------------------------ |
242
- | `workspace model [--cache\|--incremental] --json` | Canonical workspace model (graph-aware, incremental rebuilds) |
243
- | `workspace context --for-agent --json --write` | Agent-ready context pack + auto agent grounding sync |
244
- | `workspace agent-sync --write` | Agent Customization Pack (AGENTS.md, Copilot, Cursor, Claude, INDEX, skills, agents) |
245
- | `workspace snapshot --json` | Persist model snapshot |
246
- | `workspace diff --from <file\|git[:ref]> --json` | Diff against snapshot or git |
247
- | `workspace impact --from <file> --json` | Graph-aware transitive blast-radius evidence |
248
- | `workspace verify [--strict] --json` | Definitive verification gate (subgraph + freshness + policy + fleet evidence) |
249
- | `workspace explain <target> [--write] --json` | Human narrative for release blockers, projects, or trace slices |
250
- | `workspace why <target>` | Alias of `workspace explain` |
251
- | `workspace trace --from <diff> [--write] --json` | Diff → impact → gates narrative for agents and IDE handoff |
252
- | `workspace feedback record --json` | Append structured agent action outcomes to intelligence history |
253
- | `workspace mcp serve` | Read-mostly stdio MCP bridge over workspace evidence |
254
- | `workspace graph <emit\|explain\|dot\|mermaid>` | Inspect and visualize the dependency graph |
255
- | `workspace watch [--json] [--once]` | Daemon mode: keep model + graph in memory, stream change events |
256
- | `workspace run <stage> [--scope project:X] [--reuse-passed]` | Fleet init/test/build/start or custom stages from `.rapidkit/context.json` |
311
+ | Command | Purpose |
312
+ | ------------------------------------------------------------ | ------------------------------------------------------------------------------------ |
313
+ | `workspace model [--cache\|--incremental] --json` | Canonical workspace model (graph-aware, incremental rebuilds) |
314
+ | `workspace context --for-agent --json --write` | Agent-ready context pack + auto agent grounding sync |
315
+ | `workspace agent-sync --write` | Agent Customization Pack (AGENTS.md, Copilot, Cursor, Claude, INDEX, skills, agents) |
316
+ | `workspace snapshot --json` | Persist model snapshot |
317
+ | `workspace diff --from <file\|git[:ref]> --json` | Diff against snapshot or git |
318
+ | `workspace impact --from <file> --json` | Graph-aware transitive blast-radius evidence |
319
+ | `workspace verify [--strict] --json` | Definitive verification gate (subgraph + freshness + policy + fleet evidence) |
320
+ | `workspace explain <target> [--write] --json` | Human narrative for release blockers, projects, or trace slices |
321
+ | `workspace why <target>` | Alias of `workspace explain` |
322
+ | `workspace trace --from <diff> [--write] --json` | Diff → impact → gates narrative for agents and IDE handoff |
323
+ | `workspace feedback record --json` | Append structured agent action outcomes to intelligence history |
324
+ | `workspace mcp serve` | Read-mostly stdio MCP bridge over workspace evidence |
325
+ | `workspace graph <emit\|explain\|dot\|mermaid>` | Inspect and visualize the dependency graph |
326
+ | `workspace watch [--json] [--once]` | Daemon mode: keep model + graph in memory, stream change events |
327
+ | `workspace run <stage> [--scope project:X] [--reuse-passed]` | Fleet init/test/build/start or custom stages from `.rapidkit/context.json` |
257
328
 
258
329
  JSON schemas: `contracts/workspace-intelligence/`. Command coexistence and naming:
259
330
  [docs/contracts/NAMING_AND_COEXISTENCE.md](docs/contracts/NAMING_AND_COEXISTENCE.md).
@@ -294,6 +365,9 @@ radius, gating, and visualization:
294
365
  - **Transitive freshness** — a deterministic `fresh | stale | unknown` verdict chained
295
366
  through the graph: a dependency change makes every dependent stale, not just by
296
367
  timestamp.
368
+ - **Fact freshness contracts** — `workspace model` and agent context packs mark each
369
+ workspace fact as durable, derived, evidence-backed, live, or verify-before-use so
370
+ agents do not reuse stale state as if it were structure.
297
371
  - **Policy violations** — model/contract violations are surfaced as structured
298
372
  `policyViolations[]` (not just an exit code) so IDEs and CI can render blockers.
299
373
  - **Health history** — every verify run appends to a bounded
@@ -331,31 +405,31 @@ npx rapidkit workspace agent-sync --write --strict --json
331
405
  npm run check:agent-customization-drift -- --workspace <workspace-root>
332
406
  ```
333
407
 
334
- | Artifact / file | Purpose |
335
- | ----------------------------------------------------------------------- | -------------------------------------------------------- |
336
- | `.rapidkit/reports/agent-customization-pack.json` | Versioned output inventory, target matrix, drift state |
408
+ | Artifact / file | Purpose |
409
+ | ----------------------------------------------------------------------- | ----------------------------------------------------------- |
410
+ | `.rapidkit/reports/agent-customization-pack.json` | Versioned output inventory, target matrix, drift state |
337
411
  | `.rapidkit/reports/workspace-explain-last-run.json` | Unified explain / trace narrative for blockers and projects |
338
- | `.rapidkit/reports/workspace-skills-index.json` | Index of operational playbooks (`.rapidkit/skills/*.md`) |
339
- | `.rapidkit/skills/rapidkit-*.md` | Operational playbooks (generated by agent-sync) |
340
- | `.rapidkit/reports/rapidkit-mcp-design.json` | Read-mostly MCP-ready tool design manifest |
341
- | `.rapidkit/reports/INDEX.json` | Read order, blockers, report timestamps |
342
- | `.rapidkit/reports/workspace-context-agent.json` | Canonical agent context pack |
343
- | `.rapidkit/AGENT-GROUNDING.md` | Tool-agnostic grounding doc |
344
- | `AGENTS.md` | Open standard for all agents (managed RapidKit section) |
345
- | `.github/copilot-instructions.md` | GitHub Copilot / VS Code Chat always-on rules |
346
- | `.github/instructions/rapidkit-workspace.instructions.md` | Copilot workspace scope and command discipline |
347
- | `.github/instructions/rapidkit-evidence.instructions.md` | Copilot scoped rules for `.rapidkit/**` |
348
- | `.github/prompts/rapidkit-diagnose.prompt.md` | Copilot reusable diagnose prompt |
349
- | `.github/skills/rapidkit-workspace-intelligence/SKILL.md` | Workspace Intelligence skill workflow |
350
- | `.github/skills/rapidkit-workspace-intelligence/resources/mcp-tools.md` | Future MCP tool design reference |
351
- | `.github/agents/workspai-advisor.agent.md` | Read-only workspace advisor agent |
352
- | `.github/agents/workspai-repair.agent.md` | Blocker repair agent |
353
- | `.github/agents/workspai-release.agent.md` | Release safety agent |
354
- | `.github/agents/workspai-project-onboarder.agent.md` | Project onboarding agent |
355
- | `.cursor/rules/rapidkit-grounding.mdc` | Cursor always-on project rule |
356
- | `CLAUDE.md` | Claude Code entry (`@AGENTS.md` + managed notes) |
357
- | `.claude/rules/rapidkit-evidence.md` | Claude Code scoped evidence rules |
358
- | `.vscode/rapidkit-agent-hooks.json` | Optional advisory VS Code hooks (`--experimental-hooks`) |
412
+ | `.rapidkit/reports/workspace-skills-index.json` | Index of operational playbooks (`.rapidkit/skills/*.md`) |
413
+ | `.rapidkit/skills/rapidkit-*.md` | Operational playbooks (generated by agent-sync) |
414
+ | `.rapidkit/reports/rapidkit-mcp-design.json` | Read-mostly MCP-ready tool design manifest |
415
+ | `.rapidkit/reports/INDEX.json` | Read order, blockers, report timestamps |
416
+ | `.rapidkit/reports/workspace-context-agent.json` | Canonical agent context pack |
417
+ | `.rapidkit/AGENT-GROUNDING.md` | Tool-agnostic grounding doc |
418
+ | `AGENTS.md` | Open standard for all agents (managed RapidKit section) |
419
+ | `.github/copilot-instructions.md` | GitHub Copilot / VS Code Chat always-on rules |
420
+ | `.github/instructions/rapidkit-workspace.instructions.md` | Copilot workspace scope and command discipline |
421
+ | `.github/instructions/rapidkit-evidence.instructions.md` | Copilot scoped rules for `.rapidkit/**` |
422
+ | `.github/prompts/rapidkit-diagnose.prompt.md` | Copilot reusable diagnose prompt |
423
+ | `.github/skills/rapidkit-workspace-intelligence/SKILL.md` | Workspace Intelligence skill workflow |
424
+ | `.github/skills/rapidkit-workspace-intelligence/resources/mcp-tools.md` | Future MCP tool design reference |
425
+ | `.github/agents/workspai-advisor.agent.md` | Read-only workspace advisor agent |
426
+ | `.github/agents/workspai-repair.agent.md` | Blocker repair agent |
427
+ | `.github/agents/workspai-release.agent.md` | Release safety agent |
428
+ | `.github/agents/workspai-project-onboarder.agent.md` | Project onboarding agent |
429
+ | `.cursor/rules/rapidkit-grounding.mdc` | Cursor always-on project rule |
430
+ | `CLAUDE.md` | Claude Code entry (`@AGENTS.md` + managed notes) |
431
+ | `.claude/rules/rapidkit-evidence.md` | Claude Code scoped evidence rules |
432
+ | `.vscode/rapidkit-agent-hooks.json` | Optional advisory VS Code hooks (`--experimental-hooks`) |
359
433
 
360
434
  The pack also publishes a standard answer contract for agent-facing output:
361
435
 
@@ -115,6 +115,21 @@
115
115
  "label": "Workspace doctor",
116
116
  "required": false
117
117
  },
118
+ {
119
+ "path": ".rapidkit/reports/doctor-project-last-run.json",
120
+ "label": "Project doctor",
121
+ "required": false
122
+ },
123
+ {
124
+ "path": ".rapidkit/reports/doctor-remediation-plan-last-run.json",
125
+ "label": "Doctor remediation plan",
126
+ "required": false
127
+ },
128
+ {
129
+ "path": ".rapidkit/reports/doctor-fix-result-last-run.json",
130
+ "label": "Doctor fix result",
131
+ "required": false
132
+ },
118
133
  {
119
134
  "path": ".rapidkit/reports/analyze-last-run.json",
120
135
  "label": "Workspace analyze",
@@ -26,8 +26,22 @@
26
26
  "projectPath": { "type": "string", "minLength": 1 },
27
27
  "projectName": { "type": "string", "minLength": 1 },
28
28
  "healthScore": { "type": "object", "additionalProperties": true },
29
+ "evidenceFreshness": { "$ref": "#/$defs/evidenceFreshness" },
29
30
  "system": { "type": "object", "additionalProperties": true },
30
- "project": { "type": "object", "additionalProperties": true },
31
+ "project": {
32
+ "type": "object",
33
+ "properties": {
34
+ "probes": {
35
+ "type": "array",
36
+ "items": { "$ref": "#/$defs/probe" }
37
+ },
38
+ "repairCapabilities": {
39
+ "type": "array",
40
+ "items": { "$ref": "#/$defs/repairCapability" }
41
+ }
42
+ },
43
+ "additionalProperties": true
44
+ },
31
45
  "summary": {
32
46
  "type": "object",
33
47
  "properties": {
@@ -40,7 +54,251 @@
40
54
  "type": "array",
41
55
  "items": { "type": "object", "additionalProperties": true }
42
56
  },
43
- "contract": { "type": "object", "additionalProperties": true }
57
+ "contract": { "type": "object", "additionalProperties": true },
58
+ "policyProfile": { "$ref": "#/$defs/policyProfile" }
59
+ },
60
+ "$defs": {
61
+ "freshness": {
62
+ "type": "object",
63
+ "required": [
64
+ "category",
65
+ "generatedAt",
66
+ "ttlSeconds",
67
+ "status",
68
+ "verifyBeforeUse",
69
+ "reason"
70
+ ],
71
+ "properties": {
72
+ "category": { "enum": ["structure", "verification", "state"] },
73
+ "generatedAt": { "type": "string", "format": "date-time" },
74
+ "ttlSeconds": { "type": ["integer", "null"], "minimum": 0 },
75
+ "expiresAt": { "type": "string", "format": "date-time" },
76
+ "status": { "enum": ["fresh", "stale", "unknown"] },
77
+ "verifyBeforeUse": { "type": "boolean" },
78
+ "reason": { "type": "string" }
79
+ },
80
+ "additionalProperties": false
81
+ },
82
+ "evidenceFreshness": {
83
+ "type": "object",
84
+ "required": [
85
+ "generatedAt",
86
+ "status",
87
+ "staleProbeCount",
88
+ "unknownProbeCount",
89
+ "liveStateProbeCount",
90
+ "verifyBeforeUseProbeCount"
91
+ ],
92
+ "properties": {
93
+ "generatedAt": { "type": "string", "format": "date-time" },
94
+ "status": { "enum": ["fresh", "stale", "unknown"] },
95
+ "staleProbeCount": { "type": "integer", "minimum": 0 },
96
+ "unknownProbeCount": { "type": "integer", "minimum": 0 },
97
+ "liveStateProbeCount": { "type": "integer", "minimum": 0 },
98
+ "verifyBeforeUseProbeCount": { "type": "integer", "minimum": 0 },
99
+ "oldestProbeGeneratedAt": { "type": "string", "format": "date-time" }
100
+ },
101
+ "additionalProperties": false
102
+ },
103
+ "repairIntent": {
104
+ "type": "object",
105
+ "required": [
106
+ "mode",
107
+ "confidence",
108
+ "primaryActionLabel",
109
+ "requiresApproval",
110
+ "requiresFreshEvidence",
111
+ "reason",
112
+ "relatedCommands"
113
+ ],
114
+ "properties": {
115
+ "mode": {
116
+ "enum": [
117
+ "none",
118
+ "run-command",
119
+ "edit-file",
120
+ "review-required",
121
+ "verify-before-fix",
122
+ "refresh-evidence",
123
+ "manual-guidance"
124
+ ]
125
+ },
126
+ "confidence": { "enum": ["high", "medium", "low"] },
127
+ "primaryActionLabel": { "type": "string" },
128
+ "requiresApproval": { "type": "boolean" },
129
+ "requiresFreshEvidence": { "type": "boolean" },
130
+ "reason": { "type": "string" },
131
+ "relatedCommands": { "type": "array", "items": { "type": "string" } }
132
+ },
133
+ "additionalProperties": false
134
+ },
135
+ "policyProfile": {
136
+ "type": "object",
137
+ "required": [
138
+ "name",
139
+ "exitOnErrors",
140
+ "exitOnWarnings",
141
+ "warningExitCode",
142
+ "advisoryWarningsBlockRelease",
143
+ "description"
144
+ ],
145
+ "properties": {
146
+ "name": { "enum": ["local", "ci", "release", "enterprise-strict"] },
147
+ "exitOnErrors": { "const": true },
148
+ "exitOnWarnings": { "type": "boolean" },
149
+ "warningExitCode": { "enum": [0, 1, 2] },
150
+ "advisoryWarningsBlockRelease": { "type": "boolean" },
151
+ "description": { "type": "string" }
152
+ },
153
+ "additionalProperties": false
154
+ },
155
+ "probe": {
156
+ "type": "object",
157
+ "properties": {
158
+ "id": { "type": "string", "minLength": 1 },
159
+ "label": { "type": "string", "minLength": 1 },
160
+ "status": { "enum": ["pass", "warn", "fail"] },
161
+ "severity": { "enum": ["info", "warn", "error"] },
162
+ "scope": { "type": "string" },
163
+ "reason": { "type": "string" },
164
+ "recommendation": { "type": "string" },
165
+ "freshness": { "$ref": "#/$defs/freshness" },
166
+ "issueClass": {
167
+ "enum": [
168
+ "dependency",
169
+ "environment",
170
+ "security",
171
+ "test",
172
+ "quality",
173
+ "container",
174
+ "deployment",
175
+ "runtime",
176
+ "workspace-contract",
177
+ "source-tree",
178
+ "framework",
179
+ "configuration",
180
+ "custom",
181
+ "unknown"
182
+ ]
183
+ },
184
+ "operationalImpact": {
185
+ "enum": [
186
+ "none",
187
+ "developer-friction",
188
+ "ci-risk",
189
+ "release-risk",
190
+ "security-risk",
191
+ "runtime-risk",
192
+ "customer-risk"
193
+ ]
194
+ },
195
+ "repairIntent": { "$ref": "#/$defs/repairIntent" },
196
+ "repairCapability": { "$ref": "#/$defs/repairCapability" }
197
+ },
198
+ "additionalProperties": true
199
+ },
200
+ "repairCapability": {
201
+ "type": "object",
202
+ "required": [
203
+ "id",
204
+ "issueId",
205
+ "title",
206
+ "status",
207
+ "fixKind",
208
+ "risk",
209
+ "canAutoFix",
210
+ "canEditFiles",
211
+ "requiresApproval",
212
+ "requiresReview",
213
+ "files",
214
+ "refreshCommands",
215
+ "reason"
216
+ ],
217
+ "properties": {
218
+ "id": { "type": "string", "minLength": 1 },
219
+ "issueId": { "type": "string", "minLength": 1 },
220
+ "title": { "type": "string", "minLength": 1 },
221
+ "status": { "enum": ["available", "manual", "blocked"] },
222
+ "fixKind": {
223
+ "enum": [
224
+ "package-json-script",
225
+ "file-create",
226
+ "file-append",
227
+ "file-copy",
228
+ "dependency-sync",
229
+ "command",
230
+ "manual"
231
+ ]
232
+ },
233
+ "risk": { "enum": ["safe", "guarded", "invasive"] },
234
+ "canAutoFix": { "type": "boolean" },
235
+ "canEditFiles": { "type": "boolean" },
236
+ "requiresApproval": { "type": "boolean" },
237
+ "requiresReview": { "type": "boolean" },
238
+ "files": { "type": "array", "items": { "type": "string" } },
239
+ "command": { "type": "string" },
240
+ "operation": { "$ref": "#/$defs/repairOperation" },
241
+ "verifyCommand": { "type": "string" },
242
+ "refreshCommands": { "type": "array", "items": { "type": "string" } },
243
+ "reason": { "type": "string" },
244
+ "limitations": { "type": "array", "items": { "type": "string" } }
245
+ },
246
+ "additionalProperties": true
247
+ },
248
+ "repairOperation": {
249
+ "type": "object",
250
+ "required": ["type", "path"],
251
+ "properties": {
252
+ "type": {
253
+ "enum": [
254
+ "file-create",
255
+ "file-append",
256
+ "file-copy",
257
+ "package-json-script",
258
+ "json-edit",
259
+ "env-key-add",
260
+ "makefile-target"
261
+ ]
262
+ },
263
+ "sourcePath": { "type": "string", "minLength": 1 },
264
+ "path": { "type": "string", "minLength": 1 },
265
+ "content": { "type": "string" },
266
+ "overwrite": { "type": "boolean" },
267
+ "lines": { "type": "array", "items": { "type": "string" } },
268
+ "ensureNewline": { "type": "boolean" },
269
+ "scriptName": { "type": "string" },
270
+ "scriptValue": { "type": "string" },
271
+ "edits": {
272
+ "type": "array",
273
+ "items": {
274
+ "type": "object",
275
+ "required": ["pointer", "value"],
276
+ "properties": {
277
+ "pointer": { "type": "string" },
278
+ "value": { "type": ["string", "number", "boolean", "null"] }
279
+ },
280
+ "additionalProperties": false
281
+ }
282
+ },
283
+ "keys": {
284
+ "type": "array",
285
+ "items": {
286
+ "type": "object",
287
+ "required": ["name", "value"],
288
+ "properties": {
289
+ "name": { "type": "string" },
290
+ "value": { "type": "string" },
291
+ "comment": { "type": "string" }
292
+ },
293
+ "additionalProperties": false
294
+ }
295
+ },
296
+ "target": { "type": "string" },
297
+ "command": { "type": "string" },
298
+ "phony": { "type": "boolean" }
299
+ },
300
+ "additionalProperties": false
301
+ }
44
302
  },
45
303
  "additionalProperties": true
46
304
  }