my-frontend-observer 0.1.0
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.
- package/CHANGELOG.md +22 -0
- package/README.md +69 -0
- package/dist/application/browserCaptureService.d.ts +11 -0
- package/dist/application/browserCaptureService.js +12 -0
- package/dist/application/browserCaptureService.js.map +1 -0
- package/dist/application/observationPersistence.d.ts +59 -0
- package/dist/application/observationPersistence.js +78 -0
- package/dist/application/observationPersistence.js.map +1 -0
- package/dist/artifacts/artifactWriter.d.ts +25 -0
- package/dist/artifacts/artifactWriter.js +68 -0
- package/dist/artifacts/artifactWriter.js.map +1 -0
- package/dist/artifacts/types.d.ts +17 -0
- package/dist/artifacts/types.js +2 -0
- package/dist/artifacts/types.js.map +1 -0
- package/dist/browser/chromiumAdapter.d.ts +21 -0
- package/dist/browser/chromiumAdapter.js +150 -0
- package/dist/browser/chromiumAdapter.js.map +1 -0
- package/dist/browser/evidenceCapture.d.ts +19 -0
- package/dist/browser/evidenceCapture.js +201 -0
- package/dist/browser/evidenceCapture.js.map +1 -0
- package/dist/browser/types.d.ts +22 -0
- package/dist/browser/types.js +2 -0
- package/dist/browser/types.js.map +1 -0
- package/dist/cli.d.ts +7 -0
- package/dist/cli.js +216 -0
- package/dist/cli.js.map +1 -0
- package/dist/domain/completion.d.ts +30 -0
- package/dist/domain/completion.js +22 -0
- package/dist/domain/completion.js.map +1 -0
- package/dist/domain/diagnostics.d.ts +17 -0
- package/dist/domain/diagnostics.js +55 -0
- package/dist/domain/diagnostics.js.map +1 -0
- package/dist/domain/evidence.d.ts +27 -0
- package/dist/domain/evidence.js +55 -0
- package/dist/domain/evidence.js.map +1 -0
- package/dist/domain/identity.d.ts +13 -0
- package/dist/domain/identity.js +37 -0
- package/dist/domain/identity.js.map +1 -0
- package/dist/domain/schema.d.ts +111 -0
- package/dist/domain/schema.js +126 -0
- package/dist/domain/schema.js.map +1 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -0
- package/dist/request/paths.d.ts +14 -0
- package/dist/request/paths.js +33 -0
- package/dist/request/paths.js.map +1 -0
- package/dist/request/request.d.ts +43 -0
- package/dist/request/request.js +174 -0
- package/dist/request/request.js.map +1 -0
- package/dist/safety/policy.d.ts +14 -0
- package/dist/safety/policy.js +81 -0
- package/dist/safety/policy.js.map +1 -0
- package/docs/ARCHITECTURE.md +85 -0
- package/docs/CI_CD.md +28 -0
- package/docs/COMMANDS.md +82 -0
- package/docs/CONTRACTS.md +54 -0
- package/docs/CURRENT_STATE.md +113 -0
- package/docs/DEVELOPMENT.md +65 -0
- package/docs/DOCUMENTATION_PRESERVATION_POLICY.md +33 -0
- package/docs/PROJECT_DESCRIPTION.md +1770 -0
- package/docs/PROJECT_MILESTONES.md +2073 -0
- package/docs/PROJECT_OVERVIEW.md +53 -0
- package/docs/QUICKSTART.md +35 -0
- package/docs/RELEASE.md +9 -0
- package/docs/ROADMAP.md +352 -0
- package/docs/SECURITY.md +33 -0
- package/docs/WORKFLOWS.md +51 -0
- package/package.json +46 -0
|
@@ -0,0 +1,1770 @@
|
|
|
1
|
+
# my-frontend-observer
|
|
2
|
+
|
|
3
|
+
## Project type
|
|
4
|
+
|
|
5
|
+
Greenfield developer tool and runtime-evidence producer within the `my-dev-kit` ecosystem.
|
|
6
|
+
|
|
7
|
+
## Problem
|
|
8
|
+
|
|
9
|
+
Large language models (LLMs) and coding agents can inspect frontend source code, component trees, stylesheets, project architecture, and static dependencies, but they often cannot reliably understand what an application actually looks like or how it actually behaves after a browser renders it.
|
|
10
|
+
|
|
11
|
+
This creates a recurring frontend-development failure mode:
|
|
12
|
+
|
|
13
|
+
1. A user describes a visual, layout, scrolling, responsiveness, or composition problem.
|
|
14
|
+
2. The LLM interprets the request primarily through language and source code.
|
|
15
|
+
3. Static repository evidence identifies a plausible source owner.
|
|
16
|
+
4. A coding agent changes styling, layout, or component structure.
|
|
17
|
+
5. The requested local symptom appears fixed.
|
|
18
|
+
6. Another previously correct part of the rendered interface becomes visually or behaviorally broken.
|
|
19
|
+
7. Source-level tests may still pass because the regression exists only in actual browser geometry, scrolling, overflow, clipping, spacing, responsiveness, or composition.
|
|
20
|
+
8. The coding agent may incorrectly declare success because the requested source-level change was made without verifying the complete rendered result.
|
|
21
|
+
|
|
22
|
+
Examples include:
|
|
23
|
+
|
|
24
|
+
- shrinking a navigation column while leaving its contents too large for the new width;
|
|
25
|
+
- shrinking a navigation column without transferring the released space to the intended workspace;
|
|
26
|
+
- accidentally allowing an advertising rail to absorb released width;
|
|
27
|
+
- changing one grid track while unintentionally moving or resizing unrelated regions;
|
|
28
|
+
- fixing a nested scroll container in source while the rendered page still scrolls through the wrong container;
|
|
29
|
+
- causing labels to wrap, clip, overlap, or disappear;
|
|
30
|
+
- creating horizontal overflow at another viewport;
|
|
31
|
+
- moving, hiding, or resizing advertising, footer, header, or workspace regions unintentionally;
|
|
32
|
+
- satisfying one numerical styling requirement while degrading the composition as a whole;
|
|
33
|
+
- fixing one frontend problem while silently violating a previously approved frontend behavior.
|
|
34
|
+
|
|
35
|
+
Static repository understanding alone cannot reliably detect these failures because the authoritative evidence exists in the rendered browser.
|
|
36
|
+
|
|
37
|
+
There is also a communication problem.
|
|
38
|
+
|
|
39
|
+
A human often thinks about a frontend visually:
|
|
40
|
+
|
|
41
|
+
```text
|
|
42
|
+
make this region narrower
|
|
43
|
+
move this boundary
|
|
44
|
+
give the released space to this region
|
|
45
|
+
preserve these regions
|
|
46
|
+
keep this scrolling behavior
|
|
47
|
+
do not change this layout relationship
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
An LLM normally receives that intent as prose and must translate it into source changes without a reliable shared representation of the rendered interface.
|
|
51
|
+
|
|
52
|
+
`my-frontend-observer` exists to provide that missing representation.
|
|
53
|
+
|
|
54
|
+
## Product identity
|
|
55
|
+
|
|
56
|
+
`my-frontend-observer` is the runtime/browser evidence producer within the broader `my-dev-kit` ecosystem.
|
|
57
|
+
|
|
58
|
+
Its responsibility is:
|
|
59
|
+
|
|
60
|
+
```text
|
|
61
|
+
running frontend
|
|
62
|
+
→ real browser
|
|
63
|
+
→ structured runtime evidence
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
It owns evidence about:
|
|
67
|
+
|
|
68
|
+
- what is actually rendered;
|
|
69
|
+
- where rendered regions are;
|
|
70
|
+
- how large they are;
|
|
71
|
+
- how they relate spatially;
|
|
72
|
+
- what is visible or clipped;
|
|
73
|
+
- what owns scrolling;
|
|
74
|
+
- whether overflow exists;
|
|
75
|
+
- what changed between observations;
|
|
76
|
+
- whether approved runtime relationships remain valid;
|
|
77
|
+
- what visual change the user intends.
|
|
78
|
+
|
|
79
|
+
It does not own static repository analysis.
|
|
80
|
+
|
|
81
|
+
The long-term ecosystem responsibility model is:
|
|
82
|
+
|
|
83
|
+
```text
|
|
84
|
+
my-dev-kit
|
|
85
|
+
→ static repository/source evidence producer
|
|
86
|
+
→ files
|
|
87
|
+
→ symbols
|
|
88
|
+
→ dependencies
|
|
89
|
+
→ architecture
|
|
90
|
+
→ probable source ownership
|
|
91
|
+
→ bounded source retrieval
|
|
92
|
+
|
|
93
|
+
my-frontend-observer
|
|
94
|
+
→ rendered browser/runtime evidence producer
|
|
95
|
+
→ screenshots
|
|
96
|
+
→ rendered-region identity
|
|
97
|
+
→ geometry
|
|
98
|
+
→ layout relationships
|
|
99
|
+
→ scrolling and overflow
|
|
100
|
+
→ comparisons
|
|
101
|
+
→ runtime contracts
|
|
102
|
+
→ visual intent
|
|
103
|
+
|
|
104
|
+
my-dev-kit-orchestrator
|
|
105
|
+
→ coordinates development workflows
|
|
106
|
+
→ consumes bounded evidence when appropriate
|
|
107
|
+
→ prepares task context
|
|
108
|
+
→ manages implementation/verification workflow
|
|
109
|
+
|
|
110
|
+
my-dev-kit-lab
|
|
111
|
+
→ evaluates ecosystem behavior
|
|
112
|
+
→ compatibility
|
|
113
|
+
→ controlled fixtures
|
|
114
|
+
→ experiments
|
|
115
|
+
→ evidence quality
|
|
116
|
+
→ cross-project validation
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
These projects remain separately versioned and independently executable.
|
|
120
|
+
|
|
121
|
+
Deep ecosystem integration must not require collapsing their responsibilities into one package.
|
|
122
|
+
|
|
123
|
+
## Product goal
|
|
124
|
+
|
|
125
|
+
Build `my-frontend-observer`, a local-first frontend observation, visual-communication, and runtime-regression tool that allows humans, LLMs, coding agents, and automated checks to reason from the frontend that the browser actually rendered.
|
|
126
|
+
|
|
127
|
+
The tool should convert browser state into structured, inspectable evidence combining, as capabilities mature:
|
|
128
|
+
|
|
129
|
+
- screenshots;
|
|
130
|
+
- stable identities for meaningful rendered regions;
|
|
131
|
+
- relevant Document Object Model structure;
|
|
132
|
+
- rendered element geometry;
|
|
133
|
+
- computed browser layout properties;
|
|
134
|
+
- viewport information;
|
|
135
|
+
- scroll ownership and scroll state;
|
|
136
|
+
- visibility and overflow information;
|
|
137
|
+
- accessibility and semantic information;
|
|
138
|
+
- relationships between important rendered regions;
|
|
139
|
+
- before-and-after observations;
|
|
140
|
+
- persistent frontend invariants;
|
|
141
|
+
- requested-change intent;
|
|
142
|
+
- expected dependent changes;
|
|
143
|
+
- protected regions and properties;
|
|
144
|
+
- structured visual annotations.
|
|
145
|
+
|
|
146
|
+
The primary goal is not to automatically redesign interfaces.
|
|
147
|
+
|
|
148
|
+
The primary goal is to give a human and an LLM a shared representation of:
|
|
149
|
+
|
|
150
|
+
> What is actually on the screen, where it is, how large it is, how it behaves, how its important regions relate to one another, what the user wants changed, what must remain intact, and what actually changed after an implementation edit?
|
|
151
|
+
|
|
152
|
+
## Three primary product jobs
|
|
153
|
+
|
|
154
|
+
### 1. Human-to-LLM design and layout communication
|
|
155
|
+
|
|
156
|
+
The observer should help a user communicate visual and layout intent without requiring the LLM to infer everything from prose or source code.
|
|
157
|
+
|
|
158
|
+
The system should eventually allow communication through a combination of:
|
|
159
|
+
|
|
160
|
+
```text
|
|
161
|
+
screenshot
|
|
162
|
+
+ stable named regions
|
|
163
|
+
+ measured geometry
|
|
164
|
+
+ layout relationships
|
|
165
|
+
+ runtime behavior
|
|
166
|
+
+ visual annotation
|
|
167
|
+
+ textual intent
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
A user should be able to communicate ideas such as:
|
|
171
|
+
|
|
172
|
+
```text
|
|
173
|
+
make primary navigation narrower
|
|
174
|
+
give the released horizontal space to the workspace
|
|
175
|
+
preserve both advertising rails
|
|
176
|
+
do not clip navigation labels
|
|
177
|
+
keep document-level scrolling
|
|
178
|
+
leave the footer relationship unchanged
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
without needing to express the implementation mechanism.
|
|
182
|
+
|
|
183
|
+
### 2. Safe LLM-assisted frontend changes
|
|
184
|
+
|
|
185
|
+
The observer should make the complete rendered result part of the definition of implementation success.
|
|
186
|
+
|
|
187
|
+
A requested local change must not be considered successful merely because the requested element changed.
|
|
188
|
+
|
|
189
|
+
The tool should eventually distinguish:
|
|
190
|
+
|
|
191
|
+
```text
|
|
192
|
+
requested change
|
|
193
|
+
expected dependent change
|
|
194
|
+
protected change
|
|
195
|
+
preserved invariant
|
|
196
|
+
unexpected change
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
This creates an explicit allowed scope of frontend change.
|
|
200
|
+
|
|
201
|
+
Previously approved runtime behavior must remain valid unless the user explicitly supersedes it.
|
|
202
|
+
|
|
203
|
+
### 3. Runtime evidence for the my-dev-kit ecosystem
|
|
204
|
+
|
|
205
|
+
The observer should provide the runtime evidence domain that static repository analysis cannot provide.
|
|
206
|
+
|
|
207
|
+
The intended long-term combination is:
|
|
208
|
+
|
|
209
|
+
```text
|
|
210
|
+
my-dev-kit static evidence
|
|
211
|
+
+
|
|
212
|
+
my-frontend-observer runtime evidence
|
|
213
|
+
↓
|
|
214
|
+
bounded coordinated context
|
|
215
|
+
↓
|
|
216
|
+
LLM / coding agent
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
A runtime region may eventually be correlated with bounded source evidence without requiring the observer to become a source-analysis engine or requiring `my-dev-kit` to become a browser runner.
|
|
220
|
+
|
|
221
|
+
## Intended users
|
|
222
|
+
|
|
223
|
+
Primary users:
|
|
224
|
+
|
|
225
|
+
- developers using LLMs or coding agents for frontend development;
|
|
226
|
+
- developers debugging visual and responsive regressions;
|
|
227
|
+
- developers who need to communicate visual layout intent to an LLM;
|
|
228
|
+
- developers who need browser-observed evidence before accepting frontend changes;
|
|
229
|
+
- maintainers who want machine-readable runtime frontend evidence;
|
|
230
|
+
- maintainers of the broader `my-dev-kit` ecosystem.
|
|
231
|
+
|
|
232
|
+
The initial user is a developer working locally with web applications, LLMs, and coding agents.
|
|
233
|
+
|
|
234
|
+
## Initial workflow
|
|
235
|
+
|
|
236
|
+
The first useful workflow is intentionally small:
|
|
237
|
+
|
|
238
|
+
```text
|
|
239
|
+
local web application
|
|
240
|
+
→ target URL + viewport + explicit observation targets
|
|
241
|
+
→ my-frontend-observer launches Chromium
|
|
242
|
+
→ browser renders target
|
|
243
|
+
→ observer captures screenshot
|
|
244
|
+
→ observer captures structured page evidence
|
|
245
|
+
→ observer captures structured target evidence
|
|
246
|
+
→ observer writes a versioned local observation artifact
|
|
247
|
+
→ command-line result reports completion, warnings, or failure
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
The first version does not need comparison, change contracts, visual annotation, source ownership, or direct integration with other ecosystem projects.
|
|
251
|
+
|
|
252
|
+
Its purpose is to establish a trustworthy runtime-evidence foundation.
|
|
253
|
+
|
|
254
|
+
## Intended end-to-end workflow
|
|
255
|
+
|
|
256
|
+
The long-term workflow is:
|
|
257
|
+
|
|
258
|
+
```text
|
|
259
|
+
local web application
|
|
260
|
+
↓
|
|
261
|
+
my-frontend-observer
|
|
262
|
+
↓
|
|
263
|
+
baseline observation
|
|
264
|
+
+ screenshot
|
|
265
|
+
+ regions
|
|
266
|
+
+ geometry
|
|
267
|
+
+ relationships
|
|
268
|
+
+ runtime behavior
|
|
269
|
+
↓
|
|
270
|
+
human reviews frontend
|
|
271
|
+
↓
|
|
272
|
+
human requests or visually annotates change
|
|
273
|
+
↓
|
|
274
|
+
requested / dependent / protected change scope
|
|
275
|
+
↓
|
|
276
|
+
bounded runtime evidence
|
|
277
|
+
+
|
|
278
|
+
bounded static evidence from my-dev-kit where useful
|
|
279
|
+
↓
|
|
280
|
+
my-dev-kit-orchestrator / developer / LLM
|
|
281
|
+
↓
|
|
282
|
+
coding agent changes target source separately
|
|
283
|
+
↓
|
|
284
|
+
my-frontend-observer captures new state
|
|
285
|
+
↓
|
|
286
|
+
before/after comparison
|
|
287
|
+
↓
|
|
288
|
+
requested changes evaluated
|
|
289
|
+
+ dependent changes evaluated
|
|
290
|
+
+ protected properties evaluated
|
|
291
|
+
+ existing regression contracts rerun
|
|
292
|
+
↓
|
|
293
|
+
PASS
|
|
294
|
+
or
|
|
295
|
+
actionable evidence identifying what broke
|
|
296
|
+
↓
|
|
297
|
+
human approves new baseline
|
|
298
|
+
or requests another iteration
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
The target application remains a separate project throughout this process.
|
|
302
|
+
|
|
303
|
+
## Principal capability 1 — Browser observation
|
|
304
|
+
|
|
305
|
+
The tool must observe a locally running web application through a real browser.
|
|
306
|
+
|
|
307
|
+
Initial browser support should use Chromium through Playwright unless architecture work establishes a materially better supported mechanism.
|
|
308
|
+
|
|
309
|
+
The initial implementation should accept at minimum:
|
|
310
|
+
|
|
311
|
+
- target URL;
|
|
312
|
+
- viewport width;
|
|
313
|
+
- viewport height;
|
|
314
|
+
- explicitly configured observation targets;
|
|
315
|
+
- output location.
|
|
316
|
+
|
|
317
|
+
Later configuration may support:
|
|
318
|
+
|
|
319
|
+
- route collections;
|
|
320
|
+
- themes;
|
|
321
|
+
- reusable scenarios;
|
|
322
|
+
- browser-state setup;
|
|
323
|
+
- authentication setup;
|
|
324
|
+
- device profiles;
|
|
325
|
+
- interaction sequences.
|
|
326
|
+
|
|
327
|
+
Those later capabilities are not required for the first version.
|
|
328
|
+
|
|
329
|
+
Browser runtime behavior is authoritative for rendered geometry.
|
|
330
|
+
|
|
331
|
+
The observer must not infer final layout solely from source styles.
|
|
332
|
+
|
|
333
|
+
## Principal capability 2 — Screenshot capture
|
|
334
|
+
|
|
335
|
+
For each observation, capture the rendered page as an image.
|
|
336
|
+
|
|
337
|
+
The screenshot is evidence associated with the same observation identity as the structured browser measurements.
|
|
338
|
+
|
|
339
|
+
Screenshots support:
|
|
340
|
+
|
|
341
|
+
- human review;
|
|
342
|
+
- multimodal LLM review;
|
|
343
|
+
- annotation;
|
|
344
|
+
- before/after inspection;
|
|
345
|
+
- regression evidence.
|
|
346
|
+
|
|
347
|
+
The system should eventually support:
|
|
348
|
+
|
|
349
|
+
- viewport screenshots;
|
|
350
|
+
- full-page screenshots where useful.
|
|
351
|
+
|
|
352
|
+
Exact initial screenshot behavior and capture-readiness semantics must be defined before implementation.
|
|
353
|
+
|
|
354
|
+
Pixel-perfect screenshot comparison must not become the only regression mechanism.
|
|
355
|
+
|
|
356
|
+
Structured browser evidence remains essential.
|
|
357
|
+
|
|
358
|
+
## Principal capability 3 — Stable rendered-region identity
|
|
359
|
+
|
|
360
|
+
Meaningful rendered regions need stable logical identities so humans, LLMs, comparisons, annotations, and regression contracts can refer to the same conceptual region over time.
|
|
361
|
+
|
|
362
|
+
Examples may include:
|
|
363
|
+
|
|
364
|
+
```text
|
|
365
|
+
app-shell
|
|
366
|
+
header
|
|
367
|
+
primary-navigation
|
|
368
|
+
main-content
|
|
369
|
+
tool-workspace
|
|
370
|
+
left-ad-rail
|
|
371
|
+
right-ad-rail
|
|
372
|
+
footer-ad
|
|
373
|
+
footer
|
|
374
|
+
theme-control
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
These names are examples only.
|
|
378
|
+
|
|
379
|
+
The observer must not assume that every application uses the same regions.
|
|
380
|
+
|
|
381
|
+
Region identity should support appropriate browser-observable mechanisms such as:
|
|
382
|
+
|
|
383
|
+
- semantic HTML elements;
|
|
384
|
+
- accessibility role;
|
|
385
|
+
- accessible name;
|
|
386
|
+
- stable `id`;
|
|
387
|
+
- stable `data-*` attribute;
|
|
388
|
+
- bounded CSS selector fallback;
|
|
389
|
+
- text-based selection only where appropriate.
|
|
390
|
+
|
|
391
|
+
A target may have a stable observer-level identity without having a known source-code component identity.
|
|
392
|
+
|
|
393
|
+
For example:
|
|
394
|
+
|
|
395
|
+
```text
|
|
396
|
+
runtime target:
|
|
397
|
+
primary-navigation
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
does not by itself prove:
|
|
401
|
+
|
|
402
|
+
```text
|
|
403
|
+
source owner:
|
|
404
|
+
VerticalNav.tsx
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
Source ownership belongs to the static-analysis integration boundary.
|
|
408
|
+
|
|
409
|
+
## Principal capability 4 — Rendered layout map
|
|
410
|
+
|
|
411
|
+
Capture a structured representation of important rendered elements.
|
|
412
|
+
|
|
413
|
+
For an observed region, useful browser evidence includes:
|
|
414
|
+
|
|
415
|
+
```text
|
|
416
|
+
identifier
|
|
417
|
+
selection method
|
|
418
|
+
semantic role
|
|
419
|
+
tag
|
|
420
|
+
accessible name where available
|
|
421
|
+
text summary where appropriate
|
|
422
|
+
|
|
423
|
+
x
|
|
424
|
+
y
|
|
425
|
+
width
|
|
426
|
+
height
|
|
427
|
+
right
|
|
428
|
+
bottom
|
|
429
|
+
|
|
430
|
+
visibility
|
|
431
|
+
display
|
|
432
|
+
position
|
|
433
|
+
overflow-x
|
|
434
|
+
overflow-y
|
|
435
|
+
z-index where relevant
|
|
436
|
+
|
|
437
|
+
scroll width
|
|
438
|
+
scroll height
|
|
439
|
+
client width
|
|
440
|
+
client height
|
|
441
|
+
scroll top
|
|
442
|
+
scroll left
|
|
443
|
+
```
|
|
444
|
+
|
|
445
|
+
The observer should prefer browser-computed values over attempting to infer final geometry from source styling.
|
|
446
|
+
|
|
447
|
+
Observed dimensions are measurements, not automatically design constants.
|
|
448
|
+
|
|
449
|
+
For example:
|
|
450
|
+
|
|
451
|
+
```text
|
|
452
|
+
primary-navigation.width = 176
|
|
453
|
+
```
|
|
454
|
+
|
|
455
|
+
means:
|
|
456
|
+
|
|
457
|
+
```text
|
|
458
|
+
the browser rendered the observed region at 176 pixels
|
|
459
|
+
```
|
|
460
|
+
|
|
461
|
+
It does not automatically mean:
|
|
462
|
+
|
|
463
|
+
```text
|
|
464
|
+
navigation must always be exactly 176 pixels wide
|
|
465
|
+
```
|
|
466
|
+
|
|
467
|
+
Responsive layouts must remain possible.
|
|
468
|
+
|
|
469
|
+
The output must distinguish:
|
|
470
|
+
|
|
471
|
+
```text
|
|
472
|
+
direct browser observation
|
|
473
|
+
computed browser property
|
|
474
|
+
derived relationship or interpretation
|
|
475
|
+
```
|
|
476
|
+
|
|
477
|
+
## Principal capability 5 — Page-level browser state
|
|
478
|
+
|
|
479
|
+
Capture page-level evidence such as:
|
|
480
|
+
|
|
481
|
+
```text
|
|
482
|
+
URL
|
|
483
|
+
final URL after navigation
|
|
484
|
+
document title
|
|
485
|
+
|
|
486
|
+
viewport width
|
|
487
|
+
viewport height
|
|
488
|
+
device pixel ratio
|
|
489
|
+
|
|
490
|
+
document width
|
|
491
|
+
document height
|
|
492
|
+
document scroll width
|
|
493
|
+
document scroll height
|
|
494
|
+
document client width
|
|
495
|
+
document client height
|
|
496
|
+
|
|
497
|
+
window scroll X
|
|
498
|
+
window scroll Y
|
|
499
|
+
|
|
500
|
+
horizontal overflow state
|
|
501
|
+
vertical overflow state
|
|
502
|
+
```
|
|
503
|
+
|
|
504
|
+
This should make questions such as these answerable from runtime evidence:
|
|
505
|
+
|
|
506
|
+
- Does the document own vertical scrolling?
|
|
507
|
+
- Is a child container actually scrolling instead?
|
|
508
|
+
- Is there horizontal document overflow?
|
|
509
|
+
- Is the footer below the initial viewport?
|
|
510
|
+
- Did the page become taller or wider after a change?
|
|
511
|
+
- Did viewport behavior change unexpectedly?
|
|
512
|
+
|
|
513
|
+
## Principal capability 6 — Runtime scrolling, overflow, and visibility
|
|
514
|
+
|
|
515
|
+
Scrolling must be treated as runtime behavior rather than inferred solely from style declarations.
|
|
516
|
+
|
|
517
|
+
The observer should eventually be able to:
|
|
518
|
+
|
|
519
|
+
1. capture initial scroll state;
|
|
520
|
+
2. perform a controlled scroll action;
|
|
521
|
+
3. capture resulting scroll state;
|
|
522
|
+
4. identify which observed regions changed scroll position;
|
|
523
|
+
5. expose evidence about which container appears to own scrolling;
|
|
524
|
+
6. identify whether elements enter or leave the viewport;
|
|
525
|
+
7. identify horizontal or vertical overflow.
|
|
526
|
+
|
|
527
|
+
Example direct observation:
|
|
528
|
+
|
|
529
|
+
```text
|
|
530
|
+
before:
|
|
531
|
+
window.scrollY = 0
|
|
532
|
+
main.scrollTop = 0
|
|
533
|
+
|
|
534
|
+
after requested page scroll:
|
|
535
|
+
window.scrollY = 500
|
|
536
|
+
main.scrollTop = 0
|
|
537
|
+
```
|
|
538
|
+
|
|
539
|
+
Possible derived interpretation:
|
|
540
|
+
|
|
541
|
+
```text
|
|
542
|
+
document appears to own primary vertical scrolling
|
|
543
|
+
```
|
|
544
|
+
|
|
545
|
+
The observer must not present the derived statement as if it were a direct browser measurement.
|
|
546
|
+
|
|
547
|
+
## Principal capability 7 — Layout relationships and dependency relationships
|
|
548
|
+
|
|
549
|
+
Individual measurements are not enough.
|
|
550
|
+
|
|
551
|
+
Many design requirements concern relationships between regions.
|
|
552
|
+
|
|
553
|
+
The observer should support relationship-oriented evidence such as:
|
|
554
|
+
|
|
555
|
+
```text
|
|
556
|
+
navigation is left of workspace
|
|
557
|
+
workspace is wider than navigation
|
|
558
|
+
navigation does not overlap workspace
|
|
559
|
+
workspace does not overlap right advertising rail
|
|
560
|
+
footer begins after main content
|
|
561
|
+
element is contained inside parent
|
|
562
|
+
navigation contents fit inside navigation
|
|
563
|
+
document width does not exceed viewport width
|
|
564
|
+
```
|
|
565
|
+
|
|
566
|
+
The system should also leave room for an explicit layout relationship or dependency model.
|
|
567
|
+
|
|
568
|
+
Example:
|
|
569
|
+
|
|
570
|
+
```text
|
|
571
|
+
Viewport
|
|
572
|
+
↓
|
|
573
|
+
AppShell
|
|
574
|
+
├── LeftAd
|
|
575
|
+
├── Navigation
|
|
576
|
+
├── Workspace
|
|
577
|
+
└── RightAd
|
|
578
|
+
```
|
|
579
|
+
|
|
580
|
+
A requested change may imply legitimate dependent changes.
|
|
581
|
+
|
|
582
|
+
Example:
|
|
583
|
+
|
|
584
|
+
```text
|
|
585
|
+
Navigation width decreases
|
|
586
|
+
↓
|
|
587
|
+
Workspace width increases
|
|
588
|
+
Workspace x-position may move
|
|
589
|
+
```
|
|
590
|
+
|
|
591
|
+
Other properties may need to remain preserved:
|
|
592
|
+
|
|
593
|
+
```text
|
|
594
|
+
LeftAd width
|
|
595
|
+
RightAd width
|
|
596
|
+
Header height
|
|
597
|
+
Footer relationships
|
|
598
|
+
```
|
|
599
|
+
|
|
600
|
+
The system must distinguish observed relationships from causal claims.
|
|
601
|
+
|
|
602
|
+
It should not automatically claim that one region caused another region to change merely because both changed.
|
|
603
|
+
|
|
604
|
+
Expected dependency semantics should come from an explicit contract, user intent, or another supported source of evidence.
|
|
605
|
+
|
|
606
|
+
## Principal capability 8 — Observation artifact
|
|
607
|
+
|
|
608
|
+
Each capture should produce one cohesive, observer-owned, versioned observation artifact or artifact directory.
|
|
609
|
+
|
|
610
|
+
The exact schema and filenames must be decided during architecture and schema design.
|
|
611
|
+
|
|
612
|
+
A conceptual structure may resemble:
|
|
613
|
+
|
|
614
|
+
```text
|
|
615
|
+
observation/
|
|
616
|
+
manifest.json
|
|
617
|
+
page.json
|
|
618
|
+
elements.json
|
|
619
|
+
screenshot.png
|
|
620
|
+
```
|
|
621
|
+
|
|
622
|
+
Possible future additions may include:
|
|
623
|
+
|
|
624
|
+
```text
|
|
625
|
+
relationships.json
|
|
626
|
+
interactions.json
|
|
627
|
+
comparison.json
|
|
628
|
+
contracts.json
|
|
629
|
+
annotations.json
|
|
630
|
+
summary.txt
|
|
631
|
+
```
|
|
632
|
+
|
|
633
|
+
These names are conceptual rather than fixed requirements.
|
|
634
|
+
|
|
635
|
+
The public artifact contract should establish from the beginning:
|
|
636
|
+
|
|
637
|
+
```text
|
|
638
|
+
artifact kind
|
|
639
|
+
schema version
|
|
640
|
+
observation identity
|
|
641
|
+
producer version
|
|
642
|
+
browser identity
|
|
643
|
+
request/configuration identity
|
|
644
|
+
provenance
|
|
645
|
+
artifact references
|
|
646
|
+
completion state
|
|
647
|
+
diagnostics
|
|
648
|
+
limits
|
|
649
|
+
truncation/omission reporting
|
|
650
|
+
```
|
|
651
|
+
|
|
652
|
+
Artifact paths should be relative and portable where possible.
|
|
653
|
+
|
|
654
|
+
Heavy evidence such as screenshots should be referenced rather than embedded into unrelated structured records.
|
|
655
|
+
|
|
656
|
+
Consumers must be able to distinguish a completed observation from a partial or failed capture.
|
|
657
|
+
|
|
658
|
+
The artifact must distinguish:
|
|
659
|
+
|
|
660
|
+
```text
|
|
661
|
+
observed evidence
|
|
662
|
+
derived evidence
|
|
663
|
+
unavailable evidence
|
|
664
|
+
not-applicable evidence
|
|
665
|
+
partial evidence
|
|
666
|
+
```
|
|
667
|
+
|
|
668
|
+
The artifact schema should evolve intentionally and additively where compatible.
|
|
669
|
+
|
|
670
|
+
Package version and artifact schema version must remain separate concepts.
|
|
671
|
+
|
|
672
|
+
## Principal capability 9 — Before/after comparison
|
|
673
|
+
|
|
674
|
+
The tool should compare two observations representing comparable logical frontend states.
|
|
675
|
+
|
|
676
|
+
Useful differences include:
|
|
677
|
+
|
|
678
|
+
```text
|
|
679
|
+
element moved
|
|
680
|
+
element resized
|
|
681
|
+
element disappeared
|
|
682
|
+
element appeared
|
|
683
|
+
visibility changed
|
|
684
|
+
element became clipped
|
|
685
|
+
horizontal overflow appeared
|
|
686
|
+
vertical overflow changed
|
|
687
|
+
document size changed
|
|
688
|
+
scroll-owner evidence changed
|
|
689
|
+
relative position changed
|
|
690
|
+
layout relationship changed
|
|
691
|
+
```
|
|
692
|
+
|
|
693
|
+
Comparison should produce structured evidence such as:
|
|
694
|
+
|
|
695
|
+
```text
|
|
696
|
+
target
|
|
697
|
+
property or relationship
|
|
698
|
+
before value
|
|
699
|
+
after value
|
|
700
|
+
difference
|
|
701
|
+
classification
|
|
702
|
+
supporting observation identities
|
|
703
|
+
```
|
|
704
|
+
|
|
705
|
+
Example:
|
|
706
|
+
|
|
707
|
+
```text
|
|
708
|
+
Target: primary-navigation
|
|
709
|
+
Property: width
|
|
710
|
+
Before: 176
|
|
711
|
+
After: 97
|
|
712
|
+
Difference: -79
|
|
713
|
+
```
|
|
714
|
+
|
|
715
|
+
The comparison engine should preserve references to before/after screenshots and underlying observations.
|
|
716
|
+
|
|
717
|
+
The tool should not rely solely on screenshot pixel differences.
|
|
718
|
+
|
|
719
|
+
Before/after comparison is not part of the first observation version.
|
|
720
|
+
|
|
721
|
+
The initial observation identity and provenance model must nevertheless preserve enough information to support future comparability decisions.
|
|
722
|
+
|
|
723
|
+
## Principal capability 10 — Explicit change scope
|
|
724
|
+
|
|
725
|
+
A central long-term concept is the ability to represent what a requested frontend change is allowed to affect.
|
|
726
|
+
|
|
727
|
+
A change should be expressible through categories such as:
|
|
728
|
+
|
|
729
|
+
### Requested changes
|
|
730
|
+
|
|
731
|
+
Properties or relationships explicitly intended to change.
|
|
732
|
+
|
|
733
|
+
Example:
|
|
734
|
+
|
|
735
|
+
```text
|
|
736
|
+
primary-navigation.width
|
|
737
|
+
→ decrease significantly
|
|
738
|
+
```
|
|
739
|
+
|
|
740
|
+
### Expected dependent changes
|
|
741
|
+
|
|
742
|
+
Properties expected to change as a legitimate consequence.
|
|
743
|
+
|
|
744
|
+
Example:
|
|
745
|
+
|
|
746
|
+
```text
|
|
747
|
+
tool-workspace.width
|
|
748
|
+
→ increase using released horizontal space
|
|
749
|
+
|
|
750
|
+
tool-workspace.x
|
|
751
|
+
→ may move left
|
|
752
|
+
```
|
|
753
|
+
|
|
754
|
+
### Protected properties or regions
|
|
755
|
+
|
|
756
|
+
Properties expected to remain unchanged.
|
|
757
|
+
|
|
758
|
+
Example:
|
|
759
|
+
|
|
760
|
+
```text
|
|
761
|
+
left-ad-rail.width
|
|
762
|
+
right-ad-rail.width
|
|
763
|
+
header.height
|
|
764
|
+
```
|
|
765
|
+
|
|
766
|
+
### Preserved invariants and behaviors
|
|
767
|
+
|
|
768
|
+
Previously correct relationships or behaviors that must remain true.
|
|
769
|
+
|
|
770
|
+
Example:
|
|
771
|
+
|
|
772
|
+
```text
|
|
773
|
+
navigation contents remain unclipped
|
|
774
|
+
navigation does not overlap workspace
|
|
775
|
+
workspace does not overlap advertising rails
|
|
776
|
+
document does not horizontally overflow
|
|
777
|
+
document continues to own primary page scrolling
|
|
778
|
+
mobile layout remains usable
|
|
779
|
+
```
|
|
780
|
+
|
|
781
|
+
Together, these categories define the allowed scope of rendered change.
|
|
782
|
+
|
|
783
|
+
This concept may eventually be represented by an explicit `ChangeContract` or equivalent schema.
|
|
784
|
+
|
|
785
|
+
The conceptual name does not require that exact implementation type.
|
|
786
|
+
|
|
787
|
+
## Principal capability 11 — Frontend regression and change contracts
|
|
788
|
+
|
|
789
|
+
The project should support persistent executable runtime invariants.
|
|
790
|
+
|
|
791
|
+
Examples include:
|
|
792
|
+
|
|
793
|
+
```text
|
|
794
|
+
element is visible
|
|
795
|
+
element is not clipped
|
|
796
|
+
element width is within a bound
|
|
797
|
+
element A does not overlap element B
|
|
798
|
+
element A is wider than element B
|
|
799
|
+
element A follows element B vertically
|
|
800
|
+
document width does not exceed viewport width
|
|
801
|
+
window owns requested page scrolling
|
|
802
|
+
specified element does not own primary page scrolling
|
|
803
|
+
element begins below the initial viewport
|
|
804
|
+
```
|
|
805
|
+
|
|
806
|
+
Relationship-oriented contracts should be preferred when they represent user intent more accurately than fixed pixels.
|
|
807
|
+
|
|
808
|
+
For example:
|
|
809
|
+
|
|
810
|
+
Prefer:
|
|
811
|
+
|
|
812
|
+
```text
|
|
813
|
+
workspace width increases when navigation width decreases
|
|
814
|
+
```
|
|
815
|
+
|
|
816
|
+
when that is the actual design requirement.
|
|
817
|
+
|
|
818
|
+
Use:
|
|
819
|
+
|
|
820
|
+
```text
|
|
821
|
+
navigation.width = 97
|
|
822
|
+
```
|
|
823
|
+
|
|
824
|
+
only when the user truly requires that exact value.
|
|
825
|
+
|
|
826
|
+
The system should support two related forms of contract:
|
|
827
|
+
|
|
828
|
+
```text
|
|
829
|
+
persistent baseline contracts
|
|
830
|
+
```
|
|
831
|
+
|
|
832
|
+
and:
|
|
833
|
+
|
|
834
|
+
```text
|
|
835
|
+
per-change contracts
|
|
836
|
+
```
|
|
837
|
+
|
|
838
|
+
Persistent baseline contracts preserve approved frontend behavior across future changes.
|
|
839
|
+
|
|
840
|
+
Per-change contracts describe:
|
|
841
|
+
|
|
842
|
+
```text
|
|
843
|
+
requested changes
|
|
844
|
+
expected dependent changes
|
|
845
|
+
protected properties
|
|
846
|
+
preserved invariants
|
|
847
|
+
```
|
|
848
|
+
|
|
849
|
+
Example evaluation:
|
|
850
|
+
|
|
851
|
+
```text
|
|
852
|
+
REQUESTED CHANGE
|
|
853
|
+
Navigation.width
|
|
854
|
+
176 → 97
|
|
855
|
+
PASS
|
|
856
|
+
|
|
857
|
+
EXPECTED DEPENDENT CHANGE
|
|
858
|
+
Workspace.width
|
|
859
|
+
960 → 1039
|
|
860
|
+
PASS
|
|
861
|
+
|
|
862
|
+
PROTECTED PROPERTY
|
|
863
|
+
RightAd.width
|
|
864
|
+
112 → 154
|
|
865
|
+
FAIL
|
|
866
|
+
|
|
867
|
+
PRESERVED INVARIANT
|
|
868
|
+
Navigation content became clipped
|
|
869
|
+
FAIL
|
|
870
|
+
|
|
871
|
+
OVERALL
|
|
872
|
+
FAIL
|
|
873
|
+
```
|
|
874
|
+
|
|
875
|
+
A frontend change must not be declared successful merely because its requested local mutation succeeded.
|
|
876
|
+
|
|
877
|
+
## Principal capability 12 — Bounded agent context and static/runtime integration
|
|
878
|
+
|
|
879
|
+
Structured output must support both programmatic use and LLM consumption.
|
|
880
|
+
|
|
881
|
+
The tool should eventually produce a bounded runtime-evidence package containing, as applicable:
|
|
882
|
+
|
|
883
|
+
- target page identity;
|
|
884
|
+
- viewport;
|
|
885
|
+
- major observed regions;
|
|
886
|
+
- region geometry;
|
|
887
|
+
- semantic identities;
|
|
888
|
+
- layout relationships;
|
|
889
|
+
- dependency/change-scope information;
|
|
890
|
+
- overflow state;
|
|
891
|
+
- scroll evidence;
|
|
892
|
+
- comparison results;
|
|
893
|
+
- contract results;
|
|
894
|
+
- important warnings;
|
|
895
|
+
- references to underlying raw evidence.
|
|
896
|
+
|
|
897
|
+
Preserve the evidence hierarchy:
|
|
898
|
+
|
|
899
|
+
```text
|
|
900
|
+
raw browser evidence
|
|
901
|
+
↓
|
|
902
|
+
normalized structured evidence
|
|
903
|
+
↓
|
|
904
|
+
derived relationships
|
|
905
|
+
↓
|
|
906
|
+
bounded summary/context
|
|
907
|
+
↓
|
|
908
|
+
LLM reasoning
|
|
909
|
+
```
|
|
910
|
+
|
|
911
|
+
The bounded context must not require an LLM to consume:
|
|
912
|
+
|
|
913
|
+
- an entire raw Document Object Model dump;
|
|
914
|
+
- every computed style property;
|
|
915
|
+
- enormous accessibility trees;
|
|
916
|
+
- repeated unchanged measurements;
|
|
917
|
+
- every screenshot produced during a workflow.
|
|
918
|
+
|
|
919
|
+
The summary must remain traceable to the evidence supporting it.
|
|
920
|
+
|
|
921
|
+
The initial command-line version may return a concise execution summary.
|
|
922
|
+
|
|
923
|
+
That operational summary must not be confused with the richer agent-oriented context package described here.
|
|
924
|
+
|
|
925
|
+
The shortest path to practical coding-agent use combines this bounded runtime
|
|
926
|
+
projection with relevant bounded static/source evidence from `my-dev-kit`.
|
|
927
|
+
The evidence domains remain separate and traceable:
|
|
928
|
+
|
|
929
|
+
```text
|
|
930
|
+
observer runtime evidence
|
|
931
|
+
+
|
|
932
|
+
my-dev-kit static evidence
|
|
933
|
+
↓
|
|
934
|
+
bounded agent context
|
|
935
|
+
↓
|
|
936
|
+
external coding agent
|
|
937
|
+
```
|
|
938
|
+
|
|
939
|
+
Runtime/static correlation must be explicit and may be ambiguous. A stable
|
|
940
|
+
runtime target identity must never silently become a source-ownership claim.
|
|
941
|
+
The observer owns runtime projection and its correlation/export boundary;
|
|
942
|
+
`my-dev-kit` owns static indexing and retrieval; the orchestrator coordinates
|
|
943
|
+
bounded consumption; the lab owns exact compatibility evaluation.
|
|
944
|
+
|
|
945
|
+
This integrated, text/config-driven path must support an end-to-end coding-agent
|
|
946
|
+
change review before the viewer or visual annotation becomes a prerequisite.
|
|
947
|
+
The observer does not edit source: an external coding agent makes the change,
|
|
948
|
+
after which the observer rerenders, compares, and evaluates preserved contracts.
|
|
949
|
+
|
|
950
|
+
## Future capability — Static/runtime source association
|
|
951
|
+
|
|
952
|
+
The observer should associate runtime regions with bounded static source
|
|
953
|
+
evidence from `my-dev-kit` where reliable.
|
|
954
|
+
|
|
955
|
+
The desired chain is:
|
|
956
|
+
|
|
957
|
+
```text
|
|
958
|
+
rendered region
|
|
959
|
+
→ runtime target identity
|
|
960
|
+
→ correlation evidence
|
|
961
|
+
→ my-dev-kit static node or bounded static evidence
|
|
962
|
+
→ relevant source retrieval
|
|
963
|
+
```
|
|
964
|
+
|
|
965
|
+
`my-frontend-observer` must not implement a competing repository-analysis
|
|
966
|
+
system. It must not duplicate repository crawling, parsing, indexing, source
|
|
967
|
+
graphs, retrieval, architecture inference, or edit-owner analysis. If runtime
|
|
968
|
+
evidence cannot prove source ownership, the observer must preserve uncertainty.
|
|
969
|
+
|
|
970
|
+
The ecosystem integration needed for bounded coding-agent context belongs on
|
|
971
|
+
the core path after safe-change contracts and before human-interface work.
|
|
972
|
+
|
|
973
|
+
## Principal capability 13 — Human visual review
|
|
974
|
+
|
|
975
|
+
After the text/config-driven coding-agent workflow is proven, the project should
|
|
976
|
+
provide a human-readable graphical way to inspect the same canonical evidence.
|
|
977
|
+
|
|
978
|
+
A later local interface should allow the developer to:
|
|
979
|
+
|
|
980
|
+
- view the captured screenshot;
|
|
981
|
+
- inspect known observed regions;
|
|
982
|
+
- see geometry;
|
|
983
|
+
- see relevant browser properties;
|
|
984
|
+
- inspect relationships;
|
|
985
|
+
- inspect comparisons;
|
|
986
|
+
- inspect contract results;
|
|
987
|
+
- understand warnings and failures.
|
|
988
|
+
|
|
989
|
+
Selecting a structured region should identify the corresponding screenshot area where practical.
|
|
990
|
+
|
|
991
|
+
Likewise, selecting a screenshot region should eventually support identifying the corresponding known target.
|
|
992
|
+
|
|
993
|
+
The viewer must consume the reusable observation engine and artifacts.
|
|
994
|
+
|
|
995
|
+
It must not contain a second browser-observation implementation.
|
|
996
|
+
|
|
997
|
+
## Future capability — Human visual annotation
|
|
998
|
+
|
|
999
|
+
A later phase should allow the user to communicate visual intent directly on top of an observed frontend.
|
|
1000
|
+
|
|
1001
|
+
Useful annotation concepts may include:
|
|
1002
|
+
|
|
1003
|
+
- freehand drawing;
|
|
1004
|
+
- rectangle;
|
|
1005
|
+
- arrow;
|
|
1006
|
+
- line;
|
|
1007
|
+
- textual note;
|
|
1008
|
+
- preserve marker;
|
|
1009
|
+
- resize marker;
|
|
1010
|
+
- move marker;
|
|
1011
|
+
- remove marker;
|
|
1012
|
+
- inspect marker.
|
|
1013
|
+
|
|
1014
|
+
Annotations must remain structured.
|
|
1015
|
+
|
|
1016
|
+
Do not store annotation intent only as flattened image pixels.
|
|
1017
|
+
|
|
1018
|
+
An annotation should preserve information such as:
|
|
1019
|
+
|
|
1020
|
+
```text
|
|
1021
|
+
observation identity
|
|
1022
|
+
screenshot identity
|
|
1023
|
+
annotation geometry
|
|
1024
|
+
annotation type
|
|
1025
|
+
textual instruction
|
|
1026
|
+
associated runtime target where available
|
|
1027
|
+
```
|
|
1028
|
+
|
|
1029
|
+
Example:
|
|
1030
|
+
|
|
1031
|
+
```text
|
|
1032
|
+
annotation
|
|
1033
|
+
→ primary-navigation
|
|
1034
|
+
→ resize
|
|
1035
|
+
→ "make this visually narrower"
|
|
1036
|
+
```
|
|
1037
|
+
|
|
1038
|
+
Another annotation may express:
|
|
1039
|
+
|
|
1040
|
+
```text
|
|
1041
|
+
annotation
|
|
1042
|
+
→ right-ad-rail
|
|
1043
|
+
→ preserve
|
|
1044
|
+
```
|
|
1045
|
+
|
|
1046
|
+
The intended LLM-facing package may eventually combine:
|
|
1047
|
+
|
|
1048
|
+
```text
|
|
1049
|
+
original screenshot
|
|
1050
|
+
+ annotated screenshot
|
|
1051
|
+
+ structured runtime observations
|
|
1052
|
+
+ structured annotations
|
|
1053
|
+
+ current change scope
|
|
1054
|
+
+ previously approved contracts
|
|
1055
|
+
```
|
|
1056
|
+
|
|
1057
|
+
This allows an LLM to reason simultaneously about:
|
|
1058
|
+
|
|
1059
|
+
```text
|
|
1060
|
+
what exists
|
|
1061
|
+
```
|
|
1062
|
+
|
|
1063
|
+
and:
|
|
1064
|
+
|
|
1065
|
+
```text
|
|
1066
|
+
what the user wants changed
|
|
1067
|
+
```
|
|
1068
|
+
|
|
1069
|
+
## Relationship to `my-dev-kit`
|
|
1070
|
+
|
|
1071
|
+
`my-dev-kit` and `my-frontend-observer` are sibling evidence producers.
|
|
1072
|
+
|
|
1073
|
+
Conceptually:
|
|
1074
|
+
|
|
1075
|
+
```text
|
|
1076
|
+
my-dev-kit
|
|
1077
|
+
→ what source exists?
|
|
1078
|
+
→ how is the repository structured?
|
|
1079
|
+
→ what symbols and dependencies matter?
|
|
1080
|
+
→ what source probably owns this behavior?
|
|
1081
|
+
→ what bounded source should the agent inspect?
|
|
1082
|
+
|
|
1083
|
+
my-frontend-observer
|
|
1084
|
+
→ what did the browser actually render?
|
|
1085
|
+
→ where are the important regions?
|
|
1086
|
+
→ how large are they?
|
|
1087
|
+
→ what relationships exist?
|
|
1088
|
+
→ what is clipped or overflowing?
|
|
1089
|
+
→ what owns scrolling?
|
|
1090
|
+
→ what changed?
|
|
1091
|
+
```
|
|
1092
|
+
|
|
1093
|
+
Neither project should normally import or execute the other merely to perform its native responsibility.
|
|
1094
|
+
|
|
1095
|
+
Their evidence may later be correlated by an explicit consumer or integration contract.
|
|
1096
|
+
|
|
1097
|
+
## Relationship to `my-dev-kit-orchestrator`
|
|
1098
|
+
|
|
1099
|
+
`my-dev-kit-orchestrator` owns workflow coordination rather than runtime observation.
|
|
1100
|
+
|
|
1101
|
+
A future integration may allow the orchestrator to consume a bounded projection or reference to observer evidence.
|
|
1102
|
+
|
|
1103
|
+
The orchestrator should not:
|
|
1104
|
+
|
|
1105
|
+
- own browser automation;
|
|
1106
|
+
- reproduce observer measurements;
|
|
1107
|
+
- embed full raw observation artifacts into prompts by default;
|
|
1108
|
+
- redefine observer evidence semantics;
|
|
1109
|
+
- become the canonical owner of observer artifacts.
|
|
1110
|
+
|
|
1111
|
+
The observer should expose machine-consumable artifacts and a clean programmatic boundary so future orchestrator integration does not require parsing human console output.
|
|
1112
|
+
|
|
1113
|
+
No orchestrator runtime dependency is required for the first observer versions.
|
|
1114
|
+
|
|
1115
|
+
## Relationship to `my-dev-kit-lab`
|
|
1116
|
+
|
|
1117
|
+
`my-dev-kit-lab` should eventually evaluate observer compatibility and ecosystem behavior.
|
|
1118
|
+
|
|
1119
|
+
Possible future responsibilities include:
|
|
1120
|
+
|
|
1121
|
+
- exact readers for supported observer artifact versions;
|
|
1122
|
+
- pinned observer fixtures;
|
|
1123
|
+
- browser/schema compatibility matrices;
|
|
1124
|
+
- static/runtime correlation experiments;
|
|
1125
|
+
- evidence-quality evaluation;
|
|
1126
|
+
- controlled compatibility tests across ecosystem projects.
|
|
1127
|
+
|
|
1128
|
+
The lab must not become the observer's production runtime.
|
|
1129
|
+
|
|
1130
|
+
Normal frontend observation should not require the lab.
|
|
1131
|
+
|
|
1132
|
+
## Ecosystem integration principle
|
|
1133
|
+
|
|
1134
|
+
Deep integration means:
|
|
1135
|
+
|
|
1136
|
+
```text
|
|
1137
|
+
shared contracts
|
|
1138
|
+
+ explicit evidence boundaries
|
|
1139
|
+
+ compatible identities
|
|
1140
|
+
+ exact readers/adapters
|
|
1141
|
+
+ coordinated workflows
|
|
1142
|
+
```
|
|
1143
|
+
|
|
1144
|
+
It does not mean:
|
|
1145
|
+
|
|
1146
|
+
```text
|
|
1147
|
+
one package
|
|
1148
|
+
one runtime
|
|
1149
|
+
one schema for everything
|
|
1150
|
+
or duplicated responsibilities
|
|
1151
|
+
```
|
|
1152
|
+
|
|
1153
|
+
Do not introduce a shared cross-repository schema package merely for symmetry.
|
|
1154
|
+
|
|
1155
|
+
A shared package should exist only if a future concrete integration demonstrates that it is necessary.
|
|
1156
|
+
|
|
1157
|
+
## Local-first requirement
|
|
1158
|
+
|
|
1159
|
+
The tool should be local-first.
|
|
1160
|
+
|
|
1161
|
+
The normal initial workflow should operate against applications running on:
|
|
1162
|
+
|
|
1163
|
+
```text
|
|
1164
|
+
localhost
|
|
1165
|
+
127.0.0.1
|
|
1166
|
+
local development hosts
|
|
1167
|
+
```
|
|
1168
|
+
|
|
1169
|
+
Observation must not require uploading:
|
|
1170
|
+
|
|
1171
|
+
- screenshots;
|
|
1172
|
+
- page contents;
|
|
1173
|
+
- source code;
|
|
1174
|
+
- observation artifacts;
|
|
1175
|
+
- visual annotations.
|
|
1176
|
+
|
|
1177
|
+
No external artificial-intelligence API is required for the core observer.
|
|
1178
|
+
|
|
1179
|
+
An LLM consuming generated evidence may operate separately from the observer.
|
|
1180
|
+
|
|
1181
|
+
## Browser and network safety
|
|
1182
|
+
|
|
1183
|
+
Running a browser introduces a security and privacy boundary that must be defined explicitly.
|
|
1184
|
+
|
|
1185
|
+
Before broad navigation support is implemented, the project must define behavior for matters such as:
|
|
1186
|
+
|
|
1187
|
+
- allowed URL schemes;
|
|
1188
|
+
- local versus remote targets;
|
|
1189
|
+
- redirects;
|
|
1190
|
+
- navigation timeouts;
|
|
1191
|
+
- certificate failures;
|
|
1192
|
+
- downloads;
|
|
1193
|
+
- popups;
|
|
1194
|
+
- browser permissions;
|
|
1195
|
+
- network requests;
|
|
1196
|
+
- unexpected navigation;
|
|
1197
|
+
- credential-bearing pages;
|
|
1198
|
+
- sensitive content captured into artifacts;
|
|
1199
|
+
- secret-bearing URLs or output;
|
|
1200
|
+
- cleanup of browser processes and temporary state.
|
|
1201
|
+
|
|
1202
|
+
The first version should remain intentionally conservative and local.
|
|
1203
|
+
|
|
1204
|
+
Safety behavior must be explicit rather than dependent on undocumented browser defaults.
|
|
1205
|
+
|
|
1206
|
+
## Target immutability
|
|
1207
|
+
|
|
1208
|
+
Observation is non-destructive by default.
|
|
1209
|
+
|
|
1210
|
+
The observer must not:
|
|
1211
|
+
|
|
1212
|
+
- edit the target application's files;
|
|
1213
|
+
- modify target source code;
|
|
1214
|
+
- commit target changes;
|
|
1215
|
+
- install dependencies into the target;
|
|
1216
|
+
- alter target configuration;
|
|
1217
|
+
- persist unintended application state;
|
|
1218
|
+
- perform destructive interactions merely to collect layout evidence.
|
|
1219
|
+
|
|
1220
|
+
The observed project is a target, not part of the observer repository.
|
|
1221
|
+
|
|
1222
|
+
Interactions such as:
|
|
1223
|
+
|
|
1224
|
+
- navigation;
|
|
1225
|
+
- viewport resize;
|
|
1226
|
+
- scrolling;
|
|
1227
|
+
- explicitly approved safe controls;
|
|
1228
|
+
|
|
1229
|
+
are acceptable when they are part of a defined observation scenario.
|
|
1230
|
+
|
|
1231
|
+
A coding agent or another external tool performs source changes.
|
|
1232
|
+
|
|
1233
|
+
## Preferred platform
|
|
1234
|
+
|
|
1235
|
+
Primary development platform:
|
|
1236
|
+
|
|
1237
|
+
- desktop developer workstation;
|
|
1238
|
+
- Windows first-class.
|
|
1239
|
+
|
|
1240
|
+
The implementation must avoid unnecessary Windows-specific assumptions.
|
|
1241
|
+
|
|
1242
|
+
Artifact paths, serialization, tests, and browser behavior should be designed so future ecosystem releases can satisfy the cross-platform validation expectations used by the broader `my-dev-kit` ecosystem.
|
|
1243
|
+
|
|
1244
|
+
Cross-platform screenshot byte identity should not be assumed unless explicitly established by testing.
|
|
1245
|
+
|
|
1246
|
+
Structured semantic evidence should remain the primary portable contract.
|
|
1247
|
+
|
|
1248
|
+
## Preferred implementation stack
|
|
1249
|
+
|
|
1250
|
+
Preferred language:
|
|
1251
|
+
|
|
1252
|
+
TypeScript.
|
|
1253
|
+
|
|
1254
|
+
Preferred runtime:
|
|
1255
|
+
|
|
1256
|
+
Node.js.
|
|
1257
|
+
|
|
1258
|
+
Preferred browser automation:
|
|
1259
|
+
|
|
1260
|
+
Playwright.
|
|
1261
|
+
|
|
1262
|
+
Initial public interface:
|
|
1263
|
+
|
|
1264
|
+
command-line interface (CLI).
|
|
1265
|
+
|
|
1266
|
+
The first scaffold should favor a TypeScript/Node.js command-line project rather than a web-application-first architecture.
|
|
1267
|
+
|
|
1268
|
+
The browser-observation engine must remain independent of command-line formatting so it can later support:
|
|
1269
|
+
|
|
1270
|
+
- command-line use;
|
|
1271
|
+
- programmatic use;
|
|
1272
|
+
- graphical local viewing;
|
|
1273
|
+
- automated regression workflows;
|
|
1274
|
+
- ecosystem adapters.
|
|
1275
|
+
|
|
1276
|
+
A later interactive viewer may use React or another suitable web user-interface stack.
|
|
1277
|
+
|
|
1278
|
+
Do not put Playwright/browser-control logic directly inside React presentation components.
|
|
1279
|
+
|
|
1280
|
+
Do not promise a stable public programmatic application programming interface merely because internal modules are reusable.
|
|
1281
|
+
|
|
1282
|
+
A public programmatic interface should become a compatibility commitment only when explicitly designed and tested.
|
|
1283
|
+
|
|
1284
|
+
## Architectural direction
|
|
1285
|
+
|
|
1286
|
+
Use explicit ownership boundaries.
|
|
1287
|
+
|
|
1288
|
+
The smallest expected conceptual separation is:
|
|
1289
|
+
|
|
1290
|
+
```text
|
|
1291
|
+
command-line interface
|
|
1292
|
+
↓
|
|
1293
|
+
observation application/engine
|
|
1294
|
+
↓
|
|
1295
|
+
browser adapter
|
|
1296
|
+
↓
|
|
1297
|
+
runtime evidence
|
|
1298
|
+
|
|
1299
|
+
observation domain/schema
|
|
1300
|
+
↓
|
|
1301
|
+
artifact writer
|
|
1302
|
+
|
|
1303
|
+
deterministic fixture infrastructure
|
|
1304
|
+
↓
|
|
1305
|
+
browser-level validation
|
|
1306
|
+
```
|
|
1307
|
+
|
|
1308
|
+
As later capabilities arrive, the architecture may add:
|
|
1309
|
+
|
|
1310
|
+
```text
|
|
1311
|
+
relationship engine
|
|
1312
|
+
comparison engine
|
|
1313
|
+
contract engine
|
|
1314
|
+
bounded agent-context and correlation/export boundary
|
|
1315
|
+
coding-agent review workflow
|
|
1316
|
+
viewer
|
|
1317
|
+
annotation system
|
|
1318
|
+
```
|
|
1319
|
+
|
|
1320
|
+
These should extend the existing evidence model rather than creating parallel implementations.
|
|
1321
|
+
|
|
1322
|
+
Avoid speculative abstraction.
|
|
1323
|
+
|
|
1324
|
+
Do not create:
|
|
1325
|
+
|
|
1326
|
+
- a generic plugin framework without multiple real implementations;
|
|
1327
|
+
- a second observation engine for the viewer;
|
|
1328
|
+
- a second comparison implementation for the user interface;
|
|
1329
|
+
- a second contract engine for automated tests;
|
|
1330
|
+
- a generic ecosystem evidence framework before concrete integration requires one.
|
|
1331
|
+
|
|
1332
|
+
## Initial product interface
|
|
1333
|
+
|
|
1334
|
+
The initial public interface is CLI-first.
|
|
1335
|
+
|
|
1336
|
+
The developer should be able to provide:
|
|
1337
|
+
|
|
1338
|
+
```text
|
|
1339
|
+
target URL
|
|
1340
|
+
viewport
|
|
1341
|
+
observation targets
|
|
1342
|
+
output location
|
|
1343
|
+
```
|
|
1344
|
+
|
|
1345
|
+
and receive:
|
|
1346
|
+
|
|
1347
|
+
```text
|
|
1348
|
+
screenshot
|
|
1349
|
+
structured page observation
|
|
1350
|
+
structured target observations
|
|
1351
|
+
versioned observation artifact
|
|
1352
|
+
concise execution/result summary
|
|
1353
|
+
```
|
|
1354
|
+
|
|
1355
|
+
The CLI should be suitable for both human and machine invocation.
|
|
1356
|
+
|
|
1357
|
+
Its architecture should leave room for:
|
|
1358
|
+
|
|
1359
|
+
- machine-readable output;
|
|
1360
|
+
- stable diagnostic codes;
|
|
1361
|
+
- explicit exit behavior;
|
|
1362
|
+
- separation between parseable output and human progress/diagnostics.
|
|
1363
|
+
|
|
1364
|
+
The CLI must not own browser logic directly.
|
|
1365
|
+
|
|
1366
|
+
The bounded agent context, static/runtime integration, and text-driven
|
|
1367
|
+
coding-agent review belong to the core path after comparison/contracts. The
|
|
1368
|
+
graphical viewer and annotation system follow as human-interface enhancements.
|
|
1369
|
+
|
|
1370
|
+
## Evidence boundedness
|
|
1371
|
+
|
|
1372
|
+
The observer must avoid collecting enormous amounts of runtime information merely because the browser exposes it.
|
|
1373
|
+
|
|
1374
|
+
Initial observation should be explicitly scoped.
|
|
1375
|
+
|
|
1376
|
+
Prefer:
|
|
1377
|
+
|
|
1378
|
+
```text
|
|
1379
|
+
explicit observation targets
|
|
1380
|
+
+ required page facts
|
|
1381
|
+
+ required target facts
|
|
1382
|
+
```
|
|
1383
|
+
|
|
1384
|
+
over:
|
|
1385
|
+
|
|
1386
|
+
```text
|
|
1387
|
+
entire DOM
|
|
1388
|
+
+ every style property
|
|
1389
|
+
+ complete accessibility tree
|
|
1390
|
+
```
|
|
1391
|
+
|
|
1392
|
+
Where evidence is bounded or truncated, the result should make the omission visible.
|
|
1393
|
+
|
|
1394
|
+
A bounded collection should expose enough information to distinguish:
|
|
1395
|
+
|
|
1396
|
+
```text
|
|
1397
|
+
nothing existed
|
|
1398
|
+
```
|
|
1399
|
+
|
|
1400
|
+
from:
|
|
1401
|
+
|
|
1402
|
+
```text
|
|
1403
|
+
evidence existed but was omitted because of a limit
|
|
1404
|
+
```
|
|
1405
|
+
|
|
1406
|
+
Required evidence adequacy must not mean merely that some evidence was captured.
|
|
1407
|
+
|
|
1408
|
+
If required configured evidence is missing, partial, or unavailable, the observer must say so.
|
|
1409
|
+
|
|
1410
|
+
## Evidence provenance
|
|
1411
|
+
|
|
1412
|
+
Runtime evidence should remain traceable to its source.
|
|
1413
|
+
|
|
1414
|
+
Observation artifacts should record appropriate provenance such as:
|
|
1415
|
+
|
|
1416
|
+
- observer package version;
|
|
1417
|
+
- artifact schema version;
|
|
1418
|
+
- browser engine;
|
|
1419
|
+
- browser version;
|
|
1420
|
+
- target URL;
|
|
1421
|
+
- final URL;
|
|
1422
|
+
- viewport;
|
|
1423
|
+
- observation configuration;
|
|
1424
|
+
- target identity and locator;
|
|
1425
|
+
- observation method;
|
|
1426
|
+
- artifact references;
|
|
1427
|
+
- diagnostics;
|
|
1428
|
+
- limits and omissions;
|
|
1429
|
+
- capture identity;
|
|
1430
|
+
- derivation method for derived facts.
|
|
1431
|
+
|
|
1432
|
+
Naturally unstable metadata such as capture time should not become the only logical identity of an observation.
|
|
1433
|
+
|
|
1434
|
+
## Diagnostic behavior
|
|
1435
|
+
|
|
1436
|
+
Observation failure and partial evidence must be explainable.
|
|
1437
|
+
|
|
1438
|
+
The project should establish stable machine-readable diagnostics for cases such as:
|
|
1439
|
+
|
|
1440
|
+
- invalid request;
|
|
1441
|
+
- unsupported configuration;
|
|
1442
|
+
- navigation failure;
|
|
1443
|
+
- missing target;
|
|
1444
|
+
- ambiguous target;
|
|
1445
|
+
- hidden target;
|
|
1446
|
+
- unavailable browser evidence;
|
|
1447
|
+
- bounded/truncated evidence;
|
|
1448
|
+
- artifact write failure;
|
|
1449
|
+
- browser failure.
|
|
1450
|
+
|
|
1451
|
+
Do not silently select an arbitrary target when selection is ambiguous.
|
|
1452
|
+
|
|
1453
|
+
Do not represent unavailable evidence as a normal false or zero value.
|
|
1454
|
+
|
|
1455
|
+
Warnings, partial observations, invalid requests, and fatal failures must remain distinguishable.
|
|
1456
|
+
|
|
1457
|
+
## Testing expectations
|
|
1458
|
+
|
|
1459
|
+
Testing is a core requirement.
|
|
1460
|
+
|
|
1461
|
+
The project should progressively include:
|
|
1462
|
+
|
|
1463
|
+
```text
|
|
1464
|
+
unit tests
|
|
1465
|
+
→ schema/serialization tests
|
|
1466
|
+
→ browser adapter integration tests
|
|
1467
|
+
→ deterministic browser fixture tests
|
|
1468
|
+
→ comparison tests
|
|
1469
|
+
→ contract tests
|
|
1470
|
+
→ bounded agent-context and correlation tests
|
|
1471
|
+
→ ecosystem compatibility fixtures
|
|
1472
|
+
→ text-driven coding-agent workflow tests
|
|
1473
|
+
→ viewer tests
|
|
1474
|
+
→ annotation tests
|
|
1475
|
+
→ full visual workflow tests
|
|
1476
|
+
```
|
|
1477
|
+
|
|
1478
|
+
Important deterministic fixture scenarios should eventually include:
|
|
1479
|
+
|
|
1480
|
+
- normal desktop layout;
|
|
1481
|
+
- narrow navigation;
|
|
1482
|
+
- clipped navigation contents;
|
|
1483
|
+
- horizontal page overflow;
|
|
1484
|
+
- nested scrolling;
|
|
1485
|
+
- document scrolling;
|
|
1486
|
+
- footer after workspace;
|
|
1487
|
+
- overlapping regions;
|
|
1488
|
+
- mobile layout;
|
|
1489
|
+
- hidden elements;
|
|
1490
|
+
- expected dependent resizing;
|
|
1491
|
+
- protected-region regression.
|
|
1492
|
+
|
|
1493
|
+
The first version should use controlled local fixture pages rather than depending on public internet pages for canonical test evidence.
|
|
1494
|
+
|
|
1495
|
+
Tests must distinguish:
|
|
1496
|
+
|
|
1497
|
+
```text
|
|
1498
|
+
direct browser observation
|
|
1499
|
+
derived interpretation
|
|
1500
|
+
```
|
|
1501
|
+
|
|
1502
|
+
Screenshot evidence should not be treated as the only source of truth.
|
|
1503
|
+
|
|
1504
|
+
Cross-platform tests should distinguish semantic/layout evidence from rendering differences that may legitimately vary by operating system, browser build, fonts, or graphics environment.
|
|
1505
|
+
|
|
1506
|
+
## Validation expectations
|
|
1507
|
+
|
|
1508
|
+
The project should maintain a trustworthy validation chain appropriate to its current capabilities.
|
|
1509
|
+
|
|
1510
|
+
At minimum, once established:
|
|
1511
|
+
|
|
1512
|
+
```text
|
|
1513
|
+
typecheck
|
|
1514
|
+
lint
|
|
1515
|
+
unit/integration tests
|
|
1516
|
+
browser fixture tests
|
|
1517
|
+
production build when a graphical interface exists
|
|
1518
|
+
documentation checks when implemented
|
|
1519
|
+
```
|
|
1520
|
+
|
|
1521
|
+
Browser-related functionality must always have browser-level evidence.
|
|
1522
|
+
|
|
1523
|
+
Passing static TypeScript validation alone is not sufficient for a browser-observation feature.
|
|
1524
|
+
|
|
1525
|
+
Later ecosystem releases should also satisfy the coordinated compatibility and cross-platform validation expectations of the `my-dev-kit` ecosystem.
|
|
1526
|
+
|
|
1527
|
+
## Performance expectations
|
|
1528
|
+
|
|
1529
|
+
The tool is a developer utility.
|
|
1530
|
+
|
|
1531
|
+
Correctness, boundedness, determinism, and inspectability are more important than extreme runtime optimization.
|
|
1532
|
+
|
|
1533
|
+
However:
|
|
1534
|
+
|
|
1535
|
+
- do not capture the entire Document Object Model when targeted evidence is sufficient;
|
|
1536
|
+
- do not emit enormous computed-style dumps;
|
|
1537
|
+
- do not take unnecessary screenshots;
|
|
1538
|
+
- do not keep browser processes alive indefinitely;
|
|
1539
|
+
- make observation scope explicit;
|
|
1540
|
+
- preserve evidence needed to explain conclusions;
|
|
1541
|
+
- avoid duplicating unchanged evidence unnecessarily.
|
|
1542
|
+
|
|
1543
|
+
## Accessibility evidence
|
|
1544
|
+
|
|
1545
|
+
Where the browser exposes it reliably, capture useful semantic/accessibility information such as:
|
|
1546
|
+
|
|
1547
|
+
- role;
|
|
1548
|
+
- accessible name;
|
|
1549
|
+
- landmark identity;
|
|
1550
|
+
- relevant state.
|
|
1551
|
+
|
|
1552
|
+
This can help a human or LLM identify regions more reliably than position alone.
|
|
1553
|
+
|
|
1554
|
+
The project is not initially intended to replace a dedicated accessibility-audit product.
|
|
1555
|
+
|
|
1556
|
+
## Inspectability
|
|
1557
|
+
|
|
1558
|
+
Observation and regression results must be explainable.
|
|
1559
|
+
|
|
1560
|
+
A useful result should identify:
|
|
1561
|
+
|
|
1562
|
+
```text
|
|
1563
|
+
what was observed
|
|
1564
|
+
where it was observed
|
|
1565
|
+
what changed
|
|
1566
|
+
before value
|
|
1567
|
+
after value
|
|
1568
|
+
expected condition
|
|
1569
|
+
actual condition
|
|
1570
|
+
contract or relationship involved
|
|
1571
|
+
supporting artifact
|
|
1572
|
+
supporting screenshot
|
|
1573
|
+
```
|
|
1574
|
+
|
|
1575
|
+
Avoid unexplained scores.
|
|
1576
|
+
|
|
1577
|
+
Avoid opaque artificial-intelligence classification in the core validation path.
|
|
1578
|
+
|
|
1579
|
+
An LLM may reason over the evidence, but the evidence producer itself should remain inspectable.
|
|
1580
|
+
|
|
1581
|
+
## Determinism
|
|
1582
|
+
|
|
1583
|
+
Given:
|
|
1584
|
+
|
|
1585
|
+
- the same target build;
|
|
1586
|
+
- the same browser version;
|
|
1587
|
+
- the same viewport;
|
|
1588
|
+
- the same observation configuration;
|
|
1589
|
+
- the same deterministic fixture state;
|
|
1590
|
+
|
|
1591
|
+
the structured observation should be stable enough for meaningful comparison.
|
|
1592
|
+
|
|
1593
|
+
Fields that are naturally unstable must either:
|
|
1594
|
+
|
|
1595
|
+
- be normalized;
|
|
1596
|
+
- be excluded from logical comparison;
|
|
1597
|
+
- or be explicitly identified as unstable metadata.
|
|
1598
|
+
|
|
1599
|
+
Deterministic target ordering, diagnostic ordering, serialization, and artifact references should be preferred where practical.
|
|
1600
|
+
|
|
1601
|
+
## Non-goals for the initial project
|
|
1602
|
+
|
|
1603
|
+
The initial project is not:
|
|
1604
|
+
|
|
1605
|
+
- a replacement for browser developer tools;
|
|
1606
|
+
- a replacement for Playwright;
|
|
1607
|
+
- a replacement for `my-dev-kit`;
|
|
1608
|
+
- a replacement for `my-dev-kit-orchestrator`;
|
|
1609
|
+
- a replacement for `my-dev-kit-lab`;
|
|
1610
|
+
- an autonomous frontend designer;
|
|
1611
|
+
- an autonomous coding agent;
|
|
1612
|
+
- a visual website builder;
|
|
1613
|
+
- a hosted screenshot service;
|
|
1614
|
+
- a cloud browser farm;
|
|
1615
|
+
- a full accessibility scanner;
|
|
1616
|
+
- a complete cross-browser testing service;
|
|
1617
|
+
- a pixel-perfect visual-diff-only system;
|
|
1618
|
+
- a source-code editor;
|
|
1619
|
+
- a deployment system.
|
|
1620
|
+
|
|
1621
|
+
The initial project does not need:
|
|
1622
|
+
|
|
1623
|
+
- authentication;
|
|
1624
|
+
- payments;
|
|
1625
|
+
- advertising;
|
|
1626
|
+
- multi-user collaboration;
|
|
1627
|
+
- cloud persistence;
|
|
1628
|
+
- remote browser infrastructure;
|
|
1629
|
+
- external LLM APIs;
|
|
1630
|
+
- production hosting;
|
|
1631
|
+
- Firefox or WebKit support;
|
|
1632
|
+
- source ownership;
|
|
1633
|
+
- static repository indexing;
|
|
1634
|
+
- orchestrator integration;
|
|
1635
|
+
- lab integration;
|
|
1636
|
+
- visual annotation;
|
|
1637
|
+
- comparison;
|
|
1638
|
+
- regression contracts.
|
|
1639
|
+
|
|
1640
|
+
Those capabilities may appear later according to Project Milestones and `ROADMAP.md`.
|
|
1641
|
+
|
|
1642
|
+
## Explicit product principles
|
|
1643
|
+
|
|
1644
|
+
1. Observe before inferring.
|
|
1645
|
+
2. Browser runtime is authoritative for rendered geometry.
|
|
1646
|
+
3. Source code and rendered output are different evidence domains.
|
|
1647
|
+
4. `my-dev-kit` owns static repository/source evidence; `my-frontend-observer` owns runtime browser evidence.
|
|
1648
|
+
5. Stable runtime-region identity does not automatically imply known source ownership.
|
|
1649
|
+
6. Observed dimensions are measurements, not automatically fixed design constants.
|
|
1650
|
+
7. Prefer relationship-based layout requirements when they better represent user intent.
|
|
1651
|
+
8. Distinguish direct browser facts from derived interpretations.
|
|
1652
|
+
9. Preserve raw evidence behind normalized and summarized evidence.
|
|
1653
|
+
10. Keep evidence bounded and make omissions explicit.
|
|
1654
|
+
11. Never represent unavailable evidence as if it were an observed false or zero.
|
|
1655
|
+
12. Never claim a visual requirement passed solely because a styling declaration looks correct.
|
|
1656
|
+
13. A requested change may legitimately cause dependent changes.
|
|
1657
|
+
14. Distinguish requested changes, expected dependent changes, protected properties, preserved invariants, and unexpected changes.
|
|
1658
|
+
15. A local requested change does not authorize unrelated rendered changes.
|
|
1659
|
+
16. Previously approved frontend invariants remain active unless the user explicitly supersedes them.
|
|
1660
|
+
17. Make regressions explainable.
|
|
1661
|
+
18. Keep observation non-destructive.
|
|
1662
|
+
19. Keep artifacts local-first, versioned, portable, and inspectable.
|
|
1663
|
+
20. Separate browser observation from static source analysis.
|
|
1664
|
+
21. Separate evidence production from workflow orchestration and downstream evaluation.
|
|
1665
|
+
22. Human visual intent must eventually be representable alongside machine measurements.
|
|
1666
|
+
23. Deep ecosystem integration should use explicit contracts and adapters rather than duplicated responsibilities.
|
|
1667
|
+
24. Do not introduce speculative cross-project coupling before a real consumer requires it.
|
|
1668
|
+
|
|
1669
|
+
## Documentation and planning principles
|
|
1670
|
+
|
|
1671
|
+
Documentation must distinguish current implemented behavior from future intended behavior.
|
|
1672
|
+
|
|
1673
|
+
Current-state documentation should accurately record what exists.
|
|
1674
|
+
|
|
1675
|
+
Forward-looking planning documents should preserve enough local design context for future LLM planning without requiring critical intent to be reconstructed from many unrelated bookkeeping documents.
|
|
1676
|
+
|
|
1677
|
+
In particular:
|
|
1678
|
+
|
|
1679
|
+
```text
|
|
1680
|
+
Project Description
|
|
1681
|
+
→ durable product intent
|
|
1682
|
+
→ responsibility boundaries
|
|
1683
|
+
→ long-term capability model
|
|
1684
|
+
|
|
1685
|
+
Project Milestones
|
|
1686
|
+
→ ordered capability development
|
|
1687
|
+
→ major requirements
|
|
1688
|
+
→ acceptance expectations
|
|
1689
|
+
→ cross-milestone invariants
|
|
1690
|
+
|
|
1691
|
+
ROADMAP.md
|
|
1692
|
+
→ high-level version specifications
|
|
1693
|
+
→ version goals
|
|
1694
|
+
→ required capabilities
|
|
1695
|
+
→ architectural constraints
|
|
1696
|
+
→ dependencies
|
|
1697
|
+
→ exclusions
|
|
1698
|
+
→ acceptance expectations
|
|
1699
|
+
```
|
|
1700
|
+
|
|
1701
|
+
`ROADMAP.md` must not predefine implementation batches.
|
|
1702
|
+
|
|
1703
|
+
When implementation of a roadmap version begins, the planner should:
|
|
1704
|
+
|
|
1705
|
+
```text
|
|
1706
|
+
read the roadmap version
|
|
1707
|
+
→ inspect current repository state
|
|
1708
|
+
→ obtain required architecture/retrieval evidence
|
|
1709
|
+
→ design the implementation steps
|
|
1710
|
+
→ divide those steps into appropriate implementation batches
|
|
1711
|
+
→ execute and validate those batches
|
|
1712
|
+
```
|
|
1713
|
+
|
|
1714
|
+
Forward-looking requirements may intentionally appear in more than one planning document when doing so prevents future planning context from becoming fragmented.
|
|
1715
|
+
|
|
1716
|
+
## Long-term product direction
|
|
1717
|
+
|
|
1718
|
+
The long-term goal is to create a reliable communication and validation bridge between:
|
|
1719
|
+
|
|
1720
|
+
```text
|
|
1721
|
+
human visual intent
|
|
1722
|
+
rendered frontend reality
|
|
1723
|
+
static repository evidence
|
|
1724
|
+
LLM reasoning
|
|
1725
|
+
coding-agent implementation
|
|
1726
|
+
```
|
|
1727
|
+
|
|
1728
|
+
The critical path must first prove:
|
|
1729
|
+
|
|
1730
|
+
```text
|
|
1731
|
+
render and observe
|
|
1732
|
+
→ identify stable regions and runtime behavior
|
|
1733
|
+
→ compare
|
|
1734
|
+
→ enforce requested/dependent/protected/preserved scope
|
|
1735
|
+
→ combine bounded runtime and static evidence
|
|
1736
|
+
→ provide context to an external coding agent
|
|
1737
|
+
→ rerender and reject regressions
|
|
1738
|
+
```
|
|
1739
|
+
|
|
1740
|
+
Only after that core workflow works should the human visual branch add:
|
|
1741
|
+
|
|
1742
|
+
```text
|
|
1743
|
+
viewer
|
|
1744
|
+
→ structured annotation
|
|
1745
|
+
→ full visual human–LLM workflow
|
|
1746
|
+
```
|
|
1747
|
+
|
|
1748
|
+
The desired eventual visual cycle is:
|
|
1749
|
+
|
|
1750
|
+
```text
|
|
1751
|
+
render
|
|
1752
|
+
→ observe
|
|
1753
|
+
→ identify stable regions
|
|
1754
|
+
→ measure geometry and behavior
|
|
1755
|
+
→ show human
|
|
1756
|
+
→ annotate/request change
|
|
1757
|
+
→ define requested/dependent/protected scope
|
|
1758
|
+
→ combine bounded runtime and static evidence
|
|
1759
|
+
→ provide context to LLM
|
|
1760
|
+
→ coding agent implements
|
|
1761
|
+
→ rerender
|
|
1762
|
+
→ compare
|
|
1763
|
+
→ rerun preserved contracts
|
|
1764
|
+
→ identify unexpected changes
|
|
1765
|
+
→ approve or correct
|
|
1766
|
+
→ establish new baseline
|
|
1767
|
+
→ repeat
|
|
1768
|
+
```
|
|
1769
|
+
|
|
1770
|
+
The project succeeds when an LLM no longer needs to guess what a frontend looks like from source code alone, when a human can communicate visual intent without translating every design idea into implementation terminology, and when a frontend change cannot be considered successful while silently breaking previously approved rendered behavior.
|