@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,238 @@
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
+ },
19
+ "steps": [
20
+ {
21
+ "id": "fixture.step.001",
22
+ "kind": "validate-inputs",
23
+ "description": "Validate CLI inputs.",
24
+ "inputs": { "query": "Inspect task implementation and tests", "mode": "feature-add", "role": "implementation", "notes": null },
25
+ "outputs": { "valid": true, "warningCount": 0 },
26
+ "status": "ok",
27
+ "warnings": []
28
+ },
29
+ {
30
+ "id": "fixture.step.002",
31
+ "kind": "run-search",
32
+ "description": "Run search against the index.",
33
+ "inputs": { "query": "Inspect task implementation and tests" },
34
+ "outputs": { "resultCount": 1, "topScore": 12.5 },
35
+ "status": "ok",
36
+ "warnings": []
37
+ },
38
+ {
39
+ "id": "fixture.step.003",
40
+ "kind": "use-local-source-expansion",
41
+ "description": "Attempted local source expansion.",
42
+ "inputs": { "focusNodeId": "symbol:src/example.ts#Example" },
43
+ "outputs": { "used": false },
44
+ "status": "skipped",
45
+ "warnings": ["local expansion not required"]
46
+ }
47
+ ],
48
+ "fallbacks": [],
49
+ "fullFileReadRecommendations": [
50
+ {
51
+ "filePath": "src/other.ts",
52
+ "reason": "bounded retrieval insufficient",
53
+ "missingContext": "full implementation detail",
54
+ "continuationOrExpansionAttempted": true
55
+ },
56
+ {
57
+ "filePath": "src/legacy.ts",
58
+ "reason": "continuation could not be attempted",
59
+ "missingContext": "legacy behavior detail",
60
+ "continuationOrExpansionAttempted": "unavailable"
61
+ }
62
+ ],
63
+ "warnings": ["Fixture warning: synthetic data only."],
64
+ "contextAdequacy": {
65
+ "status": "context sufficient with listed assumptions",
66
+ "summary": "A best-effort focus node was selected; some ambiguity or thin graph/source/metadata evidence remains.",
67
+ "assumptions": ["Fixture assumption."],
68
+ "gaps": ["Fixture gap."]
69
+ },
70
+ "roleContext": {
71
+ "role": "implementation",
72
+ "focus": {
73
+ "focusFiles": [{ "path": "src/example.ts", "resolved": true, "matchedFilePaths": ["src/example.ts"], "containedSymbolIds": ["symbol:src/example.ts#Example"] }],
74
+ "focusSymbols": [{ "symbol": "Example", "resolved": true, "ambiguous": false, "matchedNodeIds": ["symbol:src/example.ts#Example"] }],
75
+ "unresolvedFocusFiles": [],
76
+ "unresolvedFocusSymbols": [],
77
+ "ambiguousFocusSymbols": [],
78
+ "warnings": []
79
+ },
80
+ "changedSurface": {
81
+ "available": true,
82
+ "diffRequested": true,
83
+ "files": [{ "path": "src/example.ts", "status": "modified", "provenance": "both" }],
84
+ "symbols": [{ "symbolId": "symbol:src/example.ts#Example", "status": "modified", "provenance": "graph-diff", "filePath": "src/example.ts", "name": "Example", "kind": "symbol" }],
85
+ "conflicts": [],
86
+ "warnings": []
87
+ },
88
+ "requestedEvidenceKinds": ["owner", "dependencies"],
89
+ "unsupportedRequestedEvidenceKinds": ["responsibility-mappings"],
90
+ "warnings": []
91
+ },
92
+ "roleConditionCoverage": [
93
+ {
94
+ "conditionId": "implementation.selected-owner",
95
+ "role": "implementation",
96
+ "required": true,
97
+ "evidenceGroupIds": ["implementation-owners"],
98
+ "witnessPolicy": "at-least-one",
99
+ "requiredWitnessCount": 1,
100
+ "availableWitnessCount": 1,
101
+ "retainedWitnessCount": 1,
102
+ "retainedWitnessIds": ["src/example.ts"],
103
+ "conditionSatisfied": true,
104
+ "lostRequiredCondition": false,
105
+ "lossReason": null,
106
+ "evaluationOrder": 10
107
+ },
108
+ {
109
+ "conditionId": "implementation.required-contract",
110
+ "role": "implementation",
111
+ "required": true,
112
+ "evidenceGroupIds": ["implementation-contracts"],
113
+ "witnessPolicy": "at-least-one",
114
+ "requiredWitnessCount": 1,
115
+ "availableWitnessCount": 0,
116
+ "retainedWitnessCount": 0,
117
+ "retainedWitnessIds": [],
118
+ "conditionSatisfied": false,
119
+ "lostRequiredCondition": false,
120
+ "lossReason": null,
121
+ "evaluationOrder": 20
122
+ }
123
+ ],
124
+ "responsibilityMappings": {
125
+ "requested": true,
126
+ "operational": true,
127
+ "mappings": [
128
+ {
129
+ "responsibilityId": "fixture.responsibility.001",
130
+ "behavior": "Example behaves correctly.",
131
+ "invariant": null,
132
+ "criticality": "critical",
133
+ "productionSymbols": [{ "id": "symbol:src/example.ts#Example", "itemKind": "symbol", "symbolId": "symbol:src/example.ts#Example", "relationship": "production-symbol", "basis": "candidate-ranking", "provenance": "candidate-ranking" }],
134
+ "contracts": [],
135
+ "validators": [],
136
+ "constants": [],
137
+ "errors": [],
138
+ "sideEffectEvidence": [],
139
+ "proposedOrExistingTestFiles": [{ "id": "tests/example.spec.ts", "itemKind": "test-file", "path": "tests/example.spec.ts", "relationship": "proposed-test", "basis": "path-proximity", "provenance": "test-directory-walk" }],
140
+ "reusableHelpers": [],
141
+ "oracleEvidence": [],
142
+ "testCommands": [],
143
+ "mappingStatus": "mapped",
144
+ "unresolvedReasons": [],
145
+ "provenance": [
146
+ { "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" }
147
+ ],
148
+ "warnings": []
149
+ }
150
+ ],
151
+ "unknownResponsibilityIds": [],
152
+ "duplicateResponsibilityIds": [],
153
+ "limit": null,
154
+ "availableCount": 1,
155
+ "usedCount": 1,
156
+ "truncated": false,
157
+ "droppedCount": 0,
158
+ "criticalDropped": false,
159
+ "warnings": []
160
+ },
161
+ "roleAdequacy": {
162
+ "role": "implementation",
163
+ "status": "context sufficient with listed assumptions",
164
+ "requiredConditions": ["single high-confidence focus node"],
165
+ "satisfiedConditions": ["single high-confidence focus node"],
166
+ "missingConditions": [],
167
+ "blockingConditions": [],
168
+ "warnings": [],
169
+ "supportingEvidence": ["symbol:src/example.ts#Example"],
170
+ "affectedResponsibilityIds": ["fixture.responsibility.001"],
171
+ "truncationImpact": false,
172
+ "freshnessImpact": false
173
+ },
174
+ "freshness": {
175
+ "state": "fresh",
176
+ "role": "implementation",
177
+ "evidenceUsed": ["code-graph"],
178
+ "evidenceUnavailable": ["before-index"],
179
+ "comparedIdentities": [
180
+ { "label": "index-manifest-hash", "value": "fixture-hash-001" },
181
+ { "label": "before-index-manifest-hash", "value": null }
182
+ ],
183
+ "reason": "Active index manifest hash matches the most recent recorded identity.",
184
+ "relevantChangedPaths": ["src/example.ts"],
185
+ "warnings": []
186
+ },
187
+ "budget": {
188
+ "limits": [
189
+ { "name": "candidates", "declaredValue": 50, "usedValue": 1, "availableCount": 49, "droppedCount": 0, "truncated": false, "requiredEvidenceAffected": false, "adequacyImpact": null }
190
+ ],
191
+ "characters": { "measured": 1200, "limit": 8000, "truncated": false },
192
+ "warnings": []
193
+ },
194
+ "truncation": {
195
+ "truncated": false,
196
+ "requiredEvidenceLost": false,
197
+ "records": [
198
+ {
199
+ "id": "fixture.truncation.001",
200
+ "affectedGroup": "implementation-owners",
201
+ "limit": 10,
202
+ "used": 1,
203
+ "available": 1,
204
+ "droppedCount": 0,
205
+ "droppedEvidenceIds": [],
206
+ "requiredEvidenceLost": false,
207
+ "adequacyImpact": null,
208
+ "reason": "within declared limit"
209
+ }
210
+ ],
211
+ "warnings": []
212
+ },
213
+ "fullFileFallback": {
214
+ "enabled": true,
215
+ "limit": null,
216
+ "used": 0,
217
+ "fallbacks": [
218
+ {
219
+ "id": "fixture.fallback.001",
220
+ "filePath": "src/other.ts",
221
+ "reason": "bounded retrieval insufficient",
222
+ "requestedEvidenceKind": null,
223
+ "boundedRetrievalAttempted": true,
224
+ "sourceRangesAttempted": 2,
225
+ "includedLineCount": 40,
226
+ "includedCharacterCount": 900,
227
+ "role": "implementation",
228
+ "responsibilityIdsAffected": [],
229
+ "allowed": false,
230
+ "provenance": "full-file-fallback"
231
+ }
232
+ ],
233
+ "warnings": []
234
+ },
235
+ "provenance": [
236
+ { "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" }
237
+ ]
238
+ }
@@ -0,0 +1,13 @@
1
+ Artifact source: real local my-dev-kit `context` command
2
+ Producer package version: 1.10.2
3
+ Producer CLI version: 1.10.2
4
+ Producer branch: fix/v1.10.3-context-readiness
5
+ Producer base commit: 9f1c7c5392e2dde9a1aae80e330134950e6e101f
6
+ Producer final commit: e2d8c66075036824c8eeb5290b630979ab7cee79
7
+ Context capsule schema version: 1.0.0
8
+ Retrieval audit schema version: 1.0.0
9
+ Source repository: Z:/Users/newuser/Projects/my-dev-kit-orchestrator
10
+ Expected evaluator result: consistent
11
+ Context capsule SHA-256: 2AA664F02A4830D0698FBF6D4C8203F99EE1EA420142EB58A5EDF284ED26EE66
12
+ Retrieval audit SHA-256: 5D5B0129EC3FAF92F87AD58A846EECB930FE6DD2CE66C0D26F5F51CD08879585
13
+ Copy policy: both JSON files are byte-for-byte copies and must not be hand-edited.