yam-flow 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/AGENTS.md +18 -0
  2. package/COMMANDS.md +152 -0
  3. package/DECISIONS.md +70 -0
  4. package/LICENSE +21 -0
  5. package/README.md +174 -0
  6. package/ROADMAP.md +313 -0
  7. package/dist/bin/yam.d.ts +2 -0
  8. package/dist/bin/yam.js +2005 -0
  9. package/dist/lib/trust-kernel.d.ts +99 -0
  10. package/dist/lib/trust-kernel.js +300 -0
  11. package/package.json +101 -0
  12. package/references/context-reuse.md +59 -0
  13. package/references/current-docs.md +45 -0
  14. package/references/db-supabase-safety-lite.md +40 -0
  15. package/references/doctor-scan.md +56 -0
  16. package/references/eye.md +30 -0
  17. package/references/final-report.md +61 -0
  18. package/references/honest-completion.md +61 -0
  19. package/references/hook-lite.md +55 -0
  20. package/references/markdown-management.md +56 -0
  21. package/references/memory.md +59 -0
  22. package/references/mission.md +86 -0
  23. package/references/question.md +25 -0
  24. package/references/quick.md +70 -0
  25. package/references/risk-escalation.md +27 -0
  26. package/references/runtime-orchestration.md +57 -0
  27. package/references/scout.md +38 -0
  28. package/references/token-budget-reporter.md +44 -0
  29. package/references/token-economy.md +61 -0
  30. package/references/tool-trust-layer.md +115 -0
  31. package/references/trust-kernel.md +55 -0
  32. package/references/truth-matrix.md +47 -0
  33. package/references/ueye-proof.md +109 -0
  34. package/references/ueye.md +174 -0
  35. package/references/ui-quality.md +23 -0
  36. package/references/verification-levels.md +53 -0
  37. package/skills/deep/SKILL.md +77 -0
  38. package/skills/mission/SKILL.md +105 -0
  39. package/skills/question/SKILL.md +45 -0
  40. package/skills/quick/SKILL.md +81 -0
  41. package/skills/scout/SKILL.md +71 -0
  42. package/skills/ueye/SKILL.md +132 -0
  43. package/src/bin/yam.ts +1988 -0
  44. package/src/lib/trust-kernel.ts +398 -0
  45. package/templates/mission-plan.md +46 -0
  46. package/templates/runtime-proof.md +54 -0
  47. package/templates/tuning-log.md +39 -0
  48. package/templates/ueye-comparison.md +78 -0
  49. package/templates/ueye-review.md +110 -0
  50. package/templates/yam.project.md +73 -0
  51. package/tsconfig.json +27 -0
  52. package/yam.manifest.json +48 -0
@@ -0,0 +1,44 @@
1
+ # Token Budget Reporter
2
+
3
+ `yam` tracks token pressure without hooks or automatic surveillance.
4
+
5
+ Use the CLI after a run when you want a quick budget check:
6
+
7
+ ```bash
8
+ yam measure quick --files 3 --commands 1 --report-lines 5 --seconds 40
9
+ yam measure ueye --files 7 --commands 2 --report-lines 18 --seconds 260
10
+ ```
11
+
12
+ ## Metrics
13
+
14
+ - `files`: files or large snippets intentionally read.
15
+ - `commands`: verification or inspection commands that materially shaped the answer.
16
+ - `report-lines`: approximate final answer length in rendered lines.
17
+ - `seconds`: rough elapsed working time.
18
+
19
+ ## Meaning
20
+
21
+ `ok` means the run fit the route's intended weight.
22
+
23
+ `over budget` means the route may still be valid, but the next run should either narrow scope or intentionally choose a heavier route.
24
+
25
+ `no measurements` means no actuals were provided; use `yam budget <route>` for static limits.
26
+
27
+ ## Route Policy
28
+
29
+ - `$quick`: should stay small. If it repeatedly exceeds budget, the request is probably `$deep` or `$mission`.
30
+ - `$ueye`: may use visual/browser checks and nearby design context, but should avoid broad design archaeology unless the user asked for design-heavy work.
31
+ - `$question`: should answer directly. If it needs sources or comparison, switch to `$scout`.
32
+ - `$scout`: may gather a bounded set of high-signal sources and should separate evidence from judgment.
33
+ - `$deep`: can exceed ordinary budgets, but the reason must be risk-tied; single-agent runtime/tmux/browser checks belong here when verification needs them.
34
+ - `$mission`: can spend more context on real subagent/team lanes, cross-verification, doctor scan, and runtime evidence, but only for approved plans where real subagents are used or explicitly unavailable/partial.
35
+
36
+ ## Design Baseline
37
+
38
+ Strict proof would favor stronger automatic evidence collection.
39
+
40
+ Modular skill workflows favor selective, low-context reporting.
41
+
42
+ Minimal-core design removes the measurement unless it changes behavior.
43
+
44
+ `yam` keeps manual measurement because it helps reduce over-reading without installing hooks.
@@ -0,0 +1,61 @@
1
+ # Token Economy
2
+
3
+ Token economy is part of quality.
4
+
5
+ Default behavior:
6
+
7
+ - Read `yam.project.md` first when present.
8
+ - Start with the narrowest likely file set.
9
+ - Prefer `rg`, file names, and local snippets over broad reading.
10
+ - Read nearby patterns before reading whole modules.
11
+ - Summarize large files instead of loading full context when possible.
12
+ - Stop searching once the edit surface is clear.
13
+ - Do not open long docs or generated files unless they are directly needed.
14
+ - Treat `yam.project.md` as the reusable context source; inspect it with `yam pack` when it seems stale.
15
+ - Do not produce long reports for small work.
16
+ - Use `yam measure <route>` after real runs when budget drift needs tuning.
17
+
18
+ Suggested read budgets:
19
+
20
+ ```text
21
+ quick
22
+ - Start with 1 to 3 files for patch work.
23
+ - Allow a small module or error surface only when the first hypothesis fails or the scan points wider.
24
+ - Prefer one focused command, two at most.
25
+
26
+ ueye
27
+ - Project direction, source screen, target component, nearby styles/tokens.
28
+ - Avoid full design-system archaeology for simple tweaks.
29
+ - Visual claims require source-screen evidence or a partial truth cap.
30
+
31
+ question
32
+ - 0 to 2 files.
33
+ - Prefer current conversation context and stable knowledge.
34
+ - Switch to scout when evidence, source freshness, or comparison matters.
35
+
36
+ scout
37
+ - 3 to 7 high-signal sources.
38
+ - Prefer official docs and primary sources.
39
+
40
+ deep
41
+ - Wider single-agent reading is allowed, but explain why.
42
+ - Runtime/tmux/browser context should be tied to verification evidence.
43
+
44
+ mission
45
+ - Wider reading is allowed only for approved real subagent/team execution.
46
+ - Runtime/tmux/browser context should be tied to mission evidence.
47
+ ```
48
+
49
+ Measured budgets:
50
+
51
+ ```bash
52
+ yam measure quick --files 3 --commands 1 --report-lines 5 --seconds 40
53
+ yam measure deep --files 18 --commands 4 --report-lines 32 --seconds 900
54
+ ```
55
+
56
+ Escalate reading only when:
57
+
58
+ - The first edit surface is wrong.
59
+ - Tests or runtime output contradict the hypothesis.
60
+ - Risk surface is broader than expected.
61
+ - The user asks for deeper analysis.
@@ -0,0 +1,115 @@
1
+ # Tool Trust Layer
2
+
3
+ `yam` should grow a proof-first trust layer, but not a proof-first cage.
4
+
5
+ The goal is to help a beginner start small and then move toward professional implementation with evidence, without making every step feel like a release gate.
6
+ This is not a lightweight-only direction. `yam-lite` is light; `yam` is progressive.
7
+
8
+ ## Depth Ladder
9
+
10
+ Every route carries a basic contract:
11
+
12
+ - respect project direction before changing code
13
+ - use context packs or memory before broad re-reading
14
+ - verify only what was actually checked
15
+ - report remaining tasks and fix-first issues when useful
16
+
17
+ Then depth increases by route:
18
+
19
+ - `$question`: answer without unnecessary research.
20
+ - `$scout`: investigate and judge without implementation by default.
21
+ - `$quick`: implement quickly with focused verification.
22
+ - `$ueye`: implement/review UI with real visual evidence when feasible.
23
+ - `$deep`: prove risky single-agent work with stronger runtime/tool evidence.
24
+ - `$mission`: coordinate real subagents/team lanes with cross-verification.
25
+
26
+ ## Surfaces To Wrap
27
+
28
+ - Codex CLI/App readiness.
29
+ - Browser and Computer Use availability.
30
+ - tmux and long-running process lifecycle.
31
+ - Subagent/team availability for `$mission`.
32
+ - imagegen or screenshot evidence for `$ueye`.
33
+ - Context7 or official docs for current package/API questions.
34
+ - codex-lb or provider routing health when configured.
35
+ - DB/Supabase safety for destructive or migration work.
36
+ - Research, QA, wiki/context, proof, and release-gate workflows.
37
+
38
+ ## yam Policy
39
+
40
+ Default:
41
+
42
+ - No automatic trust gate.
43
+ - No automatic proof loop.
44
+ - No automatic tmux.
45
+ - No automatic subagents.
46
+ - No automatic external provider setup.
47
+ - Basic direction fit and honest verification boundaries still apply.
48
+
49
+ Advisory:
50
+
51
+ - `yam-lite` hook may suggest routes and warn about overclaiming.
52
+ - `yam pack` may warn about stale project direction, command drift, active hooks, or legacy proof surfaces.
53
+
54
+ On demand:
55
+
56
+ - `$quick`: smallest honest local verification.
57
+ - `$ueye`: visual evidence and truth caps.
58
+ - `$deep`: single-agent heavy proof, runtime/tmux/browser/process cleanup.
59
+ - `$mission`: real subagent/team execution with cross-verification.
60
+ - `yam tools doctor`: inspect tool readiness without changing project state.
61
+ - `yam proof`: summarize actual evidence without running verification.
62
+ - `src/lib/trust-kernel.ts`: classify evidence, cap truth claims, distinguish fake/real proof, and summarize runtime truth.
63
+
64
+ ## Strict Proof Inputs
65
+
66
+ - Tool readiness checks.
67
+ - Hook status and trust reporting.
68
+ - DB/Supabase destructive-operation gate thinking.
69
+ - Computer Use and screenshot evidence caps.
70
+ - tmux/process cleanup truth.
71
+ - Source-intelligence proof for current docs.
72
+ - Destructive DB/Supabase command detection and production-write caution.
73
+ - Fake-vs-real and runtime truth matrix checks, reduced to local route-scoped helpers.
74
+ - Feature/release inventory as an optional doctor, not a default gate.
75
+
76
+ ## Modular Skill Inputs
77
+
78
+ - Selective install and profiles.
79
+ - Evidence boundaries.
80
+ - Low-context command detection.
81
+ - Optional orchestration instead of always-on orchestration.
82
+
83
+ ## Design Quality Inputs
84
+
85
+ - Real preview/screenshot evidence.
86
+ - Compact design direction.
87
+ - P0 visual gates for design-heavy work.
88
+
89
+ ## Reject
90
+
91
+ - Always-on Team route.
92
+ - Always-on hook enforcement.
93
+ - Release gates for normal coding.
94
+ - Mandatory generated image review for every UI task.
95
+ - Broad MCP/tool scans before small work.
96
+ - Provider config mutation without explicit user approval.
97
+
98
+ ## Implemented Shape
99
+
100
+ `yam tools doctor` should be read-only by default:
101
+
102
+ - report installed/available tools
103
+ - report package scripts
104
+ - report hook conflicts
105
+ - report known high-risk surfaces
106
+ - suggest route and proof level
107
+ - do not install, configure, or mutate
108
+
109
+ `yam proof` should summarize what actually ran:
110
+
111
+ - command evidence
112
+ - browser/screenshot evidence
113
+ - runtime/tmux/process cleanup evidence
114
+ - truth status
115
+ - skipped/blocked/assumed items
@@ -0,0 +1,55 @@
1
+ # Trust Kernel
2
+
3
+ This is the small trust kernel that keeps `yam` honest without turning every task into a release gate.
4
+
5
+ `yam` implements these ideas as small local functions. It does not install always-on gates, external runtimes, or hidden orchestration.
6
+
7
+ ## Included
8
+
9
+ - completion proof shape
10
+ - route/truth status separation
11
+ - fake versus real evidence distinction
12
+ - runtime truth matrix idea
13
+ - visual evidence caps
14
+ - DB/Supabase destructive-signal detection
15
+
16
+ ## Rejected
17
+
18
+ - always-on release gates
19
+ - mandatory team/subagent evidence for normal work
20
+ - mandatory tmux lifecycle proof for small work
21
+ - image voxel ledger as a default requirement
22
+ - broad source/tool scans before ordinary changes
23
+
24
+ ## yam Shape
25
+
26
+ Implemented as:
27
+
28
+ ```text
29
+ src/lib/trust-kernel.ts
30
+ ```
31
+
32
+ The module provides:
33
+
34
+ - `TRUTH_STATUSES`
35
+ - DB/Supabase safety detection
36
+ - evidence classification
37
+ - truth cap application
38
+ - fake/real policy
39
+ - runtime truth matrix
40
+ - completion proof object creation
41
+
42
+ ## Policy
43
+
44
+ Use the kernel to prevent overclaiming.
45
+
46
+ Do not use it to slow every task down.
47
+
48
+ For example:
49
+
50
+ - Reference image only cannot become full visual `verified`.
51
+ - Mock/fixture evidence cannot become real runtime `proven`.
52
+ - Required runtime evidence that is missing becomes `real_required_missing`.
53
+ - Cleanup claims require cleanup evidence.
54
+
55
+ This keeps the trust layer progressive and route-scoped.
@@ -0,0 +1,47 @@
1
+ # Truth Matrix
2
+
3
+ Use precise verification language.
4
+
5
+ ```text
6
+ verified
7
+ Actual command, browser check, screenshot, or test passed.
8
+
9
+ proven
10
+ Runtime-specific: physical or process evidence supports the claim, such as a live server response, browser check, tmux pane evidence, or verified process exit.
11
+
12
+ partial
13
+ Some meaningful checks passed, but not the full surface.
14
+
15
+ fixture_only
16
+ Fixture or mock evidence exists, but it cannot support a real runtime claim.
17
+
18
+ fixture_instrumented_real
19
+ A real backend or process was involved, but the run was shaped by fixture instrumentation. Do not report it as fully proven.
20
+
21
+ integration_optional
22
+ A live integration/runtime check was optional and not requested. This is not a failure, but it is not verified.
23
+
24
+ real_required_missing
25
+ The user or route required live runtime evidence, but that evidence was unavailable.
26
+
27
+ skipped
28
+ Verification intentionally skipped because the change is tiny or not runnable.
29
+
30
+ blocked
31
+ Verification could not run because of environment, tool, auth, network, or time limits.
32
+
33
+ assumed
34
+ Reasonable inference from code reading, but no execution evidence.
35
+ ```
36
+
37
+ Never say `verified` when the correct status is `partial`, `skipped`, `blocked`, or `assumed`.
38
+
39
+ Never say `proven` for runtime work unless the runtime evidence exists.
40
+
41
+ Never say full visual `verified` when the only evidence is a reference image, generated image, code reading, or text-only critique.
42
+
43
+ For ordinary routes, prefer `verified`, `partial`, `skipped`, `blocked`, or `assumed`.
44
+ For `$deep` runtime verification and `$mission`, use the more precise runtime statuses when they prevent overclaiming.
45
+
46
+ `yam` implements a small truth cap in `src/lib/trust-kernel.ts`.
47
+ If requested truth is stronger than evidence, cap it downward and report the cap.
@@ -0,0 +1,109 @@
1
+ # Ueye Proof
2
+
3
+ Ueye proof keeps visual claims honest without turning design review into a heavy release gate.
4
+
5
+ ## When To Use
6
+
7
+ Use Ueye proof artifacts when:
8
+
9
+ - The user asks for UI/UX/design review.
10
+ - A reference image, screenshot, or target design is part of the task.
11
+ - The final answer needs to claim visual quality, visual parity, or responsive correctness.
12
+ - A screenshot or browser check exists and should be tied to the conclusion.
13
+
14
+ Skip or compress them when:
15
+
16
+ - The change is text-only or documentation-only.
17
+ - The user asks for a quick opinion and no visual source exists.
18
+ - The only possible evidence is code reading; mark the result `assumed` or `partial`.
19
+
20
+ ## Artifact Set
21
+
22
+ ### Visual Evidence Inventory
23
+
24
+ Purpose: identify what visual sources were inspected.
25
+
26
+ Minimum useful fields:
27
+
28
+ - Label:
29
+ - Type:
30
+ - Path/URL:
31
+ - Dimensions:
32
+ - sha256:
33
+ - Viewport:
34
+ - State:
35
+ - Role:
36
+
37
+ Bounds:
38
+
39
+ - Default to 1-3 primary visual sources.
40
+ - Cap ordinary inventories at 5 rows.
41
+ - Record missing dimensions or hashes as `unknown`, not as failure.
42
+ - Use generated annotations only as derivative aids.
43
+
44
+ ### Reference Read Proof
45
+
46
+ Purpose: separate reading the reference from judging the implementation.
47
+
48
+ Capture:
49
+
50
+ - Layout:
51
+ - Hierarchy:
52
+ - Typography:
53
+ - Color/contrast:
54
+ - Component detail:
55
+ - Interaction/motion:
56
+ - Responsiveness:
57
+ - Brand/mood:
58
+
59
+ Keep this concise. It should explain what the reference asks for, not become a full design essay.
60
+
61
+ ### Reference vs Implementation Matrix
62
+
63
+ Purpose: compare reference direction against the actual implementation evidence.
64
+
65
+ Status values:
66
+
67
+ - `matched`
68
+ - `similar`
69
+ - `different`
70
+ - `not-verified`
71
+ - `not-applicable`
72
+
73
+ Rows to use only when relevant:
74
+
75
+ - Layout and spacing.
76
+ - Visual hierarchy.
77
+ - Typography.
78
+ - Color and contrast.
79
+ - Component detail.
80
+ - Interaction and motion.
81
+ - Responsiveness.
82
+ - Accessibility-relevant visuals.
83
+ - Brand and mood fit.
84
+
85
+ ### Design Quality Review
86
+
87
+ Purpose: judge the implemented UI on design quality after evidence is established.
88
+
89
+ Dimensions:
90
+
91
+ - Visual hierarchy.
92
+ - Layout and spacing.
93
+ - Typography.
94
+ - Color and contrast.
95
+ - Component detail.
96
+ - Interaction and motion.
97
+ - Responsiveness.
98
+ - Accessibility.
99
+ - Brand and mood fit.
100
+
101
+ Report findings as P0-P3. Keep P2/P3 short unless the user requested a full polish pass.
102
+ For each relevant design dimension, use `pass`, `needs-polish`, or `fails`.
103
+
104
+ ## Truth Caps
105
+
106
+ - Full visual verification requires real implementation evidence and relevant recheck.
107
+ - Reference-only evidence can support direction, not implementation proof.
108
+ - Generated-only evidence can support ideation or annotation, not implemented-screen verification.
109
+ - Missing screenshots, unavailable browser, or text-only review should cap the result at `partial`, `blocked`, or `assumed`.
@@ -0,0 +1,174 @@
1
+ # Ueye
2
+
3
+ `ueye` is the merged UI/design route: design-heavy implementation, screenshot-led UX review, and visual QA.
4
+
5
+ ## Selected Principles
6
+
7
+ Visual proof:
8
+
9
+ - Source-screen inventory before visual claims.
10
+ - P0-P3 issue ledger.
11
+ - Fix P0/P1 first, then cheap local P2 issues.
12
+ - Recheck changed or high-risk screens after fixes when feasible.
13
+ - Cap text-only or missing-screenshot reviews as partial instead of fully verified.
14
+
15
+ Kept out by design:
16
+
17
+ - Mandatory generated annotated images.
18
+ - Image voxel ledgers.
19
+ - Release gates for every UI change.
20
+ - Always-on proof loops.
21
+
22
+ Design quality:
23
+
24
+ - Real examples and previews matter more than abstract prose.
25
+ - Design direction should be compact and searchable.
26
+ - P0 gates should reject placeholder visuals, generic UI, and broken responsive states.
27
+ - UI work should be self-contained enough to inspect.
28
+
29
+ Evidence boundaries:
30
+
31
+ - Separate evidence from judgment.
32
+ - Keep review output compact.
33
+ - Escalate only when the risk justifies it.
34
+
35
+ ## Source-Screen Inventory
36
+
37
+ Acceptable sources:
38
+
39
+ - User-provided screenshot.
40
+ - Browser screenshot from a local or remote URL.
41
+ - Exported static artifact image.
42
+ - Current screen when the browser tool can inspect it.
43
+ - Reference image, as direction evidence only.
44
+ - Generated annotated image, as derivative review aid only.
45
+
46
+ Record:
47
+
48
+ - Source type.
49
+ - Screen or URL.
50
+ - State: default, loading, error, empty, disabled, hover/focus, mobile, or unknown.
51
+ - Whether visual verification is full, partial, skipped, or blocked.
52
+
53
+ Bound:
54
+
55
+ - Inspect 1-3 primary images by default.
56
+ - Keep the source-screen inventory to the 5 most important rows by default.
57
+ - Generated callout images are optional and should usually be at most one per review pass.
58
+ - P0/P1 issues can expand the review; P2/P3 should stay top-few unless the user asks for a full polish pass.
59
+
60
+ ## Ueye Proof Artifacts
61
+
62
+ Use these when the task depends on visual truth, reference matching, or design quality judgment. They are proof aids, not a separate lite/deep split.
63
+
64
+ 1. Visual Evidence Inventory.
65
+ 2. Reference Read Proof.
66
+ 3. Reference vs Implementation Matrix.
67
+ 4. Design Quality Review.
68
+
69
+ Default bound:
70
+
71
+ - Use only the artifacts that support the claim being made.
72
+ - Keep evidence to the smallest set of screenshots, references, or URLs that can honestly support the result.
73
+ - Prefer paths, URLs, dimensions, and hashes for images when available.
74
+ - Do not require voxel grids, exhaustive callouts, or generated annotations.
75
+ - Do not let proof artifacts turn Ueye into always-on heavy orchestration.
76
+
77
+ ### Visual Evidence Inventory
78
+
79
+ Record the real screens and image sources behind the review.
80
+
81
+ Include when known:
82
+
83
+ - Label.
84
+ - Type: implementation screenshot, browser URL, user screenshot, reference image, artifact export, generated annotation.
85
+ - Path or URL.
86
+ - Dimensions.
87
+ - sha256.
88
+ - Viewport or device.
89
+ - State: default, loading, error, empty, disabled, hover/focus, mobile, or unknown.
90
+ - Role: proof, reference direction, annotation, or partial evidence.
91
+
92
+ Images without hashes or dimensions can still be useful, but mark the missing fields plainly.
93
+
94
+ ### Reference Read Proof
95
+
96
+ Before judging a reference match, state what was actually read from the reference.
97
+
98
+ Keep it visual and bounded:
99
+
100
+ - Layout structure.
101
+ - Hierarchy and emphasis.
102
+ - Typography feel.
103
+ - Color and contrast.
104
+ - Component shapes and details.
105
+ - Interaction or motion cues when visible.
106
+ - Responsive implication if the reference includes multiple sizes.
107
+ - Brand or mood fit.
108
+
109
+ Reference read proof describes the direction. It is not proof that the implementation matches.
110
+
111
+ ### Reference vs Implementation Matrix
112
+
113
+ Use when a user supplies, names, or implies a reference visual.
114
+
115
+ Compare only meaningful dimensions:
116
+
117
+ - Layout and spacing.
118
+ - Visual hierarchy.
119
+ - Typography.
120
+ - Color and contrast.
121
+ - Component detail.
122
+ - Interaction and motion.
123
+ - Responsiveness.
124
+ - Accessibility-relevant visual behavior.
125
+ - Brand or mood fit.
126
+
127
+ For each row, record `matched`, `similar`, `different`, `not-verified`, or `not-applicable`, plus the smallest evidence note.
128
+
129
+ ### Design Quality Review
130
+
131
+ Use as the judgment layer after evidence is separated and reference comparison is complete.
132
+
133
+ Review dimensions:
134
+
135
+ - Visual hierarchy.
136
+ - Layout and spacing.
137
+ - Typography.
138
+ - Color and contrast.
139
+ - Component detail.
140
+ - Interaction and motion.
141
+ - Responsiveness.
142
+ - Accessibility.
143
+ - Brand and mood fit.
144
+
145
+ For each relevant dimension, record `pass`, `needs-polish`, or `fails`.
146
+ Keep actionable findings in P0-P3 order. Prefer fixing P0/P1 and cheap local P2 issues before broad polish.
147
+
148
+ ## P0-P3 Ledger
149
+
150
+ - P0: blocker, unusable, impossible to complete primary workflow, severe accessibility or responsive failure.
151
+ - P1: major issue that strongly harms conversion, comprehension, trust, or task completion.
152
+ - P2: noticeable quality issue: spacing, alignment, hierarchy, contrast, density, state polish.
153
+ - P3: optional polish.
154
+
155
+ ## Implementation Loop
156
+
157
+ 1. Direction fit.
158
+ 2. Visual Evidence Inventory.
159
+ 3. Reference Read Proof when a reference is used.
160
+ 4. Nearby pattern and token scan.
161
+ 5. Implementation.
162
+ 6. Screenshot/browser recheck when feasible.
163
+ 7. Reference vs Implementation Matrix when reference fidelity matters.
164
+ 8. Design Quality Review.
165
+ 9. P0/P1 closeout.
166
+ 10. Truth status.
167
+
168
+ ## Truth Caps
169
+
170
+ - Full visual verification: real source-screen evidence and relevant recheck.
171
+ - Partial: text-only review, no screenshot, browser unavailable, or source-state gaps.
172
+ - Blocked: requested visual claim cannot be inspected.
173
+ - Assumed: implementation follows code patterns but visual result was not observed.
174
+ - Reference-only or generated-only evidence cannot upgrade a result to full visual verification.
@@ -0,0 +1,23 @@
1
+ # UI Quality
2
+
3
+ Direction comes before decoration.
4
+
5
+ Check:
6
+
7
+ - What real source-screen evidence supports the visual claim?
8
+ - Does the change match the product domain?
9
+ - Does it fit existing components, tokens, spacing, typography, and interaction patterns?
10
+ - Is the primary workflow easier to scan or complete?
11
+ - Does text fit on mobile and desktop?
12
+ - Are states covered when relevant: default, loading, error, empty, disabled, hover/focus, mobile?
13
+ - Is color contrast sufficient?
14
+ - Is the UI less generic after the change?
15
+
16
+ Avoid:
17
+
18
+ - Generic purple gradients.
19
+ - Decorative blobs.
20
+ - Cards inside cards.
21
+ - Marketing layouts for operational tools.
22
+ - New dependencies for small visual flourishes.
23
+ - Treating reference/generated images as proof of the implemented screen.
@@ -0,0 +1,53 @@
1
+ # Verification Levels
2
+
3
+ ## Level 0: Read/Inspect
4
+
5
+ For copy, spacing, small CSS, docs, or no-runtime changes.
6
+
7
+ Expected:
8
+
9
+ - Re-read the changed file or relevant snippet.
10
+ - Check local project fit.
11
+ - Report that no command was run.
12
+
13
+ ## Level 1: One Relevant Check
14
+
15
+ For small JS/TS/component changes.
16
+
17
+ Examples:
18
+
19
+ - One focused test.
20
+ - Typecheck.
21
+ - Lint for touched area.
22
+
23
+ ## Level 2: Focused Confidence
24
+
25
+ For feature-sized work.
26
+
27
+ Examples:
28
+
29
+ - Typecheck plus related test.
30
+ - Build if no narrower test exists.
31
+
32
+ ## Level 3: UI Confidence
33
+
34
+ For visible UI changes.
35
+
36
+ Expected when feasible:
37
+
38
+ - Desktop screenshot or browser check.
39
+ - Mobile viewport check.
40
+ - Check overflow, alignment, contrast, density, and core states.
41
+
42
+ ## Level 4: Deep Confidence
43
+
44
+ For auth, payment, DB, migration, release, broad refactor, or user-requested deep verification.
45
+
46
+ Examples:
47
+
48
+ - Build.
49
+ - Test suite or relevant suites.
50
+ - Browser QA.
51
+ - Security check.
52
+ - Proof summary.
53
+