@dailephd/my-dev-kit-lab 0.4.2 → 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.
Files changed (113) hide show
  1. package/README.md +28 -113
  2. package/benchmarks/contracts/todo-behavior.md +1 -1
  3. package/benchmarks/projects/task-analytics-large-mixed/README.md +2 -0
  4. package/benchmarks/projects/task-workflow-medium-ts/README.md +3 -1
  5. package/dist/src/evaluation/stageContextDeterminism/calculateStageContextDeterminism.js +52 -0
  6. package/dist/src/evaluation/stageContextDeterminism/canonicalizeStageContextRun.js +53 -0
  7. package/dist/src/evaluation/stageContextDeterminism/index.js +2 -0
  8. package/dist/src/evaluation/stageContextDeterminism/types.js +1 -0
  9. package/dist/src/evaluation/stageContextExpectations/index.js +2 -0
  10. package/dist/src/evaluation/stageContextExpectations/producerReadinessExpectationTypes.js +8 -0
  11. package/dist/src/evaluation/stageContextExpectations/readStageContextExpectationFixtureV1.js +50 -0
  12. package/dist/src/evaluation/stageContextExpectations/readTypes.js +1 -0
  13. package/dist/src/evaluation/stageContextExpectations/types.js +1 -0
  14. package/dist/src/evaluation/stageContextExpectations/validation.js +768 -0
  15. package/dist/src/evaluation/stageContextMetrics/calculateAllocationMetrics.js +96 -0
  16. package/dist/src/evaluation/stageContextMetrics/calculateArtifactStateMetrics.js +130 -0
  17. package/dist/src/evaluation/stageContextMetrics/calculateContextSizeMetrics.js +85 -0
  18. package/dist/src/evaluation/stageContextMetrics/calculateCriticalityMetrics.js +112 -0
  19. package/dist/src/evaluation/stageContextMetrics/calculateExpectationMetrics.js +103 -0
  20. package/dist/src/evaluation/stageContextMetrics/calculateOwnerMetrics.js +84 -0
  21. package/dist/src/evaluation/stageContextMetrics/calculateReadinessAgreement.js +152 -0
  22. package/dist/src/evaluation/stageContextMetrics/calculateResponsibilityMappingMetrics.js +36 -0
  23. package/dist/src/evaluation/stageContextMetrics/calculateSupplementalRawAgreement.js +50 -0
  24. package/dist/src/evaluation/stageContextMetrics/calculateTruncationClassification.js +44 -0
  25. package/dist/src/evaluation/stageContextMetrics/collectContextCapsuleEvidence.js +312 -0
  26. package/dist/src/evaluation/stageContextMetrics/collectRetrievalAuditEvidence.js +35 -0
  27. package/dist/src/evaluation/stageContextMetrics/collectWorkflowInstructionEvidence.js +137 -0
  28. package/dist/src/evaluation/stageContextMetrics/evaluateProducerReadinessBridge.js +127 -0
  29. package/dist/src/evaluation/stageContextMetrics/evaluateV043StageContextExecution.js +247 -0
  30. package/dist/src/evaluation/stageContextMetrics/index.js +17 -0
  31. package/dist/src/evaluation/stageContextMetrics/matchStageContextExpectations.js +38 -0
  32. package/dist/src/evaluation/stageContextMetrics/producerReadinessMetricTypes.js +1 -0
  33. package/dist/src/evaluation/stageContextMetrics/targetKeys.js +35 -0
  34. package/dist/src/evaluation/stageContextMetrics/types.js +1 -0
  35. package/dist/src/evaluation/stageContextSelectors/contextArtifactConsistency.js +89 -0
  36. package/dist/src/evaluation/stageContextSelectors/contextCapsuleSelectors.js +126 -0
  37. package/dist/src/evaluation/stageContextSelectors/index.js +4 -0
  38. package/dist/src/evaluation/stageContextSelectors/retrievalAuditRecordSelectors.js +54 -0
  39. package/dist/src/evaluation/stageContextSelectors/workflowInstructionPacketSelectors.js +51 -0
  40. package/dist/src/evaluation/targetImmutability/captureTargetSnapshot.js +208 -0
  41. package/dist/src/evaluation/targetImmutability/compareTargetSnapshots.js +56 -0
  42. package/dist/src/evaluation/targetImmutability/index.js +3 -0
  43. package/dist/src/evaluation/targetImmutability/types.js +1 -0
  44. package/dist/src/evaluation/targetImmutability/validateTargetImmutabilityConfig.js +130 -0
  45. package/dist/src/evaluation/upstreamArtifacts/artifactReadTypes.js +1 -0
  46. package/dist/src/evaluation/upstreamArtifacts/index.js +9 -0
  47. package/dist/src/evaluation/upstreamArtifacts/jsonTypes.js +1 -0
  48. package/dist/src/evaluation/upstreamArtifacts/myDevKitClassificationTypesV1.js +1 -0
  49. package/dist/src/evaluation/upstreamArtifacts/myDevKitContextArtifactsV1.js +1 -0
  50. package/dist/src/evaluation/upstreamArtifacts/myDevKitSemanticTypesV1.js +1 -0
  51. package/dist/src/evaluation/upstreamArtifacts/orchestratorContextReadinessResultV1.js +247 -0
  52. package/dist/src/evaluation/upstreamArtifacts/orchestratorWorkflowInstructionPacketV1.js +1 -0
  53. package/dist/src/evaluation/upstreamArtifacts/readImplementationContextPacketV1.js +9 -0
  54. package/dist/src/evaluation/upstreamArtifacts/readImplementationContextRetrievalReportV1.js +9 -0
  55. package/dist/src/evaluation/upstreamArtifacts/readJsonArtifact.js +53 -0
  56. package/dist/src/evaluation/upstreamArtifacts/readMyDevKitContextCapsuleV1.js +9 -0
  57. package/dist/src/evaluation/upstreamArtifacts/readMyDevKitRetrievalAuditRecordV1.js +9 -0
  58. package/dist/src/evaluation/upstreamArtifacts/readOrchestratorWorkflowInstructionPacketV1.js +9 -0
  59. package/dist/src/evaluation/upstreamArtifacts/readSupplementalContextTextFile.js +29 -0
  60. package/dist/src/evaluation/upstreamArtifacts/readTestContextPacketV1.js +9 -0
  61. package/dist/src/evaluation/upstreamArtifacts/readTestContextRetrievalReportV1.js +9 -0
  62. package/dist/src/evaluation/upstreamArtifacts/runtimeValidation.js +131 -0
  63. package/dist/src/evaluation/upstreamArtifacts/schemaVersion.js +32 -0
  64. package/dist/src/evaluation/upstreamArtifacts/supplementalContextTextParser.js +75 -0
  65. package/dist/src/evaluation/upstreamArtifacts/supplementalContextTypes.js +152 -0
  66. package/dist/src/evaluation/upstreamArtifacts/validateMyDevKitContextCapsuleV1.js +1208 -0
  67. package/dist/src/evaluation/upstreamArtifacts/validateMyDevKitRetrievalAuditRecordV1.js +112 -0
  68. package/dist/src/evaluation/upstreamArtifacts/validateOrchestratorWorkflowInstructionPacketV1.js +235 -0
  69. package/dist/src/evaluation/upstreamArtifacts/validateSupplementalContextDocumentV1.js +148 -0
  70. package/dist/src/experiments/plugins/contextStrategyComparison/executeV043StageContextStrategy.js +46 -0
  71. package/dist/src/experiments/plugins/contextStrategyComparison/index.js +9 -0
  72. package/dist/src/experiments/plugins/contextStrategyComparison/loadV043StrategyArtifacts.js +397 -0
  73. package/dist/src/experiments/plugins/contextStrategyComparison/plugin.js +39 -1
  74. package/dist/src/experiments/plugins/contextStrategyComparison/readV043FullWorkflowLibraryFixture.js +162 -0
  75. package/dist/src/experiments/plugins/contextStrategyComparison/resolveV043StrategyInputs.js +43 -0
  76. package/dist/src/experiments/plugins/contextStrategyComparison/resultMapping.js +3 -0
  77. package/dist/src/experiments/plugins/contextStrategyComparison/runV043StageContextStrategyWithAssurance.js +205 -0
  78. package/dist/src/experiments/plugins/contextStrategyComparison/v043FullWorkflowLibraryFixture.js +1 -0
  79. package/dist/src/experiments/plugins/contextStrategyComparison/v043RunAssuranceTypes.js +1 -0
  80. package/dist/src/experiments/plugins/contextStrategyComparison/v043StrategyExecutionTypes.js +1 -0
  81. package/dist/src/experiments/plugins/contextStrategyComparison/v043StrategyIds.js +13 -0
  82. package/dist/src/experiments/plugins/contextStrategyComparison/v043StrategyInputContracts.js +1 -0
  83. package/dist/src/experiments/plugins/contextStrategyComparison/validateV043RunAssuranceConfig.js +59 -0
  84. package/dist/src/experiments/plugins/contextStrategyComparison/validateV043StrategyInput.js +266 -0
  85. package/dist/src/report/experiments/buildContextStrategyComparisonV043Report.js +520 -0
  86. package/dist/src/report/experiments/buildPluginExperimentReport.js +21 -6
  87. package/dist/src/report/experiments/contextStrategyComparisonV043ReportModel.js +1 -0
  88. package/dist/src/report/experiments/index.js +4 -0
  89. package/dist/src/report/experiments/renderContextStrategyComparisonV043Html.js +296 -0
  90. package/dist/src/report/experiments/renderPluginExperimentReportHtml.js +3 -0
  91. package/dist/src/report/experiments/renderPluginExperimentReportText.js +292 -0
  92. package/dist/src/report/experiments/writePluginExperimentReports.js +3 -0
  93. package/dist/src/securityValidation/attackScenarios/scenarios/secretLeakageScenario.js +215 -9
  94. package/docs/METRICS.md +84 -10
  95. package/package.json +2 -2
  96. package/tests/fixtures/full-workflow-library/complete-v1.0.0.json +24 -0
  97. package/tests/fixtures/full-workflow-library/future-minor-v1.1.0-additive.json +25 -0
  98. package/tests/fixtures/stage-context-expectations/complete-v1.0.0.json +230 -0
  99. package/tests/fixtures/stage-context-expectations/future-minor-v1.1.0-additive.json +232 -0
  100. package/tests/fixtures/stage-context-expectations/invalid/malformed-json.txt +1 -0
  101. package/tests/fixtures/stage-context-expectations/invalid/non-object-root.json +1 -0
  102. package/tests/fixtures/stage-context-expectations/minimal-v1.0.0.json +18 -0
  103. package/tests/fixtures/upstream-artifacts/invalid/malformed-json.txt +1 -0
  104. package/tests/fixtures/upstream-artifacts/invalid/non-object-root.json +1 -0
  105. package/tests/fixtures/upstream-artifacts/my-dev-kit/1.10.2/context-capsule/complete-v1.0.0.json +504 -0
  106. package/tests/fixtures/upstream-artifacts/my-dev-kit/1.10.2/context-capsule/future-minor-v1.1.0-additive.json +955 -0
  107. package/tests/fixtures/upstream-artifacts/my-dev-kit/1.10.2/retrieval-audit-record/complete-v1.0.0.json +190 -0
  108. package/tests/fixtures/upstream-artifacts/my-dev-kit/1.10.2/retrieval-audit-record/future-minor-v1.1.0-additive.json +327 -0
  109. package/tests/fixtures/upstream-artifacts/my-dev-kit-1.10.2-identity/PROVENANCE.txt +13 -0
  110. package/tests/fixtures/upstream-artifacts/my-dev-kit-1.10.2-identity/context-capsule.json +7874 -0
  111. package/tests/fixtures/upstream-artifacts/my-dev-kit-1.10.2-identity/retrieval-audit-record.json +1076 -0
  112. package/tests/fixtures/upstream-artifacts/my-dev-kit-orchestrator/1.2.1/workflow-instruction-packet/complete-v1.0.0.json +160 -0
  113. package/tests/fixtures/upstream-artifacts/my-dev-kit-orchestrator/1.2.1/workflow-instruction-packet/future-minor-v1.1.0-additive.json +186 -0
@@ -0,0 +1,160 @@
1
+ {
2
+ "schemaVersion": "1.0.0",
3
+ "catalogSchemaVersion": "1.0.0",
4
+ "catalogVersion": "1.0.0",
5
+ "workflowId": "workflow.feature",
6
+ "stageId": "stage.feature.implementation",
7
+ "primaryEntry": {
8
+ "id": "stage.feature.implementation",
9
+ "kind": "stage",
10
+ "title": "Implementation stage",
11
+ "description": "Implement the requested feature.",
12
+ "workflowRef": "workflow.feature",
13
+ "stageName": "implementation",
14
+ "commandRefs": ["command.repo.build"],
15
+ "ruleRefs": ["rule.quality.no-dead-code"],
16
+ "optionalCommandRefs": ["command.repo.lint"],
17
+ "optionalRuleRefs": ["rule.quality.prefer-tests"],
18
+ "reportContractRef": "report.implementation-summary",
19
+ "taskInstructions": "Implement the feature and keep behavior backward compatible.",
20
+ "validationRequirements": ["Run the build.", "Run the test suite."],
21
+ "stopConditions": ["Stop if the build fails."]
22
+ },
23
+ "resolvedCommands": [
24
+ {
25
+ "id": "command.repo.build",
26
+ "kind": "command",
27
+ "title": "Build the repository",
28
+ "description": "Compiles all TypeScript sources.",
29
+ "owner": "repo",
30
+ "command": "npm run build",
31
+ "purpose": "Confirm the project compiles.",
32
+ "sideEffect": "read-only",
33
+ "included": "required"
34
+ },
35
+ {
36
+ "id": "command.repo.lint",
37
+ "kind": "command",
38
+ "title": "Lint the repository",
39
+ "description": "Runs the linter.",
40
+ "owner": "repo",
41
+ "command": "npm run lint",
42
+ "purpose": "Confirm style conformance.",
43
+ "sideEffect": "read-only",
44
+ "included": "optional"
45
+ }
46
+ ],
47
+ "resolvedRules": [
48
+ {
49
+ "id": "rule.quality.no-dead-code",
50
+ "kind": "rule",
51
+ "title": "No dead code",
52
+ "description": "Do not leave unreachable code behind.",
53
+ "category": "quality",
54
+ "instruction": "Remove unreachable code before finishing the stage.",
55
+ "ruleRefs": [],
56
+ "included": "required",
57
+ "depth": 0
58
+ },
59
+ {
60
+ "id": "rule.quality.prefer-tests",
61
+ "kind": "rule",
62
+ "title": "Prefer tests",
63
+ "description": "Prefer covering new behavior with tests.",
64
+ "category": "quality",
65
+ "instruction": "Add or update tests for new behavior.",
66
+ "ruleRefs": ["rule.quality.no-dead-code"],
67
+ "included": "optional",
68
+ "depth": 1
69
+ }
70
+ ],
71
+ "reportContract": {
72
+ "id": "report.implementation-summary",
73
+ "kind": "report-contract",
74
+ "title": "Implementation summary report",
75
+ "description": "Summarizes the implementation stage outcome.",
76
+ "artifactKind": "implementation-summary",
77
+ "purpose": "Give reviewers a concise implementation summary.",
78
+ "requiredOutputCategory": "summary"
79
+ },
80
+ "validationRequirements": ["Run the build.", "Run the test suite."],
81
+ "stopConditions": ["Stop if the build fails."],
82
+ "resolutionProvenance": [
83
+ {
84
+ "rootWorkflowId": "workflow.feature",
85
+ "rootStageId": "stage.feature.implementation",
86
+ "sourceEntryId": "stage.feature.implementation",
87
+ "referenceField": "commandRefs",
88
+ "referencedEntryId": "command.repo.build",
89
+ "inclusionReason": "required command reference",
90
+ "depth": 0
91
+ },
92
+ {
93
+ "rootWorkflowId": "workflow.feature",
94
+ "rootStageId": "stage.feature.implementation",
95
+ "sourceEntryId": "stage.feature.implementation",
96
+ "referenceField": "ruleRefs",
97
+ "referencedEntryId": "rule.quality.no-dead-code",
98
+ "inclusionReason": "required rule reference",
99
+ "depth": 0
100
+ }
101
+ ],
102
+ "budget": {
103
+ "findings": [
104
+ {
105
+ "limitName": "maxCommands",
106
+ "declaredLimit": 20,
107
+ "used": 2,
108
+ "available": 18,
109
+ "overLimit": false,
110
+ "amountExceeded": 0,
111
+ "affectedEntryIds": []
112
+ },
113
+ {
114
+ "limitName": "maxRuleDepth",
115
+ "declaredLimit": null,
116
+ "used": 1,
117
+ "available": null,
118
+ "overLimit": false,
119
+ "amountExceeded": 0,
120
+ "affectedEntryIds": []
121
+ }
122
+ ],
123
+ "overLimit": false,
124
+ "adequate": true,
125
+ "totalCharacters": 3200,
126
+ "perEntryCharacters": {
127
+ "stage.feature.implementation": 1800,
128
+ "command.repo.build": 200,
129
+ "rule.quality.no-dead-code": 150
130
+ }
131
+ },
132
+ "truncation": {
133
+ "truncated": false,
134
+ "records": [
135
+ {
136
+ "rootOptionalEntryId": "command.repo.lint",
137
+ "affectedEntryIds": ["command.repo.lint"],
138
+ "limitingField": "maxCommands",
139
+ "declaredLimit": 20,
140
+ "usedBefore": 1,
141
+ "attemptedAfter": 2,
142
+ "reason": "included within budget"
143
+ }
144
+ ],
145
+ "droppedOptionalCommandIds": [],
146
+ "droppedOptionalRuleIds": [],
147
+ "droppedOptionalDependencyIds": [],
148
+ "warnings": []
149
+ },
150
+ "adequacy": {
151
+ "status": "adequate",
152
+ "reasons": [],
153
+ "requiredContentComplete": true,
154
+ "requiredBudgetSatisfied": true,
155
+ "optionalContentDropped": false,
156
+ "affectedEntryIds": []
157
+ },
158
+ "unresolvedReferences": ["command.repo.unresolved-example"],
159
+ "warnings": []
160
+ }
@@ -0,0 +1,186 @@
1
+ {
2
+ "schemaVersion": "1.1.0",
3
+ "catalogSchemaVersion": "1.0.0",
4
+ "catalogVersion": "1.0.0",
5
+ "workflowId": "workflow.feature",
6
+ "stageId": "stage.feature.implementation",
7
+ "primaryEntry": {
8
+ "id": "stage.feature.implementation",
9
+ "kind": "stage",
10
+ "title": "Implementation stage",
11
+ "description": "Implement the requested feature.",
12
+ "workflowRef": "workflow.feature",
13
+ "stageName": "implementation",
14
+ "commandRefs": [
15
+ "command.repo.build"
16
+ ],
17
+ "ruleRefs": [
18
+ "rule.quality.no-dead-code"
19
+ ],
20
+ "optionalCommandRefs": [
21
+ "command.repo.lint"
22
+ ],
23
+ "optionalRuleRefs": [
24
+ "rule.quality.prefer-tests"
25
+ ],
26
+ "reportContractRef": "report.implementation-summary",
27
+ "taskInstructions": "Implement the feature and keep behavior backward compatible.",
28
+ "validationRequirements": [
29
+ "Run the build.",
30
+ "Run the test suite."
31
+ ],
32
+ "stopConditions": [
33
+ "Stop if the build fails."
34
+ ]
35
+ },
36
+ "resolvedCommands": [
37
+ {
38
+ "id": "command.repo.build",
39
+ "kind": "command",
40
+ "title": "Build the repository",
41
+ "description": "Compiles all TypeScript sources.",
42
+ "owner": "repo",
43
+ "command": "npm run build",
44
+ "purpose": "Confirm the project compiles.",
45
+ "sideEffect": "read-only",
46
+ "included": "required"
47
+ },
48
+ {
49
+ "id": "command.repo.lint",
50
+ "kind": "command",
51
+ "title": "Lint the repository",
52
+ "description": "Runs the linter.",
53
+ "owner": "repo",
54
+ "command": "npm run lint",
55
+ "purpose": "Confirm style conformance.",
56
+ "sideEffect": "read-only",
57
+ "included": "optional"
58
+ }
59
+ ],
60
+ "resolvedRules": [
61
+ {
62
+ "id": "rule.quality.no-dead-code",
63
+ "kind": "rule",
64
+ "title": "No dead code",
65
+ "description": "Do not leave unreachable code behind.",
66
+ "category": "quality",
67
+ "instruction": "Remove unreachable code before finishing the stage.",
68
+ "ruleRefs": [],
69
+ "included": "required",
70
+ "depth": 0
71
+ },
72
+ {
73
+ "id": "rule.quality.prefer-tests",
74
+ "kind": "rule",
75
+ "title": "Prefer tests",
76
+ "description": "Prefer covering new behavior with tests.",
77
+ "category": "quality",
78
+ "instruction": "Add or update tests for new behavior.",
79
+ "ruleRefs": [
80
+ "rule.quality.no-dead-code"
81
+ ],
82
+ "included": "optional",
83
+ "depth": 1
84
+ }
85
+ ],
86
+ "reportContract": {
87
+ "id": "report.implementation-summary",
88
+ "kind": "report-contract",
89
+ "title": "Implementation summary report",
90
+ "description": "Summarizes the implementation stage outcome.",
91
+ "artifactKind": "implementation-summary",
92
+ "purpose": "Give reviewers a concise implementation summary.",
93
+ "requiredOutputCategory": "summary",
94
+ "futureNestedField": "preserved"
95
+ },
96
+ "validationRequirements": [
97
+ "Run the build.",
98
+ "Run the test suite."
99
+ ],
100
+ "stopConditions": [
101
+ "Stop if the build fails."
102
+ ],
103
+ "resolutionProvenance": [
104
+ {
105
+ "rootWorkflowId": "workflow.feature",
106
+ "rootStageId": "stage.feature.implementation",
107
+ "sourceEntryId": "stage.feature.implementation",
108
+ "referenceField": "commandRefs",
109
+ "referencedEntryId": "command.repo.build",
110
+ "inclusionReason": "required command reference",
111
+ "depth": 0
112
+ },
113
+ {
114
+ "rootWorkflowId": "workflow.feature",
115
+ "rootStageId": "stage.feature.implementation",
116
+ "sourceEntryId": "stage.feature.implementation",
117
+ "referenceField": "ruleRefs",
118
+ "referencedEntryId": "rule.quality.no-dead-code",
119
+ "inclusionReason": "required rule reference",
120
+ "depth": 0
121
+ }
122
+ ],
123
+ "budget": {
124
+ "findings": [
125
+ {
126
+ "limitName": "maxCommands",
127
+ "declaredLimit": 20,
128
+ "used": 2,
129
+ "available": 18,
130
+ "overLimit": false,
131
+ "amountExceeded": 0,
132
+ "affectedEntryIds": []
133
+ },
134
+ {
135
+ "limitName": "maxRuleDepth",
136
+ "declaredLimit": null,
137
+ "used": 1,
138
+ "available": null,
139
+ "overLimit": false,
140
+ "amountExceeded": 0,
141
+ "affectedEntryIds": []
142
+ }
143
+ ],
144
+ "overLimit": false,
145
+ "adequate": true,
146
+ "totalCharacters": 3200,
147
+ "perEntryCharacters": {
148
+ "stage.feature.implementation": 1800,
149
+ "command.repo.build": 200,
150
+ "rule.quality.no-dead-code": 150
151
+ }
152
+ },
153
+ "truncation": {
154
+ "truncated": false,
155
+ "records": [
156
+ {
157
+ "rootOptionalEntryId": "command.repo.lint",
158
+ "affectedEntryIds": [
159
+ "command.repo.lint"
160
+ ],
161
+ "limitingField": "maxCommands",
162
+ "declaredLimit": 20,
163
+ "usedBefore": 1,
164
+ "attemptedAfter": 2,
165
+ "reason": "included within budget"
166
+ }
167
+ ],
168
+ "droppedOptionalCommandIds": [],
169
+ "droppedOptionalRuleIds": [],
170
+ "droppedOptionalDependencyIds": [],
171
+ "warnings": []
172
+ },
173
+ "adequacy": {
174
+ "status": "adequate",
175
+ "reasons": [],
176
+ "requiredContentComplete": true,
177
+ "requiredBudgetSatisfied": true,
178
+ "optionalContentDropped": false,
179
+ "affectedEntryIds": []
180
+ },
181
+ "unresolvedReferences": [
182
+ "command.repo.unresolved-example"
183
+ ],
184
+ "warnings": [],
185
+ "futureMinorRootField": "preserved"
186
+ }