yam-flow 0.1.2 → 0.1.4
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 +36 -0
- package/COMMANDS.md +31 -0
- package/README.md +30 -1
- package/ROADMAP.md +5 -5
- package/dist/bin/yam.js +855 -23
- package/dist/lib/trust-kernel.d.ts +41 -0
- package/dist/lib/trust-kernel.js +117 -0
- package/package.json +3 -2
- package/references/current-docs.md +3 -3
- package/references/doctor-scan.md +19 -0
- package/references/final-report.md +21 -0
- package/references/hook-lite.md +1 -1
- package/references/memory.md +1 -1
- package/references/mission.md +25 -0
- package/references/runtime-orchestration.md +25 -1
- package/references/tool-trust-layer.md +100 -6
- package/references/ueye-proof.md +54 -5
- package/references/ueye.md +24 -2
- package/skills/question/SKILL.md +1 -1
- package/skills/ueye/SKILL.md +16 -4
- package/src/bin/yam.ts +846 -21
- package/src/lib/trust-kernel.ts +147 -0
- package/templates/mission-plan.md +12 -0
- package/templates/runtime-proof.md +41 -2
- package/templates/tuning-log.md +11 -1
- package/templates/ueye-comparison.md +44 -0
- package/templates/ueye-review.md +44 -0
- package/templates/yam.project.md +2 -2
|
@@ -3,6 +3,8 @@ export type TruthStatus = (typeof TRUTH_STATUSES)[number];
|
|
|
3
3
|
export type SafetyLevel = 'danger' | 'warning';
|
|
4
4
|
export type EvidenceKind = 'command' | 'evidence' | 'visual' | 'runtime' | 'skipped' | 'blocked' | 'assumption' | 'cleanup' | 'none';
|
|
5
5
|
export type RuntimeSubsystem = 'real_runtime' | 'tmux_physical' | 'process_cleanup' | 'browser_visual' | 'db_safety';
|
|
6
|
+
export type RuntimeBackend = 'none' | 'in_app_browser' | 'playwright' | 'terminal' | 'tmux' | 'zellij' | 'unknown';
|
|
7
|
+
export type RuntimeClaim = 'not_started' | 'started' | 'observed' | 'stopped' | 'cleanup_verified' | 'blocked' | 'unknown';
|
|
6
8
|
export interface SafetyHit {
|
|
7
9
|
level: SafetyLevel;
|
|
8
10
|
reason: string;
|
|
@@ -58,6 +60,38 @@ export interface MissionPatchEnvelope {
|
|
|
58
60
|
rollback_hint: RollbackHint;
|
|
59
61
|
truth_status: TruthStatus;
|
|
60
62
|
}
|
|
63
|
+
export interface RuntimeBackendEvidence {
|
|
64
|
+
schema: 'yam.runtime-backend-evidence.v1';
|
|
65
|
+
backend: RuntimeBackend;
|
|
66
|
+
claim: RuntimeClaim;
|
|
67
|
+
evidence_id: string;
|
|
68
|
+
command: string;
|
|
69
|
+
cleanup_checked: boolean;
|
|
70
|
+
note: string;
|
|
71
|
+
truth_status: TruthStatus;
|
|
72
|
+
}
|
|
73
|
+
export interface UeyeRunReport {
|
|
74
|
+
schema: 'yam.ueye-run-report.v1';
|
|
75
|
+
reference_sources: UeyeVisualProvenance[];
|
|
76
|
+
implementation_sources: UeyeVisualProvenance[];
|
|
77
|
+
comparison_result: string;
|
|
78
|
+
design_quality: string;
|
|
79
|
+
blocked_reason: string;
|
|
80
|
+
next_action: string;
|
|
81
|
+
truth_status: TruthStatus;
|
|
82
|
+
}
|
|
83
|
+
export interface MediaGenerationProof {
|
|
84
|
+
schema: 'yam.media-generation-proof.v1';
|
|
85
|
+
tool_name: string;
|
|
86
|
+
generation_requested: boolean;
|
|
87
|
+
generation_attempted: boolean;
|
|
88
|
+
output_path: string;
|
|
89
|
+
output_hash: string;
|
|
90
|
+
wait_loop_checked: boolean;
|
|
91
|
+
blocked_reason: string;
|
|
92
|
+
next_action: string;
|
|
93
|
+
truth_status: TruthStatus;
|
|
94
|
+
}
|
|
61
95
|
export interface FakeRealPolicyResult {
|
|
62
96
|
schema: 'yam.fake-real-policy.v1';
|
|
63
97
|
ok: boolean;
|
|
@@ -84,6 +118,8 @@ export interface ProofSummary {
|
|
|
84
118
|
visualProvenance?: unknown;
|
|
85
119
|
missionEnvelope?: unknown;
|
|
86
120
|
rollbackHint?: unknown;
|
|
121
|
+
runtimeBackendEvidence?: unknown;
|
|
122
|
+
mediaProof?: unknown;
|
|
87
123
|
}
|
|
88
124
|
export interface ProofOptions {
|
|
89
125
|
requireRealRuntime?: boolean;
|
|
@@ -114,6 +150,8 @@ export interface YamCompletionProof {
|
|
|
114
150
|
visualProvenance: string[];
|
|
115
151
|
missionEnvelope: string[];
|
|
116
152
|
rollbackHint: string[];
|
|
153
|
+
runtimeBackendEvidence: string[];
|
|
154
|
+
mediaProof: string[];
|
|
117
155
|
cleanup: unknown;
|
|
118
156
|
changed: string[];
|
|
119
157
|
skipped: string[];
|
|
@@ -128,6 +166,9 @@ export interface YamCompletionProof {
|
|
|
128
166
|
export declare function buildUeyeVisualProvenance(input?: Partial<UeyeVisualProvenance>): UeyeVisualProvenance;
|
|
129
167
|
export declare function buildRollbackHint(input?: Partial<RollbackHint>): RollbackHint;
|
|
130
168
|
export declare function buildMissionPatchEnvelope(input?: Partial<MissionPatchEnvelope>): MissionPatchEnvelope;
|
|
169
|
+
export declare function buildRuntimeBackendEvidence(input?: Partial<RuntimeBackendEvidence>): RuntimeBackendEvidence;
|
|
170
|
+
export declare function buildUeyeRunReport(input?: Partial<UeyeRunReport>): UeyeRunReport;
|
|
171
|
+
export declare function buildMediaGenerationProof(input?: Partial<MediaGenerationProof>): MediaGenerationProof;
|
|
131
172
|
export declare function isTruthStatus(value?: unknown): value is TruthStatus;
|
|
132
173
|
export declare function weakestTruth(...statuses: unknown[]): TruthStatus;
|
|
133
174
|
export declare function detectDbSafetyText(text?: unknown): DbSafetyScanResult;
|
package/dist/lib/trust-kernel.js
CHANGED
|
@@ -49,6 +49,70 @@ export function buildMissionPatchEnvelope(input = {}) {
|
|
|
49
49
|
truth_status: isTruthStatus(input.truth_status) ? input.truth_status : 'partial'
|
|
50
50
|
};
|
|
51
51
|
}
|
|
52
|
+
export function buildRuntimeBackendEvidence(input = {}) {
|
|
53
|
+
const backend = normalizeRuntimeBackend(input.backend);
|
|
54
|
+
const claim = normalizeRuntimeClaim(input.claim);
|
|
55
|
+
return {
|
|
56
|
+
schema: 'yam.runtime-backend-evidence.v1',
|
|
57
|
+
backend,
|
|
58
|
+
claim,
|
|
59
|
+
evidence_id: String(input.evidence_id || ''),
|
|
60
|
+
command: String(input.command || ''),
|
|
61
|
+
cleanup_checked: Boolean(input.cleanup_checked),
|
|
62
|
+
note: String(input.note || ''),
|
|
63
|
+
truth_status: isTruthStatus(input.truth_status) ? input.truth_status : runtimeBackendTruth(backend, claim, Boolean(input.cleanup_checked))
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
export function buildUeyeRunReport(input = {}) {
|
|
67
|
+
const references = Array.isArray(input.reference_sources)
|
|
68
|
+
? input.reference_sources.map((item) => buildUeyeVisualProvenance(item))
|
|
69
|
+
: [];
|
|
70
|
+
const implementations = Array.isArray(input.implementation_sources)
|
|
71
|
+
? input.implementation_sources.map((item) => buildUeyeVisualProvenance(item))
|
|
72
|
+
: [];
|
|
73
|
+
const blockedReason = String(input.blocked_reason || '');
|
|
74
|
+
const comparisonResult = String(input.comparison_result || 'not-verified');
|
|
75
|
+
const hasImplementation = implementations.length > 0;
|
|
76
|
+
const derivedTruth = blockedReason ? 'blocked'
|
|
77
|
+
: !references.length && !hasImplementation ? 'assumed'
|
|
78
|
+
: comparisonResult === 'matched' && hasImplementation ? 'verified'
|
|
79
|
+
: hasImplementation ? 'partial'
|
|
80
|
+
: 'partial';
|
|
81
|
+
return {
|
|
82
|
+
schema: 'yam.ueye-run-report.v1',
|
|
83
|
+
reference_sources: references,
|
|
84
|
+
implementation_sources: implementations,
|
|
85
|
+
comparison_result: comparisonResult,
|
|
86
|
+
design_quality: String(input.design_quality || 'not-checked'),
|
|
87
|
+
blocked_reason: blockedReason,
|
|
88
|
+
next_action: String(input.next_action || (derivedTruth === 'verified' ? 'no action required' : 'capture or provide implementation screenshot before claiming verified visual status')),
|
|
89
|
+
truth_status: isTruthStatus(input.truth_status) ? input.truth_status : derivedTruth
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
export function buildMediaGenerationProof(input = {}) {
|
|
93
|
+
const requested = Boolean(input.generation_requested);
|
|
94
|
+
const attempted = Boolean(input.generation_attempted);
|
|
95
|
+
const outputHash = String(input.output_hash || 'unknown');
|
|
96
|
+
const blockedReason = String(input.blocked_reason || '');
|
|
97
|
+
const derivedTruth = blockedReason ? 'blocked'
|
|
98
|
+
: requested && !attempted ? 'blocked'
|
|
99
|
+
: attempted && outputHash !== 'unknown' ? 'verified'
|
|
100
|
+
: attempted ? 'partial'
|
|
101
|
+
: requested ? 'assumed'
|
|
102
|
+
: 'skipped';
|
|
103
|
+
return {
|
|
104
|
+
schema: 'yam.media-generation-proof.v1',
|
|
105
|
+
tool_name: String(input.tool_name || ''),
|
|
106
|
+
generation_requested: requested,
|
|
107
|
+
generation_attempted: attempted,
|
|
108
|
+
output_path: String(input.output_path || ''),
|
|
109
|
+
output_hash: outputHash,
|
|
110
|
+
wait_loop_checked: Boolean(input.wait_loop_checked),
|
|
111
|
+
blocked_reason: blockedReason,
|
|
112
|
+
next_action: String(input.next_action || (derivedTruth === 'blocked' ? 'provide a usable media tool or mark generation as skipped' : 'record output evidence before using generated media as implementation proof')),
|
|
113
|
+
truth_status: isTruthStatus(input.truth_status) ? input.truth_status : derivedTruth
|
|
114
|
+
};
|
|
115
|
+
}
|
|
52
116
|
const TRUTH_RANK = Object.freeze({
|
|
53
117
|
blocked: 0,
|
|
54
118
|
real_required_missing: 0,
|
|
@@ -129,6 +193,12 @@ export function classifyEvidenceTruth(summary = {}, options = {}) {
|
|
|
129
193
|
for (const rollback of asList(summary.rollbackHint)) {
|
|
130
194
|
rows.push(evidenceRow('evidence', rollback, metadataTruth(rollback, 'partial')));
|
|
131
195
|
}
|
|
196
|
+
for (const backend of asList(summary.runtimeBackendEvidence)) {
|
|
197
|
+
rows.push(evidenceRow('runtime', backend, readStructuredTruth(backend, 'partial')));
|
|
198
|
+
}
|
|
199
|
+
for (const media of asList(summary.mediaProof)) {
|
|
200
|
+
rows.push(evidenceRow('evidence', media, readStructuredTruth(media, 'partial')));
|
|
201
|
+
}
|
|
132
202
|
for (const runtime of asList(summary.runtime)) {
|
|
133
203
|
rows.push(evidenceRow('runtime', runtime, classifyRuntimeEvidence(runtime, options)));
|
|
134
204
|
}
|
|
@@ -217,6 +287,8 @@ export function buildYamCompletionProof(summary = {}, options = {}) {
|
|
|
217
287
|
visualProvenance: asList(summary.visualProvenance),
|
|
218
288
|
missionEnvelope: asList(summary.missionEnvelope),
|
|
219
289
|
rollbackHint: asList(summary.rollbackHint),
|
|
290
|
+
runtimeBackendEvidence: asList(summary.runtimeBackendEvidence),
|
|
291
|
+
mediaProof: asList(summary.mediaProof),
|
|
220
292
|
cleanup: summary.cleanup || '',
|
|
221
293
|
changed: asList(summary.changed),
|
|
222
294
|
skipped: asList(summary.skipped),
|
|
@@ -353,6 +425,51 @@ function runtimeRow(subsystem, proofLevel, required) {
|
|
|
353
425
|
: 'no action required'
|
|
354
426
|
};
|
|
355
427
|
}
|
|
428
|
+
function normalizeRuntimeBackend(value = '') {
|
|
429
|
+
const text = String(value || '').toLowerCase().replace(/[-\s]/g, '_');
|
|
430
|
+
if (text === 'in_app_browser' || text === 'browser')
|
|
431
|
+
return 'in_app_browser';
|
|
432
|
+
if (text === 'playwright')
|
|
433
|
+
return 'playwright';
|
|
434
|
+
if (text === 'terminal' || text === 'shell')
|
|
435
|
+
return 'terminal';
|
|
436
|
+
if (text === 'tmux')
|
|
437
|
+
return 'tmux';
|
|
438
|
+
if (text === 'zellij')
|
|
439
|
+
return 'zellij';
|
|
440
|
+
if (text === 'none' || text === 'not_started')
|
|
441
|
+
return 'none';
|
|
442
|
+
return 'unknown';
|
|
443
|
+
}
|
|
444
|
+
function normalizeRuntimeClaim(value = '') {
|
|
445
|
+
const text = String(value || '').toLowerCase().replace(/[-\s]/g, '_');
|
|
446
|
+
if (text === 'not_started' || text === 'none')
|
|
447
|
+
return 'not_started';
|
|
448
|
+
if (text === 'started')
|
|
449
|
+
return 'started';
|
|
450
|
+
if (text === 'observed' || text === 'checked')
|
|
451
|
+
return 'observed';
|
|
452
|
+
if (text === 'stopped')
|
|
453
|
+
return 'stopped';
|
|
454
|
+
if (text === 'cleanup_verified' || text === 'cleanup_checked')
|
|
455
|
+
return 'cleanup_verified';
|
|
456
|
+
if (text === 'blocked')
|
|
457
|
+
return 'blocked';
|
|
458
|
+
return 'unknown';
|
|
459
|
+
}
|
|
460
|
+
function runtimeBackendTruth(backend, claim, cleanupChecked = false) {
|
|
461
|
+
if (claim === 'blocked')
|
|
462
|
+
return 'blocked';
|
|
463
|
+
if (backend === 'none' || claim === 'not_started')
|
|
464
|
+
return 'skipped';
|
|
465
|
+
if (backend === 'unknown' || claim === 'unknown')
|
|
466
|
+
return 'partial';
|
|
467
|
+
if (claim === 'cleanup_verified' || cleanupChecked)
|
|
468
|
+
return 'proven';
|
|
469
|
+
if (claim === 'observed' || claim === 'stopped' || claim === 'started')
|
|
470
|
+
return 'verified';
|
|
471
|
+
return 'partial';
|
|
472
|
+
}
|
|
356
473
|
function evidenceRow(kind, value, truth) {
|
|
357
474
|
return { kind, value: String(value || ''), truth };
|
|
358
475
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "yam-flow",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
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": "dist/bin/yam.js"
|
|
19
|
+
"yam": "./dist/bin/yam.js"
|
|
20
20
|
},
|
|
21
21
|
"types": "dist/lib/trust-kernel.d.ts",
|
|
22
22
|
"exports": {
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
"files": [
|
|
29
29
|
"AGENTS.md",
|
|
30
|
+
"CHANGELOG.md",
|
|
30
31
|
"COMMANDS.md",
|
|
31
32
|
"DECISIONS.md",
|
|
32
33
|
"LICENSE",
|
|
@@ -4,10 +4,10 @@ Use current docs proof only when stale knowledge is a realistic risk.
|
|
|
4
4
|
|
|
5
5
|
## Require Current Docs Proof
|
|
6
6
|
|
|
7
|
-
Use
|
|
7
|
+
Use official docs or primary sources when the task depends on current behavior for:
|
|
8
8
|
|
|
9
9
|
- modern SDK/API syntax
|
|
10
|
-
- cloud services
|
|
10
|
+
- cloud services, model APIs, payment providers, or auth providers
|
|
11
11
|
- framework version behavior, migration, deprecation, or breaking changes
|
|
12
12
|
- CLI flags, deployment behavior, pricing/limits, security rules, or platform integrations
|
|
13
13
|
- user wording such as latest, current, recently changed, new version, official docs, migration, or upgrade
|
|
@@ -27,7 +27,7 @@ Do not force current-docs proof for:
|
|
|
27
27
|
Use one concise line:
|
|
28
28
|
|
|
29
29
|
```text
|
|
30
|
-
Current-docs proof:
|
|
30
|
+
Current-docs proof: official docs checked for <SDK/service>; result applied to <decision>.
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
Or:
|
|
@@ -53,4 +53,23 @@ Doctor scan:
|
|
|
53
53
|
- Runtime/cleanup:
|
|
54
54
|
- Truth status:
|
|
55
55
|
- Fix-first:
|
|
56
|
+
- Diagnostic next action:
|
|
56
57
|
```
|
|
58
|
+
|
|
59
|
+
## Structured Diagnostic Next Action
|
|
60
|
+
|
|
61
|
+
Use this shape for doctor or release diagnostics that need a concrete follow-up:
|
|
62
|
+
|
|
63
|
+
- `status`: pass / needs_action / blocked / skipped
|
|
64
|
+
- `severity`: P0 / P1 / P2 / P3
|
|
65
|
+
- `owner_route`: quick / ueye / question / scout / deep / mission
|
|
66
|
+
- `priority`: fix_first / next / later / none
|
|
67
|
+
- `fix_first`: true / false
|
|
68
|
+
- `blocks_release`: true / false
|
|
69
|
+
- `observation`
|
|
70
|
+
- `evidence`
|
|
71
|
+
- `next_action.kind`: read_file / run_command / inspect_ui / update_docs / ask_user / none
|
|
72
|
+
- `next_action.command` or `next_action.files`, when relevant
|
|
73
|
+
- `truth_status`
|
|
74
|
+
|
|
75
|
+
Keep it singular. If there are several issues, list the fix-first item that most affects the next run.
|
|
@@ -10,6 +10,7 @@ Include these when they are useful and keep them short:
|
|
|
10
10
|
- What verification ran.
|
|
11
11
|
- What was not checked.
|
|
12
12
|
- Truth status, when verification or runtime claims matter.
|
|
13
|
+
- Structured diagnostic next action, when a check found a concrete next step.
|
|
13
14
|
- Remaining tasks.
|
|
14
15
|
- Fix-first items before planned tasks.
|
|
15
16
|
|
|
@@ -59,3 +60,23 @@ For `$deep` and `$mission`, include evidence, remaining risks, remaining tasks,
|
|
|
59
60
|
Do not pad the final answer when there are no meaningful remaining tasks or fix-first items.
|
|
60
61
|
|
|
61
62
|
When budget drift matters, include or run `yam measure <route>` with approximate files, commands, report lines, and seconds.
|
|
63
|
+
|
|
64
|
+
## Diagnostic Next Action
|
|
65
|
+
|
|
66
|
+
When a report says something needs attention, include one concrete next action instead of a vague warning.
|
|
67
|
+
|
|
68
|
+
Compact shape:
|
|
69
|
+
|
|
70
|
+
```text
|
|
71
|
+
Diagnostic next action:
|
|
72
|
+
- severity:
|
|
73
|
+
- owner route:
|
|
74
|
+
- priority:
|
|
75
|
+
- fix first:
|
|
76
|
+
- blocks release:
|
|
77
|
+
- evidence:
|
|
78
|
+
- next action:
|
|
79
|
+
- truth status:
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Use `none` when there is no meaningful next action.
|
package/references/hook-lite.md
CHANGED
|
@@ -14,7 +14,7 @@ Allowed:
|
|
|
14
14
|
- Remind the agent not to overclaim verification, cleanup, or visual evidence.
|
|
15
15
|
- Suggest `$quick`, `$ueye`, `$question`, `$scout`, `$deep`, or `$mission` based on obvious prompt signals.
|
|
16
16
|
- Mention a project pack or memory summary when present.
|
|
17
|
-
- Warn when conflicting proof
|
|
17
|
+
- Warn when conflicting proof surfaces are active in the current project.
|
|
18
18
|
|
|
19
19
|
Not allowed:
|
|
20
20
|
|
package/references/memory.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
`yam memory` is an opt-in, project-local memory layer.
|
|
4
4
|
|
|
5
|
-
It keeps only the lightest useful parts from heavier
|
|
5
|
+
It keeps only the lightest useful parts from heavier workflow patterns:
|
|
6
6
|
|
|
7
7
|
- Sparse records, one file per durable claim, and deliberate forgetting instead of injecting every old claim.
|
|
8
8
|
- Wrongness memory for repeated mistakes, wrong decisions, stale assumptions, and overconfident claims.
|
package/references/mission.md
CHANGED
|
@@ -49,6 +49,31 @@ Use a small envelope when a real mission lane changes code:
|
|
|
49
49
|
|
|
50
50
|
This is only a record shape. It is not a queue, lock manager, or parallel apply engine.
|
|
51
51
|
|
|
52
|
+
Patch queue lite:
|
|
53
|
+
|
|
54
|
+
Use this only when two or more real mission lanes produce patches, apply order matters, or rollback needs a clearer handoff.
|
|
55
|
+
Persist it with `--out` only when a later run needs to resume or audit the queue. Otherwise keep it in the report.
|
|
56
|
+
|
|
57
|
+
Each item records:
|
|
58
|
+
|
|
59
|
+
- `status`: pending / applied / verified / reverted / blocked
|
|
60
|
+
- `lane_id`
|
|
61
|
+
- `depends_on`: lane ids that must land first, or empty
|
|
62
|
+
- `assigned_scope`
|
|
63
|
+
- `changed_files`
|
|
64
|
+
- `verification_hint`
|
|
65
|
+
- `rollback_hint`
|
|
66
|
+
- `truth_status`
|
|
67
|
+
- `next_action`
|
|
68
|
+
|
|
69
|
+
Keep it lite:
|
|
70
|
+
|
|
71
|
+
- No automatic merge engine.
|
|
72
|
+
- No persistent locks.
|
|
73
|
+
- No required queue file for single-pass missions.
|
|
74
|
+
- No parallel apply worker.
|
|
75
|
+
- No broad runtime orchestration unless mission evidence already needs it.
|
|
76
|
+
|
|
52
77
|
Rollback hint:
|
|
53
78
|
|
|
54
79
|
Record:
|
|
@@ -41,11 +41,35 @@ Runtime proof should include:
|
|
|
41
41
|
- Goal.
|
|
42
42
|
- Steps run.
|
|
43
43
|
- Commands/processes started.
|
|
44
|
-
-
|
|
44
|
+
- PID, port, URL, session, pane, screenshot id, started_at, stopped_at, and exit_code when available.
|
|
45
45
|
- Checks before and after.
|
|
46
46
|
- Cleanup result.
|
|
47
47
|
- Truth status: proven, verified, partial, fixture_only, fixture_instrumented_real, integration_optional, real_required_missing, skipped, blocked, assumed.
|
|
48
48
|
|
|
49
|
+
## Runtime Evidence Mini
|
|
50
|
+
|
|
51
|
+
Use the mini shape when a final report, release report, or doctor scan needs runtime evidence without a full runtime proof artifact.
|
|
52
|
+
|
|
53
|
+
Minimum fields:
|
|
54
|
+
|
|
55
|
+
- `kind`: `runtime_evidence_mini`
|
|
56
|
+
- `route`: `deep` or `mission`
|
|
57
|
+
- `required`: true / false
|
|
58
|
+
- `command` or check name
|
|
59
|
+
- `target`: URL, port, process, or service
|
|
60
|
+
- `pid`, `port`, `url`, `exit_code`, `screenshot_id`, `started_at`, `stopped_at`
|
|
61
|
+
- `process`: session, pane, or `unknown` when process detail is unavailable
|
|
62
|
+
- `observation`: before and after notes
|
|
63
|
+
- `cleanup`: status and evidence
|
|
64
|
+
- `truth_status`
|
|
65
|
+
- `next_action`: one concrete follow-up when status is not fully proven
|
|
66
|
+
|
|
67
|
+
Truth caps:
|
|
68
|
+
|
|
69
|
+
- Missing process/target evidence cannot support `proven`.
|
|
70
|
+
- Missing cleanup evidence cannot support a cleanup-complete claim.
|
|
71
|
+
- Optional runtime checks may be `integration_optional`; required but unavailable runtime checks should be `real_required_missing`, `blocked`, or `partial`.
|
|
72
|
+
|
|
49
73
|
## Cleanup Rule
|
|
50
74
|
|
|
51
75
|
Do not claim cleanup succeeded unless one of these is true:
|
|
@@ -25,13 +25,13 @@ Then depth increases by route:
|
|
|
25
25
|
|
|
26
26
|
## Surfaces To Wrap
|
|
27
27
|
|
|
28
|
-
-
|
|
29
|
-
- Browser and
|
|
28
|
+
- Local CLI/app readiness.
|
|
29
|
+
- Browser and screen-control availability.
|
|
30
30
|
- tmux and long-running process lifecycle.
|
|
31
31
|
- Subagent/team availability for `$mission`.
|
|
32
32
|
- imagegen or screenshot evidence for `$ueye`.
|
|
33
|
-
-
|
|
34
|
-
-
|
|
33
|
+
- Current official docs for package/API questions.
|
|
34
|
+
- provider routing health when configured.
|
|
35
35
|
- DB/Supabase safety for destructive or migration work.
|
|
36
36
|
- Research, QA, wiki/context, proof, and release-gate workflows.
|
|
37
37
|
|
|
@@ -66,7 +66,7 @@ On demand:
|
|
|
66
66
|
- Tool readiness checks.
|
|
67
67
|
- Hook status and trust reporting.
|
|
68
68
|
- DB/Supabase destructive-operation gate thinking.
|
|
69
|
-
-
|
|
69
|
+
- Screen-control and screenshot evidence caps.
|
|
70
70
|
- tmux/process cleanup truth.
|
|
71
71
|
- Source-intelligence proof for current docs.
|
|
72
72
|
- Destructive DB/Supabase command detection and production-write caution.
|
|
@@ -92,7 +92,7 @@ On demand:
|
|
|
92
92
|
- Always-on hook enforcement.
|
|
93
93
|
- Release gates for normal coding.
|
|
94
94
|
- Mandatory generated image review for every UI task.
|
|
95
|
-
- Broad
|
|
95
|
+
- Broad connector/tool scans before small work.
|
|
96
96
|
- Provider config mutation without explicit user approval.
|
|
97
97
|
|
|
98
98
|
## Implemented Shape
|
|
@@ -106,14 +106,26 @@ On demand:
|
|
|
106
106
|
- suggest route and proof level
|
|
107
107
|
- do not install, configure, or mutate
|
|
108
108
|
|
|
109
|
+
Tool intent labels stay advisory and route-scoped:
|
|
110
|
+
|
|
111
|
+
- `read_only`: inspect, list, or report.
|
|
112
|
+
- `write`: edit workspace files or local generated artifacts.
|
|
113
|
+
- `destructive`: delete, reset, overwrite, publish irreversible data, or mutate production-like state.
|
|
114
|
+
- `runtime`: start, stop, probe, or depend on a live process.
|
|
115
|
+
- `visual`: capture, compare, or inspect screen evidence.
|
|
116
|
+
- `publish`: package, release, push, deploy, or expose artifacts.
|
|
117
|
+
|
|
109
118
|
`yam proof` should summarize what actually ran:
|
|
110
119
|
|
|
111
120
|
- command evidence
|
|
112
121
|
- browser/screenshot evidence
|
|
113
122
|
- visual provenance for reference-based UI work
|
|
114
123
|
- mission patch envelopes for real team lanes
|
|
124
|
+
- runtime evidence mini for route-level runtime claims
|
|
125
|
+
- patch queue lite when mission lane apply/verify order matters
|
|
115
126
|
- rollback hints for risky changes
|
|
116
127
|
- runtime/tmux/process cleanup evidence
|
|
128
|
+
- structured diagnostic next action
|
|
117
129
|
- truth status
|
|
118
130
|
- skipped/blocked/assumed items
|
|
119
131
|
|
|
@@ -125,4 +137,86 @@ On demand:
|
|
|
125
137
|
- registry status
|
|
126
138
|
- CLI smoke
|
|
127
139
|
- dist freshness
|
|
140
|
+
- release tarball provenance: package name/version, tarball path, sha256, generated_at, source commit/tree state, included files summary
|
|
141
|
+
- diagnostics with structured next action
|
|
128
142
|
- final truth status
|
|
143
|
+
|
|
144
|
+
## Compact Artifact Contracts
|
|
145
|
+
|
|
146
|
+
Runtime evidence mini:
|
|
147
|
+
|
|
148
|
+
```json
|
|
149
|
+
{
|
|
150
|
+
"kind": "runtime_evidence_mini",
|
|
151
|
+
"route": "deep",
|
|
152
|
+
"required": true,
|
|
153
|
+
"command": "npm run dev",
|
|
154
|
+
"target": "http://localhost:3000",
|
|
155
|
+
"pid": "unknown",
|
|
156
|
+
"port": "3000",
|
|
157
|
+
"url": "http://localhost:3000",
|
|
158
|
+
"exit_code": null,
|
|
159
|
+
"screenshot_id": "",
|
|
160
|
+
"started_at": "",
|
|
161
|
+
"stopped_at": "",
|
|
162
|
+
"process": {
|
|
163
|
+
"session": "",
|
|
164
|
+
"pane": ""
|
|
165
|
+
},
|
|
166
|
+
"observation": {
|
|
167
|
+
"before": "",
|
|
168
|
+
"after": ""
|
|
169
|
+
},
|
|
170
|
+
"cleanup": {
|
|
171
|
+
"status": "checked_stopped",
|
|
172
|
+
"evidence": ""
|
|
173
|
+
},
|
|
174
|
+
"truth_status": "partial",
|
|
175
|
+
"next_action": {
|
|
176
|
+
"kind": "run_check",
|
|
177
|
+
"summary": ""
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
Patch queue lite:
|
|
183
|
+
|
|
184
|
+
```json
|
|
185
|
+
{
|
|
186
|
+
"kind": "patch_queue_lite",
|
|
187
|
+
"items": [
|
|
188
|
+
{
|
|
189
|
+
"status": "pending",
|
|
190
|
+
"lane_id": "",
|
|
191
|
+
"depends_on": [],
|
|
192
|
+
"assigned_scope": "",
|
|
193
|
+
"changed_files": [],
|
|
194
|
+
"verification_hint": "",
|
|
195
|
+
"rollback_hint": "",
|
|
196
|
+
"truth_status": "partial",
|
|
197
|
+
"next_action": ""
|
|
198
|
+
}
|
|
199
|
+
]
|
|
200
|
+
}
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
Structured diagnostic next action:
|
|
204
|
+
|
|
205
|
+
```json
|
|
206
|
+
{
|
|
207
|
+
"status": "needs_action",
|
|
208
|
+
"severity": "P2",
|
|
209
|
+
"owner_route": "quick",
|
|
210
|
+
"priority": "fix_first",
|
|
211
|
+
"fix_first": true,
|
|
212
|
+
"blocks_release": false,
|
|
213
|
+
"observation": "",
|
|
214
|
+
"evidence": "",
|
|
215
|
+
"next_action": {
|
|
216
|
+
"kind": "run_command",
|
|
217
|
+
"command": "",
|
|
218
|
+
"reason": ""
|
|
219
|
+
},
|
|
220
|
+
"truth_status": "partial"
|
|
221
|
+
}
|
|
222
|
+
```
|
package/references/ueye-proof.md
CHANGED
|
@@ -26,18 +26,39 @@ 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 needs-polish --json
|
|
29
30
|
```
|
|
30
31
|
|
|
31
|
-
- `capture` uses a
|
|
32
|
+
- `capture` uses a project-local capture backend when present, then reports `blocked` instead of installing dependencies or pretending a screenshot exists.
|
|
32
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.
|
|
35
|
+
- `report` may include continuity fields when a previous review or screenshot is being rechecked.
|
|
33
36
|
- Without capture or user-provided screenshots, report implementation/source review separately from visual verification and cap the visual claim.
|
|
34
37
|
|
|
38
|
+
### Media Generation Proof
|
|
39
|
+
|
|
40
|
+
Generated media can help with direction and visual ideation, but it is derivative evidence. It cannot prove that the implemented UI was captured or compared.
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
yam media proof --requested --attempted --output ./generated.png --wait-loop --json
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Record:
|
|
47
|
+
|
|
48
|
+
- tool name, when relevant
|
|
49
|
+
- whether generation was requested
|
|
50
|
+
- whether generation was attempted
|
|
51
|
+
- output path and hash, when a local image exists
|
|
52
|
+
- whether the wait loop was checked
|
|
53
|
+
- blocked reason and next action
|
|
54
|
+
- truth status
|
|
55
|
+
|
|
35
56
|
### Browser Preference
|
|
36
57
|
|
|
37
|
-
- Prefer the
|
|
38
|
-
- Do not silently switch to
|
|
39
|
-
- Use
|
|
40
|
-
- If the in-app
|
|
58
|
+
- Prefer the in-app browser for local pages, localhost, file URLs, and ordinary visual QA.
|
|
59
|
+
- Do not silently switch to a profile-dependent browser when the in-app browser cannot capture or inspect.
|
|
60
|
+
- Use a profile-dependent browser only when the user explicitly asks for it, or when the task requires existing cookies, sessions, extensions, or profile state.
|
|
61
|
+
- If the in-app browser is unavailable and a profile-dependent browser was not explicitly requested or required, cap the visual claim at `partial` or `blocked`.
|
|
41
62
|
|
|
42
63
|
### Visual Evidence Inventory
|
|
43
64
|
|
|
@@ -72,6 +93,8 @@ Record these fields when a reference or screenshot materially affects the claim:
|
|
|
72
93
|
- `source_hash`
|
|
73
94
|
- `reference_id`
|
|
74
95
|
- `screenshot_id`
|
|
96
|
+
- `viewport`
|
|
97
|
+
- `state`
|
|
75
98
|
- `local_only`
|
|
76
99
|
- `redacted`
|
|
77
100
|
- `operator_provided`
|
|
@@ -140,6 +163,32 @@ Dimensions:
|
|
|
140
163
|
Report findings as P0-P3. Keep P2/P3 short unless the user requested a full polish pass.
|
|
141
164
|
For each relevant design dimension, use `pass`, `needs-polish`, or `fails`.
|
|
142
165
|
|
|
166
|
+
### Review Continuity And Comparison Report
|
|
167
|
+
|
|
168
|
+
Use this when a Ueye task continues a previous visual review, rechecks a fix, or compares two review runs.
|
|
169
|
+
|
|
170
|
+
Minimum fields:
|
|
171
|
+
|
|
172
|
+
- `previous_report_id` or `previous_report_path`
|
|
173
|
+
- `previous_screenshot_id`, when available
|
|
174
|
+
- `previous_source_hash`, when available
|
|
175
|
+
- `current_report_id` or `current_source_path`
|
|
176
|
+
- `current_screenshot_id`, when available
|
|
177
|
+
- `current_source_hash`, when available
|
|
178
|
+
- `viewport`
|
|
179
|
+
- `state`
|
|
180
|
+
- `changed_surface`
|
|
181
|
+
- `comparison_result`: improved / regressed / unchanged / not-verified
|
|
182
|
+
- `regression`: true / false / not-verified
|
|
183
|
+
- `resolved_findings`
|
|
184
|
+
- `new_findings`
|
|
185
|
+
- `still_open_findings`
|
|
186
|
+
- `design_quality`
|
|
187
|
+
- `truth_status`
|
|
188
|
+
- `next_action`
|
|
189
|
+
|
|
190
|
+
Do not claim continuity from memory alone. Link it to a previous report, screenshot, source path/hash, or an explicit user-provided prior finding.
|
|
191
|
+
|
|
143
192
|
## Truth Caps
|
|
144
193
|
|
|
145
194
|
- Full visual verification requires real implementation evidence and relevant recheck.
|