rapidkit 0.37.1 → 0.39.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 (76) hide show
  1. package/README.md +185 -118
  2. package/contracts/create-planner-capabilities.v1.json +251 -0
  3. package/contracts/runtime-command-surface.v1.json +85 -0
  4. package/contracts/workspace-intelligence/workspace-dependency-graph.v1.json +92 -0
  5. package/contracts/workspace-intelligence/workspace-impact.v1.json +32 -2
  6. package/contracts/workspace-intelligence/workspace-model.v1.json +5 -0
  7. package/contracts/workspace-intelligence/workspace-verify.v1.json +103 -1
  8. package/dist/analyze-RHQM4AB2.js +1 -0
  9. package/dist/autopilot-release-FWKOY2BD.js +1 -0
  10. package/dist/chunk-3YLMCP3V.js +1 -0
  11. package/dist/chunk-4FJQWL7P.js +4 -0
  12. package/dist/chunk-4Q2ZZKGB.js +1 -0
  13. package/dist/chunk-6G2KSHP6.js +2 -0
  14. package/dist/{chunk-PPQYTYQG.js → chunk-6KD5F6LX.js} +4 -4
  15. package/dist/{chunk-IOIWVHRO.js → chunk-ERCD6NFF.js} +22 -22
  16. package/dist/chunk-G76C74EV.js +1 -0
  17. package/dist/chunk-GOM3RFB3.js +2 -0
  18. package/dist/{chunk-7RBZGQ7T.js → chunk-GYNIVEYP.js} +1 -1
  19. package/dist/chunk-HTYMXMQM.js +1 -0
  20. package/dist/chunk-KYH364KQ.js +1 -0
  21. package/dist/chunk-OWNGSAO3.js +2 -0
  22. package/dist/chunk-PYCJWW4B.js +1 -0
  23. package/dist/chunk-QPEBI6AB.js +2 -0
  24. package/dist/{chunk-RUUDLAKJ.js → chunk-RXWM5DSC.js} +2 -2
  25. package/dist/chunk-S5KTATOU.js +1 -0
  26. package/dist/chunk-TYZPPUBH.js +1 -0
  27. package/dist/chunk-UY4KRFNL.js +2 -0
  28. package/dist/chunk-VQMZC5TC.js +9 -0
  29. package/dist/{chunk-JBDQADHY.js → chunk-WHCON2VN.js} +11 -11
  30. package/dist/chunk-X7PWDIQW.js +1 -0
  31. package/dist/chunk-ZWKLRZE5.js +13 -0
  32. package/dist/{create-HN5HOGQ4.js → create-XVDDQA42.js} +1 -1
  33. package/dist/{demo-kit-3VTLJBP7.js → demo-kit-RWGOEDW4.js} +1 -1
  34. package/dist/{doctor-QC662YLH.js → doctor-UOLOGJ2Z.js} +1 -1
  35. package/dist/{dotnet-webapi-clean-FX533F5U.js → dotnet-webapi-clean-RTBRPDPL.js} +1 -1
  36. package/dist/{gofiber-standard-35CJZ7S3.js → gofiber-standard-UGIRKPKL.js} +1 -1
  37. package/dist/{gogin-standard-SAX6C4ZK.js → gogin-standard-HJ7SPFNT.js} +1 -1
  38. package/dist/index.d.ts +32 -1
  39. package/dist/index.js +134 -128
  40. package/dist/pipeline-O5ANBQMK.js +5 -0
  41. package/dist/{springboot-standard-SFMSLTX4.js → springboot-standard-IWJSVDLZ.js} +1 -1
  42. package/dist/{workspace-2AL5C3QZ.js → workspace-L4ITCKMM.js} +1 -1
  43. package/dist/{workspace-agent-sync-4R7S3F6T.js → workspace-agent-sync-SALW6TVR.js} +1 -1
  44. package/dist/{workspace-context-CKACDTVE.js → workspace-context-NMMQMHNU.js} +1 -1
  45. package/dist/{workspace-foundation-L6ZBGMVE.js → workspace-foundation-HNIRAIBF.js} +1 -1
  46. package/dist/workspace-graph-ICB7OVAZ.js +3 -0
  47. package/dist/workspace-history-LHUTLE3S.js +1 -0
  48. package/dist/{workspace-intelligence-3TWXJQ7Y.js → workspace-intelligence-64IWAYHS.js} +1 -1
  49. package/dist/workspace-model-SDHH5RBC.js +1 -0
  50. package/dist/workspace-run-EP7XGEM6.js +1 -0
  51. package/dist/workspace-verify-6Q6MGRG6.js +1 -0
  52. package/dist/workspace-watch-JDXVGW4H.js +1 -0
  53. package/docs/README.md +1 -0
  54. package/docs/contracts/ARTIFACT_CATALOG.md +211 -56
  55. package/docs/contracts/CLI_LOG_EVENT_STREAM.md +123 -0
  56. package/docs/contracts/README.md +15 -14
  57. package/docs/create-planner-capabilities.md +81 -0
  58. package/package.json +8 -5
  59. package/dist/analyze-6RFG7C7Z.js +0 -1
  60. package/dist/autopilot-release-QNZ2IL7K.js +0 -1
  61. package/dist/chunk-3SWQKRXH.js +0 -2
  62. package/dist/chunk-6P5DCHBQ.js +0 -4
  63. package/dist/chunk-B2KOIORF.js +0 -1
  64. package/dist/chunk-C7OVQQXT.js +0 -1
  65. package/dist/chunk-C7WILE56.js +0 -1
  66. package/dist/chunk-HEG6DIGW.js +0 -2
  67. package/dist/chunk-RELR4O5E.js +0 -2
  68. package/dist/chunk-T5LN7EO5.js +0 -9
  69. package/dist/chunk-TRXYRHD7.js +0 -2
  70. package/dist/chunk-U6QUN6V2.js +0 -2
  71. package/dist/chunk-UXKB4KGZ.js +0 -13
  72. package/dist/chunk-YJ24EV3P.js +0 -1
  73. package/dist/pipeline-IMB3C3JY.js +0 -5
  74. package/dist/workspace-model-NQVZN5W4.js +0 -1
  75. package/dist/workspace-run-PNMZJNDC.js +0 -1
  76. package/dist/workspace-verify-EO435PS4.js +0 -1
@@ -0,0 +1,251 @@
1
+ {
2
+ "schemaVersion": "rapidkit-create-planner-capabilities-v1",
3
+ "lanes": {
4
+ "native-create": {
5
+ "status": "available",
6
+ "meaning": "RapidKit owns the scaffold contract, marker, registry, doctor, bootstrap, and workspace model path."
7
+ },
8
+ "external-create-adopt": {
9
+ "status": "planned",
10
+ "meaning": "A stable ecosystem generator exists, but RapidKit does not yet own the post-create contract."
11
+ },
12
+ "adopt-only": {
13
+ "status": "available",
14
+ "meaning": "The project enters Workspace Intelligence through import/adopt, not native create."
15
+ }
16
+ },
17
+ "nativeCreate": [
18
+ {
19
+ "id": "fastapi.standard",
20
+ "runtime": "python",
21
+ "framework": "fastapi",
22
+ "owner": "core",
23
+ "stability": "stable",
24
+ "moduleSupport": true
25
+ },
26
+ {
27
+ "id": "fastapi.ddd",
28
+ "runtime": "python",
29
+ "framework": "fastapi",
30
+ "owner": "core",
31
+ "stability": "stable",
32
+ "moduleSupport": true
33
+ },
34
+ {
35
+ "id": "nestjs.standard",
36
+ "runtime": "node",
37
+ "framework": "nestjs",
38
+ "owner": "core",
39
+ "stability": "stable",
40
+ "moduleSupport": true
41
+ },
42
+ {
43
+ "id": "springboot.standard",
44
+ "runtime": "java",
45
+ "framework": "springboot",
46
+ "owner": "npm",
47
+ "stability": "stable",
48
+ "moduleSupport": false
49
+ },
50
+ {
51
+ "id": "gofiber.standard",
52
+ "runtime": "go",
53
+ "framework": "gofiber",
54
+ "owner": "npm",
55
+ "stability": "stable",
56
+ "moduleSupport": false
57
+ },
58
+ {
59
+ "id": "gogin.standard",
60
+ "runtime": "go",
61
+ "framework": "gogin",
62
+ "owner": "npm",
63
+ "stability": "stable",
64
+ "moduleSupport": false
65
+ },
66
+ {
67
+ "id": "dotnet.webapi.clean",
68
+ "runtime": "dotnet",
69
+ "framework": "dotnet",
70
+ "owner": "npm",
71
+ "stability": "preview",
72
+ "moduleSupport": false
73
+ },
74
+ {
75
+ "id": "frontend.nextjs",
76
+ "runtime": "node",
77
+ "framework": "nextjs",
78
+ "owner": "npm",
79
+ "stability": "stable",
80
+ "moduleSupport": false
81
+ },
82
+ {
83
+ "id": "frontend.remix",
84
+ "runtime": "node",
85
+ "framework": "remix",
86
+ "owner": "npm",
87
+ "stability": "stable",
88
+ "moduleSupport": false
89
+ },
90
+ {
91
+ "id": "frontend.vite-react",
92
+ "runtime": "node",
93
+ "framework": "react",
94
+ "owner": "npm",
95
+ "stability": "stable",
96
+ "moduleSupport": false
97
+ },
98
+ {
99
+ "id": "frontend.vite-vue",
100
+ "runtime": "node",
101
+ "framework": "vue",
102
+ "owner": "npm",
103
+ "stability": "stable",
104
+ "moduleSupport": false
105
+ },
106
+ {
107
+ "id": "frontend.vite-svelte",
108
+ "runtime": "node",
109
+ "framework": "svelte",
110
+ "owner": "npm",
111
+ "stability": "stable",
112
+ "moduleSupport": false
113
+ },
114
+ {
115
+ "id": "frontend.vite-solid",
116
+ "runtime": "node",
117
+ "framework": "solid",
118
+ "owner": "npm",
119
+ "stability": "stable",
120
+ "moduleSupport": false
121
+ },
122
+ {
123
+ "id": "frontend.vite-vanilla",
124
+ "runtime": "node",
125
+ "framework": "vite",
126
+ "owner": "npm",
127
+ "stability": "stable",
128
+ "moduleSupport": false
129
+ },
130
+ {
131
+ "id": "frontend.nuxt",
132
+ "runtime": "node",
133
+ "framework": "nuxt",
134
+ "owner": "npm",
135
+ "stability": "stable",
136
+ "moduleSupport": false
137
+ },
138
+ {
139
+ "id": "frontend.angular",
140
+ "runtime": "node",
141
+ "framework": "angular",
142
+ "owner": "npm",
143
+ "stability": "stable",
144
+ "moduleSupport": false
145
+ },
146
+ {
147
+ "id": "frontend.astro",
148
+ "runtime": "node",
149
+ "framework": "astro",
150
+ "owner": "npm",
151
+ "stability": "stable",
152
+ "moduleSupport": false
153
+ },
154
+ {
155
+ "id": "frontend.sveltekit",
156
+ "runtime": "node",
157
+ "framework": "sveltekit",
158
+ "owner": "npm",
159
+ "stability": "stable",
160
+ "moduleSupport": false
161
+ }
162
+ ],
163
+ "externalCreateAdopt": [
164
+ {
165
+ "id": "wordpress-site",
166
+ "aliases": [
167
+ "wordpress",
168
+ "wordpress-site",
169
+ "wp",
170
+ "wp-site"
171
+ ],
172
+ "ecosystem": "wordpress",
173
+ "status": "planned",
174
+ "officialCommands": [
175
+ "wp core download",
176
+ "wp config create",
177
+ "wp db create",
178
+ "wp core install"
179
+ ],
180
+ "adoptAfterCreate": true
181
+ },
182
+ {
183
+ "id": "wordpress-block",
184
+ "aliases": [
185
+ "wordpress-block",
186
+ "wp-block",
187
+ "gutenberg-block"
188
+ ],
189
+ "ecosystem": "wordpress",
190
+ "status": "planned",
191
+ "officialCommands": [
192
+ "npx @wordpress/create-block@latest <slug>"
193
+ ],
194
+ "adoptAfterCreate": true
195
+ },
196
+ {
197
+ "id": "laravel",
198
+ "aliases": [
199
+ "laravel",
200
+ "php-laravel"
201
+ ],
202
+ "ecosystem": "php",
203
+ "status": "planned",
204
+ "officialCommands": [
205
+ "composer create-project laravel/laravel <name>"
206
+ ],
207
+ "adoptAfterCreate": true
208
+ },
209
+ {
210
+ "id": "symfony",
211
+ "aliases": [
212
+ "symfony",
213
+ "php-symfony"
214
+ ],
215
+ "ecosystem": "php",
216
+ "status": "planned",
217
+ "officialCommands": [
218
+ "composer create-project symfony/skeleton <name>"
219
+ ],
220
+ "adoptAfterCreate": true
221
+ },
222
+ {
223
+ "id": "rails",
224
+ "aliases": [
225
+ "rails",
226
+ "ruby-on-rails",
227
+ "ruby-rails"
228
+ ],
229
+ "ecosystem": "ruby",
230
+ "status": "planned",
231
+ "officialCommands": [
232
+ "rails new <name>"
233
+ ],
234
+ "adoptAfterCreate": true
235
+ }
236
+ ],
237
+ "adoptOnlyRuntimes": [
238
+ "php",
239
+ "ruby",
240
+ "rust",
241
+ "elixir",
242
+ "clojure",
243
+ "scala",
244
+ "kotlin"
245
+ ],
246
+ "productRules": [
247
+ "Do not translate unsupported stack requests into unrelated native kits.",
248
+ "If native create is unavailable, explain the lane and guide to adopt/import.",
249
+ "Use the same capability contract in CLI, CI, VS Code, and AI planning surfaces."
250
+ ]
251
+ }
@@ -39,6 +39,39 @@
39
39
  "coreProjectCommands": [
40
40
  "docs"
41
41
  ],
42
+ "workspaceSubcommands": [
43
+ "list",
44
+ "sync",
45
+ "registry",
46
+ "foundation",
47
+ "model",
48
+ "snapshot",
49
+ "diff",
50
+ "impact",
51
+ "verify",
52
+ "graph",
53
+ "watch",
54
+ "context",
55
+ "agent-sync",
56
+ "policy",
57
+ "contract",
58
+ "share",
59
+ "export",
60
+ "archive",
61
+ "hydrate",
62
+ "import",
63
+ "run",
64
+ "init"
65
+ ],
66
+ "workspaceIntelligenceSubcommands": [
67
+ "model",
68
+ "snapshot",
69
+ "diff",
70
+ "impact",
71
+ "verify",
72
+ "context",
73
+ "agent-sync"
74
+ ],
42
75
  "moduleSuggestionFrameworks": [
43
76
  "fastapi",
44
77
  "nestjs"
@@ -79,6 +112,58 @@
79
112
  "frontend.astro",
80
113
  "frontend.sveltekit"
81
114
  ],
115
+ "createPlanner": {
116
+ "lanes": {
117
+ "native-create": {
118
+ "status": "available",
119
+ "meaning": "RapidKit owns the scaffold contract, marker, registry, doctor, bootstrap, and workspace model path."
120
+ },
121
+ "external-create-adopt": {
122
+ "status": "planned",
123
+ "meaning": "A stable ecosystem generator exists, but RapidKit does not yet own the post-create contract."
124
+ },
125
+ "adopt-only": {
126
+ "status": "available",
127
+ "meaning": "The project enters Workspace Intelligence through import/adopt, not native create."
128
+ }
129
+ },
130
+ "nativeCreateKits": [
131
+ "fastapi.standard",
132
+ "fastapi.ddd",
133
+ "nestjs.standard",
134
+ "springboot.standard",
135
+ "gofiber.standard",
136
+ "gogin.standard",
137
+ "dotnet.webapi.clean",
138
+ "frontend.nextjs",
139
+ "frontend.remix",
140
+ "frontend.vite-react",
141
+ "frontend.vite-vue",
142
+ "frontend.vite-svelte",
143
+ "frontend.vite-solid",
144
+ "frontend.vite-vanilla",
145
+ "frontend.nuxt",
146
+ "frontend.angular",
147
+ "frontend.astro",
148
+ "frontend.sveltekit"
149
+ ],
150
+ "externalCreateAdopt": [
151
+ "wordpress-site",
152
+ "wordpress-block",
153
+ "laravel",
154
+ "symfony",
155
+ "rails"
156
+ ],
157
+ "adoptOnlyRuntimes": [
158
+ "php",
159
+ "ruby",
160
+ "rust",
161
+ "elixir",
162
+ "clojure",
163
+ "scala",
164
+ "kotlin"
165
+ ]
166
+ },
82
167
  "runtimeMatrix": {
83
168
  "python": {
84
169
  "tier": "first-class",
@@ -0,0 +1,92 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://getrapidkit.com/schemas/workspace-dependency-graph.v1.json",
4
+ "title": "RapidKit Workspace Dependency Graph",
5
+ "description": "First-class, versioned dependency graph of inter-project relationships consumed by impact, verify, run --blast-radius, and risk weighting.",
6
+ "type": "object",
7
+ "required": ["schemaVersion", "generatedAt", "nodes", "edges", "stats"],
8
+ "properties": {
9
+ "schemaVersion": {
10
+ "const": "workspace-dependency-graph.v1"
11
+ },
12
+ "generatedAt": {
13
+ "type": "string",
14
+ "format": "date-time"
15
+ },
16
+ "nodes": {
17
+ "type": "array",
18
+ "items": {
19
+ "type": "object",
20
+ "required": ["id", "path"],
21
+ "properties": {
22
+ "id": { "type": "string", "minLength": 1 },
23
+ "path": { "type": "string", "minLength": 1 },
24
+ "runtime": { "type": "string" },
25
+ "framework": { "type": "string" },
26
+ "kind": { "type": "string" }
27
+ },
28
+ "additionalProperties": true
29
+ }
30
+ },
31
+ "edges": {
32
+ "type": "array",
33
+ "items": {
34
+ "type": "object",
35
+ "required": ["from", "to", "kind", "source", "confidence", "evidence"],
36
+ "properties": {
37
+ "from": { "type": "string", "minLength": 1 },
38
+ "to": { "type": "string", "minLength": 1 },
39
+ "kind": {
40
+ "enum": [
41
+ "code-import",
42
+ "package-dep",
43
+ "event-pub-sub",
44
+ "service-dependsOn",
45
+ "shared-resource"
46
+ ]
47
+ },
48
+ "source": {
49
+ "enum": ["inferred", "contract", "manual"]
50
+ },
51
+ "confidence": {
52
+ "enum": ["high", "medium", "low"]
53
+ },
54
+ "evidence": {
55
+ "type": "array",
56
+ "items": {
57
+ "type": "object",
58
+ "required": ["file"],
59
+ "properties": {
60
+ "file": { "type": "string", "minLength": 1 },
61
+ "detail": { "type": "string" }
62
+ },
63
+ "additionalProperties": true
64
+ }
65
+ }
66
+ },
67
+ "additionalProperties": true
68
+ }
69
+ },
70
+ "stats": {
71
+ "type": "object",
72
+ "required": [
73
+ "nodeCount",
74
+ "edgeCount",
75
+ "inferredEdges",
76
+ "contractEdges",
77
+ "manualEdges",
78
+ "hasCycle"
79
+ ],
80
+ "properties": {
81
+ "nodeCount": { "type": "integer", "minimum": 0 },
82
+ "edgeCount": { "type": "integer", "minimum": 0 },
83
+ "inferredEdges": { "type": "integer", "minimum": 0 },
84
+ "contractEdges": { "type": "integer", "minimum": 0 },
85
+ "manualEdges": { "type": "integer", "minimum": 0 },
86
+ "hasCycle": { "type": "boolean" }
87
+ },
88
+ "additionalProperties": true
89
+ }
90
+ },
91
+ "additionalProperties": true
92
+ }
@@ -11,6 +11,8 @@
11
11
  "workspace",
12
12
  "summary",
13
13
  "affectedProjects",
14
+ "transitiveImpact",
15
+ "criticalPathHotspots",
14
16
  "workspaceImpact",
15
17
  "verificationPlan",
16
18
  "agentBrief",
@@ -43,7 +45,8 @@
43
45
  "risk",
44
46
  "affectedProjects",
45
47
  "workspaceItems",
46
- "recommendedCommands"
48
+ "recommendedCommands",
49
+ "blastRadius"
47
50
  ],
48
51
  "properties": {
49
52
  "changed": { "type": "boolean" },
@@ -52,11 +55,38 @@
52
55
  },
53
56
  "affectedProjects": { "type": "integer", "minimum": 0 },
54
57
  "workspaceItems": { "type": "integer", "minimum": 0 },
55
- "recommendedCommands": { "type": "integer", "minimum": 0 }
58
+ "recommendedCommands": { "type": "integer", "minimum": 0 },
59
+ "blastRadius": {
60
+ "type": "object",
61
+ "required": ["directlyAffected", "transitivelyAffected", "maxDistance", "graphEdges"],
62
+ "properties": {
63
+ "directlyAffected": { "type": "integer", "minimum": 0 },
64
+ "transitivelyAffected": { "type": "integer", "minimum": 0 },
65
+ "maxDistance": { "type": "integer", "minimum": 0 },
66
+ "graphEdges": { "type": "integer", "minimum": 0 }
67
+ },
68
+ "additionalProperties": false
69
+ }
56
70
  },
57
71
  "additionalProperties": false
58
72
  },
59
73
  "affectedProjects": { "type": "array", "items": { "type": "object", "additionalProperties": true } },
74
+ "transitiveImpact": { "type": "array", "items": { "type": "object", "additionalProperties": true } },
75
+ "criticalPathHotspots": {
76
+ "type": "array",
77
+ "items": {
78
+ "type": "object",
79
+ "required": ["project", "fanIn", "fanOut", "reach", "betweenness"],
80
+ "properties": {
81
+ "project": { "type": "string" },
82
+ "fanIn": { "type": "integer", "minimum": 0 },
83
+ "fanOut": { "type": "integer", "minimum": 0 },
84
+ "reach": { "type": "integer", "minimum": 0 },
85
+ "betweenness": { "type": "number", "minimum": 0 }
86
+ },
87
+ "additionalProperties": true
88
+ }
89
+ },
60
90
  "workspaceImpact": { "type": "array", "items": { "type": "object", "additionalProperties": true } },
61
91
  "verificationPlan": { "type": "array", "items": { "type": "object", "additionalProperties": true } },
62
92
  "agentBrief": {
@@ -41,6 +41,11 @@
41
41
  "items": { "type": "object", "additionalProperties": true }
42
42
  },
43
43
  "contracts": { "type": "object", "additionalProperties": true },
44
+ "graph": {
45
+ "type": "object",
46
+ "description": "First-class inferred dependency graph (workspace-dependency-graph.v1). Additive/optional.",
47
+ "additionalProperties": true
48
+ },
44
49
  "evidence": { "type": "object", "additionalProperties": true },
45
50
  "discovery": { "type": "object", "additionalProperties": true },
46
51
  "policies": { "type": "object", "additionalProperties": true },
@@ -13,7 +13,12 @@
13
13
  "steps",
14
14
  "missingEvidence",
15
15
  "blockingReasons",
16
- "verificationPlan"
16
+ "verificationPlan",
17
+ "affectedSubgraph",
18
+ "graphIntegrity",
19
+ "freshness",
20
+ "policyMode",
21
+ "policyViolations"
17
22
  ],
18
23
  "properties": {
19
24
  "schemaVersion": {
@@ -105,6 +110,103 @@
105
110
  "verificationPlan": {
106
111
  "type": "array",
107
112
  "items": { "type": "object", "additionalProperties": true }
113
+ },
114
+ "affectedSubgraph": {
115
+ "type": "object",
116
+ "required": [
117
+ "totalProjects",
118
+ "directlyChanged",
119
+ "transitiveDependents",
120
+ "covered",
121
+ "uncovered",
122
+ "unverifiable"
123
+ ],
124
+ "properties": {
125
+ "totalProjects": { "type": "integer", "minimum": 0 },
126
+ "directlyChanged": { "type": "array", "items": { "type": "string" } },
127
+ "transitiveDependents": { "type": "array", "items": { "type": "string" } },
128
+ "covered": { "type": "array", "items": { "type": "string" } },
129
+ "uncovered": { "type": "array", "items": { "type": "string" } },
130
+ "unverifiable": { "type": "array", "items": { "type": "string" } }
131
+ },
132
+ "additionalProperties": false
133
+ },
134
+ "graphIntegrity": {
135
+ "type": "object",
136
+ "required": ["ok", "cycles", "danglingEdges", "orphans", "stats"],
137
+ "properties": {
138
+ "ok": { "type": "boolean" },
139
+ "cycles": {
140
+ "type": "array",
141
+ "items": { "type": "array", "items": { "type": "string" } }
142
+ },
143
+ "danglingEdges": {
144
+ "type": "array",
145
+ "items": {
146
+ "type": "object",
147
+ "required": ["from", "to", "kind", "missing"],
148
+ "properties": {
149
+ "from": { "type": "string" },
150
+ "to": { "type": "string" },
151
+ "kind": { "type": "string" },
152
+ "missing": { "enum": ["from", "to", "both"] }
153
+ },
154
+ "additionalProperties": true
155
+ }
156
+ },
157
+ "orphans": { "type": "array", "items": { "type": "string" } },
158
+ "stats": {
159
+ "type": "object",
160
+ "required": [
161
+ "nodeCount",
162
+ "edgeCount",
163
+ "cycleCount",
164
+ "danglingCount",
165
+ "orphanCount"
166
+ ],
167
+ "properties": {
168
+ "nodeCount": { "type": "integer", "minimum": 0 },
169
+ "edgeCount": { "type": "integer", "minimum": 0 },
170
+ "cycleCount": { "type": "integer", "minimum": 0 },
171
+ "danglingCount": { "type": "integer", "minimum": 0 },
172
+ "orphanCount": { "type": "integer", "minimum": 0 }
173
+ },
174
+ "additionalProperties": false
175
+ }
176
+ },
177
+ "additionalProperties": false
178
+ },
179
+ "freshness": {
180
+ "type": "object",
181
+ "required": ["verdict", "baseline", "changed", "added", "removed", "projectHashes"],
182
+ "properties": {
183
+ "verdict": { "enum": ["fresh", "stale", "unknown"] },
184
+ "baseline": { "enum": ["none", "recorded"] },
185
+ "changed": { "type": "array", "items": { "type": "string" } },
186
+ "added": { "type": "array", "items": { "type": "string" } },
187
+ "removed": { "type": "array", "items": { "type": "string" } },
188
+ "projectHashes": {
189
+ "type": "object",
190
+ "additionalProperties": { "type": "string" }
191
+ }
192
+ },
193
+ "additionalProperties": false
194
+ },
195
+ "policyMode": { "type": "string" },
196
+ "policyViolations": {
197
+ "type": "array",
198
+ "items": {
199
+ "type": "object",
200
+ "required": ["source", "severity", "code", "message"],
201
+ "properties": {
202
+ "source": { "enum": ["model", "contract"] },
203
+ "severity": { "enum": ["error", "warning"] },
204
+ "code": { "type": "string" },
205
+ "message": { "type": "string" },
206
+ "target": { "type": "string" }
207
+ },
208
+ "additionalProperties": false
209
+ }
108
210
  }
109
211
  },
110
212
  "additionalProperties": true
@@ -0,0 +1 @@
1
+ export{b as printAnalyzeReport,a as runAnalyze}from'./chunk-VQMZC5TC.js';
@@ -0,0 +1 @@
1
+ export{b as AUTOPILOT_RELEASE_ALIAS_FILENAME,a as AUTOPILOT_RELEASE_LAST_RUN_FILENAME,c as runAutopilotRelease}from'./chunk-GYNIVEYP.js';
@@ -0,0 +1 @@
1
+ import {a as a$1}from'./chunk-6G2KSHP6.js';import {b}from'./chunk-GOM3RFB3.js';import {intro,confirm,isCancel,password,text,multiselect,select,cancel}from'@clack/prompts';var c=false;function S(n){if(b()||c)return;c=true;let i=`${a$1.brand("\u25C6")} ${a$1.white("RapidKit")}${n?a$1.dim(` ${n}`):""}`;intro(i);}function a(n="Cancelled"){b()||(cancel(a$1.dim(n)),c=false);}function m(n){if(n)return i=>{let e=n(i);if(e!==true)return e===false?"Invalid value":e}}function v(n){return n.replace(/^[\p{Emoji_Presentation}\p{Extended_Pictographic}\s]+/u,"").trim()}function E(n){let i=v(n);for(let e of [" \u2014 "," \u2013 "," - "]){let t=i.indexOf(e);if(t>0)return {label:i.slice(0,t).trim(),hint:i.slice(t+e.length).trim()}}return {label:i}}function g(n){if(n.label)return {label:n.label,hint:n.hint};let i=E(n.name??String(n.value));return {label:i.label,hint:n.hint??i.hint}}function w(n,i){if(typeof n=="number")return n;if(n===void 0)return;let e=i.findIndex(t=>t.value===n);return e>=0?e:void 0}function h(n,i){return n.when===void 0?true:typeof n.when=="function"?n.when(i):n.when}async function Q(n,i){let e=n,t=v(e.message??e.name);if(e.type==="confirm"){let r=await confirm({message:t,initialValue:typeof e.default=="boolean"?e.default:false,active:a$1.success("yes"),inactive:a$1.dim("no")});return isCancel(r)&&(a(),process.exit(130)),r}if(e.type==="password"){let r=await password({message:t,validate:m(e.validate)});return isCancel(r)&&(a(),process.exit(130)),r}if(e.type==="input"){let r=await text({message:t,defaultValue:typeof e.default=="string"?e.default:void 0,initialValue:typeof e.default=="string"?e.default:void 0,validate:m(e.validate),placeholder:typeof e.default=="string"?e.default:void 0});return isCancel(r)&&(a(),process.exit(130)),r}if(e.type==="checkbox"){let r=[...e.choices??[]],l=await multiselect({message:t,options:r.map(u=>{let s=g(u);return {value:u.value,label:s.label,hint:s.hint}}),required:false});return isCancel(l)&&(a(),process.exit(130)),l}if(e.type==="rawlist"||e.type==="list"){let r=[...e.choices??[]].filter(s=>!s.disabled),l=w(e.default,r),u=await select({message:t,options:r.map(s=>{let p=g(s);return {value:s.value,label:p.label,hint:p.hint}}),initialValue:l!==void 0?r[l]?.value:void 0});return isCancel(u)&&(a(),process.exit(130)),u}throw new Error(`Unsupported prompt type: ${e.type}`)}async function A(n){if(b()){let e={};for(let t of n)if(h(t,e))if(t.default!==void 0)e[t.name]=t.default;else if(t.type==="confirm")e[t.name]=false;else if(t.type==="checkbox")e[t.name]=[];else if(t.choices?.length){let r=w(t.default,[...t.choices]);e[t.name]=r!==void 0?t.choices[r]?.value:t.choices[0]?.value;}else e[t.name]="";return e}let i={};for(let e of n)h(e,i)&&(i[e.name]=await Q(e));return i}export{S as a,A as b};
@@ -0,0 +1,4 @@
1
+ import {c as c$1}from'./chunk-NFUXULIF.js';import {a as a$1,b as b$1,d as d$1,c,f as f$1}from'./chunk-YBS2HGO3.js';import {a,b}from'./chunk-KMUWWZRT.js';import {f,e}from'./chunk-4Q2ZZKGB.js';import u from'chalk';import d from'fs';import h from'fs-extra';import l from'path';var G="release-readiness-v1";function $(t,e){let a=l.resolve(t);if(!b(a))return a;let s=l.join(e,".rapidkit","workspace.contract.json");if(d.existsSync(s))try{let i=JSON.parse(d.readFileSync(s,"utf-8")),n=Array.isArray(i.projects)?i.projects:[];for(let c of n){let f=p(c),g=typeof f.relativePath=="string"?f.relativePath.trim():"";if(g)return l.join(e,g)}}catch{}let r=x(e),o=Array.isArray(r.payload?.projects)?r.payload.projects:[];for(let i of o){let n=p(i),c=typeof n.path=="string"?n.path.trim():"";if(c)return l.resolve(c)}return a}function I(t){let e=a$1(t);return b$1(e,t)?"go":d$1(e,t)?"java":c(e,t)?"node":f$1(e,t)?"python":"unknown"}function O(t,e){if(!d.existsSync(t))return null;let a=d.readdirSync(t).filter(s=>s.endsWith(".json")&&e.some(r=>r.test(s))).map(s=>l.join(t,s));return a.length===0?null:(a.sort((s,r)=>d.statSync(r).mtimeMs-d.statSync(s).mtimeMs),a[0])}function p(t){return t&&typeof t=="object"&&!Array.isArray(t)?t:{}}async function V(t){let{readWorkspaceRegistrySummary:e,resolveWorkspaceRegisteredProjects:a}=await import('./workspace-registry-summary-MIPHVB56.js'),s=await e(t);return s?s.projectCount:(await a(t)).summary.projectCount}function z(t,e,a){let s=l.join(t,".rapidkit","toolchain.lock");if(!d.existsSync(s))return {gate:"env",status:"fail",summary:"toolchain.lock is missing",details:["Run rapidkit bootstrap to pin runtime versions and generate a reproducible toolchain."],evidencePath:s};try{let r=JSON.parse(d.readFileSync(s,"utf-8")),o=p(r.runtime),n=["python","node","go","java"].filter(c=>{let f=p(o[c]);return typeof f.version=="string"&&f.version.trim().length>0});if(n.length===0)return {gate:"env",status:"fail",summary:"No runtime versions are pinned in toolchain.lock",details:["Pin at least one runtime version via rapidkit setup <runtime> and re-run bootstrap."],evidencePath:s};if(e!=="unknown"){let c=p(o[e]);if(typeof c.version!="string"||c.version.trim().length===0)return {gate:"env",status:"fail",summary:`${a?.hasRegisteredProjects?"Project runtime":"Workspace"} (${e}) is not pinned in toolchain.lock`,details:[`Run rapidkit setup ${e} and rapidkit bootstrap to lock ${e} for this workspace.`],evidencePath:s}}return {gate:"env",status:"pass",summary:`Pinned runtimes: ${n.join(", ")}`,details:[],evidencePath:s}}catch{return {gate:"env",status:"fail",summary:"toolchain.lock is invalid JSON",details:["Regenerate lockfile with rapidkit bootstrap."],evidencePath:s}}}function x(t){let e=l.join(t,".rapidkit","reports","doctor-last-run.json");if(!d.existsSync(e))return {payload:null,path:e};try{let a=JSON.parse(d.readFileSync(e,"utf-8"));return c$1(a,"workspace")?{payload:a,path:e}:{payload:null,path:e}}catch{return {payload:null,path:e}}}function L(t){let e=x(t);if(!e.payload)return {gate:{gate:"doctor",status:"fail",summary:"Doctor evidence is missing",details:["Run rapidkit doctor workspace --json before release readiness checks."],evidencePath:e.path},payload:null};let a=p(e.payload.summary),s=Number(a.totalIssues??0);return a.hasSystemErrors?{gate:{gate:"doctor",status:"fail",summary:"Doctor reported system errors",details:["Resolve system-level doctor errors before proceeding."],evidencePath:e.path},payload:e.payload}:s>0?{gate:{gate:"doctor",status:"warn",summary:`Doctor found ${s} issue(s)`,details:["Run rapidkit doctor workspace --fix and re-run readiness checks."],evidencePath:e.path},payload:e.payload}:{gate:{gate:"doctor",status:"pass",summary:"Doctor checks passed without issues",details:[],evidencePath:e.path},payload:e.payload}}function D(t){let e=l.join(t,".rapidkit","reports","analyze-last-run.json");if(!d.existsSync(e))return {gate:"analyze",status:"fail",summary:"Analyze evidence is missing",details:["Run rapidkit analyze --json before release readiness checks."],evidencePath:e};try{let a=JSON.parse(d.readFileSync(e,"utf-8")),s=p(a.summary),r=String(s.verdict??"").toLowerCase(),o=Number(s.score??0),i=p(s.findings),n=Number(i.fail??0);return r==="blocked"||n>0?{gate:"analyze",status:"fail",summary:`Analyze verdict is blocked (score ${o}/100)`,details:["Resolve analyze findings and regenerate analyze-last-run.json."],evidencePath:e}:r==="needs-attention"?{gate:"analyze",status:"warn",summary:`Analyze needs attention (score ${o}/100)`,details:["Review analyze warnings before release."],evidencePath:e}:{gate:"analyze",status:"pass",summary:`Analyze passed (score ${o}/100)`,details:[],evidencePath:e}}catch{return {gate:"analyze",status:"fail",summary:"Analyze evidence is invalid JSON",details:["Re-run rapidkit analyze --json to regenerate evidence."],evidencePath:e}}}function J(t){try{let e=JSON.parse(d.readFileSync(t,"utf-8")),a=String(e.status??"").toLowerCase(),s=p(e.summary),r=Number(s.failedChecks??0);return a==="fail"||r>0?{gate:"verify",status:"fail",summary:"Verify-pack contract reports failed checks",details:["Fix failed verify checks and regenerate verify-pack contract evidence."],evidencePath:t}:a==="pass"?{gate:"verify",status:"pass",summary:"Verify-pack contract passed",details:[],evidencePath:t}:{gate:"verify",status:"warn",summary:"Verify-pack contract status is not explicit",details:["Ensure contract status is pass/fail and keep schema aligned with v1 contract."],evidencePath:t}}catch{return {gate:"verify",status:"fail",summary:"Verify-pack contract is invalid JSON",details:["Regenerate verify-pack contract artifact."],evidencePath:t}}}async function W(t,e){if(e.skipVerify)return {gate:"verify",status:"pass",summary:"Verify gate skipped (--skip-verify)",details:["Verification was explicitly skipped for this readiness run."]};let a=l.join(t,".rapidkit","reports"),s=O(a,[/verify-pack-contract/i,/^verify.*\.json$/i]);if(s)return J(s);let r=l.join(a,"workspace-contract-verify-last-run.json"),o=O(a,[/workspace-contract-verify-last-run/i,/workspace-contract-verify/i]);if(o)try{let i=JSON.parse(d.readFileSync(o,"utf-8")),n=String(i.status??"").toLowerCase();if(n==="passed"||n==="pass")return {gate:"verify",status:"pass",summary:"Workspace contract verification passed (CLI cache)",details:[],evidencePath:o};if(n==="failed"||n==="fail")return {gate:"verify",status:"fail",summary:"Workspace contract verification failed (CLI cache)",details:(Array.isArray(i.violations)?i.violations:[]).slice(0,5),evidencePath:o}}catch{}try{let{verifyWorkspaceContract:i}=await import('./workspace-contract-D5O4OZD5.js'),n=await i({workspacePath:t}),c={schemaVersion:"v1",source:"cli",generatedAt:new Date().toISOString(),status:n.status,contractPath:n.contractPath,projectCount:n.projectCount,checks:n.checks,violations:n.violations};return await h.ensureDir(a),await h.writeJSON(r,c,{spaces:2}),n.status==="failed"?{gate:"verify",status:"fail",summary:"Workspace contract verification failed (CLI)",details:n.violations.slice(0,5),evidencePath:r}:{gate:"verify",status:"pass",summary:"Workspace contract verification passed (CLI)",details:[],evidencePath:r}}catch(i){return {gate:"verify",status:"fail",summary:"No verify evidence and workspace contract verification unavailable",details:["Run rapidkit workspace contract verify --json or export verify-pack contract from CI.",i instanceof Error?i.message:String(i)],evidencePath:l.join(a,"*verify*.json")}}}function F(t,e){let a=l.join(e,".rapidkit","reports","doctor-last-run.json");if(!t)return {gate:"dependency",status:"warn",summary:"Dependency risk check skipped (doctor evidence missing)",details:["Run rapidkit doctor workspace --json to include dependency findings."],evidencePath:a};let s=Array.isArray(t.projects)?t.projects:[],r=s.reduce((i,n)=>{let c=Number(n.vulnerabilities??0);return Number.isFinite(c)?i+Math.max(0,c):i},0),o=s.filter(i=>i.depsInstalled===false).length;return r>0?{gate:"dependency",status:"fail",summary:`${r} dependency vulnerability(ies) reported`,details:["Resolve vulnerabilities (npm/pip/go audit pipelines) before release."],evidencePath:a}:o>0?{gate:"dependency",status:"warn",summary:`${o} project(s) report missing dependencies`,details:["Run project init/bootstrap and regenerate doctor evidence."],evidencePath:a}:{gate:"dependency",status:"pass",summary:"No dependency vulnerabilities reported",details:[],evidencePath:a}}function M(t){return t.some(e=>e.status==="fail")?"fail":t.some(e=>e.status==="warn")?"warn":"pass"}async function _(t,e){let a=l.join(t,".rapidkit","reports","release-readiness-last-run.json");return await h.ensureDir(l.dirname(a)),await h.writeJSON(a,e,{spaces:2}),a}async function K(t={}){let e$1=l.resolve(t.startPath??process.cwd()),a$1=a(e$1)??e$1,s=$(e$1,a$1),r=I(s),o=await V(a$1)>0,i=z(a$1,r,{hasRegisteredProjects:o}),n=L(a$1),c=D(a$1),f$1=await W(a$1,{skipVerify:t.skipVerify}),g=F(n.payload,a$1),k=[i,n.gate,c,f$1,g],v=M(k),m={schemaVersion:G,generatedAt:new Date().toISOString(),workspacePath:a$1,projectPath:s,action:t.action,overallStatus:v,blocking:v==="fail",blockingReasons:k.filter(y=>y.status==="fail").map(y=>`${y.gate}: ${y.summary}`),gates:k};if(t.writeReport!==false){let y=f(m,{commandId:"workspaceReadiness",exitCode:v==="fail"?2:v==="warn"?1:0,generatedAt:m.generatedAt,blockers:m.blockingReasons,runId:e()});m.evidencePath=await _(a$1,y);}return m}function H(t){return t==="pass"?u.green("PASS"):t==="warn"?u.yellow("WARN"):u.red("FAIL")}function B(t){return t==="pass"?u.green("PASS"):t==="warn"?u.yellow("WARN"):u.red("FAIL")}async function se(t){let e=await K({writeReport:true,skipVerify:t.skipVerify===true});if(t.json)console.log(JSON.stringify(e,null,2));else {console.log(u.bold.cyan(`
2
+ \u{1F6A6} RapidKit Release Readiness
3
+ `)),console.log(u.bold(`Workspace: ${u.cyan(l.basename(e.workspacePath))}`)),console.log(u.gray(`Path: ${e.workspacePath}`)),console.log(`Overall: ${B(e.overallStatus)}`);for(let a of e.gates){console.log(` - ${a.gate}: ${H(a.status)} ${a.summary}`);for(let s of a.details)console.log(u.gray(` ${s}`));a.evidencePath&&console.log(u.gray(` evidence: ${a.evidencePath}`));}e.evidencePath&&console.log(u.gray(`
4
+ Evidence saved: ${e.evidencePath}`));}t.strict&&e.overallStatus!=="pass"&&process.exit(1);}export{K as a,se as b};