@dailephd/my-frontend-observer 0.8.1 → 0.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/CHANGELOG.md +74 -0
  2. package/README.md +109 -7
  3. package/dist/application/projectWorkflowService.d.ts +18 -1
  4. package/dist/application/projectWorkflowService.js +40 -2
  5. package/dist/application/projectWorkflowService.js.map +1 -1
  6. package/dist/application/visualAnnotationContractPromotionService.d.ts +41 -0
  7. package/dist/application/visualAnnotationContractPromotionService.js +143 -0
  8. package/dist/application/visualAnnotationContractPromotionService.js.map +1 -0
  9. package/dist/application/visualAnnotationPersistenceService.d.ts +34 -0
  10. package/dist/application/visualAnnotationPersistenceService.js +68 -0
  11. package/dist/application/visualAnnotationPersistenceService.js.map +1 -0
  12. package/dist/application/visualAnnotationReferenceMaterializationService.d.ts +53 -0
  13. package/dist/application/visualAnnotationReferenceMaterializationService.js +194 -0
  14. package/dist/application/visualAnnotationReferenceMaterializationService.js.map +1 -0
  15. package/dist/artifacts/visualAnnotationArtifactReader.d.ts +19 -0
  16. package/dist/artifacts/visualAnnotationArtifactReader.js +66 -0
  17. package/dist/artifacts/visualAnnotationArtifactReader.js.map +1 -0
  18. package/dist/artifacts/visualAnnotationArtifactWriter.d.ts +42 -0
  19. package/dist/artifacts/visualAnnotationArtifactWriter.js +85 -0
  20. package/dist/artifacts/visualAnnotationArtifactWriter.js.map +1 -0
  21. package/dist/cli.js +464 -454
  22. package/dist/cli.js.map +1 -1
  23. package/dist/domain/visualAnnotation.d.ts +217 -0
  24. package/dist/domain/visualAnnotation.js +584 -0
  25. package/dist/domain/visualAnnotation.js.map +1 -0
  26. package/dist/domain/visualAnnotationIdentity.d.ts +17 -0
  27. package/dist/domain/visualAnnotationIdentity.js +47 -0
  28. package/dist/domain/visualAnnotationIdentity.js.map +1 -0
  29. package/dist/index.d.ts +11 -0
  30. package/dist/index.js +6 -0
  31. package/dist/index.js.map +1 -1
  32. package/dist/projectWorkflow/projectPaths.d.ts +9 -0
  33. package/dist/projectWorkflow/projectPaths.js +21 -0
  34. package/dist/projectWorkflow/projectPaths.js.map +1 -1
  35. package/dist/viewer/assets/{index-CN_yb9Uf.css → index-BN41MI7m.css} +1 -1
  36. package/dist/viewer/assets/index-CkKXnlrI.js +9 -0
  37. package/dist/viewer/index.html +2 -2
  38. package/dist/viewer/sw.js +1 -1
  39. package/dist/viewerServer/annotationAuthoring.d.ts +64 -0
  40. package/dist/viewerServer/annotationAuthoring.js +230 -0
  41. package/dist/viewerServer/annotationAuthoring.js.map +1 -0
  42. package/dist/viewerServer/annotationContractPromotion.d.ts +51 -0
  43. package/dist/viewerServer/annotationContractPromotion.js +105 -0
  44. package/dist/viewerServer/annotationContractPromotion.js.map +1 -0
  45. package/dist/viewerServer/annotationReferenceMaterialization.d.ts +40 -0
  46. package/dist/viewerServer/annotationReferenceMaterialization.js +91 -0
  47. package/dist/viewerServer/annotationReferenceMaterialization.js.map +1 -0
  48. package/dist/viewerServer/authoringSecurity.d.ts +59 -0
  49. package/dist/viewerServer/authoringSecurity.js +112 -0
  50. package/dist/viewerServer/authoringSecurity.js.map +1 -0
  51. package/dist/viewerServer/evidence/annotationView.d.ts +28 -0
  52. package/dist/viewerServer/evidence/annotationView.js +43 -0
  53. package/dist/viewerServer/evidence/annotationView.js.map +1 -0
  54. package/dist/viewerServer/evidence/classify.d.ts +3 -1
  55. package/dist/viewerServer/evidence/classify.js +12 -0
  56. package/dist/viewerServer/evidence/classify.js.map +1 -1
  57. package/dist/viewerServer/evidence/discovery.d.ts +2 -0
  58. package/dist/viewerServer/evidence/discovery.js +6 -0
  59. package/dist/viewerServer/evidence/discovery.js.map +1 -1
  60. package/dist/viewerServer/evidence/handles.js +1 -0
  61. package/dist/viewerServer/evidence/handles.js.map +1 -1
  62. package/dist/viewerServer/evidence/index.d.ts +29 -0
  63. package/dist/viewerServer/evidence/index.js +43 -1
  64. package/dist/viewerServer/evidence/index.js.map +1 -1
  65. package/dist/viewerServer/evidence/mediaResolver.d.ts +1 -1
  66. package/dist/viewerServer/evidence/mediaResolver.js +28 -2
  67. package/dist/viewerServer/evidence/mediaResolver.js.map +1 -1
  68. package/dist/viewerServer/evidence/projection.d.ts +5 -1
  69. package/dist/viewerServer/evidence/projection.js +19 -0
  70. package/dist/viewerServer/evidence/projection.js.map +1 -1
  71. package/dist/viewerServer/httpServer.d.ts +13 -2
  72. package/dist/viewerServer/httpServer.js +278 -4
  73. package/dist/viewerServer/httpServer.js.map +1 -1
  74. package/dist/viewerServer/viewerService.d.ts +8 -0
  75. package/dist/viewerServer/viewerService.js +38 -2
  76. package/dist/viewerServer/viewerService.js.map +1 -1
  77. package/docs/ARCHITECTURE.md +108 -21
  78. package/docs/CI_CD.md +78 -1
  79. package/docs/COMMANDS.md +44 -4
  80. package/docs/CONTRACTS.md +78 -8
  81. package/docs/CURRENT_STATE.md +224 -35
  82. package/docs/DEVELOPMENT.md +38 -3
  83. package/docs/PROJECT_DESCRIPTION.md +4 -1
  84. package/docs/PROJECT_MILESTONES.md +32 -0
  85. package/docs/PROJECT_OVERVIEW.md +58 -17
  86. package/docs/QUICKSTART.md +52 -39
  87. package/docs/RELEASE.md +17 -11
  88. package/docs/ROADMAP.md +458 -66
  89. package/docs/SECURITY.md +71 -14
  90. package/docs/WORKFLOWS.md +151 -23
  91. package/docs/plans/v0.9-implementation-plan.md +1529 -0
  92. package/docs/plans/v0.9.1-implementation-plan.md +468 -0
  93. package/docs/reports/v0.9-architecture-retrieval.md +567 -0
  94. package/docs/reports/v0.9-batch1-visual-annotation-foundation.md +351 -0
  95. package/docs/reports/v0.9-batch2-viewer-annotation-authoring-boundary.md +438 -0
  96. package/docs/reports/v0.9-batch3-runtime-screenshot-annotation-authoring.md +412 -0
  97. package/docs/reports/v0.9-batch4-external-reference-annotation-authoring.md +452 -0
  98. package/docs/reports/v0.9-batch5-runtime-intent-contract-promotion.md +535 -0
  99. package/docs/reports/v0.9-batch6-reference-materialization.md +514 -0
  100. package/docs/reports/v0.9-batch7-integrated-acceptance.md +644 -0
  101. package/docs/reports/v0.9-demo-foundation.md +589 -0
  102. package/docs/reports/v0.9-final-pre-release-readiness.md +209 -0
  103. package/docs/reports/v0.9-final-readiness-corrections.md +530 -0
  104. package/docs/reports/v0.9-pre-release-readiness.md +170 -0
  105. package/docs/reports/v0.9-tutorial-end-to-end-acceptance.md +980 -0
  106. package/docs/reports/v0.9-tutorial-integration.md +731 -0
  107. package/docs/reports/v0.9.1-batch1-pwa-hard-gate-isolation.md +359 -0
  108. package/docs/reports/v0.9.1-batch2-hard-gate-validation-integration.md +262 -0
  109. package/docs/reports/v0.9.1-pre-release-readiness.md +206 -0
  110. package/package.json +3 -2
  111. package/dist/viewer/assets/index-D98S1_2d.js +0 -9
@@ -1,28 +1,46 @@
1
1
  # Quickstart
2
2
 
3
+ For complete coding-agent features, runtime-to-source repair, shared-component
4
+ protection, and ecosystem failure feedback, use the single
5
+ [ecosystem workflow guide in my-dev-kit](https://github.com/dailephd/my-dev-kit/blob/main/docs/ECOSYSTEM_DEVELOPMENT_WORKFLOWS.md).
6
+ Observer owns the browser evidence and its canonical evaluations. Project tests
7
+ own application actions and backend/frontend integration. Orchestrator owns
8
+ native lifecycle when selected. Lab supplies applicable assurance separately.
9
+ This repository does not maintain another ecosystem-guide copy.
10
+
3
11
  The common source workflow is:
4
12
 
5
13
  ```powershell
6
14
  node dist/cli.js init --url http://127.0.0.1:3000 --target app=#app
7
15
  node dist/cli.js capture baseline
8
16
  # make a frontend change
9
- node dist/cli.js check baseline
17
+ node dist/cli.js check baseline --json
10
18
  node dist/cli.js view
11
19
  ```
12
20
 
13
- Use `check baseline --json` for a coding agent: on `FAIL`, use the returned
14
- bounded runtime evidence, correct source externally, and rerun until `PASS`.
15
- Observer never edits source. Canonical IDs remain available in details and
16
- provenance but are not required as ordinary command input.
21
+ Use `check baseline --json` for a coding agent. It captures a new immutable
22
+ candidate, compares it canonically, and evaluates configured acceptance. The
23
+ result and exit status are `PASS`/0, `FAIL`/1, `REVIEW_REQUIRED`/2, or `BLOCKED`/3.
24
+ Comparison alone returns `REVIEW_REQUIRED`, even when no differences are found.
25
+ Configure the applicable contract and/or approved reference through the current
26
+ project schema before expecting an acceptance PASS. See
27
+ [COMMANDS.md](COMMANDS.md#v081-common-workflow) for the exact fields.
28
+
29
+ On a failure, preserve the bounded evidence, correct source externally, and
30
+ recheck against the same baseline. Do not replace the baseline, relax protected
31
+ requirements, or treat REVIEW_REQUIRED/BLOCKED as success. Observer never edits
32
+ source. Canonical IDs remain available in details and provenance but are not
33
+ required as ordinary project-command input.
17
34
 
18
- Prerequisites are Node.js 24 or later and npm. For the published package:
35
+ Prerequisites are Node.js 24 or later and npm. The package identity is:
19
36
 
20
37
  ```powershell
21
38
  npm install --save-dev @dailephd/my-frontend-observer
22
39
  npx playwright install chromium
23
40
  ```
24
41
 
25
- The installed CLI is still named `my-frontend-observer`.
42
+ The installed CLI remains `my-frontend-observer`. Use the resolved local binary
43
+ or `npx @dailephd/my-frontend-observer` and record its version. For source setup:
26
44
 
27
45
  ```powershell
28
46
  npm install
@@ -30,7 +48,7 @@ npx playwright install chromium
30
48
  npm run build
31
49
  ```
32
50
 
33
- Run a real observation against your own local frontend:
51
+ The advanced observation workflow remains supported:
34
52
 
35
53
  ```powershell
36
54
  node dist/cli.js observe `
@@ -41,37 +59,32 @@ node dist/cli.js observe `
41
59
  --output observations
42
60
  ```
43
61
 
44
- This launches Chromium, captures a screenshot plus bounded page/target
45
- evidence, and writes one portable artifact under `observations/<observation-id>/`.
46
- See [COMMANDS.md](COMMANDS.md) for the full flag reference, including the
47
- `--targets-file` structured semantic-target input and the
48
- `--scroll-scenario-file` bounded runtime scroll scenario input.
49
-
50
- Once you have two such artifacts, `node dist/cli.js compare --before
51
- <root> --after <root> --output comparisons` derives before/after evidence
52
- between them without launching a browser again - see
53
- [COMMANDS.md](COMMANDS.md#compare) for details.
54
-
55
- You can then approve a baseline, save a per-change contract, and evaluate a
56
- candidate change against them plus the observation/comparison evidence
57
- above - see [COMMANDS.md](COMMANDS.md#approve-baseline) for the exact flags
58
- and [WORKFLOWS.md](WORKFLOWS.md) for the full flow.
59
-
60
- If you also have an external design-reference image, `import-reference`/
61
- `approve-reference`/`evaluate-reference-fidelity` let you compare a
62
- candidate observation against it (implemented in the current development
63
- state; see [COMMANDS.md](COMMANDS.md) and [CONTRACTS.md](CONTRACTS.md) for
64
- the exact flags and contract).
65
-
66
- To inspect a project visually instead of opening raw artifact files,
67
- `my-frontend-observer view --no-open` starts a local,
68
- loopback-only viewer server (usable in a normal browser or as an installed
69
- PWA) over managed project evidence. For existing standalone evidence roots,
70
- use `my-frontend-observer view --root observations --no-open`. See
71
- [COMMANDS.md](COMMANDS.md#view) for the full
72
- flag reference, including `--bindings-file` and `--context-file`.
73
-
74
- To validate the repository itself instead:
62
+ It launches Chromium, captures a screenshot plus bounded page/target evidence,
63
+ and writes a portable artifact under `observations/<observation-id>/`.
64
+ [COMMANDS.md](COMMANDS.md) documents structured `--targets-file` input, bounded
65
+ `--scroll-scenario-file` actions, and declared `--state-file` identity. Declaring
66
+ state does not log in, seed data, or execute a user journey. Establish required
67
+ application state with the project's actual setup/browser test commands.
68
+
69
+ With two observations, `compare --before <root> --after <root> --output
70
+ comparisons` derives before/after evidence without launching another browser.
71
+ It can report incomparable evidence successfully, so inspect the semantic
72
+ result rather than treat advanced-command exit 0 as acceptance.
73
+
74
+ `approve-baseline`, `save-change-contract`, and `evaluate-contract` expose the
75
+ advanced frontend contract flow. A selected external image additionally uses
76
+ `import-reference`, `approve-reference`, and `evaluate-reference-fidelity`.
77
+ Reference requirements, applicability, explicit bindings, and protected behavior
78
+ remain independent acceptance responsibilities. A raw image import does not
79
+ approve a reference or prove every aesthetic requirement. See
80
+ [CONTRACTS.md](CONTRACTS.md) and [WORKFLOWS.md](WORKFLOWS.md).
81
+
82
+ `my-frontend-observer view --no-open` starts the loopback-only viewer over managed
83
+ project evidence. Use `view --root observations --no-open` for standalone roots.
84
+ The viewer is inspect-only. Its `--bindings-file` and `--context-file` inputs do
85
+ not create a second evaluator or automatic source-owner mapping.
86
+
87
+ To validate this repository itself, rather than the target application:
75
88
 
76
89
  ```powershell
77
90
  npm run typecheck
package/docs/RELEASE.md CHANGED
@@ -1,24 +1,30 @@
1
1
  # Release
2
2
 
3
- `v0.8.1` (Project Workflow CLI and Human-Readable Evidence Aliases) is
4
- released and published to npm as `@dailephd/my-frontend-observer`. The
5
- release includes the managed project workflow, bounded check interface,
6
- alias-aware viewer, cross-platform validation, and MIT license.
3
+ `v0.9.1` (PWA Hard-Gate Isolation and Reproducible Security Acceptance) is
4
+ released and published to npm as `@dailephd/my-frontend-observer`. This
5
+ maintenance release adds
6
+ structured visual annotation of runtime observations and external references
7
+ to the project-aware viewer, selected promotion of confirmed runtime intent
8
+ into canonical change contracts, and selected materialization of confirmed
9
+ reference intent into new imported reference revisions, with final
10
+ Windows/Linux/macOS readiness and the MIT license.
7
11
 
8
12
  The CLI remains `my-frontend-observer`; package identity and product identity
9
13
  are intentionally distinct. Canonical artifact schemas remain versioned
10
14
  independently from the npm package version.
11
15
 
12
16
  Observation, comparison, frontend contract, evaluation artifact,
13
- bounded-agent-context, external-reference, and package version all remain
14
- separate: package version is `0.7.0`; observation schema is `1.2.0`,
15
- comparison schema is `1.0.0`, frontend contract schema is `1.0.0`,
17
+ bounded-agent-context, external-reference, visual annotation, and package
18
+ version all remain separate: package version is `0.9.1`; observation schema is
19
+ `1.2.0`, comparison schema is `1.0.0`, frontend contract schema is `1.0.0`,
16
20
  evaluation artifact schema is `1.0.0`, bounded-agent-context schema is
17
- `1.0.0`, and external-reference schema is `1.0.0` - none of which changes
18
- automatically with the package version, and none of which was bumped by
19
- the v0.7 work.
21
+ `1.0.0`, external-reference schema is `1.0.0`, and visual annotation schema is
22
+ `1.0.0` - none of which changes automatically with the package version. v0.9
23
+ introduced the visual annotation schema and bumped no existing schema.
20
24
 
21
- Prior releases: `v0.6.0` (Bounded Agent Context and Native my-dev-kit
25
+ Prior releases: `v0.8.1` (Project Workflow CLI and Human-Readable Evidence
26
+ Aliases), `v0.8.0` (Interactive Local Observation Viewer), `v0.7.0` (End-to-End
27
+ Coding-Agent Frontend Change Review), `v0.6.0` (Bounded Agent Context and Native my-dev-kit
22
28
  Ecosystem Integration), `v0.5.0` (Executable Frontend Contracts and
23
29
  Explicit Change Scope), `v0.4.0` (Layout Relationships, Dependency
24
30
  Evidence, and Before/After Comparison), `v0.3.0` (Runtime Scrolling,