@thomasminh1995/depverdict 0.6.0-alpha.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 (252) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +518 -0
  3. package/bin/depverdict.js +7 -0
  4. package/bin/upgradelens.js +7 -0
  5. package/docs/GR-01-Semantic-Grounding-Failure-Analysis.md +309 -0
  6. package/docs/GR-02-Versioned-Action-Evaluation-Criteria.md +187 -0
  7. package/docs/GR-03-Extractive-Contract-Safety-Experiment.md +242 -0
  8. package/docs/GR-04-Versioned-Production-Extractive-Contract.md +154 -0
  9. package/docs/IA-01-Repository-Usage-Discovery.md +122 -0
  10. package/docs/IA-02-Repository-Impact-Analysis.md +118 -0
  11. package/docs/IA-03-Repository-Impact-Evidence.md +160 -0
  12. package/docs/IA-04-CLI-Orchestration.md +235 -0
  13. package/docs/IA-05-Real-Provider-Validation.md +235 -0
  14. package/docs/IA-05-VinGrade-Validation.md +339 -0
  15. package/docs/MVP-01.md +48 -0
  16. package/docs/MVP-02-Architecture.md +536 -0
  17. package/docs/MVP-02-CLI-HTTP-Runtime.md +50 -0
  18. package/docs/MVP-02-HTTP-Lifecycle.md +37 -0
  19. package/docs/MVP-02-Knowledge-Manifest-Generation.md +75 -0
  20. package/docs/MVP-02-Knowledge-Manifest.md +279 -0
  21. package/docs/MVP-02-Knowledge-Research-Orchestration.md +62 -0
  22. package/docs/MVP-02-Knowledge-Store.md +87 -0
  23. package/docs/MVP-02-PyPI-Registry-Adapter.md +97 -0
  24. package/docs/MVP-02-Research-Planning.md +196 -0
  25. package/docs/MVP-02-Source-Provenance.md +81 -0
  26. package/docs/MVP-02-npm-Registry-Adapter.md +99 -0
  27. package/docs/RR-01-End-to-End-and-Real-Provider-Validation.md +393 -0
  28. package/docs/RR-01-RERUN-Extractive-Contract-Validation.md +566 -0
  29. package/docs/RR-02-Full-Product-Workflow-and-Developer-CLI-UX-Review.md +35 -0
  30. package/docs/RR02-FIX-01-Persistent-Qualification-Resolution.md +32 -0
  31. package/docs/RR02-FIX-02-Stage-aware-CLI-Progress-and-Heartbeat.md +28 -0
  32. package/docs/RR02-FIX-03-npm-Capture-Evidence-Exclusion.md +33 -0
  33. package/docs/RR02-FIX-03A-Complete-Package-Exclusion-and-Evidence-Commit.md +223 -0
  34. package/docs/RR02-FIX-04-Event-loop-safe-Heartbeat.md +393 -0
  35. package/docs/RR02-FIX-05-Materialize-Persisted-Qualification.md +207 -0
  36. package/docs/RR02-RERUN-CLI-Qualification-Progress-UX-and-Package-Validation.md +342 -0
  37. package/docs/VinGrade-MVP-02-Validation.md +480 -0
  38. package/docs/VinGrade-RC02-Live-Validation.md +273 -0
  39. package/docs/ai-capability-discovery.md +573 -0
  40. package/docs/ai-engineering-production-readiness.md +390 -0
  41. package/docs/ai-engineering-review.md +251 -0
  42. package/docs/ai-runtime-governance-discovery.md +754 -0
  43. package/docs/architecture-overview.md +78 -0
  44. package/docs/cli-progress.md +111 -0
  45. package/docs/decisions/diff-01-brand-distribution-identity.md +450 -0
  46. package/docs/decisions/diff-02-identity-compatibility-contract.md +274 -0
  47. package/docs/decisions/diff-03-repository-docs-community-migration.md +165 -0
  48. package/docs/decisions/diff-04-release-evidence-gap-acceptance.md +110 -0
  49. package/docs/discovery/mvp-05-ai-migration-planning-discovery.md +350 -0
  50. package/docs/gateway-runtime-discovery.md +614 -0
  51. package/docs/live-ai-validation.md +299 -0
  52. package/docs/migration-planning-qualification-resolution.md +99 -0
  53. package/docs/migrations/upgradelens-to-depverdict.md +97 -0
  54. package/docs/mp-r03-deterministic-upgrade-decision-architecture.md +135 -0
  55. package/docs/mp-r04-evidence-bounded-migration-handoff-architecture.md +116 -0
  56. package/docs/mp-r05-product-completion-and-decision-first-cli-architecture.md +162 -0
  57. package/docs/mvp-05-deterministic-context-runtime.md +127 -0
  58. package/docs/mvp-05-migration-checklist-contract.md +166 -0
  59. package/docs/mvp-05-migration-checklist-orchestration.md +105 -0
  60. package/docs/mvp-05-migration-evaluation-and-qualification.md +135 -0
  61. package/docs/mvp-05-provider-neutral-generator.md +79 -0
  62. package/docs/ollama-local-smoke-validation.md +156 -0
  63. package/docs/openai-compatible-runtime-discovery.md +789 -0
  64. package/docs/openrouter-one-dependency-validation.md +205 -0
  65. package/docs/oss-02-package-guard-hardening-architecture.md +131 -0
  66. package/docs/oss-04-public-ci-package-metadata-architecture.md +142 -0
  67. package/docs/package-content-policy.md +98 -0
  68. package/docs/releases/v0.5.0-technical-preview.md +114 -0
  69. package/docs/releases/v0.6.0-alpha.1-depverdict-preview.md +101 -0
  70. package/docs/reviews/diff-02-identity-contract-compatibility.md +413 -0
  71. package/docs/reviews/diff-03-repository-docs-community-migration.md +364 -0
  72. package/docs/reviews/diff-04-depverdict-distribution-identity-readiness-rereview.md +453 -0
  73. package/docs/reviews/diff-04-fix-post-rename-identity-release-remediation.md +310 -0
  74. package/docs/reviews/diff-05-final-preview-distribution-qualification.md +561 -0
  75. package/docs/reviews/mvp-05-final-product-value-workflow-rereview.md +471 -0
  76. package/docs/reviews/mvp-05-product-workflow-review.md +605 -0
  77. package/docs/reviews/oss-01-duplicate-artifact-investigation-cleanup.md +411 -0
  78. package/docs/reviews/oss-02-package-guard-hardening.md +303 -0
  79. package/docs/reviews/oss-03-community-scaffolding.md +378 -0
  80. package/docs/reviews/oss-04-public-ci-package-metadata.md +439 -0
  81. package/docs/reviews/oss-05-technical-preview-qualification.md +482 -0
  82. package/docs/reviews/upgradelens-vs-upgradedepdetective-source-comparison.md +355 -0
  83. package/docs/reviews/v0.5.0-pre-release-smoke.md +263 -0
  84. package/docs/reviews/v0.5.0-version-bump-release-verification.md +306 -0
  85. package/docs/runtime-contract-discovery.md +521 -0
  86. package/docs/structured-output-compatibility-report.md +100 -0
  87. package/docs/ts-fix-01-exact-duplicate-occurrence-target-selection-architecture.md +111 -0
  88. package/docs/version-analysis-architecture.md +827 -0
  89. package/eval/README.md +86 -0
  90. package/eval/datasets/generic/declared-constraint.json +59 -0
  91. package/eval/datasets/generic/evidence-conflict.json +73 -0
  92. package/eval/datasets/generic/major-breaking-release.json +66 -0
  93. package/eval/datasets/generic/missing-evidence.json +46 -0
  94. package/eval/datasets/generic/patch-release-low.json +59 -0
  95. package/eval/datasets/node/axios-patch-low.json +59 -0
  96. package/eval/datasets/node/react-major-breaking.json +66 -0
  97. package/eval/datasets/node/react-minor-compatibility.json +66 -0
  98. package/eval/datasets/python/fastapi-deprecation.json +66 -0
  99. package/eval/datasets/python/pydantic-major-breaking.json +66 -0
  100. package/eval/migration-planning/golden-dataset-v2.json +306 -0
  101. package/eval/migration-planning/golden-dataset.json +214 -0
  102. package/eval/schemas/expected-result.schema.json +88 -0
  103. package/eval/schemas/golden-case.schema.json +181 -0
  104. package/package.json +57 -0
  105. package/schemas/ai-scorecard.schema.json +132 -0
  106. package/schemas/benchmark-report.schema.json +189 -0
  107. package/schemas/benchmark.schema.json +55 -0
  108. package/schemas/capability-profile.schema.json +44 -0
  109. package/schemas/conformance-report.schema.json +150 -0
  110. package/schemas/deployment-profile.schema.json +64 -0
  111. package/schemas/evaluation-report.schema.json +158 -0
  112. package/schemas/knowledge-evidence-bundle.schema.json +150 -0
  113. package/schemas/knowledge-manifest.schema.json +548 -0
  114. package/schemas/metrics.schema.json +178 -0
  115. package/schemas/migration-checklist-extractive-candidate.schema.json +42 -0
  116. package/schemas/migration-checklist.schema.json +706 -0
  117. package/schemas/migration-evaluation-dataset-v2.schema.json +208 -0
  118. package/schemas/migration-evaluation-dataset.schema.json +204 -0
  119. package/schemas/migration-planning-qualification-record.schema.json +234 -0
  120. package/schemas/project-manifest.schema.json +308 -0
  121. package/schemas/qualification-record.schema.json +56 -0
  122. package/schemas/repository-impact-evidence.schema.json +232 -0
  123. package/schemas/repository-impact.schema.json +202 -0
  124. package/schemas/upgrade-decision.schema.json +273 -0
  125. package/schemas/usage-index.schema.json +179 -0
  126. package/schemas/version-analysis.schema.json +449 -0
  127. package/src/ai-runtime-debug.js +325 -0
  128. package/src/ai-runtime-error.js +42 -0
  129. package/src/ai-runtime.js +174 -0
  130. package/src/ai-scorecard.js +204 -0
  131. package/src/ai-version-analysis.js +484 -0
  132. package/src/artifact-root-compatibility.js +91 -0
  133. package/src/benchmark-report.js +111 -0
  134. package/src/benchmark-runner.js +191 -0
  135. package/src/canonical-json.js +69 -0
  136. package/src/cli.js +1299 -0
  137. package/src/conformance-report.js +158 -0
  138. package/src/conformance-runner.js +253 -0
  139. package/src/constants.js +73 -0
  140. package/src/cooperative-scheduler.js +79 -0
  141. package/src/dependencies.js +44 -0
  142. package/src/dependency-ai-context.js +625 -0
  143. package/src/detectors.js +253 -0
  144. package/src/discovery.js +234 -0
  145. package/src/ecosystem-version-adapter.js +294 -0
  146. package/src/environment-compatibility.js +77 -0
  147. package/src/evaluation-comparator.js +158 -0
  148. package/src/evaluation-report.js +76 -0
  149. package/src/evaluation-runner.js +248 -0
  150. package/src/evidence-source-adapter.js +472 -0
  151. package/src/files.js +89 -0
  152. package/src/governance-diagnostics.js +64 -0
  153. package/src/governance-loader.js +63 -0
  154. package/src/governance-metadata.js +346 -0
  155. package/src/governance-validator.js +360 -0
  156. package/src/http/bounded-fetch.js +278 -0
  157. package/src/http/cli-http-runtime.js +44 -0
  158. package/src/impact/input-loader.js +157 -0
  159. package/src/impact/matcher.js +40 -0
  160. package/src/impact/repository-impact.js +199 -0
  161. package/src/impact/runtime.js +24 -0
  162. package/src/impact/status.js +62 -0
  163. package/src/impact/writer.js +30 -0
  164. package/src/impact-evidence/input-loader.js +202 -0
  165. package/src/impact-evidence/repository-impact-evidence.js +234 -0
  166. package/src/impact-evidence/runtime.js +16 -0
  167. package/src/impact-evidence/writer.js +30 -0
  168. package/src/index.js +563 -0
  169. package/src/installed-version-baseline.js +196 -0
  170. package/src/knowledge-cache.js +324 -0
  171. package/src/knowledge-evidence-bundle.js +101 -0
  172. package/src/knowledge-evidence-producer.js +233 -0
  173. package/src/knowledge-manifest-builder.js +188 -0
  174. package/src/knowledge-manifest-writer.js +32 -0
  175. package/src/knowledge-manifest.js +255 -0
  176. package/src/knowledge-research.js +615 -0
  177. package/src/metrics-engine.js +205 -0
  178. package/src/migration-checklist/ai-candidate.js +320 -0
  179. package/src/migration-checklist/assembler.js +37 -0
  180. package/src/migration-checklist/context-runtime.js +828 -0
  181. package/src/migration-checklist/evaluation/action-criteria.js +244 -0
  182. package/src/migration-checklist/evaluation/comparator-v2.js +332 -0
  183. package/src/migration-checklist/evaluation/comparator.js +279 -0
  184. package/src/migration-checklist/evaluation/dataset-v2.js +227 -0
  185. package/src/migration-checklist/evaluation/dataset.js +336 -0
  186. package/src/migration-checklist/evaluation/extractive-fixtures-v2.js +148 -0
  187. package/src/migration-checklist/evaluation/metrics-v2.js +226 -0
  188. package/src/migration-checklist/evaluation/metrics.js +158 -0
  189. package/src/migration-checklist/evaluation/qualification-v2.js +321 -0
  190. package/src/migration-checklist/evaluation/qualification.js +239 -0
  191. package/src/migration-checklist/evaluation/runner-v2.js +294 -0
  192. package/src/migration-checklist/evaluation/runner.js +194 -0
  193. package/src/migration-checklist/evaluation/scorecard-v2.js +106 -0
  194. package/src/migration-checklist/evaluation/scorecard.js +86 -0
  195. package/src/migration-checklist/extractive-candidate.js +166 -0
  196. package/src/migration-checklist/extractive-prompt.js +62 -0
  197. package/src/migration-checklist/generator.js +702 -0
  198. package/src/migration-checklist/grounding-policy.js +117 -0
  199. package/src/migration-checklist/input-loader.js +613 -0
  200. package/src/migration-checklist/migration-checklist.js +635 -0
  201. package/src/migration-checklist/presentation.js +292 -0
  202. package/src/migration-checklist/progress.js +96 -0
  203. package/src/migration-checklist/prompt.js +83 -0
  204. package/src/migration-checklist/qualification-guard.js +462 -0
  205. package/src/migration-checklist/qualification-resolution.js +122 -0
  206. package/src/migration-checklist/qualification-store.js +225 -0
  207. package/src/migration-checklist/runtime.js +205 -0
  208. package/src/migration-checklist/verification.js +134 -0
  209. package/src/migration-checklist/writer.js +35 -0
  210. package/src/openai-compatible-provider.js +451 -0
  211. package/src/orchestration/failure-log.js +32 -0
  212. package/src/orchestration/pipeline.js +200 -0
  213. package/src/orchestration/progress-events.js +337 -0
  214. package/src/orchestration/progress-reporter.js +131 -0
  215. package/src/orchestration/text-writer.js +22 -0
  216. package/src/portable.js +13 -0
  217. package/src/product-completion.js +249 -0
  218. package/src/project-manifest-input.js +90 -0
  219. package/src/project-manifest.js +141 -0
  220. package/src/python-requirements.js +137 -0
  221. package/src/registry/npm-packument.js +256 -0
  222. package/src/registry/npm-registry-adapter.js +262 -0
  223. package/src/registry/pypi-project.js +300 -0
  224. package/src/registry/pypi-registry-adapter.js +235 -0
  225. package/src/registry/sanitize-registry-body.js +51 -0
  226. package/src/renderers/console.js +160 -0
  227. package/src/renderers/impact-presentation.js +278 -0
  228. package/src/renderers/markdown.js +172 -0
  229. package/src/research-plan.js +455 -0
  230. package/src/runtime-conformance.js +275 -0
  231. package/src/source-provenance.js +393 -0
  232. package/src/source-url.js +62 -0
  233. package/src/structured-output-schema.js +66 -0
  234. package/src/target-selector.js +306 -0
  235. package/src/upgrade-decision/input-loader.js +107 -0
  236. package/src/upgrade-decision/presentation.js +43 -0
  237. package/src/upgrade-decision/runtime.js +21 -0
  238. package/src/upgrade-decision/upgrade-decision.js +626 -0
  239. package/src/upgrade-decision/writer.js +30 -0
  240. package/src/usage/analyzer-registry.js +63 -0
  241. package/src/usage/coverage.js +116 -0
  242. package/src/usage/input-loader.js +139 -0
  243. package/src/usage/js/analyzer.js +240 -0
  244. package/src/usage/js/parser.js +21 -0
  245. package/src/usage/runtime.js +187 -0
  246. package/src/usage/scope.js +44 -0
  247. package/src/usage/source-files.js +50 -0
  248. package/src/usage/usage-index.js +217 -0
  249. package/src/usage/writer.js +31 -0
  250. package/src/version-analysis-loader.js +203 -0
  251. package/src/version-analysis-manifest.js +314 -0
  252. package/src/version-analysis-writer.js +30 -0
@@ -0,0 +1,308 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://raw.githubusercontent.com/thomasMinh1995/UpgradeLens/main/schemas/project-manifest.schema.json",
4
+ "title": "UpgradeLens Project Manifest",
5
+ "description": "Portable output produced by UpgradeLens project discovery.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "schemaVersion",
10
+ "generatedAt",
11
+ "generator",
12
+ "repository",
13
+ "summary",
14
+ "projects",
15
+ "warnings"
16
+ ],
17
+ "properties": {
18
+ "schemaVersion": { "const": "2.0.0" },
19
+ "generatedAt": { "type": "string", "format": "date-time" },
20
+ "generator": {
21
+ "type": "object",
22
+ "additionalProperties": false,
23
+ "required": ["name", "version"],
24
+ "properties": {
25
+ "name": { "const": "UpgradeLens" },
26
+ "version": { "type": "string" }
27
+ }
28
+ },
29
+ "repository": {
30
+ "type": "object",
31
+ "additionalProperties": false,
32
+ "required": ["name", "root"],
33
+ "properties": {
34
+ "name": { "type": "string", "minLength": 1 },
35
+ "root": { "const": "." },
36
+ "vcs": {
37
+ "type": "object",
38
+ "additionalProperties": false,
39
+ "required": ["type"],
40
+ "properties": {
41
+ "type": { "const": "git" },
42
+ "branch": { "type": "string", "minLength": 1 }
43
+ }
44
+ }
45
+ }
46
+ },
47
+ "summary": {
48
+ "type": "object",
49
+ "additionalProperties": false,
50
+ "required": ["projectCount", "ecosystems", "workspaceCount"],
51
+ "properties": {
52
+ "projectCount": { "type": "integer", "minimum": 0 },
53
+ "ecosystems": {
54
+ "type": "object",
55
+ "additionalProperties": { "type": "integer", "minimum": 1 }
56
+ },
57
+ "workspaceCount": { "type": "integer", "minimum": 0 }
58
+ }
59
+ },
60
+ "projects": {
61
+ "type": "array",
62
+ "items": { "$ref": "#/$defs/project" }
63
+ },
64
+ "warnings": {
65
+ "type": "array",
66
+ "items": { "$ref": "#/$defs/warning" }
67
+ }
68
+ },
69
+ "$defs": {
70
+ "packageManager": {
71
+ "type": "object",
72
+ "additionalProperties": false,
73
+ "required": ["name"],
74
+ "properties": {
75
+ "name": { "type": "string", "minLength": 1 },
76
+ "version": { "type": "string", "minLength": 1 }
77
+ }
78
+ },
79
+ "dependencyByType": {
80
+ "type": "object",
81
+ "additionalProperties": false,
82
+ "required": ["dependencies", "devDependencies", "peerDependencies", "optionalDependencies"],
83
+ "properties": {
84
+ "dependencies": { "type": "integer", "minimum": 0 },
85
+ "devDependencies": { "type": "integer", "minimum": 0 },
86
+ "peerDependencies": { "type": "integer", "minimum": 0 },
87
+ "optionalDependencies": { "type": "integer", "minimum": 0 }
88
+ }
89
+ },
90
+ "installedVersionSource": {
91
+ "type": "object",
92
+ "additionalProperties": false,
93
+ "required": ["type", "path", "lockfileVersion", "packagePath"],
94
+ "properties": {
95
+ "type": { "const": "package-lock" },
96
+ "path": {
97
+ "type": "string",
98
+ "minLength": 1,
99
+ "pattern": "^(?!/)(?![A-Za-z]:)(?!.*(?:^|/)\\.\\.(?:/|$))[^\\\\]+$"
100
+ },
101
+ "lockfileVersion": { "enum": [1, 2, 3] },
102
+ "packagePath": {
103
+ "type": "string",
104
+ "minLength": 1,
105
+ "pattern": "^(?!/)(?![A-Za-z]:)(?!.*(?:^|/)\\.\\.(?:/|$))[^\\\\]+$"
106
+ }
107
+ }
108
+ },
109
+ "installedVersionReason": {
110
+ "enum": [
111
+ "INVALID_LOCKFILE",
112
+ "LOCKFILE_NOT_FOUND",
113
+ "LOCKFILE_UNSUPPORTED",
114
+ "NON_REGISTRY_DEPENDENCY",
115
+ "PACKAGE_NOT_RESOLVED",
116
+ "RESOLVED_VERSION_UNAVAILABLE",
117
+ "WORKSPACE_RESOLUTION_AMBIGUOUS"
118
+ ]
119
+ },
120
+ "dependencySummary": {
121
+ "type": "object",
122
+ "additionalProperties": false,
123
+ "required": ["status"],
124
+ "properties": {
125
+ "status": { "enum": ["parsed", "unsupported", "failed"] },
126
+ "declarationCount": { "type": "integer", "minimum": 0 },
127
+ "uniqueCount": { "type": "integer", "minimum": 0 },
128
+ "duplicateCount": { "type": "integer", "minimum": 0 },
129
+ "byType": { "$ref": "#/$defs/dependencyByType" }
130
+ },
131
+ "allOf": [
132
+ {
133
+ "if": {
134
+ "properties": { "status": { "const": "parsed" } },
135
+ "required": ["status"]
136
+ },
137
+ "then": { "required": ["declarationCount", "uniqueCount", "duplicateCount"] },
138
+ "else": {
139
+ "not": {
140
+ "anyOf": [
141
+ { "required": ["declarationCount"] },
142
+ { "required": ["uniqueCount"] },
143
+ { "required": ["duplicateCount"] },
144
+ { "required": ["byType"] }
145
+ ]
146
+ }
147
+ }
148
+ }
149
+ ]
150
+ },
151
+ "dependency": {
152
+ "type": "object",
153
+ "additionalProperties": false,
154
+ "required": ["name", "normalizedName", "declaredVersion", "type", "manifest"],
155
+ "properties": {
156
+ "name": { "type": "string", "minLength": 1 },
157
+ "normalizedName": { "type": "string", "minLength": 1 },
158
+ "declaredVersion": { "type": ["string", "null"] },
159
+ "installedVersion": { "type": ["string", "null"] },
160
+ "installedVersionStatus": { "enum": ["resolved", "unresolved"] },
161
+ "installedVersionSource": {
162
+ "anyOf": [
163
+ { "$ref": "#/$defs/installedVersionSource" },
164
+ { "type": "null" }
165
+ ]
166
+ },
167
+ "installedVersionReason": {
168
+ "anyOf": [
169
+ { "$ref": "#/$defs/installedVersionReason" },
170
+ { "type": "null" }
171
+ ]
172
+ },
173
+ "type": {
174
+ "enum": [
175
+ "constraint",
176
+ "dependency",
177
+ "devDependency",
178
+ "directReference",
179
+ "editable",
180
+ "optionalDependency",
181
+ "peerDependency",
182
+ "runtime"
183
+ ]
184
+ },
185
+ "manifest": { "type": "string", "minLength": 1 }
186
+ },
187
+ "allOf": [
188
+ {
189
+ "if": {
190
+ "anyOf": [
191
+ { "required": ["installedVersion"] },
192
+ { "required": ["installedVersionStatus"] },
193
+ { "required": ["installedVersionSource"] },
194
+ { "required": ["installedVersionReason"] }
195
+ ]
196
+ },
197
+ "then": {
198
+ "required": [
199
+ "installedVersion",
200
+ "installedVersionStatus",
201
+ "installedVersionSource",
202
+ "installedVersionReason"
203
+ ]
204
+ }
205
+ },
206
+ {
207
+ "if": {
208
+ "properties": { "installedVersionStatus": { "const": "resolved" } },
209
+ "required": ["installedVersionStatus"]
210
+ },
211
+ "then": {
212
+ "properties": {
213
+ "installedVersion": { "type": "string", "minLength": 1 },
214
+ "installedVersionSource": { "$ref": "#/$defs/installedVersionSource" },
215
+ "installedVersionReason": { "type": "null" }
216
+ }
217
+ }
218
+ },
219
+ {
220
+ "if": {
221
+ "properties": { "installedVersionStatus": { "const": "unresolved" } },
222
+ "required": ["installedVersionStatus"]
223
+ },
224
+ "then": {
225
+ "properties": {
226
+ "installedVersion": { "type": "null" },
227
+ "installedVersionSource": { "type": "null" },
228
+ "installedVersionReason": { "$ref": "#/$defs/installedVersionReason" }
229
+ }
230
+ }
231
+ }
232
+ ]
233
+ },
234
+ "project": {
235
+ "type": "object",
236
+ "additionalProperties": false,
237
+ "required": ["id", "name", "path", "ecosystem", "languages", "manifests", "dependencySummary", "dependencies"],
238
+ "properties": {
239
+ "id": { "type": "string", "minLength": 1 },
240
+ "name": { "type": "string", "minLength": 1 },
241
+ "path": { "type": "string", "minLength": 1 },
242
+ "ecosystem": {
243
+ "enum": ["al", "dotnet", "go", "java", "node", "php", "python", "ruby", "rust"]
244
+ },
245
+ "languages": {
246
+ "type": "array",
247
+ "minItems": 1,
248
+ "items": { "type": "string", "minLength": 1 }
249
+ },
250
+ "manifests": {
251
+ "type": "array",
252
+ "minItems": 1,
253
+ "items": { "type": "string", "minLength": 1 }
254
+ },
255
+ "version": { "type": "string" },
256
+ "private": { "type": "boolean" },
257
+ "packageManager": { "$ref": "#/$defs/packageManager" },
258
+ "workspace": {
259
+ "type": "object",
260
+ "additionalProperties": false,
261
+ "required": ["root", "role"],
262
+ "properties": {
263
+ "root": { "type": "string", "minLength": 1 },
264
+ "role": { "enum": ["root", "member"] }
265
+ }
266
+ },
267
+ "dependencySummary": { "$ref": "#/$defs/dependencySummary" },
268
+ "dependencies": {
269
+ "type": "array",
270
+ "items": { "$ref": "#/$defs/dependency" }
271
+ }
272
+ },
273
+ "allOf": [
274
+ {
275
+ "if": {
276
+ "properties": {
277
+ "dependencySummary": {
278
+ "type": "object",
279
+ "properties": { "status": { "const": "parsed" } },
280
+ "required": ["status"]
281
+ }
282
+ },
283
+ "required": ["dependencySummary"]
284
+ },
285
+ "else": { "properties": { "dependencies": { "type": "array", "maxItems": 0 } } }
286
+ }
287
+ ]
288
+ },
289
+ "warning": {
290
+ "type": "object",
291
+ "additionalProperties": false,
292
+ "required": ["code", "path", "message"],
293
+ "properties": {
294
+ "code": {
295
+ "enum": [
296
+ "DEPENDENCY_PARSE_FAILED",
297
+ "DIRECTORY_UNREADABLE",
298
+ "DUPLICATE_DEPENDENCY_DECLARATION",
299
+ "MANIFEST_INVALID",
300
+ "MANIFEST_UNREADABLE"
301
+ ]
302
+ },
303
+ "path": { "type": "string", "minLength": 1 },
304
+ "message": { "type": "string", "minLength": 1 }
305
+ }
306
+ }
307
+ }
308
+ }
@@ -0,0 +1,56 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://raw.githubusercontent.com/thomasMinh1995/UpgradeLens/main/schemas/qualification-record.schema.json",
4
+ "title": "UpgradeLens AI Runtime Qualification Record",
5
+ "description": "Portable task-scoped governance decision for one exact capability and deployment tuple.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "schemaVersion",
10
+ "qualificationId",
11
+ "deploymentProfileDigest",
12
+ "capabilityProfileDigest",
13
+ "conformanceReportDigest",
14
+ "status",
15
+ "qualifiedFor"
16
+ ],
17
+ "properties": {
18
+ "schemaVersion": { "const": "1.0.0" },
19
+ "qualificationId": { "$ref": "#/$defs/id" },
20
+ "deploymentProfileDigest": { "$ref": "#/$defs/digest" },
21
+ "capabilityProfileDigest": { "$ref": "#/$defs/digest" },
22
+ "conformanceReportDigest": {
23
+ "oneOf": [
24
+ { "$ref": "#/$defs/digest" },
25
+ { "type": "null" }
26
+ ]
27
+ },
28
+ "status": {
29
+ "enum": ["EXPERIMENTAL", "SUPPORTED", "CERTIFIED", "DEPRECATED", "RETIRED"]
30
+ },
31
+ "qualifiedFor": {
32
+ "type": "array",
33
+ "minItems": 1,
34
+ "uniqueItems": true,
35
+ "items": { "$ref": "#/$defs/task" }
36
+ }
37
+ },
38
+ "$defs": {
39
+ "id": {
40
+ "type": "string",
41
+ "minLength": 1,
42
+ "maxLength": 128,
43
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
44
+ },
45
+ "task": {
46
+ "type": "string",
47
+ "minLength": 1,
48
+ "maxLength": 128,
49
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
50
+ },
51
+ "digest": {
52
+ "type": "string",
53
+ "pattern": "^sha256:[a-f0-9]{64}$"
54
+ }
55
+ }
56
+ }
@@ -0,0 +1,232 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://raw.githubusercontent.com/thomasMinh1995/UpgradeLens/main/schemas/repository-impact-evidence.schema.json",
4
+ "title": "UpgradeLens Repository Impact Evidence",
5
+ "description": "Deterministic evidence explaining Repository Impact conclusions.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["schemaVersion", "generatedAt", "generator", "input", "analysis", "summary", "dependencies"],
9
+ "properties": {
10
+ "schemaVersion": { "const": "1.0.0" },
11
+ "generatedAt": { "type": "string", "format": "date-time" },
12
+ "generator": { "$ref": "#/$defs/generator" },
13
+ "input": { "$ref": "#/$defs/input" },
14
+ "analysis": { "$ref": "#/$defs/analysis" },
15
+ "summary": { "$ref": "#/$defs/summary" },
16
+ "dependencies": { "type": "array", "items": { "$ref": "#/$defs/dependencyEvidence" } }
17
+ },
18
+ "$defs": {
19
+ "digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
20
+ "relativePath": {
21
+ "type": "string",
22
+ "minLength": 1,
23
+ "pattern": "^(?!/)(?![A-Za-z]:)(?!.*(?:^|/)\\.\\.(?:/|$))[^\\\\]+$"
24
+ },
25
+ "generator": {
26
+ "type": "object",
27
+ "additionalProperties": false,
28
+ "required": ["name", "version"],
29
+ "properties": {
30
+ "name": { "const": "UpgradeLens" },
31
+ "version": { "type": "string", "minLength": 1 }
32
+ }
33
+ },
34
+ "projectManifest": {
35
+ "type": "object",
36
+ "additionalProperties": false,
37
+ "required": ["schemaVersion", "artifact", "artifactDigest", "repository"],
38
+ "properties": {
39
+ "schemaVersion": { "const": "2.0.0" },
40
+ "artifact": { "$ref": "#/$defs/relativePath" },
41
+ "artifactDigest": { "$ref": "#/$defs/digest" },
42
+ "repository": {
43
+ "type": "object",
44
+ "additionalProperties": false,
45
+ "required": ["name", "root"],
46
+ "properties": {
47
+ "name": { "type": "string", "minLength": 1 },
48
+ "root": { "const": "." }
49
+ }
50
+ }
51
+ }
52
+ },
53
+ "artifactLineage": {
54
+ "type": "object",
55
+ "additionalProperties": false,
56
+ "required": ["schemaVersion", "artifact", "artifactDigest"],
57
+ "properties": {
58
+ "schemaVersion": { "const": "1.0.0" },
59
+ "artifact": { "$ref": "#/$defs/relativePath" },
60
+ "artifactDigest": { "$ref": "#/$defs/digest" }
61
+ }
62
+ },
63
+ "input": {
64
+ "type": "object",
65
+ "additionalProperties": false,
66
+ "required": ["projectManifest", "versionAnalysis", "usageIndex", "repositoryImpact"],
67
+ "properties": {
68
+ "projectManifest": { "$ref": "#/$defs/projectManifest" },
69
+ "versionAnalysis": { "$ref": "#/$defs/artifactLineage" },
70
+ "usageIndex": { "$ref": "#/$defs/artifactLineage" },
71
+ "repositoryImpact": { "$ref": "#/$defs/artifactLineage" }
72
+ }
73
+ },
74
+ "evidenceGenerator": {
75
+ "type": "object",
76
+ "additionalProperties": false,
77
+ "required": ["id", "version"],
78
+ "properties": {
79
+ "id": { "const": "repository-impact-evidence" },
80
+ "version": { "const": "1.0.0" }
81
+ }
82
+ },
83
+ "analysis": {
84
+ "type": "object",
85
+ "additionalProperties": false,
86
+ "required": ["evidenceGenerator", "resultCount"],
87
+ "properties": {
88
+ "evidenceGenerator": { "$ref": "#/$defs/evidenceGenerator" },
89
+ "resultCount": { "type": "integer", "minimum": 0 }
90
+ }
91
+ },
92
+ "reasonCounts": {
93
+ "type": "object",
94
+ "additionalProperties": false,
95
+ "required": ["DEPENDENCY_NOT_USED", "EXACT_SYMBOL_USAGE_FOUND", "NO_EXACT_SYMBOL_USAGE_FOUND", "NO_MATCHABLE_SYMBOL_FOUND"],
96
+ "properties": {
97
+ "DEPENDENCY_NOT_USED": { "type": "integer", "minimum": 0 },
98
+ "EXACT_SYMBOL_USAGE_FOUND": { "type": "integer", "minimum": 0 },
99
+ "NO_EXACT_SYMBOL_USAGE_FOUND": { "type": "integer", "minimum": 0 },
100
+ "NO_MATCHABLE_SYMBOL_FOUND": { "type": "integer", "minimum": 0 },
101
+ "USAGE_NOT_FOUND": { "type": "integer", "minimum": 0 },
102
+ "COVERAGE_UNAVAILABLE": { "type": "integer", "minimum": 0 },
103
+ "NOT_ANALYZED": { "type": "integer", "minimum": 0 }
104
+ }
105
+ },
106
+ "summary": {
107
+ "type": "object",
108
+ "additionalProperties": false,
109
+ "required": ["impacted", "dependencyCount", "findingCount", "impactedFindingCount", "matchedSymbolCount", "usageRecordCount", "affectedFileCount", "reasonCounts"],
110
+ "properties": {
111
+ "impacted": { "type": "boolean" },
112
+ "dependencyCount": { "type": "integer", "minimum": 0 },
113
+ "findingCount": { "type": "integer", "minimum": 0 },
114
+ "impactedFindingCount": { "type": "integer", "minimum": 0 },
115
+ "matchedSymbolCount": { "type": "integer", "minimum": 0 },
116
+ "usageRecordCount": { "type": "integer", "minimum": 0 },
117
+ "affectedFileCount": { "type": "integer", "minimum": 0 },
118
+ "reasonCounts": { "$ref": "#/$defs/reasonCounts" }
119
+ }
120
+ },
121
+ "usageRecord": {
122
+ "type": "object",
123
+ "additionalProperties": false,
124
+ "required": ["file"],
125
+ "properties": {
126
+ "file": { "$ref": "#/$defs/relativePath" }
127
+ }
128
+ },
129
+ "matchedSymbol": {
130
+ "type": "object",
131
+ "additionalProperties": false,
132
+ "required": ["symbol", "usages"],
133
+ "properties": {
134
+ "symbol": { "type": "string", "minLength": 1 },
135
+ "usages": {
136
+ "type": "array",
137
+ "minItems": 1,
138
+ "items": { "$ref": "#/$defs/usageRecord" }
139
+ }
140
+ }
141
+ },
142
+ "findingEvidence": {
143
+ "type": "object",
144
+ "additionalProperties": false,
145
+ "required": ["id", "findingId", "kind", "summary", "impacted", "reasonCode", "matchedSymbols"],
146
+ "properties": {
147
+ "id": { "$ref": "#/$defs/digest" },
148
+ "findingId": { "type": "string", "minLength": 1 },
149
+ "kind": { "const": "breakingChange" },
150
+ "summary": { "type": "string", "minLength": 1 },
151
+ "impacted": { "type": "boolean" },
152
+ "status": {
153
+ "enum": ["IMPACTED", "NOT_IMPACTED", "USAGE_NOT_FOUND", "COVERAGE_UNAVAILABLE", "NOT_ANALYZED"]
154
+ },
155
+ "reasonCode": {
156
+ "enum": [
157
+ "DEPENDENCY_NOT_USED", "EXACT_SYMBOL_USAGE_FOUND", "NO_EXACT_SYMBOL_USAGE_FOUND",
158
+ "NO_MATCHABLE_SYMBOL_FOUND", "USAGE_NOT_FOUND", "COVERAGE_UNAVAILABLE", "NOT_ANALYZED",
159
+ "VERSION_ANALYSIS_SKIPPED", "VERSION_ANALYSIS_FAILED", "COVERAGE_COMPLETE",
160
+ "ANALYZER_UNAVAILABLE", "ANALYZER_AMBIGUOUS", "SOURCE_SCAN_INCOMPLETE",
161
+ "SOURCE_PARSE_FAILED", "FILE_UNREADABLE", "ANALYZER_FAILED",
162
+ "MULTIPLE_ANALYSIS_FAILURES", "COVERAGE_METADATA_MISSING"
163
+ ]
164
+ },
165
+ "matchedSymbols": { "type": "array", "items": { "$ref": "#/$defs/matchedSymbol" } }
166
+ }
167
+ },
168
+ "dependencyEvidence": {
169
+ "type": "object",
170
+ "additionalProperties": false,
171
+ "required": ["analysisResultId", "projectId", "packageId", "name", "impacted", "findings"],
172
+ "properties": {
173
+ "analysisResultId": { "$ref": "#/$defs/digest" },
174
+ "projectId": { "type": "string", "minLength": 1 },
175
+ "packageId": { "type": "string", "minLength": 1 },
176
+ "name": { "type": "string", "minLength": 1 },
177
+ "impacted": { "type": "boolean" },
178
+ "status": {
179
+ "enum": ["IMPACTED", "NOT_IMPACTED", "USAGE_NOT_FOUND", "COVERAGE_UNAVAILABLE", "NOT_ANALYZED"]
180
+ },
181
+ "reasonCode": { "$ref": "#/$defs/impactReasonCode" },
182
+ "coverage": { "$ref": "#/$defs/usageCoverage" },
183
+ "findings": { "type": "array", "items": { "$ref": "#/$defs/findingEvidence" } }
184
+ }
185
+ },
186
+ "usageCoverage": {
187
+ "type": "object",
188
+ "additionalProperties": false,
189
+ "required": [
190
+ "projectId", "projectPath", "ecosystem", "status", "analyzer",
191
+ "scannedFileCount", "analyzedFileCount", "parseFailureCount",
192
+ "analyzerFailureCount", "unreadableFileCount", "scanFailureCount", "reasonCode"
193
+ ],
194
+ "properties": {
195
+ "projectId": { "type": "string", "minLength": 1 },
196
+ "projectPath": { "type": ["string", "null"] },
197
+ "ecosystem": { "type": ["string", "null"] },
198
+ "status": { "enum": ["complete", "partial", "unavailable", "failed"] },
199
+ "analyzer": {
200
+ "oneOf": [
201
+ {
202
+ "type": "object",
203
+ "additionalProperties": false,
204
+ "required": ["id", "version"],
205
+ "properties": {
206
+ "id": { "type": "string", "minLength": 1 },
207
+ "version": { "type": "string", "minLength": 1 }
208
+ }
209
+ },
210
+ { "type": "null" }
211
+ ]
212
+ },
213
+ "scannedFileCount": { "type": "integer", "minimum": 0 },
214
+ "analyzedFileCount": { "type": "integer", "minimum": 0 },
215
+ "parseFailureCount": { "type": "integer", "minimum": 0 },
216
+ "analyzerFailureCount": { "type": "integer", "minimum": 0 },
217
+ "unreadableFileCount": { "type": "integer", "minimum": 0 },
218
+ "scanFailureCount": { "type": "integer", "minimum": 0 },
219
+ "reasonCode": { "type": "string", "minLength": 1 }
220
+ }
221
+ },
222
+ "impactReasonCode": {
223
+ "enum": [
224
+ "EXACT_SYMBOL_USAGE_FOUND", "NO_EXACT_SYMBOL_USAGE_FOUND", "NO_MATCHABLE_SYMBOL_FOUND",
225
+ "USAGE_NOT_FOUND", "VERSION_ANALYSIS_SKIPPED", "VERSION_ANALYSIS_FAILED",
226
+ "COVERAGE_COMPLETE", "ANALYZER_UNAVAILABLE", "ANALYZER_AMBIGUOUS",
227
+ "SOURCE_SCAN_INCOMPLETE", "SOURCE_PARSE_FAILED", "FILE_UNREADABLE",
228
+ "ANALYZER_FAILED", "MULTIPLE_ANALYSIS_FAILURES", "COVERAGE_METADATA_MISSING"
229
+ ]
230
+ }
231
+ }
232
+ }