@dailephd/my-frontend-observer 0.8.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 (316) hide show
  1. package/CHANGELOG.md +397 -0
  2. package/LICENSE +21 -0
  3. package/README.md +255 -0
  4. package/dist/application/browserCaptureService.d.ts +11 -0
  5. package/dist/application/browserCaptureService.js +12 -0
  6. package/dist/application/browserCaptureService.js.map +1 -0
  7. package/dist/application/comparisonService.d.ts +56 -0
  8. package/dist/application/comparisonService.js +77 -0
  9. package/dist/application/comparisonService.js.map +1 -0
  10. package/dist/application/externalReferencePersistenceService.d.ts +75 -0
  11. package/dist/application/externalReferencePersistenceService.js +182 -0
  12. package/dist/application/externalReferencePersistenceService.js.map +1 -0
  13. package/dist/application/frontendContractEvaluationService.d.ts +49 -0
  14. package/dist/application/frontendContractEvaluationService.js +112 -0
  15. package/dist/application/frontendContractEvaluationService.js.map +1 -0
  16. package/dist/application/frontendContractPersistenceService.d.ts +56 -0
  17. package/dist/application/frontendContractPersistenceService.js +91 -0
  18. package/dist/application/frontendContractPersistenceService.js.map +1 -0
  19. package/dist/application/observationPersistence.d.ts +59 -0
  20. package/dist/application/observationPersistence.js +79 -0
  21. package/dist/application/observationPersistence.js.map +1 -0
  22. package/dist/application/projectCheckService.d.ts +3 -0
  23. package/dist/application/projectCheckService.js +169 -0
  24. package/dist/application/projectCheckService.js.map +1 -0
  25. package/dist/application/projectWorkflowService.d.ts +46 -0
  26. package/dist/application/projectWorkflowService.js +92 -0
  27. package/dist/application/projectWorkflowService.js.map +1 -0
  28. package/dist/application/referenceFidelityEvaluationService.d.ts +28 -0
  29. package/dist/application/referenceFidelityEvaluationService.js +45 -0
  30. package/dist/application/referenceFidelityEvaluationService.js.map +1 -0
  31. package/dist/artifacts/artifactReader.d.ts +19 -0
  32. package/dist/artifacts/artifactReader.js +36 -0
  33. package/dist/artifacts/artifactReader.js.map +1 -0
  34. package/dist/artifacts/artifactWriter.d.ts +25 -0
  35. package/dist/artifacts/artifactWriter.js +68 -0
  36. package/dist/artifacts/artifactWriter.js.map +1 -0
  37. package/dist/artifacts/comparisonArtifactReader.d.ts +18 -0
  38. package/dist/artifacts/comparisonArtifactReader.js +35 -0
  39. package/dist/artifacts/comparisonArtifactReader.js.map +1 -0
  40. package/dist/artifacts/comparisonArtifactWriter.d.ts +41 -0
  41. package/dist/artifacts/comparisonArtifactWriter.js +67 -0
  42. package/dist/artifacts/comparisonArtifactWriter.js.map +1 -0
  43. package/dist/artifacts/externalReferenceArtifactReader.d.ts +18 -0
  44. package/dist/artifacts/externalReferenceArtifactReader.js +35 -0
  45. package/dist/artifacts/externalReferenceArtifactReader.js.map +1 -0
  46. package/dist/artifacts/externalReferenceArtifactWriter.d.ts +44 -0
  47. package/dist/artifacts/externalReferenceArtifactWriter.js +77 -0
  48. package/dist/artifacts/externalReferenceArtifactWriter.js.map +1 -0
  49. package/dist/artifacts/frontendContractArtifactReader.d.ts +24 -0
  50. package/dist/artifacts/frontendContractArtifactReader.js +47 -0
  51. package/dist/artifacts/frontendContractArtifactReader.js.map +1 -0
  52. package/dist/artifacts/frontendContractArtifactWriter.d.ts +34 -0
  53. package/dist/artifacts/frontendContractArtifactWriter.js +70 -0
  54. package/dist/artifacts/frontendContractArtifactWriter.js.map +1 -0
  55. package/dist/artifacts/frontendContractEvaluationArtifactReader.d.ts +17 -0
  56. package/dist/artifacts/frontendContractEvaluationArtifactReader.js +34 -0
  57. package/dist/artifacts/frontendContractEvaluationArtifactReader.js.map +1 -0
  58. package/dist/artifacts/frontendContractEvaluationArtifactWriter.d.ts +32 -0
  59. package/dist/artifacts/frontendContractEvaluationArtifactWriter.js +58 -0
  60. package/dist/artifacts/frontendContractEvaluationArtifactWriter.js.map +1 -0
  61. package/dist/artifacts/types.d.ts +17 -0
  62. package/dist/artifacts/types.js +2 -0
  63. package/dist/artifacts/types.js.map +1 -0
  64. package/dist/browser/chromiumAdapter.d.ts +21 -0
  65. package/dist/browser/chromiumAdapter.js +204 -0
  66. package/dist/browser/chromiumAdapter.js.map +1 -0
  67. package/dist/browser/evidenceCapture.d.ts +62 -0
  68. package/dist/browser/evidenceCapture.js +500 -0
  69. package/dist/browser/evidenceCapture.js.map +1 -0
  70. package/dist/browser/scrollCapture.d.ts +32 -0
  71. package/dist/browser/scrollCapture.js +163 -0
  72. package/dist/browser/scrollCapture.js.map +1 -0
  73. package/dist/browser/types.d.ts +24 -0
  74. package/dist/browser/types.js +2 -0
  75. package/dist/browser/types.js.map +1 -0
  76. package/dist/cli.d.ts +8 -0
  77. package/dist/cli.js +2411 -0
  78. package/dist/cli.js.map +1 -0
  79. package/dist/domain/boundedAgentContext.d.ts +226 -0
  80. package/dist/domain/boundedAgentContext.js +355 -0
  81. package/dist/domain/boundedAgentContext.js.map +1 -0
  82. package/dist/domain/boundedAgentContextCorrelation.d.ts +74 -0
  83. package/dist/domain/boundedAgentContextCorrelation.js +441 -0
  84. package/dist/domain/boundedAgentContextCorrelation.js.map +1 -0
  85. package/dist/domain/boundedAgentContextIdentity.d.ts +26 -0
  86. package/dist/domain/boundedAgentContextIdentity.js +69 -0
  87. package/dist/domain/boundedAgentContextIdentity.js.map +1 -0
  88. package/dist/domain/boundedAgentContextProjection.d.ts +71 -0
  89. package/dist/domain/boundedAgentContextProjection.js +477 -0
  90. package/dist/domain/boundedAgentContextProjection.js.map +1 -0
  91. package/dist/domain/comparison.d.ts +220 -0
  92. package/dist/domain/comparison.js +350 -0
  93. package/dist/domain/comparison.js.map +1 -0
  94. package/dist/domain/comparisonEngine.d.ts +76 -0
  95. package/dist/domain/comparisonEngine.js +734 -0
  96. package/dist/domain/comparisonEngine.js.map +1 -0
  97. package/dist/domain/comparisonIdentity.d.ts +13 -0
  98. package/dist/domain/comparisonIdentity.js +46 -0
  99. package/dist/domain/comparisonIdentity.js.map +1 -0
  100. package/dist/domain/completion.d.ts +30 -0
  101. package/dist/domain/completion.js +22 -0
  102. package/dist/domain/completion.js.map +1 -0
  103. package/dist/domain/diagnostics.d.ts +17 -0
  104. package/dist/domain/diagnostics.js +77 -0
  105. package/dist/domain/diagnostics.js.map +1 -0
  106. package/dist/domain/evidence.d.ts +29 -0
  107. package/dist/domain/evidence.js +59 -0
  108. package/dist/domain/evidence.js.map +1 -0
  109. package/dist/domain/explicitState.d.ts +40 -0
  110. package/dist/domain/explicitState.js +54 -0
  111. package/dist/domain/explicitState.js.map +1 -0
  112. package/dist/domain/externalReference.d.ts +158 -0
  113. package/dist/domain/externalReference.js +167 -0
  114. package/dist/domain/externalReference.js.map +1 -0
  115. package/dist/domain/externalReferenceApplicability.d.ts +43 -0
  116. package/dist/domain/externalReferenceApplicability.js +52 -0
  117. package/dist/domain/externalReferenceApplicability.js.map +1 -0
  118. package/dist/domain/externalReferenceCompatibility.d.ts +40 -0
  119. package/dist/domain/externalReferenceCompatibility.js +48 -0
  120. package/dist/domain/externalReferenceCompatibility.js.map +1 -0
  121. package/dist/domain/externalReferenceFidelity.d.ts +171 -0
  122. package/dist/domain/externalReferenceFidelity.js +419 -0
  123. package/dist/domain/externalReferenceFidelity.js.map +1 -0
  124. package/dist/domain/externalReferenceIdentity.d.ts +38 -0
  125. package/dist/domain/externalReferenceIdentity.js +70 -0
  126. package/dist/domain/externalReferenceIdentity.js.map +1 -0
  127. package/dist/domain/externalReferenceImage.d.ts +35 -0
  128. package/dist/domain/externalReferenceImage.js +160 -0
  129. package/dist/domain/externalReferenceImage.js.map +1 -0
  130. package/dist/domain/externalReferenceRegionRelationships.d.ts +63 -0
  131. package/dist/domain/externalReferenceRegionRelationships.js +98 -0
  132. package/dist/domain/externalReferenceRegionRelationships.js.map +1 -0
  133. package/dist/domain/externalReferenceRegions.d.ts +65 -0
  134. package/dist/domain/externalReferenceRegions.js +105 -0
  135. package/dist/domain/externalReferenceRegions.js.map +1 -0
  136. package/dist/domain/externalReferenceRequirementIdentity.d.ts +12 -0
  137. package/dist/domain/externalReferenceRequirementIdentity.js +35 -0
  138. package/dist/domain/externalReferenceRequirementIdentity.js.map +1 -0
  139. package/dist/domain/externalReferenceRequirements.d.ts +215 -0
  140. package/dist/domain/externalReferenceRequirements.js +401 -0
  141. package/dist/domain/externalReferenceRequirements.js.map +1 -0
  142. package/dist/domain/externalReferenceRuntimeBinding.d.ts +146 -0
  143. package/dist/domain/externalReferenceRuntimeBinding.js +183 -0
  144. package/dist/domain/externalReferenceRuntimeBinding.js.map +1 -0
  145. package/dist/domain/frontendContractEvaluation.d.ts +57 -0
  146. package/dist/domain/frontendContractEvaluation.js +454 -0
  147. package/dist/domain/frontendContractEvaluation.js.map +1 -0
  148. package/dist/domain/frontendContractEvaluationArtifact.d.ts +65 -0
  149. package/dist/domain/frontendContractEvaluationArtifact.js +108 -0
  150. package/dist/domain/frontendContractEvaluationArtifact.js.map +1 -0
  151. package/dist/domain/frontendContractIdentity.d.ts +39 -0
  152. package/dist/domain/frontendContractIdentity.js +70 -0
  153. package/dist/domain/frontendContractIdentity.js.map +1 -0
  154. package/dist/domain/frontendContracts.d.ts +188 -0
  155. package/dist/domain/frontendContracts.js +260 -0
  156. package/dist/domain/frontendContracts.js.map +1 -0
  157. package/dist/domain/identity.d.ts +21 -0
  158. package/dist/domain/identity.js +47 -0
  159. package/dist/domain/identity.js.map +1 -0
  160. package/dist/domain/referenceCorrectionIdentity.d.ts +40 -0
  161. package/dist/domain/referenceCorrectionIdentity.js +77 -0
  162. package/dist/domain/referenceCorrectionIdentity.js.map +1 -0
  163. package/dist/domain/referenceCorrectionWorkflow.d.ts +160 -0
  164. package/dist/domain/referenceCorrectionWorkflow.js +165 -0
  165. package/dist/domain/referenceCorrectionWorkflow.js.map +1 -0
  166. package/dist/domain/referenceFidelityProjection.d.ts +65 -0
  167. package/dist/domain/referenceFidelityProjection.js +135 -0
  168. package/dist/domain/referenceFidelityProjection.js.map +1 -0
  169. package/dist/domain/relationships.d.ts +210 -0
  170. package/dist/domain/relationships.js +352 -0
  171. package/dist/domain/relationships.js.map +1 -0
  172. package/dist/domain/schema.d.ts +269 -0
  173. package/dist/domain/schema.js +442 -0
  174. package/dist/domain/schema.js.map +1 -0
  175. package/dist/domain/scrollEvidence.d.ts +51 -0
  176. package/dist/domain/scrollEvidence.js +134 -0
  177. package/dist/domain/scrollEvidence.js.map +1 -0
  178. package/dist/index.d.ts +114 -0
  179. package/dist/index.js +64 -0
  180. package/dist/index.js.map +1 -0
  181. package/dist/projectWorkflow/aliasCatalog.d.ts +21 -0
  182. package/dist/projectWorkflow/aliasCatalog.js +67 -0
  183. package/dist/projectWorkflow/aliasCatalog.js.map +1 -0
  184. package/dist/projectWorkflow/checkAcceptance.d.ts +25 -0
  185. package/dist/projectWorkflow/checkAcceptance.js +55 -0
  186. package/dist/projectWorkflow/checkAcceptance.js.map +1 -0
  187. package/dist/projectWorkflow/checkResult.d.ts +85 -0
  188. package/dist/projectWorkflow/checkResult.js +101 -0
  189. package/dist/projectWorkflow/checkResult.js.map +1 -0
  190. package/dist/projectWorkflow/projectConfig.d.ts +43 -0
  191. package/dist/projectWorkflow/projectConfig.js +84 -0
  192. package/dist/projectWorkflow/projectConfig.js.map +1 -0
  193. package/dist/projectWorkflow/projectDiscovery.d.ts +9 -0
  194. package/dist/projectWorkflow/projectDiscovery.js +20 -0
  195. package/dist/projectWorkflow/projectDiscovery.js.map +1 -0
  196. package/dist/projectWorkflow/projectPaths.d.ts +8 -0
  197. package/dist/projectWorkflow/projectPaths.js +23 -0
  198. package/dist/projectWorkflow/projectPaths.js.map +1 -0
  199. package/dist/request/paths.d.ts +14 -0
  200. package/dist/request/paths.js +33 -0
  201. package/dist/request/paths.js.map +1 -0
  202. package/dist/request/request.d.ts +111 -0
  203. package/dist/request/request.js +464 -0
  204. package/dist/request/request.js.map +1 -0
  205. package/dist/safety/policy.d.ts +14 -0
  206. package/dist/safety/policy.js +81 -0
  207. package/dist/safety/policy.js.map +1 -0
  208. package/dist/viewer/assets/index-CN_yb9Uf.css +1 -0
  209. package/dist/viewer/assets/index-D98S1_2d.js +9 -0
  210. package/dist/viewer/icons/icon-192.png +0 -0
  211. package/dist/viewer/icons/icon-512.png +0 -0
  212. package/dist/viewer/index.html +15 -0
  213. package/dist/viewer/manifest.webmanifest +1 -0
  214. package/dist/viewer/registerSW.js +1 -0
  215. package/dist/viewer/sw.js +1 -0
  216. package/dist/viewer/workbox-9c191d2f.js +1 -0
  217. package/dist/viewerServer/context.d.ts +48 -0
  218. package/dist/viewerServer/context.js +60 -0
  219. package/dist/viewerServer/context.js.map +1 -0
  220. package/dist/viewerServer/evidence/classify.d.ts +59 -0
  221. package/dist/viewerServer/evidence/classify.js +124 -0
  222. package/dist/viewerServer/evidence/classify.js.map +1 -0
  223. package/dist/viewerServer/evidence/comparisonView.d.ts +28 -0
  224. package/dist/viewerServer/evidence/comparisonView.js +43 -0
  225. package/dist/viewerServer/evidence/comparisonView.js.map +1 -0
  226. package/dist/viewerServer/evidence/contextSourceView.d.ts +25 -0
  227. package/dist/viewerServer/evidence/contextSourceView.js +20 -0
  228. package/dist/viewerServer/evidence/contextSourceView.js.map +1 -0
  229. package/dist/viewerServer/evidence/discovery.d.ts +31 -0
  230. package/dist/viewerServer/evidence/discovery.js +78 -0
  231. package/dist/viewerServer/evidence/discovery.js.map +1 -0
  232. package/dist/viewerServer/evidence/evaluationView.d.ts +32 -0
  233. package/dist/viewerServer/evidence/evaluationView.js +50 -0
  234. package/dist/viewerServer/evidence/evaluationView.js.map +1 -0
  235. package/dist/viewerServer/evidence/handles.d.ts +21 -0
  236. package/dist/viewerServer/evidence/handles.js +43 -0
  237. package/dist/viewerServer/evidence/handles.js.map +1 -0
  238. package/dist/viewerServer/evidence/index.d.ts +41 -0
  239. package/dist/viewerServer/evidence/index.js +82 -0
  240. package/dist/viewerServer/evidence/index.js.map +1 -0
  241. package/dist/viewerServer/evidence/limits.d.ts +27 -0
  242. package/dist/viewerServer/evidence/limits.js +28 -0
  243. package/dist/viewerServer/evidence/limits.js.map +1 -0
  244. package/dist/viewerServer/evidence/linkedEvidence.d.ts +43 -0
  245. package/dist/viewerServer/evidence/linkedEvidence.js +151 -0
  246. package/dist/viewerServer/evidence/linkedEvidence.js.map +1 -0
  247. package/dist/viewerServer/evidence/mediaResolver.d.ts +16 -0
  248. package/dist/viewerServer/evidence/mediaResolver.js +85 -0
  249. package/dist/viewerServer/evidence/mediaResolver.js.map +1 -0
  250. package/dist/viewerServer/evidence/observationView.d.ts +29 -0
  251. package/dist/viewerServer/evidence/observationView.js +46 -0
  252. package/dist/viewerServer/evidence/observationView.js.map +1 -0
  253. package/dist/viewerServer/evidence/pathSafety.d.ts +11 -0
  254. package/dist/viewerServer/evidence/pathSafety.js +31 -0
  255. package/dist/viewerServer/evidence/pathSafety.js.map +1 -0
  256. package/dist/viewerServer/evidence/projection.d.ts +55 -0
  257. package/dist/viewerServer/evidence/projection.js +152 -0
  258. package/dist/viewerServer/evidence/projection.js.map +1 -0
  259. package/dist/viewerServer/evidence/referenceView.d.ts +133 -0
  260. package/dist/viewerServer/evidence/referenceView.js +169 -0
  261. package/dist/viewerServer/evidence/referenceView.js.map +1 -0
  262. package/dist/viewerServer/httpServer.d.ts +27 -0
  263. package/dist/viewerServer/httpServer.js +381 -0
  264. package/dist/viewerServer/httpServer.js.map +1 -0
  265. package/dist/viewerServer/openBrowser.d.ts +7 -0
  266. package/dist/viewerServer/openBrowser.js +32 -0
  267. package/dist/viewerServer/openBrowser.js.map +1 -0
  268. package/dist/viewerServer/port.d.ts +16 -0
  269. package/dist/viewerServer/port.js +19 -0
  270. package/dist/viewerServer/port.js.map +1 -0
  271. package/dist/viewerServer/viewerService.d.ts +62 -0
  272. package/dist/viewerServer/viewerService.js +88 -0
  273. package/dist/viewerServer/viewerService.js.map +1 -0
  274. package/docs/ARCHITECTURE.md +1286 -0
  275. package/docs/CI_CD.md +250 -0
  276. package/docs/COMMANDS.md +972 -0
  277. package/docs/CONTRACTS.md +1856 -0
  278. package/docs/CURRENT_STATE.md +1049 -0
  279. package/docs/DEVELOPMENT.md +202 -0
  280. package/docs/DOCUMENTATION_PRESERVATION_POLICY.md +50 -0
  281. package/docs/PROJECT_DESCRIPTION.md +2221 -0
  282. package/docs/PROJECT_MILESTONES.md +2526 -0
  283. package/docs/PROJECT_OVERVIEW.md +150 -0
  284. package/docs/QUICKSTART.md +83 -0
  285. package/docs/RELEASE.md +27 -0
  286. package/docs/ROADMAP.md +641 -0
  287. package/docs/SECURITY.md +218 -0
  288. package/docs/WORKFLOWS.md +642 -0
  289. package/docs/plans/v0.8-implementation-plan.md +655 -0
  290. package/docs/plans/v0.8.1-cli-usability-patch-plan.md +505 -0
  291. package/docs/reports/v0.7-bounded-fidelity-context-prompt7.md +243 -0
  292. package/docs/reports/v0.7-implementation-completeness-documentation-reconciliation.md +497 -0
  293. package/docs/reports/v0.7-pre-release-readiness.md +337 -0
  294. package/docs/reports/v0.7-reference-binding-prompt5.md +223 -0
  295. package/docs/reports/v0.7-reference-compatibility-prompt4.md +234 -0
  296. package/docs/reports/v0.7-reference-correction-workflow-prompt8.md +222 -0
  297. package/docs/reports/v0.7-reference-fidelity-prompt6.md +216 -0
  298. package/docs/reports/v0.7-reference-foundation-prompt1.md +151 -0
  299. package/docs/reports/v0.7-reference-regions-prompt2.md +195 -0
  300. package/docs/reports/v0.7-reference-requirements-prompt3.md +217 -0
  301. package/docs/reports/v0.7-release-prep.md +423 -0
  302. package/docs/reports/v0.8-binding-fidelity-interaction-batch6.md +279 -0
  303. package/docs/reports/v0.8-bounded-context-correlation-batch7.md +233 -0
  304. package/docs/reports/v0.8-comparison-contract-inspection-batch4.md +279 -0
  305. package/docs/reports/v0.8-evidence-index-readers-batch2.md +247 -0
  306. package/docs/reports/v0.8-implementation-completeness-documentation-reconciliation.md +741 -0
  307. package/docs/reports/v0.8-integrated-viewer-acceptance-batch8.md +128 -0
  308. package/docs/reports/v0.8-observation-svg-inspection-batch3.md +223 -0
  309. package/docs/reports/v0.8-prerelease-readiness-cross-platform-security-code-rot.md +687 -0
  310. package/docs/reports/v0.8-reference-candidate-inspection-batch5.md +232 -0
  311. package/docs/reports/v0.8-viewer-runtime-pwa-batch1.md +278 -0
  312. package/docs/reports/v0.8.1-check-orchestration-prompt2.md +69 -0
  313. package/docs/reports/v0.8.1-implementation-completeness-documentation-reconciliation.md +114 -0
  314. package/docs/reports/v0.8.1-prerelease-readiness-cross-platform-security-code-rot.md +170 -0
  315. package/docs/reports/v0.8.1-project-workflow-foundation-prompt1.md +66 -0
  316. package/package.json +58 -0
@@ -0,0 +1,337 @@
1
+ # v0.7 Pre-Release Readiness Report
2
+
3
+ **Verdict: `PASS_READY_FOR_RELEASE_PREP`**
4
+
5
+ This report documents a pre-release readiness validation pass over the completed,
6
+ audited v0.7 implementation. It proves the implementation is ready to enter a
7
+ separate release-preparation stage. It does **not** authorize publication, does
8
+ **not** bump the package version, and does **not** merge to `master`.
9
+
10
+ ## Commit identity
11
+
12
+ | Label | Commit |
13
+ |---|---|
14
+ | Audited v0.7 baseline (starting point) | `4b2a51c62f47fd1244ceab42cb37bb111cb90259` — "Add v0.7 implementation-completeness audit report" |
15
+ | Documentation reconciliation commit | `8b6c669` |
16
+ | **VALIDATED_CANDIDATE_HEAD** (cross-platform CI run 34054085344 validated this exact commit) | `b2286bdc9550d70fa1047a1f732968a8eca46a1e` — "Close v0.7 pre-release readiness coverage gap in packed-candidate smoke" |
17
+ | **REPORT_COMMIT** | this commit (added after the successful CI run; contains only this report — no product/readiness behavior changes) |
18
+
19
+ Branch: `validation/v0.7-pre-release`, created from the exact audited v0.7 HEAD
20
+ (`4b2a51c`), fast-forwarded by exactly one readiness-infrastructure commit
21
+ (`b2286bd`), then this report commit. No product source under `src/` changed at
22
+ any point in this readiness stage.
23
+
24
+ Preflight confirmed the full Prompt 1–8 commit lineage is present and ancestors
25
+ of HEAD, the working tree was clean, and Prompt 1's preserved speculative-write
26
+ stash (`stash@{0}`, "stray-fork-writes-preserved-for-reference") remains
27
+ untouched — never applied, dropped, committed, or used as test evidence.
28
+
29
+ ## Readiness infrastructure change (the only tracked change in this stage)
30
+
31
+ Commit `b2286bd` on `validation/v0.7-pre-release`:
32
+
33
+ 1. **Closed a real v0.7 packed-candidate coverage gap.** Inspecting the
34
+ existing CI smoke (`scripts/ci/runPackedObservationSmoke.mjs`) before
35
+ running it showed thorough v0.1–v0.6 installed-candidate coverage but
36
+ **zero** v0.7 coverage — no `import-reference`/`approve-reference`/
37
+ `evaluate-reference-fidelity` CLI exercise, and none of the v0.7
38
+ programmatic exports (`evaluateReferenceCandidateFidelityFromArtifactRoots`,
39
+ `prepareReferenceCorrection`, `reviewReferenceCorrectionAttempt`). Per the
40
+ task's readiness-coverage-gap rule, this was treated as a readiness gap,
41
+ not a product defect, and closed narrowly inside the existing smoke script
42
+ rather than building a second parallel framework:
43
+ - Real CLI help-flag assertions for all three new v0.7 commands.
44
+ - A real external-reference image imported and approved through the
45
+ installed CLI, with explicit regions (`nav-region`/`workspace-region`/
46
+ `rail-region`), three requirement kinds (`region-property`,
47
+ `region-relationship`, and tolerance kinds `exact`/`absolute-reference-px`),
48
+ and declared `applicability.viewport`.
49
+ - Explicit region↔runtime-target bindings, reusing the same runtime
50
+ targets (`navigation`/`workspace`/`rail`) already used by the existing
51
+ v0.5 contract-fixture geometry — no second fixture was built.
52
+ - A genuine fidelity **PASS** (against the already-captured "success"
53
+ candidate) and a genuine fidelity **FAIL** (against the already-captured
54
+ "protected-regression" candidate), each checked both with and without
55
+ `--enforce`, mirroring the existing `evaluate-contract` PASS/FAIL/
56
+ `--enforce` proof pattern already in the script.
57
+ - An `observe --state-file` call proving `requestConfig.explicitState`
58
+ round-trips through the installed candidate.
59
+ - Programmatic exercise of `evaluateReferenceCandidateFidelityFromArtifactRoots`,
60
+ `readExternalReferenceArtifact`, `prepareReferenceCorrection` (asserting
61
+ `status: 'handoff-ready'` and a bounded-agent-context artifact with the
62
+ correct `artifactKind`, exercising v0.7 Prompt 7's bounded fidelity
63
+ projection and the v0.6 bounded-agent-context integration together), and
64
+ `reviewReferenceCorrectionAttempt` against both the success candidate
65
+ (`overallState: 'pass'`, `approvalEligible: true`) and the regression
66
+ candidate (`overallState: 'fail'`, `approvalEligible: false`) — all
67
+ resolved from the installed package's own `node_modules`, never the
68
+ source checkout.
69
+ - A re-hash of the pre-existing source observation manifest to confirm the
70
+ new v0.7 calls did not mutate it (observer source immutability).
71
+ 2. **Fixed an unrelated lint gap.** `eslint.config.js`'s `ignores` list
72
+ predates this task's mandated `.my-dev-kit-workflow/` project-local
73
+ workflow convention (npm cache, temp consumer installs, candidate
74
+ tarballs, Playwright browser downloads) and only covered
75
+ `.my-dev-kit/`/`.my-dev-kit-orchestrator/`. Running `npm run lint` with
76
+ Chromium downloaded to `.my-dev-kit-workflow/pw-browsers/` surfaced 20
77
+ `no-undef` errors from ESLint parsing Chromium's own bundled JS resources.
78
+ Added `.my-dev-kit-workflow/**` and `.my-dev-kit-context/**` to the ignore
79
+ list. This is a dev-tooling config fix, not a production behavior change.
80
+
81
+ No production source (`src/**`) changed. No test was weakened, skipped, or
82
+ deleted. No package metadata changed.
83
+
84
+ ## Local full validation (on `b2286bd`)
85
+
86
+ Environment: Windows 11, Node `v24.11.0`, npm `11.14.0` (satisfies the
87
+ repository's `"node": ">=24"` engines constraint). All caches/temp
88
+ state/candidate artifacts kept under `.my-dev-kit-workflow/` (gitignored,
89
+ project-local — npm cache, Playwright browser downloads, and the readiness
90
+ output directory), never under `C:\`.
91
+
92
+ | Step | Result |
93
+ |---|---|
94
+ | `npm ci` | clean install, 132 packages, 0 vulnerabilities |
95
+ | Chromium install (`playwright install chromium`, `PLAYWRIGHT_BROWSERS_PATH` project-local) | succeeded |
96
+ | `npm run typecheck` | clean |
97
+ | `npm run lint` | clean (after the ignore-list fix above) |
98
+ | `npm test` | **1000/1000 unit tests passed** (50 files) — matches the expected ~1000 baseline exactly |
99
+ | `npm run test:browser` | **124/124 browser tests passed** (10 files, real Chromium) — matches the expected ~124 baseline exactly |
100
+ | `npm run test:security` | **68/68 passed** (5 in `tests/unit/policy.test.ts` + 63 in `tests/browser/chromiumAdapter.test.ts`) |
101
+ | `npm run build` | clean |
102
+ | `npm run check:docs` | "Documentation check passed (17 required files)." |
103
+ | `git diff --check` | clean (no whitespace errors) |
104
+ | `npm pack --dry-run` | 207 entries, only `dist/**`, `README.md`, `CHANGELOG.md`, `docs/**`, `package.json` — no `.my-dev-kit-*`, no `node_modules`, no test/script files |
105
+
106
+ No unexplained test-count reduction — every count matches the previous audited
107
+ baseline exactly. No flake was encountered locally or in CI (see "Known flake
108
+ investigation" below).
109
+
110
+ ## Version-specific v0.7 validation
111
+
112
+ All of the following remain covered by passing unit and/or browser tests
113
+ (confirmed present in `tests/unit/` and `tests/browser/` and passing in the
114
+ 1000+124 counts above): external-reference artifact/lifecycle
115
+ (`externalReference.test.ts`, `externalReferenceArtifactWriter.test.ts`,
116
+ `externalReferencePersistenceService.test.ts`, `cliExternalReference.test.ts`),
117
+ regions/geometry (`externalReferenceRegions.test.ts`,
118
+ `externalReferenceRegionRelationships.test.ts`), selected requirements
119
+ (`externalReferenceRequirements.test.ts`,
120
+ `externalReferenceRequirementIdentity.test.ts`), reference adequacy (covered
121
+ within the requirements suite), explicit state/applicability
122
+ (`explicitState.test.ts`, `externalReferenceApplicability.test.ts`),
123
+ reference/candidate compatibility (`externalReferenceCompatibility.test.ts`),
124
+ region↔runtime-target binding (`externalReferenceRuntimeBinding.test.ts`),
125
+ fidelity evaluation (`externalReferenceFidelity.test.ts`,
126
+ `cliEvaluateReferenceFidelity.test.ts`), bounded fidelity projection /
127
+ bounded-agent-context integration (`boundedAgentContextProjection.test.ts`,
128
+ `boundedAgentContext.test.ts`), and the end-to-end correction workflow
129
+ (`referenceCorrectionWorkflow.test.ts`, a **browser** test using real
130
+ Chromium). This readiness stage additionally proved every one of these
131
+ capabilities through the **installed npm package**, not just the source
132
+ checkout (see candidate coverage below) — something the pre-existing unit/
133
+ browser suites alone do not prove.
134
+
135
+ ## Command smoke (built CLI, source checkout)
136
+
137
+ `node dist/cli.js --help` and per-command `--help` were exercised for every
138
+ v0.7 and inherited command. All present and exiting 0:
139
+ `import-reference`, `approve-reference`, `evaluate-reference-fidelity`,
140
+ `observe`, `compare`, `approve-baseline`, `save-change-contract`,
141
+ `evaluate-contract`.
142
+
143
+ ## Package content inspection
144
+
145
+ `npm pack --dry-run --json` on `b2286bd`: 207 files, package size 475.4 kB,
146
+ unpacked 2.0 MB. Contents are exactly `dist/**` (built JS/`.d.ts`/source maps),
147
+ `README.md`, `CHANGELOG.md`, `docs/**` (including the nine v0.7 prompt
148
+ implementation reports and the documentation-reconciliation report), and
149
+ `package.json`. No `.my-dev-kit-*` directory, no `node_modules`, no local
150
+ cache, no temporary consumer files, no candidate logs, no secret/private
151
+ file, and no Prompt 1 stash content appears anywhere in the inventory. No
152
+ package inclusion rule was changed — the existing `"files"` policy already
153
+ produces a correct inventory.
154
+
155
+ ## Candidate identity
156
+
157
+ One exact candidate tarball was built from the validated `b2286bd` source
158
+ state and used unmodified across the entire cross-platform matrix.
159
+
160
+ | Field | Value |
161
+ |---|---|
162
+ | Candidate filename | `my-frontend-observer-0.6.0.tgz` |
163
+ | Source commit | `b2286bdc9550d70fa1047a1f732968a8eca46a1e` |
164
+ | Package version | `0.6.0` (unchanged) |
165
+ | **CI-built candidate SHA-256 (the one validated cross-platform)** | `0347b1f3cfd5d311e13b405c0c2fbc2f507e250cb63223d58b4d2d31df029414` |
166
+ | Package contents | identical 207-entry inventory described above |
167
+
168
+ Note: a separate local `npm pack` invocation on the same commit (used for a
169
+ local pre-push packed-smoke dry run under `.my-dev-kit-workflow/readiness/`,
170
+ never pushed or distributed) produced a different SHA
171
+ (`ab8c2b6432285c113026e2d4399f238cb13aea2617bc80ec5bbbe4318cb3189b`) — this is
172
+ expected and immaterial: `npm pack` tarballs are not byte-reproducible across
173
+ separate invocations (gzip/tar timestamp metadata differs) even for identical
174
+ file content. The only SHA-256 that matters for the cross-platform readiness
175
+ claim is the one the CI **candidate** job produced once and that all three
176
+ matrix lanes independently verified — see below.
177
+
178
+ ## Local clean-consumer install / packed smoke
179
+
180
+ The repository's existing packed-observation smoke
181
+ (`scripts/ci/runPackedObservationSmoke.mjs`, extended as described above) was
182
+ run locally against the exact locally-built candidate tarball before pushing.
183
+ It installs the tarball into a fresh, disposable consumer directory (a
184
+ temp directory, per this pre-existing script's own established design —
185
+ matching what CI's `windows-latest`/`ubuntu-latest`/`macos-latest` runners
186
+ also do, since GitHub-hosted runners have no meaningfully more "project-local"
187
+ location for an ephemeral job container), installs Chromium through that
188
+ consumer's own installed Playwright dependency (never the source checkout's),
189
+ and exercises the installed bin/exports directly. Result: `SMOKE PASS`, with
190
+ every `summary.*Ok` flag `true`, including the new `v07PackedSmokeOk`.
191
+
192
+ ## Security validation
193
+
194
+ `npm run test:security` (68/68 passed) plus source/test inspection of v0.7
195
+ security-sensitive surfaces:
196
+
197
+ - **External image file input**: format/dimension detection reads only
198
+ bounded header bytes (`externalReferenceImage.ts`), never decodes pixel
199
+ data; malformed/truncated/oversized inputs are rejected with structured
200
+ diagnostics (`externalReferenceImage.test.ts`).
201
+ - **Region/requirements/applicability config input**: all three CLI file
202
+ loaders (`loadRegionsFile`/`loadRequirementsFile`/`loadApplicabilityFile`)
203
+ own only root-shape/JSON-parse syntax; every content rule (bounds, id
204
+ patterns, category/tolerance/subject validity) is owned by the domain
205
+ validators they call into, covered by
206
+ `externalReferenceRegions.test.ts`/`externalReferenceRequirements.test.ts`/
207
+ `externalReferenceApplicability.test.ts`.
208
+ - **State-file input**: `loadStateFile` is root-shape-only; label pattern and
209
+ `authenticatedState` enum are enforced by `isValidExplicitStateDimensions`
210
+ (`explicitState.test.ts`). The state vocabulary is explicitly documented as
211
+ never a place for credentials/tokens/cookies/session ids.
212
+ - **Bindings file**: `loadBindingsFile` is root-shape-only; every bound-region
213
+ existence/uniqueness/pattern rule is owned by
214
+ `isValidReferenceRuntimeBindingDeclarations`
215
+ (`externalReferenceRuntimeBinding.test.ts`).
216
+ - **Path traversal / operational-path privacy**: the extended smoke itself
217
+ re-verifies (as the pre-existing v0.4/v0.5/v0.6 sections already did) that
218
+ no operational absolute filesystem path (consumer dir, artifact roots,
219
+ config file paths) leaks into any persisted manifest, across the new v0.7
220
+ calls too.
221
+ - **No credential-bearing explicit-state data**: confirmed by the
222
+ `ExplicitStateDimensions`/`ExternalReferenceApplicability` closed field
223
+ vocabularies (`theme`/`applicationState`/`authenticatedState`/`viewport`
224
+ only) — no field exists for tokens/cookies/headers.
225
+ - **Reference/observation artifact immutability**: the extended smoke
226
+ re-hashes the pre-existing baseline observation manifest after running all
227
+ new v0.7 CLI/programmatic calls and confirms it is byte-identical.
228
+ - **No external AI/network upload**: `referenceCorrectionWorkflow.ts`'s own
229
+ module doc explicitly states it "never calls a remote AI provider"; grep of
230
+ `src/` confirms no `fetch`/network client exists outside the browser
231
+ automation and observer's own disposable local HTTP fixture use in tests.
232
+ - **No observer source editing**: `prepareReferenceCorrection`/
233
+ `reviewReferenceCorrectionAttempt` are pure, synchronous, in-memory
234
+ functions with no filesystem write capability — they return structured
235
+ results only; source-editing is explicitly the external actor's own
236
+ separate responsibility per the module's documented contract.
237
+
238
+ No security failure, resolved or unresolved, was found.
239
+
240
+ ## Cross-platform CI result
241
+
242
+ - **Run**: [34054085344](https://github.com/dailephd/my-frontend-observer/actions/runs/34054085344) ("Pre-release readiness"), triggered by the push of `validation/v0.7-pre-release` at commit `b2286bd`.
243
+ - **Candidate job** ("Package exact candidate (Linux, Node 24)"): **success**, 1m34s. Node `v24.20.0`, npm `11.19.0`. Reproduced the exact same test counts as local: 1000 unit / 124 browser / 5+63 security. Produced exactly one tarball and one SHA-256.
244
+ - **Windows matrix** (`windows-latest exact-candidate smoke`): **success**, 1m22s. Node `v24.19.0`.
245
+ - **Linux matrix** (`ubuntu-latest exact-candidate smoke`): **success**, 54s. Node `v24.20.0`.
246
+ - **macOS matrix** (`macos-latest exact-candidate smoke`): **success**, 36s. Node `v24.20.0`.
247
+
248
+ ### Same-candidate hash verification
249
+
250
+ The candidate job produced exactly one tarball and computed its SHA-256 once
251
+ (`0347b1f3cfd5d311e13b405c0c2fbc2f507e250cb63223d58b4d2d31df029414`). Each
252
+ matrix lane downloaded that same uploaded `candidate-package` artifact and
253
+ independently recomputed its SHA-256 before running any smoke step:
254
+
255
+ ```
256
+ windows-latest: expected=0347b1f3... actual=0347b1f3... (match)
257
+ ubuntu-latest: expected=0347b1f3... actual=0347b1f3... (match)
258
+ macos-latest: expected=0347b1f3... actual=0347b1f3... (match)
259
+ ```
260
+
261
+ No matrix lane ran `npm pack` itself — the workflow's `matrix-smoke` job has
262
+ no packaging step at all, only a download-and-verify step followed by the
263
+ smoke script. Same-candidate architecture confirmed intact.
264
+
265
+ ### v0.7 cross-platform proof
266
+
267
+ All three matrix lanes' `smoke-summary-<os>.json` artifacts carry
268
+ `"v07PackedSmokeOk": true` plus every individual v0.7 flag true
269
+ (`packedImportReferenceOk`, `packedApproveReferenceOk`,
270
+ `packedExplicitStateOk`, `packedReferenceFidelityPassOk`,
271
+ `packedReferenceFidelityFailOk`, `packedProgrammaticFidelityOk`,
272
+ `packedPrepareReferenceCorrectionOk`,
273
+ `packedReviewReferenceCorrectionAttemptOk`), confirmed directly from each
274
+ job's raw log output (not merely inferred from the job's green checkmark).
275
+
276
+ ### v0.1–v0.6 regression proof (same candidate, same run)
277
+
278
+ The same three logs also carry the pre-existing v0.1–v0.6 flags unchanged and
279
+ still true: `legacyCssObservationPassed`, `windowScrollScenarioPassed`,
280
+ `targetScrollScenarioPassed` (v0.1/v0.3), semantic-locator target coverage
281
+ (v0.2), `comparableCompareOk`/`incomparableCompareOk` (v0.4),
282
+ `packedApproveBaselineOk`/`packedSaveChangeContractOk`/`packedEvaluatePassOk`
283
+ (v0.5), `v06PackedSmokeOk` (v0.6). No old assertion was removed or weakened to
284
+ make room for the new v0.7 section — it was appended.
285
+
286
+ ## Known flake investigation
287
+
288
+ Prompt 6 previously observed one unrelated browser-test flake that passed on
289
+ rerun; Prompts 7/8 reported clean runs. No test failure of any kind occurred
290
+ during this readiness stage, locally or in CI — nothing required
291
+ investigation or rerun.
292
+
293
+ ## Ecosystem documentation
294
+
295
+ `docs/ecosystem/TOOL_ECOSYSTEM_REFERENCE.txt` and
296
+ `docs/ecosystem/WORKFLOW_PROMPT_ASSEMBLY_RULES.txt` do not exist in this
297
+ repository. Ecosystem docs inspected; no update needed.
298
+
299
+ ## Report/commit discipline
300
+
301
+ - `VALIDATED_CANDIDATE_HEAD` = `b2286bdc9550d70fa1047a1f732968a8eca46a1e` — this is the exact commit the successful cross-platform CI run (34054085344) validated.
302
+ - `REPORT_COMMIT` = the commit that adds this file, made after the CI run completed successfully, containing only this report — no product or readiness-infrastructure behavior changes. Per the task's own instruction, the readiness workflow is not re-run a second time merely to fold the report commit's own SHA into itself.
303
+
304
+ ## Remaining risks
305
+
306
+ - The packed-smoke script's temporary consumer install directory uses
307
+ `node:os`'s `tmpdir()` rather than a project-local path (a pre-existing
308
+ characteristic of `scripts/ci/runPackedObservationSmoke.mjs`, unchanged by
309
+ this readiness stage — modifying it was out of scope per the instruction
310
+ not to build a second, parallel package-smoke architecture, and CI's own
311
+ hosted runners have no more "project-local" location for an ephemeral job
312
+ container in any case). This does not affect the truth of any readiness
313
+ claim in this report.
314
+ - `package.json`'s `engines.node` requires `>=24` with no upper bound;
315
+ runtime drift on future Node majors is a normal, unremarkable release-prep
316
+ concern, not a v0.7-specific risk.
317
+ - No new product defect was discovered during this readiness stage.
318
+
319
+ ## Final verdict
320
+
321
+ **`PASS_READY_FOR_RELEASE_PREP`**
322
+
323
+ All conditions in the task's PASS-verdict checklist are satisfied: audited
324
+ baseline present, clean install, typecheck, lint, full unit tests (1000),
325
+ full browser tests (124), security tests (68), build, docs check, diff
326
+ check, and pack dry-run all pass; one exact candidate tarball was built and
327
+ its SHA-256 recorded; a clean consumer installed it and the installed-
328
+ candidate smoke passed, meaningfully exercising the full v0.7 public surface
329
+ (CLI + programmatic) in addition to preserving v0.1–v0.6 regression coverage;
330
+ GitHub Actions' candidate job and all three (Windows/Linux/macOS) matrix
331
+ lanes passed, each independently verifying the identical candidate SHA-256
332
+ with no lane building a replacement tarball; no unresolved security,
333
+ product, or coverage-gap issue exists; the package version remains `0.6.0`;
334
+ no tag, release, or publish action occurred; and the repository's tracked
335
+ state is clean at completion. This means the v0.7 implementation is **ready
336
+ for release preparation** — not that release preparation has already
337
+ happened.
@@ -0,0 +1,223 @@
1
+ # v0.7 Prompt 5 — Explicit Reference-Region ↔ Runtime-Target Binding
2
+
3
+ **VERDICT: PASS_V0_7_REFERENCE_BINDING_PROMPT5**
4
+
5
+ ## Repository / branch / heads
6
+
7
+ - Repository: `my-frontend-observer` (path: `Z:\Users\newuser\Projects\my-frontend-observer`)
8
+ - Branch: `implementation/v0.7-reference-binding`, branched from the exact completed Prompt 4 HEAD
9
+ - Starting HEAD (this prompt's branch point): `023feccac2b4255a119282d359782691b4734bce` (Prompt 4 report commit)
10
+ - Prompt 4 base HEAD confirmed to contain both required commits: `4da60be` (implementation) and `023fecc` (report) — verified via `git log --oneline` before branching.
11
+ - Implementation commit (this prompt): `74cc148f6b4ccda1c2a394634a8e9d5de26285dd` — "Add v0.7 Prompt 5 explicit reference-region <-> runtime-target binding"
12
+ - Ending HEAD (after this report is committed): the report commit that follows this file's commit.
13
+
14
+ ## Git status
15
+
16
+ Preflight (`git status --short`) showed a clean working tree on `implementation/v0.7-reference-compatibility` at the exact Prompt 4 report HEAD; `git stash list` showed exactly the one preserved Prompt 1 stray-fork-writes entry. The branch was created from that HEAD with `git checkout -b implementation/v0.7-reference-binding` and ancestry verified with `git merge-base --is-ancestor 023fecc HEAD`. No unrelated dirty state was present at any point; no reset/clean/discard operation was used; the Prompt 1 stash was neither applied nor dropped. Post-implementation `git status --short` is clean except for this report file (staged and committed separately, per convention).
17
+
18
+ ## Tooling
19
+
20
+ - Resolved latest published `@dailephd/my-dev-kit`: `1.12.3` (via `npm view @dailephd/my-dev-kit version`), pinned exactly via `npx -y @dailephd/my-dev-kit@1.12.3`.
21
+ - Fresh Prompt 5 repository index built under a repository-local root (per this prompt's "project-contained workflow state" requirement, not `C:\`): `.my-dev-kit-context/index-prompt5/` (`manifest.json`, `symbol-index.json`, `code-graph.json`, `call-graph.json`; 56 files, 851 symbols indexed). This index was not reused from Prompt 1–4's indexes — a fresh retrieval was performed at execution start.
22
+ - `.gitignore` extended with `.my-dev-kit-context/` and `.my-dev-kit-workflow/` (alongside the pre-existing `.my-dev-kit/`/`.my-dev-kit-orchestrator/` entries) so this and future prompts' workflow-owned state never appears as stageable.
23
+
24
+ ## Prompt 1–4 contracts verified
25
+
26
+ Read directly (source, not the fresh index's summaries alone) before writing any code:
27
+
28
+ - `src/domain/externalReference.ts` / `externalReferenceIdentity.ts` — confirmed `ExternalReferenceArtifact`'s `regions?`/`requirements?`/`applicability?` shape, both lifecycle variants, and `isValidExternalReferenceArtifact`'s existing structural gate (reused directly, not reimplemented).
29
+ - `src/domain/externalReferenceRegions.ts` — confirmed `ReferenceRegion.id` (Prompt 2's region identity: no separate identity-hashing function exists for regions, just the authored `id` string with `REFERENCE_REGION_ID_PATTERN` and case-insensitive uniqueness) — reused verbatim as the reference-side half of a binding declaration.
30
+ - `src/domain/externalReferenceRequirements.ts` — confirmed the exact precedent for "a reference to an unknown region id is a structural validation failure at authoring time, not a per-item unavailable result" (`regionIds`/`byId` lowercase-keyed lookups, `isValidReferenceRequirements` rejecting the whole collection on an unknown region reference), and the "no two requirements may share the same structural subject" duplicate/conflict rule — both reused as direct design precedent for binding-declaration validation.
31
+ - `src/domain/externalReferenceCompatibility.ts` (Prompt 4) — confirmed `evaluateReferenceCandidateCompatibility`'s exact signature and `ReferenceCandidateCompatibilityResult` shape; reused verbatim as this prompt's compatibility gate.
32
+ - `src/domain/comparisonEngine.ts` (v0.4) — confirmed the module-private `targetPresence(record): 'matched'|'not-found'|'ambiguous'|'unavailable'` helper, already the canonical rule v0.4's own before/after target comparison uses to read a `TargetEvidenceRecord`'s resolution outcome.
33
+ - `src/domain/schema.ts` (v0.1/v0.2) — confirmed `TargetSelectionStatus = 'matched'|'not-found'|'ambiguous'|'unavailable'`, `TargetResolution`, `TargetEvidenceRecord` (keyed by exact configured target name in `ObservationArtifact.targetEvidence`), and `TargetVisibility` (a wholly separate concept from `TargetSelectionStatus` — visibility is never one of the four resolution states).
34
+ - `src/request/request.ts` (v0.1/v0.2) — confirmed `NamedTarget { name, locators }` as the stable observer-owned runtime target identity, `TARGET_NAME_RE = /^[A-Za-z0-9_-]{1,64}$/` (private, mirrored independently rather than imported), and the case-insensitive target-name-resolution convention already used for `target-scroll-by`.
35
+ - `src/domain/boundedAgentContextCorrelation.ts` (v0.6) — read in full; confirmed the uncertainty-handling discipline (never hide competing candidates, never guess through ambiguity, deterministic candidate/target ordering by sorted id rather than input order, count-based status derivation: zero candidates → `unavailable`, one → `correlated`, more than one → `ambiguous`) reused as *architectural discipline* only — v0.6's own `correlated`/`ambiguous`/`unavailable` correlation-status vocabulary was deliberately **not** reused verbatim, since it describes a different evidence boundary (ranking static candidates for one runtime target) than binding (resolving one runtime target's own existence for one declared region correspondence).
36
+
37
+ ## v0.2 runtime-target precedent
38
+
39
+ The stable runtime target identity is `NamedTarget.name` (a bounded `^[A-Za-z0-9_-]{1,64}$` label), matched against `ObservationArtifact.requestConfig.targets` and used to key `ObservationArtifact.targetEvidence`. This prompt binds only to that name — never to a CSS selector, a Playwright locator, a DOM node handle, a source file, a React component name, or a my-dev-kit node id. Target-name matching in `evaluateReferenceRuntimeBindings` is case-insensitive, mirroring the exact convention already used for `target-scroll-by` target resolution in `request/request.ts`; the exact configured `name` (original case) is then used to index `targetEvidence`, matching how that record is actually keyed by `src/browser/evidenceCapture.ts`.
40
+
41
+ ## v0.6 uncertainty precedent
42
+
43
+ Reused as architectural discipline (never guess through ambiguity, never silently prefer a "first" candidate/result, deterministic ordering by declared/sorted identity rather than input order, explicit unavailable-vs-ambiguous distinction) — not as a literal status-vocabulary reuse. `evaluateReferenceRuntimeBindings` never collapses an ambiguous v0.2 target resolution into `bound`, and never fabricates a binding when the underlying evidence is missing.
44
+
45
+ ## Binding model
46
+
47
+ One new pure domain module: `src/domain/externalReferenceRuntimeBinding.ts`.
48
+
49
+ ```ts
50
+ interface ReferenceRuntimeBindingDeclaration {
51
+ referenceRegion: string; // Prompt 2 ReferenceRegion.id
52
+ runtimeTarget: string; // v0.2 NamedTarget.name
53
+ }
54
+
55
+ function isValidReferenceRuntimeBindingDeclarations(
56
+ value: unknown,
57
+ reference: ExternalReferenceArtifact,
58
+ ): { valid: true } | { valid: false; reason: string };
59
+
60
+ function evaluateReferenceRuntimeBindings(
61
+ reference: ExternalReferenceArtifact,
62
+ candidate: ObservationArtifact,
63
+ declarations: readonly ReferenceRuntimeBindingDeclaration[],
64
+ ): { ok: true; evaluation: ReferenceRuntimeBindingEvaluation } | { ok: false; reason: string };
65
+ ```
66
+
67
+ The binding declaration is explicit user/configuration input at every point — the module contains no code path that derives a correspondence from geometry, pixel content, matching name strings, matching text, or source code. A reference region id and a runtime target name that happen to share the same string value bind to each other only when an explicit declaration says so (verified directly by a dedicated test comparing the same observation/reference pair with and without the declaration).
68
+
69
+ ## Exact status vocabulary
70
+
71
+ `REFERENCE_RUNTIME_BINDING_STATUSES = ['bound', 'ambiguous', 'unavailable'] as const`. No fourth "incompatible" status was added — per the task's own guidance (§14), Prompt 4's compatibility is represented separately (see below), never folded into a binding-local status enum.
72
+
73
+ Reason codes (present only when `status !== 'bound'`): `runtime-target-not-configured`, `runtime-target-not-found`, `runtime-target-ambiguous`, `runtime-target-evidence-unavailable`.
74
+
75
+ ## Compatibility-gating behavior
76
+
77
+ `evaluateReferenceRuntimeBindings` calls `evaluateReferenceCandidateCompatibility(reference, candidate)` exactly once, before evaluating any individual declaration. If the returned `compatibility.state === 'incomparable'`, the function returns `ok: true` with `bindings: []` and the full `compatibility` result embedded in `ReferenceRuntimeBindingEvaluation.compatibility` — the caller reads the blocker from that field. No per-declaration result is fabricated in this case (verified by behavior-F test: an incompatible viewport pair produces zero bindings, never a bound result). When `compatibility.state` is `comparable` or `comparable-with-warnings`, every declaration is evaluated normally. Compatibility rules (viewport/theme/application-state/authenticated-state comparison) are never recomputed or duplicated inside this module.
78
+
79
+ ## Reference-region identity behavior
80
+
81
+ Reused exactly as Prompt 2 defined it: `ReferenceRegion.id`, matched case-insensitively (mirroring the existing region-uniqueness/requirement-region-reference convention). No new reference-region identity system was created. A declaration naming a `referenceRegion` not present in `reference.regions` (or a reference with no `regions` field at all) fails the **entire** evaluation closed at the structural-validation stage — `evaluateReferenceRuntimeBindings` returns `ok: false` before a candidate observation is even consulted, mirroring Prompt 3's exact "unknown region reference is a structural authoring-time failure" precedent for requirements.
82
+
83
+ ## Runtime-target identity behavior
84
+
85
+ Reused exactly as v0.2 defined it: `NamedTarget.name`, matched case-insensitively against `candidate.requestConfig.targets`, then the exact configured name is used to index `candidate.targetEvidence`. Runtime-target *availability* (as opposed to reference-region *existence*) is evaluated per-candidate, inside `evaluateReferenceRuntimeBindings` itself, not during the candidate-independent structural validation pass — the same declaration can legitimately be `bound` against one candidate and `unavailable` against another.
86
+
87
+ ## Target-resolution-state handling
88
+
89
+ `targetPresence` (v0.4 `comparisonEngine.ts`, additively exported this prompt alongside the already-exported `assessOptionalComparabilityDimension`) is the single reused rule for reading a `TargetEvidenceRecord`'s resolution:
90
+
91
+ | `targetPresence` outcome | Binding status | Reason code |
92
+ |---|---|---|
93
+ | `matched` | `bound` | — |
94
+ | `ambiguous` | `ambiguous` | `runtime-target-ambiguous` |
95
+ | `not-found` | `unavailable` | `runtime-target-not-found` |
96
+ | `unavailable` (no usable resolution evidence, or no record at all) | `unavailable` | `runtime-target-evidence-unavailable` |
97
+
98
+ A fifth situation exists only at the binding-evaluation boundary itself, not inside `targetPresence`: a declared `runtimeTarget` that was never part of the candidate's own `requestConfig.targets` at all → `unavailable` / `runtime-target-not-configured`, resolved without ever dynamically searching the page (the evaluator consumes only the already-captured `ObservationArtifact`).
99
+
100
+ ## Hidden-target decision
101
+
102
+ A uniquely resolved (`matched`) but hidden target (`TargetVisibility.visible === false`) is still reported `bound` — visibility is carried only as provenance (`targetVisible`) and never changes `status`. Rationale, documented in the module and in `docs/CONTRACTS.md`: binding identity ("does a stable correspondence exist") and fidelity evaluability ("can this evidence actually be used to check the design") are distinct questions; this prompt answers only the former, leaving the latter to Prompt 6. Verified by a dedicated test (`Q: a hidden but uniquely resolved runtime target is still reported bound, with targetVisible: false as provenance`).
103
+
104
+ ## Duplicate/conflicting binding behavior
105
+
106
+ No two declarations may name the same `referenceRegion` (case-insensitively), whether their `runtimeTarget` values agree (an exact duplicate) or disagree (a conflict) — both fail the whole batch identically at structural-validation time, `ok: false`, never silently resolved by keeping the first declaration. This mirrors Prompt 3's "no two requirements may share the same structural subject, regardless of category" rule exactly. Verified by dedicated tests for both the exact-duplicate case (I) and the conflicting-target case (J).
107
+
108
+ ## Multiple-regions-to-one-target decision
109
+
110
+ **Allowed, deliberately.** Several distinct reference regions may each declare a binding to the same `runtimeTarget` (e.g. two design sub-regions, such as a header's logo area and its nav area, both corresponding conceptually to one runtime container element). This is documented as a legitimate correspondence, unlike the reverse (one region needing several runtime targets), which is prohibited because it would be inherently ambiguous which target represents that region — the "one region, one explicit primary target" rule from §13. Verified by a dedicated test (K).
111
+
112
+ ## Bounds
113
+
114
+ `MAX_REFERENCE_RUNTIME_BINDINGS = 20`, mirroring `MAX_REFERENCE_REGIONS`'s existing bound — a binding-declaration collection is authoring input over the same region set, so the same cap applies. Independently owned (not imported), consistent with the repository's established "coincidentally equal, independently owned bound" convention (e.g. `MAX_REFERENCE_REGIONS`/`MAX_TARGETS` already share the value 20 without being structurally coupled). Verified: exactly 20 declarations accepted, 21 rejected.
115
+
116
+ ## Deterministic ordering
117
+
118
+ `bindings` in the evaluation result preserves the authored order of the `declarations` array passed in — never a sort by any derived key, mirroring the "authored order is semantic" convention already established for regions (Prompt 2) and requirements (Prompt 3). Verified by a dedicated test asserting result order matches declaration order even when it does not match the reference's own region-authoring order.
119
+
120
+ ## Identity decision
121
+
122
+ **No new identity-hashing function was introduced.** Unlike `buildRequestIdentity`/`buildExternalReferenceRequestIdentity`, no deterministic content-hash identity is computed for a binding declaration or its evaluated result. This mirrors Prompt 4's own `ReferenceCandidateCompatibilityResult`, which took the identical approach: provenance is carried as plain, already-deterministic fields (`referenceId`, `referenceRequestId`, `candidateObservationId`, `candidateRequestId`, plus each result's own `referenceRegion`/`runtimeTarget`) rather than a fifth hashing convention for a value this prompt never persists and never looks up by id. Because no identity function exists, path-independence (test L in the task's behavior model) holds trivially — there is no file-loading code in this prompt at all (see CLI decision below), so no path could ever reach identity even indirectly.
123
+
124
+ ## Persistence decision
125
+
126
+ **No persisted artifact family was introduced.** `evaluateReferenceRuntimeBindings` is a pure, synchronous, on-demand function over an already-persisted `ExternalReferenceArtifact`, an already-persisted `ObservationArtifact`, and an in-memory declaration collection — it produces no `ExternalReferenceBindingArtifact` or equivalent. Rationale (same reasoning Prompt 4 already applied to its own compatibility result): the result is cheap to recompute deterministically from its three inputs, and persisting it would invite drift (a re-imported reference or re-observed candidate could silently disagree with a stale persisted binding record) with no corresponding benefit at this stage. This decision may be revisited only if Prompt 6's architecture proves persistence necessary — not assumed here.
127
+
128
+ ## Reference / observation artifact immutability
129
+
130
+ Neither `ExternalReferenceArtifact` nor `ObservationArtifact` gained any new field in this prompt, and `evaluateReferenceRuntimeBindings` never mutates either input (verified by a dedicated deep-equality-snapshot test, N, covering the reference, the candidate, and the declaration input array all three). A design reference remains evaluable against multiple future candidates; a candidate observation remains evaluable against multiple future references — binding results are kept as downstream, candidate-specific, reference-specific derived evidence, never embedded back into either source artifact.
131
+
132
+ ## Public / programmatic interface
133
+
134
+ Exported from `src/index.ts` (additive):
135
+ - Types: `ReferenceRuntimeBindingStatus`, `ReferenceRuntimeBindingReasonCode`, `ReferenceRuntimeBindingDeclaration`, `ReferenceRuntimeBindingValidationResult`, `ReferenceRuntimeBindingResult`, `ReferenceRuntimeBindingEvaluation`, `EvaluateReferenceRuntimeBindingsResult`.
136
+ - Values: `RUNTIME_TARGET_NAME_PATTERN`, `MAX_REFERENCE_RUNTIME_BINDINGS`, `REFERENCE_RUNTIME_BINDING_STATUSES`, `REFERENCE_RUNTIME_BINDING_REASON_CODES`, `isValidReferenceRuntimeBindingDeclarations`, `evaluateReferenceRuntimeBindings`.
137
+ - Additionally, `TargetPresence`/`targetPresence` (previously module-private in `comparisonEngine.ts`) are now additively exported, since this new module reuses that exact function rather than duplicating its logic.
138
+
139
+ No internal helper clutter is exported (`findConfiguredTargetName`, `evaluateOneBinding`, `isValidBindingDeclarationShape` all remain module-private).
140
+
141
+ ## CLI changes
142
+
143
+ **None.** Per the task's explicit guidance (§37: "Do not add a standalone CLI command merely for symmetry... Prompt 6 may become the first public consumer"), no CLI command or config-file loader was added this prompt. The full capability is exposed only through the programmatic API above. `docs/COMMANDS.md` was therefore not touched.
144
+
145
+ ## Files changed
146
+
147
+ New:
148
+ - `src/domain/externalReferenceRuntimeBinding.ts`
149
+ - `tests/unit/externalReferenceRuntimeBinding.test.ts`
150
+
151
+ Modified:
152
+ - `src/domain/comparisonEngine.ts` (additively exported `targetPresence`/`TargetPresence`, previously module-private; zero behavior change)
153
+ - `src/index.ts` (public export surface for the above)
154
+ - `docs/ARCHITECTURE.md`, `docs/CONTRACTS.md`, `docs/WORKFLOWS.md`
155
+ - `.gitignore` (added `.my-dev-kit-context/`, `.my-dev-kit-workflow/`)
156
+
157
+ ## Tests
158
+
159
+ 889 unit tests total (857 pre-existing + 32 new), all pure domain-level tests — zero Chromium launches for binding evaluation itself, per the task's explicit requirement. New coverage in `tests/unit/externalReferenceRuntimeBinding.test.ts` includes:
160
+
161
+ - `isValidReferenceRuntimeBindingDeclarations`: valid single/empty declaration, non-array rejection, exact-bound acceptance (20) and one-over-bound rejection (21), malformed shape rejection (missing field/wrong type/unknown field), unknown reference region (behavior B), reference with no regions at all (behavior O), exact-duplicate rejection (behavior I), conflicting-target rejection (behavior J), multiple-regions-to-one-target acceptance (behavior K), unused-region tolerance (behavior P), case-insensitive region matching.
162
+ - `evaluateReferenceRuntimeBindings`: valid binding with differing ids (behaviors A/H), same-string-ids-require-explicit-declaration (behavior G, both with and without the declaration), unknown-region whole-batch failure (behavior B), unknown/not-configured runtime target (behavior C), ambiguous runtime target (behavior D), not-found vs. evidence-unavailable distinction, incompatible reference/candidate blocks all bindings (behavior F), matching compatibility permits evaluation, hidden-target bound-with-provenance (behavior Q), deterministic authored-order preservation and pure-function repeatability (behavior M), full three-input immutability (behavior N), case-insensitive runtime-target-name resolution, full provenance carry-through, fail-closed on a structurally invalid reference or candidate artifact, and absence of any source-ownership-style field in the result (`sourceOwner`/`sourceFile`/`component`/`symbol`/`causedBy`).
163
+
164
+ ## Validation results
165
+
166
+ All commands run from the repository root, after the implementation commit:
167
+
168
+ - `npm run typecheck` — pass, zero errors.
169
+ - `npm run lint` — pass, zero errors/warnings.
170
+ - `npm test` — 46 test files, 889 tests, all pass.
171
+ - `npm run build` — pass, clean `tsc` compile.
172
+ - `npm run check:docs` — pass (17 required files present, `ROADMAP.md` format intact — no implementation batches added).
173
+ - `git diff --check` — exit 0, no whitespace errors.
174
+ - `npm pack --dry-run` — pass; `dist/domain/externalReferenceRuntimeBinding.{js,d.ts,js.map}` confirmed present in the tarball listing (public exports changed, so this was run per the task's requirement).
175
+ - `npm run test:security` — pass (5 + 63 = 68 tests: `policy.test.ts` + real-Chromium `chromiumAdapter.test.ts`), run because a new public input surface (`ReferenceRuntimeBindingDeclaration`) was added.
176
+ - `npm run test:browser` — pass (9 files, 120 tests, real Chromium), run as full regression confirmation per established repository policy, even though Prompt 5 itself has no Chromium dependency.
177
+
178
+ ## Regression results
179
+
180
+ - Prompt 1 artifact/lifecycle: unaffected — `externalReference.ts` untouched this prompt.
181
+ - Prompt 2 regions/relationships: unaffected — `externalReferenceRegions.ts`/`externalReferenceRegionRelationships.ts` untouched; `REFERENCE_REGION_ID_PATTERN` only imported, never modified.
182
+ - Prompt 3 requirements/adequacy: unaffected — `externalReferenceRequirements.ts` untouched.
183
+ - Prompt 4 state/compatibility: unaffected — `externalReferenceCompatibility.ts`, `explicitState.ts`, `externalReferenceApplicability.ts` untouched; `evaluateReferenceCandidateCompatibility` called, never modified.
184
+ - v0.2 runtime target identity/resolution: unaffected — `request/request.ts`, `schema.ts`, `browser/evidenceCapture.ts` untouched.
185
+ - v0.4 comparison: unaffected in behavior — `comparisonEngine.ts`'s only change is exporting a previously-private function (`targetPresence`) verbatim; every existing caller and every existing test of `evaluateComparability`/`compareObservations`/`compareTargetConfiguration` continues to pass unchanged.
186
+ - v0.5 contracts: unaffected — no file in `frontendContracts*.ts` touched.
187
+ - v0.6 runtime/static correlation: unaffected — `boundedAgentContext*.ts` untouched; its status vocabulary/discipline was read for precedent only, never imported or modified.
188
+ - Full unit (889/889), browser (120/120), and security (68/68) suites all pass with zero regressions.
189
+
190
+ ## Security impact
191
+
192
+ - No new external input surface beyond an in-memory, caller-supplied declaration array (no file, no CLI flag, no network call in this prompt) — the smallest possible surface, since no CLI/config-file loader was added.
193
+ - `evaluateReferenceRuntimeBindings` performs no filesystem access, no network access, and no browser/Chromium invocation of any kind.
194
+ - `test:security` (policy + real-Chromium adapter tests) re-run and passing, confirming no regression to the existing safety/navigation policy surface (untouched by this prompt).
195
+
196
+ ## Documentation changes
197
+
198
+ - `docs/CONTRACTS.md` — new "v0.7 Prompt 5 explicit reference-region ↔ runtime-target binding" section (full type shapes, key rules, status-mapping table equivalent in prose, hidden-target/duplicate/multiple-regions decisions, persistence/identity decisions, CLI-surface decision).
199
+ - `docs/ARCHITECTURE.md` — new paragraph in the "Planned v0.7–v0.10" section describing the Prompt 5 module addition, its reuse of Prompt 4's compatibility gate and v0.4's `targetPresence`, and its architectural-discipline-only (not vocabulary) reuse of v0.6's uncertainty handling.
200
+ - `docs/WORKFLOWS.md` — "Current external-reference foundation workflow" retitled to "Prompts 1-5" and extended with a paragraph describing `evaluateReferenceRuntimeBindings`.
201
+ - `docs/COMMANDS.md` — not touched (no CLI surface change this prompt).
202
+
203
+ ## Tooling incidents
204
+
205
+ None. No orchestrator was invoked (direct-implementation mode used throughout, consistent with Prompts 2–5); no background/speculative subagent writes occurred; the Prompt 1 stray-fork-writes stash remains untouched, unapplied, and unmined as precedent.
206
+
207
+ ## Out-of-scope confirmation
208
+
209
+ This prompt implements no automatic target matching, no computer vision, no screenshot segmentation, no OCR, no fuzzy matching, no geometry-based matching, no source-correlation changes, no source ownership, no reference/candidate geometry delta, no spacing delta, no relationship fidelity evaluation, no selected-requirement evaluation, no fidelity PASS/FAIL, no style fidelity, no image similarity, no bounded correction packet, no coding-agent context changes or invocation, no source edits, no correction loop, no viewer, and no annotation. `evaluateReferenceRuntimeBindings` reads only `reference.regions` (for structural validation), `reference.applicability` (via the reused compatibility gate), and `candidate.requestConfig.targets`/`candidate.targetEvidence` — it never reads `reference.requirements`, never compares geometry, and never touches source code or my-dev-kit retrieval of any kind.
210
+
211
+ ## Known limitations
212
+
213
+ - A binding declaration supports exactly one `runtimeTarget` per `referenceRegion` — there is no "candidate alternatives" mechanism (deliberately; the task's own guidance treats this as the smallest, cleanest representation, and any future need for ranked/multiple candidate targets per region is left to a later prompt to design explicitly, not improvised here).
214
+ - No CLI/config-file surface exists yet for authoring binding declarations outside of direct programmatic use — deferred to Prompt 6 per the task's own guidance.
215
+ - `targetVisible` provenance is populated only when the underlying `TargetVisibility` evidence is itself available; a `bound` result for a target whose visibility evidence is unavailable simply omits the field rather than guessing a value.
216
+
217
+ ## Remaining risks
218
+
219
+ - None identified that block this prompt's own scope. The primary forward consideration for Prompt 6 (structured fidelity evaluation) is how it will consume `ReferenceRuntimeBindingEvaluation.bindings` together with Prompt 3's per-requirement expectations to determine which selected requirements have sufficient bound evidence for evaluation — flagged for that prompt's own precedent review, not preempted here.
220
+
221
+ ## Exact next action
222
+
223
+ v0.7 Prompt 6 — structured reference-vs-candidate fidelity evaluation.