my-frontend-observer 0.4.0 → 0.6.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.
Files changed (68) hide show
  1. package/CHANGELOG.md +96 -0
  2. package/README.md +52 -11
  3. package/dist/application/frontendContractEvaluationService.d.ts +49 -0
  4. package/dist/application/frontendContractEvaluationService.js +112 -0
  5. package/dist/application/frontendContractEvaluationService.js.map +1 -0
  6. package/dist/application/frontendContractPersistenceService.d.ts +56 -0
  7. package/dist/application/frontendContractPersistenceService.js +91 -0
  8. package/dist/application/frontendContractPersistenceService.js.map +1 -0
  9. package/dist/artifacts/comparisonArtifactReader.d.ts +18 -0
  10. package/dist/artifacts/comparisonArtifactReader.js +35 -0
  11. package/dist/artifacts/comparisonArtifactReader.js.map +1 -0
  12. package/dist/artifacts/frontendContractArtifactReader.d.ts +24 -0
  13. package/dist/artifacts/frontendContractArtifactReader.js +47 -0
  14. package/dist/artifacts/frontendContractArtifactReader.js.map +1 -0
  15. package/dist/artifacts/frontendContractArtifactWriter.d.ts +34 -0
  16. package/dist/artifacts/frontendContractArtifactWriter.js +70 -0
  17. package/dist/artifacts/frontendContractArtifactWriter.js.map +1 -0
  18. package/dist/artifacts/frontendContractEvaluationArtifactReader.d.ts +17 -0
  19. package/dist/artifacts/frontendContractEvaluationArtifactReader.js +34 -0
  20. package/dist/artifacts/frontendContractEvaluationArtifactReader.js.map +1 -0
  21. package/dist/artifacts/frontendContractEvaluationArtifactWriter.d.ts +32 -0
  22. package/dist/artifacts/frontendContractEvaluationArtifactWriter.js +58 -0
  23. package/dist/artifacts/frontendContractEvaluationArtifactWriter.js.map +1 -0
  24. package/dist/cli.js +496 -6
  25. package/dist/cli.js.map +1 -1
  26. package/dist/domain/boundedAgentContext.d.ts +174 -0
  27. package/dist/domain/boundedAgentContext.js +312 -0
  28. package/dist/domain/boundedAgentContext.js.map +1 -0
  29. package/dist/domain/boundedAgentContextCorrelation.d.ts +74 -0
  30. package/dist/domain/boundedAgentContextCorrelation.js +441 -0
  31. package/dist/domain/boundedAgentContextCorrelation.js.map +1 -0
  32. package/dist/domain/boundedAgentContextIdentity.d.ts +16 -0
  33. package/dist/domain/boundedAgentContextIdentity.js +53 -0
  34. package/dist/domain/boundedAgentContextIdentity.js.map +1 -0
  35. package/dist/domain/boundedAgentContextProjection.d.ts +60 -0
  36. package/dist/domain/boundedAgentContextProjection.js +449 -0
  37. package/dist/domain/boundedAgentContextProjection.js.map +1 -0
  38. package/dist/domain/frontendContractEvaluation.d.ts +57 -0
  39. package/dist/domain/frontendContractEvaluation.js +454 -0
  40. package/dist/domain/frontendContractEvaluation.js.map +1 -0
  41. package/dist/domain/frontendContractEvaluationArtifact.d.ts +65 -0
  42. package/dist/domain/frontendContractEvaluationArtifact.js +108 -0
  43. package/dist/domain/frontendContractEvaluationArtifact.js.map +1 -0
  44. package/dist/domain/frontendContractIdentity.d.ts +39 -0
  45. package/dist/domain/frontendContractIdentity.js +70 -0
  46. package/dist/domain/frontendContractIdentity.js.map +1 -0
  47. package/dist/domain/frontendContracts.d.ts +188 -0
  48. package/dist/domain/frontendContracts.js +260 -0
  49. package/dist/domain/frontendContracts.js.map +1 -0
  50. package/dist/index.d.ts +29 -0
  51. package/dist/index.js +16 -0
  52. package/dist/index.js.map +1 -1
  53. package/docs/ARCHITECTURE.md +169 -10
  54. package/docs/CI_CD.md +68 -0
  55. package/docs/COMMANDS.md +162 -0
  56. package/docs/CONTRACTS.md +245 -5
  57. package/docs/CURRENT_STATE.md +152 -14
  58. package/docs/DEVELOPMENT.md +61 -11
  59. package/docs/DOCUMENTATION_PRESERVATION_POLICY.md +33 -33
  60. package/docs/PROJECT_DESCRIPTION.md +1770 -1770
  61. package/docs/PROJECT_MILESTONES.md +2073 -2073
  62. package/docs/PROJECT_OVERVIEW.md +29 -16
  63. package/docs/QUICKSTART.md +5 -0
  64. package/docs/RELEASE.md +17 -10
  65. package/docs/ROADMAP.md +9 -0
  66. package/docs/SECURITY.md +30 -1
  67. package/docs/WORKFLOWS.md +98 -9
  68. package/package.json +1 -1
@@ -0,0 +1,260 @@
1
+ import { isValidEvidenceReference, PAIRWISE_RELATIONSHIP_KINDS, PAGE_LEVEL_RELATIONSHIP_KINDS } from './relationships.js';
2
+ import { DEPENDENCY_PROPERTIES } from './comparison.js';
3
+ import { PRODUCER_NAME, SCHEMA_VERSION as OBSERVATION_SCHEMA_VERSION } from './schema.js';
4
+ function isPlainObject(value) {
5
+ return typeof value === 'object' && value !== null && !Array.isArray(value);
6
+ }
7
+ function isNonEmptyString(value) {
8
+ return typeof value === 'string' && value.length > 0;
9
+ }
10
+ function isEvidenceReferenceArray(value) {
11
+ return Array.isArray(value) && value.every((entry) => isValidEvidenceReference(entry));
12
+ }
13
+ export const CONTRACT_ARTIFACT_KIND = 'my-frontend-observer/frontend-contract';
14
+ export const CONTRACT_SCHEMA_VERSION = '1.0.0';
15
+ // --- Change-scope vocabulary --------------------------------------------------
16
+ /** The authored per-change contract has exactly these 4 intent categories - `'unexpected'` is never a member. */
17
+ export const AUTHORED_CHANGE_SCOPE_CATEGORIES = ['requested', 'expected-dependent', 'protected', 'preserved'];
18
+ export function isAuthoredChangeScopeCategory(value) {
19
+ return typeof value === 'string' && AUTHORED_CHANGE_SCOPE_CATEGORIES.includes(value);
20
+ }
21
+ /**
22
+ * Full derived classification vocabulary, kept structurally separate from
23
+ * AUTHORED_CHANGE_SCOPE_CATEGORIES - `'unexpected'` is a classification a
24
+ * future evaluator produces, never an authored permission. No function in
25
+ * this module converts between the two vocabularies.
26
+ */
27
+ export const CHANGE_SCOPE_CLASSIFICATIONS = [...AUTHORED_CHANGE_SCOPE_CATEGORIES, 'unexpected'];
28
+ export const EXPECTED_DEPENDENT_MODES = ['required', 'permitted'];
29
+ export function isValidExpectedDependentMode(value) {
30
+ return typeof value === 'string' && EXPECTED_DEPENDENT_MODES.includes(value);
31
+ }
32
+ // --- Contract tolerance (bounded, closed - never a generic expression) -------
33
+ /** Independently declared from GEOMETRY_TOLERANCE_*_PX (src/domain/relationships.ts): comparison tolerance suppresses insignificant geometry noise and is never contract authorization. */
34
+ export const CONTRACT_TOLERANCE_ABSOLUTE_PX_MIN = 0;
35
+ export const CONTRACT_TOLERANCE_ABSOLUTE_PX_MAX = 100;
36
+ export const CONTRACT_TOLERANCE_PERCENT_MIN = 0;
37
+ export const CONTRACT_TOLERANCE_PERCENT_MAX = 100;
38
+ export function isValidContractTolerance(value) {
39
+ if (!isPlainObject(value))
40
+ return false;
41
+ if (value.kind === 'exact')
42
+ return Object.keys(value).length === 1;
43
+ if (value.kind === 'absolute-px') {
44
+ return (typeof value.amount === 'number' &&
45
+ Number.isFinite(value.amount) &&
46
+ value.amount >= CONTRACT_TOLERANCE_ABSOLUTE_PX_MIN &&
47
+ value.amount <= CONTRACT_TOLERANCE_ABSOLUTE_PX_MAX);
48
+ }
49
+ if (value.kind === 'percent') {
50
+ return (typeof value.amount === 'number' &&
51
+ Number.isFinite(value.amount) &&
52
+ value.amount >= CONTRACT_TOLERANCE_PERCENT_MIN &&
53
+ value.amount <= CONTRACT_TOLERANCE_PERCENT_MAX);
54
+ }
55
+ return false;
56
+ }
57
+ // --- Contract primitive vocabulary (bounded, closed) --------------------------
58
+ /** Every contract primitive kind this batch freezes - deliberately bounded, never a generic rule/expression language. */
59
+ export const CONTRACT_PRIMITIVE_KINDS = [
60
+ 'target-visible',
61
+ 'target-not-clipped',
62
+ 'target-width-within-bound',
63
+ 'targets-do-not-overlap',
64
+ 'target-wider-than',
65
+ 'target-follows-vertically',
66
+ 'target-fits-inside',
67
+ 'document-width-fits-viewport',
68
+ 'scroll-owner-is-document',
69
+ 'target-does-not-own-scroll',
70
+ 'target-begins-below-initial-viewport',
71
+ 'relationship-unchanged',
72
+ 'property-unchanged-within-tolerance',
73
+ 'property-increases',
74
+ 'property-decreases',
75
+ ];
76
+ const ALL_RELATIONSHIP_KINDS = [...PAIRWISE_RELATIONSHIP_KINDS, ...PAGE_LEVEL_RELATIONSHIP_KINDS];
77
+ function isOptionalFiniteNumber(value) {
78
+ return value === undefined || (typeof value === 'number' && Number.isFinite(value));
79
+ }
80
+ function isOptionalNonNegativeFiniteNumber(value) {
81
+ return value === undefined || (typeof value === 'number' && Number.isFinite(value) && value >= 0);
82
+ }
83
+ /** Rejects extra keys beyond the given allowlist, keeping every ContractPrimitive variant a closed shape rather than an open bag of fields. */
84
+ function hasOnlyKeys(value, allowedKeys) {
85
+ return Object.keys(value).every((key) => allowedKeys.includes(key));
86
+ }
87
+ export function isValidContractPrimitive(value) {
88
+ if (!isPlainObject(value) || typeof value.kind !== 'string')
89
+ return false;
90
+ switch (value.kind) {
91
+ case 'target-visible':
92
+ return hasOnlyKeys(value, ['kind', 'target']) && isNonEmptyString(value.target);
93
+ case 'target-not-clipped':
94
+ return (hasOnlyKeys(value, ['kind', 'target', 'axis']) &&
95
+ isNonEmptyString(value.target) &&
96
+ (value.axis === undefined || value.axis === 'horizontal' || value.axis === 'vertical' || value.axis === 'both'));
97
+ case 'target-width-within-bound': {
98
+ if (!hasOnlyKeys(value, ['kind', 'target', 'minPx', 'maxPx']))
99
+ return false;
100
+ if (!isNonEmptyString(value.target))
101
+ return false;
102
+ if (!isOptionalFiniteNumber(value.minPx) || !isOptionalFiniteNumber(value.maxPx))
103
+ return false;
104
+ if (value.minPx === undefined && value.maxPx === undefined)
105
+ return false;
106
+ if (typeof value.minPx === 'number' && typeof value.maxPx === 'number' && value.minPx > value.maxPx)
107
+ return false;
108
+ return true;
109
+ }
110
+ case 'targets-do-not-overlap':
111
+ case 'target-wider-than':
112
+ case 'target-follows-vertically':
113
+ return (hasOnlyKeys(value, ['kind', 'targetA', 'targetB']) &&
114
+ isNonEmptyString(value.targetA) &&
115
+ isNonEmptyString(value.targetB) &&
116
+ value.targetA !== value.targetB);
117
+ case 'target-fits-inside':
118
+ return (hasOnlyKeys(value, ['kind', 'target', 'container']) &&
119
+ isNonEmptyString(value.target) &&
120
+ isNonEmptyString(value.container) &&
121
+ value.target !== value.container);
122
+ case 'document-width-fits-viewport':
123
+ case 'scroll-owner-is-document':
124
+ return hasOnlyKeys(value, ['kind']) && Object.keys(value).length === 1;
125
+ case 'target-does-not-own-scroll':
126
+ case 'target-begins-below-initial-viewport':
127
+ return hasOnlyKeys(value, ['kind', 'target']) && isNonEmptyString(value.target);
128
+ case 'relationship-unchanged':
129
+ return (hasOnlyKeys(value, ['kind', 'relationshipKind', 'subjectTarget', 'relatedTarget']) &&
130
+ typeof value.relationshipKind === 'string' &&
131
+ ALL_RELATIONSHIP_KINDS.includes(value.relationshipKind) &&
132
+ (value.subjectTarget === undefined || typeof value.subjectTarget === 'string') &&
133
+ (value.relatedTarget === undefined || typeof value.relatedTarget === 'string'));
134
+ case 'property-unchanged-within-tolerance':
135
+ return (hasOnlyKeys(value, ['kind', 'target', 'property', 'tolerance']) &&
136
+ isNonEmptyString(value.target) &&
137
+ typeof value.property === 'string' &&
138
+ DEPENDENCY_PROPERTIES.includes(value.property) &&
139
+ isValidContractTolerance(value.tolerance));
140
+ case 'property-increases':
141
+ case 'property-decreases':
142
+ return (hasOnlyKeys(value, ['kind', 'target', 'property', 'minimumDeltaPx']) &&
143
+ isNonEmptyString(value.target) &&
144
+ typeof value.property === 'string' &&
145
+ DEPENDENCY_PROPERTIES.includes(value.property) &&
146
+ isOptionalNonNegativeFiniteNumber(value.minimumDeltaPx));
147
+ default:
148
+ return false;
149
+ }
150
+ }
151
+ export function isValidBaselineClause(value) {
152
+ if (!isPlainObject(value))
153
+ return false;
154
+ return isNonEmptyString(value.clauseId) && isValidContractPrimitive(value.primitive) && isEvidenceReferenceArray(value.supportingEvidence);
155
+ }
156
+ export function isValidPerChangeClause(value) {
157
+ if (!isPlainObject(value))
158
+ return false;
159
+ if (!isValidBaselineClause(value))
160
+ return false;
161
+ const record = value;
162
+ if (!isAuthoredChangeScopeCategory(record.category))
163
+ return false;
164
+ const hasMode = 'expectedDependentMode' in record && record.expectedDependentMode !== undefined;
165
+ if (record.category === 'expected-dependent') {
166
+ if (!hasMode || !isValidExpectedDependentMode(record.expectedDependentMode))
167
+ return false;
168
+ }
169
+ else if (hasMode) {
170
+ return false;
171
+ }
172
+ if ('supersedesBaselineClauseIds' in record && record.supersedesBaselineClauseIds !== undefined) {
173
+ const ids = record.supersedesBaselineClauseIds;
174
+ if (!Array.isArray(ids) || ids.length === 0)
175
+ return false;
176
+ if (!ids.every((id) => isNonEmptyString(id)))
177
+ return false;
178
+ }
179
+ return true;
180
+ }
181
+ export function isValidFrontendContractObservationReference(value) {
182
+ if (!isPlainObject(value))
183
+ return false;
184
+ if (!isNonEmptyString(value.observationId) || !isNonEmptyString(value.requestId))
185
+ return false;
186
+ if (!isPlainObject(value.producer) || value.producer.name !== PRODUCER_NAME || !isNonEmptyString(value.producer.version))
187
+ return false;
188
+ return value.observationSchemaVersion === OBSERVATION_SCHEMA_VERSION;
189
+ }
190
+ export function isValidPersistentBaselineContract(value) {
191
+ if (!isPlainObject(value))
192
+ return { valid: false, reason: 'contract must be an object' };
193
+ if (value.artifactKind !== CONTRACT_ARTIFACT_KIND)
194
+ return { valid: false, reason: 'artifactKind mismatch' };
195
+ if (value.schemaVersion !== CONTRACT_SCHEMA_VERSION)
196
+ return { valid: false, reason: 'schemaVersion mismatch' };
197
+ if (value.contractClass !== 'baseline')
198
+ return { valid: false, reason: 'contractClass must be "baseline"' };
199
+ if (!isNonEmptyString(value.baselineId))
200
+ return { valid: false, reason: 'baselineId must be a non-empty string' };
201
+ if ('supersedesBaselineId' in value && value.supersedesBaselineId !== undefined && !isNonEmptyString(value.supersedesBaselineId)) {
202
+ return { valid: false, reason: 'supersedesBaselineId must be a non-empty string when present' };
203
+ }
204
+ if (!isValidFrontendContractObservationReference(value.sourceObservation))
205
+ return { valid: false, reason: 'sourceObservation is invalid' };
206
+ if (!Array.isArray(value.clauses) || !value.clauses.every((c) => isValidBaselineClause(c))) {
207
+ return { valid: false, reason: 'clauses must be an array of valid BaselineClause values' };
208
+ }
209
+ if (!isPlainObject(value.provenance) || !isNonEmptyString(value.provenance.approvedAt)) {
210
+ return { valid: false, reason: 'provenance.approvedAt must be a non-empty string' };
211
+ }
212
+ return { valid: true };
213
+ }
214
+ export function isValidPerChangeContract(value) {
215
+ if (!isPlainObject(value))
216
+ return { valid: false, reason: 'contract must be an object' };
217
+ if (value.artifactKind !== CONTRACT_ARTIFACT_KIND)
218
+ return { valid: false, reason: 'artifactKind mismatch' };
219
+ if (value.schemaVersion !== CONTRACT_SCHEMA_VERSION)
220
+ return { valid: false, reason: 'schemaVersion mismatch' };
221
+ if (value.contractClass !== 'change')
222
+ return { valid: false, reason: 'contractClass must be "change"' };
223
+ if (!isNonEmptyString(value.contractId))
224
+ return { valid: false, reason: 'contractId must be a non-empty string' };
225
+ if (!isNonEmptyString(value.contractRequestId))
226
+ return { valid: false, reason: 'contractRequestId must be a non-empty string' };
227
+ if (!Array.isArray(value.activeBaselineIds) || !value.activeBaselineIds.every((id) => isNonEmptyString(id))) {
228
+ return { valid: false, reason: 'activeBaselineIds must be an array of non-empty strings' };
229
+ }
230
+ if (!Array.isArray(value.clauses) || !value.clauses.every((c) => isValidPerChangeClause(c))) {
231
+ return { valid: false, reason: 'clauses must be an array of valid PerChangeClause values' };
232
+ }
233
+ return { valid: true };
234
+ }
235
+ // --- Per-clause evaluation result vocabulary (frozen vocabulary only; no producer in this batch) --
236
+ export const CLAUSE_RESULT_STATUSES = ['pass', 'fail', 'unavailable', 'conflict'];
237
+ /** Honest per-clause result vocabulary: `'unavailable'` requires a non-empty reason (never fabricated pass/fail); `'conflict'` requires at least 2 conflicting clause ids. */
238
+ export function isValidClauseEvaluationResult(value) {
239
+ if (!isPlainObject(value) || !isNonEmptyString(value.clauseId))
240
+ return false;
241
+ if (!isEvidenceReferenceArray(value.supportingEvidence))
242
+ return false;
243
+ switch (value.status) {
244
+ case 'pass':
245
+ case 'fail':
246
+ return !('reason' in value) && !('conflictingClauseIds' in value);
247
+ case 'unavailable':
248
+ return isNonEmptyString(value.reason) && !('conflictingClauseIds' in value);
249
+ case 'conflict':
250
+ return (isNonEmptyString(value.reason) &&
251
+ Array.isArray(value.conflictingClauseIds) &&
252
+ value.conflictingClauseIds.length >= 2 &&
253
+ value.conflictingClauseIds.every((id) => isNonEmptyString(id)));
254
+ default:
255
+ return false;
256
+ }
257
+ }
258
+ // --- Overall verdict vocabulary (type only; no producer in this batch) -----------
259
+ export const OVERALL_VERDICTS = ['PASS', 'FAIL'];
260
+ //# sourceMappingURL=frontendContracts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"frontendContracts.js","sourceRoot":"","sources":["../../src/domain/frontendContracts.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,wBAAwB,EAAE,2BAA2B,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AAE1H,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,cAAc,IAAI,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAE1F,SAAS,aAAa,CAAC,KAAc;IACnC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAc;IACtC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;AACvD,CAAC;AAED,SAAS,wBAAwB,CAAC,KAAc;IAC9C,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAC,CAAC;AACzF,CAAC;AAED,MAAM,CAAC,MAAM,sBAAsB,GAAG,wCAAiD,CAAC;AACxF,MAAM,CAAC,MAAM,uBAAuB,GAAG,OAAgB,CAAC;AAExD,iFAAiF;AAEjF,iHAAiH;AACj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K,CAAC,kBAAkB,CAAC;QAAE,OAAO,KAAK,CAAC;IACtE,QAAQ,KAAK,CAAC,MAAM,EAAE,CAAC;QACrB,KAAK,MAAM,CAAC;QACZ,KAAK,MAAM;YACT,OAAO,CAAC,CAAC,QAAQ,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,sBAAsB,IAAI,KAAK,CAAC,CAAC;QACpE,KAAK,aAAa;YAChB,OAAO,gBAAgB,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,sBAAsB,IAAI,KAAK,CAAC,CAAC;QAC9E,KAAK,UAAU;YACb,OAAO,CACL,gBAAgB,CAAC,KAAK,CAAC,MAAM,CAAC;gBAC9B,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,oBAAoB,CAAC;gBACzC,KAAK,CAAC,oBAAoB,CAAC,MAAM,IAAI,CAAC;gBACtC,KAAK,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC,EAAW,EAAE,EAAE,CAAC,gBAAgB,CAAC,EAAE,CAAC,CAAC,CACxE,CAAC;QACJ;YACE,OAAO,KAAK,CAAC;IACjB,CAAC;AACH,CAAC;AAED,oFAAoF;AAEpF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,MAAM,EAAE,MAAM,CAAU,CAAC"}
package/dist/index.d.ts CHANGED
@@ -24,8 +24,37 @@ export { HORIZONTAL_ORDER_RELATIONSHIPS, VERTICAL_ORDER_RELATIONSHIPS, AREA_OVER
24
24
  export type { DependencyProperty, DependencyDirection, ExpectedDependencySource, DependencyTermDeclaration, ExpectedDependencyDeclaration, DependencyEvidenceOutcome, ExpectedDependencyEvidence, ComparisonConfig, ComparabilityState, ComparabilityReasonCode, ComparabilityReasonSeverity, ComparabilityReason, ComparabilityResult, TargetConfigurationChangeKind, TargetConfigurationChange, DifferenceKind, ComparisonDifferenceSubject, ComparisonDifference, RelationshipChangeRecord, ComparisonSourceObservationReference, ComparisonArtifact, ComparisonSchemaValidationResult, } from './domain/comparison.js';
25
25
  export { COMPARISON_ARTIFACT_KIND, COMPARISON_SCHEMA_VERSION, GEOMETRY_TOLERANCE_DEFAULT_PX, GEOMETRY_TOLERANCE_MIN_PX, GEOMETRY_TOLERANCE_MAX_PX, isValidGeometryTolerancePx, DEPENDENCY_PROPERTIES, DEPENDENCY_DIRECTIONS, EXPECTED_DEPENDENCY_SOURCES, isValidExpectedDependencyDeclaration, DEPENDENCY_EVIDENCE_OUTCOMES, isValidExpectedDependencyEvidence, isValidComparisonConfig, COMPARABILITY_STATES, COMPARABILITY_REASON_CODES, COMPARABILITY_REASON_SEVERITY, isValidComparabilityResult, TARGET_CONFIGURATION_CHANGE_KINDS, isValidTargetConfigurationChange, DIFFERENCE_KINDS, isValidComparisonDifference, isValidComparisonSourceObservationReference, isValidComparisonArtifact, } from './domain/comparison.js';
26
26
  export { buildComparisonRequestIdentity, buildComparisonIdentity } from './domain/comparisonIdentity.js';
27
+ export type { AuthoredChangeScopeCategory, ChangeScopeClassification, ExpectedDependentMode, ContractTolerance, ContractPrimitiveKind, ContractPrimitive, FrontendContractClauseBase, BaselineClause, PerChangeClause, FrontendContractObservationReference, PersistentBaselineContract, FrontendContractValidationResult, PerChangeContract, ClauseResultStatus, ClauseEvaluationResult, OverallVerdict, } from './domain/frontendContracts.js';
28
+ export { CONTRACT_ARTIFACT_KIND, CONTRACT_SCHEMA_VERSION, AUTHORED_CHANGE_SCOPE_CATEGORIES, isAuthoredChangeScopeCategory, CHANGE_SCOPE_CLASSIFICATIONS, EXPECTED_DEPENDENT_MODES, isValidExpectedDependentMode, CONTRACT_TOLERANCE_ABSOLUTE_PX_MIN, CONTRACT_TOLERANCE_ABSOLUTE_PX_MAX, CONTRACT_TOLERANCE_PERCENT_MIN, CONTRACT_TOLERANCE_PERCENT_MAX, isValidContractTolerance, CONTRACT_PRIMITIVE_KINDS, isValidContractPrimitive, isValidBaselineClause, isValidPerChangeClause, isValidFrontendContractObservationReference, isValidPersistentBaselineContract, isValidPerChangeContract, CLAUSE_RESULT_STATUSES, isValidClauseEvaluationResult, OVERALL_VERDICTS, } from './domain/frontendContracts.js';
29
+ export { buildFrontendContractRequestIdentity, buildFrontendContractInstanceIdentity, buildClauseIdentity } from './domain/frontendContractIdentity.js';
30
+ export type { FrontendContractEvaluationInput, UnexpectedChangeResult, FrontendContractEvaluationResult, EvaluateFrontendContractResult } from './domain/frontendContractEvaluation.js';
31
+ export { evaluateFrontendContract } from './domain/frontendContractEvaluation.js';
32
+ export { buildFrontendContractEvaluationRequestIdentity } from './domain/frontendContractIdentity.js';
33
+ export type { FrontendContractEvaluationSourceReference, FrontendContractEvaluationArtifact, FrontendContractEvaluationArtifactValidationResult, BuildFrontendContractEvaluationArtifactInput, } from './domain/frontendContractEvaluationArtifact.js';
34
+ export { EVALUATION_ARTIFACT_KIND, EVALUATION_SCHEMA_VERSION, isValidFrontendContractEvaluationArtifact, buildFrontendContractEvaluationArtifact, } from './domain/frontendContractEvaluationArtifact.js';
35
+ export type { PersistedFrontendContractResult, WriteFrontendContractArtifactOptions } from './artifacts/frontendContractArtifactWriter.js';
36
+ export { FRONTEND_CONTRACT_MANIFEST_FILENAME, writePersistentBaselineContract, writePerChangeContract } from './artifacts/frontendContractArtifactWriter.js';
37
+ export type { ReadPersistentBaselineContractResult, ReadPerChangeContractResult } from './artifacts/frontendContractArtifactReader.js';
38
+ export { readPersistentBaselineContract, readPerChangeContract } from './artifacts/frontendContractArtifactReader.js';
39
+ export type { ReadComparisonArtifactResult } from './artifacts/comparisonArtifactReader.js';
40
+ export { readComparisonArtifact } from './artifacts/comparisonArtifactReader.js';
41
+ export type { PersistedFrontendContractEvaluationResult, WriteFrontendContractEvaluationArtifactOptions } from './artifacts/frontendContractEvaluationArtifactWriter.js';
42
+ export { EVALUATION_MANIFEST_FILENAME, writeFrontendContractEvaluationArtifact } from './artifacts/frontendContractEvaluationArtifactWriter.js';
43
+ export type { ReadFrontendContractEvaluationArtifactResult } from './artifacts/frontendContractEvaluationArtifactReader.js';
44
+ export { readFrontendContractEvaluationArtifact } from './artifacts/frontendContractEvaluationArtifactReader.js';
45
+ export type { EvaluateAndPersistOptions, ApplicationFrontendContractEvaluationResult } from './application/frontendContractEvaluationService.js';
46
+ export { DEFAULT_EVALUATION_OUTPUT_LOCATION, evaluateAndPersist, evaluateAndPersistFromArtifactRoots } from './application/frontendContractEvaluationService.js';
47
+ export type { PersistFrontendContractOptions, ApplicationApproveBaselineResult, ApplicationPersistChangeContractResult } from './application/frontendContractPersistenceService.js';
48
+ export { approveAndPersistBaseline, persistPerChangeContract } from './application/frontendContractPersistenceService.js';
27
49
  export type { CompareObservationsResult } from './domain/comparisonEngine.js';
28
50
  export { compareObservations, evaluateComparability, evaluateExpectedDependencies, compareTargetConfiguration } from './domain/comparisonEngine.js';
51
+ export type { ProjectionProfile, AdequacyState, AdequacyReasonCode, AdequacyReason, Adequacy, OmissionReason, OmissionRecord, TruncationRecord, BoundedAgentContextSourceReferences, BoundedRuntimeTargetProjection, CorrelationStatus, StaticCandidateKind, StaticEvidenceProducerIdentity, StaticCandidateReference, RuntimeStaticCorrelationRecord, BoundedAgentContextArtifact, BoundedAgentContextValidationResult, } from './domain/boundedAgentContext.js';
52
+ export { BOUNDED_AGENT_CONTEXT_ARTIFACT_KIND, BOUNDED_AGENT_CONTEXT_SCHEMA_VERSION, PROJECTION_PROFILES, MAX_RUNTIME_TARGETS, MAX_RELATIONSHIP_EVIDENCE_PER_TARGET, MAX_OMISSIONS, MAX_TRUNCATIONS, MAX_CORRELATION_RECORDS, MAX_STATIC_CANDIDATES_PER_TARGET, MAX_TEXT_SUMMARY_CHARS, MAX_EVIDENCE_REFS_PER_CORRELATION_FIELD, ADEQUACY_STATES, ADEQUACY_REASON_CODES, OMISSION_REASONS, CORRELATION_STATUSES, STATIC_CANDIDATE_KINDS, isValidBoundedAgentContextArtifact, } from './domain/boundedAgentContext.js';
53
+ export { buildBoundedAgentContextRequestIdentity, buildBoundedAgentContextInstanceIdentity } from './domain/boundedAgentContextIdentity.js';
54
+ export type { ProjectBoundedAgentContextInput, ProjectBoundedAgentContextResult } from './domain/boundedAgentContextProjection.js';
55
+ export { projectBoundedAgentContext } from './domain/boundedAgentContextProjection.js';
56
+ export type { StaticCandidateEvidenceInput, CorrelationTargetInput, DeriveRuntimeStaticCorrelationsInput, DeriveRuntimeStaticCorrelationsOutput, DeriveRuntimeStaticCorrelationsResult, AttachRuntimeStaticCorrelationsResult, } from './domain/boundedAgentContextCorrelation.js';
57
+ export { deriveRuntimeStaticCorrelations, attachRuntimeStaticCorrelations } from './domain/boundedAgentContextCorrelation.js';
29
58
  export type { PersistedComparisonResult, WriteComparisonArtifactOptions } from './artifacts/comparisonArtifactWriter.js';
30
59
  export { COMPARISON_MANIFEST_FILENAME, writeComparisonArtifact } from './artifacts/comparisonArtifactWriter.js';
31
60
  export type { ReadObservationArtifactResult } from './artifacts/artifactReader.js';
package/dist/index.js CHANGED
@@ -12,7 +12,23 @@ export { buildObservationArtifact, persistBrowserCapture, observe } from './appl
12
12
  export { HORIZONTAL_ORDER_RELATIONSHIPS, VERTICAL_ORDER_RELATIONSHIPS, AREA_OVERLAP_RELATIONSHIPS, RELATIVE_WIDTH_RELATIONSHIPS, GEOMETRIC_FIT_RELATIONSHIPS, VERTICAL_SEQUENCE_RELATIONSHIPS, PAGE_WIDTH_RELATIONSHIPS, PAIRWISE_RELATIONSHIP_KINDS, PAGE_LEVEL_RELATIONSHIP_KINDS, MAX_CONFIGURED_TARGETS_FOR_RELATIONSHIPS, MAX_PAIRWISE_RELATIONSHIP_PAIRS, PAIRWISE_RELATIONSHIP_FAMILY_COUNT, MAX_PAIRWISE_RELATIONSHIP_RECORDS, CLIPPING_STATES, CLIPPING_OVERFLOW_STYLES, isValidEvidenceReference, isValidPairwiseLayoutRelationship, isValidPageLevelLayoutRelationship, isValidUnresolvedRelationshipTarget, isValidLayoutRelationshipGraph, isValidTargetClippingEvidence, deriveTargetClipping, deriveLayoutRelationships, } from './domain/relationships.js';
13
13
  export { COMPARISON_ARTIFACT_KIND, COMPARISON_SCHEMA_VERSION, GEOMETRY_TOLERANCE_DEFAULT_PX, GEOMETRY_TOLERANCE_MIN_PX, GEOMETRY_TOLERANCE_MAX_PX, isValidGeometryTolerancePx, DEPENDENCY_PROPERTIES, DEPENDENCY_DIRECTIONS, EXPECTED_DEPENDENCY_SOURCES, isValidExpectedDependencyDeclaration, DEPENDENCY_EVIDENCE_OUTCOMES, isValidExpectedDependencyEvidence, isValidComparisonConfig, COMPARABILITY_STATES, COMPARABILITY_REASON_CODES, COMPARABILITY_REASON_SEVERITY, isValidComparabilityResult, TARGET_CONFIGURATION_CHANGE_KINDS, isValidTargetConfigurationChange, DIFFERENCE_KINDS, isValidComparisonDifference, isValidComparisonSourceObservationReference, isValidComparisonArtifact, } from './domain/comparison.js';
14
14
  export { buildComparisonRequestIdentity, buildComparisonIdentity } from './domain/comparisonIdentity.js';
15
+ export { CONTRACT_ARTIFACT_KIND, CONTRACT_SCHEMA_VERSION, AUTHORED_CHANGE_SCOPE_CATEGORIES, isAuthoredChangeScopeCategory, CHANGE_SCOPE_CLASSIFICATIONS, EXPECTED_DEPENDENT_MODES, isValidExpectedDependentMode, CONTRACT_TOLERANCE_ABSOLUTE_PX_MIN, CONTRACT_TOLERANCE_ABSOLUTE_PX_MAX, CONTRACT_TOLERANCE_PERCENT_MIN, CONTRACT_TOLERANCE_PERCENT_MAX, isValidContractTolerance, CONTRACT_PRIMITIVE_KINDS, isValidContractPrimitive, isValidBaselineClause, isValidPerChangeClause, isValidFrontendContractObservationReference, isValidPersistentBaselineContract, isValidPerChangeContract, CLAUSE_RESULT_STATUSES, isValidClauseEvaluationResult, OVERALL_VERDICTS, } from './domain/frontendContracts.js';
16
+ export { buildFrontendContractRequestIdentity, buildFrontendContractInstanceIdentity, buildClauseIdentity } from './domain/frontendContractIdentity.js';
17
+ export { evaluateFrontendContract } from './domain/frontendContractEvaluation.js';
18
+ export { buildFrontendContractEvaluationRequestIdentity } from './domain/frontendContractIdentity.js';
19
+ export { EVALUATION_ARTIFACT_KIND, EVALUATION_SCHEMA_VERSION, isValidFrontendContractEvaluationArtifact, buildFrontendContractEvaluationArtifact, } from './domain/frontendContractEvaluationArtifact.js';
20
+ export { FRONTEND_CONTRACT_MANIFEST_FILENAME, writePersistentBaselineContract, writePerChangeContract } from './artifacts/frontendContractArtifactWriter.js';
21
+ export { readPersistentBaselineContract, readPerChangeContract } from './artifacts/frontendContractArtifactReader.js';
22
+ export { readComparisonArtifact } from './artifacts/comparisonArtifactReader.js';
23
+ export { EVALUATION_MANIFEST_FILENAME, writeFrontendContractEvaluationArtifact } from './artifacts/frontendContractEvaluationArtifactWriter.js';
24
+ export { readFrontendContractEvaluationArtifact } from './artifacts/frontendContractEvaluationArtifactReader.js';
25
+ export { DEFAULT_EVALUATION_OUTPUT_LOCATION, evaluateAndPersist, evaluateAndPersistFromArtifactRoots } from './application/frontendContractEvaluationService.js';
26
+ export { approveAndPersistBaseline, persistPerChangeContract } from './application/frontendContractPersistenceService.js';
15
27
  export { compareObservations, evaluateComparability, evaluateExpectedDependencies, compareTargetConfiguration } from './domain/comparisonEngine.js';
28
+ export { BOUNDED_AGENT_CONTEXT_ARTIFACT_KIND, BOUNDED_AGENT_CONTEXT_SCHEMA_VERSION, PROJECTION_PROFILES, MAX_RUNTIME_TARGETS, MAX_RELATIONSHIP_EVIDENCE_PER_TARGET, MAX_OMISSIONS, MAX_TRUNCATIONS, MAX_CORRELATION_RECORDS, MAX_STATIC_CANDIDATES_PER_TARGET, MAX_TEXT_SUMMARY_CHARS, MAX_EVIDENCE_REFS_PER_CORRELATION_FIELD, ADEQUACY_STATES, ADEQUACY_REASON_CODES, OMISSION_REASONS, CORRELATION_STATUSES, STATIC_CANDIDATE_KINDS, isValidBoundedAgentContextArtifact, } from './domain/boundedAgentContext.js';
29
+ export { buildBoundedAgentContextRequestIdentity, buildBoundedAgentContextInstanceIdentity } from './domain/boundedAgentContextIdentity.js';
30
+ export { projectBoundedAgentContext } from './domain/boundedAgentContextProjection.js';
31
+ export { deriveRuntimeStaticCorrelations, attachRuntimeStaticCorrelations } from './domain/boundedAgentContextCorrelation.js';
16
32
  export { COMPARISON_MANIFEST_FILENAME, writeComparisonArtifact } from './artifacts/comparisonArtifactWriter.js';
17
33
  export { readObservationArtifact } from './artifacts/artifactReader.js';
18
34
  export { DEFAULT_COMPARISON_OUTPUT_LOCATION, compareAndPersist, compareAndPersistFromArtifactRoots } from './application/comparisonService.js';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAG3E,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAGlG,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAmC1D,OAAO,EACL,aAAa,EACb,cAAc,EACd,aAAa,EACb,qBAAqB,EACrB,eAAe,EACf,0BAA0B,GAC3B,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAetF,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAG9E,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAG7D,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAGzH,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAG3E,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAEvF,OAAO,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,OAAO,EAAE,MAAM,yCAAyC,CAAC;AAwBnH,OAAO,EACL,8BAA8B,EA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AAE,4BAA4B,EAAE,uCAAuC,EAAE,MAAM,yDAAyD,CAAC;AAGhJ,OAAO,EAAE,sCAAsC,EAAE,MAAM,yDAAyD,CAAC;AAGjH,OAAO,EAAE,kCAAkC,EAAE,kBAAkB,EAAE,mCAAmC,EAAE,MAAM,oDAAoD,CAAC;AAGjK,OAAO,EAAE,yBAAyB,EAAE,wBAAwB,EAAE,MAAM,qDAAqD,CAAC;AAG1H,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,4BAA4B,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAqBpJ,OAAO,EACL,mCAAmC,EACnC,oCAAoC,EACpC,mBAAmB,EACnB,mBAAmB,EACnB,oCAAoC,EACpC,aAAa,EACb,eAAe,EACf,uBAAuB,EACvB,gCAAgC,EAChC,sBAAsB,EACtB,uCAAuC,EACvC,eAAe,EACf,qBAAqB,EACrB,gBAAgB,EAChB,oBAAoB,EACpB,sBAAsB,EACtB,kCAAkC,GACnC,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAAE,uCAAuC,EAAE,wCAAwC,EAAE,MAAM,yCAAyC,CAAC;AAG5I,OAAO,EAAE,0BAA0B,EAAE,MAAM,2CAA2C,CAAC;AAUvF,OAAO,EAAE,+BAA+B,EAAE,+BAA+B,EAAE,MAAM,4CAA4C,CAAC;AAG9H,OAAO,EAAE,4BAA4B,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAGhH,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAGxE,OAAO,EAAE,kCAAkC,EAAE,iBAAiB,EAAE,kCAAkC,EAAE,MAAM,oCAAoC,CAAC"}
@@ -1,12 +1,15 @@
1
1
  # Architecture
2
2
 
3
- ## Current scaffold architecture
3
+ ## Current package architecture
4
4
 
5
5
  The current repository is one published TypeScript ESM package
6
- (`my-frontend-observer@0.4.0`):
6
+ (`my-frontend-observer@0.5.0`):
7
7
 
8
- - `src/cli.ts` is the real, thin `observe` command entry point (argument
9
- parsing/output only).
8
+ - `src/cli.ts` is the real, thin public CLI parsing/dispatch/presentation
9
+ boundary for the current command surface (`observe`, `compare`,
10
+ `approve-baseline`, `save-change-contract`, `evaluate-contract`); argument
11
+ parsing and output formatting only, per command - the commands do not share
12
+ domain semantics in the CLI.
10
13
  - `src/index.ts` is the library entry point re-exporting the observer-owned
11
14
  contracts/functions from every layer below.
12
15
  - `scripts/clean.mjs` safely removes only the project `dist/` directory.
@@ -181,9 +184,164 @@ path never launches Chromium** - `src/cli.ts` imports nothing from
181
184
  reading indirectly, through the application-layer seam above), matching the
182
185
  same import-boundary discipline already enforced for `observe`.
183
186
 
184
- ## Planned v0.1 architecture constraints
187
+ ## Current v0.5 architecture (released/current architecture)
185
188
 
186
- v0.1 planning must preserve these approved boundaries without treating module
189
+ v0.5 adds one new downstream layer that consumes `ComparisonArtifact` values
190
+ (plus the source `ObservationArtifact` pair) rather than producing them - no
191
+ new browser lifecycle, target resolver, or comparison engine is added:
192
+
193
+ ```text
194
+ ObservationArtifact before + after
195
+ ↓
196
+ existing v0.4 comparison/relationship pipeline (unchanged)
197
+ ↓
198
+ ComparisonArtifact
199
+ ↓ PersistentBaselineContract
200
+ | +
201
+ `------------------------→ PerChangeContract
202
+ ↓
203
+ canonical contract evaluation
204
+ (src/domain/frontendContractEvaluation.ts#evaluateFrontendContract)
205
+ ↓
206
+ clause results + unexpected changes + overall PASS/FAIL
207
+ ```
208
+
209
+ `src/domain/frontendContracts.ts` froze the contract/change-scope type,
210
+ constant, and structural-validator vocabulary (Batch 1); `src/domain/
211
+ frontendContractIdentity.ts` froze deterministic contract/baseline/clause
212
+ identity in the same canonicalize+sha256(+opaque-nonce) style as `src/domain/
213
+ comparisonIdentity.ts`. `src/domain/frontendContractEvaluation.ts#evaluateFrontendContract`
214
+ (Batch 2) is the one canonical pure evaluation entry point: it validates its
215
+ five inputs (before/after `ObservationArtifact`, `ComparisonArtifact`,
216
+ `PersistentBaselineContract`, `PerChangeContract`) are structurally coherent
217
+ and mutually consistent, calculates the active baseline clause set after
218
+ explicit supersession, detects bounded structural conflicts, evaluates every
219
+ active clause via the frozen 15-primitive vocabulary against the existing
220
+ `ComparisonArtifact`/`ObservationArtifact` evidence (never re-deriving
221
+ clipping/relationship/scroll-owner facts), classifies unaccounted-for
222
+ `ComparisonArtifact.differences` entries as `unexpected`, and derives one
223
+ overall `PASS`/`FAIL` verdict. It performs no I/O, launches no browser, and
224
+ persists nothing - `src/domain/frontendContractEvaluation.ts` itself remains
225
+ untouched by the persistence layer below (Batch 3).
226
+
227
+ Batch 3 adds the persistence/application boundary around this frozen domain,
228
+ without redefining it:
229
+
230
+ ```text
231
+ ComparisonArtifact (read via new src/artifacts/comparisonArtifactReader.ts)
232
+ +
233
+ PersistentBaselineContract / PerChangeContract
234
+ (read/written via src/artifacts/frontendContractArtifactReader.ts / ...Writer.ts)
235
+ ↓
236
+ src/application/frontendContractEvaluationService.ts#evaluateAndPersist
237
+ ↓
238
+ evaluateFrontendContract() [called exactly once, unmodified]
239
+ ↓
240
+ src/domain/frontendContractEvaluationArtifact.ts
241
+ (minimal additive persisted envelope around the frozen result)
242
+ ↓
243
+ src/artifacts/frontendContractEvaluationArtifactWriter.ts
244
+ (atomic write, exactly once on a structurally constructible result)
245
+ ```
246
+
247
+ `evaluateAndPersistFromArtifactRoots` is the CLI-facing wrapper, reading
248
+ before/after observations through the existing `readObservationArtifact` (no
249
+ second observation reader), the comparison and both contract classes
250
+ through the new readers, then delegating to `evaluateAndPersist` exactly
251
+ once - mirroring `application/comparisonService.ts#compareAndPersistFromArtifactRoots`'s
252
+ own thin-wrapper shape.
253
+
254
+ Batch 4 exposes this through the same thin-CLI boundary already established
255
+ by `observe`/`compare`:
256
+
257
+ ```text
258
+ src/cli.ts (argument parsing, JSON-file-shape checks, help/output formatting,
259
+ exit-code selection only)
260
+ ↓
261
+ src/application/frontendContractPersistenceService.ts#approveAndPersistBaseline
262
+ src/application/frontendContractPersistenceService.ts#persistPerChangeContract
263
+ src/application/frontendContractEvaluationService.ts#evaluateAndPersistFromArtifactRoots
264
+ ↓
265
+ domain validators (isValidPersistentBaselineContract / isValidPerChangeContract)
266
+ + artifact readers/writers (Batch 3)
267
+ + evaluateFrontendContract() (Batch 2, unmodified)
268
+ ```
269
+
270
+ Three new top-level commands - `approve-baseline`, `save-change-contract`,
271
+ `evaluate-contract` - each parse only CLI-syntax concerns (duplicate/missing
272
+ flags, JSON-file readability/parseability/object-root shape) and delegate to
273
+ exactly one application-layer call; `src/cli.ts` imports no artifact writer/
274
+ reader module and no browser code, matching the existing `observe`/`compare`
275
+ import-boundary discipline exactly. `approveAndPersistBaseline` adds the one
276
+ new coherence check Batch 3 did not need: verifying a baseline contract's
277
+ frozen `sourceObservation` reference actually matches the supplied
278
+ observation artifact before persisting - explicit approval only, never
279
+ inferred from a `compare` or `evaluate-contract` result. `--enforce` on
280
+ `evaluate-contract` is applied only after evaluation and persistence have
281
+ already completed; it selects the process exit status for an already-final
282
+ `FAIL` result and is never part of any identity or persisted field.
283
+
284
+ ## Current v0.6 architecture (released as `0.6.0`)
285
+
286
+ v0.6 adds one new downstream, read-only layer that consumes existing v0.1-v0.5
287
+ evidence (`ObservationArtifact`, `ComparisonArtifact`,
288
+ `PersistentBaselineContract`/`PerChangeContract`, and evaluation results)
289
+ plus caller-supplied bounded static candidate evidence - it adds no new
290
+ browser lifecycle, target resolver, observation/comparison/contract engine,
291
+ or persisted artifact family:
292
+
293
+ ```text
294
+ ObservationArtifact(s) + ComparisonArtifact + contract/evaluation evidence
295
+ ↓
296
+ src/domain/boundedAgentContextProjection.ts#projectBoundedAgentContext
297
+ ↓
298
+ BoundedRuntimeTargetProjection
299
+ (page/viewport identity, stable targets, geometry, runtime behavior,
300
+ relationships, before/after differences, contract results,
301
+ requested/expected-dependent/protected/preserved scope reused verbatim
302
+ from src/domain/frontendContracts.ts, diagnostics, artifact/screenshot
303
+ references, provenance, adequacy, omission, truncation)
304
+ ↓
305
+ src/domain/boundedAgentContextCorrelation.ts
306
+ #deriveRuntimeStaticCorrelations / #attachRuntimeStaticCorrelations
307
+ ↓
308
+ RuntimeStaticCorrelation[] (correlated / ambiguous / unavailable,
309
+ competing candidates preserved verbatim - never collapsed to one owner)
310
+ ↓
311
+ src/index.ts (public export/correlation boundary only)
312
+ ```
313
+
314
+ `src/domain/boundedAgentContext.ts` freezes the bounded-projection and
315
+ correlation type/constant vocabulary (`Adequacy`, `ADEQUACY_REASON_CODES`,
316
+ `OmissionRecord`, `TruncationRecord`, `BOUNDED_AGENT_CONTEXT_ARTIFACT_KIND`,
317
+ schema `1.0.0`). `src/domain/boundedAgentContextIdentity.ts` derives a
318
+ deterministic logical identity distinct from a fresh per-execution instance
319
+ identity, in the same canonicalize+hash style as
320
+ `comparisonIdentity.ts`/`frontendContractIdentity.ts`.
321
+ `boundedAgentContextProjection.ts` performs no browser I/O and re-derives
322
+ nothing already owned upstream - it reads already-captured artifacts and
323
+ reuses the existing v0.4 relationship/comparison evidence and v0.5
324
+ change-scope clause types directly. `boundedAgentContextCorrelation.ts`
325
+ accepts only plain, caller-supplied candidate static-evidence records; it has
326
+ **no** dependency on `@dailephd/my-dev-kit`, since the audit that preceded
327
+ implementation found no generic static-side retrieval capability actually
328
+ missing (see `docs/ROADMAP.md` v0.6 "Dependency direction" - the "determine
329
+ whether my-dev-kit requires a static-side change" step concluded no).
330
+ Runtime target identity is carried through this module verbatim; the module
331
+ never adds a `sourceOwner`/`causedBy`-shaped field, preserving the
332
+ architectural rule that runtime identity never silently becomes source
333
+ ownership.
334
+
335
+ This layer is a programmatic export/correlation boundary only: `src/index.ts`
336
+ re-exports its full type/function surface, but there is no new CLI command,
337
+ no `src/artifacts/boundedAgentContext*` writer/reader, and no orchestrator or
338
+ lab code in this repository - those remain separate sibling-repository
339
+ responsibilities per the Milestone 6 ownership split in
340
+ `docs/PROJECT_MILESTONES.md`.
341
+
342
+ ## Retained v0.1 architecture constraints
343
+
344
+ v0.1 planning preserved these approved boundaries without treating module
187
345
  names from the historical run as mandatory:
188
346
 
189
347
  ```text
@@ -206,10 +364,11 @@ browser-level validation
206
364
 
207
365
  Use one browser engine implementation, keep browser logic out of presentation,
208
366
  avoid speculative plugin/multi-browser abstractions, and keep observed
209
- applications external. Before v0.6, versions must not add runtime coupling to
210
- sibling ecosystem projects. v0.6 may add only explicit bounded context,
211
- correlation/export, orchestrator-consumption, and lab-compatibility contracts
212
- while preserving independent ownership.
367
+ applications external. Versions before v0.6 did not add runtime coupling to
368
+ sibling ecosystem projects. v0.6 adds only explicit bounded context and
369
+ correlation/export contracts within this repository, preserving independent
370
+ ownership; orchestrator-consumption and lab-compatibility work are separate
371
+ sibling-repository deliverables, not part of this repository's architecture.
213
372
 
214
373
  The text/config-driven coding-agent workflow must be operational before the
215
374
  viewer and annotation layers are added. Those interfaces consume the same