@dailephd/my-dev-kit-lab 0.4.3 → 0.4.5

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 (97) hide show
  1. package/CHANGELOG.md +468 -0
  2. package/README.md +8 -1
  3. package/dist/scripts/report-context-integrity-smoke.js +70 -0
  4. package/dist/src/evaluation/ecosystemFixtures/index.js +3 -0
  5. package/dist/src/evaluation/ecosystemFixtures/loadContextIntegrityFixture.js +102 -0
  6. package/dist/src/evaluation/ecosystemFixtures/manifestTypes.js +1 -0
  7. package/dist/src/evaluation/ecosystemFixtures/validateManifest.js +82 -0
  8. package/dist/src/evaluation/ecosystemFixtures/verifyFixtureHashes.js +45 -0
  9. package/dist/src/evaluation/stageContextExpectations/producerReadinessExpectationTypes.js +8 -0
  10. package/dist/src/evaluation/stageContextExpectations/validation.js +200 -0
  11. package/dist/src/evaluation/stageContextMetrics/calculateAllocationMetrics.js +265 -0
  12. package/dist/src/evaluation/stageContextMetrics/calculateConditionCoverageMetrics.js +74 -0
  13. package/dist/src/evaluation/stageContextMetrics/calculateCriticalityMetrics.js +112 -0
  14. package/dist/src/evaluation/stageContextMetrics/calculateOwnerMetrics.js +84 -0
  15. package/dist/src/evaluation/stageContextMetrics/calculateProducerConditionAgreement.js +113 -0
  16. package/dist/src/evaluation/stageContextMetrics/calculateReadinessAgreement.js +212 -0
  17. package/dist/src/evaluation/stageContextMetrics/calculateRunIntegrityAgreement.js +309 -0
  18. package/dist/src/evaluation/stageContextMetrics/calculateSupplementalRawAgreement.js +60 -0
  19. package/dist/src/evaluation/stageContextMetrics/calculateTruncationClassification.js +144 -0
  20. package/dist/src/evaluation/stageContextMetrics/evaluateProducerReadinessBridge.js +198 -0
  21. package/dist/src/evaluation/stageContextMetrics/index.js +11 -0
  22. package/dist/src/evaluation/stageContextMetrics/producerReadinessMetricTypes.js +1 -0
  23. package/dist/src/evaluation/stageContextMetrics/runIntegrityAgreementTypes.js +1 -0
  24. package/dist/src/evaluation/stageContextSelectors/contextArtifactConsistency.js +17 -0
  25. package/dist/src/evaluation/stageContextSelectors/index.js +1 -0
  26. package/dist/src/evaluation/stageContextSelectors/orchestratorRunIntegritySelectors.js +64 -0
  27. package/dist/src/evaluation/upstreamArtifacts/index.js +8 -0
  28. package/dist/src/evaluation/upstreamArtifacts/orchestratorContextReadinessResultV1.js +247 -0
  29. package/dist/src/evaluation/upstreamArtifacts/orchestratorRunIntegrityV1.js +33 -0
  30. package/dist/src/evaluation/upstreamArtifacts/readImplementationContextPacketV1.js +9 -0
  31. package/dist/src/evaluation/upstreamArtifacts/readImplementationContextRetrievalReportV1.js +9 -0
  32. package/dist/src/evaluation/upstreamArtifacts/readOrchestratorRunIntegrityV1.js +9 -0
  33. package/dist/src/evaluation/upstreamArtifacts/readSupplementalContextTextFile.js +29 -0
  34. package/dist/src/evaluation/upstreamArtifacts/readTestContextPacketV1.js +9 -0
  35. package/dist/src/evaluation/upstreamArtifacts/readTestContextRetrievalReportV1.js +9 -0
  36. package/dist/src/evaluation/upstreamArtifacts/supplementalContextTextParser.js +75 -0
  37. package/dist/src/evaluation/upstreamArtifacts/supplementalContextTypes.js +152 -0
  38. package/dist/src/evaluation/upstreamArtifacts/validateMyDevKitContextCapsuleV1.js +59 -2
  39. package/dist/src/evaluation/upstreamArtifacts/validateMyDevKitRetrievalAuditRecordV1.js +15 -3
  40. package/dist/src/evaluation/upstreamArtifacts/validateOrchestratorRunIntegrityV1.js +177 -0
  41. package/dist/src/evaluation/upstreamArtifacts/validateSupplementalContextDocumentV1.js +148 -0
  42. package/dist/src/experiments/plugins/contextStrategyComparison/loadV043StrategyArtifacts.js +117 -6
  43. package/dist/src/experiments/plugins/contextStrategyComparison/runV043StageContextStrategyWithAssurance.js +18 -3
  44. package/dist/src/experiments/plugins/contextStrategyComparison/validateV043StrategyInput.js +17 -3
  45. package/dist/src/report/experiments/buildContextIntegrityReport.js +204 -0
  46. package/dist/src/report/experiments/buildContextStrategyComparisonV043Report.js +122 -0
  47. package/dist/src/report/experiments/contextIntegrityReportModel.js +1 -0
  48. package/dist/src/report/experiments/index.js +5 -0
  49. package/dist/src/report/experiments/renderContextIntegrityHtml.js +98 -0
  50. package/dist/src/report/experiments/renderContextIntegrityJsonReport.js +3 -0
  51. package/dist/src/report/experiments/renderContextIntegrityText.js +111 -0
  52. package/dist/src/report/experiments/renderContextStrategyComparisonV043Html.js +62 -0
  53. package/dist/src/report/experiments/renderPluginExperimentReportText.js +67 -0
  54. package/dist/src/securityValidation/packageChecks/requiredPackageContents.js +33 -0
  55. package/dist/src/securityValidation/packageChecks/runPackageChecks.js +11 -5
  56. package/docs/METRICS.md +111 -0
  57. package/package.json +5 -3
  58. package/tests/fixtures/ecosystem/context-integrity/v0.4.5/corrected-replay/derived/run-integrity-evidence.json +99 -0
  59. package/tests/fixtures/ecosystem/context-integrity/v0.4.5/corrected-replay/producer/implementation-audit.json +1585 -0
  60. package/tests/fixtures/ecosystem/context-integrity/v0.4.5/corrected-replay/producer/implementation-capsule.json +11455 -0
  61. package/tests/fixtures/ecosystem/context-integrity/v0.4.5/failed-run/00-request.txt +1 -0
  62. package/tests/fixtures/ecosystem/context-integrity/v0.4.5/failed-run/artifacts/architecture-context-packet.txt +82 -0
  63. package/tests/fixtures/ecosystem/context-integrity/v0.4.5/failed-run/artifacts/behavior-model.txt +104 -0
  64. package/tests/fixtures/ecosystem/context-integrity/v0.4.5/failed-run/artifacts/final-report.txt +41 -0
  65. package/tests/fixtures/ecosystem/context-integrity/v0.4.5/failed-run/artifacts/implementation-context-packet.txt +114 -0
  66. package/tests/fixtures/ecosystem/context-integrity/v0.4.5/failed-run/artifacts/implementation-report.txt +92 -0
  67. package/tests/fixtures/ecosystem/context-integrity/v0.4.5/failed-run/artifacts/judge-report.txt +34 -0
  68. package/tests/fixtures/ecosystem/context-integrity/v0.4.5/failed-run/artifacts/pseudocode-packet.txt +244 -0
  69. package/tests/fixtures/ecosystem/context-integrity/v0.4.5/failed-run/artifacts/request-brief.txt +40 -0
  70. package/tests/fixtures/ecosystem/context-integrity/v0.4.5/failed-run/artifacts/test-context-packet.txt +93 -0
  71. package/tests/fixtures/ecosystem/context-integrity/v0.4.5/failed-run/artifacts/test-implementation-report.txt +69 -0
  72. package/tests/fixtures/ecosystem/context-integrity/v0.4.5/failed-run/artifacts/test-strategy-packet.txt +354 -0
  73. package/tests/fixtures/ecosystem/context-integrity/v0.4.5/failed-run/artifacts/verification-report.txt +85 -0
  74. package/tests/fixtures/ecosystem/context-integrity/v0.4.5/failed-run/derived/run-integrity-evidence.json +98 -0
  75. package/tests/fixtures/ecosystem/context-integrity/v0.4.5/failed-run/producer/architecture-audit.json +1169 -0
  76. package/tests/fixtures/ecosystem/context-integrity/v0.4.5/failed-run/producer/architecture-request.json +29 -0
  77. package/tests/fixtures/ecosystem/context-integrity/v0.4.5/failed-run/producer/implementation-audit.json +1494 -0
  78. package/tests/fixtures/ecosystem/context-integrity/v0.4.5/failed-run/producer/implementation-capsule.json +11364 -0
  79. package/tests/fixtures/ecosystem/context-integrity/v0.4.5/failed-run/producer/implementation-request.json +33 -0
  80. package/tests/fixtures/ecosystem/context-integrity/v0.4.5/failed-run/producer/test-request.json +74 -0
  81. package/tests/fixtures/ecosystem/context-integrity/v0.4.5/failed-run/reports/architecture-context-retrieval-report.txt +58 -0
  82. package/tests/fixtures/ecosystem/context-integrity/v0.4.5/failed-run/reports/implementation-context-retrieval-report.txt +75 -0
  83. package/tests/fixtures/ecosystem/context-integrity/v0.4.5/failed-run/reports/test-context-retrieval-report.txt +84 -0
  84. package/tests/fixtures/ecosystem/context-integrity/v0.4.5/failed-run/run.json +62 -0
  85. package/tests/fixtures/ecosystem/context-integrity/v0.4.5/failed-run/tool-versions/my-dev-kit-version.txt +1 -0
  86. package/tests/fixtures/ecosystem/context-integrity/v0.4.5/failed-run/tool-versions/orchestrator-version.txt +1 -0
  87. package/tests/fixtures/ecosystem/context-integrity/v0.4.5/manifests/corrected-replay-manifest.json +19 -0
  88. package/tests/fixtures/ecosystem/context-integrity/v0.4.5/manifests/failed-run-manifest.json +56 -0
  89. package/tests/fixtures/upstream-artifacts/my-dev-kit/1.10.4/PROVENANCE.txt +18 -0
  90. package/tests/fixtures/upstream-artifacts/my-dev-kit/1.10.4/context-capsule/complete-v1.0.0.json +556 -0
  91. package/tests/fixtures/upstream-artifacts/my-dev-kit/1.10.4/retrieval-audit-record/complete-v1.0.0.json +238 -0
  92. package/tests/fixtures/upstream-artifacts/my-dev-kit-1.10.2-identity/PROVENANCE.txt +13 -0
  93. package/tests/fixtures/upstream-artifacts/my-dev-kit-1.10.2-identity/context-capsule.json +7874 -0
  94. package/tests/fixtures/upstream-artifacts/my-dev-kit-1.10.2-identity/retrieval-audit-record.json +1076 -0
  95. package/tests/fixtures/upstream-artifacts/my-dev-kit-orchestrator/1.2.3/run-integrity/PROVENANCE.txt +31 -0
  96. package/tests/fixtures/upstream-artifacts/my-dev-kit-orchestrator/1.2.3/run-integrity/ready-pass-final-pass.json +132 -0
  97. package/tests/fixtures/upstream-artifacts/my-dev-kit-orchestrator/1.2.3/run-integrity/refresh-required-need-context.json +146 -0
@@ -0,0 +1,556 @@
1
+ {
2
+ "schemaVersion": "1.0.0",
3
+ "generatedAt": "2026-07-31T00:00:00.000Z",
4
+ "tool": { "name": "my-dev-kit", "version": "1.10.4" },
5
+ "request": {
6
+ "originalQuery": "Inspect task implementation and tests",
7
+ "normalizedQuery": "Inspect task implementation and tests",
8
+ "mode": "feature-add",
9
+ "requestedOutputPath": "Z:/fixture/project/.my-dev-kit/context-capsule.json",
10
+ "role": "implementation",
11
+ "requestFilePath": null
12
+ },
13
+ "index": {
14
+ "indexPath": "Z:/fixture/project/.my-dev-kit",
15
+ "manifestPath": "Z:/fixture/project/.my-dev-kit/manifest.json",
16
+ "manifestSchemaVersion": "1.0.0",
17
+ "projectRoot": "Z:/fixture/project",
18
+ "artifactRefs": [
19
+ { "name": "symbolIndex", "path": "Z:/fixture/project/.my-dev-kit/symbol-index.json" },
20
+ { "name": "codeGraph", "path": "Z:/fixture/project/.my-dev-kit/code-graph.json" }
21
+ ]
22
+ },
23
+ "limits": {
24
+ "maxCandidateFiles": 50,
25
+ "maxSourceSlices": 20,
26
+ "maxGraphNodes": null,
27
+ "maxGraphEdges": 100
28
+ },
29
+ "requiredContext": [
30
+ {
31
+ "id": "fixture.context.required.001",
32
+ "kind": "request-summary",
33
+ "title": "Request summary",
34
+ "reason": "Captures the literal task query for downstream planning.",
35
+ "evidenceRefs": [{ "path": "Z:/fixture/project/src/example.ts" }],
36
+ "classificationRefs": [{ "filePath": "Z:/fixture/project/src/example.ts", "symbolId": null, "line": 1, "endLine": 10, "source": "static", "analyzer": "syntax-analyzer" }],
37
+ "classificationRoles": [{ "role": "implementation-target", "subtype": null, "confidence": "likely" }],
38
+ "warnings": []
39
+ }
40
+ ],
41
+ "optionalSupportContext": [
42
+ {
43
+ "id": "fixture.context.optional.001",
44
+ "kind": "artifact-summary",
45
+ "title": "Artifact: symbolIndex",
46
+ "reason": "Lists an artifact available in this index for later batches to consume.",
47
+ "evidenceRefs": [{ "path": "Z:/fixture/project/.my-dev-kit/symbol-index.json" }],
48
+ "warnings": []
49
+ }
50
+ ],
51
+ "droppedContext": [
52
+ { "id": "fixture.context.dropped.001", "kind": "placeholder", "title": "Dropped placeholder", "reason": "Exceeded retention cap." }
53
+ ],
54
+ "warnings": ["Fixture warning: synthetic data only."],
55
+ "contextAdequacy": {
56
+ "status": "context sufficient with listed assumptions",
57
+ "summary": "A best-effort focus node was selected; some ambiguity or thin graph/source/metadata evidence remains.",
58
+ "assumptions": ["Fixture assumption."],
59
+ "gaps": ["Fixture gap."]
60
+ },
61
+ "queryPlan": {
62
+ "originalQuery": "Inspect task implementation and tests",
63
+ "normalizedQuery": "Inspect task implementation and tests",
64
+ "mode": "feature-add",
65
+ "searchQueries": ["Inspect task implementation and tests"],
66
+ "terms": {
67
+ "raw": ["inspect", "task", "implementation", "tests"],
68
+ "quotedPhrases": [],
69
+ "pathLike": ["src/example.ts"],
70
+ "symbolLike": ["exampleFunction"],
71
+ "routeLike": [],
72
+ "commandLike": [],
73
+ "artifactLike": [],
74
+ "classificationLike": []
75
+ }
76
+ },
77
+ "candidateFiles": [
78
+ {
79
+ "path": "src/example.ts",
80
+ "score": 12.5,
81
+ "baseScore": 10,
82
+ "modeAdjustment": 2.5,
83
+ "reasons": ["matched query term"],
84
+ "matchedTerms": ["example"],
85
+ "semanticRoles": [
86
+ {
87
+ "role": "canonical-type",
88
+ "subtype": "canonical-type",
89
+ "confidence": "explicit",
90
+ "source": "syntax-analyzer",
91
+ "artifactRefs": [{ "artifact": "symbolIndex", "artifactKind": "symbol-index", "id": "symbol:src/example.ts#Example", "path": "src/example.ts" }],
92
+ "evidenceRefs": [{ "filePath": "src/example.ts", "symbolId": "symbol:src/example.ts#Example", "line": 1, "endLine": 10, "source": "static", "analyzer": "syntax-analyzer" }],
93
+ "warnings": []
94
+ }
95
+ ],
96
+ "artifactRefs": [{ "artifact": "symbolIndex", "artifactKind": "symbol-index", "id": "symbol:src/example.ts#Example", "path": "src/example.ts" }],
97
+ "classificationRoles": [{ "role": "implementation-target", "editGuidance": "safe-primary-edit-target", "readiness": "ready", "uncertainty": "likely" }],
98
+ "classificationRefs": [{ "artifact": "classification", "artifactKind": "unknown", "id": "classification:src/example.ts", "path": "src/example.ts" }],
99
+ "retained": true,
100
+ "roleScoreAdjustment": 1.5,
101
+ "contextRole": "implementation",
102
+ "focusMatch": true,
103
+ "changedSurfaceMatch": false,
104
+ "changedStatus": "modified"
105
+ }
106
+ ],
107
+ "candidateNodes": [
108
+ {
109
+ "nodeId": "symbol:src/example.ts#Example",
110
+ "kind": "symbol",
111
+ "label": "Example",
112
+ "filePath": "src/example.ts",
113
+ "score": 12.5,
114
+ "baseScore": 10,
115
+ "modeAdjustment": 2.5,
116
+ "reasons": ["matched query term"],
117
+ "matchedTerms": ["example"],
118
+ "semanticRoles": [],
119
+ "artifactRefs": [],
120
+ "classificationRoles": [],
121
+ "classificationRefs": [],
122
+ "androidArtifactId": "android:fixture:1",
123
+ "androidMetadata": { "packageName": "com.fixture.app", "minSdk": 21, "usesCleartextTraffic": false, "notes": null },
124
+ "retained": true,
125
+ "droppedReason": "not dropped",
126
+ "roleScoreAdjustment": 1.5,
127
+ "contextRole": "implementation",
128
+ "focusMatch": true,
129
+ "changedSurfaceMatch": false,
130
+ "changedStatus": "modified",
131
+ "synthesized": false
132
+ }
133
+ ],
134
+ "focus": {
135
+ "focusNodeId": "symbol:src/example.ts#Example",
136
+ "focusFilePath": "src/example.ts",
137
+ "selectionMode": "single-best",
138
+ "confidence": "high",
139
+ "reasons": ["unambiguous top-ranked candidate"],
140
+ "ambiguityNotes": [],
141
+ "warnings": []
142
+ },
143
+ "selectedGraph": {
144
+ "nodes": [
145
+ { "nodeId": "symbol:src/example.ts#Example", "kind": "symbol", "label": "Example", "filePath": "src/example.ts", "reasons": ["primary focus"] },
146
+ { "nodeId": "file:src/example.ts", "kind": "file", "label": "example.ts", "reasons": ["containing file"] }
147
+ ],
148
+ "edges": [
149
+ { "from": "file:src/example.ts", "to": "symbol:src/example.ts#Example", "kind": "defines", "reasons": ["structural containment"] }
150
+ ],
151
+ "omittedNodeCount": 0,
152
+ "omittedEdgeCount": 0,
153
+ "warnings": []
154
+ },
155
+ "retention": {
156
+ "retainedCandidateCount": 1,
157
+ "droppedCandidateCount": 0,
158
+ "retainedGraphNodeCount": 2,
159
+ "droppedGraphNodeCount": 0,
160
+ "retainedGraphEdgeCount": 1,
161
+ "droppedGraphEdgeCount": 0,
162
+ "capSettings": { "maxCandidateFiles": 50, "maxGraphNodes": null, "maxGraphEdges": 100 }
163
+ },
164
+ "selectedSource": {
165
+ "slices": [
166
+ {
167
+ "id": "fixture.slice.001",
168
+ "kind": "symbol",
169
+ "filePath": "src/example.ts",
170
+ "startLine": 1,
171
+ "endLine": 10,
172
+ "nodeId": "symbol:src/example.ts#Example",
173
+ "symbolName": "Example",
174
+ "reason": "primary focus source",
175
+ "sourceRetrievalMethod": "symbol",
176
+ "includedBy": "primary-focus",
177
+ "truncated": false,
178
+ "continuationAvailable": true,
179
+ "continuationUsed": false,
180
+ "localExpansionUsed": false,
181
+ "classificationRefs": [],
182
+ "semanticRefs": [],
183
+ "warnings": []
184
+ }
185
+ ],
186
+ "omittedSliceCount": 0,
187
+ "totalSelectedLines": 10,
188
+ "maxSourceSlices": 20,
189
+ "warnings": [],
190
+ "skipped": [
191
+ { "id": "fixture.skipped.001", "kind": "symbol", "filePath": "src/other.ts", "reason": "exceeded cap", "capType": "maxSourceSlices", "candidateScore": 3.2 }
192
+ ]
193
+ },
194
+ "selectedSourceBundles": {
195
+ "bundles": [
196
+ {
197
+ "id": "fixture.bundle.001",
198
+ "title": "Example bundle",
199
+ "focusNodeId": "symbol:src/example.ts#Example",
200
+ "focusFilePath": "src/example.ts",
201
+ "reason": "primary focus bundle",
202
+ "blocks": [
203
+ {
204
+ "id": "fixture.block.001",
205
+ "kind": "symbol",
206
+ "filePath": "src/example.ts",
207
+ "startLine": 1,
208
+ "endLine": 10,
209
+ "symbolName": "Example",
210
+ "reason": "primary focus source",
211
+ "includedBy": "primary-focus",
212
+ "truncated": false,
213
+ "warnings": []
214
+ }
215
+ ],
216
+ "totalLines": 10,
217
+ "maxLines": 200,
218
+ "skippedBlocks": [
219
+ { "id": "fixture.skippedBlock.001", "kind": "symbol", "filePath": "src/other.ts", "reason": "exceeded cap", "capType": "maxLines", "candidateScore": 2.1 }
220
+ ],
221
+ "warnings": []
222
+ }
223
+ ],
224
+ "omittedBundleCount": 0,
225
+ "totalSelectedLines": 10,
226
+ "warnings": []
227
+ },
228
+ "semanticSummary": {
229
+ "available": true,
230
+ "roles": [
231
+ { "role": "canonical-type", "subtype": null, "confidence": "explicit", "source": "syntax-analyzer", "artifactRefs": [], "evidenceRefs": [], "warnings": [] }
232
+ ],
233
+ "artifactRefs": [],
234
+ "evidenceRefs": [],
235
+ "summariesByNode": {
236
+ "symbol:src/example.ts#Example": { "roles": [], "artifactRefs": [], "evidenceRefs": [] }
237
+ },
238
+ "summariesByFile": {
239
+ "src/example.ts": { "roles": [], "artifactRefs": [], "evidenceRefs": [] }
240
+ },
241
+ "warnings": []
242
+ },
243
+ "classificationSummary": {
244
+ "available": true,
245
+ "classificationArtifactPath": null,
246
+ "roles": [{ "role": "implementation-target", "subtype": null, "confidence": "likely" }],
247
+ "refs": [{ "filePath": "src/example.ts", "symbolId": null, "line": 1, "endLine": 10, "source": "static", "analyzer": "syntax-analyzer" }],
248
+ "editGuidance": ["safe-primary-edit-target"],
249
+ "readiness": ["ready"],
250
+ "riskLabels": ["requires-test-validation"],
251
+ "uncertainty": ["likely"],
252
+ "summariesByNode": {
253
+ "symbol:src/example.ts#Example": {
254
+ "classifications": [{ "role": "implementation-target", "subtype": null, "confidence": "likely" }],
255
+ "editGuidance": "safe-primary-edit-target",
256
+ "readiness": "ready",
257
+ "risks": ["requires-test-validation"],
258
+ "uncertainty": "likely",
259
+ "warnings": []
260
+ }
261
+ },
262
+ "summariesByFile": {},
263
+ "warnings": []
264
+ },
265
+ "artifactReferenceSummary": [
266
+ { "artifactKind": "symbol-index", "artifactPath": "Z:/fixture/project/.my-dev-kit/symbol-index.json", "available": true, "reason": "artifact present in manifest", "warnings": [] },
267
+ { "artifactKind": "frontend-semantic", "artifactPath": null, "available": false, "reason": "artifact not generated for this project", "warnings": [] }
268
+ ],
269
+ "pruning": {
270
+ "policyVersion": "1.0.0",
271
+ "retainedCounts": { "candidateFiles": 1, "candidateNodes": 1, "graphNodes": 2, "graphEdges": 1, "sourceSlices": 1, "sourceBundles": 1 },
272
+ "droppedCounts": { "candidateFiles": 0, "candidateNodes": 0, "graphNodes": 0, "graphEdges": 0, "sourceSlices": 0, "sourceBundles": 0 },
273
+ "capSettings": { "maxCandidateFiles": 50, "maxGraphNodes": null, "maxGraphEdges": 100, "maxSourceSlices": 20 },
274
+ "retainedReasons": ["high relevance score"],
275
+ "droppedReasons": [],
276
+ "warnings": []
277
+ },
278
+ "conflicts": {
279
+ "status": "conflict",
280
+ "conflicts": [
281
+ {
282
+ "id": "fixture.conflict.001",
283
+ "status": "conflict",
284
+ "reason": "Static edit-guidance evidence conflicts for the selected focus.",
285
+ "evidenceRefs": ["src/example.ts"],
286
+ "affectedFiles": ["src/example.ts"],
287
+ "affectedNodes": ["symbol:src/example.ts#Example"],
288
+ "candidates": [
289
+ { "nodeId": "symbol:src/example.ts#Example", "filePath": "src/example.ts", "score": 12.5, "editGuidance": ["safe-primary-edit-target", "inspect-before-edit"] }
290
+ ],
291
+ "recommendedNextAction": "Review classification evidence before editing."
292
+ }
293
+ ],
294
+ "warnings": []
295
+ },
296
+ "modeEffects": {
297
+ "mode": "feature-add",
298
+ "applied": true,
299
+ "effects": [{ "candidateId": "src/example.ts", "adjustment": 2.5, "reasons": ["feature-add mode boost"] }],
300
+ "warnings": []
301
+ },
302
+ "sourceControl": { "enabled": true, "reason": "Git repository detected." },
303
+ "deferredRequestFields": ["upstreamArtifactRefs"],
304
+ "roleContext": {
305
+ "role": "implementation",
306
+ "focus": {
307
+ "focusFiles": [{ "path": "src/example.ts", "resolved": true, "matchedFilePaths": ["src/example.ts"], "containedSymbolIds": ["symbol:src/example.ts#Example"] }],
308
+ "focusSymbols": [{ "symbol": "Example", "resolved": true, "ambiguous": false, "matchedNodeIds": ["symbol:src/example.ts#Example"] }],
309
+ "unresolvedFocusFiles": [],
310
+ "unresolvedFocusSymbols": [],
311
+ "ambiguousFocusSymbols": [],
312
+ "warnings": []
313
+ },
314
+ "changedSurface": {
315
+ "available": true,
316
+ "diffRequested": true,
317
+ "files": [{ "path": "src/example.ts", "status": "modified", "provenance": "both" }],
318
+ "symbols": [{ "symbolId": "symbol:src/example.ts#Example", "status": "modified", "provenance": "graph-diff", "filePath": "src/example.ts", "name": "Example", "kind": "symbol" }],
319
+ "conflicts": [],
320
+ "warnings": []
321
+ },
322
+ "requestedEvidenceKinds": ["owner", "dependencies"],
323
+ "unsupportedRequestedEvidenceKinds": ["responsibility-mappings"],
324
+ "warnings": []
325
+ },
326
+ "evidenceGroups": [
327
+ {
328
+ "id": "implementation-owners",
329
+ "kind": "owners",
330
+ "role": "implementation",
331
+ "title": "Owners",
332
+ "required": true,
333
+ "items": [
334
+ {
335
+ "id": "src/example.ts",
336
+ "itemKind": "file",
337
+ "path": "src/example.ts",
338
+ "symbolId": "symbol:src/example.ts#Example",
339
+ "nodeId": "symbol:src/example.ts#Example",
340
+ "sourceLocation": { "filePath": "src/example.ts", "line": 1 },
341
+ "relationship": "owner",
342
+ "basis": "candidate-ranking",
343
+ "provenance": "candidate-ranking",
344
+ "metadata": { "score": 12.5, "retained": true, "note": null }
345
+ }
346
+ ],
347
+ "unresolved": [
348
+ { "evidenceKind": "dependencies", "role": "implementation", "basis": "graph-neighborhood", "reason": "no dependency edges found", "blocking": false }
349
+ ],
350
+ "warnings": [],
351
+ "limit": 2,
352
+ "availableCount": 1,
353
+ "usedCount": 1,
354
+ "truncated": false,
355
+ "droppedCount": 0,
356
+ "provenance": "candidate-ranking"
357
+ }
358
+ ],
359
+ "selectedOwners": [
360
+ { "id": "src/example.ts", "itemKind": "file", "path": "src/example.ts", "relationship": "owner", "basis": "candidate-ranking", "provenance": "candidate-ranking" }
361
+ ],
362
+ "selectedContracts": [],
363
+ "selectedTests": [
364
+ { "id": "tests/example.spec.ts", "itemKind": "test-file", "path": "tests/example.spec.ts", "relationship": "closest-test", "basis": "path-proximity", "provenance": "test-directory-walk" }
365
+ ],
366
+ "testInfrastructure": {
367
+ "relatedTests": [{ "id": "tests/example.spec.ts", "itemKind": "test-file", "path": "tests/example.spec.ts", "relationship": "closest-test", "basis": "path-proximity", "provenance": "test-directory-walk" }],
368
+ "fixtures": [],
369
+ "factories": [],
370
+ "mocks": [],
371
+ "setupFiles": [],
372
+ "testConfigurations": [
373
+ { "path": "vitest.config.ts", "framework": "vitest", "supported": true, "fields": { "testDir": "tests", "include": ["tests/**/*.spec.ts"], "timeout": 5000, "watch": false, "reporter": null }, "warnings": [] }
374
+ ],
375
+ "packageScripts": [
376
+ { "name": "test", "command": "vitest run", "reason": "primary test entrypoint", "packageJsonPath": "package.json" }
377
+ ],
378
+ "testCommands": [
379
+ { "commandText": "vitest run tests/example.spec.ts", "commandSource": "package-script", "testFiles": ["tests/example.spec.ts"], "framework": "vitest", "scope": "file", "basis": "path-proximity" },
380
+ { "commandText": null, "commandSource": "unresolved", "testFiles": [], "framework": null, "scope": "full-project", "basis": "fallback", "unresolvedReason": "no matching test command found" }
381
+ ],
382
+ "unresolved": [],
383
+ "warnings": []
384
+ },
385
+ "unresolvedItems": [
386
+ { "evidenceKind": "contracts", "role": "implementation", "basis": "graph-neighborhood", "reason": "no contract evidence found", "blocking": false }
387
+ ],
388
+ "groupTruncation": [
389
+ {
390
+ "groupId": "implementation-owners",
391
+ "limit": 2,
392
+ "availableCount": 1,
393
+ "usedCount": 1,
394
+ "truncated": false,
395
+ "droppedCount": 0,
396
+ "droppedEvidenceIds": [],
397
+ "required": true,
398
+ "reservation": 2,
399
+ "initiallySelectedCount": 1,
400
+ "unusedReservationContributed": 1,
401
+ "borrowedCapacity": 0,
402
+ "requiredOmittedCount": 0,
403
+ "optionalOmittedCount": 0,
404
+ "adequacyAffected": false,
405
+ "governingHardBound": 4,
406
+ "aggregateCapacityUsed": 1,
407
+ "aggregateCapacityRemaining": 3
408
+ }
409
+ ],
410
+ "roleConditionCoverage": [
411
+ {
412
+ "conditionId": "implementation.selected-owner",
413
+ "role": "implementation",
414
+ "required": true,
415
+ "evidenceGroupIds": ["implementation-owners"],
416
+ "witnessPolicy": "at-least-one",
417
+ "requiredWitnessCount": 1,
418
+ "availableWitnessCount": 1,
419
+ "retainedWitnessCount": 1,
420
+ "retainedWitnessIds": ["src/example.ts"],
421
+ "conditionSatisfied": true,
422
+ "lostRequiredCondition": false,
423
+ "lossReason": null,
424
+ "evaluationOrder": 10
425
+ },
426
+ {
427
+ "conditionId": "implementation.required-contract",
428
+ "role": "implementation",
429
+ "required": true,
430
+ "evidenceGroupIds": ["implementation-contracts"],
431
+ "witnessPolicy": "at-least-one",
432
+ "requiredWitnessCount": 1,
433
+ "availableWitnessCount": 0,
434
+ "retainedWitnessCount": 0,
435
+ "retainedWitnessIds": [],
436
+ "conditionSatisfied": false,
437
+ "lostRequiredCondition": false,
438
+ "lossReason": null,
439
+ "evaluationOrder": 20
440
+ }
441
+ ],
442
+ "responsibilityMappings": {
443
+ "requested": true,
444
+ "operational": true,
445
+ "mappings": [
446
+ {
447
+ "responsibilityId": "fixture.responsibility.001",
448
+ "behavior": "Example behaves correctly.",
449
+ "invariant": null,
450
+ "criticality": "critical",
451
+ "productionSymbols": [{ "id": "symbol:src/example.ts#Example", "itemKind": "symbol", "symbolId": "symbol:src/example.ts#Example", "relationship": "production-symbol", "basis": "candidate-ranking", "provenance": "candidate-ranking" }],
452
+ "contracts": [],
453
+ "validators": [],
454
+ "constants": [],
455
+ "errors": [],
456
+ "sideEffectEvidence": [],
457
+ "proposedOrExistingTestFiles": [{ "id": "tests/example.spec.ts", "itemKind": "test-file", "path": "tests/example.spec.ts", "relationship": "proposed-test", "basis": "path-proximity", "provenance": "test-directory-walk" }],
458
+ "reusableHelpers": [],
459
+ "oracleEvidence": [],
460
+ "testCommands": [],
461
+ "mappingStatus": "mapped",
462
+ "unresolvedReasons": [],
463
+ "provenance": [
464
+ { "id": "fixture.provenance.mapping.001", "category": "code-graph", "sourcePath": "src/example.ts", "sourceId": null, "evidenceId": "symbol:src/example.ts#Example", "relationshipBasis": "candidate-ranking", "role": "implementation", "requestField": null, "derivedByModule": "responsibilityMapping.ts" }
465
+ ],
466
+ "warnings": []
467
+ }
468
+ ],
469
+ "unknownResponsibilityIds": [],
470
+ "duplicateResponsibilityIds": [],
471
+ "limit": null,
472
+ "availableCount": 1,
473
+ "usedCount": 1,
474
+ "truncated": false,
475
+ "droppedCount": 0,
476
+ "criticalDropped": false,
477
+ "warnings": []
478
+ },
479
+ "roleAdequacy": {
480
+ "role": "implementation",
481
+ "status": "context sufficient with listed assumptions",
482
+ "requiredConditions": ["single high-confidence focus node"],
483
+ "satisfiedConditions": ["single high-confidence focus node"],
484
+ "missingConditions": [],
485
+ "blockingConditions": [],
486
+ "warnings": [],
487
+ "supportingEvidence": ["symbol:src/example.ts#Example"],
488
+ "affectedResponsibilityIds": ["fixture.responsibility.001"],
489
+ "truncationImpact": false,
490
+ "freshnessImpact": false
491
+ },
492
+ "freshness": {
493
+ "state": "fresh",
494
+ "role": "implementation",
495
+ "evidenceUsed": ["code-graph"],
496
+ "evidenceUnavailable": ["before-index"],
497
+ "comparedIdentities": [
498
+ { "label": "index-manifest-hash", "value": "fixture-hash-001" },
499
+ { "label": "before-index-manifest-hash", "value": null }
500
+ ],
501
+ "reason": "Active index manifest hash matches the most recent recorded identity.",
502
+ "relevantChangedPaths": ["src/example.ts"],
503
+ "warnings": []
504
+ },
505
+ "budget": {
506
+ "limits": [
507
+ { "name": "candidates", "declaredValue": 50, "usedValue": 1, "availableCount": 49, "droppedCount": 0, "truncated": false, "requiredEvidenceAffected": false, "adequacyImpact": null }
508
+ ],
509
+ "characters": { "measured": 1200, "limit": 8000, "truncated": false },
510
+ "warnings": []
511
+ },
512
+ "truncation": {
513
+ "truncated": false,
514
+ "requiredEvidenceLost": false,
515
+ "records": [
516
+ {
517
+ "id": "fixture.truncation.001",
518
+ "affectedGroup": "implementation-owners",
519
+ "limit": 10,
520
+ "used": 1,
521
+ "available": 1,
522
+ "droppedCount": 0,
523
+ "droppedEvidenceIds": [],
524
+ "requiredEvidenceLost": false,
525
+ "adequacyImpact": null,
526
+ "reason": "within declared limit"
527
+ }
528
+ ],
529
+ "warnings": []
530
+ },
531
+ "fullFileFallback": {
532
+ "enabled": true,
533
+ "limit": null,
534
+ "used": 0,
535
+ "fallbacks": [
536
+ {
537
+ "id": "fixture.fallback.001",
538
+ "filePath": "src/other.ts",
539
+ "reason": "bounded retrieval insufficient",
540
+ "requestedEvidenceKind": null,
541
+ "boundedRetrievalAttempted": true,
542
+ "sourceRangesAttempted": 2,
543
+ "includedLineCount": 40,
544
+ "includedCharacterCount": 900,
545
+ "role": "implementation",
546
+ "responsibilityIdsAffected": [],
547
+ "allowed": false,
548
+ "provenance": "full-file-fallback"
549
+ }
550
+ ],
551
+ "warnings": []
552
+ },
553
+ "provenance": [
554
+ { "id": "fixture.provenance.001", "category": "code-graph", "sourcePath": "src/example.ts", "sourceId": null, "evidenceId": "symbol:src/example.ts#Example", "relationshipBasis": "candidate-ranking", "role": "implementation", "requestField": null, "derivedByModule": "candidateRanking.ts" }
555
+ ]
556
+ }