yam-flow 0.1.4 → 0.1.6
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 +28 -0
- package/COMMANDS.md +4 -2
- package/README.md +8 -3
- package/dist/bin/yam.js +133 -14
- package/dist/lib/trust-kernel.d.ts +56 -1
- package/dist/lib/trust-kernel.js +149 -2
- package/package.json +2 -2
- package/references/trust-kernel.md +3 -0
- package/references/ueye-proof.md +79 -2
- package/references/ueye.md +44 -4
- package/skills/ueye/SKILL.md +29 -8
- package/src/bin/yam.ts +134 -12
- package/src/lib/trust-kernel.ts +208 -3
- package/templates/ueye-comparison.md +71 -0
- package/templates/ueye-review.md +71 -0
- package/yam.manifest.json +2 -2
package/dist/lib/trust-kernel.js
CHANGED
|
@@ -19,6 +19,11 @@ export function buildUeyeVisualProvenance(input = {}) {
|
|
|
19
19
|
source_hash: String(input.source_hash || 'unknown'),
|
|
20
20
|
reference_id: String(input.reference_id || ''),
|
|
21
21
|
screenshot_id: String(input.screenshot_id || ''),
|
|
22
|
+
provider_context: String(input.provider_context || 'not-recorded'),
|
|
23
|
+
provider_badge: String(input.provider_badge || 'not-recorded'),
|
|
24
|
+
execution_surface: String(input.execution_surface || 'not-recorded'),
|
|
25
|
+
app_surface: String(input.app_surface || 'not-recorded'),
|
|
26
|
+
browser_surface: String(input.browser_surface || 'not-recorded'),
|
|
22
27
|
local_only: Boolean(input.local_only),
|
|
23
28
|
redacted: Boolean(input.redacted),
|
|
24
29
|
operator_provided: Boolean(input.operator_provided),
|
|
@@ -26,6 +31,114 @@ export function buildUeyeVisualProvenance(input = {}) {
|
|
|
26
31
|
truth_status: truth
|
|
27
32
|
};
|
|
28
33
|
}
|
|
34
|
+
export function buildUeyeSurfaceContext(input = {}) {
|
|
35
|
+
return {
|
|
36
|
+
schema: 'yam.ueye-surface-context.v1',
|
|
37
|
+
provider_context: String(input.provider_context || 'not-recorded'),
|
|
38
|
+
provider_badge: String(input.provider_badge || input.provider_context || 'not-recorded'),
|
|
39
|
+
execution_surface: String(input.execution_surface || 'not-recorded'),
|
|
40
|
+
app_surface: String(input.app_surface || 'not-recorded'),
|
|
41
|
+
browser_surface: String(input.browser_surface || 'not-recorded'),
|
|
42
|
+
control_mode: String(input.control_mode || 'not-recorded'),
|
|
43
|
+
route: String(input.route || 'ueye'),
|
|
44
|
+
mode: String(input.mode || 'report'),
|
|
45
|
+
url: String(input.url || ''),
|
|
46
|
+
viewport: String(input.viewport || ''),
|
|
47
|
+
screenshot_id: String(input.screenshot_id || ''),
|
|
48
|
+
evidence_id: String(input.evidence_id || ''),
|
|
49
|
+
preserved_state: Boolean(input.preserved_state),
|
|
50
|
+
preserved_url: String(input.preserved_url || ''),
|
|
51
|
+
local_only: input.local_only !== undefined ? Boolean(input.local_only) : true,
|
|
52
|
+
truth_status: isTruthStatus(input.truth_status) ? input.truth_status : 'partial'
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
export function buildUeyeDesignCompletionGate(input = {}) {
|
|
56
|
+
const completionClaim = normalizeUeyeCompletionClaim(input.completion_claim);
|
|
57
|
+
const mode = String(input.mode || '').toLowerCase() === 'strict' || completionClaim === 'done' ? 'strict' : 'fast';
|
|
58
|
+
const designScore = numberOrNull(input.design_score);
|
|
59
|
+
const minDesignScore = numberOrNull(input.min_design_score) ?? 8;
|
|
60
|
+
const p0 = asList(input.p0);
|
|
61
|
+
const p1 = asList(input.p1);
|
|
62
|
+
const hasReference = Boolean(input.has_reference);
|
|
63
|
+
const hasImplementation = Boolean(input.has_implementation_screenshot);
|
|
64
|
+
const comparisonResult = String(input.comparison_result || 'not-verified');
|
|
65
|
+
const designQuality = String(input.design_quality || 'not-checked');
|
|
66
|
+
const blockedReason = String(input.blocked_reason || '');
|
|
67
|
+
const strictOrDone = mode === 'strict' || completionClaim === 'done';
|
|
68
|
+
const checks = [
|
|
69
|
+
designGateCheck('direction_lock', 'Design direction and target screen were locked before judging completion', Boolean(input.direction_locked) ? 'pass' : 'not_checked', strictOrDone, 'record the target screen and design direction before claiming done'),
|
|
70
|
+
designGateCheck('reference_read', 'Reference read proof exists when reference is used', !hasReference ? 'not_checked' : Boolean(input.reference_read) ? 'pass' : 'fail', hasReference && strictOrDone, 'record concrete reference observations before claiming reference-led work is done'),
|
|
71
|
+
designGateCheck('implementation_screenshot', 'Real implementation screenshot or screen evidence exists', hasImplementation ? 'pass' : 'fail', strictOrDone, 'capture or provide implementation screenshot before claiming done'),
|
|
72
|
+
designGateCheck('reference_comparison', 'Reference comparison is recorded when reference is used', !hasReference ? 'not_checked' : ['matched', 'similar', 'not-applicable'].includes(comparisonResult) ? 'pass' : 'fail', hasReference, 'compare against the reference or mark the difference as intentional before claiming done'),
|
|
73
|
+
designGateCheck('design_quality', 'Design quality result is pass', designQuality === 'pass' ? 'pass' : designQuality === 'needs-polish' ? 'warning' : 'fail', strictOrDone, 'resolve design quality issues or keep the result as needs-polish/partial'),
|
|
74
|
+
designGateCheck('p0_clear', 'No P0 visual blockers remain', p0.length ? 'fail' : 'pass', true, 'fix P0 blockers before any done claim'),
|
|
75
|
+
designGateCheck('p1_clear', 'No P1 major visual issues remain', p1.length ? 'fail' : 'pass', strictOrDone, 'fix or explicitly defer P1 issues before claiming done'),
|
|
76
|
+
designGateCheck('cta_affordance', 'Primary CTA and interaction affordances were checked', Boolean(input.cta_checked) ? 'pass' : 'not_checked', strictOrDone, 'check primary CTA clarity and interaction affordances before claiming done'),
|
|
77
|
+
designGateCheck('state_coverage', 'Primary UI states were checked', Boolean(input.states_checked) ? 'pass' : 'not_checked', strictOrDone, 'check default/loading/error/empty/disabled states or keep completion partial'),
|
|
78
|
+
designGateCheck('mobile_coverage', 'Mobile/responsive behavior was checked', Boolean(input.mobile_checked || input.responsive_checked) ? 'pass' : 'not_checked', strictOrDone, 'check mobile/responsive behavior before claiming done'),
|
|
79
|
+
designGateCheck('accessibility_visuals', 'Contrast/accessibility-relevant visuals were checked', Boolean(input.contrast_checked || input.accessibility_checked) ? 'pass' : 'not_checked', strictOrDone, 'check contrast/accessibility-relevant visuals before claiming done')
|
|
80
|
+
];
|
|
81
|
+
if (designScore !== null || strictOrDone) {
|
|
82
|
+
checks.push(designGateCheck('design_score', `Design score is at least ${minDesignScore}`, designScore !== null && designScore >= minDesignScore ? 'pass' : designScore === null ? 'not_checked' : 'fail', false, `record --design-score ${minDesignScore} or higher when using score-based completion`));
|
|
83
|
+
}
|
|
84
|
+
const blockers = [
|
|
85
|
+
...p0.map((item) => `P0: ${item}`),
|
|
86
|
+
...(blockedReason ? [blockedReason] : []),
|
|
87
|
+
...checks
|
|
88
|
+
.filter((check) => check.required && check.status !== 'pass')
|
|
89
|
+
.map((check) => `${check.id}: ${check.next_action}`)
|
|
90
|
+
];
|
|
91
|
+
const warnings = [
|
|
92
|
+
...p1.map((item) => `P1: ${item}`),
|
|
93
|
+
...checks
|
|
94
|
+
.filter((check) => !check.required && ['fail', 'warning', 'not_checked'].includes(check.status))
|
|
95
|
+
.map((check) => `${check.id}: ${check.next_action}`)
|
|
96
|
+
];
|
|
97
|
+
const ready = completionClaim === 'done' && blockers.length === 0;
|
|
98
|
+
const truth = blockers.some((item) => item.startsWith('P0:')) || blockedReason ? 'blocked'
|
|
99
|
+
: ready ? 'verified'
|
|
100
|
+
: strictOrDone ? 'partial'
|
|
101
|
+
: hasImplementation ? 'partial'
|
|
102
|
+
: 'assumed';
|
|
103
|
+
return {
|
|
104
|
+
schema: 'yam.ueye-design-completion-gate.v1',
|
|
105
|
+
mode,
|
|
106
|
+
completion_claim: completionClaim,
|
|
107
|
+
ready_to_claim_done: ready,
|
|
108
|
+
design_score: designScore,
|
|
109
|
+
min_design_score: minDesignScore,
|
|
110
|
+
checks,
|
|
111
|
+
p0,
|
|
112
|
+
p1,
|
|
113
|
+
warnings,
|
|
114
|
+
blockers,
|
|
115
|
+
next_action: blockers[0] || (ready ? 'done claim is supported by the recorded design gate' : warnings[0] || 'keep the Ueye result as draft or needs-polish until a done claim is needed'),
|
|
116
|
+
truth_status: truth
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
function normalizeUeyeCompletionClaim(value = '') {
|
|
120
|
+
const text = String(value || '').toLowerCase();
|
|
121
|
+
if (text === 'done' || text === 'complete' || text === 'completed')
|
|
122
|
+
return 'done';
|
|
123
|
+
if (text === 'needs-polish' || text === 'needs_polish' || text === 'polish')
|
|
124
|
+
return 'needs-polish';
|
|
125
|
+
return 'draft';
|
|
126
|
+
}
|
|
127
|
+
function designGateCheck(id, label, status, required, nextAction) {
|
|
128
|
+
return {
|
|
129
|
+
id,
|
|
130
|
+
label,
|
|
131
|
+
status,
|
|
132
|
+
required,
|
|
133
|
+
next_action: nextAction
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
function numberOrNull(value = null) {
|
|
137
|
+
if (value === undefined || value === null || value === '')
|
|
138
|
+
return null;
|
|
139
|
+
const number = Number(value);
|
|
140
|
+
return Number.isFinite(number) ? number : null;
|
|
141
|
+
}
|
|
29
142
|
export function buildRollbackHint(input = {}) {
|
|
30
143
|
return {
|
|
31
144
|
schema: 'yam.rollback-hint.v1',
|
|
@@ -78,15 +191,30 @@ export function buildUeyeRunReport(input = {}) {
|
|
|
78
191
|
: comparisonResult === 'matched' && hasImplementation ? 'verified'
|
|
79
192
|
: hasImplementation ? 'partial'
|
|
80
193
|
: 'partial';
|
|
194
|
+
const gate = buildUeyeDesignCompletionGate({
|
|
195
|
+
...input.design_completion_gate,
|
|
196
|
+
has_reference: references.length > 0,
|
|
197
|
+
has_implementation_screenshot: hasImplementation,
|
|
198
|
+
comparison_result: comparisonResult,
|
|
199
|
+
design_quality: String(input.design_quality || 'not-checked'),
|
|
200
|
+
blocked_reason: blockedReason
|
|
201
|
+
});
|
|
202
|
+
const shouldApplyDesignGate = gate.mode === 'strict' || gate.completion_claim === 'done' || gate.blockers.length > 0;
|
|
203
|
+
const finalTruth = shouldApplyDesignGate ? weakestTruth(derivedTruth, gate.truth_status) : derivedTruth;
|
|
81
204
|
return {
|
|
82
205
|
schema: 'yam.ueye-run-report.v1',
|
|
83
206
|
reference_sources: references,
|
|
84
207
|
implementation_sources: implementations,
|
|
208
|
+
surface_context: buildUeyeSurfaceContext({
|
|
209
|
+
...input.surface_context,
|
|
210
|
+
truth_status: isTruthStatus(input.surface_context?.truth_status) ? input.surface_context?.truth_status : finalTruth
|
|
211
|
+
}),
|
|
212
|
+
design_completion_gate: gate,
|
|
85
213
|
comparison_result: comparisonResult,
|
|
86
214
|
design_quality: String(input.design_quality || 'not-checked'),
|
|
87
215
|
blocked_reason: blockedReason,
|
|
88
|
-
next_action: String(input.next_action || (
|
|
89
|
-
truth_status: isTruthStatus(input.truth_status) ? input.truth_status :
|
|
216
|
+
next_action: String(input.next_action || gate.blockers[0] || (finalTruth === 'verified' ? 'no action required' : 'capture or provide implementation screenshot before claiming verified visual status')),
|
|
217
|
+
truth_status: isTruthStatus(input.truth_status) ? input.truth_status : finalTruth
|
|
90
218
|
};
|
|
91
219
|
}
|
|
92
220
|
export function buildMediaGenerationProof(input = {}) {
|
|
@@ -199,6 +327,9 @@ export function classifyEvidenceTruth(summary = {}, options = {}) {
|
|
|
199
327
|
for (const media of asList(summary.mediaProof)) {
|
|
200
328
|
rows.push(evidenceRow('evidence', media, readStructuredTruth(media, 'partial')));
|
|
201
329
|
}
|
|
330
|
+
for (const designCompletion of asList(summary.designCompletion)) {
|
|
331
|
+
rows.push(evidenceRow('visual', designCompletion, readStructuredTruth(designCompletion, 'partial')));
|
|
332
|
+
}
|
|
202
333
|
for (const runtime of asList(summary.runtime)) {
|
|
203
334
|
rows.push(evidenceRow('runtime', runtime, classifyRuntimeEvidence(runtime, options)));
|
|
204
335
|
}
|
|
@@ -232,6 +363,15 @@ export function applyProofTruthCaps(summary = {}, options = {}) {
|
|
|
232
363
|
cappedTruth = weakestTruth(cappedTruth, 'partial');
|
|
233
364
|
unverified.push('real_visual_evidence_missing');
|
|
234
365
|
}
|
|
366
|
+
const designCompletionTruth = designCompletionCap(summary.designCompletion);
|
|
367
|
+
if (designCompletionTruth) {
|
|
368
|
+
cappedTruth = weakestTruth(cappedTruth, designCompletionTruth);
|
|
369
|
+
if (designCompletionTruth === 'blocked')
|
|
370
|
+
blockers.push('ueye_design_completion_blocked');
|
|
371
|
+
if (!['verified', 'proven'].includes(designCompletionTruth)) {
|
|
372
|
+
unverified.push('ueye_design_completion_not_verified');
|
|
373
|
+
}
|
|
374
|
+
}
|
|
235
375
|
if (requested !== cappedTruth) {
|
|
236
376
|
caps.push(`requested ${requested} capped to ${cappedTruth} by evidence`);
|
|
237
377
|
}
|
|
@@ -289,6 +429,7 @@ export function buildYamCompletionProof(summary = {}, options = {}) {
|
|
|
289
429
|
rollbackHint: asList(summary.rollbackHint),
|
|
290
430
|
runtimeBackendEvidence: asList(summary.runtimeBackendEvidence),
|
|
291
431
|
mediaProof: asList(summary.mediaProof),
|
|
432
|
+
designCompletion: asList(summary.designCompletion),
|
|
292
433
|
cleanup: summary.cleanup || '',
|
|
293
434
|
changed: asList(summary.changed),
|
|
294
435
|
skipped: asList(summary.skipped),
|
|
@@ -364,6 +505,12 @@ function readStructuredTruth(value = '', fallback = 'partial') {
|
|
|
364
505
|
return fallback;
|
|
365
506
|
}
|
|
366
507
|
}
|
|
508
|
+
function designCompletionCap(value = '') {
|
|
509
|
+
const items = asList(value);
|
|
510
|
+
if (!items.length)
|
|
511
|
+
return null;
|
|
512
|
+
return items.reduce((weakest, item) => weakestTruth(weakest, readStructuredTruth(item, 'partial')), 'proven');
|
|
513
|
+
}
|
|
367
514
|
function strongestSupportedTruth(rows = []) {
|
|
368
515
|
if (rows.some((row) => row.truth === 'blocked'))
|
|
369
516
|
return 'blocked';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "yam-flow",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "Progressive proof-first agent flow: start fast, deepen deliberately, stay honest by design.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "0kim0bos",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"node": ">=18"
|
|
17
17
|
},
|
|
18
18
|
"bin": {
|
|
19
|
-
"yam": "
|
|
19
|
+
"yam": "dist/bin/yam.js"
|
|
20
20
|
},
|
|
21
21
|
"types": "dist/lib/trust-kernel.d.ts",
|
|
22
22
|
"exports": {
|
|
@@ -11,6 +11,7 @@ This is the small trust kernel that keeps `yam` honest without turning every tas
|
|
|
11
11
|
- fake versus real evidence distinction
|
|
12
12
|
- runtime truth matrix idea
|
|
13
13
|
- visual evidence caps
|
|
14
|
+
- Ueye design completion gate
|
|
14
15
|
- DB/Supabase destructive-signal detection
|
|
15
16
|
|
|
16
17
|
## Rejected
|
|
@@ -38,6 +39,7 @@ The module provides:
|
|
|
38
39
|
- fake/real policy
|
|
39
40
|
- runtime truth matrix
|
|
40
41
|
- completion proof object creation
|
|
42
|
+
- Ueye design completion gate creation
|
|
41
43
|
|
|
42
44
|
## Policy
|
|
43
45
|
|
|
@@ -51,5 +53,6 @@ For example:
|
|
|
51
53
|
- Mock/fixture evidence cannot become real runtime `proven`.
|
|
52
54
|
- Required runtime evidence that is missing becomes `real_required_missing`.
|
|
53
55
|
- Cleanup claims require cleanup evidence.
|
|
56
|
+
- Ueye `done` claims require a passing design completion gate or stay capped at `partial` or `blocked`.
|
|
54
57
|
|
|
55
58
|
This keeps the trust layer progressive and route-scoped.
|
package/references/ueye-proof.md
CHANGED
|
@@ -26,12 +26,12 @@ Ueye is one route. It should not split into separate lite/deep skills. Use these
|
|
|
26
26
|
```bash
|
|
27
27
|
yam ueye capture --url http://localhost:3000 --out .yam/screens/home.png
|
|
28
28
|
yam ueye compare --reference ./reference.png --actual .yam/screens/home.png --json
|
|
29
|
-
yam ueye report --reference ./reference.png --actual .yam/screens/home.png --design-quality
|
|
29
|
+
yam ueye report --reference ./reference.png --actual .yam/screens/home.png --completion-claim done --design-quality pass --direction-locked --reference-read --states-checked --mobile-checked --contrast-checked --cta-checked --provider-context local --execution-surface in-app-browser --browser-surface in-app-browser --preserved-state --json
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
- `capture` uses a project-local capture backend when present, then reports `blocked` instead of installing dependencies or pretending a screenshot exists.
|
|
33
33
|
- `compare` is local-only and dependency-free. It records hashes, dimensions, comparison result, and visual provenance. Different screenshots stay `partial`; exact file matches can be `verified`.
|
|
34
|
-
- `report` records the Ueye run as reference sources, implementation sources, comparison result, design quality, blocked reason, next action, and truth status.
|
|
34
|
+
- `report` records the Ueye run as reference sources, implementation sources, comparison result, surface context, design quality, blocked reason, next action, and truth status.
|
|
35
35
|
- `report` may include continuity fields when a previous review or screenshot is being rechecked.
|
|
36
36
|
- Without capture or user-provided screenshots, report implementation/source review separately from visual verification and cap the visual claim.
|
|
37
37
|
|
|
@@ -93,6 +93,11 @@ Record these fields when a reference or screenshot materially affects the claim:
|
|
|
93
93
|
- `source_hash`
|
|
94
94
|
- `reference_id`
|
|
95
95
|
- `screenshot_id`
|
|
96
|
+
- `provider_context`
|
|
97
|
+
- `provider_badge`
|
|
98
|
+
- `execution_surface`
|
|
99
|
+
- `app_surface`
|
|
100
|
+
- `browser_surface`
|
|
96
101
|
- `viewport`
|
|
97
102
|
- `state`
|
|
98
103
|
- `local_only`
|
|
@@ -103,6 +108,28 @@ Record these fields when a reference or screenshot materially affects the claim:
|
|
|
103
108
|
|
|
104
109
|
Use `unknown` for missing hashes and `not-verified` for comparisons that were not actually rechecked. Do not upgrade a visual claim only because a reference was supplied.
|
|
105
110
|
|
|
111
|
+
### Surface Context
|
|
112
|
+
|
|
113
|
+
Purpose: preserve where and how a visual claim was observed without turning Ueye into an always-on capture gate.
|
|
114
|
+
|
|
115
|
+
Record these fields when they affect the visual claim:
|
|
116
|
+
|
|
117
|
+
- `provider_context`
|
|
118
|
+
- `provider_badge`
|
|
119
|
+
- `execution_surface`
|
|
120
|
+
- `app_surface`
|
|
121
|
+
- `browser_surface`
|
|
122
|
+
- `control_mode`
|
|
123
|
+
- `url`
|
|
124
|
+
- `viewport`
|
|
125
|
+
- `screenshot_id`
|
|
126
|
+
- `evidence_id`
|
|
127
|
+
- `preserved_state`
|
|
128
|
+
- `preserved_url`
|
|
129
|
+
- `truth_status`
|
|
130
|
+
|
|
131
|
+
Use `not-recorded` when the field was not observed. Prefer `partial` over `verified` when surface context exists but no actual implementation screenshot was captured or supplied.
|
|
132
|
+
|
|
106
133
|
### Reference Read Proof
|
|
107
134
|
|
|
108
135
|
Purpose: separate reading the reference from judging the implementation.
|
|
@@ -163,6 +190,55 @@ Dimensions:
|
|
|
163
190
|
Report findings as P0-P3. Keep P2/P3 short unless the user requested a full polish pass.
|
|
164
191
|
For each relevant design dimension, use `pass`, `needs-polish`, or `fails`.
|
|
165
192
|
|
|
193
|
+
### Design Completion Gate
|
|
194
|
+
|
|
195
|
+
Purpose: prevent Ueye from declaring visual work complete before the design evidence supports that claim.
|
|
196
|
+
|
|
197
|
+
Use when the output says the UI is done, complete, polished, final, or verified.
|
|
198
|
+
|
|
199
|
+
Minimum fields:
|
|
200
|
+
|
|
201
|
+
- `completion_claim`: draft / needs-polish / done
|
|
202
|
+
- `mode`: fast / strict
|
|
203
|
+
- `ready_to_claim_done`
|
|
204
|
+
- `design_score`, when used
|
|
205
|
+
- `min_design_score`
|
|
206
|
+
- `checks`
|
|
207
|
+
- `p0`
|
|
208
|
+
- `p1`
|
|
209
|
+
- `warnings`
|
|
210
|
+
- `blockers`
|
|
211
|
+
- `next_action`
|
|
212
|
+
- `truth_status`
|
|
213
|
+
|
|
214
|
+
Required for a done claim when relevant:
|
|
215
|
+
|
|
216
|
+
- direction locked
|
|
217
|
+
- reference read proof for reference-led work
|
|
218
|
+
- implementation screenshot or source-screen evidence
|
|
219
|
+
- reference comparison for reference-led work
|
|
220
|
+
- design quality pass
|
|
221
|
+
- no P0 blockers
|
|
222
|
+
- no unresolved P1 issues unless explicitly deferred
|
|
223
|
+
- CTA affordance checked
|
|
224
|
+
- primary states checked
|
|
225
|
+
- mobile/responsive behavior checked
|
|
226
|
+
- contrast/accessibility-relevant visuals checked
|
|
227
|
+
|
|
228
|
+
Example:
|
|
229
|
+
|
|
230
|
+
```bash
|
|
231
|
+
yam ueye report --reference ./reference.png --actual .yam/screens/home.png --completion-claim done --design-quality pass --direction-locked --reference-read --states-checked --mobile-checked --contrast-checked --cta-checked --json
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
Attach to proof when needed:
|
|
235
|
+
|
|
236
|
+
```bash
|
|
237
|
+
yam proof --route ueye --truth verified --visual "implementation screenshot evidence recorded" --design-completion '{"completion_claim":"done","has_implementation_screenshot":true,"design_quality":"pass","states_checked":true,"mobile_checked":true,"contrast_checked":true,"cta_checked":true,"direction_locked":true,"truth_status":"verified"}'
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
The design completion gate is a completion judgment. Keep actual source-screen proof in visual evidence, visual provenance, or a Ueye run report. Do not use self-reported gate fields to pretend a missing screenshot was captured.
|
|
241
|
+
|
|
166
242
|
### Review Continuity And Comparison Report
|
|
167
243
|
|
|
168
244
|
Use this when a Ueye task continues a previous visual review, rechecks a fix, or compares two review runs.
|
|
@@ -195,3 +271,4 @@ Do not claim continuity from memory alone. Link it to a previous report, screens
|
|
|
195
271
|
- Reference-only evidence can support direction, not implementation proof.
|
|
196
272
|
- Generated-only evidence can support ideation or annotation, not implemented-screen verification.
|
|
197
273
|
- Missing screenshots, unavailable browser, or text-only review should cap the result at `partial`, `blocked`, or `assumed`.
|
|
274
|
+
- A done claim with a missing or failing design completion gate should cap the result at `partial` or `blocked`.
|
package/references/ueye.md
CHANGED
|
@@ -66,6 +66,7 @@ Use these when the task depends on visual truth, reference matching, or design q
|
|
|
66
66
|
3. Reference vs Implementation Matrix.
|
|
67
67
|
4. Design Quality Review.
|
|
68
68
|
5. Review Continuity and Comparison Report.
|
|
69
|
+
6. Design Completion Gate.
|
|
69
70
|
|
|
70
71
|
Default bound:
|
|
71
72
|
|
|
@@ -146,6 +147,27 @@ Review dimensions:
|
|
|
146
147
|
For each relevant dimension, record `pass`, `needs-polish`, or `fails`.
|
|
147
148
|
Keep actionable findings in P0-P3 order. Prefer fixing P0/P1 and cheap local P2 issues before broad polish.
|
|
148
149
|
|
|
150
|
+
### Design Completion Gate
|
|
151
|
+
|
|
152
|
+
Use before claiming a Ueye implementation or serious review is done. This is the design-side completion check, not a separate route.
|
|
153
|
+
|
|
154
|
+
Record:
|
|
155
|
+
|
|
156
|
+
- `completion_claim`: draft, needs-polish, or done.
|
|
157
|
+
- `mode`: fast or strict.
|
|
158
|
+
- `design_score`, when score-based completion is useful.
|
|
159
|
+
- P0 and P1 open findings.
|
|
160
|
+
- Whether direction, reference read proof, implementation evidence, comparison, design quality, CTA affordance, state coverage, mobile/responsive behavior, and contrast/accessibility visuals were checked.
|
|
161
|
+
- blockers, warnings, next action, and truth status.
|
|
162
|
+
|
|
163
|
+
Gate behavior:
|
|
164
|
+
|
|
165
|
+
- Draft and needs-polish can stay fast.
|
|
166
|
+
- `done` automatically behaves as strict.
|
|
167
|
+
- P0 or blocked reason should return blocked.
|
|
168
|
+
- Missing required checks for a done claim should cap truth at partial.
|
|
169
|
+
- Only claim done when the gate says `ready_to_claim_done: true`.
|
|
170
|
+
|
|
149
171
|
### Review Continuity and Comparison Report
|
|
150
172
|
|
|
151
173
|
Use when a screen has more than one visual pass, a reference needs follow-up, or a previous Ueye report should stay connected to the next one.
|
|
@@ -164,7 +186,23 @@ Record:
|
|
|
164
186
|
- next visual action.
|
|
165
187
|
- truth status.
|
|
166
188
|
|
|
167
|
-
Use `yam ueye report --previous-report previous.json --review-session-id current-pass --similar "..." --different "..." --missing "..." --json` when you need a compact continuity record.
|
|
189
|
+
Use `yam ueye report --previous-report previous.json --review-session-id current-pass --provider-context local --execution-surface in-app-browser --browser-surface in-app-browser --similar "..." --different "..." --missing "..." --json` when you need a compact continuity record.
|
|
190
|
+
|
|
191
|
+
### Surface Context
|
|
192
|
+
|
|
193
|
+
Use surface context when a Ueye claim depends on preserving the current app/browser state or explaining where visual evidence came from.
|
|
194
|
+
|
|
195
|
+
Fields:
|
|
196
|
+
|
|
197
|
+
- provider context and badge.
|
|
198
|
+
- execution surface.
|
|
199
|
+
- app surface.
|
|
200
|
+
- browser surface.
|
|
201
|
+
- control mode.
|
|
202
|
+
- preserved URL/state.
|
|
203
|
+
- evidence id.
|
|
204
|
+
|
|
205
|
+
Keep this metadata descriptive. It should support honest visual claims, not force a heavy browser workflow for every Ueye run.
|
|
168
206
|
|
|
169
207
|
## P0-P3 Ledger
|
|
170
208
|
|
|
@@ -183,9 +221,10 @@ Use `yam ueye report --previous-report previous.json --review-session-id current
|
|
|
183
221
|
6. Screenshot/browser recheck when feasible.
|
|
184
222
|
7. Reference vs Implementation Matrix when reference fidelity matters.
|
|
185
223
|
8. Design Quality Review.
|
|
186
|
-
9.
|
|
187
|
-
10.
|
|
188
|
-
11.
|
|
224
|
+
9. Design Completion Gate before any done claim.
|
|
225
|
+
10. Review Continuity and Comparison Report when the work spans multiple passes.
|
|
226
|
+
11. P0/P1 closeout.
|
|
227
|
+
12. Truth status.
|
|
189
228
|
|
|
190
229
|
## Truth Caps
|
|
191
230
|
|
|
@@ -194,3 +233,4 @@ Use `yam ueye report --previous-report previous.json --review-session-id current
|
|
|
194
233
|
- Blocked: requested visual claim cannot be inspected.
|
|
195
234
|
- Assumed: implementation follows code patterns but visual result was not observed.
|
|
196
235
|
- Reference-only or generated-only evidence cannot upgrade a result to full visual verification.
|
|
236
|
+
- A done claim without a passing design completion gate cannot upgrade beyond partial or blocked.
|
package/skills/ueye/SKILL.md
CHANGED
|
@@ -38,8 +38,12 @@ Do not use for:
|
|
|
38
38
|
- Keep Ueye as one route: start fast, then opt into `yam ueye capture` and `yam ueye compare` only when a `verified` visual claim needs real screen evidence.
|
|
39
39
|
- Use `yam ueye report` when reference, implementation screenshot, comparison result, design quality, and next action should be recorded as one compact run report.
|
|
40
40
|
- For follow-up visual reviews, keep continuity explicit: previous report/source, current report/source, comparison delta, resolved findings, new findings, and next action.
|
|
41
|
+
- Record surface context when it matters: provider context, provider badge, execution surface, app surface, browser surface, control mode, preserved URL/state, and evidence id.
|
|
41
42
|
- Generated media can guide direction, but it cannot verify the implemented screen without implementation screenshot evidence.
|
|
42
43
|
- Prefer the in-app browser for interactive visual checks. Do not switch to a profile-dependent browser unless the user explicitly asks or the task requires existing cookies, sessions, extensions, or profile state.
|
|
44
|
+
- Ueye owns the design completion gate. Do not rely on a separate code-risk route to catch sloppy visual completion.
|
|
45
|
+
- Draft or needs-polish work may stay fast; a `done` claim requires recorded design gate evidence.
|
|
46
|
+
- Do not claim a Ueye result is done when implementation evidence, design quality, P0/P1 status, state coverage, mobile/responsive behavior, contrast/accessibility visuals, CTA affordance, or reference-read/comparison evidence is missing where relevant.
|
|
43
47
|
|
|
44
48
|
## Workflow
|
|
45
49
|
|
|
@@ -61,7 +65,7 @@ Do not use for:
|
|
|
61
65
|
- Do not silently use a profile-dependent browser as a fallback. If the in-app browser cannot capture or inspect, report the visual cap as `partial` or `blocked`.
|
|
62
66
|
- Use `yam ueye capture --url URL --out path.png` when a project-local capture backend is available and the claim needs real browser evidence.
|
|
63
67
|
- Use `yam ueye compare --reference ref.png --actual shot.png` when reference fidelity needs a proof-ready local comparison record.
|
|
64
|
-
- Use `yam ueye report --reference ref.png --actual shot.png --design-quality needs-polish --json` to preserve the run-level visual provenance and next action.
|
|
68
|
+
- Use `yam ueye report --reference ref.png --actual shot.png --design-quality needs-polish --provider-context local --execution-surface in-app-browser --browser-surface in-app-browser --json` to preserve the run-level visual provenance, surface context, and next action.
|
|
65
69
|
- When continuing a prior review, include previous/current report or screenshot identifiers and mark the comparison as improved, regressed, unchanged, or not-verified.
|
|
66
70
|
9. Compare reference and implementation when reference fidelity was requested:
|
|
67
71
|
- matched, similar, different, not-applicable, or not-verified.
|
|
@@ -77,8 +81,17 @@ Do not use for:
|
|
|
77
81
|
- accessibility
|
|
78
82
|
- brand or mood fit
|
|
79
83
|
- mark each relevant dimension as pass, needs-polish, or fails.
|
|
80
|
-
11.
|
|
81
|
-
|
|
84
|
+
11. Run the Design Completion Gate before any "done" claim:
|
|
85
|
+
- direction locked
|
|
86
|
+
- reference read proof exists when reference-led
|
|
87
|
+
- implementation screenshot or source-screen evidence exists
|
|
88
|
+
- reference comparison is recorded when reference-led
|
|
89
|
+
- design quality is pass
|
|
90
|
+
- P0 is empty
|
|
91
|
+
- P1 is fixed or explicitly deferred
|
|
92
|
+
- CTA, states, mobile/responsive behavior, and contrast/accessibility visuals were checked
|
|
93
|
+
12. Produce a P0-P3 visual issue ledger and fix path.
|
|
94
|
+
13. Recheck changed/high-risk screens after fixes when feasible.
|
|
82
95
|
|
|
83
96
|
## Required Ueye Artifacts
|
|
84
97
|
|
|
@@ -91,18 +104,25 @@ Use these artifacts for reference-led implementation or serious visual review. K
|
|
|
91
104
|
2. Visual Provenance:
|
|
92
105
|
- source kind, path, hash, reference id, screenshot id, redaction/locality flags, operator-provided flag, comparison result, and truth status.
|
|
93
106
|
- use this to prove the route from reference reading to implementation recheck.
|
|
94
|
-
3.
|
|
107
|
+
3. Surface Context:
|
|
108
|
+
- provider context, provider badge, execution surface, app surface, browser surface, control mode, preserved URL/state, evidence id, and truth status.
|
|
109
|
+
- use this to explain where and how visual evidence was observed without forcing capture for every Ueye run.
|
|
110
|
+
4. Reference Read Proof:
|
|
95
111
|
- concrete observations from the reference before implementation.
|
|
96
112
|
- no implementation claim should depend on an unrecorded reference observation.
|
|
97
|
-
|
|
113
|
+
5. Reference vs Implementation Matrix:
|
|
98
114
|
- compare the implemented result against the reference by aspect.
|
|
99
115
|
- record matched, similar, different, not-applicable, or not-verified.
|
|
100
|
-
|
|
116
|
+
6. Design Quality Review:
|
|
101
117
|
- judge whether the result is good UI/UX/design after reference comparison.
|
|
102
118
|
- use pass, needs-polish, or fails for each relevant design dimension.
|
|
103
|
-
|
|
119
|
+
7. Review Continuity and Comparison Report, when this is a follow-up review:
|
|
104
120
|
- record previous source/report, current source/report, comparison delta, resolved findings, new findings, still-open findings, truth status, and next action.
|
|
105
|
-
|
|
121
|
+
8. Design Completion Gate, when implementation or review is claimed done:
|
|
122
|
+
- record completion claim, design score when used, P0/P1 status, gate checks, blockers, warnings, next action, and truth status.
|
|
123
|
+
- use `yam ueye report --completion-claim done --design-quality pass --direction-locked --states-checked --mobile-checked --contrast-checked --cta-checked --json` when a compact proof-ready gate is needed.
|
|
124
|
+
- if the gate is partial or blocked, report the Ueye result as partial or blocked instead of complete.
|
|
125
|
+
9. Media Generation Proof, when generated images are part of the task:
|
|
106
126
|
- record whether generation was requested, attempted, blocked, or produced an output.
|
|
107
127
|
- use `yam media proof --requested --attempted --output path.png --wait-loop --json` when a generated image materially affects the design direction.
|
|
108
128
|
- never use generated media proof as a substitute for implemented screen evidence.
|
|
@@ -116,6 +136,7 @@ Use these artifacts for reference-led implementation or serious visual review. K
|
|
|
116
136
|
- Inspect 1-3 primary images by default; expand only for P0/P1 risk, responsive breakage, or user-requested deep visual QA.
|
|
117
137
|
- Keep source-screen inventory to the 5 most important rows by default.
|
|
118
138
|
- Screenshot unavailable: cap the result at `partial` or `blocked`.
|
|
139
|
+
- Completion gate missing for a `done` claim: cap the result at `partial` or `blocked`.
|
|
119
140
|
- Text-only review: cap the result at `partial`.
|
|
120
141
|
- Mock or invented screenshots: cap the result at `partial` and mark the source.
|
|
121
142
|
- Browser unavailable but source files reviewed: report implementation verification separately from visual verification.
|