@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,202 @@
1
+ # Development
2
+
3
+ The released v0.8.1 workflow is published as
4
+ `@dailephd/my-frontend-observer@0.8.1` (CLI `my-frontend-observer`).
5
+
6
+ The v0.8.1 workflow is exercised through unit and real-Chromium tests. Project fixtures use `init`, `capture baseline`, and `check`; coding-agent consumers use bounded `check --json`. `tests/browser/projectCheckWorkflow.test.ts` covers REVIEW_REQUIRED, contract FAIL-to-PASS, reference FAIL/PASS/BLOCKED, incomparable BLOCKED, current history, and contained acceptance paths. `scripts/ci/runPackedViewerSmoke.mjs` is the single installed-package viewer/project-workflow smoke owner: it repeats REVIEW_REQUIRED and unchanged-contract FAIL-to-PASS before alias-aware viewer proof. Run the full unit, browser, security, build, documentation, and packed-consumer validations before release readiness.
7
+
8
+ Install the current scaffold with `npm install`. Node.js 24+ is required.
9
+
10
+ Since Batch 2, the package depends on `playwright` for the Chromium browser
11
+ boundary. Install the browser binary once per machine with:
12
+
13
+ ```powershell
14
+ npx playwright install chromium
15
+ ```
16
+
17
+ The applicable foundation validation chain is:
18
+
19
+ ```powershell
20
+ npm run typecheck
21
+ npm run lint
22
+ npm test
23
+ npm run test:browser
24
+ npm run build
25
+ npm run check:docs
26
+ npm pack --dry-run
27
+ ```
28
+
29
+ `npm test` runs the fast unit suite only (`tests/unit/`; as of v0.8 Batch 8,
30
+ 1156 passing tests across 63 files, including the v0.6 bounded-agent-context
31
+ projection/correlation and v0.8 viewer-server coverage). `npm run
32
+ test:browser` runs the real-Chromium integration suite (`tests/browser/`; as
33
+ of v0.8 Batch 8, 178 passing tests across 19 files, including the v0.8
34
+ viewer/PWA real-browser proof) against deterministic local fixtures under
35
+ `tests/fixtures/` and requires the Chromium binary above to be installed
36
+ first; it is kept out of `npm test` because it launches a real browser and
37
+ is slower. Exact counts drift as the suite grows - run the commands above
38
+ for the current numbers rather than trusting this document.
39
+
40
+ ROADMAP v0.1 and Project Milestone 1 require browser-level validation once the
41
+ observation capability is planned and implemented. Static checks must not later
42
+ be substituted for that required browser evidence. `npm run test:browser` is
43
+ that required browser evidence and covers the full source-checkout v0.1
44
+ workflow end to end: page/target evidence, atomic artifact persistence, and
45
+ the real `observe` CLI (including a built `node dist/cli.js observe ...`
46
+ smoke run) are all implemented and covered, including a deterministic
47
+ real-navigation-failure case (distinct from a readiness timeout or a
48
+ pre-launch safety rejection).
49
+
50
+ For maintainers validating the package boundary itself (not required for
51
+ routine development): `npm pack --dry-run` inspects the tarball contents;
52
+ installing the real tarball (`npm pack --json`, then `npm install
53
+ <tarball>` in a clean temporary directory) and running the installed bin
54
+ against a disposable local HTTP target is the way to confirm the packaged
55
+ CLI performs a real observation independent of the source checkout. This is
56
+ local package validation only, not a release procedure.
57
+
58
+ `npm run test:security` runs only the safety-relevant subset of the suite
59
+ (`tests/unit/policy.test.ts` plus the real-Chromium enforcement cases in
60
+ `tests/browser/chromiumAdapter.test.ts`) - a discoverable entry point for
61
+ security review tooling, not a replacement for `npm test`/`npm run
62
+ test:browser`.
63
+
64
+ `scripts/ci/runPackedObservationSmoke.mjs <tarball-path>` is the same
65
+ packed-candidate smoke described above, packaged as a reusable script: it
66
+ installs the given tarball into a fresh temporary consumer directory,
67
+ installs Chromium via that consumer's own Playwright dependency, runs the
68
+ installed bin against a disposable local HTTP target it creates itself, and
69
+ validates the resulting artifact - exiting nonzero on any contract failure.
70
+ It is what `.github/workflows/pre-release-readiness.yml` runs identically on
71
+ Windows, Linux, and macOS against one shared candidate tarball (see
72
+ `docs/CI_CD.md`); it can also be run locally the same way the workflow runs
73
+ it. It is readiness/CI infrastructure only, not part of the published
74
+ package and never imported by production code. In the same run it
75
+ exercises the legacy CSS-shorthand `--target` packed-observation shape,
76
+ the structured semantic `--targets-file` shape, a `window-scroll-by`
77
+ scroll scenario, and a `target-scroll-by` scroll scenario - see
78
+ `docs/CI_CD.md` for the current readiness coverage.
79
+
80
+ `scripts/dev/builtCliTargetsFileSmoke.mjs` is a separate, narrower v0.2
81
+ development smoke, added alongside the `--targets-file` implementation: it
82
+ runs the built `dist/cli.js` directly (`node dist/cli.js observe
83
+ --targets-file ...`) against an inline disposable local HTTP fixture and a
84
+ temporary JSON target file, proving a real semantic observation persists a
85
+ valid schema-`1.2.0` artifact with no packed-tarball step involved. Run it
86
+ locally after `npm run build`:
87
+
88
+ ```powershell
89
+ node scripts/dev/builtCliTargetsFileSmoke.mjs
90
+ ```
91
+
92
+ `scripts/dev/builtCliScrollScenarioSmoke.mjs` is the v0.3 equivalent, added
93
+ alongside the `--scroll-scenario-file` implementation: it runs the built
94
+ `dist/cli.js` directly against an inline disposable local HTTP fixture,
95
+ once with a temporary `window-scroll-by` scenario file and once with a
96
+ temporary structured `--targets-file` plus a `target-scroll-by` scenario
97
+ file, proving both real runtime scroll actions persist a valid
98
+ schema-`1.2.0` artifact with populated `scrollScenarioEvidence`,
99
+ scenario-file path privacy, and target-application immutability. Run it
100
+ locally after `npm run build`:
101
+
102
+ ```powershell
103
+ node scripts/dev/builtCliScrollScenarioSmoke.mjs
104
+ ```
105
+
106
+ `scripts/dev/builtCliCompareSmoke.mjs` is the v0.4 equivalent, added
107
+ alongside the `compare` command implementation (shipped as part of the
108
+ published `0.4.0` package - see `docs/CURRENT_STATE.md`): it runs the built
109
+ `dist/cli.js` twice as
110
+ `observe` against an inline disposable local HTTP fixture whose served
111
+ content changes deterministically between the two runs (a real moved/
112
+ resized target, and a page-width transition from fitting to exceeding the
113
+ viewport), then runs the built `dist/cli.js compare` against the two
114
+ resulting persisted observation artifacts. It validates artifact kind/
115
+ schema `1.0.0`, `comparability: "comparable"`, source observation
116
+ references, at least one real `moved` difference and one real page-width
117
+ relationship change, that the comparison directory contains `manifest.json`
118
+ only, that no operational filesystem path leaked into the persisted
119
+ manifest, and that both source observation manifests are byte-identical
120
+ before and after the comparison ran. Run it locally after `npm run build`:
121
+
122
+ ```powershell
123
+ node scripts/dev/builtCliCompareSmoke.mjs
124
+ ```
125
+
126
+ `scripts/dev/builtCliFrontendContractsSmoke.mjs` is the v0.5 equivalent,
127
+ added alongside the `approve-baseline`/`save-change-contract`/
128
+ `evaluate-contract` command implementations (shipped as part of the
129
+ published `0.5.0` package - see `docs/CURRENT_STATE.md`). Unlike the other dev smokes, it needs no Chromium
130
+ at all: it hand-writes deterministic, schema-`1.2.0`-valid observation
131
+ manifests directly to a temporary directory (preserving the public
132
+ observation artifact contract without a real browser capture), then runs
133
+ the built `dist/cli.js` for `compare`, `approve-baseline`,
134
+ `save-change-contract`, and `evaluate-contract` - twice for the final
135
+ step, once without `--enforce` and once with it, against the same
136
+ milestone-signature contract (requested navigation shrink = pass, expected
137
+ workspace expansion = pass, protected right-rail width = fail, preserved
138
+ unclipped navigation = fail, overall = `FAIL`). It validates both exit
139
+ codes (`0` without `--enforce`, nonzero with it), that both invocations
140
+ persist byte-for-byte semantically identical evaluation evidence
141
+ (`evaluationRequestId` and `clauseResults` equal), that the evaluation
142
+ directory contains `manifest.json` only, that no operational filesystem
143
+ path leaked into either persisted evaluation manifest, and that every
144
+ source observation/comparison/contract artifact remains unmodified. Run it
145
+ locally after `npm run build`:
146
+
147
+ ```powershell
148
+ node scripts/dev/builtCliFrontendContractsSmoke.mjs
149
+ ```
150
+
151
+ `scripts/dev/builtCliFrontendContractsBrowserSmoke.mjs` is the v0.5 Batch 5
152
+ real-browser equivalent, added alongside
153
+ `tests/browser/cliFrontendContracts.test.ts`. Unlike the Chromium-free
154
+ `scripts/dev/builtCliFrontendContractsSmoke.mjs` above, this one launches a
155
+ real disposable local HTTP fixture and real Playwright Chromium, then drives
156
+ the built `dist/cli.js` through the complete `observe` → `approve-baseline`
157
+ → `save-change-contract` → `observe` → `compare` → `evaluate-contract`
158
+ sequence twice: once against a candidate whose served content produces a
159
+ fully successful contract change (all clauses `pass`, overall `PASS`), and
160
+ once against a candidate that reproduces the milestone-signature failure - a
161
+ real observed navigation clipping regression and a real observed right-rail
162
+ width regression alongside an otherwise-successful requested/expected-
163
+ dependent change (overall `FAIL`). It validates the same `--enforce`
164
+ exit-code/identity behavior, screenshot-free evaluation directory, source
165
+ immutability, and path-privacy properties as the Chromium-free smoke, but
166
+ against genuine rendered geometry instead of hand-constructed artifacts. Run
167
+ it locally after `npm run build` (Chromium must already be installed):
168
+
169
+ ```powershell
170
+ node scripts/dev/builtCliFrontendContractsBrowserSmoke.mjs
171
+ ```
172
+
173
+ Since v0.8 Batch 1, `npm run build` also builds the browser-side viewer app
174
+ (`viewer/`) with Vite into `dist/viewer` (see `docs/ARCHITECTURE.md` "v0.8
175
+ Batch 1"). `npm run typecheck` additionally type-checks `viewer/tsconfig.json`
176
+ alongside the existing `tsconfig.json`. To smoke-test the built viewer
177
+ locally after `npm run build`:
178
+
179
+ ```powershell
180
+ node dist/cli.js view --root <evidence-root> --no-open
181
+ ```
182
+
183
+ optionally adding `--bindings-file <json-file>` and/or `--context-file
184
+ <json-file>` (see `docs/COMMANDS.md#view` for their exact shapes), then open
185
+ the printed `http://127.0.0.1:4319` URL in a browser (or stop with Ctrl+C).
186
+ This starts a real, loopback-only server serving the actual built PWA. As of
187
+ v0.8 (all eight implementation batches), it reads `--root` only for bounded,
188
+ read-only evidence discovery through the existing canonical
189
+ readers/classifiers - it never writes to `--root` or modifies any artifact
190
+ under it.
191
+
192
+ Unlike `scripts/ci/runPackedObservationSmoke.mjs`, none of these five dev
193
+ smokes is wired into any CI workflow or is a release gate - they are
194
+ source-checkout development evidence only, proving the built CLI's
195
+ `--targets-file`/`--scroll-scenario-file`/`compare`/frontend-contract
196
+ command behavior without installing a packed tarball or requiring
197
+ cross-platform infrastructure. None is part of the published package.
198
+ Cross-platform packed validation of the v0.1-v0.5 observation/compare/
199
+ contract behavior is `scripts/ci/runPackedObservationSmoke.mjs`'s
200
+ responsibility (see `docs/CI_CD.md`) - the same script, against the same
201
+ single candidate tarball per platform, now including the v0.5 contract/
202
+ evaluation CLI.
@@ -0,0 +1,50 @@
1
+ # Documentation Preservation Policy
2
+
3
+ Current explicit user decisions have highest authority. The complete
4
+ repository-local Project Description then owns durable product intent, and the
5
+ complete repository-local Project Milestones owns capability ordering, major
6
+ requirements, acceptance expectations, and cross-milestone rules. ROADMAP
7
+ derives version-level direction from both. Actual repository evidence is the
8
+ authority for claims about current implementation and release state. Accepted
9
+ greenfield artifacts may prove an approved design decision but do not alone
10
+ prove implementation. Reconnaissance informs decisions but does not replace
11
+ intent.
12
+
13
+ Responsibilities are distinct:
14
+
15
+ - `PROJECT_DESCRIPTION.md` contains complete durable product intent, the three
16
+ primary jobs, long-term product model, principles, and ecosystem boundaries.
17
+ - `PROJECT_MILESTONES.md` contains the complete ordered capability design,
18
+ acceptance expectations, and cross-milestone rules.
19
+ - `ROADMAP.md` owns version-level goals, constraints, dependencies, exclusions,
20
+ ecosystem implications, acceptance, and unresolved planning decisions.
21
+ - `docs/plans/<version>-implementation-plan.md`, when present, owns the frozen
22
+ concrete implementation plan produced at version start after the roadmap and
23
+ current repository state have been inspected. It may contain implementation
24
+ architecture decisions, batch structure, sequencing, batch acceptance gates,
25
+ validation expectations, explicit exclusions, and the post-implementation
26
+ handoff into documentation reconciliation and release-readiness workflows.
27
+ It is a planning authority only and never proves that a batch or version was
28
+ actually implemented.
29
+ - `CURRENT_STATE.md` describes only actual implementation, scaffold, validation,
30
+ and release state.
31
+ - `ARCHITECTURE.md` describes implemented architecture and may include clearly
32
+ labeled durable or planned extension constraints.
33
+ - `PROJECT_OVERVIEW.md` is concise navigation and orientation; it does not
34
+ replace the complete authorities.
35
+
36
+ Once a version-specific implementation plan is explicitly frozen, coding-agent
37
+ prompts for that version must preserve its scope and batch order unless the user
38
+ explicitly revises the plan. Batch execution reports may document what happened
39
+ but do not silently rewrite the plan. If implementation evidence requires a
40
+ change, record the explicit plan revision in the version plan before subsequent
41
+ batches are treated as governed by the new sequence.
42
+
43
+ ROADMAP must not override Project Description or Project Milestones on durable
44
+ intent, and it must never contain prewritten implementation batches, command
45
+ transcripts, or execution bookkeeping. A version plan must not promote a
46
+ future-version capability into the current version or contradict the roadmap's
47
+ version-level scope. Current-state documents do not override future product
48
+ intent merely because implementation is incomplete. Before deleting,
49
+ relocating, or replacing a source document, verify that all unique information
50
+ and useful historical provenance remain.