@dailephd/my-dev-kit-lab 0.4.3 → 0.4.4
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.
- package/README.md +6 -1
- package/dist/src/evaluation/stageContextExpectations/producerReadinessExpectationTypes.js +8 -0
- package/dist/src/evaluation/stageContextExpectations/validation.js +200 -0
- package/dist/src/evaluation/stageContextMetrics/calculateAllocationMetrics.js +96 -0
- package/dist/src/evaluation/stageContextMetrics/calculateCriticalityMetrics.js +112 -0
- package/dist/src/evaluation/stageContextMetrics/calculateOwnerMetrics.js +84 -0
- package/dist/src/evaluation/stageContextMetrics/calculateReadinessAgreement.js +152 -0
- package/dist/src/evaluation/stageContextMetrics/calculateSupplementalRawAgreement.js +50 -0
- package/dist/src/evaluation/stageContextMetrics/calculateTruncationClassification.js +44 -0
- package/dist/src/evaluation/stageContextMetrics/evaluateProducerReadinessBridge.js +127 -0
- package/dist/src/evaluation/stageContextMetrics/index.js +7 -0
- package/dist/src/evaluation/stageContextMetrics/producerReadinessMetricTypes.js +1 -0
- package/dist/src/evaluation/stageContextSelectors/contextArtifactConsistency.js +10 -0
- package/dist/src/evaluation/upstreamArtifacts/index.js +6 -0
- package/dist/src/evaluation/upstreamArtifacts/orchestratorContextReadinessResultV1.js +247 -0
- package/dist/src/evaluation/upstreamArtifacts/readImplementationContextPacketV1.js +9 -0
- package/dist/src/evaluation/upstreamArtifacts/readImplementationContextRetrievalReportV1.js +9 -0
- package/dist/src/evaluation/upstreamArtifacts/readSupplementalContextTextFile.js +29 -0
- package/dist/src/evaluation/upstreamArtifacts/readTestContextPacketV1.js +9 -0
- package/dist/src/evaluation/upstreamArtifacts/readTestContextRetrievalReportV1.js +9 -0
- package/dist/src/evaluation/upstreamArtifacts/supplementalContextTextParser.js +75 -0
- package/dist/src/evaluation/upstreamArtifacts/supplementalContextTypes.js +152 -0
- package/dist/src/evaluation/upstreamArtifacts/validateMyDevKitRetrievalAuditRecordV1.js +9 -2
- package/dist/src/evaluation/upstreamArtifacts/validateSupplementalContextDocumentV1.js +148 -0
- package/dist/src/experiments/plugins/contextStrategyComparison/loadV043StrategyArtifacts.js +117 -6
- package/dist/src/experiments/plugins/contextStrategyComparison/runV043StageContextStrategyWithAssurance.js +18 -3
- package/dist/src/experiments/plugins/contextStrategyComparison/validateV043StrategyInput.js +17 -3
- package/dist/src/report/experiments/buildContextStrategyComparisonV043Report.js +122 -0
- package/dist/src/report/experiments/renderContextStrategyComparisonV043Html.js +62 -0
- package/dist/src/report/experiments/renderPluginExperimentReportText.js +67 -0
- package/docs/METRICS.md +28 -0
- package/package.json +2 -2
- package/tests/fixtures/upstream-artifacts/my-dev-kit-1.10.2-identity/PROVENANCE.txt +13 -0
- package/tests/fixtures/upstream-artifacts/my-dev-kit-1.10.2-identity/context-capsule.json +7874 -0
- package/tests/fixtures/upstream-artifacts/my-dev-kit-1.10.2-identity/retrieval-audit-record.json +1076 -0
|
@@ -162,6 +162,73 @@ function renderStrategy(lines, strategy, index) {
|
|
|
162
162
|
lines.push(fieldLine("Repeat Count", strategy.assurance.repeatCount));
|
|
163
163
|
lines.push("Issues:");
|
|
164
164
|
pushBoundedList(lines, strategy.assurance.issues, (issue) => `${issue.code} run=${issue.runNumber ?? ""} field=${issue.fieldPath ?? ""} ${issue.message}`);
|
|
165
|
+
if (strategy.producerReadinessBridge) {
|
|
166
|
+
renderProducerReadinessBridge(lines, strategy.producerReadinessBridge);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
function renderProducerReadinessSide(lines, label, side) {
|
|
170
|
+
pushSection(lines, `Producer-Readiness Bridge: ${label}`);
|
|
171
|
+
if (side === null) {
|
|
172
|
+
lines.push("- not supplied");
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
pushRatioMetric(lines, "Expected Owner Present", side.ownerEvaluation.expectedOwnerPresent);
|
|
176
|
+
pushRatioMetric(lines, "Forbidden Owner Present", side.ownerEvaluation.forbiddenOwnerPresent);
|
|
177
|
+
pushCountMetric(lines, "Owner False Positives", side.ownerEvaluation.falsePositiveCount);
|
|
178
|
+
pushCountMetric(lines, "Owner False Negatives", side.ownerEvaluation.falseNegativeCount);
|
|
179
|
+
pushSection(lines, "Truncation Classification");
|
|
180
|
+
pushBoundedList(lines, side.truncationEvaluation, (t) => `group=${t.groupId} cause=${t.cause} availability=${t.availability} limit=${t.limit} used=${t.used}`);
|
|
181
|
+
for (const [agreementLabel, agreement] of [
|
|
182
|
+
["Packet/Raw Agreement", side.packetAgreement],
|
|
183
|
+
["Report/Raw Agreement", side.reportAgreement],
|
|
184
|
+
]) {
|
|
185
|
+
pushSection(lines, agreementLabel);
|
|
186
|
+
if (agreement === null) {
|
|
187
|
+
lines.push("- unavailable");
|
|
188
|
+
continue;
|
|
189
|
+
}
|
|
190
|
+
lines.push(`Producer Parity Preserved: ${agreement.upstreamProducerParityPreserved === null ? "unavailable" : agreement.upstreamProducerParityPreserved}`);
|
|
191
|
+
lines.push("Contradictions:");
|
|
192
|
+
pushDashList(lines, agreement.contradictions.map((c) => `${c.field}: raw=${sanitizeScalar(c.rawValue)} supplemental=${sanitizeScalar(c.supplementalValue)}`));
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
function renderProducerReadinessBridge(lines, bridge) {
|
|
196
|
+
pushSection(lines, "Producer-Readiness Bridge");
|
|
197
|
+
lines.push(fieldLine("Status", bridge.status));
|
|
198
|
+
if (bridge.status === "not-applicable") {
|
|
199
|
+
lines.push(fieldLine("Reason", bridge.reason));
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
renderProducerReadinessSide(lines, "Implementation", bridge.implementation);
|
|
203
|
+
renderProducerReadinessSide(lines, "Test", bridge.testImplementation);
|
|
204
|
+
pushSection(lines, "Readiness Agreement");
|
|
205
|
+
if (bridge.readinessAgreement === null) {
|
|
206
|
+
lines.push("- not supplied");
|
|
207
|
+
}
|
|
208
|
+
else {
|
|
209
|
+
const decision = bridge.readinessAgreement.decisionAgreement;
|
|
210
|
+
lines.push(fieldLine("Observed Decision", decision.observedDecision));
|
|
211
|
+
lines.push(fieldLine("Decision Agreement", decision.decisionAgreement));
|
|
212
|
+
lines.push(fieldLine("Issue-Code Agreement", decision.issueCodesAgreement));
|
|
213
|
+
lines.push("Observed Issue Codes:");
|
|
214
|
+
pushDashList(lines, decision.observedIssueCodes);
|
|
215
|
+
lines.push(fieldLine("Invalid Ready", bridge.readinessAgreement.invalidReady.invalidReady));
|
|
216
|
+
lines.push(fieldLine("Valid Blocked", bridge.readinessAgreement.validBlocked.validBlocked));
|
|
217
|
+
lines.push(fieldLine("Valid Refresh-Required", bridge.readinessAgreement.validBlocked.validRefreshRequired));
|
|
218
|
+
}
|
|
219
|
+
pushSection(lines, "Criticality Evaluation");
|
|
220
|
+
if (bridge.criticalityEvaluation === null) {
|
|
221
|
+
lines.push("- not supplied");
|
|
222
|
+
}
|
|
223
|
+
else {
|
|
224
|
+
pushRatioMetric(lines, "Mapped Critical Completeness", bridge.criticalityEvaluation.mappedCriticalCompleteness);
|
|
225
|
+
lines.push(`Fully Mapped: ${bridge.criticalityEvaluation.fullyMappedCriticalIds.join(", ") || "none"}`);
|
|
226
|
+
lines.push(`Partially Mapped: ${bridge.criticalityEvaluation.partiallyMappedCriticalIds.join(", ") || "none"}`);
|
|
227
|
+
lines.push(`Unmapped: ${bridge.criticalityEvaluation.unmappedCriticalIds.join(", ") || "none"}`);
|
|
228
|
+
lines.push(`Conflicting: ${bridge.criticalityEvaluation.conflictingCriticalityResponsibilityIds.join(", ") || "none"}`);
|
|
229
|
+
}
|
|
230
|
+
pushSection(lines, "Producer-Readiness Bridge Warnings");
|
|
231
|
+
pushBoundedList(lines, bridge.warnings, (w) => w);
|
|
165
232
|
}
|
|
166
233
|
function renderV043Section(lines, section) {
|
|
167
234
|
if (section === null) {
|
package/docs/METRICS.md
CHANGED
|
@@ -330,3 +330,31 @@ Every ratio metric below reports `availability` (`available`, `unavailable`, or
|
|
|
330
330
|
Caveat: reports `unavailable` when no target-immutability configuration was supplied for the run; a configured, unchanged target reports an available count of zero.
|
|
331
331
|
|
|
332
332
|
Repeated-run determinism (`StageContextDeterminismResultV1` in `src/evaluation/stageContextDeterminism`) reports whether repeated canonical runs (`repeatCount` 1 through 10, run 1 as baseline) produce identical canonicalized run values via SHA-256 digest comparison. A single run reports `not-applicable`; a canonicalization failure (for example a circular reference) reports `unavailable`.
|
|
333
|
+
|
|
334
|
+
## Producer-readiness bridge metrics (v0.4.4)
|
|
335
|
+
|
|
336
|
+
Implemented in `src/evaluation/stageContextMetrics` (`calculateOwnerMetrics.ts`, `calculateAllocationMetrics.ts`, `calculateTruncationClassification.ts`, `calculateSupplementalRawAgreement.ts`, `calculateReadinessAgreement.ts`, `calculateCriticalityMetrics.ts`) and composed once per run by `evaluateProducerReadinessBridge.ts`. These metrics read only evidence Batch 1's readers and the existing `v0.4.3` `ContextCapsule`/`RetrievalAuditRecord` readers already preserve; none reimplement upstream owner selection, evidence allocation, producer parity, or orchestrator readiness. Every metric below uses the same `available`/`unavailable`/`not-applicable` availability model as the `v0.4.3` metrics above; unavailable and not-applicable remain distinct from an available zero.
|
|
337
|
+
|
|
338
|
+
- `selectedOwnerEvidence` / `expectedOwnerPresent` / `forbiddenOwnerPresent` / owner false positives / false negatives
|
|
339
|
+
Meaning: the owner identities the frozen my-dev-kit producer already selected (`ContextCapsule.selectedOwners`), compared against explicit fixture-declared required/allowed/forbidden owner expectations.
|
|
340
|
+
Caveat: with no owner expectations declared, all four ratio/count metrics report `not-applicable`, not zero. An owner outside a fixture-declared closed set (or explicitly forbidden) is a false positive only when that closed set or forbidden set actually exists.
|
|
341
|
+
- `requiredGroupCapacity` / `usedReservation` / `borrowedCapacity` / `unusedCapacity`
|
|
342
|
+
Meaning: per evidence-group allocation facts read directly from `ContextCapsule.evidenceGroups` (`limit`, `usedCount`).
|
|
343
|
+
Caveat: `borrowedCapacity` always reports `unavailable` — no frozen my-dev-kit artifact field exposes cross-group capacity borrowing. `unusedCapacity` is computed (`limit - usedCount`) only when a limit is declared and the result is non-negative; a negative result reports `unavailable` with a diagnostic reason rather than a negative number.
|
|
344
|
+
- `requiredEvidenceOmitted`
|
|
345
|
+
Meaning: fixture-required evidence absent from observed evidence.
|
|
346
|
+
Caveat: `requiredEvidenceOmittedEntries[].groupId` is always `null` under the current expectation model — expectation items do not declare a group, so group linkage cannot be derived without inventing a mapping.
|
|
347
|
+
- Truncation classification (`avoidable` / `genuine-hard-limit` / `unresolved` / `none`)
|
|
348
|
+
Meaning: classifies each `TruncationRecord` using only `limit`, `used`, and `requiredEvidenceLost`. `avoidable` when required evidence was lost while `used` remained below the declared `limit`; `genuine-hard-limit` when `used` reached or exceeded the limit; `unresolved` when no limit is declared; `none` when no required evidence was lost.
|
|
349
|
+
Caveat: missing required evidence alone never proves `avoidable` — it requires the authoritative `requiredEvidenceLost` and `limit`/`used` evidence together.
|
|
350
|
+
- Supplemental/raw agreement
|
|
351
|
+
Meaning: per-field comparison between a Batch 1 supplemental document and the raw `ContextCapsule`/`RetrievalAuditRecord`, limited to fields whose vocabularies are directly, losslessly comparable (canonical repository identity, role, freshness, and truncation-as-yes/no).
|
|
352
|
+
Caveat: adequacy agreement always reports `unavailable` — my-dev-kit's four-sentence `ContextAdequacyStatus` values have no verified mapping onto the orchestrator's five-slug `DeclaredAdequacy` vocabulary, and none is invented. Missing evidence on one side reports `unavailable`, never a forced contradiction. `upstreamProducerParityPreserved` reflects that a successfully read raw pair is itself observed evidence the frozen `assertRawEvidenceParity()` write-time guard already held — it is never recomputed by comparing fields.
|
|
353
|
+
- Readiness agreement (`decisionAgreement`, `invalidReady`, `validBlocked`)
|
|
354
|
+
Meaning: compares the observed `OrchestratorContextReadinessResultV1` against an explicit fixture-declared readiness expectation. `invalidReady` is available `true` only when the observed decision is `ready` while the fixture explicitly requires blocking behavior with expected issue codes. `validBlocked` requires the observed decision, allowed decisions, and issue codes to all agree with the fixture.
|
|
355
|
+
Caveat: with no readiness expectation, all three report `not-applicable`. With no readiness input, all three report `unavailable`. None of these ever call or reimplement the frozen orchestrator's `contextReadiness.ts`.
|
|
356
|
+
- Criticality-overlay agreement / `mappedCriticalCompleteness`
|
|
357
|
+
Meaning: compares fixture-declared expected criticality per responsibility ID against the `criticality`/`mappingStatus` fields my-dev-kit's own `ResponsibilityMapping` already carries. `mappedCriticalCompleteness` counts only applicable, full-mapping-required, expected-critical responsibilities with resolvable mapping status; partially mapped and unmapped responsibilities never count as complete.
|
|
358
|
+
Caveat: a responsibility with no matching raw mapping entry reports `unavailable`/`missingMappingEvidenceCriticalIds`, and is excluded from the denominator rather than treated as unmapped. With zero resolvable denominator entries, `mappedCriticalCompleteness` reports `not-applicable`, not an available zero.
|
|
359
|
+
|
|
360
|
+
No composite score, grade, ranking, or lab-generated readiness verdict is calculated anywhere in this section.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dailephd/my-dev-kit-lab",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Evidence, benchmark, and evaluation companion for my-dev-kit.",
|
|
6
6
|
"bin": {
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"test:visualization-demos": "vitest run tests/visualizationDemos tests/commands/runVisualizationDemosCommand.spec.ts",
|
|
73
73
|
"verify:benchmarks": "tsx scripts/verify-benchmarks.ts",
|
|
74
74
|
"docs:check": "node scripts/check-docs.mjs",
|
|
75
|
-
"verify": "npm run build && npm run
|
|
75
|
+
"verify": "npm run build && npm run verify:benchmarks",
|
|
76
76
|
"security:deps": "tsx scripts/security/runDependencyChecks.ts",
|
|
77
77
|
"security:package": "tsx scripts/security/runPackageChecks.ts",
|
|
78
78
|
"security:codeql": "tsx scripts/security/runCodeql.ts",
|
|
@@ -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.
|