@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,505 @@
1
+ # v0.8.1 CLI Usability Patch Plan
2
+
3
+ Status: frozen implementation plan for the planned v0.8.1 usability patch.
4
+
5
+ This file is a planning authority only. It does not claim that the commands or
6
+ workflow described below are implemented until repository evidence proves they
7
+ exist and the post-implementation documentation reconciliation records that
8
+ state.
9
+
10
+ ## 1. Goal
11
+
12
+ Add a small human-facing project workflow above the existing canonical
13
+ observation, comparison, contract, reference, fidelity, and viewer engines.
14
+
15
+ The patch solves a concrete usability problem exposed by manual first use of
16
+ v0.8.0: ordinary users currently have to repeat URL/viewport/target/output
17
+ arguments, manage evidence-root paths, resolve exact artifact roots, and may
18
+ encounter long immutable artifact identifiers as if those identifiers were the
19
+ normal user interface.
20
+
21
+ The canonical artifact identities and existing low-level commands remain valid
22
+ and supported. v0.8.1 adds project configuration, human-readable aliases, and a
23
+ small high-level command surface so routine human and coding-agent workflows do
24
+ not have to operate artifact plumbing directly.
25
+
26
+ ## 2. Public command model
27
+
28
+ The normal project workflow becomes:
29
+
30
+ ```text
31
+ my-frontend-observer init
32
+ my-frontend-observer capture <name>
33
+ my-frontend-observer check [<baseline>]
34
+ my-frontend-observer view
35
+ ```
36
+
37
+ The existing low-level commands remain supported for automation, compatibility,
38
+ debugging, and advanced workflows:
39
+
40
+ ```text
41
+ observe
42
+ compare
43
+ approve-baseline
44
+ save-change-contract
45
+ evaluate-contract
46
+ import-reference
47
+ approve-reference
48
+ evaluate-reference-fidelity
49
+ ```
50
+
51
+ No existing low-level command is removed or semantically redefined by this
52
+ patch.
53
+
54
+ ## 3. Project discovery
55
+
56
+ Project-aware commands discover configuration by walking upward from the current
57
+ working directory until they find:
58
+
59
+ ```text
60
+ frontend-observer.json
61
+ ```
62
+
63
+ Discovery stops at the filesystem root.
64
+
65
+ If a project-aware command cannot find configuration, fail with an actionable
66
+ project-not-initialized diagnostic. Do not guess a repository root, evidence
67
+ root, URL, viewport, or target configuration.
68
+
69
+ `init` creates configuration in the directory where the user explicitly runs
70
+ it. It never walks upward and silently overwrites another project.
71
+
72
+ ## 4. Project configuration
73
+
74
+ The first project-configuration schema is versioned independently from product
75
+ artifacts:
76
+
77
+ ```json
78
+ {
79
+ "schemaVersion": "1.0.0",
80
+ "url": "http://127.0.0.1:3000",
81
+ "viewport": {
82
+ "width": 1280,
83
+ "height": 720
84
+ },
85
+ "targets": [
86
+ {
87
+ "name": "header",
88
+ "locators": [
89
+ {
90
+ "kind": "css",
91
+ "selector": "#header"
92
+ }
93
+ ]
94
+ }
95
+ ],
96
+ "defaultBaseline": "baseline"
97
+ }
98
+ ```
99
+
100
+ The implementation may support a project-relative structured targets file as an
101
+ alternative to inline targets when that reuses the existing target-file
102
+ contract cleanly.
103
+
104
+ Project-relative file references must use portable paths. Do not persist
105
+ machine-specific absolute paths into project configuration.
106
+
107
+ Configuration supplies workflow defaults only. It does not replace canonical
108
+ request validation or artifact identity.
109
+
110
+ ## 5. Managed project state
111
+
112
+ Project-managed Observer state lives under:
113
+
114
+ ```text
115
+ .frontend-observer/
116
+ ```
117
+
118
+ The first managed layout is:
119
+
120
+ ```text
121
+ .frontend-observer/
122
+ catalog.json
123
+ evidence/
124
+ ```
125
+
126
+ `init` may add `.frontend-observer/` to `.gitignore` when needed. It must not
127
+ modify application source or unrelated ignore rules.
128
+
129
+ Canonical artifacts remain immutable evidence underneath the managed evidence
130
+ root. The managed project layer must not rewrite their identities or schemas.
131
+
132
+ ## 6. Human-readable aliases
133
+
134
+ Add a versioned alias catalog that maps human-readable workflow names to
135
+ canonical artifacts.
136
+
137
+ Conceptually:
138
+
139
+ ```json
140
+ {
141
+ "schemaVersion": "1.0.0",
142
+ "observations": {
143
+ "baseline": {
144
+ "observationId": "<canonical-id>",
145
+ "requestId": "<canonical-id>",
146
+ "artifactPath": "evidence/observations/<canonical-path>"
147
+ }
148
+ }
149
+ }
150
+ ```
151
+
152
+ Rules:
153
+
154
+ - the catalog is workflow metadata, not a replacement evidence schema;
155
+ - canonical artifact identity remains authoritative;
156
+ - aliases use a bounded portable grammar and cannot contain path traversal;
157
+ - catalog paths are project-relative and portable;
158
+ - catalog writes are atomic;
159
+ - malformed or unsupported catalog versions fail closed;
160
+ - replacing an alias never deletes its previous canonical artifact;
161
+ - alias replacement never approves, supersedes, or mutates a baseline
162
+ contract, reference, or other governance state.
163
+
164
+ Normal CLI and viewer presentation uses aliases first. Canonical IDs remain
165
+ available as provenance/details.
166
+
167
+ ## 7. `init`
168
+
169
+ `init` configures one frontend project.
170
+
171
+ Required initial inputs must be sufficient to create a valid observation using
172
+ the existing canonical observation request model. At minimum this means URL,
173
+ viewport, and target configuration according to the selected input form.
174
+
175
+ Example:
176
+
177
+ ```text
178
+ my-frontend-observer init \
179
+ --url http://127.0.0.1:3000 \
180
+ --viewport 1280x720 \
181
+ --target "header=#header" \
182
+ --target "workspace=#workspace"
183
+ ```
184
+
185
+ Responsibilities:
186
+
187
+ 1. validate configuration through existing request contracts where applicable;
188
+ 2. write `frontend-observer.json` atomically;
189
+ 3. create `.frontend-observer/` managed state;
190
+ 4. create an empty versioned catalog;
191
+ 5. add `.frontend-observer/` to `.gitignore` only when needed and only through
192
+ this explicit initialization action.
193
+
194
+ If configuration already exists, fail unless an explicit replacement option is
195
+ provided. Replacement must not delete existing canonical evidence.
196
+
197
+ ## 8. `capture <name>`
198
+
199
+ `capture <name>` creates one canonical observation using project defaults.
200
+
201
+ Example:
202
+
203
+ ```text
204
+ my-frontend-observer capture baseline
205
+ ```
206
+
207
+ Behavior:
208
+
209
+ 1. discover the project;
210
+ 2. read and validate project configuration;
211
+ 3. construct the existing canonical observation request;
212
+ 4. call the existing observation application service exactly once;
213
+ 5. persist the canonical artifact below the managed evidence root;
214
+ 6. atomically update the alias catalog only after observation persistence
215
+ succeeds.
216
+
217
+ Do not create a second browser-observation implementation.
218
+
219
+ The user does not provide an output path for normal capture.
220
+
221
+ If the alias already exists, fail unless the user explicitly requests alias
222
+ replacement. Replacement changes only the alias mapping. It does not delete old
223
+ evidence and does not supersede approved governance state.
224
+
225
+ ## 9. Project-aware `view`
226
+
227
+ Preserve the current advanced form:
228
+
229
+ ```text
230
+ my-frontend-observer view --root <evidence-root> ...
231
+ ```
232
+
233
+ Add the normal project form:
234
+
235
+ ```text
236
+ my-frontend-observer view
237
+ ```
238
+
239
+ Inside an initialized project, `view` without `--root` resolves the managed
240
+ `.frontend-observer/evidence` root automatically.
241
+
242
+ Existing options such as explicit bindings, bounded context, alternate port, and
243
+ no-open behavior remain supported.
244
+
245
+ The viewer receives alias metadata as presentation metadata. Its primary lists
246
+ show names such as `baseline`, `current`, or another user-supplied alias.
247
+ Canonical observation/request/artifact IDs remain available in provenance and
248
+ raw-evidence details.
249
+
250
+ Viewer alias presentation must not create a new evidence engine or persist a
251
+ viewer-only artifact family.
252
+
253
+ ## 10. `check [baseline]`
254
+
255
+ Prompt 2 adds the high-level acceptance command after the project/alias
256
+ foundation is proven.
257
+
258
+ Examples:
259
+
260
+ ```text
261
+ my-frontend-observer check baseline
262
+ my-frontend-observer check
263
+ my-frontend-observer check baseline --json
264
+ ```
265
+
266
+ When the baseline argument is omitted, use `defaultBaseline` only when it is
267
+ configured and resolves unambiguously.
268
+
269
+ Behavior:
270
+
271
+ 1. resolve the baseline alias;
272
+ 2. capture the current frontend with project configuration;
273
+ 3. persist that candidate canonically;
274
+ 4. create or replace the reserved human-facing `current` alias without deleting
275
+ earlier candidate evidence;
276
+ 5. call the existing canonical comparison engine;
277
+ 6. evaluate configured active frontend contracts where required inputs exist;
278
+ 7. evaluate configured approved reference/fidelity evidence where required
279
+ inputs exist;
280
+ 8. produce one bounded workflow summary.
281
+
282
+ Do not create a second comparison, contract, reference, binding,
283
+ compatibility, or fidelity engine.
284
+
285
+ ## 11. `check` status contract
286
+
287
+ The high-level workflow status is:
288
+
289
+ ```text
290
+ PASS
291
+ FAIL
292
+ REVIEW_REQUIRED
293
+ BLOCKED
294
+ ```
295
+
296
+ `PASS` means every configured executable acceptance dimension required by the
297
+ project passed.
298
+
299
+ `FAIL` means at least one configured executable acceptance dimension failed.
300
+
301
+ `REVIEW_REQUIRED` means useful comparison evidence exists but configured
302
+ executable criteria are insufficient to declare success or failure. A raw
303
+ comparison or apparent lack of differences must never be promoted to PASS by
304
+ itself.
305
+
306
+ `BLOCKED` means required evidence could not be captured, resolved, compared, or
307
+ evaluated reliably.
308
+
309
+ Required `unavailable`, `ambiguous`, `incompatible`, `incomparable`, or
310
+ `not-evaluated` evidence must not be silently converted to PASS.
311
+
312
+ Reference-fidelity PASS must never override an active frontend-contract FAIL.
313
+
314
+ ## 12. Human and coding-agent output
315
+
316
+ Human output must be concise and actionable, emphasizing aliases and failed
317
+ conditions rather than filesystem paths or hashes.
318
+
319
+ `check --json` provides a bounded machine-readable result for coding agents. It
320
+ must contain the workflow status, aliases, relevant canonical artifact
321
+ references, failed contract/reference evidence, unexpected changes, and blockers
322
+ needed for correction. It must not embed complete raw artifacts or heavy image
323
+ bytes.
324
+
325
+ The JSON workflow result is a presentation/orchestration projection over
326
+ canonical evidence. It is not a new canonical evaluation engine.
327
+
328
+ ## 13. Top-level help
329
+
330
+ Reorganize top-level help into two groups.
331
+
332
+ Normal workflow:
333
+
334
+ ```text
335
+ init
336
+ capture
337
+ check
338
+ view
339
+ ```
340
+
341
+ Advanced/compatibility:
342
+
343
+ ```text
344
+ observe
345
+ compare
346
+ approve-baseline
347
+ save-change-contract
348
+ evaluate-contract
349
+ import-reference
350
+ approve-reference
351
+ evaluate-reference-fidelity
352
+ ```
353
+
354
+ Existing command-specific help and behavior stay backward compatible.
355
+
356
+ ## 14. Future-version compatibility
357
+
358
+ ### v0.9
359
+
360
+ Visual annotation remains a viewer capability. v0.9 should extend `view` rather
361
+ than create another top-level workflow architecture.
362
+
363
+ Annotations may refer to human aliases for convenience, but persisted annotation
364
+ identity must remain tied to canonical observation/reference identities.
365
+
366
+ ### v0.10
367
+
368
+ The coding-agent correction workflow should use:
369
+
370
+ ```text
371
+ my-frontend-observer check <baseline> --json
372
+ ```
373
+
374
+ after implementation attempts. The external coding agent or orchestrator edits
375
+ source; Observer captures and evaluates runtime evidence.
376
+
377
+ Do not add Observer commands such as `fix`, `repair`, or `generate-code` that
378
+ would make Observer a source-editing system.
379
+
380
+ ## 15. Compatibility and schema constraints
381
+
382
+ This patch must not change the semantics or schema versions of:
383
+
384
+ - ObservationArtifact;
385
+ - ComparisonArtifact;
386
+ - frontend baseline/per-change contracts;
387
+ - frontend contract evaluation artifacts;
388
+ - external-reference artifacts;
389
+ - reference/runtime binding;
390
+ - reference/candidate compatibility;
391
+ - reference fidelity;
392
+ - bounded-agent-context;
393
+ - runtime/static correlation.
394
+
395
+ Existing public CLI and programmatic APIs remain first-class and continue to
396
+ work without project initialization.
397
+
398
+ ## 16. Implementation sequence
399
+
400
+ Implement in two prompts.
401
+
402
+ ### Prompt 1 — Project workflow foundation and aliases
403
+
404
+ Implement:
405
+
406
+ - project configuration contract and validation;
407
+ - upward project discovery;
408
+ - managed `.frontend-observer/` state paths;
409
+ - alias validation and versioned catalog;
410
+ - atomic catalog persistence;
411
+ - `init`;
412
+ - `capture <name>`;
413
+ - alias replacement rules;
414
+ - project-aware `view` without `--root`;
415
+ - alias metadata projection into the viewer;
416
+ - alias-first viewer labels;
417
+ - common-versus-advanced top-level help;
418
+ - backward compatibility and focused unit/browser/packed-package proof.
419
+
420
+ Prompt 1 must not implement `check` acceptance orchestration.
421
+
422
+ Prompt 1 gate: from an initialized project a user can run `capture baseline`
423
+ and `view` without supplying an output path, evidence root, or canonical
424
+ artifact hash, while all existing low-level commands still pass regression
425
+ coverage.
426
+
427
+ ### Prompt 2 — `check` orchestration and coding-agent interface
428
+
429
+ Starting only after Prompt 1 passes, implement:
430
+
431
+ - baseline alias resolution;
432
+ - current candidate capture and reserved `current` alias;
433
+ - canonical comparison composition;
434
+ - configured contract evaluation;
435
+ - configured approved-reference/fidelity evaluation;
436
+ - `PASS | FAIL | REVIEW_REQUIRED | BLOCKED` workflow status;
437
+ - concise human output;
438
+ - bounded `--json` output;
439
+ - real-browser PASS/FAIL/REVIEW_REQUIRED/BLOCKED acceptance fixtures;
440
+ - coding-agent correction proof using FAIL then PASS;
441
+ - clean packed-consumer proof;
442
+ - post-implementation documentation reconciliation.
443
+
444
+ Prompt 2 gate: a normal user can `capture baseline`, modify the frontend, and
445
+ run `check baseline` without artifact paths/hashes; a coding agent can consume
446
+ `check baseline --json` and receive bounded actionable runtime failure evidence.
447
+
448
+ ## 17. Post-implementation documentation
449
+
450
+ Only after the commands actually exist, reconcile current implementation docs,
451
+ including as applicable:
452
+
453
+ - README.md;
454
+ - docs/COMMANDS.md;
455
+ - docs/WORKFLOWS.md;
456
+ - docs/ARCHITECTURE.md;
457
+ - docs/CURRENT_STATE.md;
458
+ - docs/PROJECT_OVERVIEW.md;
459
+ - docs/SECURITY.md;
460
+ - docs/DEVELOPMENT.md;
461
+ - docs/CI_CD.md.
462
+
463
+ Do not document `init`, `capture`, `check`, alias-aware `view`, or the new
464
+ workflow as implemented before repository evidence proves they exist.
465
+
466
+ CHANGELOG.md remains release history and must not describe v0.8.1 as released
467
+ until the later release workflow actually publishes it.
468
+
469
+ ## 18. Explicit exclusions
470
+
471
+ The v0.8.1 patch does not implement:
472
+
473
+ - visual annotation authoring;
474
+ - source editing;
475
+ - automatic frontend correction;
476
+ - coding-agent orchestration inside Observer;
477
+ - automatic reference/runtime binding;
478
+ - image-to-code generation;
479
+ - deletion of historical canonical evidence;
480
+ - implicit baseline/reference approval or supersession;
481
+ - new evidence/evaluation engines;
482
+ - cloud hosting, authentication, collaboration, or database-backed evidence.
483
+
484
+ ## 19. Version-wide acceptance
485
+
486
+ The patch is complete only when all of the following are proven:
487
+
488
+ - project initialization is deterministic and bounded;
489
+ - configuration/project discovery works from project subdirectories;
490
+ - managed state remains project-contained;
491
+ - `capture <name>` reuses canonical observation behavior;
492
+ - aliases resolve to canonical immutable evidence;
493
+ - alias replacement preserves old evidence;
494
+ - users do not need canonical hashes or output paths in the normal workflow;
495
+ - `view` works without `--root` inside an initialized project;
496
+ - alias-first viewer navigation works while canonical IDs remain inspectable;
497
+ - existing `view --root` and every existing command remain backward compatible;
498
+ - `check` never invents PASS from comparison evidence alone;
499
+ - contract/reference failures remain canonical and independently visible;
500
+ - `check --json` is bounded and coding-agent usable;
501
+ - no artifact/evaluation schema changes are introduced;
502
+ - real Chromium exercises the new workflow;
503
+ - exact packed candidate works in a clean consumer;
504
+ - applicable typecheck, lint, unit, browser, build, documentation, security, and
505
+ package validations pass.