@dailephd/my-frontend-observer 0.8.1 → 0.9.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 +57 -0
- package/README.md +107 -7
- package/dist/application/projectWorkflowService.d.ts +18 -1
- package/dist/application/projectWorkflowService.js +40 -2
- package/dist/application/projectWorkflowService.js.map +1 -1
- package/dist/application/visualAnnotationContractPromotionService.d.ts +41 -0
- package/dist/application/visualAnnotationContractPromotionService.js +143 -0
- package/dist/application/visualAnnotationContractPromotionService.js.map +1 -0
- package/dist/application/visualAnnotationPersistenceService.d.ts +34 -0
- package/dist/application/visualAnnotationPersistenceService.js +68 -0
- package/dist/application/visualAnnotationPersistenceService.js.map +1 -0
- package/dist/application/visualAnnotationReferenceMaterializationService.d.ts +53 -0
- package/dist/application/visualAnnotationReferenceMaterializationService.js +194 -0
- package/dist/application/visualAnnotationReferenceMaterializationService.js.map +1 -0
- package/dist/artifacts/visualAnnotationArtifactReader.d.ts +19 -0
- package/dist/artifacts/visualAnnotationArtifactReader.js +66 -0
- package/dist/artifacts/visualAnnotationArtifactReader.js.map +1 -0
- package/dist/artifacts/visualAnnotationArtifactWriter.d.ts +42 -0
- package/dist/artifacts/visualAnnotationArtifactWriter.js +85 -0
- package/dist/artifacts/visualAnnotationArtifactWriter.js.map +1 -0
- package/dist/cli.js +464 -454
- package/dist/cli.js.map +1 -1
- package/dist/domain/visualAnnotation.d.ts +217 -0
- package/dist/domain/visualAnnotation.js +584 -0
- package/dist/domain/visualAnnotation.js.map +1 -0
- package/dist/domain/visualAnnotationIdentity.d.ts +17 -0
- package/dist/domain/visualAnnotationIdentity.js +47 -0
- package/dist/domain/visualAnnotationIdentity.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/projectWorkflow/projectPaths.d.ts +9 -0
- package/dist/projectWorkflow/projectPaths.js +21 -0
- package/dist/projectWorkflow/projectPaths.js.map +1 -1
- package/dist/viewer/assets/{index-CN_yb9Uf.css → index-BN41MI7m.css} +1 -1
- package/dist/viewer/assets/index-CkKXnlrI.js +9 -0
- package/dist/viewer/index.html +2 -2
- package/dist/viewer/sw.js +1 -1
- package/dist/viewerServer/annotationAuthoring.d.ts +64 -0
- package/dist/viewerServer/annotationAuthoring.js +230 -0
- package/dist/viewerServer/annotationAuthoring.js.map +1 -0
- package/dist/viewerServer/annotationContractPromotion.d.ts +51 -0
- package/dist/viewerServer/annotationContractPromotion.js +105 -0
- package/dist/viewerServer/annotationContractPromotion.js.map +1 -0
- package/dist/viewerServer/annotationReferenceMaterialization.d.ts +40 -0
- package/dist/viewerServer/annotationReferenceMaterialization.js +91 -0
- package/dist/viewerServer/annotationReferenceMaterialization.js.map +1 -0
- package/dist/viewerServer/authoringSecurity.d.ts +59 -0
- package/dist/viewerServer/authoringSecurity.js +112 -0
- package/dist/viewerServer/authoringSecurity.js.map +1 -0
- package/dist/viewerServer/evidence/annotationView.d.ts +28 -0
- package/dist/viewerServer/evidence/annotationView.js +43 -0
- package/dist/viewerServer/evidence/annotationView.js.map +1 -0
- package/dist/viewerServer/evidence/classify.d.ts +3 -1
- package/dist/viewerServer/evidence/classify.js +12 -0
- package/dist/viewerServer/evidence/classify.js.map +1 -1
- package/dist/viewerServer/evidence/discovery.d.ts +2 -0
- package/dist/viewerServer/evidence/discovery.js +6 -0
- package/dist/viewerServer/evidence/discovery.js.map +1 -1
- package/dist/viewerServer/evidence/handles.js +1 -0
- package/dist/viewerServer/evidence/handles.js.map +1 -1
- package/dist/viewerServer/evidence/index.d.ts +29 -0
- package/dist/viewerServer/evidence/index.js +43 -1
- package/dist/viewerServer/evidence/index.js.map +1 -1
- package/dist/viewerServer/evidence/mediaResolver.d.ts +1 -1
- package/dist/viewerServer/evidence/mediaResolver.js +28 -2
- package/dist/viewerServer/evidence/mediaResolver.js.map +1 -1
- package/dist/viewerServer/evidence/projection.d.ts +5 -1
- package/dist/viewerServer/evidence/projection.js +19 -0
- package/dist/viewerServer/evidence/projection.js.map +1 -1
- package/dist/viewerServer/httpServer.d.ts +13 -2
- package/dist/viewerServer/httpServer.js +278 -4
- package/dist/viewerServer/httpServer.js.map +1 -1
- package/dist/viewerServer/viewerService.d.ts +8 -0
- package/dist/viewerServer/viewerService.js +38 -2
- package/dist/viewerServer/viewerService.js.map +1 -1
- package/docs/ARCHITECTURE.md +108 -21
- package/docs/CI_CD.md +57 -1
- package/docs/COMMANDS.md +44 -4
- package/docs/CONTRACTS.md +78 -8
- package/docs/CURRENT_STATE.md +157 -35
- package/docs/DEVELOPMENT.md +8 -3
- package/docs/PROJECT_DESCRIPTION.md +4 -1
- package/docs/PROJECT_MILESTONES.md +4 -0
- package/docs/PROJECT_OVERVIEW.md +41 -17
- package/docs/QUICKSTART.md +52 -39
- package/docs/RELEASE.md +16 -11
- package/docs/ROADMAP.md +406 -66
- package/docs/SECURITY.md +71 -14
- package/docs/WORKFLOWS.md +151 -23
- package/docs/plans/v0.9-implementation-plan.md +1529 -0
- package/docs/reports/v0.9-architecture-retrieval.md +567 -0
- package/docs/reports/v0.9-batch1-visual-annotation-foundation.md +351 -0
- package/docs/reports/v0.9-batch2-viewer-annotation-authoring-boundary.md +438 -0
- package/docs/reports/v0.9-batch3-runtime-screenshot-annotation-authoring.md +412 -0
- package/docs/reports/v0.9-batch4-external-reference-annotation-authoring.md +452 -0
- package/docs/reports/v0.9-batch5-runtime-intent-contract-promotion.md +535 -0
- package/docs/reports/v0.9-batch6-reference-materialization.md +514 -0
- package/docs/reports/v0.9-batch7-integrated-acceptance.md +644 -0
- package/docs/reports/v0.9-demo-foundation.md +589 -0
- package/docs/reports/v0.9-final-pre-release-readiness.md +209 -0
- package/docs/reports/v0.9-final-readiness-corrections.md +530 -0
- package/docs/reports/v0.9-pre-release-readiness.md +170 -0
- package/docs/reports/v0.9-tutorial-end-to-end-acceptance.md +980 -0
- package/docs/reports/v0.9-tutorial-integration.md +731 -0
- package/package.json +2 -2
- package/dist/viewer/assets/index-D98S1_2d.js +0 -9
package/docs/ROADMAP.md
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
# Roadmap
|
|
2
2
|
|
|
3
|
-
v0.
|
|
4
|
-
`@dailephd/my-frontend-observer@0.
|
|
3
|
+
v0.9 status: released as v0.9.0 and published to npm as
|
|
4
|
+
`@dailephd/my-frontend-observer@0.9.0`. v0.10 remains future work.
|
|
5
5
|
|
|
6
6
|
This is a version-level specification, not an implementation checklist.
|
|
7
7
|
Concrete steps and sequencing are designed only when a version begins, after
|
|
8
8
|
the planner reads that version, inspects current repository state, and performs
|
|
9
|
-
needed my-dev-kit retrieval and architecture work.
|
|
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.
|
|
10
15
|
|
|
11
16
|
## v0.1 — Runtime Observation Foundation
|
|
12
17
|
|
|
@@ -478,77 +483,412 @@ existing low-level commands must remain backward compatible.
|
|
|
478
483
|
|
|
479
484
|
## v0.9 — Human Visual Annotation and Design-Intent Capture
|
|
480
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
|
+
|
|
481
501
|
Objective/problem: add structured visual human intent to the already working
|
|
482
|
-
v0.7 coding-agent workflow through the v0.8 viewer without inventing
|
|
483
|
-
change-semantics system
|
|
484
|
-
runtime observation or an external visual
|
|
485
|
-
workflow
|
|
486
|
-
human-
|
|
487
|
-
|
|
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.
|
|
488
813
|
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
annotated image references; and explicit interpretation/confirmation state.
|
|
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.
|
|
496
820
|
|
|
497
|
-
|
|
498
|
-
coordinate/identity domains. The annotation model must never assume that a
|
|
499
|
-
reference-region identity is a runtime-target identity. Coordinate transforms,
|
|
500
|
-
selection, overlays, persistence, and provenance must preserve which source
|
|
501
|
-
image the annotation belongs to.
|
|
821
|
+
### Exclusions
|
|
502
822
|
|
|
503
|
-
|
|
823
|
+
v0.9 explicitly excludes:
|
|
504
824
|
|
|
505
825
|
```text
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
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
|
|
511
846
|
```
|
|
512
847
|
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
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.
|
|
552
892
|
|
|
553
893
|
## v0.10 — Full Visual Human–LLM Frontend Change Workflow
|
|
554
894
|
|
package/docs/SECURITY.md
CHANGED
|
@@ -165,14 +165,18 @@ rejects any non-regular-file entry, closing that escape.
|
|
|
165
165
|
- **No arbitrary filesystem browsing, no static-candidate path
|
|
166
166
|
interpretation**: the viewer offers no directory-listing or free-path
|
|
167
167
|
endpoint; every route addresses one specific, already-discovered handle.
|
|
168
|
-
- **Read-only API**: every `/api/*` route
|
|
169
|
-
with `405` at a single top-of-handler check
|
|
170
|
-
(`src/viewerServer/httpServer.ts`)
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
168
|
+
- **Read-only API (v0.8)**: in v0.8 every `/api/*` route rejected
|
|
169
|
+
non-`GET`/`HEAD` methods with `405` at a single top-of-handler check
|
|
170
|
+
(`src/viewerServer/httpServer.ts`). v0.9 keeps that check for every
|
|
171
|
+
inspection route and adds exactly three project-aware authoring `POST`
|
|
172
|
+
routes, described in "v0.9 local annotation write boundary" below.
|
|
173
|
+
- **No target-source or evidence mutation**: the viewer never edits target
|
|
174
|
+
source and never modifies an existing Observer evidence artifact. In v0.8
|
|
175
|
+
the viewer server had no filesystem-write path at all. In v0.9 a
|
|
176
|
+
project-aware session may create new immutable annotation, change-contract,
|
|
177
|
+
and imported external-reference artifacts through the canonical writers,
|
|
178
|
+
only on an explicit authoring request. A standalone `view --root` session
|
|
179
|
+
still never writes.
|
|
176
180
|
- **Binding/context files are explicit local session input, not persisted
|
|
177
181
|
evidence**: `--bindings-file`/`--context-file` are read once at startup,
|
|
178
182
|
validated through the existing canonical validators, held only in server
|
|
@@ -192,12 +196,65 @@ rejects any non-regular-file entry, closing that escape.
|
|
|
192
196
|
explicit unavailable state, never previously-fetched evidence presented
|
|
193
197
|
as current.
|
|
194
198
|
|
|
199
|
+
## v0.9 local annotation write boundary (released in 0.9.0)
|
|
200
|
+
|
|
201
|
+
v0.9 adds a narrow local write surface to the viewer. It is released in
|
|
202
|
+
`0.9.0`. It is a same-machine capability boundary for
|
|
203
|
+
one local viewer session. It is not remote account authentication and does not
|
|
204
|
+
protect against other software already running as the same user.
|
|
205
|
+
|
|
206
|
+
- **Loopback only**: the viewer still binds only to `127.0.0.1`.
|
|
207
|
+
- **Project-aware authoring only**: authoring is enabled only when `view` runs
|
|
208
|
+
without `--root` inside an initialized project. The standalone arbitrary-root
|
|
209
|
+
viewer (`view --root <root>`) stays read-only. Its
|
|
210
|
+
`GET /api/authoring/session` reports `enabled: false`, and every authoring
|
|
211
|
+
`POST` returns `403`.
|
|
212
|
+
- **Session capability**: each project-aware server creates a random 32-byte
|
|
213
|
+
token (64 hex characters) in memory. It is handed out by
|
|
214
|
+
`GET /api/authoring/session` only on the exact expected loopback `Host`, as a
|
|
215
|
+
defense against DNS rebinding. The viewer keeps it only in React memory. It
|
|
216
|
+
is never persisted, never written into evidence, and never cached.
|
|
217
|
+
- **Request checks, in order**: exact `Host`, exact same-origin `Origin`, the
|
|
218
|
+
`x-frontend-observer-authoring-token` header compared in constant time,
|
|
219
|
+
`content-type: application/json`, identity `content-encoding` only, a
|
|
220
|
+
256 KiB (`262144` byte) body limit, valid JSON, and a closed request shape
|
|
221
|
+
with unknown fields rejected.
|
|
222
|
+
- **Exactly three `POST` routes**: `POST /api/annotations`,
|
|
223
|
+
`POST /api/annotations/:handle/promote-contract`, and
|
|
224
|
+
`POST /api/annotations/:handle/materialize-reference`. `PUT`, `PATCH`, and
|
|
225
|
+
`DELETE` stay unsupported everywhere. Any other `POST` returns `405`.
|
|
226
|
+
- **No permissive CORS**: no `Access-Control-Allow-*` headers are sent, so a
|
|
227
|
+
page from any other origin cannot read the capability or send a JSON
|
|
228
|
+
authoring request. A real-Chromium test proves this for all three routes.
|
|
229
|
+
- **Server-side resolution only**: the browser sends evidence handles and item
|
|
230
|
+
ids, never output paths. The server resolves handles through canonical
|
|
231
|
+
discovery with path containment and writes only under the project's managed
|
|
232
|
+
evidence root (`annotations`, `contracts`, and `references`) through the
|
|
233
|
+
canonical writers.
|
|
234
|
+
- **Serialized writes**: all three routes share one write queue per session.
|
|
235
|
+
Annotation revisions use stale-parent conflict detection instead of
|
|
236
|
+
last-write-wins.
|
|
237
|
+
- **No automatic approval**: promotion never approves a baseline, and
|
|
238
|
+
materialization never approves a reference or changes project reference
|
|
239
|
+
acceptance. Contract activation for `check` happens only on explicit
|
|
240
|
+
request.
|
|
241
|
+
- **No caching of authority**: authoring and evidence API responses use
|
|
242
|
+
`cache-control: no-store`, and the service worker never caches `/api/`
|
|
243
|
+
routes, including the new `POST` routes.
|
|
244
|
+
- **Safe media**: annotation overlay media is served only after the stored
|
|
245
|
+
SVG is re-rendered from the canonical artifact and verified. It uses a
|
|
246
|
+
script-blocking `content-security-policy` with `sandbox` and `nosniff`.
|
|
247
|
+
Existing media containment and symlink checks apply unchanged.
|
|
248
|
+
- **Temporary directories**: evidence discovery skips writer temporary
|
|
249
|
+
`.tmp-*` directories, so a partially written artifact is never presented as
|
|
250
|
+
evidence.
|
|
251
|
+
|
|
195
252
|
## Not yet addressed
|
|
196
253
|
|
|
197
254
|
Certificate-failure-specific handling, permission-prompt-specific handling
|
|
198
255
|
(Chromium's default deny-all applies; no permission is ever explicitly
|
|
199
256
|
granted), and any non-loopback/remote browsing mode remain unimplemented and
|
|
200
|
-
out of scope. `@dailephd/my-frontend-observer@0.
|
|
257
|
+
out of scope. `@dailephd/my-frontend-observer@0.9.0` is published to npm, and a
|
|
201
258
|
pre-release readiness CI workflow (Windows/Linux/macOS packed-candidate
|
|
202
259
|
validation, now covering the v0.8 viewer alongside every earlier version's
|
|
203
260
|
packed behavior) exists (see `docs/CI_CD.md`). The v0.7 external-reference/
|
|
@@ -211,8 +268,8 @@ security validation stage (see
|
|
|
211
268
|
Symlink/junction filesystem-escape handling for the viewer's raw-evidence
|
|
212
269
|
routes is now exercised by a dedicated regression test
|
|
213
270
|
(`tests/unit/viewerEvidenceServer.test.ts`), which caught and led to the fix
|
|
214
|
-
described above.
|
|
215
|
-
|
|
216
|
-
security
|
|
217
|
-
|
|
218
|
-
remain separate, unimplemented concerns.
|
|
271
|
+
described above. The v0.9 annotation write boundary described above is
|
|
272
|
+
implemented and covered by local security tests, but its formal
|
|
273
|
+
cross-platform pre-release security validation has not run yet. None of this
|
|
274
|
+
expands the security scope above: remote browsing, certificate handling, and
|
|
275
|
+
permission-prompt handling remain separate, unimplemented concerns.
|