Find code by asking what it does. A CLI for coding agents that uses Jev to discover relevant files and source context.
TypeScript ai-sdkclaude-codeclicode-searchcodexcoding-agentscontext-retrievaldeveloper-toolsjevsemantic-searchtypescriptvercel-ai-gateway
skills: sync vendored skills with canonical
David Zhange946110bd308
diff --git a/.agents/skills/audit-performance/SKILL.md b/.agents/skills/audit-performance/SKILL.mdindex ef283b1..d1b3f08 100644--- a/.agents/skills/audit-performance/SKILL.md+++ b/.agents/skills/audit-performance/SKILL.md@@ -59,6 +59,12 @@ Do not prioritize by scary-looking counts alone:or fixed prefix forever.- Bound both sides of a transport and every durable/in-memory queue. State the overflow behavior;never silently drop accepted durable data.+- Judge a cache, an index or a delta protocol by its worst edit, not its quiet average: an insertion+ into a long retained collection, a change far from the active view, a move, a deletion. Assert the+ bounded work alongside the exact result.+- Check that a measured workload does what it claims before trusting its numbers: that the forces+ meet, the route is travelled, the failure arm runs. Measure the failure arm too.+- Isolate a cost measurement from everything else running in the process.- Match compatibility work to the product lifecycle. In prelaunch code, prefer direct changes andadd no legacy branches or migrations unless real persisted data requires them.- Every limit introduced or changed must have an observable log or metric with the limit kind,diff --git a/.agents/skills/compare-screenshots/SKILL.md b/.agents/skills/compare-screenshots/SKILL.mdindex 9985e26..4019709 100644--- a/.agents/skills/compare-screenshots/SKILL.md+++ b/.agents/skills/compare-screenshots/SKILL.md@@ -1,22 +1,21 @@---name: compare-screenshots-description: Compare screenshots to judge which image is less wrong, not to match a baseline. Use when a UI, game, document, render, chart, or generated asset needs objective visual telemetry, side-by-side inspection, crop/zoom review, or a fresh second opinion before accepting or rejecting a visual change. Also use on a single capture with no counterpart, to measure whether the frame is flat, empty, or badly framed before anyone reviews it.+description: Compare screenshots against the intended design, distinguishing approved references from historical baselines. Use for iterative implementation matching, before/after visual review, objective image telemetry, or checking a lone capture for flat, empty, or badly framed content.---# Compare Screenshots-Decide which image is **less wrong** against what the scene should show — not-whether the candidate matches the baseline. The baseline is just an earlier-attempt; it can be wrong too. Treat both images as candidates measured against-a target you establish yourself. Metrics locate where the images differ; they-never decide who is right.+Judge images against the intended result. A user-approved design is the target;+a historical baseline is only an earlier attempt and may be wrong. Metrics locate+differences, never decide correctness. Use+[design-with-images](../design-with-images/SKILL.md) for the full exploration-to-implementation loop.## Workflow-1. **Establish the target from first principles.** Before looking at distance,- decide what this image *should* show: the visual requirement, the design- intent, what the thing depicts in reality, and any domain skill that owns the- look. This — not the baseline — is ground truth. Write it down in one or two+1. **Establish the target.** Use the user-approved reference and stated design+ requirements when available; do not replace them with your own taste. Otherwise+ derive the target from the visual requirement, what the thing depicts in reality+ and the domain skill that owns the look. Write it down in one or twoconcrete sentences ("low sun should cast long shadows east; trees fill thecanopy; labels stay legible at this zoom").- If the right answer isn't clear — competing valid readings, a taste or@@ -28,22 +27,42 @@ never decide who is right.artifacts: same viewport, DPR, route/page, frozen time/tick, camera intent,UI state, data, fonts/assets where they matter. If not comparable, fixcapture setup or compare only a crop/feature where the mismatch is harmless.-3. **Generate artifacts to locate divergence**, sized to the question:+3. **Measure the approved design.** For reference matching, read and complete+ [Reference Landmarks](references/reference-landmarks.md) before changing code+ or accepting a candidate. Then generate artifacts sized to the question:side-by-side, key-feature crops/zooms, grayscale, absolute grayscale heatmap,pixelmatch diff, per-image Sobel/edge maps, edge-difference heatmap, JSONmetrics.-4. **Judge each divergence against the target.** For every place the two images+4. **Inspect boundaries before judging the whole.** For every changed visual+ effect, inspect all sides at native scale and in matched detail crops. Include+ the effect's full fade and surrounding space; a crop ending at the component+ box hides spill. Compare top/right/bottom/left extents separately, anchored to+ visible text, rules or silhouettes rather than inferred CSS bounds. Check+ every foreground feature crossed by the effect (lines, icons, text, adjacent+ panels): brightness, color, sharpness and continuity must match the target.+ A readable line can still be incorrectly dimmed. Record each check as+ reference observation → candidate observation → pass/fix/uncertain, with its+ crop. Use the landmark table to resolve local distances and contrast;+ full-frame averages cannot settle a local defect.+5. **Judge each divergence against the target.** For every place the two imagesdiffer, name what is actually there in plain terms — missing content, wrongcamera, bad hierarchy, weak contrast, wrong depth, text overlap, layoutshift, clipped edge, unexpected blur, style mismatch — and decide which sideis closer to correct. The answer can be the candidate, the baseline, bothwrong, or a genuine toss-up.-5. **Get a neutral second opinion** for disputed or high-stakes calls: a fresh+6. **Get a neutral second opinion** for disputed or high-stakes calls: a freshsubagent given only the two images and neutral labels, per`references/subagent-visual-review.md`.-6. **Conclude with one verdict:** candidate is less wrong (accept, and re-bless+7. **Resolve mismatches to an approved target.** When implementing a selected+ design, record material differences in spacing, shape, softness, typography+ and hierarchy; revise, recapture and repeat until resolved or the user changes+ the target. Do not silently exempt a difference because the code is simpler.+8. **Conclude with one verdict:** candidate is less wrong (accept, and re-blessthe baseline if one exists), baseline is less wrong (reject), both wrong(another pass needed — say what's still off), or unclear (ask the user).+ Accept only when every boundary/overlap check passes or has an explicit+ user-approved deviation; uncertainty requires closer evidence, not a pass.+ Overall resemblance or a positive second opinion cannot cancel a local defect.Never accept on a lower score alone or reject on a higher one. Never hidecontent, blur detail, crop away differences, or make the capture lesstruthful to move a number.@@ -110,7 +129,7 @@ It measures **distance from the other image**, nothing more. Because thebaseline can be wrong, a distance of 0 is not success and a large distance isnot failure — a richer scene, clearer models, stronger labels, real depth, orbetter lighting all legitimately raise it. Use the score to find *where* the-images move; decide who is right in step 4. Name the field for what it measures+images move; decide who is right in step 5. Name the field for what it measures(distance, not "parity") so no one reads it as a verdict.Report the full-frame score and, when UI dominates the shot, a labeleddiff --git a/.agents/skills/compare-screenshots/references/reference-landmarks.md b/.agents/skills/compare-screenshots/references/reference-landmarks.mdnew file mode 100644index 0000000..4cf9199--- /dev/null+++ b/.agents/skills/compare-screenshots/references/reference-landmarks.md@@ -0,0 +1,43 @@+# Reference Landmarks++Read before implementing or accepting a match to an approved image.++1. **Measure the reference first.** Pick visible anchors for each requested+ relationship: glyph bounds, line endpoints, icon edges, solid silhouettes.+ Record a small table: feature | reference relationship/range | candidate+ measurement | delta | pass/fix/uncertain. Fill the reference column before+ changing code; never calibrate the target from the latest candidate.+2. **Separate core from fringe.** A soft edge has no single boundary. Locate the+ dark/opaque core, its transition and the faint outer tail on each side. Say+ where a foreground stroke meets that profile. “Full width” may mean the+ visible core, not every pixel of blur; resolve shorthand against the supplied+ image before translating it into a percentage or a hard clip. For example,+ compare a rule's ends to both the text bounds and the fade, and compare the+ last glyph-to-rule gap separately from the tail below the rule.+3. **Keep scale honest.** Preserve original captures at the actual application+ scale, with viewport and DPR recorded. If a generated reference has different+ raster dimensions, record the mapping from its source capture; if unknown,+ compare ratios to stable landmarks such as glyph height and state uncertainty.+ Label any derived alignment image. Never resize the application, typography+ or evidence merely to make the pair agree. Native captures remain the proof.+4. **Isolate ambiguous effects.** When terrain, texture or lighting could be+ mistaken for shadow, capture the same frozen state with only that effect+ toggled. Use the difference to locate its contribution; keep the normal+ capture beside it. Use local contrast/falloff samples across an edge rather+ than whole-frame similarity. If no clean reference baseline exists, report+ the inferred range instead of inventing an exact opacity or endpoint.+5. **Keep the whole feature in the crop.** Include both endpoints, all fade+ tails and surrounding context. Recheck crop bounds after every geometry+ change; an old crop can hide a newly extended edge. Zoomed crops supplement+ native-size evidence, never replace it.+6. **Close every discrepancy.** A reviewer saying “slightly wider,” “minor gap”+ or “uncertain extent” has identified unfinished comparison work. Measure and+ resolve it, or record a demonstrated rasterization limit or user-approved+ deviation. Do not convert those words into a pass because the overall image+ looks good. Validate test assertions against these reference relationships,+ not a convenient CSS mechanism or the last verbal interpretation.++After a user catches a missed detail, revisit the whole landmark table. Recheck+neighbors after the fix: restoring a bright line can erase the dark support+above it; extending that line can overshoot the reference's fading edge. Finish+with the updated table and current captures, not a repeated general verdict.diff --git a/.agents/skills/compare-screenshots/references/subagent-visual-review.md b/.agents/skills/compare-screenshots/references/subagent-visual-review.mdindex 5bfb63b..8053ce6 100644--- a/.agents/skills/compare-screenshots/references/subagent-visual-review.md+++ b/.agents/skills/compare-screenshots/references/subagent-visual-review.md@@ -8,9 +8,12 @@ judgment.- `agent_type`: `default`- `fork_context`: `false`- Attach the two screenshots as `local_image` items.-- Label images neutrally: `Image A`, `Image B`, or `Reference`, `Candidate`.-- Do not tell the subagent which image is candidate, reference, expected,- accepted, failed, better, worse, new, or old.+- For an approved-design comparison, identify `Reference` and `Candidate` and+ supply the intended design requirements. For an open preference comparison,+ use `Image A` and `Image B` without declaring a target.+- Supply full frames and matched detail crops including surrounding space.+ Withhold previous verdicts, implementation details and the author's preferred+ answer; do not withhold the target needed to judge fidelity.## Prompt@@ -23,11 +26,22 @@ Compare Image A and Image B. Report:2. Major visible differences in camera/view, layout, content, missing details,labels/text, icons, color, lighting, depth/layering, clipping, artifacts,readability, or style.-3. Which image is more complete/readable for the apparent task and why.-4. A concise verdict on whether the images preserve the intended visual+3. Inspect every changed effect at all four boundaries, including its full fade+ beyond the component. Compare extent relative to visible anchors on each+ side. Check brightness, color, sharpness and continuity of every foreground+ feature it crosses. Report local discrepancies even if everything is legible.+4. Give a per-feature reference observation → candidate observation →+ pass/fix/uncertain record. Distinguish solid/core edges from faint fringe;+ measure endpoints and gaps relative to visible anchors. Verify crops include+ the entire feature. Request paired effect-on/off captures when background+ texture makes extent ambiguous. A small discrepancy still needs resolution;+ do not label it acceptable merely because the whole looks similar.+5. A concise verdict on whether the images preserve the intended visualrelationship or need another pass.-Do not assume either image is the desired target; judge only from visible pixels.+When an approved reference is identified, judge fidelity to it. Otherwise do not+assume either image is the target. Overall attractiveness does not excuse a+local mismatch. Judge only from visible pixels and supplied design requirements.```## How To Use The Result@@ -37,5 +51,6 @@ Do not assume either image is the desired target; judge only from visible pixelsfor whichever image is the baseline.- If the subagent flags wrong camera, mismatched state, missing content, orvisible artifacts, fix capture/rendering quality before judging the rest.-- Quote the subagent verdict in the working notes when it changes or confirms- the next implementation target.+- Preserve the findings, not just the headline verdict. A “pass” accompanied+ by an unresolved local discrepancy is not acceptance; finish the landmark+ check before calling the feature done.diff --git a/.agents/skills/design-with-images/SKILL.md b/.agents/skills/design-with-images/SKILL.mdnew file mode 100644index 0000000..936b7e8--- /dev/null+++ b/.agents/skills/design-with-images/SKILL.md@@ -0,0 +1,65 @@+---+name: design-with-images+description: Explore UI and visual design with image generation, then iterate the real implementation against the user-selected concept. Use when brainstorming visual directions, offering mockup variants, or implementing an approved generated design; do not stop at the mockups or the first code approximation.+---++# Design With Images++The deliverable is the working design, visibly matched to the approved reference.+Image generation explores the target; real screenshots prove the implementation.+For an exploration-only request, deliver the options and wait for a selection.++## Workflow++1. **Frame the decision.** Read the relevant design skill and capture the actual+ surface. Pin what may change and what must stay: content, framing, palette,+ interactions and surrounding UI. Keep the original capture.+2. **Generate alternatives.** Use the available image-generation skill/tool with+ that capture as a reference. Produce a small, labelled set of distinct visual+ directions. Show them as concepts, never as screenshots of implemented code.+3. **Freeze the chosen target.** Use an existing approval or delegated design discretion; otherwise obtain+ the user's selection. Preserve the selected image, prompt and provenance in the project's+ reference area. Name its visible requirements: spacing and padding, silhouette,+ typography, opacity, edge softness, hierarchy and placement. Do not substitute+ the prompt's requested properties for what the selected image actually shows.+ Before coding, complete the reference measurements in+ [Reference Landmarks](../compare-screenshots/references/reference-landmarks.md).+4. **Implement the design.** Use the project's real components and visual+ primitives. A generated mockup is not source code, and easy CSS is not evidence+ of fidelity. Preserve intended relationships when implementation constraints+ require a different mechanism. Label generated text errors or invented details+ as artifacts; do not ship them merely to match pixels.+5. **Compare and iterate.** Capture the real implementation at comparable scale,+ framing and state. Run [compare-screenshots](../compare-screenshots/SKILL.md)+ against the **approved concept**, with full context and tight crops of the+ changed features. Complete its boundary/overlap checks: compare each side+ of the effect and any foreground it crosses, not just overall softness and+ spacing. Keep the per-feature pass/fix/uncertain record through handover.+ A before/after code screenshot comparison is supplementary;+ it proves change, not fidelity to the selected design. List the material+ mismatches, fix them in code, recapture and compare again. Continue until each+ intended feature matches or the user explicitly revises the target. Passing+ functional tests, a lower distance score, or "close enough" from memory is+ not a stopping condition. Disclose constraints as soon as they emerge.+6. **Verify and hand over.** Check the real design in its relevant states and+ sizes, including crowded and low-contrast cases. Use+ [screenshot-critique](../screenshot-critique/SKILL.md) for an unprimed review;+ show the approved reference beside the actual result, clearly labelled, using+ [preview-shots](../preview-shots/SKILL.md) where available. Resolve material+ feedback through the same comparison loop before claiming completion or+ publishing. Stabilize this visual gate before running expensive closeout+ suites; use focused checks while the design is still changing. Preserve existing+ authorization; do not invent another approval gate when the selected design and shipping action are already approved.++## Rules++- Keep concept, previous implementation and current implementation distinct.+ Never replace the approved reference with the latest code screenshot.+- Keep actual-size captures as primary evidence. Label derived alignments;+ never change application scale or crop away defects to improve agreement.+- Judge generated references by their intended design features, not literal+ equality of re-rendered text or scenery. Document such exclusions explicitly;+ they are not permission to excuse different padding, shapes or hierarchy.+- A selected concept is a requirement, not inspiration to reinterpret silently.+ If it cannot be implemented faithfully, show the specific conflict and seek a+ revised target rather than presenting an approximation as finished.diff --git a/.agents/skills/screenshot-critique/SKILL.md b/.agents/skills/screenshot-critique/SKILL.mdindex 525336e..2126b23 100644--- a/.agents/skills/screenshot-critique/SKILL.md+++ b/.agents/skills/screenshot-critique/SKILL.md@@ -14,14 +14,17 @@ any content in it at all.## Workflow1. Capture or locate the exact PNGs/GIF frames under review.-2. Create tight 2x-4x crops for every key feature under judgment, plus the full- screenshot for context. Crop selected units, city/town stacks, flags/poles,+2. Keep native-size evidence and create supplementary 2x-4x crops for every+ key feature, plus the full screenshot. Include complete endpoints and fades;+ recheck crop bounds after geometry changes. Crop selected units, city/town+ stacks, flags/poles,shadows, selection rings, labels/icons, roads, terrain features, water, andany artifact-prone area. If the complaint is about "too faint", "wrongorder", or "not in perspective", the crop is mandatory.3. Spawn one fresh explorer with `fork_context: false`; pass only the full- images, the crops, and a short neutral task. Do not include the main thread- history, implementation details, or expected answer.+ images, the crops, and a short neutral task. Include the approved reference+ and user requirements when judging fidelity; withhold history, implementation+ details, prior verdicts and the expected answer.4. Ask for concrete visible defects with confidence levels. Name likely riskcategories: unit/prop depth ordering, layering, shadows, selection-markercontrast, ground-plane perspective, flag/pole attachment, label style and@@ -99,7 +102,8 @@ Spawn config:- For animation, attach a short set of deterministic still frames first; GIFsare useful for human review, but still frames make specific defects easier toname.-- A passing sub-agent critique does not replace direct inspection by the main- agent or screenshot regression gates.+- A passing headline does not erase a reported small mismatch or uncertainty.+ Resolve it using [Reference Landmarks](../compare-screenshots/references/reference-landmarks.md);+ a second opinion does not replace direct inspection or regression gates.- If the sub-agent catches an issue the main agent missed, add that failure modeto the relevant feature plan or visual checklist immediately.diff --git a/.agents/skills/write-skills/SKILL.md b/.agents/skills/write-skills/SKILL.mdindex 04f14f0..48136d4 100644--- a/.agents/skills/write-skills/SKILL.md+++ b/.agents/skills/write-skills/SKILL.md@@ -199,7 +199,10 @@ One short paragraph defining the job.When creating or revising a skill:-- Name it with lowercase hyphen-case; keep the folder name identical.+- Prefer **action + plural noun** in lowercase hyphen-case: `audit-tests`,+ `write-skills`, `compare-screenshots`. Keep the folder and frontmatter name+ identical. Use a natural exception when pluralizing would distort the meaning;+ this is the default for new names, not a mandate to rename existing skills.- Make the description specific enough to trigger without the body.- Remove any "when to use" section from the body.- Remove stale history, attribution, placeholders, and setup notes.diff --git a/.agents/skills/write-tests/SKILL.md b/.agents/skills/write-tests/SKILL.mdindex 888dbc5..b295d2a 100644--- a/.agents/skills/write-tests/SKILL.md+++ b/.agents/skills/write-tests/SKILL.md@@ -10,6 +10,9 @@ refactor or config change that preserves it. Most bad tests fail the oppositeway: red on harmless changes, green while the real path is broken. Every rulebelow serves that one goal.+For deciding whether coverage adds independent proof, where it belongs, or+which existing tests can go, use [audit-tests](../audit-tests/SKILL.md).+## Workflow: tracer bullets, not a batch1. **Write ONE test at a time.** Assert first, watch it go red on the un-fixed