@dailephd/my-frontend-observer 0.9.1 → 0.10.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 (150) hide show
  1. package/CHANGELOG.md +490 -471
  2. package/LICENSE +21 -21
  3. package/README.md +375 -357
  4. package/dist/application/projectCheckService.d.ts +6 -0
  5. package/dist/application/projectCheckService.js +8 -1
  6. package/dist/application/projectCheckService.js.map +1 -1
  7. package/dist/application/projectWorkflowService.d.ts +7 -2
  8. package/dist/application/projectWorkflowService.js +10 -3
  9. package/dist/application/projectWorkflowService.js.map +1 -1
  10. package/dist/application/visualChangeAgentHandoffService.d.ts +28 -0
  11. package/dist/application/visualChangeAgentHandoffService.js +111 -0
  12. package/dist/application/visualChangeAgentHandoffService.js.map +1 -0
  13. package/dist/application/visualChangeProjectWorkflowService.d.ts +95 -0
  14. package/dist/application/visualChangeProjectWorkflowService.js +376 -0
  15. package/dist/application/visualChangeProjectWorkflowService.js.map +1 -0
  16. package/dist/application/visualChangeReviewService.d.ts +50 -0
  17. package/dist/application/visualChangeReviewService.js +69 -0
  18. package/dist/application/visualChangeReviewService.js.map +1 -0
  19. package/dist/application/visualChangeWorkflowPersistenceService.d.ts +26 -0
  20. package/dist/application/visualChangeWorkflowPersistenceService.js +15 -0
  21. package/dist/application/visualChangeWorkflowPersistenceService.js.map +1 -0
  22. package/dist/artifacts/visualChangeWorkflowArtifactReader.d.ts +9 -0
  23. package/dist/artifacts/visualChangeWorkflowArtifactReader.js +47 -0
  24. package/dist/artifacts/visualChangeWorkflowArtifactReader.js.map +1 -0
  25. package/dist/artifacts/visualChangeWorkflowArtifactWriter.d.ts +20 -0
  26. package/dist/artifacts/visualChangeWorkflowArtifactWriter.js +41 -0
  27. package/dist/artifacts/visualChangeWorkflowArtifactWriter.js.map +1 -0
  28. package/dist/cli.js +9 -7
  29. package/dist/cli.js.map +1 -1
  30. package/dist/domain/visualChangeAgentHandoff.d.ts +82 -0
  31. package/dist/domain/visualChangeAgentHandoff.js +80 -0
  32. package/dist/domain/visualChangeAgentHandoff.js.map +1 -0
  33. package/dist/domain/visualChangeAgentHandoffSerialization.d.ts +2 -0
  34. package/dist/domain/visualChangeAgentHandoffSerialization.js +11 -0
  35. package/dist/domain/visualChangeAgentHandoffSerialization.js.map +1 -0
  36. package/dist/domain/visualChangeCycle.d.ts +8 -0
  37. package/dist/domain/visualChangeCycle.js +7 -0
  38. package/dist/domain/visualChangeCycle.js.map +1 -0
  39. package/dist/domain/visualChangeWorkflow.d.ts +125 -0
  40. package/dist/domain/visualChangeWorkflow.js +109 -0
  41. package/dist/domain/visualChangeWorkflow.js.map +1 -0
  42. package/dist/domain/visualChangeWorkflowIdentity.d.ts +5 -0
  43. package/dist/domain/visualChangeWorkflowIdentity.js +24 -0
  44. package/dist/domain/visualChangeWorkflowIdentity.js.map +1 -0
  45. package/dist/index.d.ts +21 -1
  46. package/dist/index.js +12 -1
  47. package/dist/index.js.map +1 -1
  48. package/dist/projectWorkflow/projectPaths.d.ts +3 -0
  49. package/dist/projectWorkflow/projectPaths.js +7 -0
  50. package/dist/projectWorkflow/projectPaths.js.map +1 -1
  51. package/dist/viewer/assets/index-DglJ6f28.css +1 -0
  52. package/dist/viewer/assets/index-DsODREY5.js +9 -0
  53. package/dist/viewer/index.html +15 -15
  54. package/dist/viewer/sw.js +1 -1
  55. package/dist/viewerServer/evidence/classify.d.ts +3 -1
  56. package/dist/viewerServer/evidence/classify.js +10 -0
  57. package/dist/viewerServer/evidence/classify.js.map +1 -1
  58. package/dist/viewerServer/evidence/handles.js +1 -0
  59. package/dist/viewerServer/evidence/handles.js.map +1 -1
  60. package/dist/viewerServer/evidence/projection.d.ts +5 -0
  61. package/dist/viewerServer/evidence/projection.js +19 -0
  62. package/dist/viewerServer/evidence/projection.js.map +1 -1
  63. package/dist/viewerServer/evidence/visualChangeWorkflowView.d.ts +31 -0
  64. package/dist/viewerServer/evidence/visualChangeWorkflowView.js +36 -0
  65. package/dist/viewerServer/evidence/visualChangeWorkflowView.js.map +1 -0
  66. package/dist/viewerServer/httpServer.js +323 -1
  67. package/dist/viewerServer/httpServer.js.map +1 -1
  68. package/dist/viewerServer/referenceApproval.d.ts +22 -0
  69. package/dist/viewerServer/referenceApproval.js +42 -0
  70. package/dist/viewerServer/referenceApproval.js.map +1 -0
  71. package/dist/viewerServer/referenceVisualChangeAuthoring.d.ts +28 -0
  72. package/dist/viewerServer/referenceVisualChangeAuthoring.js +134 -0
  73. package/dist/viewerServer/referenceVisualChangeAuthoring.js.map +1 -0
  74. package/dist/viewerServer/runtimeVisualChangeAuthoring.d.ts +33 -0
  75. package/dist/viewerServer/runtimeVisualChangeAuthoring.js +81 -0
  76. package/dist/viewerServer/runtimeVisualChangeAuthoring.js.map +1 -0
  77. package/dist/viewerServer/visualChangeAuthoring.d.ts +46 -0
  78. package/dist/viewerServer/visualChangeAuthoring.js +63 -0
  79. package/dist/viewerServer/visualChangeAuthoring.js.map +1 -0
  80. package/dist/viewerServer/visualChangeHandoff.d.ts +23 -0
  81. package/dist/viewerServer/visualChangeHandoff.js +31 -0
  82. package/dist/viewerServer/visualChangeHandoff.js.map +1 -0
  83. package/dist/viewerServer/visualChangeReview.d.ts +30 -0
  84. package/dist/viewerServer/visualChangeReview.js +46 -0
  85. package/dist/viewerServer/visualChangeReview.js.map +1 -0
  86. package/docs/ARCHITECTURE.md +1394 -1373
  87. package/docs/CI_CD.md +349 -327
  88. package/docs/COMMANDS.md +1035 -1012
  89. package/docs/CONTRACTS.md +1971 -1926
  90. package/docs/CURRENT_STATE.md +1277 -1238
  91. package/docs/DEVELOPMENT.md +240 -237
  92. package/docs/DOCUMENTATION_PRESERVATION_POLICY.md +50 -50
  93. package/docs/PROJECT_DESCRIPTION.md +2248 -2224
  94. package/docs/PROJECT_MILESTONES.md +2681 -2558
  95. package/docs/PROJECT_OVERVIEW.md +200 -191
  96. package/docs/QUICKSTART.md +100 -96
  97. package/docs/RELEASE.md +37 -33
  98. package/docs/ROADMAP.md +1105 -1033
  99. package/docs/SECURITY.md +297 -275
  100. package/docs/WORKFLOWS.md +806 -770
  101. package/docs/plans/v0.10-implementation-plan.md +1509 -0
  102. package/docs/plans/v0.8-implementation-plan.md +655 -655
  103. package/docs/plans/v0.8.1-cli-usability-patch-plan.md +505 -505
  104. package/docs/plans/v0.9-implementation-plan.md +1529 -1529
  105. package/docs/plans/v0.9.1-implementation-plan.md +468 -468
  106. package/docs/reports/v0.10-batch1-visual-change-workflow-foundation.md +102 -0
  107. package/docs/reports/v0.10-batch2-project-composition-check-recording.md +103 -0
  108. package/docs/reports/v0.10-batch3-viewer-visual-change-workspace.md +93 -0
  109. package/docs/reports/v0.10-batch4-actual-frontend-entry.md +59 -0
  110. package/docs/reports/v0.10-batch5-reference-driven-entry.md +238 -0
  111. package/docs/reports/v0.10-batch6-coding-agent-handoff.md +85 -0
  112. package/docs/reports/v0.10-batch7-correction-review-acceptance.md +145 -0
  113. package/docs/reports/v0.10-batch8-integrated-acceptance.md +109 -0
  114. package/docs/reports/v0.10-implementation-completeness-documentation-reconciliation.md +344 -0
  115. package/docs/reports/v0.10-pre-release-readiness.md +120 -0
  116. package/docs/reports/v0.10-release-preparation.md +70 -0
  117. package/docs/reports/v0.10.1-project-check-baseline-context-implementation.md +86 -0
  118. package/docs/reports/v0.7-bounded-fidelity-context-prompt7.md +243 -243
  119. package/docs/reports/v0.7-implementation-completeness-documentation-reconciliation.md +497 -497
  120. package/docs/reports/v0.7-pre-release-readiness.md +337 -337
  121. package/docs/reports/v0.7-reference-binding-prompt5.md +223 -223
  122. package/docs/reports/v0.7-reference-compatibility-prompt4.md +234 -234
  123. package/docs/reports/v0.7-reference-correction-workflow-prompt8.md +222 -222
  124. package/docs/reports/v0.7-reference-fidelity-prompt6.md +216 -216
  125. package/docs/reports/v0.7-reference-foundation-prompt1.md +151 -151
  126. package/docs/reports/v0.7-reference-regions-prompt2.md +195 -195
  127. package/docs/reports/v0.7-reference-requirements-prompt3.md +217 -217
  128. package/docs/reports/v0.7-release-prep.md +423 -423
  129. package/docs/reports/v0.8-binding-fidelity-interaction-batch6.md +279 -279
  130. package/docs/reports/v0.8-bounded-context-correlation-batch7.md +233 -233
  131. package/docs/reports/v0.8-comparison-contract-inspection-batch4.md +279 -279
  132. package/docs/reports/v0.8-evidence-index-readers-batch2.md +247 -247
  133. package/docs/reports/v0.8-implementation-completeness-documentation-reconciliation.md +741 -741
  134. package/docs/reports/v0.8-integrated-viewer-acceptance-batch8.md +128 -128
  135. package/docs/reports/v0.8-observation-svg-inspection-batch3.md +223 -223
  136. package/docs/reports/v0.8-prerelease-readiness-cross-platform-security-code-rot.md +687 -687
  137. package/docs/reports/v0.8-reference-candidate-inspection-batch5.md +232 -232
  138. package/docs/reports/v0.8-viewer-runtime-pwa-batch1.md +278 -278
  139. package/docs/reports/v0.8.1-implementation-completeness-documentation-reconciliation.md +114 -114
  140. package/docs/reports/v0.8.1-prerelease-readiness-cross-platform-security-code-rot.md +170 -170
  141. package/docs/reports/v0.9-architecture-retrieval.md +14 -37
  142. package/docs/reports/v0.9-final-pre-release-readiness.md +209 -209
  143. package/docs/reports/v0.9-final-readiness-corrections.md +530 -530
  144. package/docs/reports/v0.9-pre-release-readiness.md +169 -169
  145. package/docs/reports/v0.9.1-batch1-pwa-hard-gate-isolation.md +359 -359
  146. package/docs/reports/v0.9.1-batch2-hard-gate-validation-integration.md +262 -262
  147. package/docs/reports/v0.9.1-pre-release-readiness.md +206 -206
  148. package/package.json +59 -59
  149. package/dist/viewer/assets/index-BN41MI7m.css +0 -1
  150. package/dist/viewer/assets/index-CkKXnlrI.js +0 -9
package/docs/ROADMAP.md CHANGED
@@ -1,1033 +1,1105 @@
1
- # Roadmap
2
-
3
- v0.9.1 status: released and published to npm as
4
- `@dailephd/my-frontend-observer@0.9.1`. It is a bounded maintenance patch that
5
- corrects the PWA hard-gate test-isolation defect discovered after the v0.9.0
6
- release. No production PWA regression has been demonstrated. v0.10 remains
7
- future work.
8
-
9
- This is a version-level specification, not an implementation checklist.
10
- Concrete steps and sequencing are designed only when a version begins, after
11
- the planner reads that version, inspects current repository state, and performs
12
- needed my-dev-kit retrieval and architecture work. Once those version-start
13
- decisions are frozen, this roadmap records the durable version-level design so
14
- a later planner can reconstruct the intended implementation without stitching
15
- critical architecture decisions across reports, chats, or batch prompts. Exact
16
- files, interfaces, tests, batch gates, and prompt sequencing belong in the
17
- version implementation plan.
18
-
19
- ## v0.1 — Runtime Observation Foundation
20
-
21
- Current status: released as `0.1.0`, published to npm and validated as a
22
- packed npm tarball in a clean consumer environment on Windows, Linux, and
23
- macOS. See `docs/CURRENT_STATE.md` for the implementation summary.
24
-
25
- Objective and user problem: establish trustworthy evidence of what a local
26
- frontend actually rendered, rather than relying on source inference.
27
-
28
- Required capabilities: Node.js 24+ TypeScript CLI; explicit loopback URL,
29
- viewport, CSS targets, and output; real Playwright Chromium capture; viewport
30
- PNG; bounded page/target evidence; versioned portable artifact; provenance,
31
- diagnostics, completion state, and explicit available/unavailable/not-applicable/
32
- partial semantics.
33
-
34
- Constraints and contracts: one reusable application service behind a thin CLI,
35
- one Chromium adapter, external non-destructive targets, loopback-only request/
36
- redirect/subresource policy, no full DOM/style dump, observer-owned schema
37
- `1.0.0` independent of package version. Direct browser, computed-browser, and
38
- derived evidence remain distinguishable.
39
-
40
- Dependencies/ecosystem/compatibility: greenfield foundation only; no runtime
41
- dependency or modification of my-dev-kit, orchestrator, or lab. Windows and
42
- portable structured evidence matter; screenshot bytes need not match across OS.
43
-
44
- Exclusions: semantic identity expansion, scrolling actions, relationships,
45
- comparison, contracts, LLM packets, viewer, annotation, integrations, remote
46
- browsing, credentials, cloud browsers, additional engines, databases, Docker,
47
- plugins, and static analysis.
48
-
49
- Acceptance: deterministic loopback fixture drives real Chromium; screenshot is
50
- a valid nonempty PNG; page and explicit targets expose required measurements;
51
- missing targets are honest; all validation commands pass. Planning must confirm
52
- capture-readiness semantics, exact diagnostics, public compatibility boundaries,
53
- and the concrete dependency/version set before implementation.
54
-
55
- ## v0.2 — Stable Semantic Targets and Region Identity
56
-
57
- Current status: released as `0.2.0`, published to npm and validated as a
58
- packed npm tarball in a clean consumer environment on Windows, Linux, and
59
- macOS. See `docs/CURRENT_STATE.md` for the implementation summary.
60
-
61
- Objective/problem: let humans and consumers refer reliably to conceptual
62
- rendered regions across observations without brittle selector-only identity.
63
- Required capabilities include semantic HTML, accessibility role/name, stable
64
- id/data attributes, bounded fallbacks, resolution confidence/status, ambiguity,
65
- and missing evidence. Runtime identity remains observer-owned and distinct from
66
- source symbols. Depends on v0.1 artifacts and adapter boundaries; schema changes
67
- must be additive where compatible. No scrolling, comparison, contracts, source
68
- ownership, or viewer. Acceptance requires repeatable semantic resolution across
69
- fixtures and explicit ambiguity. Planning must decide selector precedence and
70
- identity persistence rules from current evidence.
71
-
72
- ## v0.3 — Runtime Scrolling, Overflow, and Visibility Behavior
73
-
74
- Current status: released as `0.3.0`, published to npm and validated as a
75
- packed npm tarball in a clean consumer environment on Windows, Linux, and
76
- macOS (observation schema `1.2.0`). See `docs/CURRENT_STATE.md` for the
77
- implementation summary.
78
-
79
- Objective/problem: show which container actually scrolls and what becomes
80
- visible, clipped, or overflowing after controlled actions. Required capabilities
81
- are bounded action scenarios, before/after window and target scroll positions,
82
- viewport intersection/visibility, document/element overflow, and supported
83
- derived scroll-owner interpretation. Depends on stable targets. Browser actions
84
- are authoritative; derived claims cite facts. No general interaction recorder,
85
- comparison engine, or contract semantics. Acceptance requires real-browser
86
- fixtures for document and nested scroll owners. Planning must settle action
87
- syntax, stabilization, and visibility thresholds.
88
-
89
- ## v0.4 — Layout Relationships, Dependency Evidence, and Before/After Comparison
90
-
91
- Current status: released as `0.4.0`, published to npm and validated as a
92
- packed npm tarball in a clean consumer environment on Windows, Linux, and
93
- macOS. See `docs/CURRENT_STATE.md` for the implementation summary.
94
-
95
- Objective/problem: explain whole-layout consequences rather than isolated
96
- numbers. Required capabilities are containment/order/overlap/fit relationships,
97
- comparable observation identity, before/after differences, appearance and
98
- disappearance, geometry/visibility/overflow/relationship changes, screenshot
99
- references, and explicit expected dependency evidence. Depends on v0.1–v0.3.
100
- One canonical relationship and comparison layer serves all consumers;
101
- co-change does not prove causation; causation requires explicit intent, a
102
- contract, or another supported dependency source. No executable contracts or UI. Acceptance
103
- requires bounded deterministic comparison with underlying evidence references.
104
- Planning must settle comparability and tolerance semantics.
105
-
106
- ## v0.5 — Executable Frontend Contracts and Explicit Change Scope
107
-
108
- Current status: released as `0.5.0`, published to npm and validated as a
109
- packed npm tarball in a clean consumer environment on Windows, Linux, and
110
- macOS (observation schema `1.2.0`, comparison schema `1.0.0`, frontend
111
- contract schema `1.0.0`, evaluation artifact schema `1.0.0`). See
112
- `docs/CURRENT_STATE.md` for the implementation summary.
113
-
114
- Objective/problem: prevent a requested local fix from silently breaking an
115
- approved region or invariant. Required capabilities are baseline invariants,
116
- requested/expected-dependent/protected/preserved classifications, explicit
117
- unexpected-change results, responsive tolerances, one canonical evaluation
118
- engine, actionable verdicts, and baseline supersession history. Both persistent
119
- baseline contracts and per-change contracts are required. Depends on v0.4
120
- comparison and explicit intent evidence.
121
- Existing approved contracts remain active unless the user supersedes them.
122
- No LLM packaging, viewer, or annotation UI. Acceptance requires fixtures where
123
- the requested change passes but a protected property fails. Planning must settle
124
- contract storage, approval, tolerance, and conflict resolution.
125
-
126
- ## v0.6 — Bounded Agent Context and Native my-dev-kit Ecosystem Integration
127
-
128
- Current status: released as `0.6.0`, from the `canonicalization/v0.6`
129
- lineage. See `docs/CURRENT_STATE.md` for the implementation summary.
130
-
131
- Objective/problem: make the observer useful to an actual coding-agent workflow
132
- by answering the smallest trustworthy runtime-plus-static context question. A
133
- coding agent needs task-relevant rendered facts, change-scope and contract
134
- evidence, and relevant bounded source evidence without consuming the full
135
- repository or an unbounded browser dump.
136
-
137
- Required capabilities: bounded runtime projections containing page/viewport
138
- identity, stable targets, important geometry and runtime behavior,
139
- relationships, before/after differences, contract results,
140
- requested/dependent/protected/preserved scope, diagnostics, artifact/screenshot
141
- references, provenance, and truncation/omission metadata; adequacy reporting;
142
- explicit runtime/static correlation to current `my-dev-kit` identities and
143
- bounded retrieval where reliable; observer correlation/export boundary;
144
- orchestrator bounded runtime-evidence consumption; and exact lab
145
- readers/fixtures/evaluation needed to prove compatibility.
146
-
147
- Architectural/evidence constraints: runtime identity never silently becomes
148
- source ownership; ambiguity and competing candidates remain explicit. The
149
- observer owns runtime evidence, bounded runtime projection, and
150
- correlation/export. `my-dev-kit` owns static indexing, architecture,
151
- dependencies, probable ownership evidence, and retrieval. The orchestrator
152
- coordinates bounded runtime plus static evidence but does not run the browser,
153
- redefine observer semantics, embed huge raw artifacts, or duplicate retrieval.
154
- The lab evaluates exact supported contracts and is not required for every
155
- normal frontend edit. Do not introduce a shared schema package without a
156
- demonstrated ownership/release need.
157
-
158
- Dependency direction:
159
-
160
- ```text
161
- freeze bounded-agent-context and integration contract
162
- → determine whether my-dev-kit requires a static-side change
163
- → implement observer bounded projection/correlation/export
164
- → implement orchestrator bounded runtime-evidence consumption
165
- → add lab exact readers/fixtures/evaluation needed for compatibility
166
- → run individual repository readiness
167
- → run coordinated exact-version validation
168
- ```
169
-
170
- This is cross-repository dependency direction, not an implementation batch
171
- plan. Modify `my-dev-kit` only if current identities/retrieval lack a generic
172
- static-side capability actually required by the frozen contract.
173
-
174
- Dependencies/ecosystem/compatibility: depends on v0.1–v0.5 stable observation,
175
- identity, behavior, comparison, relationship, contract, and change-scope
176
- semantics. Potentially affected repositories are observer, orchestrator, lab,
177
- and only when proven necessary, `my-dev-kit`. Pin package/candidate identities,
178
- schema/artifact/context versions, consumer expectations, and fixture hashes;
179
- validate downstream consumers against intended candidates rather than stale
180
- published packages.
181
-
182
- Exclusions: viewer, visual annotation, source editing, a new static analyzer,
183
- browser execution in the orchestrator, broad lab product work, external LLM
184
- APIs, full DOM/style/accessibility dumps, unrelated observations, and embedded
185
- heavy assets where references suffice.
186
-
187
- Acceptance: a coding agent or LLM receives bounded traceable runtime problem
188
- evidence plus change scope/contracts plus relevant static/source evidence;
189
- adequacy/omission/truncation and correlation ambiguity remain visible; producer
190
- responsibilities stay distinct; exact lab consumers pass; each affected
191
- repository passes readiness; and coordinated exact-version validation passes.
192
- Version-start planning must decide projection profiles, redaction/text limits,
193
- correlation ownership/evidence, the orchestrator evidence-kind representation,
194
- whether `my-dev-kit` changes are necessary, and whether any shared contract
195
- package is justified.
196
-
197
- ## v0.7 — End-to-End Coding-Agent Frontend Change Review
198
-
199
- Current status: released as `0.7.0`. See `docs/CURRENT_STATE.md`,
200
- `docs/reports/v0.7-implementation-completeness-documentation-reconciliation.md`
201
- for the completeness audit, and
202
- `docs/reports/v0.7-pre-release-readiness.md` for the cross-platform
203
- readiness validation that preceded release. The required capabilities,
204
- constraints, and acceptance criteria below are preserved as originally
205
- planned and describe what the implementation actually satisfies.
206
-
207
- Objective/problem: prove the core practical outcome before graphical work: a
208
- text/config-driven coding-agent correction loop that cannot call a local
209
- requested mutation successful while protected behavior regresses, and establish
210
- the non-graphical evidence foundation required when the desired frontend is
211
- supplied as an external visual reference rather than an earlier runtime state.
212
-
213
- Required capabilities:
214
-
215
- ```text
216
- capture approved baseline
217
- → preserve baseline contracts
218
- → human expresses requested change in text/config
219
- and may supply an external visual reference
220
- → construct requested/dependent/protected/preserved scope
221
- → when a reference is supplied, establish explicit reference identity,
222
- applicable viewport/theme/application-state identity, reference regions,
223
- authored design intent, tolerances, and reference-to-runtime target binding
224
- → generate bounded runtime evidence
225
- → evaluate reference design vs candidate where applicable
226
- → obtain relevant bounded static evidence
227
- → assemble coding-agent context
228
- → external coding agent modifies target source
229
- → observer captures new state
230
- → compare before/after
231
- → reevaluate reference design vs candidate where applicable
232
- → evaluate requested changes
233
- → evaluate expected dependent changes
234
- → verify protected properties
235
- → rerun baseline contracts
236
- → PASS or actionable regression/fidelity failure
237
- ```
238
-
239
- The external reference is evidence, not source code and not an earlier
240
- `ObservationArtifact`. Reference design vs candidate is therefore a distinct
241
- comparison category from before vs after and contract vs candidate. The first
242
- reference model must preserve deterministic reference identity and provenance,
243
- image dimensions/format, explicit bounded reference regions, coordinate
244
- semantics, reusable layout relationships where appropriate, authored design
245
- requirements, tolerances, applicability state, approval/supersession history,
246
- and explicit reference-region to runtime-target bindings whose status may be
247
- explicit, ambiguous, unavailable, or otherwise conservatively represented.
248
- Exact artifact/type names are selected during version-start architecture work;
249
- this roadmap does not freeze a schema name.
250
-
251
- Reference applicability must be evaluated before fidelity differences are
252
- interpreted. A dark-theme active-state reference compared with a light-theme
253
- idle candidate must become an explicit incompatible/incomparable result rather
254
- than a meaningless list of visual failures. Planning must extend or reuse the
255
- canonical comparability/state-identity model instead of creating a
256
- reference-only state system.
257
-
258
- Reference-derived executable intent must feed the existing v0.5 canonical
259
- requested/expected-dependent/protected/preserved contract semantics. Visible
260
- reference details may remain informational or unassessed until a human or
261
- explicit configuration promotes them into requirements. Do not create a second
262
- reference-only PASS/FAIL taxonomy.
263
-
264
- Structured evidence is primary: geometry, spacing, selected style evidence,
265
- relationships, applicability, and contract intent must remain inspectable and
266
- traceable. Bounded screenshot-region or asset-similarity evidence may supplement
267
- structured evidence where reliable, but pixel/image similarity alone must not
268
- determine success. Text rendering, antialiasing, glow, shadows, gradients, and
269
- platform/font differences require property-specific or evidence-specific
270
- tolerance semantics rather than one global pixel-perfect threshold.
271
-
272
- The coding-agent handoff must be actionable and bounded. Instead of only saying
273
- "match the reference," it should be able to report the relevant target,
274
- reference measurement, candidate measurement, delta, failed relationship or
275
- style requirement, active protected/preserved constraints, provenance, and
276
- bounded static/source context. Heavy image bytes and unrelated regions must not
277
- be embedded into every agent packet when references suffice.
278
-
279
- Unexpected changes remain explicit. Existing approved baseline contracts and
280
- the new per-change contract both remain active unless explicitly superseded. A
281
- reference-fidelity pass never authorizes a protected regression or silently
282
- replaces an approved baseline/reference.
283
-
284
- Architectural/evidence constraints: the observer does not edit target source; an
285
- external coding agent or implementation tool does. All runtime, reference,
286
- static, workflow, implementation, and verification identities remain separate
287
- and traceable to their owners. One canonical observer, relationship,
288
- comparison/evaluation, contract, change-scope, reference, and bounded-context
289
- model must serve later UI consumers. Reference regions are not runtime targets,
290
- and neither identity silently becomes source ownership.
291
-
292
- Dependencies/ecosystem/compatibility: depends on v0.6 bounded integrated agent
293
- context and v0.1–v0.5 evidence/contract foundations. Use compatible exact
294
- observer, `my-dev-kit`, orchestrator, and lab contract versions established by
295
- v0.6; the lab remains optional for ordinary edits once compatibility is proven.
296
- The new reference evidence must be project-local and portable, with heavy image
297
- content referenced rather than duplicated throughout downstream artifacts.
298
-
299
- Exclusions: graphical inspection as a prerequisite, graphical annotation
300
- authoring, observer source editing, autonomous approval, hidden baseline or
301
- reference supersession, automatic image-to-code generation, raster-to-HTML or
302
- raster-to-SVG reconstruction, a general computer-vision framework, a Figma or
303
- Canva replacement, and pixel-diff-only acceptance.
304
-
305
- Acceptance: controlled successful and failing changes complete end-to-end. The
306
- required baseline failure case has a requested change succeed while a protected
307
- property or preserved invariant fails, producing overall failure and actionable
308
- evidence. A reference-driven proof case additionally supplies an approved
309
- external reference, binds selected reference regions to runtime targets,
310
- produces measurable structured reference/candidate mismatches, sends only
311
- relevant correction evidence plus bounded static context to the external coding
312
- agent, rerenders, and reevaluates. A reference-fidelity success must still fail
313
- overall when an active baseline/per-change contract fails. Version-start
314
- planning must decide the text/config request format, reference artifact and
315
- lifecycle contract, supported image formats and size bounds, coordinate model,
316
- region/relationship representation, applicability/theme/application-state
317
- identity, tolerance and selected style-evidence model, optional image-similarity
318
- boundaries, coding-agent handoff boundary, controlled target/change mechanism,
319
- approval/baseline/reference history, failure reporting, and exact workflow entry
320
- points.
321
-
322
- ## v0.8 — Interactive Local Observation Viewer
323
-
324
- Current status: released as `v0.8.0` (all eight implementation batches
325
- passed, followed by the hardened documentation/implementation-completeness
326
- audit and formal cross-platform/security pre-release readiness - see
327
- `docs/CURRENT_STATE.md`). The required capabilities, constraints, and
328
- acceptance criteria below are preserved as originally planned and describe
329
- what the implementation actually satisfies.
330
-
331
- Objective/problem: let developers inspect and understand the same canonical
332
- evidence already used by the operational coding-agent workflow without opening
333
- raw artifact files manually, including external design references and their
334
- candidate-fidelity evidence when present.
335
-
336
- Required capabilities: local artifact/context/reference readers; screenshot and
337
- stable target inspection; external-reference image and reference-region
338
- inspection; geometry, semantics, scrolling/overflow, visibility, relationships,
339
- and before/after views; reference/candidate views; diagnostics and honest
340
- evidence states; requested/dependent/protected/preserved/unexpected
341
- classifications; baseline and per-change contract results; reference
342
- applicability and fidelity results; reference-region/runtime-target binding and
343
- ambiguity; source-correlation evidence with uncertainty; and navigation between
344
- relevant raw evidence and bounded agent-context references.
345
-
346
- The viewer should support a clear reference/candidate inspection mode with, as
347
- appropriate, side-by-side images, overlays, synchronized region selection and
348
- zoom, reference and candidate measurements, difference highlighting,
349
- provenance, binding status, and contract/reference evaluation results. It must
350
- show unsupported, partial, unavailable, derived, ambiguous, and incomparable
351
- states honestly rather than converting them into apparent fidelity scores.
352
-
353
- Architectural/evidence constraints: the viewer consumes existing observation,
354
- relationship, comparison, contract, change-scope, correlation, bounded-context,
355
- and v0.7 reference/evaluation engines/contracts. It must not create a second
356
- observer, relationship engine, comparison engine, contract engine, reference
357
- model, reference-evaluation engine, correlation implementation, or context
358
- builder. CLI/programmatic paths remain first-class, viewer state does not mutate
359
- targets, and merely opening/importing a reference in the viewer does not
360
- silently approve or supersede it.
361
-
362
- Dependencies/ecosystem/compatibility: depends on the proven v0.7 workflow and
363
- stable v0.1–v0.7 artifacts/contracts. It may display ecosystem correlation but
364
- does not redefine it. Viewer readers must declare supported artifact/context/
365
- reference versions and show unsupported, missing, partial, derived, ambiguous,
366
- and incomparable evidence honestly.
367
-
368
- Exclusions: annotation authoring, source editing, a second workflow engine,
369
- automatic design generation, cloud hosting, and making the viewer mandatory for
370
- observation or coding-agent review.
371
-
372
- Acceptance: a developer can inspect screenshots, targets, runtime behavior,
373
- relationships, changes, contracts, diagnostics, change scope, correlation, and
374
- reference/candidate evidence through the UI, and the displayed evidence is
375
- demonstrably the same canonical evidence used by CLI/programmatic and
376
- coding-agent workflows. A developer can select a reference region and see the
377
- bound runtime target and measured mismatch where available without the viewer
378
- recomputing a second result.
379
-
380
- Version-start planning decisions are now resolved for v0.8:
381
-
382
- - UI: React + TypeScript + Vite;
383
- - application boundary: normal browser + Node-backed local server + installable
384
- Progressive Web App using the same viewer application;
385
- - reader architecture: existing canonical readers feed an ephemeral viewer
386
- adapter/projection rather than a new persisted viewer artifact;
387
- - reference/candidate display: side-by-side by default with independently
388
- toggleable structured overlays;
389
- - geometry rendering: SVG using each source artifact/image's original coordinate
390
- domain;
391
- - interaction: explicit-binding cross-selection, independent zoom/pan, and
392
- synchronized/locked viewing only when existing compatibility evidence permits
393
- it;
394
- - loading: metadata/index first, with full artifacts and images loaded on demand.
395
-
396
- The frozen concrete batch plan and implementation sequencing live in
397
- `docs/plans/v0.8-implementation-plan.md`; this roadmap intentionally does not
398
- copy those batches.
399
-
400
- ## v0.8.1 — Project Workflow CLI and Human-Readable Evidence Aliases
401
-
402
- Current status: released as `v0.8.1` and published to npm as
403
- `@dailephd/my-frontend-observer@0.8.1`. The frozen
404
- concrete implementation plan is
405
- `docs/plans/v0.8.1-cli-usability-patch-plan.md`.
406
-
407
- Objective/problem: preserve the canonical v0.1-v0.8 evidence engines while
408
- removing artifact-plumbing friction from ordinary human and coding-agent use.
409
- The released low-level CLI still requires users to repeat observation
410
- configuration, choose output paths, pass exact artifact roots between commands,
411
- and may expose long immutable artifact identifiers during routine navigation.
412
- Those identities remain valuable provenance, but they should not be the normal
413
- workflow interface.
414
-
415
- Required capabilities: project-local versioned configuration; upward project
416
- discovery; managed project-local Observer state; a versioned alias catalog that
417
- maps human-readable names to canonical immutable artifacts; `init` for one-time
418
- project configuration; `capture <name>` for project-configured observation;
419
- `check [<baseline>]` for high-level capture plus canonical comparison and
420
- applicable contract/reference evaluation; bounded `check --json` output for
421
- coding agents; project-aware `view` without a required `--root`; alias-first
422
- viewer navigation with canonical IDs retained as provenance; and reorganized
423
- help that distinguishes the common workflow from advanced artifact-level
424
- commands.
425
-
426
- The normal workflow should become:
427
-
428
- ```text
429
- my-frontend-observer init
430
- my-frontend-observer capture baseline
431
- my-frontend-observer check baseline
432
- my-frontend-observer view
433
- ```
434
-
435
- Existing low-level commands remain supported unchanged for automation,
436
- compatibility, debugging, and advanced workflows:
437
-
438
- ```text
439
- observe
440
- compare
441
- approve-baseline
442
- save-change-contract
443
- evaluate-contract
444
- import-reference
445
- approve-reference
446
- evaluate-reference-fidelity
447
- ```
448
-
449
- Acceptance semantics: `check` may report PASS only when every configured
450
- executable acceptance dimension required by the project passes. It reports FAIL
451
- when a configured executable criterion fails, REVIEW_REQUIRED when useful
452
- comparison evidence exists but executable criteria are insufficient to declare
453
- success or failure, and BLOCKED when required evidence cannot be obtained or
454
- evaluated reliably. A raw comparison or apparent lack of differences must never
455
- be promoted to PASS by itself. Reference-fidelity PASS must not override an
456
- active frontend-contract FAIL.
457
-
458
- Architectural/evidence constraints: this patch is a thin project/workflow layer
459
- over the existing canonical observation, comparison, contract, reference,
460
- binding, compatibility, fidelity, context, and viewer owners. Project
461
- configuration and aliases are workflow metadata, not replacement artifact
462
- identities. Alias replacement never deletes canonical evidence or silently
463
- approves/supersedes a baseline or reference. Existing artifact/evaluation schema
464
- versions stay unchanged. Existing CLI/programmatic paths remain first-class and
465
- do not require project initialization.
466
-
467
- Dependencies/ecosystem/compatibility: depends on released v0.8.0 and must remain
468
- compatible with the existing v0.7 coding-agent/reference workflow. The patch is
469
- specifically designed so v0.9 annotation can extend the existing viewer without
470
- another top-level workflow command architecture, while v0.10 coding-agent
471
- correction can repeatedly consume `check <baseline> --json` after external
472
- source edits.
473
-
474
- Exclusions: annotation authoring, source editing, automatic frontend correction,
475
- coding-agent orchestration inside Observer, automatic binding, image-to-code
476
- generation, deleting historical canonical evidence, implicit baseline/reference
477
- approval or supersession, new evidence/evaluation engines, cloud hosting,
478
- authentication, collaboration, and databases.
479
-
480
- Acceptance: a new user can initialize a project once, capture a named baseline,
481
- change the frontend, run one high-level check, and inspect the result without
482
- typing an output path, evidence root, or canonical artifact hash. A coding agent
483
- can consume the same acceptance operation through bounded JSON. Real Chromium
484
- and a clean packed-consumer installation must prove the workflow, and all
485
- existing low-level commands must remain backward compatible.
486
-
487
- ## v0.9 — Human Visual Annotation and Design-Intent Capture
488
-
489
- Current status: released as `v0.9.0` and published to npm as
490
- `@dailephd/my-frontend-observer@0.9.0`, after final exact-candidate
491
- cross-platform readiness on Windows, Linux and macOS. The release includes
492
- repository-owned deterministic demo and tutorial acceptance infrastructure
493
- under `examples/v09-demo/`. That infrastructure is release support and
494
- documentation. It is not a new annotation evidence family or v0.10 behavior,
495
- and it is not shipped in the npm package. The per-prompt implementation reports and the integrated acceptance
496
- report live under `docs/reports/v0.9-*.md`. The source-grounding report is
497
- `docs/reports/v0.9-architecture-retrieval.md`, and the concrete file-level,
498
- test-level, and seven-prompt implementation plan is
499
- `docs/plans/v0.9-implementation-plan.md`. The version-level decisions below are
500
- the durable design authority. A future planner should be able to derive an
501
- implementation plan from this section plus current repository state without
502
- recovering critical choices from old chats or implementation reports.
503
-
504
- Objective/problem: add structured visual human intent to the already working
505
- v0.7 coding-agent/reference workflow through the v0.8 viewer without inventing
506
- a separate change-semantics system. Intent may be authored against either an
507
- existing runtime observation screenshot or an existing external visual
508
- reference. The v0.8.1 project workflow and alias layer remain the normal project
509
- discovery and human-selection surface. v0.9 extends `view`; it does not create a
510
- new top-level annotation workflow architecture.
511
-
512
- ### Frozen annotation evidence model
513
-
514
- v0.9 introduces one distinct persisted observer-owned annotation evidence
515
- family, `VisualAnnotationArtifact`, with initial schema version `1.0.0`.
516
- Annotations are not mutable fields added to observations, external references,
517
- comparisons, contracts, or evaluation artifacts. Original runtime observations,
518
- screenshots, imported/approved external references, and reference images remain
519
- immutable source evidence.
520
-
521
- Every explicit annotation save creates a new immutable annotation artifact
522
- instance. A later edit creates another artifact and may explicitly point
523
- forward to the previous instance through `supersedesAnnotationId`; the old
524
- artifact is never rewritten or deleted. Annotation logical/request identity is
525
- deterministic from canonical semantic content, while annotation instance
526
- identity is fresh for each persisted instance, following the repository's
527
- existing request-identity versus instance-identity pattern.
528
-
529
- Persisted annotation provenance must use canonical source identity. Human aliases
530
- such as `baseline` and `current`, viewer handles, viewer URLs, ports, absolute
531
- paths, and other session-local selectors must never become annotation identity.
532
- Aliases remain conveniences for selecting canonical artifacts before authoring.
533
-
534
- ### Frozen source contexts and coordinate domains
535
-
536
- Each annotation has exactly one source context:
537
-
538
- ```text
539
- runtime-observation
540
- external-reference
541
- ```
542
-
543
- Runtime annotations are tied to one canonical observation/screenshot identity
544
- and use the existing runtime screenshot coordinate domain: viewport CSS pixels.
545
- They do not multiply geometry by device pixel ratio, round to screenshot-device
546
- pixels, or invent a second transform.
547
-
548
- External-reference annotations are tied to one canonical reference/image
549
- identity and use reference-image pixels. Reference-image pixels are never
550
- silently treated as runtime CSS pixels.
551
-
552
- The existing runtime and reference SVG workspaces remain separate coordinate
553
- and identity domains. The same zoom/pan interaction machinery may be reused,
554
- but each workspace supplies its own frame. Annotation rendering should be a
555
- layer inside the existing source SVG coordinate frame rather than an
556
- independently transformed canvas.
557
-
558
- A reference-region ID is not a runtime-target identity. Runtime-target,
559
- reference-region, annotation-item, artifact, filesystem, source-symbol, and
560
- project-alias identities remain distinct even when explicit relationships link
561
- them.
562
-
563
- ### Frozen first annotation set
564
-
565
- The first persisted visual mark vocabulary is deliberately bounded to:
566
-
567
- ```text
568
- point
569
- rectangle
570
- line
571
- arrow
572
- note
573
- ```
574
-
575
- `select` and `pan` are viewer interaction modes, not persisted annotation
576
- marks. v0.9 does not add freehand drawing, polygons, Bezier paths, paint
577
- strokes, masks, arbitrary SVG input, OCR-driven regions, or computer-vision
578
- segmentation.
579
-
580
- The first human-facing intent operations are:
581
-
582
- ```text
583
- inspect
584
- move
585
- resize
586
- remove
587
- preserve
588
- ```
589
-
590
- External-reference annotation additionally supports candidate intent for:
591
-
592
- ```text
593
- reference-region
594
- reference-requirement
595
- asset-sensitive
596
- ```
597
-
598
- `asset-sensitive` and `inspect` may remain informational. Their existence must
599
- not silently add an acceptance rule.
600
-
601
- ### Explicit association, interpretation, and confirmation
602
-
603
- Drawing geometry alone does not establish semantic ownership or executable
604
- intent. Runtime annotation may associate with an existing runtime target or
605
- existing runtime relationship only through explicit structured selection.
606
- Reference annotation may associate with an existing reference region or
607
- existing reference relationship only through explicit structured selection.
608
-
609
- The following must never silently create association or binding:
610
-
611
- ```text
612
- name similarity
613
- rectangle overlap
614
- nearest element
615
- visual proximity
616
- drawing containment
617
- same textual identifier across runtime/reference domains
618
- ```
619
-
620
- An unbound drawing remains valid visual/narrative evidence but cannot be
621
- promoted into a canonical requirement that needs a structured target or region.
622
-
623
- Each annotation interpretation has an explicit state:
624
-
625
- ```text
626
- uninterpreted
627
- candidate
628
- confirmed
629
- ```
630
-
631
- The viewer may suggest a bounded candidate interpretation from explicit user
632
- choices and known canonical evidence, but ambiguous geometry never silently
633
- becomes a strong requirement. Only a `confirmed` interpretation may be selected
634
- for canonical promotion. Before confirmation, the viewer must show the exact
635
- candidate structured meaning that would be persisted/promoted.
636
-
637
- ### Canonical change-scope and contract reuse
638
-
639
- v0.9 reuses exactly the existing authored change-scope categories:
640
-
641
- ```text
642
- requested
643
- expected-dependent
644
- protected
645
- preserved
646
- ```
647
-
648
- For `expected-dependent`, the existing `required`/`permitted` mode remains
649
- mandatory. `unexpected` remains evaluator output and is never authorable through
650
- annotation.
651
-
652
- Runtime annotation does not introduce a second contract language. Confirmed
653
- runtime visual intent may promote only into the existing bounded
654
- `ContractPrimitive` vocabulary. High-value mappings include move/resize intent
655
- through existing `x`, `y`, `width`, and `height` property increase/decrease
656
- primitives and preserve intent through existing property-with-tolerance or
657
- relationship-unchanged primitives. Existing visibility, clipping, width-bound,
658
- overlap, relative-width, vertical-sequence, containment, page-width, and
659
- scroll-owner primitives remain available when they accurately represent the
660
- confirmed intent.
661
-
662
- The drawing is not itself the contract. Promotion produces an ordinary
663
- canonical `PerChangeContract`, using the existing contract identity,
664
- persistence, validation, conflict, evaluation, and PASS/FAIL semantics.
665
- Annotation does not evaluate contracts.
666
-
667
- The first version must preserve unsupported human intent honestly. In
668
- particular, `remove` can be represented and explicitly confirmed as annotation
669
- intent, but the current canonical contract vocabulary has no target-absent
670
- primitive. v0.9 therefore must not fabricate an approximate clause or expand the
671
- contract language merely to make `remove` executable. It remains confirmed but
672
- not canonically promotable until a future version deliberately extends the
673
- contract model.
674
-
675
- ### External-reference region and requirement authoring
676
-
677
- External-reference annotation may explicitly create or refine meaningful
678
- reference regions and may promote selected design requirements, but a drawn
679
- rectangle never turns every enclosed pixel into a requirement.
680
-
681
- A confirmed new region uses its annotation rectangle directly in the existing
682
- reference-image pixel domain. A confirmed refinement explicitly selects an
683
- existing region ID; the resulting new reference revision may retain that region
684
- identity while changing its rectangle. Relationship choices must come from the
685
- existing canonical reference-region relationship derivation rather than a
686
- viewer-only relationship engine.
687
-
688
- Confirmed reference requirements reuse the existing
689
- `RawReferenceRequirement` / `ReferenceRequirementSubject` model and the same
690
- authored change-scope categories. Supported subjects remain the existing
691
- bounded region-property, region-relationship, and region-measurement forms with
692
- existing reference tolerance semantics (`exact`, `absolute-reference-px`, or
693
- `percent` where applicable). Visible geometry that the user did not explicitly
694
- promote remains informational reference evidence.
695
-
696
- Materializing confirmed reference annotation creates a new immutable imported
697
- `ExternalReferenceArtifact` revision through the existing canonical reference
698
- persistence model. The new artifact carries forward unchanged image content,
699
- applicability, regions, and requirements except where selected confirmed intent
700
- explicitly adds or refines them; it explicitly supersedes the selected source
701
- reference. The prior reference remains unchanged. The new revision is not
702
- automatically approved and does not automatically replace the project's active
703
- approved reference. Approval and project reference selection remain separate,
704
- explicit governance actions.
705
-
706
- ### Annotation persistence and annotated rendering
707
-
708
- The structured annotation manifest is authoritative. v0.9 also derives one
709
- bounded system-generated annotation overlay, `annotation-overlay.svg`, for each
710
- saved annotation artifact. The overlay uses the same source-native coordinate
711
- frame recorded by the artifact, contains only validated system-generated SVG,
712
- and has an integrity digest. It does not embed arbitrary user SVG/HTML and does
713
- not copy the underlying screenshot or external-reference image.
714
-
715
- The annotated visual is reconstructed as:
716
-
717
- ```text
718
- canonical source image
719
- +
720
- structured annotation overlay
721
- ```
722
-
723
- The derived overlay is not a second evidence or interpretation model. If any
724
- presentation bug causes disagreement, structured annotation data remains the
725
- authority.
726
-
727
- ### Viewer authoring and security boundary
728
-
729
- Normal annotation authoring is available through project-aware:
730
-
731
- ```text
732
- my-frontend-observer view
733
- ```
734
-
735
- inside a valid initialized project. Existing advanced
736
- `my-frontend-observer view --root <evidence-root>` remains a supported
737
- inspection surface and stays read-only when it is not operating with the normal
738
- initialized-project authoring context.
739
-
740
- Because v0.8 intentionally exposed only GET/HEAD inspection routes, v0.9 may add
741
- POST only for the narrow annotation-authoring and confirmed-promotion operations
742
- required by this version. It must not add arbitrary filesystem writes, target
743
- source writes, PUT/PATCH/DELETE mutation APIs, permissive CORS, or a generic
744
- local RPC endpoint.
745
-
746
- The project-aware viewer authoring session must use a short-lived in-memory
747
- capability token plus strict loopback same-origin/Host enforcement, bounded JSON
748
- bodies, and canonical server-side resolution of evidence handles to source
749
- artifacts. The browser must never supply arbitrary output paths. The token is
750
- session-only, is not persisted as project/evidence identity, and must not become
751
- service-worker cached authority.
752
-
753
- Annotation persistence follows the repository's established immutable artifact
754
- pattern: structural validation before write, fresh final instance directory,
755
- sibling temporary directory, deterministic owned-media generation, manifest
756
- write, atomic rename, no overwrite, and cleanup on failure.
757
-
758
- Project-managed annotation evidence belongs under the managed Observer evidence
759
- root using canonical IDs. v0.9 does not introduce an annotation alias catalog.
760
-
761
- ### Conflict and revision rules
762
-
763
- Annotation revision conflict is handled by explicit lineage, not last-write-wins.
764
- A revision save identifies the canonical parent annotation. A stale edit must be
765
- rejected rather than silently overwrite newer evidence. If malformed/historical
766
- evidence presents multiple lineage heads, the viewer must expose that ambiguity
767
- and require an explicit choice rather than select a winner by timestamp.
768
-
769
- Semantic contract conflicts remain owned by the existing contract validators and
770
- evaluator. Reference requirement validity/adequacy remains owned by the existing
771
- reference model. Annotation must not add a second conflict-resolution engine.
772
- Unsupported confirmed intent is reported as unsupported for canonical promotion,
773
- not silently converted to PASS, FAIL, or another requirement.
774
-
775
- ### Canonical intent flow
776
-
777
- The version-level flow is:
778
-
779
- ```text
780
- runtime screenshot annotation OR external-reference annotation
781
- → explicit source-domain association where reliable
782
- → candidate requested/dependent/protected/preserved or informational intent
783
- → explicit interpretation/confirmation
784
- → save immutable structured annotation evidence
785
- → selected confirmed runtime intent may become a canonical per-change contract
786
- OR
787
- selected confirmed reference intent may become a new imported reference revision
788
- → existing contract/reference approval and evaluation workflows remain authoritative
789
- ```
790
-
791
- This version stops before the full post-edit human/LLM correction loop. v0.10
792
- owns automatic workflow coordination around external coding-agent source edits,
793
- rerendering, repeated `check <baseline> --json`, final human approval, and
794
- baseline/reference governance across correction iterations.
795
-
796
- ### Dependencies/ecosystem/compatibility
797
-
798
- v0.9 depends on:
799
-
800
- - stable runtime observation and target identity;
801
- - existing relationship and comparison evidence;
802
- - existing baseline/per-change contract vocabulary and evaluator;
803
- - v0.7 external-reference identity, region, requirement, applicability,
804
- binding, compatibility, fidelity, and bounded-context integration;
805
- - v0.8 viewer server, runtime/reference SVG workspaces, source-domain coordinate
806
- rendering, zoom/pan, metadata-first discovery, safe media resolution, and
807
- explicit binding cross-selection;
808
- - v0.8.1 project discovery, managed evidence root, human-readable aliases,
809
- project-aware viewer startup, and canonical identity resolution beneath
810
- aliases.
811
-
812
- Existing observation, comparison, frontend-contract, evaluation,
813
- bounded-agent-context, and external-reference schema semantics remain
814
- independently authoritative. Annotation may reference and promote into them but
815
- must not redefine them.
816
-
817
- The existing bounded agent-context system may later include relevant annotation
818
- references/structured annotation evidence as part of the proven coding-agent
819
- workflow, but heavy source images or unrelated annotation history should not be
820
- embedded by default. v0.9 does not require changes to my-dev-kit,
821
- orchestrator, or lab unless an actual compatibility need is demonstrated during
822
- implementation.
823
-
824
- ### Exclusions
825
-
826
- v0.9 explicitly excludes:
827
-
828
- ```text
829
- application source editing
830
- automatic coding-agent execution
831
- full correction-loop orchestration
832
- image-to-code or raster-to-HTML/CSS/SVG generation
833
- automatic target discovery
834
- automatic reference/runtime binding
835
- automatic reference-region detection
836
- OCR-driven requirements
837
- computer-vision segmentation
838
- freehand drawing or arbitrary SVG authoring
839
- a second contract/change-scope taxonomy
840
- a second reference-requirement taxonomy
841
- a second PASS/FAIL evaluator
842
- automatic reference approval
843
- automatic baseline approval or replacement
844
- automatic approved-reference replacement
845
- cloud synchronization
846
- accounts/authentication/collaboration/comment threads
847
- database storage
848
- making annotation mandatory for ordinary capture/check/coding-agent workflows
849
- ```
850
-
851
- ### Acceptance
852
-
853
- v0.9 is complete only when all of the following are true:
854
-
855
- - a user can annotate an existing runtime observation in the project-aware
856
- viewer and save/reload it without coordinate drift;
857
- - a user can annotate an imported or approved external reference and save/reload
858
- it in reference-image coordinates;
859
- - saved annotations remain tied to exact canonical source identities even when a
860
- human alias later points somewhere else;
861
- - runtime-target, runtime-relationship, reference-region, and
862
- reference-relationship associations occur only when explicitly and reliably
863
- selected;
864
- - zoomed/panned drawing maps back to the same source-native coordinates used by
865
- the existing SVG workspace;
866
- - point/rectangle/line/arrow/note marks persist as structured evidence, not only
867
- flattened pixels;
868
- - preserve/resize/move/remove/inspect intent can be represented, with unsupported
869
- executable mappings reported honestly;
870
- - ambiguous or unbound drawings cannot silently become strong requirements;
871
- - a supported confirmed runtime move/resize/preserve intent can produce a normal
872
- canonical per-change contract without a second contract evaluator;
873
- - selected confirmed external-reference region/requirement intent can produce a
874
- new immutable imported reference revision without modifying or approving the
875
- source reference;
876
- - informational notes/asset-sensitive regions remain informational unless
877
- explicitly promoted through a supported canonical model;
878
- - annotation revision conflicts fail explicitly instead of overwriting history;
879
- - original observation artifacts, screenshots, external-reference artifacts,
880
- and reference images remain unchanged;
881
- - the bounded local write surface rejects unauthorized origins, missing/invalid
882
- session capability, unsafe paths, unsupported methods, and malformed/oversized
883
- requests;
884
- - existing v0.8 viewer inspection and v0.8.1 `init`/`capture`/`check`/`view`
885
- workflows remain backward compatible;
886
- - a clean packed npm candidate proves annotation save/reload and canonical
887
- promotion behavior, with the existing cross-platform/security validation
888
- expectations preserved.
889
-
890
- The frozen concrete module contracts, validation rules, test responsibilities,
891
- seven implementation prompts, and batch gates live in
892
- `docs/plans/v0.9-implementation-plan.md`. That plan must be derivable from the
893
- version-level decisions above plus current repository inspection; this roadmap
894
- intentionally does not duplicate batch-by-batch instructions.
895
-
896
- ## v0.9.1 — PWA Hard-Gate Isolation and Reproducible Security Acceptance
897
-
898
- Current status: released as `0.9.1`. The concrete implementation plan remains
899
- frozen in `docs/plans/v0.9.1-implementation-plan.md`.
900
- This patch is maintenance work over the released v0.9.0 codebase and does not
901
- change the v0.9 product capability model.
902
-
903
- Objective/problem: make the PWA server-down hard acceptance proof genuinely
904
- self-contained. The released test in `tests/browser/pwaHardening.test.ts`
905
- passes in the normal full-file/full-suite order but fails when selected alone
906
- because it can inherit service-worker/cache state from earlier tests and from a
907
- fixed persistent Chromium profile. That is a test-isolation defect. It is not
908
- evidence that the released PWA serves stale evidence or otherwise violates the
909
- runtime safety contract.
910
-
911
- Required capabilities: the hard gate must create and own fresh disposable
912
- evidence state, a fresh viewer server, a fresh persistent Chromium profile, a
913
- fresh BrowserContext, and its page; independently establish service-worker
914
- registration and activation; prove that the current page is controlled by the
915
- worker; prove the application shell needed for offline reload is precached;
916
- prove `/api/` evidence responses are absent from Cache Storage; prove live
917
- evidence is visible before shutdown; prove the server/network is actually
918
- unavailable after shutdown; reload from the precached shell; then prove an
919
- explicit unavailable state is shown and previously fetched evidence is absent.
920
- All owned resources must be cleaned up even on failure.
921
-
922
- Constraints and contracts: the hard/security acceptance experiment must not
923
- depend on another `it()`, test order, a previously warmed Cache Storage, or a
924
- profile retained under `.my-dev-kit-workflow`. Tests explicitly designated
925
- `HARD GATE`, `SECURITY GATE`, or `ACCEPTANCE GATE` must be independently
926
- runnable from fresh state. The dedicated isolated hard-gate command and the
927
- normal full browser/security suites must exercise the same product behavior.
928
-
929
- Exclusions: no production PWA/service-worker semantic change is authorized
930
- merely to make the test green; no new user-facing feature, evidence schema,
931
- CLI command, package dependency, tutorial behavior, or v0.10 capability belongs
932
- in this patch. If the corrected clean-state experiment exposes a genuine
933
- runtime defect, implementation must stop and reclassify the work as a product
934
- defect before changing production behavior.
935
-
936
- Acceptance: the PWA hard gate passes when run by itself from a fresh process and
937
- fresh temporary profile, passes in the complete `pwaHardening.test.ts` file,
938
- and passes in the normal browser/security validation chain. The test must prove
939
- its own service-worker control, shell-cache, API-cache-exclusion, network-down,
940
- and stale-evidence-absence prerequisites rather than infer them from another
941
- test. Temporary browser profiles and evidence roots must be removed after both
942
- success and failure. Release-readiness validation must preserve the v0.9.0
943
- product/package behavior while proving the stronger test-isolation invariant.
944
-
945
- ## v0.10 — Full Visual Human–LLM Frontend Change Workflow
946
-
947
- Objective/problem: complete the visual communication branch by combining the
948
- already operational coding-agent loop with graphical inspection, external design
949
- references, structured annotation, and the v0.8.1 project-level acceptance
950
- surface so ordinary correction iterations do not require direct artifact-path
951
- plumbing.
952
-
953
- Two visual entry modes must coexist:
954
-
955
- ```text
956
- actual-frontend-driven
957
- human views actual captured frontend
958
- → points/draws/annotates requested design change
959
- ```
960
-
961
- and:
962
-
963
- ```text
964
- reference-driven
965
- human supplies/selects an approved external visual reference
966
- → views reference beside the actual captured frontend
967
- → identifies/annotates relevant reference regions and intent
968
- → binds confirmed reference intent to stable runtime regions
969
- ```
970
-
971
- Both then converge on the same canonical workflow:
972
-
973
- ```text
974
- confirmed requested/dependent/protected/preserved scope
975
- → bounded runtime + relevant reference evidence is produced
976
- → bounded static evidence is obtained
977
- → coding-agent context is assembled
978
- → external coding agent modifies source
979
- → observer rerenders
980
- → before/after comparison runs
981
- → reference design vs candidate evaluation runs when applicable
982
- → requested/dependent/protected/preserved behavior and baseline contracts run
983
- → unexpected changes remain explicit
984
- → viewer shows PASS or actionable failure evidence
985
- → human approves or requests correction
986
- → successful state may become the new approved baseline and/or explicitly
987
- supersede an approved reference according to project policy
988
- ```
989
-
990
- The ordinary machine-facing post-edit correction loop must reuse the canonical
991
- `check <baseline> --json` surface. v0.10 must not reconstruct before/after
992
- comparison, frontend-contract verdicts, reference fidelity, or workflow
993
- PASS/FAIL/BLOCKED precedence when v0.8.1 already provides them.
994
-
995
- Architectural/evidence constraints: a visual request or reference does not
996
- erase existing baseline contracts. Unless explicitly superseded, existing
997
- approved contracts plus the new visual/per-change contract must both pass.
998
- Reference fidelity is an additional evidence/evaluation dimension, not blanket
999
- authorization for unrelated change. Runtime, reference, static, annotation,
1000
- workflow, implementation, approval, baseline, and supersession evidence remain
1001
- separate and traceable. The observer stays non-mutating; the orchestrator
1002
- coordinates bounded evidence; the lab is not required for every normal edit.
1003
-
1004
- A mature result may therefore combine before/after results, reference/candidate
1005
- results, persistent-baseline evaluation, per-change evaluation, and unexpected
1006
- changes. A reference-fidelity pass with a protected or preserved contract
1007
- failure is overall failure. A raw imported image never silently becomes an
1008
- approved reference, and an approved reference never silently supersedes an
1009
- existing baseline or another approved reference.
1010
-
1011
- Dependencies/ecosystem/compatibility: depends on all prior versions, especially
1012
- the v0.7 core/reference loop, v0.8 viewer, v0.8.1 project workflow/acceptance
1013
- surface, and v0.9 dual-context annotation intent model. Use exact compatible
1014
- observer/static/orchestrator/context/reference/annotation/viewer contracts and
1015
- retain the four-project responsibility split.
1016
-
1017
- Exclusions: replacing the external coding agent with observer source editing,
1018
- visual/reference intent silently overriding baseline contracts, autonomous
1019
- image-to-code generation, automatic raster-to-vector reconstruction, opaque
1020
- AI-only verdicts, untraceable baseline/reference replacement, and making lab
1021
- evaluation part of every edit.
1022
-
1023
- Acceptance: demonstrate a successful actual-frontend-driven visual change; a
1024
- successful reference-driven design-replication change; measurable actionable
1025
- reference/candidate failure evidence; a requested visual/reference change that
1026
- introduces a protected-property or preserved-invariant regression; a correction
1027
- cycle; human approval and explicit baseline/reference history; and compatible
1028
- integrated ecosystem evidence. A protected/invariant failure must fail overall
1029
- even when the requested local visual change or reference-fidelity requirement
1030
- succeeds. Version-start planning must settle visual workflow entry points,
1031
- approval identity and authority, reference selection/applicability, baseline and
1032
- reference governance, correction iteration history, artifact retention, and
1033
- cross-version compatibility.
1
+ # Roadmap
2
+
3
+ Current release: v0.10.1, Project Check Baseline Context Replay.
4
+ The v0.9.1 PWA hard-gate isolation maintenance release is preserved in history.
5
+
6
+ This is a version-level specification, not an implementation checklist.
7
+ Concrete steps and sequencing are designed only when a version begins, after
8
+ the planner reads that version, inspects current repository state, and performs
9
+ needed my-dev-kit retrieval and architecture work. Once those version-start
10
+ decisions are frozen, this roadmap records the durable version-level design so
11
+ a later planner can reconstruct the intended implementation without stitching
12
+ critical architecture decisions across reports, chats, or batch prompts. Exact
13
+ files, interfaces, tests, batch gates, and prompt sequencing belong in the
14
+ version implementation plan.
15
+
16
+ ## v0.1 — Runtime Observation Foundation
17
+
18
+ Current status: released as `0.1.0`, published to npm and validated as a
19
+ packed npm tarball in a clean consumer environment on Windows, Linux, and
20
+ macOS. See `docs/CURRENT_STATE.md` for the implementation summary.
21
+
22
+ Objective and user problem: establish trustworthy evidence of what a local
23
+ frontend actually rendered, rather than relying on source inference.
24
+
25
+ Required capabilities: Node.js 24+ TypeScript CLI; explicit loopback URL,
26
+ viewport, CSS targets, and output; real Playwright Chromium capture; viewport
27
+ PNG; bounded page/target evidence; versioned portable artifact; provenance,
28
+ diagnostics, completion state, and explicit available/unavailable/not-applicable/
29
+ partial semantics.
30
+
31
+ Constraints and contracts: one reusable application service behind a thin CLI,
32
+ one Chromium adapter, external non-destructive targets, loopback-only request/
33
+ redirect/subresource policy, no full DOM/style dump, observer-owned schema
34
+ `1.0.0` independent of package version. Direct browser, computed-browser, and
35
+ derived evidence remain distinguishable.
36
+
37
+ Dependencies/ecosystem/compatibility: greenfield foundation only; no runtime
38
+ dependency or modification of my-dev-kit, orchestrator, or lab. Windows and
39
+ portable structured evidence matter; screenshot bytes need not match across OS.
40
+
41
+ Exclusions: semantic identity expansion, scrolling actions, relationships,
42
+ comparison, contracts, LLM packets, viewer, annotation, integrations, remote
43
+ browsing, credentials, cloud browsers, additional engines, databases, Docker,
44
+ plugins, and static analysis.
45
+
46
+ Acceptance: deterministic loopback fixture drives real Chromium; screenshot is
47
+ a valid nonempty PNG; page and explicit targets expose required measurements;
48
+ missing targets are honest; all validation commands pass. Planning must confirm
49
+ capture-readiness semantics, exact diagnostics, public compatibility boundaries,
50
+ and the concrete dependency/version set before implementation.
51
+
52
+ ## v0.2 — Stable Semantic Targets and Region Identity
53
+
54
+ Current status: released as `0.2.0`, published to npm and validated as a
55
+ packed npm tarball in a clean consumer environment on Windows, Linux, and
56
+ macOS. See `docs/CURRENT_STATE.md` for the implementation summary.
57
+
58
+ Objective/problem: let humans and consumers refer reliably to conceptual
59
+ rendered regions across observations without brittle selector-only identity.
60
+ Required capabilities include semantic HTML, accessibility role/name, stable
61
+ id/data attributes, bounded fallbacks, resolution confidence/status, ambiguity,
62
+ and missing evidence. Runtime identity remains observer-owned and distinct from
63
+ source symbols. Depends on v0.1 artifacts and adapter boundaries; schema changes
64
+ must be additive where compatible. No scrolling, comparison, contracts, source
65
+ ownership, or viewer. Acceptance requires repeatable semantic resolution across
66
+ fixtures and explicit ambiguity. Planning must decide selector precedence and
67
+ identity persistence rules from current evidence.
68
+
69
+ ## v0.3 — Runtime Scrolling, Overflow, and Visibility Behavior
70
+
71
+ Current status: released as `0.3.0`, published to npm and validated as a
72
+ packed npm tarball in a clean consumer environment on Windows, Linux, and
73
+ macOS (observation schema `1.2.0`). See `docs/CURRENT_STATE.md` for the
74
+ implementation summary.
75
+
76
+ Objective/problem: show which container actually scrolls and what becomes
77
+ visible, clipped, or overflowing after controlled actions. Required capabilities
78
+ are bounded action scenarios, before/after window and target scroll positions,
79
+ viewport intersection/visibility, document/element overflow, and supported
80
+ derived scroll-owner interpretation. Depends on stable targets. Browser actions
81
+ are authoritative; derived claims cite facts. No general interaction recorder,
82
+ comparison engine, or contract semantics. Acceptance requires real-browser
83
+ fixtures for document and nested scroll owners. Planning must settle action
84
+ syntax, stabilization, and visibility thresholds.
85
+
86
+ ## v0.4 — Layout Relationships, Dependency Evidence, and Before/After Comparison
87
+
88
+ Current status: released as `0.4.0`, published to npm and validated as a
89
+ packed npm tarball in a clean consumer environment on Windows, Linux, and
90
+ macOS. See `docs/CURRENT_STATE.md` for the implementation summary.
91
+
92
+ Objective/problem: explain whole-layout consequences rather than isolated
93
+ numbers. Required capabilities are containment/order/overlap/fit relationships,
94
+ comparable observation identity, before/after differences, appearance and
95
+ disappearance, geometry/visibility/overflow/relationship changes, screenshot
96
+ references, and explicit expected dependency evidence. Depends on v0.1–v0.3.
97
+ One canonical relationship and comparison layer serves all consumers;
98
+ co-change does not prove causation; causation requires explicit intent, a
99
+ contract, or another supported dependency source. No executable contracts or UI. Acceptance
100
+ requires bounded deterministic comparison with underlying evidence references.
101
+ Planning must settle comparability and tolerance semantics.
102
+
103
+ ## v0.5 — Executable Frontend Contracts and Explicit Change Scope
104
+
105
+ Current status: released as `0.5.0`, published to npm and validated as a
106
+ packed npm tarball in a clean consumer environment on Windows, Linux, and
107
+ macOS (observation schema `1.2.0`, comparison schema `1.0.0`, frontend
108
+ contract schema `1.0.0`, evaluation artifact schema `1.0.0`). See
109
+ `docs/CURRENT_STATE.md` for the implementation summary.
110
+
111
+ Objective/problem: prevent a requested local fix from silently breaking an
112
+ approved region or invariant. Required capabilities are baseline invariants,
113
+ requested/expected-dependent/protected/preserved classifications, explicit
114
+ unexpected-change results, responsive tolerances, one canonical evaluation
115
+ engine, actionable verdicts, and baseline supersession history. Both persistent
116
+ baseline contracts and per-change contracts are required. Depends on v0.4
117
+ comparison and explicit intent evidence.
118
+ Existing approved contracts remain active unless the user supersedes them.
119
+ No LLM packaging, viewer, or annotation UI. Acceptance requires fixtures where
120
+ the requested change passes but a protected property fails. Planning must settle
121
+ contract storage, approval, tolerance, and conflict resolution.
122
+
123
+ ## v0.6 — Bounded Agent Context and Native my-dev-kit Ecosystem Integration
124
+
125
+ Current status: released as `0.6.0`, from the `canonicalization/v0.6`
126
+ lineage. See `docs/CURRENT_STATE.md` for the implementation summary.
127
+
128
+ Objective/problem: make the observer useful to an actual coding-agent workflow
129
+ by answering the smallest trustworthy runtime-plus-static context question. A
130
+ coding agent needs task-relevant rendered facts, change-scope and contract
131
+ evidence, and relevant bounded source evidence without consuming the full
132
+ repository or an unbounded browser dump.
133
+
134
+ Required capabilities: bounded runtime projections containing page/viewport
135
+ identity, stable targets, important geometry and runtime behavior,
136
+ relationships, before/after differences, contract results,
137
+ requested/dependent/protected/preserved scope, diagnostics, artifact/screenshot
138
+ references, provenance, and truncation/omission metadata; adequacy reporting;
139
+ explicit runtime/static correlation to current `my-dev-kit` identities and
140
+ bounded retrieval where reliable; observer correlation/export boundary;
141
+ orchestrator bounded runtime-evidence consumption; and exact lab
142
+ readers/fixtures/evaluation needed to prove compatibility.
143
+
144
+ Architectural/evidence constraints: runtime identity never silently becomes
145
+ source ownership; ambiguity and competing candidates remain explicit. The
146
+ observer owns runtime evidence, bounded runtime projection, and
147
+ correlation/export. `my-dev-kit` owns static indexing, architecture,
148
+ dependencies, probable ownership evidence, and retrieval. The orchestrator
149
+ coordinates bounded runtime plus static evidence but does not run the browser,
150
+ redefine observer semantics, embed huge raw artifacts, or duplicate retrieval.
151
+ The lab evaluates exact supported contracts and is not required for every
152
+ normal frontend edit. Do not introduce a shared schema package without a
153
+ demonstrated ownership/release need.
154
+
155
+ Dependency direction:
156
+
157
+ ```text
158
+ freeze bounded-agent-context and integration contract
159
+ → determine whether my-dev-kit requires a static-side change
160
+ → implement observer bounded projection/correlation/export
161
+ → implement orchestrator bounded runtime-evidence consumption
162
+ → add lab exact readers/fixtures/evaluation needed for compatibility
163
+ → run individual repository readiness
164
+ → run coordinated exact-version validation
165
+ ```
166
+
167
+ This is cross-repository dependency direction, not an implementation batch
168
+ plan. Modify `my-dev-kit` only if current identities/retrieval lack a generic
169
+ static-side capability actually required by the frozen contract.
170
+
171
+ Dependencies/ecosystem/compatibility: depends on v0.1–v0.5 stable observation,
172
+ identity, behavior, comparison, relationship, contract, and change-scope
173
+ semantics. Potentially affected repositories are observer, orchestrator, lab,
174
+ and only when proven necessary, `my-dev-kit`. Pin package/candidate identities,
175
+ schema/artifact/context versions, consumer expectations, and fixture hashes;
176
+ validate downstream consumers against intended candidates rather than stale
177
+ published packages.
178
+
179
+ Exclusions: viewer, visual annotation, source editing, a new static analyzer,
180
+ browser execution in the orchestrator, broad lab product work, external LLM
181
+ APIs, full DOM/style/accessibility dumps, unrelated observations, and embedded
182
+ heavy assets where references suffice.
183
+
184
+ Acceptance: a coding agent or LLM receives bounded traceable runtime problem
185
+ evidence plus change scope/contracts plus relevant static/source evidence;
186
+ adequacy/omission/truncation and correlation ambiguity remain visible; producer
187
+ responsibilities stay distinct; exact lab consumers pass; each affected
188
+ repository passes readiness; and coordinated exact-version validation passes.
189
+ Version-start planning must decide projection profiles, redaction/text limits,
190
+ correlation ownership/evidence, the orchestrator evidence-kind representation,
191
+ whether `my-dev-kit` changes are necessary, and whether any shared contract
192
+ package is justified.
193
+
194
+ ## v0.7 — End-to-End Coding-Agent Frontend Change Review
195
+
196
+ Current status: released as `0.7.0`. See `docs/CURRENT_STATE.md`,
197
+ `docs/reports/v0.7-implementation-completeness-documentation-reconciliation.md`
198
+ for the completeness audit, and
199
+ `docs/reports/v0.7-pre-release-readiness.md` for the cross-platform
200
+ readiness validation that preceded release. The required capabilities,
201
+ constraints, and acceptance criteria below are preserved as originally
202
+ planned and describe what the implementation actually satisfies.
203
+
204
+ Objective/problem: prove the core practical outcome before graphical work: a
205
+ text/config-driven coding-agent correction loop that cannot call a local
206
+ requested mutation successful while protected behavior regresses, and establish
207
+ the non-graphical evidence foundation required when the desired frontend is
208
+ supplied as an external visual reference rather than an earlier runtime state.
209
+
210
+ Required capabilities:
211
+
212
+ ```text
213
+ capture approved baseline
214
+ → preserve baseline contracts
215
+ → human expresses requested change in text/config
216
+ and may supply an external visual reference
217
+ → construct requested/dependent/protected/preserved scope
218
+ → when a reference is supplied, establish explicit reference identity,
219
+ applicable viewport/theme/application-state identity, reference regions,
220
+ authored design intent, tolerances, and reference-to-runtime target binding
221
+ → generate bounded runtime evidence
222
+ → evaluate reference design vs candidate where applicable
223
+ → obtain relevant bounded static evidence
224
+ → assemble coding-agent context
225
+ → external coding agent modifies target source
226
+ → observer captures new state
227
+ → compare before/after
228
+ → reevaluate reference design vs candidate where applicable
229
+ → evaluate requested changes
230
+ → evaluate expected dependent changes
231
+ → verify protected properties
232
+ → rerun baseline contracts
233
+ → PASS or actionable regression/fidelity failure
234
+ ```
235
+
236
+ The external reference is evidence, not source code and not an earlier
237
+ `ObservationArtifact`. Reference design vs candidate is therefore a distinct
238
+ comparison category from before vs after and contract vs candidate. The first
239
+ reference model must preserve deterministic reference identity and provenance,
240
+ image dimensions/format, explicit bounded reference regions, coordinate
241
+ semantics, reusable layout relationships where appropriate, authored design
242
+ requirements, tolerances, applicability state, approval/supersession history,
243
+ and explicit reference-region to runtime-target bindings whose status may be
244
+ explicit, ambiguous, unavailable, or otherwise conservatively represented.
245
+ Exact artifact/type names are selected during version-start architecture work;
246
+ this roadmap does not freeze a schema name.
247
+
248
+ Reference applicability must be evaluated before fidelity differences are
249
+ interpreted. A dark-theme active-state reference compared with a light-theme
250
+ idle candidate must become an explicit incompatible/incomparable result rather
251
+ than a meaningless list of visual failures. Planning must extend or reuse the
252
+ canonical comparability/state-identity model instead of creating a
253
+ reference-only state system.
254
+
255
+ Reference-derived executable intent must feed the existing v0.5 canonical
256
+ requested/expected-dependent/protected/preserved contract semantics. Visible
257
+ reference details may remain informational or unassessed until a human or
258
+ explicit configuration promotes them into requirements. Do not create a second
259
+ reference-only PASS/FAIL taxonomy.
260
+
261
+ Structured evidence is primary: geometry, spacing, selected style evidence,
262
+ relationships, applicability, and contract intent must remain inspectable and
263
+ traceable. Bounded screenshot-region or asset-similarity evidence may supplement
264
+ structured evidence where reliable, but pixel/image similarity alone must not
265
+ determine success. Text rendering, antialiasing, glow, shadows, gradients, and
266
+ platform/font differences require property-specific or evidence-specific
267
+ tolerance semantics rather than one global pixel-perfect threshold.
268
+
269
+ The coding-agent handoff must be actionable and bounded. Instead of only saying
270
+ "match the reference," it should be able to report the relevant target,
271
+ reference measurement, candidate measurement, delta, failed relationship or
272
+ style requirement, active protected/preserved constraints, provenance, and
273
+ bounded static/source context. Heavy image bytes and unrelated regions must not
274
+ be embedded into every agent packet when references suffice.
275
+
276
+ Unexpected changes remain explicit. Existing approved baseline contracts and
277
+ the new per-change contract both remain active unless explicitly superseded. A
278
+ reference-fidelity pass never authorizes a protected regression or silently
279
+ replaces an approved baseline/reference.
280
+
281
+ Architectural/evidence constraints: the observer does not edit target source; an
282
+ external coding agent or implementation tool does. All runtime, reference,
283
+ static, workflow, implementation, and verification identities remain separate
284
+ and traceable to their owners. One canonical observer, relationship,
285
+ comparison/evaluation, contract, change-scope, reference, and bounded-context
286
+ model must serve later UI consumers. Reference regions are not runtime targets,
287
+ and neither identity silently becomes source ownership.
288
+
289
+ Dependencies/ecosystem/compatibility: depends on v0.6 bounded integrated agent
290
+ context and v0.1–v0.5 evidence/contract foundations. Use compatible exact
291
+ observer, `my-dev-kit`, orchestrator, and lab contract versions established by
292
+ v0.6; the lab remains optional for ordinary edits once compatibility is proven.
293
+ The new reference evidence must be project-local and portable, with heavy image
294
+ content referenced rather than duplicated throughout downstream artifacts.
295
+
296
+ Exclusions: graphical inspection as a prerequisite, graphical annotation
297
+ authoring, observer source editing, autonomous approval, hidden baseline or
298
+ reference supersession, automatic image-to-code generation, raster-to-HTML or
299
+ raster-to-SVG reconstruction, a general computer-vision framework, a Figma or
300
+ Canva replacement, and pixel-diff-only acceptance.
301
+
302
+ Acceptance: controlled successful and failing changes complete end-to-end. The
303
+ required baseline failure case has a requested change succeed while a protected
304
+ property or preserved invariant fails, producing overall failure and actionable
305
+ evidence. A reference-driven proof case additionally supplies an approved
306
+ external reference, binds selected reference regions to runtime targets,
307
+ produces measurable structured reference/candidate mismatches, sends only
308
+ relevant correction evidence plus bounded static context to the external coding
309
+ agent, rerenders, and reevaluates. A reference-fidelity success must still fail
310
+ overall when an active baseline/per-change contract fails. Version-start
311
+ planning must decide the text/config request format, reference artifact and
312
+ lifecycle contract, supported image formats and size bounds, coordinate model,
313
+ region/relationship representation, applicability/theme/application-state
314
+ identity, tolerance and selected style-evidence model, optional image-similarity
315
+ boundaries, coding-agent handoff boundary, controlled target/change mechanism,
316
+ approval/baseline/reference history, failure reporting, and exact workflow entry
317
+ points.
318
+
319
+ ## v0.8 — Interactive Local Observation Viewer
320
+
321
+ Current status: released as `v0.8.0` (all eight implementation batches
322
+ passed, followed by the hardened documentation/implementation-completeness
323
+ audit and formal cross-platform/security pre-release readiness - see
324
+ `docs/CURRENT_STATE.md`). The required capabilities, constraints, and
325
+ acceptance criteria below are preserved as originally planned and describe
326
+ what the implementation actually satisfies.
327
+
328
+ Objective/problem: let developers inspect and understand the same canonical
329
+ evidence already used by the operational coding-agent workflow without opening
330
+ raw artifact files manually, including external design references and their
331
+ candidate-fidelity evidence when present.
332
+
333
+ Required capabilities: local artifact/context/reference readers; screenshot and
334
+ stable target inspection; external-reference image and reference-region
335
+ inspection; geometry, semantics, scrolling/overflow, visibility, relationships,
336
+ and before/after views; reference/candidate views; diagnostics and honest
337
+ evidence states; requested/dependent/protected/preserved/unexpected
338
+ classifications; baseline and per-change contract results; reference
339
+ applicability and fidelity results; reference-region/runtime-target binding and
340
+ ambiguity; source-correlation evidence with uncertainty; and navigation between
341
+ relevant raw evidence and bounded agent-context references.
342
+
343
+ The viewer should support a clear reference/candidate inspection mode with, as
344
+ appropriate, side-by-side images, overlays, synchronized region selection and
345
+ zoom, reference and candidate measurements, difference highlighting,
346
+ provenance, binding status, and contract/reference evaluation results. It must
347
+ show unsupported, partial, unavailable, derived, ambiguous, and incomparable
348
+ states honestly rather than converting them into apparent fidelity scores.
349
+
350
+ Architectural/evidence constraints: the viewer consumes existing observation,
351
+ relationship, comparison, contract, change-scope, correlation, bounded-context,
352
+ and v0.7 reference/evaluation engines/contracts. It must not create a second
353
+ observer, relationship engine, comparison engine, contract engine, reference
354
+ model, reference-evaluation engine, correlation implementation, or context
355
+ builder. CLI/programmatic paths remain first-class, viewer state does not mutate
356
+ targets, and merely opening/importing a reference in the viewer does not
357
+ silently approve or supersede it.
358
+
359
+ Dependencies/ecosystem/compatibility: depends on the proven v0.7 workflow and
360
+ stable v0.1–v0.7 artifacts/contracts. It may display ecosystem correlation but
361
+ does not redefine it. Viewer readers must declare supported artifact/context/
362
+ reference versions and show unsupported, missing, partial, derived, ambiguous,
363
+ and incomparable evidence honestly.
364
+
365
+ Exclusions: annotation authoring, source editing, a second workflow engine,
366
+ automatic design generation, cloud hosting, and making the viewer mandatory for
367
+ observation or coding-agent review.
368
+
369
+ Acceptance: a developer can inspect screenshots, targets, runtime behavior,
370
+ relationships, changes, contracts, diagnostics, change scope, correlation, and
371
+ reference/candidate evidence through the UI, and the displayed evidence is
372
+ demonstrably the same canonical evidence used by CLI/programmatic and
373
+ coding-agent workflows. A developer can select a reference region and see the
374
+ bound runtime target and measured mismatch where available without the viewer
375
+ recomputing a second result.
376
+
377
+ Version-start planning decisions are now resolved for v0.8:
378
+
379
+ - UI: React + TypeScript + Vite;
380
+ - application boundary: normal browser + Node-backed local server + installable
381
+ Progressive Web App using the same viewer application;
382
+ - reader architecture: existing canonical readers feed an ephemeral viewer
383
+ adapter/projection rather than a new persisted viewer artifact;
384
+ - reference/candidate display: side-by-side by default with independently
385
+ toggleable structured overlays;
386
+ - geometry rendering: SVG using each source artifact/image's original coordinate
387
+ domain;
388
+ - interaction: explicit-binding cross-selection, independent zoom/pan, and
389
+ synchronized/locked viewing only when existing compatibility evidence permits
390
+ it;
391
+ - loading: metadata/index first, with full artifacts and images loaded on demand.
392
+
393
+ The frozen concrete batch plan and implementation sequencing live in
394
+ `docs/plans/v0.8-implementation-plan.md`; this roadmap intentionally does not
395
+ copy those batches.
396
+
397
+ ## v0.8.1 — Project Workflow CLI and Human-Readable Evidence Aliases
398
+
399
+ Current status: released as `v0.8.1` and published to npm as
400
+ `@dailephd/my-frontend-observer@0.8.1`. The frozen
401
+ concrete implementation plan is
402
+ `docs/plans/v0.8.1-cli-usability-patch-plan.md`.
403
+
404
+ Objective/problem: preserve the canonical v0.1-v0.8 evidence engines while
405
+ removing artifact-plumbing friction from ordinary human and coding-agent use.
406
+ The released low-level CLI still requires users to repeat observation
407
+ configuration, choose output paths, pass exact artifact roots between commands,
408
+ and may expose long immutable artifact identifiers during routine navigation.
409
+ Those identities remain valuable provenance, but they should not be the normal
410
+ workflow interface.
411
+
412
+ Required capabilities: project-local versioned configuration; upward project
413
+ discovery; managed project-local Observer state; a versioned alias catalog that
414
+ maps human-readable names to canonical immutable artifacts; `init` for one-time
415
+ project configuration; `capture <name>` for project-configured observation;
416
+ `check [<baseline>]` for high-level capture plus canonical comparison and
417
+ applicable contract/reference evaluation; bounded `check --json` output for
418
+ coding agents; project-aware `view` without a required `--root`; alias-first
419
+ viewer navigation with canonical IDs retained as provenance; and reorganized
420
+ help that distinguishes the common workflow from advanced artifact-level
421
+ commands.
422
+
423
+ The normal workflow should become:
424
+
425
+ ```text
426
+ my-frontend-observer init
427
+ my-frontend-observer capture baseline
428
+ my-frontend-observer check baseline
429
+ my-frontend-observer view
430
+ ```
431
+
432
+ Existing low-level commands remain supported unchanged for automation,
433
+ compatibility, debugging, and advanced workflows:
434
+
435
+ ```text
436
+ observe
437
+ compare
438
+ approve-baseline
439
+ save-change-contract
440
+ evaluate-contract
441
+ import-reference
442
+ approve-reference
443
+ evaluate-reference-fidelity
444
+ ```
445
+
446
+ Acceptance semantics: `check` may report PASS only when every configured
447
+ executable acceptance dimension required by the project passes. It reports FAIL
448
+ when a configured executable criterion fails, REVIEW_REQUIRED when useful
449
+ comparison evidence exists but executable criteria are insufficient to declare
450
+ success or failure, and BLOCKED when required evidence cannot be obtained or
451
+ evaluated reliably. A raw comparison or apparent lack of differences must never
452
+ be promoted to PASS by itself. Reference-fidelity PASS must not override an
453
+ active frontend-contract FAIL.
454
+
455
+ Architectural/evidence constraints: this patch is a thin project/workflow layer
456
+ over the existing canonical observation, comparison, contract, reference,
457
+ binding, compatibility, fidelity, context, and viewer owners. Project
458
+ configuration and aliases are workflow metadata, not replacement artifact
459
+ identities. Alias replacement never deletes canonical evidence or silently
460
+ approves/supersedes a baseline or reference. Existing artifact/evaluation schema
461
+ versions stay unchanged. Existing CLI/programmatic paths remain first-class and
462
+ do not require project initialization.
463
+
464
+ Dependencies/ecosystem/compatibility: depends on released v0.8.0 and must remain
465
+ compatible with the existing v0.7 coding-agent/reference workflow. The patch is
466
+ specifically designed so v0.9 annotation can extend the existing viewer without
467
+ another top-level workflow command architecture, while v0.10 coding-agent
468
+ correction can repeatedly consume `check <baseline> --json` after external
469
+ source edits.
470
+
471
+ Exclusions: annotation authoring, source editing, automatic frontend correction,
472
+ coding-agent orchestration inside Observer, automatic binding, image-to-code
473
+ generation, deleting historical canonical evidence, implicit baseline/reference
474
+ approval or supersession, new evidence/evaluation engines, cloud hosting,
475
+ authentication, collaboration, and databases.
476
+
477
+ Acceptance: a new user can initialize a project once, capture a named baseline,
478
+ change the frontend, run one high-level check, and inspect the result without
479
+ typing an output path, evidence root, or canonical artifact hash. A coding agent
480
+ can consume the same acceptance operation through bounded JSON. Real Chromium
481
+ and a clean packed-consumer installation must prove the workflow, and all
482
+ existing low-level commands must remain backward compatible.
483
+
484
+ ## v0.9 — Human Visual Annotation and Design-Intent Capture
485
+
486
+ Current status: released as `v0.9.0` and published to npm as
487
+ `@dailephd/my-frontend-observer@0.9.0`, after final exact-candidate
488
+ cross-platform readiness on Windows, Linux and macOS. The release includes
489
+ repository-owned deterministic demo and tutorial acceptance infrastructure
490
+ under `examples/v09-demo/`. That infrastructure is release support and
491
+ documentation. It is not a new annotation evidence family or v0.10 behavior,
492
+ and it is not shipped in the npm package. The per-prompt implementation reports and the integrated acceptance
493
+ report live under `docs/reports/v0.9-*.md`. The source-grounding report is
494
+ `docs/reports/v0.9-architecture-retrieval.md`, and the concrete file-level,
495
+ test-level, and seven-prompt implementation plan is
496
+ `docs/plans/v0.9-implementation-plan.md`. The version-level decisions below are
497
+ the durable design authority. A future planner should be able to derive an
498
+ implementation plan from this section plus current repository state without
499
+ recovering critical choices from old chats or implementation reports.
500
+
501
+ Objective/problem: add structured visual human intent to the already working
502
+ v0.7 coding-agent/reference workflow through the v0.8 viewer without inventing
503
+ a separate change-semantics system. Intent may be authored against either an
504
+ existing runtime observation screenshot or an existing external visual
505
+ reference. The v0.8.1 project workflow and alias layer remain the normal project
506
+ discovery and human-selection surface. v0.9 extends `view`; it does not create a
507
+ new top-level annotation workflow architecture.
508
+
509
+ ### Frozen annotation evidence model
510
+
511
+ v0.9 introduces one distinct persisted observer-owned annotation evidence
512
+ family, `VisualAnnotationArtifact`, with initial schema version `1.0.0`.
513
+ Annotations are not mutable fields added to observations, external references,
514
+ comparisons, contracts, or evaluation artifacts. Original runtime observations,
515
+ screenshots, imported/approved external references, and reference images remain
516
+ immutable source evidence.
517
+
518
+ Every explicit annotation save creates a new immutable annotation artifact
519
+ instance. A later edit creates another artifact and may explicitly point
520
+ forward to the previous instance through `supersedesAnnotationId`; the old
521
+ artifact is never rewritten or deleted. Annotation logical/request identity is
522
+ deterministic from canonical semantic content, while annotation instance
523
+ identity is fresh for each persisted instance, following the repository's
524
+ existing request-identity versus instance-identity pattern.
525
+
526
+ Persisted annotation provenance must use canonical source identity. Human aliases
527
+ such as `baseline` and `current`, viewer handles, viewer URLs, ports, absolute
528
+ paths, and other session-local selectors must never become annotation identity.
529
+ Aliases remain conveniences for selecting canonical artifacts before authoring.
530
+
531
+ ### Frozen source contexts and coordinate domains
532
+
533
+ Each annotation has exactly one source context:
534
+
535
+ ```text
536
+ runtime-observation
537
+ external-reference
538
+ ```
539
+
540
+ Runtime annotations are tied to one canonical observation/screenshot identity
541
+ and use the existing runtime screenshot coordinate domain: viewport CSS pixels.
542
+ They do not multiply geometry by device pixel ratio, round to screenshot-device
543
+ pixels, or invent a second transform.
544
+
545
+ External-reference annotations are tied to one canonical reference/image
546
+ identity and use reference-image pixels. Reference-image pixels are never
547
+ silently treated as runtime CSS pixels.
548
+
549
+ The existing runtime and reference SVG workspaces remain separate coordinate
550
+ and identity domains. The same zoom/pan interaction machinery may be reused,
551
+ but each workspace supplies its own frame. Annotation rendering should be a
552
+ layer inside the existing source SVG coordinate frame rather than an
553
+ independently transformed canvas.
554
+
555
+ A reference-region ID is not a runtime-target identity. Runtime-target,
556
+ reference-region, annotation-item, artifact, filesystem, source-symbol, and
557
+ project-alias identities remain distinct even when explicit relationships link
558
+ them.
559
+
560
+ ### Frozen first annotation set
561
+
562
+ The first persisted visual mark vocabulary is deliberately bounded to:
563
+
564
+ ```text
565
+ point
566
+ rectangle
567
+ line
568
+ arrow
569
+ note
570
+ ```
571
+
572
+ `select` and `pan` are viewer interaction modes, not persisted annotation
573
+ marks. v0.9 does not add freehand drawing, polygons, Bezier paths, paint
574
+ strokes, masks, arbitrary SVG input, OCR-driven regions, or computer-vision
575
+ segmentation.
576
+
577
+ The first human-facing intent operations are:
578
+
579
+ ```text
580
+ inspect
581
+ move
582
+ resize
583
+ remove
584
+ preserve
585
+ ```
586
+
587
+ External-reference annotation additionally supports candidate intent for:
588
+
589
+ ```text
590
+ reference-region
591
+ reference-requirement
592
+ asset-sensitive
593
+ ```
594
+
595
+ `asset-sensitive` and `inspect` may remain informational. Their existence must
596
+ not silently add an acceptance rule.
597
+
598
+ ### Explicit association, interpretation, and confirmation
599
+
600
+ Drawing geometry alone does not establish semantic ownership or executable
601
+ intent. Runtime annotation may associate with an existing runtime target or
602
+ existing runtime relationship only through explicit structured selection.
603
+ Reference annotation may associate with an existing reference region or
604
+ existing reference relationship only through explicit structured selection.
605
+
606
+ The following must never silently create association or binding:
607
+
608
+ ```text
609
+ name similarity
610
+ rectangle overlap
611
+ nearest element
612
+ visual proximity
613
+ drawing containment
614
+ same textual identifier across runtime/reference domains
615
+ ```
616
+
617
+ An unbound drawing remains valid visual/narrative evidence but cannot be
618
+ promoted into a canonical requirement that needs a structured target or region.
619
+
620
+ Each annotation interpretation has an explicit state:
621
+
622
+ ```text
623
+ uninterpreted
624
+ candidate
625
+ confirmed
626
+ ```
627
+
628
+ The viewer may suggest a bounded candidate interpretation from explicit user
629
+ choices and known canonical evidence, but ambiguous geometry never silently
630
+ becomes a strong requirement. Only a `confirmed` interpretation may be selected
631
+ for canonical promotion. Before confirmation, the viewer must show the exact
632
+ candidate structured meaning that would be persisted/promoted.
633
+
634
+ ### Canonical change-scope and contract reuse
635
+
636
+ v0.9 reuses exactly the existing authored change-scope categories:
637
+
638
+ ```text
639
+ requested
640
+ expected-dependent
641
+ protected
642
+ preserved
643
+ ```
644
+
645
+ For `expected-dependent`, the existing `required`/`permitted` mode remains
646
+ mandatory. `unexpected` remains evaluator output and is never authorable through
647
+ annotation.
648
+
649
+ Runtime annotation does not introduce a second contract language. Confirmed
650
+ runtime visual intent may promote only into the existing bounded
651
+ `ContractPrimitive` vocabulary. High-value mappings include move/resize intent
652
+ through existing `x`, `y`, `width`, and `height` property increase/decrease
653
+ primitives and preserve intent through existing property-with-tolerance or
654
+ relationship-unchanged primitives. Existing visibility, clipping, width-bound,
655
+ overlap, relative-width, vertical-sequence, containment, page-width, and
656
+ scroll-owner primitives remain available when they accurately represent the
657
+ confirmed intent.
658
+
659
+ The drawing is not itself the contract. Promotion produces an ordinary
660
+ canonical `PerChangeContract`, using the existing contract identity,
661
+ persistence, validation, conflict, evaluation, and PASS/FAIL semantics.
662
+ Annotation does not evaluate contracts.
663
+
664
+ The first version must preserve unsupported human intent honestly. In
665
+ particular, `remove` can be represented and explicitly confirmed as annotation
666
+ intent, but the current canonical contract vocabulary has no target-absent
667
+ primitive. v0.9 therefore must not fabricate an approximate clause or expand the
668
+ contract language merely to make `remove` executable. It remains confirmed but
669
+ not canonically promotable until a future version deliberately extends the
670
+ contract model.
671
+
672
+ ### External-reference region and requirement authoring
673
+
674
+ External-reference annotation may explicitly create or refine meaningful
675
+ reference regions and may promote selected design requirements, but a drawn
676
+ rectangle never turns every enclosed pixel into a requirement.
677
+
678
+ A confirmed new region uses its annotation rectangle directly in the existing
679
+ reference-image pixel domain. A confirmed refinement explicitly selects an
680
+ existing region ID; the resulting new reference revision may retain that region
681
+ identity while changing its rectangle. Relationship choices must come from the
682
+ existing canonical reference-region relationship derivation rather than a
683
+ viewer-only relationship engine.
684
+
685
+ Confirmed reference requirements reuse the existing
686
+ `RawReferenceRequirement` / `ReferenceRequirementSubject` model and the same
687
+ authored change-scope categories. Supported subjects remain the existing
688
+ bounded region-property, region-relationship, and region-measurement forms with
689
+ existing reference tolerance semantics (`exact`, `absolute-reference-px`, or
690
+ `percent` where applicable). Visible geometry that the user did not explicitly
691
+ promote remains informational reference evidence.
692
+
693
+ Materializing confirmed reference annotation creates a new immutable imported
694
+ `ExternalReferenceArtifact` revision through the existing canonical reference
695
+ persistence model. The new artifact carries forward unchanged image content,
696
+ applicability, regions, and requirements except where selected confirmed intent
697
+ explicitly adds or refines them; it explicitly supersedes the selected source
698
+ reference. The prior reference remains unchanged. The new revision is not
699
+ automatically approved and does not automatically replace the project's active
700
+ approved reference. Approval and project reference selection remain separate,
701
+ explicit governance actions.
702
+
703
+ ### Annotation persistence and annotated rendering
704
+
705
+ The structured annotation manifest is authoritative. v0.9 also derives one
706
+ bounded system-generated annotation overlay, `annotation-overlay.svg`, for each
707
+ saved annotation artifact. The overlay uses the same source-native coordinate
708
+ frame recorded by the artifact, contains only validated system-generated SVG,
709
+ and has an integrity digest. It does not embed arbitrary user SVG/HTML and does
710
+ not copy the underlying screenshot or external-reference image.
711
+
712
+ The annotated visual is reconstructed as:
713
+
714
+ ```text
715
+ canonical source image
716
+ +
717
+ structured annotation overlay
718
+ ```
719
+
720
+ The derived overlay is not a second evidence or interpretation model. If any
721
+ presentation bug causes disagreement, structured annotation data remains the
722
+ authority.
723
+
724
+ ### Viewer authoring and security boundary
725
+
726
+ Normal annotation authoring is available through project-aware:
727
+
728
+ ```text
729
+ my-frontend-observer view
730
+ ```
731
+
732
+ inside a valid initialized project. Existing advanced
733
+ `my-frontend-observer view --root <evidence-root>` remains a supported
734
+ inspection surface and stays read-only when it is not operating with the normal
735
+ initialized-project authoring context.
736
+
737
+ Because v0.8 intentionally exposed only GET/HEAD inspection routes, v0.9 may add
738
+ POST only for the narrow annotation-authoring and confirmed-promotion operations
739
+ required by this version. It must not add arbitrary filesystem writes, target
740
+ source writes, PUT/PATCH/DELETE mutation APIs, permissive CORS, or a generic
741
+ local RPC endpoint.
742
+
743
+ The project-aware viewer authoring session must use a short-lived in-memory
744
+ capability token plus strict loopback same-origin/Host enforcement, bounded JSON
745
+ bodies, and canonical server-side resolution of evidence handles to source
746
+ artifacts. The browser must never supply arbitrary output paths. The token is
747
+ session-only, is not persisted as project/evidence identity, and must not become
748
+ service-worker cached authority.
749
+
750
+ Annotation persistence follows the repository's established immutable artifact
751
+ pattern: structural validation before write, fresh final instance directory,
752
+ sibling temporary directory, deterministic owned-media generation, manifest
753
+ write, atomic rename, no overwrite, and cleanup on failure.
754
+
755
+ Project-managed annotation evidence belongs under the managed Observer evidence
756
+ root using canonical IDs. v0.9 does not introduce an annotation alias catalog.
757
+
758
+ ### Conflict and revision rules
759
+
760
+ Annotation revision conflict is handled by explicit lineage, not last-write-wins.
761
+ A revision save identifies the canonical parent annotation. A stale edit must be
762
+ rejected rather than silently overwrite newer evidence. If malformed/historical
763
+ evidence presents multiple lineage heads, the viewer must expose that ambiguity
764
+ and require an explicit choice rather than select a winner by timestamp.
765
+
766
+ Semantic contract conflicts remain owned by the existing contract validators and
767
+ evaluator. Reference requirement validity/adequacy remains owned by the existing
768
+ reference model. Annotation must not add a second conflict-resolution engine.
769
+ Unsupported confirmed intent is reported as unsupported for canonical promotion,
770
+ not silently converted to PASS, FAIL, or another requirement.
771
+
772
+ ### Canonical intent flow
773
+
774
+ The version-level flow is:
775
+
776
+ ```text
777
+ runtime screenshot annotation OR external-reference annotation
778
+ → explicit source-domain association where reliable
779
+ → candidate requested/dependent/protected/preserved or informational intent
780
+ → explicit interpretation/confirmation
781
+ → save immutable structured annotation evidence
782
+ → selected confirmed runtime intent may become a canonical per-change contract
783
+ OR
784
+ selected confirmed reference intent may become a new imported reference revision
785
+ → existing contract/reference approval and evaluation workflows remain authoritative
786
+ ```
787
+
788
+ This version stops before the full post-edit human/LLM correction loop. v0.10
789
+ owns automatic workflow coordination around external coding-agent source edits,
790
+ rerendering, repeated `check <baseline> --json`, final human approval, and
791
+ baseline/reference governance across correction iterations.
792
+
793
+ ### Dependencies/ecosystem/compatibility
794
+
795
+ v0.9 depends on:
796
+
797
+ - stable runtime observation and target identity;
798
+ - existing relationship and comparison evidence;
799
+ - existing baseline/per-change contract vocabulary and evaluator;
800
+ - v0.7 external-reference identity, region, requirement, applicability,
801
+ binding, compatibility, fidelity, and bounded-context integration;
802
+ - v0.8 viewer server, runtime/reference SVG workspaces, source-domain coordinate
803
+ rendering, zoom/pan, metadata-first discovery, safe media resolution, and
804
+ explicit binding cross-selection;
805
+ - v0.8.1 project discovery, managed evidence root, human-readable aliases,
806
+ project-aware viewer startup, and canonical identity resolution beneath
807
+ aliases.
808
+
809
+ Existing observation, comparison, frontend-contract, evaluation,
810
+ bounded-agent-context, and external-reference schema semantics remain
811
+ independently authoritative. Annotation may reference and promote into them but
812
+ must not redefine them.
813
+
814
+ The existing bounded agent-context system may later include relevant annotation
815
+ references/structured annotation evidence as part of the proven coding-agent
816
+ workflow, but heavy source images or unrelated annotation history should not be
817
+ embedded by default. v0.9 does not require changes to my-dev-kit,
818
+ orchestrator, or lab unless an actual compatibility need is demonstrated during
819
+ implementation.
820
+
821
+ ### Exclusions
822
+
823
+ v0.9 explicitly excludes:
824
+
825
+ ```text
826
+ application source editing
827
+ automatic coding-agent execution
828
+ full correction-loop orchestration
829
+ image-to-code or raster-to-HTML/CSS/SVG generation
830
+ automatic target discovery
831
+ automatic reference/runtime binding
832
+ automatic reference-region detection
833
+ OCR-driven requirements
834
+ computer-vision segmentation
835
+ freehand drawing or arbitrary SVG authoring
836
+ a second contract/change-scope taxonomy
837
+ a second reference-requirement taxonomy
838
+ a second PASS/FAIL evaluator
839
+ automatic reference approval
840
+ automatic baseline approval or replacement
841
+ automatic approved-reference replacement
842
+ cloud synchronization
843
+ accounts/authentication/collaboration/comment threads
844
+ database storage
845
+ making annotation mandatory for ordinary capture/check/coding-agent workflows
846
+ ```
847
+
848
+ ### Acceptance
849
+
850
+ v0.9 is complete only when all of the following are true:
851
+
852
+ - a user can annotate an existing runtime observation in the project-aware
853
+ viewer and save/reload it without coordinate drift;
854
+ - a user can annotate an imported or approved external reference and save/reload
855
+ it in reference-image coordinates;
856
+ - saved annotations remain tied to exact canonical source identities even when a
857
+ human alias later points somewhere else;
858
+ - runtime-target, runtime-relationship, reference-region, and
859
+ reference-relationship associations occur only when explicitly and reliably
860
+ selected;
861
+ - zoomed/panned drawing maps back to the same source-native coordinates used by
862
+ the existing SVG workspace;
863
+ - point/rectangle/line/arrow/note marks persist as structured evidence, not only
864
+ flattened pixels;
865
+ - preserve/resize/move/remove/inspect intent can be represented, with unsupported
866
+ executable mappings reported honestly;
867
+ - ambiguous or unbound drawings cannot silently become strong requirements;
868
+ - a supported confirmed runtime move/resize/preserve intent can produce a normal
869
+ canonical per-change contract without a second contract evaluator;
870
+ - selected confirmed external-reference region/requirement intent can produce a
871
+ new immutable imported reference revision without modifying or approving the
872
+ source reference;
873
+ - informational notes/asset-sensitive regions remain informational unless
874
+ explicitly promoted through a supported canonical model;
875
+ - annotation revision conflicts fail explicitly instead of overwriting history;
876
+ - original observation artifacts, screenshots, external-reference artifacts,
877
+ and reference images remain unchanged;
878
+ - the bounded local write surface rejects unauthorized origins, missing/invalid
879
+ session capability, unsafe paths, unsupported methods, and malformed/oversized
880
+ requests;
881
+ - existing v0.8 viewer inspection and v0.8.1 `init`/`capture`/`check`/`view`
882
+ workflows remain backward compatible;
883
+ - a clean packed npm candidate proves annotation save/reload and canonical
884
+ promotion behavior, with the existing cross-platform/security validation
885
+ expectations preserved.
886
+
887
+ The frozen concrete module contracts, validation rules, test responsibilities,
888
+ seven implementation prompts, and batch gates live in
889
+ `docs/plans/v0.9-implementation-plan.md`. That plan must be derivable from the
890
+ version-level decisions above plus current repository inspection; this roadmap
891
+ intentionally does not duplicate batch-by-batch instructions.
892
+
893
+ ## v0.9.1 — PWA Hard-Gate Isolation and Reproducible Security Acceptance
894
+
895
+ Current status: released as `0.9.1`. The concrete implementation plan remains
896
+ frozen in `docs/plans/v0.9.1-implementation-plan.md`.
897
+ This patch is maintenance work over the released v0.9.0 codebase and does not
898
+ change the v0.9 product capability model.
899
+
900
+ Objective/problem: make the PWA server-down hard acceptance proof genuinely
901
+ self-contained. The released test in `tests/browser/pwaHardening.test.ts`
902
+ passes in the normal full-file/full-suite order but fails when selected alone
903
+ because it can inherit service-worker/cache state from earlier tests and from a
904
+ fixed persistent Chromium profile. That is a test-isolation defect. It is not
905
+ evidence that the released PWA serves stale evidence or otherwise violates the
906
+ runtime safety contract.
907
+
908
+ Required capabilities: the hard gate must create and own fresh disposable
909
+ evidence state, a fresh viewer server, a fresh persistent Chromium profile, a
910
+ fresh BrowserContext, and its page; independently establish service-worker
911
+ registration and activation; prove that the current page is controlled by the
912
+ worker; prove the application shell needed for offline reload is precached;
913
+ prove `/api/` evidence responses are absent from Cache Storage; prove live
914
+ evidence is visible before shutdown; prove the server/network is actually
915
+ unavailable after shutdown; reload from the precached shell; then prove an
916
+ explicit unavailable state is shown and previously fetched evidence is absent.
917
+ All owned resources must be cleaned up even on failure.
918
+
919
+ Constraints and contracts: the hard/security acceptance experiment must not
920
+ depend on another `it()`, test order, a previously warmed Cache Storage, or a
921
+ profile retained under `.my-dev-kit-workflow`. Tests explicitly designated
922
+ `HARD GATE`, `SECURITY GATE`, or `ACCEPTANCE GATE` must be independently
923
+ runnable from fresh state. The dedicated isolated hard-gate command and the
924
+ normal full browser/security suites must exercise the same product behavior.
925
+
926
+ Exclusions: no production PWA/service-worker semantic change is authorized
927
+ merely to make the test green; no new user-facing feature, evidence schema,
928
+ CLI command, package dependency, tutorial behavior, or v0.10 capability belongs
929
+ in this patch. If the corrected clean-state experiment exposes a genuine
930
+ runtime defect, implementation must stop and reclassify the work as a product
931
+ defect before changing production behavior.
932
+
933
+ Acceptance: the PWA hard gate passes when run by itself from a fresh process and
934
+ fresh temporary profile, passes in the complete `pwaHardening.test.ts` file,
935
+ and passes in the normal browser/security validation chain. The test must prove
936
+ its own service-worker control, shell-cache, API-cache-exclusion, network-down,
937
+ and stale-evidence-absence prerequisites rather than infer them from another
938
+ test. Temporary browser profiles and evidence roots must be removed after both
939
+ success and failure. Release-readiness validation must preserve the v0.9.0
940
+ product/package behavior while proving the stronger test-isolation invariant.
941
+
942
+ ## v0.10 — Full Visual Human–LLM Frontend Change Workflow
943
+
944
+ Current status: released as `0.10.0`. The frozen implementation authority
945
+ remains
946
+ `docs/plans/v0.10-implementation-plan.md`.
947
+
948
+ Objective/problem: complete the visual communication branch by combining the
949
+ already operational coding-agent loop with graphical inspection, external design
950
+ references, structured annotation, and the v0.8.1 project-level acceptance
951
+ surface so ordinary correction iterations do not require direct artifact-path
952
+ plumbing.
953
+
954
+ Two visual entry modes must coexist:
955
+
956
+ ```text
957
+ actual-frontend-driven
958
+ human views actual captured frontend
959
+ → points/draws/annotates requested design change
960
+ ```
961
+
962
+ and:
963
+
964
+ ```text
965
+ reference-driven
966
+ human supplies/selects an approved external visual reference
967
+ → views reference beside the actual captured frontend
968
+ → identifies/annotates relevant reference regions and intent
969
+ → binds confirmed reference intent to stable runtime regions
970
+ ```
971
+
972
+ Both then converge on the same canonical workflow:
973
+
974
+ ```text
975
+ confirmed requested/dependent/protected/preserved scope
976
+ → bounded runtime + relevant reference evidence is produced
977
+ → bounded static evidence is obtained
978
+ → coding-agent context is assembled
979
+ → external coding agent modifies source
980
+ → observer rerenders
981
+ → before/after comparison runs
982
+ → reference design vs candidate evaluation runs when applicable
983
+ → requested/dependent/protected/preserved behavior and baseline contracts run
984
+ → unexpected changes remain explicit
985
+ → viewer shows PASS or actionable failure evidence
986
+ → human approves or requests correction
987
+ → successful state may become the new approved baseline and/or explicitly
988
+ supersede an approved reference according to project policy
989
+ ```
990
+
991
+ The ordinary machine-facing post-edit correction loop must reuse the canonical
992
+ `check <baseline> --json` surface. v0.10 must not reconstruct before/after
993
+ comparison, frontend-contract verdicts, reference fidelity, or workflow
994
+ PASS/FAIL/BLOCKED precedence when v0.8.1 already provides them.
995
+
996
+ Architectural/evidence constraints: a visual request or reference does not
997
+ erase existing baseline contracts. Unless explicitly superseded, existing
998
+ approved contracts plus the new visual/per-change contract must both pass.
999
+ Reference fidelity is an additional evidence/evaluation dimension, not blanket
1000
+ authorization for unrelated change. Runtime, reference, static, annotation,
1001
+ workflow, implementation, approval, baseline, and supersession evidence remain
1002
+ separate and traceable. The observer stays non-mutating; the orchestrator
1003
+ coordinates bounded evidence; the lab is not required for every normal edit.
1004
+
1005
+ A mature result may therefore combine before/after results, reference/candidate
1006
+ results, persistent-baseline evaluation, per-change evaluation, and unexpected
1007
+ changes. A reference-fidelity pass with a protected or preserved contract
1008
+ failure is overall failure. A raw imported image never silently becomes an
1009
+ approved reference, and an approved reference never silently supersedes an
1010
+ existing baseline or another approved reference.
1011
+
1012
+ Dependencies/ecosystem/compatibility: depends on all prior versions, especially
1013
+ the v0.7 core/reference loop, v0.8 viewer, v0.8.1 project workflow/acceptance
1014
+ surface, and v0.9 dual-context annotation intent model. Use exact compatible
1015
+ observer/static/orchestrator/context/reference/annotation/viewer contracts and
1016
+ retain the four-project responsibility split.
1017
+
1018
+ Exclusions: replacing the external coding agent with observer source editing,
1019
+ visual/reference intent silently overriding baseline contracts, autonomous
1020
+ image-to-code generation, automatic raster-to-vector reconstruction, opaque
1021
+ AI-only verdicts, untraceable baseline/reference replacement, and making lab
1022
+ evaluation part of every edit.
1023
+
1024
+ Acceptance: demonstrate a successful actual-frontend-driven visual change; a
1025
+ successful reference-driven design-replication change; measurable actionable
1026
+ reference/candidate failure evidence; a requested visual/reference change that
1027
+ introduces a protected-property or preserved-invariant regression; a correction
1028
+ cycle; human approval and explicit baseline/reference history; and compatible
1029
+ integrated ecosystem evidence. A protected/invariant failure must fail overall
1030
+ even when the requested local visual change or reference-fidelity requirement
1031
+ succeeds. Version-start planning must settle visual workflow entry points,
1032
+ approval identity and authority, reference selection/applicability, baseline and
1033
+ reference governance, correction iteration history, artifact retention, and
1034
+ cross-version compatibility.
1035
+
1036
+ ## v0.10.1 — Project Check Baseline Context Replay
1037
+
1038
+ Current status: released as `0.10.1`.
1039
+
1040
+ Scope: project-aware `check` validates its immutable baseline and replays only
1041
+ that baseline's optional `scrollScenario` and caller-declared `explicitState`
1042
+ into candidate capture. URL, viewport, and semantic targets remain owned by
1043
+ current project configuration. Project-config schema remains `1.1.0`; there
1044
+ is no observation, comparison, or check-result schema change, CLI change, or
1045
+ new dependency. Explicit-state replay preserves declared identity only and
1046
+ does not establish application or session state. This maintenance version
1047
+ does not include v0.11 runtime diagnostics or v0.12 controlled state/session
1048
+ setup.
1049
+
1050
+ ## v0.11 — Bounded Runtime Diagnostics and Failure Evidence
1051
+
1052
+ Current status: planned as `0.11.0` (OBS-DIAG-01).
1053
+
1054
+ Objective/problem: explain browser/runtime failures with bounded, redacted diagnostic evidence rather than forcing downstream tools to infer failure causes from screenshots or generic command errors.
1055
+
1056
+ Required capabilities: explicit observation windows; bounded console and page-error evidence; request transport-failure evidence; HTTP response-status evidence; deterministic ordering where practical; truncation/redaction/unavailable states; environment and observation provenance.
1057
+
1058
+ Constraints: transport failure is not an HTTP error response; diagnostics do not authorize source changes; no unrestricted bodies, credentials, cookies, authorization headers, full HAR dump, remote telemetry service, or general network recorder.
1059
+
1060
+ Dependencies: the existing observation identity, artifact, diagnostics, browser/network policy, and ECO-00 reference contracts. Lab is optional for ordinary use.
1061
+
1062
+ Acceptance: deterministic fixtures prove each diagnostic category, sensitive-data boundaries, explicit loss/unavailable states, and backward-compatible ordinary observation.
1063
+
1064
+ ## v0.12 — Controlled Project State and Session Setup
1065
+
1066
+ Current status: planned as `0.12.0` (OBS-STATE-01).
1067
+
1068
+ Objective/problem: allow reproducible evidence for application states that must be established before observation without turning Observer into an authentication or journey-automation platform.
1069
+
1070
+ Required capabilities: governed project-supplied setup identity; requested and achieved-state evidence; isolated session identity; failure/partial state; cleanup evidence; bounded references usable by observation/comparison workflows.
1071
+
1072
+ Constraints: project-owned setup boundary only; no credential vault, identity provider, production auth management, unrestricted arbitrary task runner, or persistence of secrets into normal artifacts.
1073
+
1074
+ Dependencies: v0.11 diagnostic evidence where setup failures need explanation, existing applicability/state identity, and ECO-00 subject/environment references.
1075
+
1076
+ Acceptance: independent sessions reproducibly establish a deterministic fixture state, failed setup cannot appear achieved, cleanup is proven, and downstream evidence retains state provenance.
1077
+
1078
+ ## v0.13 — Local Performance Evidence
1079
+
1080
+ Current status: planned as `0.13.0` (OBS-PERF-01).
1081
+
1082
+ Objective/problem: produce bounded local performance evidence that can support regression decisions while preserving environment and comparability limits.
1083
+
1084
+ Required capabilities: versioned metric identity/units; measurement windows and samples; browser/environment provenance; baseline/candidate applicability; explicit unavailable metrics; inspectable comparison evidence.
1085
+
1086
+ Constraints: no universal composite performance score, hosted benchmark service, or comparison across materially incompatible environments as though equivalent.
1087
+
1088
+ Dependencies: existing observation/environment provenance, v0.12 state control when a measurement requires controlled state, and ECO-00 environment/reference semantics.
1089
+
1090
+ Acceptance: supported fixture metrics are reproducible enough for meaningful bounded comparison, incompatible comparisons fail closed, and unsupported metrics remain unavailable.
1091
+
1092
+ ## v0.14 — Bounded Browser and Viewport Matrix
1093
+
1094
+ Current status: planned as `0.14.0` (OBS-BROWSER-01).
1095
+
1096
+ Objective/problem: support a deliberately bounded browser/viewport matrix while preserving engine identity and evidence capability differences.
1097
+
1098
+ Required capabilities: explicit supported matrix; exact engine/version/viewport environment identity; adapter capability reporting; engine-specific unavailable evidence; deterministic local fixtures and cleanup for every supported engine.
1099
+
1100
+ Constraints: this does not become a complete cross-browser testing service. Firefox/WebKit or other engines are added only when explicitly supported; incompatible engine baselines are never treated as identical.
1101
+
1102
+ Dependencies: current Chromium adapter architecture, v0.13 environment/comparability discipline, and existing security/network/process boundaries.
1103
+
1104
+ Acceptance: all supported matrix entries run through the same ownership model, preserve exact environment identity, expose unsupported evidence honestly, and keep current Chromium behavior compatible.
1105
+