yam-flow 2.2.1 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/COMMANDS.md +8 -1
- package/README.md +12 -0
- package/ROADMAP.md +25 -0
- package/dist/bin/yam.js +237 -62
- package/dist/lib/trust-kernel.d.ts +54 -0
- package/dist/lib/trust-kernel.js +194 -0
- package/dist/lib/ueye-artifacts.d.ts +98 -0
- package/dist/lib/ueye-artifacts.js +317 -0
- package/package.json +1 -1
- package/references/final-report.md +2 -0
- package/references/honest-completion.md +1 -0
- package/references/mission.md +16 -0
- package/references/tool-trust-layer.md +3 -0
- package/references/trust-kernel.md +3 -0
- package/references/truth-matrix.md +2 -0
- package/references/ueye-proof.md +6 -0
- package/references/ueye.md +12 -0
- package/references/verification-levels.md +2 -1
- package/skills/mission/SKILL.md +19 -4
- package/skills/ueye/SKILL.md +11 -0
- package/src/bin/yam.ts +227 -56
- package/src/lib/trust-kernel.ts +239 -0
- package/src/lib/ueye-artifacts.ts +354 -0
- package/templates/mission-plan.md +25 -2
- package/templates/ueye-comparison.md +12 -0
- package/templates/ueye-review.md +26 -0
- package/yam.manifest.json +5 -5
package/references/mission.md
CHANGED
|
@@ -27,6 +27,13 @@ Role model:
|
|
|
27
27
|
- UX/browser verifier: checks UI behavior, browser state, screenshots, or flows when relevant.
|
|
28
28
|
- Doctor/scanner: checks direction fit, scope control, command output, stale instructions, runtime/cleanup evidence, false-completion risk, and remaining fix-first items.
|
|
29
29
|
|
|
30
|
+
Read-only role contract:
|
|
31
|
+
|
|
32
|
+
- Reviewer and Doctor default to `access_mode: read_only`.
|
|
33
|
+
- They may read files, search, inspect diffs, and run non-mutating diagnostics.
|
|
34
|
+
- They must not claim `changed_files` or use write access.
|
|
35
|
+
- When review finds a needed fix, return a patch request to an Implementer lane instead of silently changing the implementation.
|
|
36
|
+
|
|
30
37
|
Subagent policy:
|
|
31
38
|
|
|
32
39
|
- Mission requires real subagent/team orchestration to be considered a full mission.
|
|
@@ -36,6 +43,15 @@ Subagent policy:
|
|
|
36
43
|
- If the user explicitly insists on mission despite missing subagents, mark the result `partial` or `blocked`; do not treat self-review as team execution.
|
|
37
44
|
- The final proof must record the subagent decision: `used`, `downgraded_to_deep`, `unavailable_partial`, or `blocked`, with the reason.
|
|
38
45
|
|
|
46
|
+
Subagent completion receipts:
|
|
47
|
+
|
|
48
|
+
- Record one `yam.mission-subagent-receipt.v1` for every expected thread.
|
|
49
|
+
- Lifecycle and outcome are separate: `stopped` only means the thread ended.
|
|
50
|
+
- A passed receipt requires an explicit `outcome: passed`, bounded scope, and verification evidence.
|
|
51
|
+
- Failed, blocked, ambiguous, missing, duplicated, unexpected, or read-only-violating receipts block the aggregate gate.
|
|
52
|
+
- `yam mission gate` compares receipt files with the expected thread inventory and produces `yam.mission-completion-gate.v1`.
|
|
53
|
+
- A Mission proof requesting `verified` or `proven` is capped when this gate is missing or blocked.
|
|
54
|
+
|
|
39
55
|
Patch envelope:
|
|
40
56
|
|
|
41
57
|
Use a small envelope when a real mission lane changes code:
|
|
@@ -138,6 +138,7 @@ Tool intent labels stay advisory and route-scoped:
|
|
|
138
138
|
- browser/screenshot evidence
|
|
139
139
|
- visual provenance for reference-based UI work
|
|
140
140
|
- mission patch envelopes for real team lanes
|
|
141
|
+
- per-thread Mission receipts and aggregate completion gate
|
|
141
142
|
- runtime evidence mini for route-level runtime claims
|
|
142
143
|
- patch queue lite when mission lane apply/verify order matters
|
|
143
144
|
- rollback hints for risky changes
|
|
@@ -146,6 +147,8 @@ Tool intent labels stay advisory and route-scoped:
|
|
|
146
147
|
- truth status
|
|
147
148
|
- skipped/blocked/assumed items
|
|
148
149
|
|
|
150
|
+
Reviewer and doctor Mission lanes use `read_only` intent by default. A receipt that claims write access or changed files for those roles is a contract violation, and a stopped thread without an explicit outcome is not success evidence.
|
|
151
|
+
|
|
149
152
|
`yam release report --json` should collect release readiness into a machine-readable artifact:
|
|
150
153
|
|
|
151
154
|
- typecheck
|
|
@@ -40,6 +40,8 @@ The module provides:
|
|
|
40
40
|
- runtime truth matrix
|
|
41
41
|
- completion proof object creation
|
|
42
42
|
- Ueye design completion gate creation
|
|
43
|
+
- Mission subagent receipt and aggregate completion gate creation
|
|
44
|
+
- Ueye asset/revision integrity helpers through the CLI
|
|
43
45
|
|
|
44
46
|
## Policy
|
|
45
47
|
|
|
@@ -54,5 +56,6 @@ For example:
|
|
|
54
56
|
- Required runtime evidence that is missing becomes `real_required_missing`.
|
|
55
57
|
- Cleanup claims require cleanup evidence.
|
|
56
58
|
- Ueye `done` claims require a passing design completion gate or stay capped at `partial` or `blocked`.
|
|
59
|
+
- Mission `verified` or `proven` claims require a passing completion gate built from the expected thread inventory and explicit receipts.
|
|
57
60
|
|
|
58
61
|
This keeps the trust layer progressive and route-scoped.
|
|
@@ -42,6 +42,8 @@ Never say cleanup is `proven` from a cleanup intention alone. Cleanup needs obse
|
|
|
42
42
|
|
|
43
43
|
Never say full visual `verified` when the only evidence is a reference image, generated image, code reading, or text-only critique.
|
|
44
44
|
|
|
45
|
+
Never say a Mission is `verified` or `proven` because every thread emitted a stop event. Every expected thread needs one unambiguous receipt with outcome and evidence, and the aggregate completion gate must pass.
|
|
46
|
+
|
|
45
47
|
Ueye preflight is `partial` by design. It can identify design risks before work starts, but it cannot prove visual quality without implementation screenshot/comparison evidence.
|
|
46
48
|
|
|
47
49
|
For ordinary routes, prefer `verified`, `partial`, `skipped`, `blocked`, or `assumed`.
|
package/references/ueye-proof.md
CHANGED
|
@@ -26,6 +26,10 @@ 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 asset add --manifest .yam/ueye/assets.json --id official-logo --file ./assets/logo.png --source-page-url https://example.com/brand --license-note "official brand asset; local review use" --do-not-replace --json
|
|
30
|
+
yam ueye asset verify --manifest .yam/ueye/assets.json --json
|
|
31
|
+
yam ueye revision archive --file .yam/screens/home.png --round 1 --artifact-id home --root .yam/ueye/revisions --json
|
|
32
|
+
yam ueye revision verify --manifest .yam/ueye/revisions/manifest.json --json
|
|
29
33
|
yam ueye report --reference ./reference.png --actual .yam/screens/home.png --acceptance-criterion "primary CTA remains visible on mobile" --design-system-evidence "uses existing button token" --implementation-evidence "browser screenshot reviewed" --state-check default:pass --state-check mobile:partial --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
34
|
```
|
|
31
35
|
|
|
@@ -34,6 +38,8 @@ yam ueye report --reference ./reference.png --actual .yam/screens/home.png --acc
|
|
|
34
38
|
- `report` records the Ueye run as reference sources, implementation sources, comparison result, surface context, design quality, blocked reason, next action, and truth status.
|
|
35
39
|
- `report` can also record a deep visual review with acceptance criteria, touched/read/verified files, skipped checks, residual risks, stop condition, resume hint, design-system evidence, implementation evidence, and state matrix.
|
|
36
40
|
- `report` may include continuity fields when a previous review or screenshot is being rechecked.
|
|
41
|
+
- `asset` records and verifies local reference provenance, protection/edit flags, dimensions, bytes, and hashes without downloading remote content.
|
|
42
|
+
- `revision` copies a live artifact into a non-overwriting round archive and verifies the revision history before it supports a done claim.
|
|
37
43
|
- Without capture or user-provided screenshots, report implementation/source review separately from visual verification and cap the visual claim.
|
|
38
44
|
|
|
39
45
|
### Media Generation Proof
|
package/references/ueye.md
CHANGED
|
@@ -68,6 +68,8 @@ Use these when the task depends on visual truth, reference matching, or design q
|
|
|
68
68
|
5. Review Continuity and Comparison Report.
|
|
69
69
|
6. Design Completion Gate.
|
|
70
70
|
7. Deep Visual Review, when Ueye needs Deep-grade verification.
|
|
71
|
+
8. Asset Manifest, when local reference media affects the design.
|
|
72
|
+
9. Revision History, when an iterative visual artifact is about to be replaced.
|
|
71
73
|
|
|
72
74
|
Default bound:
|
|
73
75
|
|
|
@@ -77,6 +79,16 @@ Default bound:
|
|
|
77
79
|
- Do not require voxel grids, exhaustive callouts, or generated annotations.
|
|
78
80
|
- Do not let proof artifacts turn Ueye into always-on heavy orchestration.
|
|
79
81
|
|
|
82
|
+
### Asset Manifest
|
|
83
|
+
|
|
84
|
+
Use `yam ueye asset add|verify` for important local references such as official identity files, supplied photos, and editable visual sources.
|
|
85
|
+
|
|
86
|
+
Record source URL/page when known, a license or usage note, operator-provided status, `do_not_replace`, `allowed_for_edit`, dimensions, bytes, and SHA-256. Missing licensing stays visible as a warning. The helper does not fetch URLs or infer usage rights.
|
|
87
|
+
|
|
88
|
+
### Revision History
|
|
89
|
+
|
|
90
|
+
Use `yam ueye revision archive` before replacing an artifact during an iterative design pass. Archives are written to numbered round folders with exclusive-copy behavior, so a different payload cannot silently overwrite an existing round. `yam ueye revision verify` recomputes hashes before the history supports a done claim.
|
|
91
|
+
|
|
80
92
|
### Visual Evidence Inventory
|
|
81
93
|
|
|
82
94
|
Record the real screens and image sources behind the review.
|
|
@@ -143,7 +143,7 @@ Stop condition:
|
|
|
143
143
|
- `$quick`: L1-L2 by default; L3 only when the claim needs it.
|
|
144
144
|
- `$ueye`: L1-L3 for ordinary UI work; L4 when claiming visual done.
|
|
145
145
|
- `$deep`: L3-L5 when risk or user intent calls for strong verification.
|
|
146
|
-
- `$mission`: L4-L5 when real subagents/team lanes are used, with cross-verification.
|
|
146
|
+
- `$mission`: L4-L5 when real subagents/team lanes are used, with cross-verification, per-thread receipts, and a passing aggregate completion gate.
|
|
147
147
|
|
|
148
148
|
## Completion Claim Rule
|
|
149
149
|
|
|
@@ -154,5 +154,6 @@ Completion claims require evidence at or above the level implied by the claim:
|
|
|
154
154
|
- UI done claim: L3-L4 with visual evidence when feasible.
|
|
155
155
|
- Runtime/cleanup claim: L4.
|
|
156
156
|
- Release/auth/DB/security claim: L4-L5.
|
|
157
|
+
- Mission verified/proven claim: L4-L5 plus expected-thread receipt coverage and completion gate.
|
|
157
158
|
|
|
158
159
|
If the evidence level is lower than the claim, lower the truth status and report the gap.
|
package/skills/mission/SKILL.md
CHANGED
|
@@ -35,6 +35,8 @@ Do not use for:
|
|
|
35
35
|
- If the user explicitly insists on `$mission` despite unavailable subagents, mark the mission `partial` or `blocked` instead of pretending role-play is team execution.
|
|
36
36
|
- Use tmux/dev server/browser QA only when the mission needs runtime evidence.
|
|
37
37
|
- Cross-verify before claiming completion.
|
|
38
|
+
- Reviewer and doctor lanes are read-only by default: they may inspect and run non-mutating checks, but they must not claim changed files or write access.
|
|
39
|
+
- A subagent stop event is lifecycle evidence, not success evidence. Every spawned thread needs an explicit outcome and verification evidence.
|
|
38
40
|
- Do not claim verified, cleaned up, or visually checked without evidence.
|
|
39
41
|
- Doctor scan is mandatory for mission finalization, but it should stay concise.
|
|
40
42
|
|
|
@@ -48,15 +50,18 @@ Do not use for:
|
|
|
48
50
|
- Reviewer: checks code, risk, and project direction.
|
|
49
51
|
- UX/browser verifier: checks screen behavior when relevant.
|
|
50
52
|
- Doctor/scanner: checks direction fit, scope control, verification, cleanup, stale context, and false-completion risk.
|
|
53
|
+
- Keep Reviewer and Doctor read-only; if either must implement a fix, hand it back to an Implementer lane or create a new bounded write lane.
|
|
51
54
|
5. Execute the implementation in bounded steps.
|
|
52
55
|
6. Record a compact patch envelope for each real lane that changes code.
|
|
53
56
|
7. Add rollback hints for touched files, generated files, before checks, and safe revert notes.
|
|
54
57
|
8. Use `$deep`-style runtime verification when the mission needs dev server, tmux, test watcher, browser QA, cleanup, or before/after evidence.
|
|
55
58
|
9. Cross-check findings and resolve contradictions.
|
|
56
|
-
10.
|
|
57
|
-
11. Run
|
|
58
|
-
12.
|
|
59
|
-
13.
|
|
59
|
+
10. Record one `yam mission receipt` for every spawned thread. `stopped` without `passed|failed|blocked` remains ambiguous and cannot support completion.
|
|
60
|
+
11. Run `yam mission gate` against the expected thread inventory and receipts.
|
|
61
|
+
12. Run the smallest honest final verification set.
|
|
62
|
+
13. Run doctor scan with `references/doctor-scan.md`.
|
|
63
|
+
14. Confirm cleanup or explicitly report intentionally running processes.
|
|
64
|
+
15. Produce final proof summary, truth status, remaining tasks, and fix-first items.
|
|
60
65
|
|
|
61
66
|
Mission stop condition:
|
|
62
67
|
|
|
@@ -73,6 +78,8 @@ Include:
|
|
|
73
78
|
- Subagent decision: used / downgraded_to_deep / unavailable_partial / blocked, with reason.
|
|
74
79
|
- Files or surfaces changed.
|
|
75
80
|
- Patch envelope for each real code-changing lane.
|
|
81
|
+
- Subagent receipt for every expected thread.
|
|
82
|
+
- Passing Mission completion gate before a `verified` or `proven` Mission claim.
|
|
76
83
|
- Rollback hint for risky or multi-file changes.
|
|
77
84
|
- Runtime/tmux/browser evidence when used.
|
|
78
85
|
- Cross-verification result.
|
|
@@ -91,6 +98,14 @@ Use `references/study-note.md` for every lane that changes code, config, docs, r
|
|
|
91
98
|
Use `references/final-report.md` to close with remaining tasks and fix-first items.
|
|
92
99
|
Use `references/token-budget-reporter.md` when budget drift matters.
|
|
93
100
|
|
|
101
|
+
Useful CLI artifacts:
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
yam mission receipt --thread-id reviewer-1 --role reviewer --lifecycle stopped --outcome passed --scope "read-only review" --evidence "review findings recorded" --out .yam/mission/reviewer-1.json --json
|
|
105
|
+
yam mission gate --expected-thread reviewer-1 --receipt .yam/mission/reviewer-1.json --out .yam/mission/completion.json --json
|
|
106
|
+
yam proof --route mission --truth verified --mission-completion "$(<.yam/mission/completion.json)" --json
|
|
107
|
+
```
|
|
108
|
+
|
|
94
109
|
## Prompt Pattern
|
|
95
110
|
|
|
96
111
|
Good mission prompts include:
|
package/skills/ueye/SKILL.md
CHANGED
|
@@ -60,6 +60,9 @@ Do not use for:
|
|
|
60
60
|
- Mark any ambiguous or unobservable detail instead of inventing it.
|
|
61
61
|
5. Inspect nearby UI patterns, tokens, styles, and state handling.
|
|
62
62
|
6. Implement the smallest coherent design improvement when implementation is requested.
|
|
63
|
+
- When local reference assets materially shape the design, record them with `yam ueye asset add` before editing.
|
|
64
|
+
- Use `do_not_replace` for protected identity assets and enable `allowed_for_edit` only when usage rights and task scope support editing.
|
|
65
|
+
- Before overwriting an iterative visual artifact, preserve the current file with `yam ueye revision archive`.
|
|
63
66
|
7. Check default, loading, error, empty, disabled, hover/focus, and mobile states when relevant.
|
|
64
67
|
8. Run browser/screenshot verification when feasible.
|
|
65
68
|
- Prefer the in-app browser for local pages, localhost, file URLs, and ordinary visual QA.
|
|
@@ -127,6 +130,13 @@ Use these artifacts for reference-led implementation or serious visual review. K
|
|
|
127
130
|
- record whether generation was requested, attempted, blocked, or produced an output.
|
|
128
131
|
- use `yam media proof --requested --attempted --output path.png --wait-loop --json` when a generated image materially affects the design direction.
|
|
129
132
|
- never use generated media proof as a substitute for implemented screen evidence.
|
|
133
|
+
10. Asset Manifest, when logos, photos, illustrations, or other local reference files materially affect the work:
|
|
134
|
+
- record local file path, source URL/page when known, retrieval time, license note, operator-provided status, `do_not_replace`, `allowed_for_edit`, dimensions, bytes, and SHA-256.
|
|
135
|
+
- `yam ueye asset` records local files only; it does not download remote content.
|
|
136
|
+
11. Revision History, when an artifact will be regenerated or overwritten:
|
|
137
|
+
- archive the current file under a numbered round before editing it.
|
|
138
|
+
- never overwrite a different archived payload for the same artifact and round.
|
|
139
|
+
- verify the revision manifest before using it in a visual `done` claim.
|
|
130
140
|
|
|
131
141
|
## Visual Truth Caps
|
|
132
142
|
|
|
@@ -177,3 +187,4 @@ Report:
|
|
|
177
187
|
- Architecture hygiene when relevant: flag if the change risks dumping unrelated UI logic into `page.tsx`, one-off component styling into `global.css`, or structured product data into broad DB `jsonb` blobs.
|
|
178
188
|
- Truth status and visual verification cap.
|
|
179
189
|
- Handoff when useful: fix-first visual issues, remaining tasks, recommended direction, why that next step matters, blocker kind, safe retry, evidence level/stamp, and owner scope when another route or person may continue.
|
|
190
|
+
- Asset manifest and revision history status when reference media or iterative artifact replacement materially affected the work.
|