yam-flow 0.1.5 → 0.1.7

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/AGENTS.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # yam Core Rules
2
2
 
3
3
  1. Direction before execution.
4
- 2. Start fast, then deepen deliberately when scope, risk, or user intent calls for it.
4
+ 2. Start with clear momentum, then deepen deliberately when scope, risk, learning value, or user intent calls for it.
5
5
  3. Treat token economy as part of quality.
6
6
  4. Reuse project context packs before broad reading.
7
7
  5. Read only the context needed for the requested change.
@@ -10,9 +10,12 @@
10
10
  8. Make the smallest useful change.
11
11
  9. Verify at the lightest level that honestly supports the claim, then escalate verification when the claim is larger.
12
12
  10. Report skipped, partial, blocked, or assumed verification plainly.
13
- 11. Do not run broad tests for tiny changes, but do not under-verify risky changes.
14
- 12. Do not use teams, orchestration, structured proof, or tmux unless risk, user intent, or an approved route justifies it.
13
+ 11. Do not run broad tests for tiny changes, but do not under-verify risky, security-sensitive, or public work.
14
+ 12. Do not use teams, orchestration, structured proof, or tmux unless risk, user intent, learning value, or an approved route justifies it.
15
15
  13. Escalate risky work by asking or recommending, not by silently switching modes.
16
16
  14. For UI work, inspect real states and responsive behavior when feasible.
17
17
  15. For long-running processes, do not claim cleanup unless process exit is checked.
18
- 16. Keep final reports short and concrete.
18
+ 16. Explain useful change insight for non-specialists: what the touched code does, what changed, and why it matters.
19
+ 17. Use external references deliberately, preserve source clarity in research/proof notes, and rework good ideas into yam style.
20
+ 18. Treat security as the first project lens: identify sensitive surfaces early and guide safer defaults before convenience.
21
+ 19. Keep final reports short and concrete, but always include remaining tasks or state that none are meaningful.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,51 @@
2
2
 
3
3
  All notable changes to yam-flow are documented here.
4
4
 
5
+ ## v0.1.7 - 2026-06-12
6
+
7
+ ### Added
8
+
9
+ - Added `yam context pressure [dir] [--json]` to explain when project context is becoming stale, broad, or confusing enough to summarize, refresh the project pack, narrow scope, or deepen the route.
10
+ - Added `yam cleanup scan [dir] [--json]` as a read-only advisory cleanup report for active hooks, project-local skill folders, competing instruction surfaces, old install traces, and stale proof/runtime artifacts.
11
+ - Added `contextPressure` and `realProbe` sections to `yam tools doctor --json` so readiness reports show local availability without starting browsers, servers, databases, or long-running processes.
12
+ - Added `publishBlockerEvidence` to `yam release report --json` to classify common npm auth, permission, OTP, immutable-version, cache, registry, and tarball/package-boundary failures into beginner-readable next actions.
13
+ - Added `yam ueye preflight [dir] [--json]` for pre-work UI/design quality checks before screenshots are available.
14
+ - Added optional Ueye report fields: `--preflight-id`, `--p0-risk`, and `--quality-gate-note`.
15
+ - Added stronger runtime cleanup evidence fields for `started_at`, `stopped_at`, `exit_code`, `pid`, `port`, `cleanup_method`, `cleanup_observed`, and `left_running_intentionally`.
16
+
17
+ ### Improved
18
+
19
+ - Runtime cleanup claims no longer become `proven` from `--cleanup-checked` alone; observed cleanup plus exit/closure evidence is required.
20
+ - Ueye preflight can identify likely P0/P1 design risks while keeping completion truth capped until real implementation screenshot/comparison evidence exists.
21
+ - Release reports now turn likely npm publish blockers into safe next actions instead of leaving beginners with only raw npm logs.
22
+ - CLI smoke coverage now asserts JSON schemas and truth caps for context pressure, cleanup scan, tools doctor, Ueye preflight/report, and runtime cleanup evidence.
23
+
24
+ ### Verification
25
+
26
+ - `npm run typecheck`
27
+ - `npm run forbidden-names:check`
28
+ - `npm run verify:self`
29
+ - `npm run cli-smoke`
30
+ - `npm run dist:freshness`
31
+ - `npm run package-boundary:check`
32
+ - `npm_config_cache=/private/tmp/yam-npm-cache npm pack --dry-run`
33
+ - `node ./dist/bin/yam.js release report --json`
34
+
35
+ ## v0.1.6 - 2026-06-07
36
+
37
+ ### Added
38
+
39
+ - Added the Ueye Design Completion Gate so Ueye can own design/UI/UX completion quality instead of relying on a separate code-risk route to catch unfinished visual work.
40
+ - Added `yam ueye report --completion-claim`, `--strict`, `--design-score`, P0/P1, CTA, state, mobile/responsive, contrast/accessibility, direction, and reference-read gate fields.
41
+ - Added `yam proof --design-completion` so design completion evidence can cap proof truth status when a Ueye done claim is not supported.
42
+ - Added design completion sections to Ueye review and comparison templates.
43
+
44
+ ### Improved
45
+
46
+ - Ueye `done` claims now cap to partial or blocked when implementation evidence, design quality, P0/P1 status, state coverage, mobile/responsive checks, contrast/accessibility checks, CTA checks, or reference-read/comparison evidence is missing where relevant.
47
+ - Ueye report JSON now includes `design_completion_gate` in both the main run report and comparison report.
48
+ - Expanded CLI smoke coverage for Ueye completion gate success, partial, and blocked paths.
49
+
5
50
  ## v0.1.5 - 2026-06-04
6
51
 
7
52
  ### Added
package/COMMANDS.md CHANGED
@@ -42,9 +42,11 @@ yam template ueye-comparison
42
42
  Opt-in visual evidence helpers:
43
43
 
44
44
  ```bash
45
+ yam ueye preflight /path/to/project --json
45
46
  yam ueye capture --url http://localhost:3000 --out .yam/screens/home.png
46
47
  yam ueye compare --reference ./reference.png --actual .yam/screens/home.png
47
- yam ueye report --reference ./reference.png --actual .yam/screens/home.png --review-session-id pricing-card-v1 --provider-context local --execution-surface in-app-browser --browser-surface in-app-browser --similar "overall hierarchy" --different "button glow intensity" --missing "mobile state" --design-quality needs-polish --json
48
+ yam ueye report --reference ./reference.png --actual .yam/screens/home.png --preflight-id ueye-preflight-123 --p0-risk "mobile CTA may clip" --quality-gate-note "check CTA contrast before done" --review-session-id pricing-card-v1 --provider-context local --execution-surface in-app-browser --browser-surface in-app-browser --similar "overall hierarchy" --different "button glow intensity" --missing "mobile state" --design-quality needs-polish --json
49
+ 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
48
50
  yam media proof --requested --attempted --output ./generated.png --wait-loop --json
49
51
  yam proof --route ueye --truth partial --visual "browser/local screenshot comparison executed" --require-visual
50
52
  ```
@@ -115,6 +117,7 @@ Use the CLI to create and inspect the small project direction file.
115
117
  ```bash
116
118
  yam init-project /path/to/project
117
119
  yam pack /path/to/project
120
+ yam context pressure /path/to/project
118
121
  yam template mission
119
122
  ```
120
123
 
@@ -143,6 +146,8 @@ Read-only readiness and evidence helpers. These do not install, deploy, query da
143
146
  ```bash
144
147
  yam tools doctor /path/to/project
145
148
  yam tools doctor /path/to/project --json
149
+ yam context pressure /path/to/project --json
150
+ yam cleanup scan /path/to/project --json
146
151
  yam proof /path/to/project
147
152
  yam proof --route deep --truth verified --command "npm run build: pass"
148
153
  yam proof --route ueye --truth verified --visual "reference image only"
@@ -150,8 +155,10 @@ yam proof --route ueye --truth partial --visual-provenance '{"source_kind":"refe
150
155
  yam ueye capture --url http://localhost:3000 --out .yam/screens/home.png
151
156
  yam ueye compare --reference ./reference.png --actual .yam/screens/home.png --json
152
157
  yam ueye report --reference ./reference.png --actual .yam/screens/home.png --design-quality pass --provider-context local --execution-surface in-app-browser --browser-surface in-app-browser --json
158
+ 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"}'
153
159
  yam media proof --requested --attempted --output ./generated.png --wait-loop --json
154
- yam runtime evidence --backend terminal --claim observed --evidence-id dev-server-1 --command "npm run dev" --json
160
+ yam runtime evidence --backend terminal --claim observed --evidence-id dev-server-1 --command "npm run dev" --pid 123 --port 3000 --json
161
+ yam runtime evidence --backend terminal --claim cleanup-verified --cleanup-observed --exit-code 0 --cleanup-method "process exit checked" --json
155
162
  yam mission queue --agent-id implementer --scope "checkout form" --changed src/checkout.tsx --verification-hint "npm run typecheck" --rollback-hint "revert checkout form patch if typecheck or smoke fails" --json
156
163
  yam benchmark report --label "render time" --baseline 100 --current 86 --unit ms --target lower --json
157
164
  yam proof --route mission --mission-envelope '{"agent_id":"implementer","assigned_scope":"target component","changed_files":["src/file.ts"],"verification_hint":"npm run typecheck","truth_status":"partial"}'
@@ -177,7 +184,7 @@ yam template mission
177
184
  yam template tuning
178
185
  yam tools doctor /path/to/project --json
179
186
  yam release report --json
180
- yam runtime evidence --backend terminal --claim cleanup-verified --cleanup-checked --json
187
+ yam runtime evidence --backend terminal --claim cleanup-verified --cleanup-observed --exit-code 0 --cleanup-method "exit observed" --json
181
188
  yam mission queue --agent-id reviewer --scope "changed files review" --changed src/bin/yam.ts --verification-hint "npm run typecheck" --json
182
189
  yam benchmark report --label "bundle size" --baseline 120 --current 118 --unit kB --target lower --json
183
190
  ```
@@ -189,6 +196,8 @@ Supported report shapes:
189
196
  - Benchmark optimization loop lite: baseline, one change, rerun, keep/revert decision.
190
197
  - Structured diagnostic next action: severity, evidence, owner route, next action, truth status.
191
198
  - Ueye continuity/comparison: previous report, current report, comparison delta, design quality, next action.
199
+ - Context pressure: project pack age/size, memory summary, dirty scope, scripts, instruction surfaces, and route hint.
200
+ - Cleanup scan: advisory-only list of confusing surfaces with destructive=false.
192
201
 
193
202
  ## Lite Hook
194
203
 
package/DECISIONS.md CHANGED
@@ -1,13 +1,16 @@
1
1
  # yam Decision Baseline
2
2
 
3
- Every `yam` change is evaluated against strict proof, modular skill, and minimal-core harness principles.
3
+ Every `yam` change is evaluated against honest proof, progressive depth, security-first guidance, modular skills, and useful non-specialist insight.
4
4
 
5
5
  ## Fixed Questions
6
6
 
7
7
  1. What needs concrete evidence before completion?
8
8
  2. What should stay selective or low-context?
9
9
  3. What can be removed to keep the core obeyable?
10
- 4. What should `yam` keep light by default, and what should deepen deliberately?
10
+ 4. What should `yam` keep fast by default, and what should deepen deliberately?
11
+ 5. What security surface could a non-specialist miss?
12
+ 6. What should the user learn from this change?
13
+ 7. Which external references informed the judgment, and how were those ideas reworked into yam style?
11
14
 
12
15
  ## Keep
13
16
 
@@ -27,12 +30,28 @@ Every `yam` change is evaluated against strict proof, modular skill, and minimal
27
30
  - Token optimization.
28
31
  - Project-specific rules instead of global bloat.
29
32
 
30
- ### Minimal Core
33
+ ### Progressive Core
31
34
 
32
35
  - Short core.
33
36
  - Few route names.
34
37
  - Minimal context.
35
38
  - Rules the model can actually follow.
39
+ - Fast momentum without pretending simple work is always enough.
40
+ - Depth growth when the user's understanding, project risk, or product quality benefits from it.
41
+
42
+ ### Beginner Insight
43
+
44
+ - Explain changed behavior in plain language.
45
+ - Name the code area touched and what it is responsible for.
46
+ - Separate implementation facts from judgment.
47
+ - Always close with remaining tasks or useful improvements.
48
+
49
+ ### Security First
50
+
51
+ - Treat auth, payment, DB, secrets, permissions, deployment, and public release as first-class risk surfaces.
52
+ - Prefer read-only inspection before sensitive writes.
53
+ - Do not hide destructive or production-like risk behind convenience.
54
+ - Make safer defaults visible to the user.
36
55
 
37
56
  ## Reject
38
57
 
@@ -50,11 +69,13 @@ Every `yam` change is evaluated against strict proof, modular skill, and minimal
50
69
  - Hook runtime by default.
51
70
  - Too many always-on rules.
52
71
 
53
- ### From Minimal Core
72
+ ### From Progressive Core
54
73
 
55
74
  - Under-verification.
56
75
  - Vague quality rules.
57
76
  - No route structure for risky work.
77
+ - Lightweight-only posture that prevents the harness from teaching or protecting the user.
78
+ - Broad ceremony that does not produce insight, security, or evidence.
58
79
 
59
80
  ## yam Standard
60
81
 
@@ -62,9 +83,11 @@ Every `yam` change is evaluated against strict proof, modular skill, and minimal
62
83
  Direction before execution.
63
84
  Context-reuse first.
64
85
  Token-aware by default.
65
- Start fast.
86
+ Start with momentum.
66
87
  Deepen deliberately.
67
88
  Basic direction fit and honest verification always.
89
+ Security first.
90
+ Explain what changed.
68
91
  Honest by design.
69
92
  Heavy proof when risk or user intent calls for it.
70
93
  ```
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  ```text
6
6
  Direction before execution.
7
- Start fast.
7
+ Start with momentum.
8
8
  Deepen deliberately.
9
9
  Basic direction fit and honest verification always.
10
10
  Honest by design.
@@ -12,6 +12,9 @@ Heavy proof when risk or user intent calls for it.
12
12
  Token-aware by default.
13
13
  Context-reuse first.
14
14
  End with remaining tasks and fix-first items.
15
+ Security-first project guidance.
16
+ Useful change insight for non-specialists.
17
+ Reference-led judgment with clear source boundaries.
15
18
  ```
16
19
 
17
20
  ## Routes
@@ -34,9 +37,12 @@ See `ROADMAP.md` for remaining implementation stages.
34
37
  - No automatic proof loops.
35
38
  - No automatic tmux.
36
39
  - No false completion claims: verification, cleanup, and visual checks must match actual evidence.
37
- - `yam` is not lightweight-only; it is progressive: quick entry, stronger proof as scope/risk grows.
40
+ - `yam` is not lightweight-only; it is progressive: fast direction, broader judgment when useful, stronger proof as scope/risk grows.
38
41
  - Every route should check project direction and use an honest verification level.
39
42
  - Small work stays small, but serious work is allowed to become serious.
43
+ - Security-sensitive work is never treated as ordinary polish.
44
+ - Useful reports explain what the changed code does, how it changed, and why the change matters.
45
+ - Research and reference scans should keep source boundaries clear, then rework good ideas into yam style.
40
46
  - Token economy is part of quality.
41
47
  - Project packs prevent re-reading and re-planning from scratch.
42
48
  - Memory is opt-in, project-local, and sparse.
@@ -123,13 +129,17 @@ yam verify
123
129
  yam doctor
124
130
  yam tools doctor /path/to/project
125
131
  yam tools doctor /path/to/project --json
132
+ yam context pressure /path/to/project --json
133
+ yam cleanup scan /path/to/project --json
126
134
  yam proof /path/to/project
127
135
  yam proof write /path/to/project --route quick --truth verified --command "npm run verify:self: pass"
128
136
  yam proof --route ueye --truth verified --visual "reference image only"
129
137
  yam proof --route ueye --truth partial --visual-provenance '{"source_kind":"reference","source_hash":"unknown","comparison_result":"not-verified","truth_status":"partial"}'
130
138
  yam ueye capture --url http://localhost:3000 --out .yam/screens/home.png
131
139
  yam ueye compare --reference ./reference.png --actual .yam/screens/home.png
132
- yam ueye report --reference ./reference.png --actual .yam/screens/home.png --design-quality needs-polish --provider-context local --execution-surface in-app-browser --app-surface codex-app --browser-surface in-app-browser --preserved-state --json
140
+ yam ueye preflight /path/to/project --json
141
+ yam ueye report --reference ./reference.png --actual .yam/screens/home.png --preflight-id ueye-preflight-123 --p0-risk "mobile CTA may clip" --quality-gate-note "check CTA contrast before done" --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 --app-surface codex-app --browser-surface in-app-browser --preserved-state --json
142
+ 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"}'
133
143
  yam media proof --requested --attempted --output ./generated.png --wait-loop --json
134
144
  yam proof --route mission --mission-envelope '{"agent_id":"implementer","assigned_scope":"target component","changed_files":["src/file.ts"],"verification_hint":"npm run typecheck","truth_status":"partial"}'
135
145
  yam release report --json
@@ -174,15 +184,22 @@ Publishing still requires confirming the final npm package name and account acce
174
184
  - completion proof shape
175
185
  - truth caps
176
186
  - fake versus real distinction
187
+ - security-first risk signals
177
188
  - runtime truth matrix
178
189
  - visual evidence caps
179
190
  - Ueye visual run reports
180
191
  - Ueye surface context metadata
192
+ - Ueye design completion gate
181
193
  - runtime backend evidence
182
194
  - runtime evidence mini summaries
183
195
  - mission patch queue lite records
184
196
  - release report JSON
185
197
  - structured diagnostic next actions
198
+ - context pressure summaries
199
+ - advisory cleanup scans
200
+ - publish blocker evidence
201
+ - change insight reporting
202
+ - reference source boundary notes
186
203
  - media generation proof caps
187
204
  - DB/Supabase safety signals
188
205
 
@@ -195,10 +212,14 @@ These shapes keep reports machine-readable without turning normal work into a he
195
212
  - Runtime evidence mini: compact route, command/process, observation, cleanup, truth status, and next action fields for `$deep` or `$mission` runtime claims.
196
213
  - Patch queue lite: `$mission` lane records with pending/applied/verified/reverted/blocked state, changed files, verification hint, rollback hint, truth status, and next action.
197
214
  - Release report JSON: `yam release report --json` summarizes typecheck, forbidden-name scan, package boundary, registry status, CLI smoke, dist freshness, diagnostics, and final truth status.
215
+ - Publish blocker evidence: release reports classify common npm auth, permission, OTP, immutable-version, cache, registry, and tarball failures into safe next actions.
216
+ - Context pressure: `yam context pressure` explains when project context is getting stale, broad, or confusing enough to summarize, refresh, narrow scope, or deepen route.
217
+ - Cleanup scan: `yam cleanup scan` is read-only and advisory; it reports confusing hooks, local skill folders, stale traces, or old proof artifacts without deleting anything.
198
218
  - Benchmark optimization loop lite: use `yam measure <route>` and `yam template tuning` to record baseline, one route wording change, rerun result, keep/revert decision, and stop condition.
199
219
  - Structured diagnostic next action: every doctor/release diagnostic should say what was observed, what evidence supports it, what to do next, owner route, severity, and truth status.
200
220
  - Ueye review continuity/comparison report: `$ueye` run reports can link a previous review, current evidence, comparison delta, design quality result, and next action.
201
221
  - Ueye surface context: `$ueye` run reports can record provider context, provider badge, execution surface, app surface, browser surface, control mode, preserved URL/state, and evidence id.
222
+ - Ueye design completion gate: `$ueye` can stay fast for draft work, but a `done` claim is capped until implementation evidence, comparison/design-quality status, P0/P1 status, key states, mobile/responsive behavior, contrast/accessibility visuals, CTA affordance, and direction/reference-read proof are recorded when relevant.
202
223
 
203
224
  ## Ueye Capture And Compare
204
225
 
@@ -207,14 +228,17 @@ These shapes keep reports machine-readable without turning normal work into a he
207
228
  ```bash
208
229
  yam ueye capture --url http://localhost:3000 --out .yam/screens/home.png
209
230
  yam ueye compare --reference ./reference.png --actual .yam/screens/home.png --json
210
- yam ueye report --reference ./reference.png --actual .yam/screens/home.png --design-quality pass --provider-context local --execution-surface in-app-browser --browser-surface in-app-browser --preserved-state --json
231
+ yam ueye preflight . --json
232
+ 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
211
233
  ```
212
234
 
213
235
  `capture` uses a Playwright install from the current project when present, then falls back to the package context. It does not install browsers or add runtime dependencies by itself. If capture is unavailable, the visual claim stays `partial` or `blocked` until a real screenshot is supplied.
214
236
 
215
237
  `compare` is local-only and dependency-free. It records file hashes, dimensions, comparison result, and proof-ready visual provenance. Exact image matches can be `verified`; different screenshots stay `partial` so visual parity is not overclaimed.
216
238
 
217
- `report` gathers reference sources, implementation screenshots, comparison result, continuity fields, design quality judgment, surface context, and next action into one compact proof-ready JSON object.
239
+ `report` gathers reference sources, implementation screenshots, comparison result, continuity fields, design quality judgment, design completion gate, surface context, and next action into one compact proof-ready JSON object. Draft and needs-polish work can stay fast; `--completion-claim done` turns on the stricter design gate.
240
+
241
+ `preflight` does not claim visual verification. It is a pre-work checklist for reference source, target states, mobile/responsive needs, CTA/contrast/accessibility risk, screenshot availability, and likely P0/P1 candidates.
218
242
 
219
243
  Generated media can guide visual direction, but it cannot prove the implemented UI by itself:
220
244
 
package/ROADMAP.md CHANGED
@@ -97,7 +97,7 @@ Tasks:
97
97
 
98
98
  ### 8. Scout / Research Workflow
99
99
 
100
- Goal: give yam a research lane that is evidence-bound, lightweight, and decision-oriented.
100
+ Goal: give yam a research lane that is broad enough to create better judgment, evidence-bound enough to stay honest, and compressed enough to remain usable.
101
101
 
102
102
  Research reference points:
103
103
 
@@ -115,7 +115,7 @@ Tasks:
115
115
  - macro view: broad direction and category movement
116
116
  - realistic view: near-term feasibility and cost
117
117
  - future view: second-order effects and durable bets
118
- - Keep source count bounded by default; heavy research remains opt-in. Done.
118
+ - Match source count to the decision: focused scouts use a few high-signal sources, broad scouts may use more. Done.
119
119
  - Avoid making research a default gate for implementation. Done.
120
120
 
121
121
  ### 9. Question Workflow