@meyverick/agentic 5.0.2
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 +234 -0
- package/CHANGELOG.md +236 -0
- package/README.md +50 -0
- package/install.ts +349 -0
- package/package.json +37 -0
- package/scripts/check-deps.mjs +587 -0
- package/scripts/git-dl.mjs +100 -0
- package/skills/check/SKILL.md +108 -0
- package/skills/check/evals/benchmark.json +40 -0
- package/skills/check/evals/evals.json +38 -0
- package/skills/check/references/diagnostic-matrix.md +170 -0
- package/skills/check/references/script-anatomy.md +154 -0
- package/skills/create-skill/SKILL.md +291 -0
- package/skills/create-skill/assets/templates/SKILL.md.template +118 -0
- package/skills/create-skill/assets/templates/evals.json.template +36 -0
- package/skills/create-skill/assets/templates/grading.json.template +26 -0
- package/skills/create-skill/evals/benchmark.json +41 -0
- package/skills/create-skill/evals/evals.json +50 -0
- package/skills/create-skill/evals/grading-template.json +36 -0
- package/skills/create-skill/evals/near-misses.json +35 -0
- package/skills/create-skill/evals/trigger-queries.json +80 -0
- package/skills/create-skill/references/antipatterns.md +123 -0
- package/skills/create-skill/references/component-decomposition.md +130 -0
- package/skills/create-skill/references/content-quality-criteria.md +61 -0
- package/skills/create-skill/references/description-optimization.md +90 -0
- package/skills/create-skill/references/eval-methodology.md +100 -0
- package/skills/create-skill/references/fragility-matching.md +88 -0
- package/skills/create-skill/references/gotchas-patterns.md +80 -0
- package/skills/create-skill/references/specification.md +77 -0
- package/skills/create-skill/scripts/audit-antipatterns.mjs +164 -0
- package/skills/create-skill/scripts/compute-benchmark.mjs +111 -0
- package/skills/create-skill/scripts/run-cold-eval.mjs +118 -0
- package/skills/create-skill/scripts/scaffold-skill.mjs +86 -0
- package/skills/create-skill/scripts/validate-routing.mjs +137 -0
- package/skills/create-skill/scripts/validate-structure.mjs +223 -0
- package/skills/design-craft/SKILL.md +134 -0
- package/skills/design-craft/evals/benchmark.json +41 -0
- package/skills/design-craft/evals/evals.json +81 -0
- package/skills/design-craft/references/anti-slop-patterns.md +49 -0
- package/skills/design-craft/references/art-direction.md +89 -0
- package/skills/design-craft/references/design-engineering.md +122 -0
- package/skills/design-craft/references/motion-craft.md +124 -0
- package/skills/design-craft/references/process.md +47 -0
- package/skills/design-craft/references/review-checklist.md +121 -0
- package/skills/guardrails/SKILL.md +118 -0
- package/skills/guardrails/evals/benchmark.json +40 -0
- package/skills/guardrails/evals/evals.json +49 -0
- package/skills/guardrails/references/guardrails-patterns.md +43 -0
- package/skills/okf-docs/SKILL.md +79 -0
- package/skills/okf-docs/evals/benchmark.json +21 -0
- package/skills/okf-docs/evals/evals.json +37 -0
- package/skills/okf-docs/references/okf-spec.md +56 -0
- package/skills/okf-docs/scripts/validate-frontmatter.mjs +130 -0
- package/skills/openspec-harden/SKILL.md +138 -0
- package/skills/openspec-harden/evals/benchmark.json +40 -0
- package/skills/openspec-harden/evals/evals.json +38 -0
- package/skills/openspec-learn/SKILL.md +216 -0
- package/skills/openspec-learn/evals/benchmark.json +44 -0
- package/skills/openspec-learn/evals/evals.json +48 -0
- package/skills/openspec-learn/evals/retrieval-bench.json +27 -0
- package/skills/openspec-learn/references/conflict-handling.md +20 -0
- package/skills/openspec-learn/references/evaluation-methodology.md +126 -0
- package/skills/openspec-learn/references/examples.md +37 -0
- package/skills/openspec-learn/references/improvement-patterns.md +155 -0
- package/skills/openspec-learn/references/report-analysis.md +104 -0
- package/skills/openspec-learn/references/skill-quality.md +103 -0
- package/skills/openspec-learn/references/tool-type-detection.md +30 -0
- package/skills/openspec-report/SKILL.md +104 -0
- package/skills/openspec-report/assets/templates/assessment.md.template +84 -0
- package/skills/openspec-report/assets/templates/report.md.template +92 -0
- package/skills/openspec-report/evals/benchmark.json +44 -0
- package/skills/openspec-report/evals/evals.json +46 -0
- package/skills/qmd-research/SKILL.md +89 -0
- package/skills/qmd-research/evals/benchmark.json +40 -0
- package/skills/qmd-research/evals/evals.json +38 -0
- package/skills/qmd-research/references/index-management.md +69 -0
- package/skills/qmd-research/references/query-craft.md +82 -0
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: Reference
|
|
3
|
+
title: Art Direction
|
|
4
|
+
description: Reading the brief, grounding the work in its subject, composing the hero, and keeping assets honest.
|
|
5
|
+
generated: { by: agentic/1.0, at: 2026-09-21T00:00:00Z }
|
|
6
|
+
sources:
|
|
7
|
+
- { id: frontend-design, resource: references/design-skills/frontend-design.md, license: absent-terms (ideas distilled and rewritten, attributed) }
|
|
8
|
+
- { id: awwwards, resource: references/design-skills/build-awwwards-quality-sites.md, license: absent-terms }
|
|
9
|
+
- { id: impeccable, resource: references/design-skills/impeccable.md, license: Apache-2.0 }
|
|
10
|
+
status: stable
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Art Direction
|
|
14
|
+
|
|
15
|
+
One visual thesis, executed consistently. Direction is decided before code, stated in one line, and held.
|
|
16
|
+
|
|
17
|
+
## 1. Read the brief
|
|
18
|
+
|
|
19
|
+
Extract before designing: **subject**, **audience**, **job** (what the surface must accomplish), **tone**, **constraints** (brand, era, material, palette, typeface, supplied references), and anything the client explicitly rejected.
|
|
20
|
+
|
|
21
|
+
- The brief's own words outrank taste, trends, and every anti-slop rule.
|
|
22
|
+
- Where the brief is silent, decide — and say why. Free axes are where defaults sneak in.
|
|
23
|
+
- Ask exactly one question when subject, audience, or job is unknown. Never invent all three.
|
|
24
|
+
|
|
25
|
+
## 2. Ground in the subject, not the category
|
|
26
|
+
|
|
27
|
+
Distinctive work comes from the subject's own world: its industry, materials, vocabulary, tools, and history. A page about children's toys and a page about financial analysis should share no visual DNA.
|
|
28
|
+
|
|
29
|
+
Reject the category reflex — the look any competent page in this field would have. If the first idea works for a competitor too, it is not yet a direction.
|
|
30
|
+
|
|
31
|
+
## 3. Name the surface intent
|
|
32
|
+
|
|
33
|
+
What does success look like for the visitor here? It changes what the design optimizes:
|
|
34
|
+
|
|
35
|
+
| Intent | Visitor's success | Design priority |
|
|
36
|
+
| --- | --- | --- |
|
|
37
|
+
| Persuade | decides and acts | attention, argument, one clear next step |
|
|
38
|
+
| Operate | completes a task | scanability, consistency, predictable states |
|
|
39
|
+
| Read | understands something | structure, measure, comfortable rhythm |
|
|
40
|
+
| Experience | is inside the work | the artifact leads; interface recedes |
|
|
41
|
+
|
|
42
|
+
Intent is chosen per surface, not per product: a tool's marketing page is still Persuade; a brand's documentation is still Read.
|
|
43
|
+
|
|
44
|
+
## 4. Write the direction before the first edit
|
|
45
|
+
|
|
46
|
+
A compact plan with five lines — it becomes the Design Read:
|
|
47
|
+
|
|
48
|
+
1. **Visual thesis** — the one idea the page is built around.
|
|
49
|
+
2. **Type hierarchy** — families, roles, scale steps.
|
|
50
|
+
3. **Colour system** — 4–6 named base values and their roles.
|
|
51
|
+
4. **Section sequence** — the order of argument, with the hero's job named.
|
|
52
|
+
5. **Motion narrative** — where movement explains, and where stillness is correct.
|
|
53
|
+
|
|
54
|
+
**Review the plan against the brief before building.** Walk a similar prompt mentally; if the plan reads like what you would produce for any comparable page, revise that part and say what changed and why. Only then write code.
|
|
55
|
+
|
|
56
|
+
## 5. Compose the hero
|
|
57
|
+
|
|
58
|
+
The first viewport is the strongest authored moment and must work before any motion runs.
|
|
59
|
+
|
|
60
|
+
- The primary call to action belongs inside the first viewport — never behind a scroll.
|
|
61
|
+
- Headline: two lines maximum. Subtext: twenty words maximum, three to four lines.
|
|
62
|
+
- Four text elements maximum: optional label, headline, subtext, one primary action plus at most one secondary.
|
|
63
|
+
- Cap top padding (~6rem) so content does not float mid-viewport; if it feels tight, raise type scale or asset size instead of padding.
|
|
64
|
+
- No trust strips, taglines below the action, pricing teasers, or logo walls inside the hero — those are separate sections directly below.
|
|
65
|
+
- Navigation renders on one line at desktop widths and stays under ~80px tall; condensation beats wrapping.
|
|
66
|
+
- Design a complete static first frame: it must be whole when motion, media, or any script is unavailable.
|
|
67
|
+
|
|
68
|
+
## 6. Section composition
|
|
69
|
+
|
|
70
|
+
- Use a layout family at most **once** per page; a page of eight sections needs at least four distinct families.
|
|
71
|
+
- Never place more than **two** image-plus-text zigzags in a row; break the rhythm with a full-width, stacked, or grid section.
|
|
72
|
+
- Grids contain exactly as many cells as there is content — no empty or filler tiles.
|
|
73
|
+
- Multi-cell grids need real visual variation: a genuine image, a subject-derived texture or tint, or varied cell sizes.
|
|
74
|
+
- Small labels above headings are rationed: at most **one per three sections**, including the hero.
|
|
75
|
+
- A split header (large headline beside a small floating paragraph) is not the default; stack the two unless the right column carries real content.
|
|
76
|
+
- Numbered markers are only for genuine sequences.
|
|
77
|
+
|
|
78
|
+
## 7. Keep the asset system honest
|
|
79
|
+
|
|
80
|
+
- References are inspected for **traits** — hierarchy, pacing, contrast, image treatment, motion principles. Never reuse, trace, or closely reproduce assets, layouts, identity, or copy.
|
|
81
|
+
- Illustrations are authored or licensed, never faked with ad-hoc vector paths; interface symbols come from one consistent set.
|
|
82
|
+
- People are photographs, sourced or licensed. No initials, silhouettes, or generated faces presented as real customers or staff.
|
|
83
|
+
- No invented partnerships, logo walls, testimonials, or metrics. If proof cannot be sourced, omit the section.
|
|
84
|
+
- Record provenance for every asset in the source or the handoff notes.
|
|
85
|
+
- Describe the result in terms of the bar it meets; never claim an award, recognition, or ranking.
|
|
86
|
+
|
|
87
|
+
## 8. Restraint
|
|
88
|
+
|
|
89
|
+
Spend boldness in one place. Let a single element be memorable and keep everything around it quiet, disciplined, and unchanging. Before finishing, remove one accessory: if the page survives the removal, it is better.
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: Reference
|
|
3
|
+
title: Design Engineering
|
|
4
|
+
description: Type, colour, layout, materiality, states, forms, density, theming, and locale-handling rules.
|
|
5
|
+
generated: { by: agentic/1.0, at: 2026-09-21T00:00:00Z }
|
|
6
|
+
sources:
|
|
7
|
+
- { id: taste-skill, resource: references/design-skills/taste-skill.md, license: absent-terms (ideas distilled and rewritten, attributed) }
|
|
8
|
+
- { id: impeccable, resource: references/design-skills/impeccable.md, license: Apache-2.0 }
|
|
9
|
+
- { id: web-design-guidelines, resource: https://github.com/vercel-labs/web-interface-guidelines, license: MIT }
|
|
10
|
+
status: stable
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Design Engineering
|
|
14
|
+
|
|
15
|
+
Concrete rules for the decisions that make an interface feel authored rather than generated.
|
|
16
|
+
|
|
17
|
+
## 1. Typography
|
|
18
|
+
|
|
19
|
+
- One family, or two that are clearly distinct in role. Never a third.
|
|
20
|
+
- Set a scale with intentional steps; a page needs four to six sizes, not ten.
|
|
21
|
+
- Body measure stays under ~80 characters; serif body text may run slightly longer with correspondingly more leading.
|
|
22
|
+
- Numbers that are compared or stacked use tabular figures; numerals in prose stay proportional.
|
|
23
|
+
- Loading, saving, and pending labels end with an ellipsis character, not three periods. Use typographic quotes and non-breaking spaces in units and brand names.
|
|
24
|
+
- Balance headings so they do not orphan a single word.
|
|
25
|
+
|
|
26
|
+
**Tell-tale treatments to avoid:** accenting one word of a headline with a different weight, colour, or style; all-caps labels; a decorative label above every heading; type chosen because it is the default rather than because the subject called for it.
|
|
27
|
+
|
|
28
|
+
## 2. Colour
|
|
29
|
+
|
|
30
|
+
- Name 4–6 base values and give each a role (surface, raised surface, text, muted text, accent, state). Everything else derives.
|
|
31
|
+
- Contrast: body text meets AA; hero copy and the primary action target AAA.
|
|
32
|
+
- Hierarchy parity: if the primary action dominates in one theme, it dominates in every theme.
|
|
33
|
+
- Brand fidelity: keep the brand colour recognisable rather than desaturating it into a theme.
|
|
34
|
+
- Avoid pure black and pure white; near-values preserve depth.
|
|
35
|
+
- Ship one token strategy for the whole project: either variant values per theme or semantic custom properties swapped per theme — never both, never ad-hoc overrides.
|
|
36
|
+
|
|
37
|
+
## 3. Layout and space
|
|
38
|
+
|
|
39
|
+
- Use a spacing scale and stay on it: airy 24–96px, standard 16–64px, dense 8–32px (see the density dial).
|
|
40
|
+
- Lay out with grid rather than percentage arithmetic; avoid computed widths that only work at one viewport.
|
|
41
|
+
- Contain the page with a readable maximum width and consistent gutters; alignment across sections beats novelty within one.
|
|
42
|
+
- Full-height sections use dynamic viewport units so mobile chrome does not cause a jump, and never force the call to action below the fold.
|
|
43
|
+
- Declare the collapse behaviour for every multi-column section explicitly, at the breakpoint where it breaks — not "it will reflow".
|
|
44
|
+
- Fix overflow at the content level; do not hide it with a clipped container.
|
|
45
|
+
- Full-bleed sections account for device safe areas.
|
|
46
|
+
|
|
47
|
+
## 4. Materiality
|
|
48
|
+
|
|
49
|
+
- Borders before shadows; one elevation recipe per level, applied consistently.
|
|
50
|
+
- Blur and glow are decisions with a reason, not a default finish on every surface.
|
|
51
|
+
- Radius is hierarchical: one value applied to everything flattens hierarchy.
|
|
52
|
+
- Backgrounds vary where content varies; a grid of identical white cells reads as unfinished.
|
|
53
|
+
|
|
54
|
+
## 5. Interactive states
|
|
55
|
+
|
|
56
|
+
Every interactive element defines: **default, hover, active, focus, disabled, loading, empty, error**.
|
|
57
|
+
|
|
58
|
+
- Interactive states increase contrast — hover, active, and focus are more prominent than rest.
|
|
59
|
+
- Focus is always visible and never removed without an equal replacement; focus styling uses `:focus-visible` semantics so a mouse click does not draw a ring.
|
|
60
|
+
- Focus is never obscured by sticky headers, footers, or overlays; add scroll margin where anchors or focused elements can be covered.
|
|
61
|
+
- Disabled means unavailable, not unreadable — keep it legible and explain why when the reason is not obvious.
|
|
62
|
+
- Loading shows progress on the element that started the work, not a page-level veil.
|
|
63
|
+
- Hover-only affordances need touch and keyboard equivalents.
|
|
64
|
+
|
|
65
|
+
## 6. Forms and data
|
|
66
|
+
|
|
67
|
+
- Every control has a real label, clickable as part of the control's hit target; placeholders are examples, never the label.
|
|
68
|
+
- Errors appear inline beside the field, name the problem and the fix, and the first error receives focus on submit.
|
|
69
|
+
- Do not block paste. Do not disable the submit button before the request starts; show progress once it has.
|
|
70
|
+
- Choose input types that match the data and set autocomplete intentions so assistive tools and password managers behave.
|
|
71
|
+
- Warn before leaving with unsaved changes.
|
|
72
|
+
- Destructive actions require confirmation or an undo window — never immediate and irreversible.
|
|
73
|
+
- Tables: align numbers right with tabular figures, keep header alignment consistent with cells, and give every table a defined empty state.
|
|
74
|
+
- Long lists are virtualised or windowed once they grow past ordinary scroll length, and rendering never performs layout reads.
|
|
75
|
+
|
|
76
|
+
## 7. Content handling and density
|
|
77
|
+
|
|
78
|
+
- Text containers survive long content: truncate, clamp, or break long tokens deliberately, and let children shrink where truncation is expected.
|
|
79
|
+
- Test short, average, and very long inputs — including user-generated ones.
|
|
80
|
+
- Empty states are directional: say what belongs here and how to add it. A blank panel is a dead end.
|
|
81
|
+
- Density follows the dial: dense surfaces group and compress, airy surfaces let sections breathe. Never a dense table on an airy page without a reason.
|
|
82
|
+
- Copy is content, not decoration: active voice, specific labels ("Save API key", not "Continue"), sentence case, second person, errors that state the fix, and one job per written element.
|
|
83
|
+
|
|
84
|
+
## 8. Theme protocol
|
|
85
|
+
|
|
86
|
+
- Support the themes the project ships; do not assume a single mode. Respect the system preference unless the brand insists otherwise.
|
|
87
|
+
- Decide the mode earlier, not later: retrofitting a dark theme into hardcoded light values is a rewrite.
|
|
88
|
+
- Set the document colour scheme so native controls, scrollbars, and form widgets match the active theme.
|
|
89
|
+
- Test every shipped theme before finishing: contrast, hierarchy, imagery, and brand expression all hold in each.
|
|
90
|
+
|
|
91
|
+
## 9. Media and imagery
|
|
92
|
+
|
|
93
|
+
- Choose aspect ratios deliberately and crop for them; never letterbox or distort at any size.
|
|
94
|
+
- Give every image alternative text, and define a fallback for media that is missing or fails to load.
|
|
95
|
+
- Set explicit dimensions so loading media cannot shift the layout.
|
|
96
|
+
- Decorative media earns its place only when it carries narrative; otherwise omit it. Abstract gradient shapes standing in for art direction are not imagery.
|
|
97
|
+
- No filler stock: when nothing honest exists, a typographic or colour-driven composition is stronger than a borrowed photograph.
|
|
98
|
+
- Weight follows role — hero media may be generous, thumbnails may not.
|
|
99
|
+
- Record provenance for every asset, licensed or generated, in the source or the handoff.
|
|
100
|
+
|
|
101
|
+
## 10. Non-text surfaces and contrast detail
|
|
102
|
+
|
|
103
|
+
- Non-text elements that carry meaning — borders of inputs, icons, chart series, focus rings — meet a 3:1 contrast ratio against their surroundings.
|
|
104
|
+
- Text placed over imagery sits on a deliberate scrim, tint, or solid panel; never rely on the photograph staying dark in that spot.
|
|
105
|
+
- Sticky headers and footers stay thin (well under a tenth of the viewport), and any anchored or focused element is offset so it is not hidden beneath them.
|
|
106
|
+
- Disabled controls remain legible; reduce affordance, not readability.
|
|
107
|
+
- Charts and data graphics label series directly where possible rather than relying on a legend the eye must travel to.
|
|
108
|
+
|
|
109
|
+
## 11. Quotes and social proof
|
|
110
|
+
|
|
111
|
+
- Quotes are short, real, and attributed to a named person or role. Never invent a customer, metric, or partnership.
|
|
112
|
+
- Testimonial treatment stays quiet: no oversized quotation marks as decoration, no carousel that hides the substance behind interaction.
|
|
113
|
+
- Proof is placed below the hero and beside the claim it supports, never stuffed into the opening viewport.
|
|
114
|
+
- Absent real proof, omit the section rather than implying it.
|
|
115
|
+
|
|
116
|
+
## 12. Locale and internationalisation
|
|
117
|
+
|
|
118
|
+
- Format dates, times, numbers, and currency with platform internationalisation APIs, never hardcoded patterns.
|
|
119
|
+
- Detect language from request or client preferences, never from location.
|
|
120
|
+
- Mark brand names, code tokens, and identifiers as untranslatable so machine translation does not garble them.
|
|
121
|
+
- Leave room for text expansion (allow roughly 30% growth) and avoid text baked into images.
|
|
122
|
+
- Ensure interactive targets meet minimum touch size and account for safe-area insets.
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: Reference
|
|
3
|
+
title: Motion Craft
|
|
4
|
+
description: Deciding whether to animate, then choosing easing, duration, springs, technique, and cleanup.
|
|
5
|
+
generated: { by: agentic/1.0, at: 2026-09-21T00:00:00Z }
|
|
6
|
+
sources:
|
|
7
|
+
- { id: emil-design-eng, resource: references/design-skills/emil-design-eng.md, license: absent-terms (ideas distilled and rewritten, attributed) }
|
|
8
|
+
- { id: taste-skill, resource: references/design-skills/taste-skill.md, license: absent-terms }
|
|
9
|
+
- { id: awwwards, resource: references/design-skills/build-awwwards-quality-sites.md, license: absent-terms }
|
|
10
|
+
- { id: web-design-guidelines, resource: https://github.com/vercel-labs/web-interface-guidelines, license: MIT }
|
|
11
|
+
status: stable
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Motion Craft
|
|
15
|
+
|
|
16
|
+
Motion is a decision before it is a technique. Answer the four questions in order, then build.
|
|
17
|
+
|
|
18
|
+
## 1. Should this animate at all?
|
|
19
|
+
|
|
20
|
+
Ask how often a given person will trigger it:
|
|
21
|
+
|
|
22
|
+
| Frequency | Decision |
|
|
23
|
+
| --- | --- |
|
|
24
|
+
| Many times a day (command palette, keyboard shortcuts, list navigation) | none — instant |
|
|
25
|
+
| Tens of times a day (hover, row selection) | remove or drastically reduce |
|
|
26
|
+
| Occasional (modals, drawers, toasts) | standard animation |
|
|
27
|
+
| Rare or first-time (onboarding, celebration) | delight is allowed |
|
|
28
|
+
|
|
29
|
+
Never animate a keyboard-initiated action: repetition makes animation read as lag.
|
|
30
|
+
|
|
31
|
+
## 2. What is its purpose?
|
|
32
|
+
|
|
33
|
+
Every animation answers "why does this move?" Valid purposes:
|
|
34
|
+
|
|
35
|
+
- **Feedback** — the interface acknowledges the action.
|
|
36
|
+
- **Spatial consistency** — an element enters and leaves along the same path, so dismissal feels predictable.
|
|
37
|
+
- **State indication** — a control shows that something changed.
|
|
38
|
+
- **Explanation** — a sequence demonstrates how a feature works.
|
|
39
|
+
- **Preventing a jarring change** — something appearing or disappearing with no transition reads as broken.
|
|
40
|
+
|
|
41
|
+
If the honest answer is "it looks cool" on a frequently seen surface, do not animate it.
|
|
42
|
+
|
|
43
|
+
## 3. Which easing?
|
|
44
|
+
|
|
45
|
+
| Situation | Easing |
|
|
46
|
+
| --- | --- |
|
|
47
|
+
| Entering the screen | ease-out (immediate movement, then settle) |
|
|
48
|
+
| Moving or morphing on screen | ease-in-out |
|
|
49
|
+
| Hover or colour change | ease |
|
|
50
|
+
| Continuous motion (marquee, progress) | linear |
|
|
51
|
+
| Leaving the screen | ease-in (or ease-out with a shorter duration) |
|
|
52
|
+
|
|
53
|
+
- **Never use ease-in for an entrance** — starting slow reads as sluggish precisely when attention is highest.
|
|
54
|
+
- Default curves are weak; prefer steeper custom curves. Useful starting values: entrance `cubic-bezier(0.23, 1, 0.32, 1)`; on-screen movement `cubic-bezier(0.77, 0, 0.175, 1)`; drawer/tray `cubic-bezier(0.32, 0.72, 0, 1)`.
|
|
55
|
+
- Enter and exit need not mirror: exits are usually faster and quieter than entrances.
|
|
56
|
+
|
|
57
|
+
## 4. How long?
|
|
58
|
+
|
|
59
|
+
| Element | Duration |
|
|
60
|
+
| --- | --- |
|
|
61
|
+
| Press feedback | 100–160ms |
|
|
62
|
+
| Tooltip, small popover | 125–200ms |
|
|
63
|
+
| Dropdown, select, menu | 150–250ms |
|
|
64
|
+
| Modal, drawer, sheet | 200–500ms |
|
|
65
|
+
| Explanatory or marketing sequence | longer is permitted |
|
|
66
|
+
|
|
67
|
+
- Interactive UI stays under ~300ms. Distance, size, and element weight justify the upper end; frequency argues for the lower.
|
|
68
|
+
- A faster spinner makes identical load times feel shorter. Speed is perceived as quality.
|
|
69
|
+
|
|
70
|
+
## 5. Springs
|
|
71
|
+
|
|
72
|
+
Use a spring when the motion is **interruptible** or follows a **gesture** — dragging, flicking, sheets, anything a person can grab or reverse mid-flight. Springs preserve velocity when interrupted; fixed-duration curves restart and feel mechanical.
|
|
73
|
+
|
|
74
|
+
- Tuning intuition: higher stiffness settles faster and tighter; lower damping produces more overshoot. For UI, aim for minimal overshoot — enough to feel physical, not bouncy.
|
|
75
|
+
- Do not spring simple fades, colour changes, or entrances that nobody interrupts; a short ease-out is cheaper and cleaner.
|
|
76
|
+
- Spring motion must still respect reduced motion and must not delay a state change the person is waiting on.
|
|
77
|
+
|
|
78
|
+
## 6. Technique
|
|
79
|
+
|
|
80
|
+
- **Distance-independent motion**: translate by percentage when the element's size varies.
|
|
81
|
+
- **Scale children too**: scaling a parent scales its contents; compensate or animate the inner element separately to avoid distorted text.
|
|
82
|
+
- **Transform origin**: set it deliberately — popovers and menus originate from their trigger, not from their own centre.
|
|
83
|
+
- **Depth**: a small 3D rotation or perspective can imply layering; keep it subtle and never for text.
|
|
84
|
+
- **Clip-path reveals**: an inset clip animates cleanly for image and panel reveals, and pairs well with a slight translate.
|
|
85
|
+
- **Stagger**: offset siblings by small increments with a capped total; direction stays consistent. Do not stagger the primary action.
|
|
86
|
+
- **Interruptibility**: a user who changes their mind mid-animation should be able to reverse it immediately.
|
|
87
|
+
- Prefer the simplest mechanism that works — platform transitions for state, the platform animation API for sequenced or programmatic motion. One motion system per project.
|
|
88
|
+
|
|
89
|
+
## 7. Gesture and drag
|
|
90
|
+
|
|
91
|
+
- Momentum: a flick continues and settles naturally rather than stopping dead.
|
|
92
|
+
- Boundaries: resistance rather than hard stops, so the user feels the edge instead of hitting it.
|
|
93
|
+
- Feedback during drag: disable text selection and make the dragged element the obvious focus of the interaction.
|
|
94
|
+
- Every gesture needs a tap, click, and keyboard alternative unless the gesture is truly essential.
|
|
95
|
+
|
|
96
|
+
## 8. Performance
|
|
97
|
+
|
|
98
|
+
- Animate **transform and opacity**; anything that triggers layout or paint on every frame is a defect.
|
|
99
|
+
- Never animate every property — list the properties explicitly.
|
|
100
|
+
- Pause or stop animation when the element is offscreen or the document is hidden.
|
|
101
|
+
- Continuous canvas or WebGL work caps device pixel ratio, throttles input, and allocates nothing per frame.
|
|
102
|
+
- Media: short non-essential loops use compressed video with a still fallback rather than animated images.
|
|
103
|
+
|
|
104
|
+
## 9. Accessibility
|
|
105
|
+
|
|
106
|
+
- `prefers-reduced-motion` renders final states immediately — do not merely shorten the animation.
|
|
107
|
+
- Decorative loops stop entirely under reduced motion.
|
|
108
|
+
- Motion is never the only signal for a state change; pair it with a visible state.
|
|
109
|
+
- Autoplaying motion longer than five seconds alongside other content needs pause, stop, or hide controls.
|
|
110
|
+
|
|
111
|
+
## 10. Debugging motion
|
|
112
|
+
|
|
113
|
+
- Slow playback down (roughly 8–10×) to inspect timing and easing; most defects are invisible at full speed.
|
|
114
|
+
- Step frame by frame around the start and end of a transition to catch jumps and double-triggers.
|
|
115
|
+
- Test on real devices, and under load: smooth on a fast machine says nothing about a mid-range phone.
|
|
116
|
+
- Add instrumentation to find dropped frames, and re-measure after every content or font change.
|
|
117
|
+
|
|
118
|
+
## 11. Forbidden
|
|
119
|
+
|
|
120
|
+
- Animation with no narrative or feedback role.
|
|
121
|
+
- Infinite offscreen animation; continuously animated backgrounds.
|
|
122
|
+
- Layout-affecting animation, per-frame allocation, or unbounded blur and glow.
|
|
123
|
+
- Entrances from zero scale, or from a different origin than the element's own.
|
|
124
|
+
- Animating keyboard-driven actions, or making a person wait for an animation to act.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: Reference
|
|
3
|
+
title: Process
|
|
4
|
+
description: Detection first, design-system decisions, token persistence, knowledge lookups, and handoff.
|
|
5
|
+
generated: { by: agentic/1.0, at: 2026-09-21T00:00:00Z }
|
|
6
|
+
sources:
|
|
7
|
+
- { id: ui-ux-pro-max, resource: references/design-skills/ui-ux-pro-max.md, license: absent-terms (procedure distilled and rewritten, attributed) }
|
|
8
|
+
- { id: impeccable, resource: references/design-skills/impeccable.md, license: Apache-2.0 }
|
|
9
|
+
- { id: frontend-design, resource: references/design-skills/frontend-design.md, license: absent-terms }
|
|
10
|
+
status: stable
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Process
|
|
14
|
+
|
|
15
|
+
The order of operations that keeps the work honest, whatever the stack.
|
|
16
|
+
|
|
17
|
+
## 1. Detect before you decide
|
|
18
|
+
|
|
19
|
+
Inspect the project before proposing anything visual: framework and rendering model, styling approach and where tokens live, any motion mechanism already present, the icon set in use, existing design system or brand assets, the build and test commands, and whether the app can be run and inspected.
|
|
20
|
+
|
|
21
|
+
**Never assume.** A hardcoded default silently misroutes every recommendation. If something material cannot be detected — the audience, or which of two surfaces is in scope — ask one question rather than choosing for the user.
|
|
22
|
+
|
|
23
|
+
## 2. Design system: adopt, extend, or build
|
|
24
|
+
|
|
25
|
+
- If the project already has a system or tokens, work inside it. Extending beats introducing a second one.
|
|
26
|
+
- If the brief names an established system, use its official implementation rather than recreating the look by hand — and do not import its tokens only to override most of them.
|
|
27
|
+
- **One system per project.** Mixing two in one surface is a defect, not a style.
|
|
28
|
+
- An aesthetic rather than a system usually has no official package: build it from the platform's own capabilities, and be honest in comments about what is borrowed inspiration versus official material.
|
|
29
|
+
- A system is a floor, not a direction: never ship its default state as the final design.
|
|
30
|
+
|
|
31
|
+
## 3. Persist the direction
|
|
32
|
+
|
|
33
|
+
Write the system down so the next session does not guess: a **master file** (palette with roles, type scale, spacing rhythm, motion rules, component conventions) plus **per-surface overrides** that win for that surface only. Read the master before writing anything, and read the override before touching that surface. Never regenerate or overwrite the master without explicit authorization — prior decisions, yours or a teammate's, outrank a fresh run.
|
|
34
|
+
|
|
35
|
+
## 4. Look things up, verify, then apply
|
|
36
|
+
|
|
37
|
+
Prefer the project's own sources: tokens, components, documentation, history. Query with one dominant intent and a few meaningful terms, not a paragraph. If a lookup returns nothing useful, retry once narrower; if it still returns nothing, say no verified match was found and label any general guidance as a fallback. **Never persist unverified output** — no invented palette, no unconfirmed token, no rule recalled from memory and presented as project convention. Retrieved guidance is a recommendation: the user, the brief, and the project's rules outrank it.
|
|
38
|
+
|
|
39
|
+
## 5. Verify in bounded passes
|
|
40
|
+
|
|
41
|
+
Build fully → inspect once in a single batch (desktop and mobile together on web; the shipped device classes elsewhere) → fix everything that batch showed in one pass → confirm with at most one further round → stop.
|
|
42
|
+
|
|
43
|
+
Open-ended polishing behind a working interface is waste: it burns budget doing worse what the final handoff does better. Screenshots beat prose — one image settles a debate paragraphs cannot. Aesthetic choices are arguable; accessibility, honesty, and performance are not.
|
|
44
|
+
|
|
45
|
+
## 6. Hand off
|
|
46
|
+
|
|
47
|
+
Report briefly, in this order: the **Design Read** (mode, subject, audience, job, dials); what changed and which dials drove it; findings fixed with severities; what remains open plus any assumption to confirm; and asset provenance with any license note for shipped media. Keep it short — the work is the deliverable, the report is the receipt.
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: Reference
|
|
3
|
+
title: Review Checklist
|
|
4
|
+
description: Review method, severity ladder, and the checklist used for interface reviews, including the vendored Web Interface Guidelines digest.
|
|
5
|
+
generated: { by: agentic/1.0, at: 2026-09-21T00:00:00Z }
|
|
6
|
+
sources:
|
|
7
|
+
- { id: emil-design-eng, resource: references/design-skills/emil-design-eng.md, license: absent-terms (ideas distilled and rewritten, attributed) }
|
|
8
|
+
- { id: impeccable, resource: references/design-skills/impeccable.md, license: Apache-2.0 }
|
|
9
|
+
- { id: taste-skill, resource: references/design-skills/taste-skill.md, license: absent-terms }
|
|
10
|
+
- { id: web-interface-guidelines, resource: https://github.com/vercel-labs/web-interface-guidelines, license: MIT, captured: 2026-09-21 }
|
|
11
|
+
status: stable
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Review Checklist
|
|
15
|
+
|
|
16
|
+
Review produces findings, not opinions. Evidence first, fix second.
|
|
17
|
+
|
|
18
|
+
## Method
|
|
19
|
+
|
|
20
|
+
1. **Scope** — name what is under review (files, routes, or surfaces) before starting.
|
|
21
|
+
2. **Gather evidence** — read the source, and inspect the rendered surface when the environment allows: one batch covering desktop and mobile together. A screenshot settles arguments that prose cannot.
|
|
22
|
+
3. **Check in order** — blockers first (accessibility, honesty, broken behaviour), then hierarchy and craft, then polish. Stop escalating once the surface is sound.
|
|
23
|
+
4. **Report** — one line per finding, severity-ranked, `file:line` locatable:
|
|
24
|
+
`<severity> · <file>:<line> · <rule violated> · <fix>`
|
|
25
|
+
5. **Do not edit** unless fixes were requested. When they were, re-run the checklist afterwards.
|
|
26
|
+
|
|
27
|
+
Severity ladder: **blocker** (inaccessible, dishonest, or broken) · **major** (hierarchy, contrast, motion, performance) · **minor** (polish).
|
|
28
|
+
|
|
29
|
+
## Checklist
|
|
30
|
+
|
|
31
|
+
### Accessibility
|
|
32
|
+
|
|
33
|
+
- Every interactive element has a visible focus indicator, never removed without an equal replacement.
|
|
34
|
+
- Icon-only controls carry an accessible name; images carry alternative text (empty for decorative).
|
|
35
|
+
- Controls use real labels, associated with the control and clickable as one hit target.
|
|
36
|
+
- Semantic elements before ARIA: a button for actions, a link for navigation — never a clickable container.
|
|
37
|
+
- Headings are ordered and hierarchical; the page has a skip path to the main content.
|
|
38
|
+
- Sticky headers, footers, and overlays never obscure the focused element.
|
|
39
|
+
- Async updates (toasts, validation) are announced to assistive technology.
|
|
40
|
+
- Decorative media is hidden from assistive technology; meaningful media has captions or a transcript.
|
|
41
|
+
- Zoom is never disabled.
|
|
42
|
+
|
|
43
|
+
### Forms
|
|
44
|
+
|
|
45
|
+
- Correct input type and autocomplete intention per field; paste is never blocked.
|
|
46
|
+
- Errors appear inline beside the field, state the fix, and the first error receives focus on submit.
|
|
47
|
+
- The submit control stays enabled until the request starts, then shows progress.
|
|
48
|
+
- Unsaved changes warn before navigation.
|
|
49
|
+
- Checkboxes and radios share a single hit target with their label.
|
|
50
|
+
|
|
51
|
+
### Motion
|
|
52
|
+
|
|
53
|
+
- `prefers-reduced-motion` renders final states; decorative loops stop entirely.
|
|
54
|
+
- Only compositor-friendly properties animate; properties are listed, never "all".
|
|
55
|
+
- Transform origin is deliberate; animations are interruptible.
|
|
56
|
+
- Motion longer than five seconds alongside other content offers pause, stop, or hide.
|
|
57
|
+
- No gesture-only action without a click and keyboard equivalent.
|
|
58
|
+
|
|
59
|
+
### Typography and content
|
|
60
|
+
|
|
61
|
+
- Body measure under ~80 characters; headings do not orphan a single word.
|
|
62
|
+
- Ellipsis character for truncation and loading labels; typographic quotes; non-breaking spaces in units and brand names.
|
|
63
|
+
- Numeric columns use tabular figures.
|
|
64
|
+
- Long, short, and very long content all render without breaking layout; empty states give direction.
|
|
65
|
+
- Copy is active voice, sentence case, second person, with specific labels and errors that state the next step.
|
|
66
|
+
- Dates, times, numbers, and currency use internationalisation APIs; brand and code tokens are marked untranslatable.
|
|
67
|
+
|
|
68
|
+
### Images and media
|
|
69
|
+
|
|
70
|
+
- Explicit dimensions on media to prevent layout shift; below-fold media loads lazily.
|
|
71
|
+
- Above-fold critical media is prioritised.
|
|
72
|
+
- Compressed video with a still fallback rather than animated images for short loops.
|
|
73
|
+
- Provenance recorded; no unlicensed or invented assets.
|
|
74
|
+
|
|
75
|
+
### Performance
|
|
76
|
+
|
|
77
|
+
- Targets: largest contentful paint under 2.5s, interaction latency under 200ms, cumulative layout shift under 0.1.
|
|
78
|
+
- No layout reads during rendering; DOM reads and writes are batched.
|
|
79
|
+
- Long lists are virtualised or windowed.
|
|
80
|
+
- Fonts are preloaded where critical with a swap strategy; third-party origins are preconnected.
|
|
81
|
+
- Motion and canvas work pause offscreen; per-frame allocation is absent.
|
|
82
|
+
|
|
83
|
+
### Layout and touch
|
|
84
|
+
|
|
85
|
+
- Full-bleed layouts respect device safe areas; content overflow is fixed rather than clipped.
|
|
86
|
+
- Touch targets meet minimum size; tap highlight and double-tap zoom are handled deliberately.
|
|
87
|
+
- Containers inside sheets and drawers contain their overscroll.
|
|
88
|
+
- Multi-column sections declare their narrow-width collapse.
|
|
89
|
+
|
|
90
|
+
### State and navigation
|
|
91
|
+
|
|
92
|
+
- Addressable state (filters, tabs, pagination, open panels) is reflected in the URL and deep-linkable.
|
|
93
|
+
- Navigation uses real links so open-in-new-tab and modifier-click work.
|
|
94
|
+
- Destructive actions require confirmation or an undo window.
|
|
95
|
+
- Empty, loading, and error states exist for every data surface.
|
|
96
|
+
|
|
97
|
+
### Theming
|
|
98
|
+
|
|
99
|
+
- Every shipped theme holds contrast, hierarchy, and brand expression.
|
|
100
|
+
- The document colour scheme matches the active theme so native controls follow.
|
|
101
|
+
- Theme values come from one token strategy, not scattered overrides.
|
|
102
|
+
|
|
103
|
+
## Vendored Web Interface Guidelines digest
|
|
104
|
+
|
|
105
|
+
Upstream: `https://raw.githubusercontent.com/vercel-labs/web-interface-guidelines/main/command.md` (MIT), captured **2026-09-21**. This digest is the offline floor; re-fetch to refresh. Rules are restated in stack-neutral terms. Areas already covered by the checklist above — accessibility, focus, forms, motion, layout, touch, images, theming, navigation and state — are not repeated; what follows is the remainder of the upstream rule set.
|
|
106
|
+
|
|
107
|
+
**Typography** — ellipsis character; curly quotes; non-breaking spaces for units and shortcuts; loading labels end with an ellipsis; tabular figures for numeric columns; balanced heading wrapping.
|
|
108
|
+
|
|
109
|
+
**Content handling** — long content truncates, clamps, or wraps deliberately; shrinkable children where truncation is expected; empty states handled; short, average, and very long user input all anticipated.
|
|
110
|
+
|
|
111
|
+
**Performance detail** — virtualise long lists; no layout reads while rendering; batch DOM reads and writes; uncontrolled inputs preferred, controlled inputs cheap per keystroke; preconnect asset origins; preload critical fonts with swap; compressed video over animated images with a still alternative.
|
|
112
|
+
|
|
113
|
+
**Locale** — internationalisation APIs for dates, times, numbers, and currency; language detected from preferences rather than location; brand and code tokens marked untranslatable.
|
|
114
|
+
|
|
115
|
+
**Hydration safety** — inputs with a value must handle change or default explicitly; server and client rendering of dates and times must agree; suppression of hydration warnings only where genuinely required.
|
|
116
|
+
|
|
117
|
+
**Hover and states** — buttons and links have a hover state; interactive states increase contrast above rest.
|
|
118
|
+
|
|
119
|
+
**Copy** — active voice; title case for headings and buttons; numerals for counts; specific button labels; errors with a fix; second person.
|
|
120
|
+
|
|
121
|
+
**Flag on sight** — disabled zoom; blocked paste; animating all properties; removed outlines; click handlers on non-interactive containers; images without dimensions; unvirtualised large lists; inputs without labels; icon buttons without names; hardcoded date or number formats; unjustified autofocus; animated images where video fits; gesture-only actions.
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: guardrails
|
|
3
|
+
description: >
|
|
4
|
+
Cross-cutting hardening for security, deprecated APIs, and system gotchas. Use when writing or modifying code that touches dependencies, Docker, HTML/auth, or secrets. Use when reviewing code for security pitfalls. Do NOT use when only reading or exploring without code changes.
|
|
5
|
+
allowed-tools: Bash(*)
|
|
6
|
+
license: MIT
|
|
7
|
+
compatibility: Requires bun >= 1.0.
|
|
8
|
+
metadata:
|
|
9
|
+
author: agentic
|
|
10
|
+
version: "1.0"
|
|
11
|
+
positive_triggers:
|
|
12
|
+
- "check for security pitfalls before committing code"
|
|
13
|
+
- "prevent deprecated API usage in this change"
|
|
14
|
+
- "review system gotchas for Docker and HTML handling"
|
|
15
|
+
- "harden code touching dependencies or auth"
|
|
16
|
+
anti_triggers:
|
|
17
|
+
- "only reading code without modifying it"
|
|
18
|
+
- "exploring the codebase without code changes"
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
# Guardrails
|
|
22
|
+
|
|
23
|
+
Cross-cutting hardening that loads first — before domain skills — to prevent the 5 mistakes that recur across reports: `on*` stripping, secret leaks, deprecated adapter, `null` vs `Option`, lifetime elision. Tiny Level 1 inline; Level 2 behind `references/guardrails-patterns.md`.
|
|
24
|
+
|
|
25
|
+
## Activation Boundary
|
|
26
|
+
|
|
27
|
+
**Triggers on:**
|
|
28
|
+
- Writing/modifying code that touches `deps` (package.json, Cargo.toml), `Docker` (Dockerfile, compose), `HTML` (Svelte, templ), `auth` (tokens, cookies, sessions), or secrets
|
|
29
|
+
- Reviewing a change for security or deprecated usage
|
|
30
|
+
- Handling `on*` event handlers, `innerHTML`, or secret-like strings
|
|
31
|
+
|
|
32
|
+
**Does NOT trigger on:**
|
|
33
|
+
- Only reading or exploring without mutations (use explore mode)
|
|
34
|
+
- Pure planning (proposal/design/tasks) before code
|
|
35
|
+
- Skills that explicitly state `Do NOT use guardrails` (none today)
|
|
36
|
+
|
|
37
|
+
## When to Use
|
|
38
|
+
|
|
39
|
+
Load this skill **first** before any domain skill when the task touches the 4 high-risk surfaces above. Check the 5 anti-examples below, then proceed to domain logic. If no high-risk surface, skip guardrails — save tokens.
|
|
40
|
+
|
|
41
|
+
## Contrast
|
|
42
|
+
|
|
43
|
+
| Before (old) | After (new) | Why different |
|
|
44
|
+
|--------------|-------------|---------------|
|
|
45
|
+
| `on*` handlers stripped silently | Preserve `on:click` explicitly or sanitize intentionally | Svelte 5 strips unknown `on*` — must be explicit, not accidental |
|
|
46
|
+
| `if (user != null)` | `if let Some(user) = user` | Rust absence is type-level `Option`, not runtime `null` |
|
|
47
|
+
| `svelte-adapter-bun` | `@sveltejs/adapter-static` + `tower-http` | 3.0.0 canonical: Axum serves static, not Bun adapter |
|
|
48
|
+
| `Embedded SQLite per container` | `Central PostgreSQL via SQLx` | Single owner `crates/api/migrations/` — no `../` traversal |
|
|
49
|
+
| `cargo build` in handler | `queue + worker + WSS` | Heavy CPU never blocks request path — coordinator delegates |
|
|
50
|
+
|
|
51
|
+
## Anti-examples
|
|
52
|
+
|
|
53
|
+
**1. Do NOT: Strip `on*` silently**
|
|
54
|
+
```svelte
|
|
55
|
+
<!-- before (wrong) — Svelte strips on* without warning -->
|
|
56
|
+
<div oncustom={handler}>click</div>
|
|
57
|
+
```
|
|
58
|
+
```svelte
|
|
59
|
+
<!-- after (right) — explicit Svelte 5 handling -->
|
|
60
|
+
<div on:click={handler}>click</div>
|
|
61
|
+
```
|
|
62
|
+
Why: Svelte 5 sanitizes `on*` — undetected loss of interactivity.
|
|
63
|
+
|
|
64
|
+
**2. Do NOT: Commit secrets**
|
|
65
|
+
```bash
|
|
66
|
+
# before (wrong)
|
|
67
|
+
git commit -m "add .env with WARERA_KEY=abc"
|
|
68
|
+
```
|
|
69
|
+
```bash
|
|
70
|
+
# after (right) — .env is gitignored, secrets via envx
|
|
71
|
+
echo ".env" >> .gitignore && envx set WARERA_KEY
|
|
72
|
+
```
|
|
73
|
+
Why: `NEVER commit credentials/.env` — `AGENTS.md` Must-follow, leaked secrets rotate.
|
|
74
|
+
|
|
75
|
+
**3. Do NOT: Use deprecated adapter**
|
|
76
|
+
```js
|
|
77
|
+
// before (wrong)
|
|
78
|
+
import adapter from 'svelte-adapter-bun';
|
|
79
|
+
```
|
|
80
|
+
```js
|
|
81
|
+
// after (right)
|
|
82
|
+
import adapter from '@sveltejs/adapter-static';
|
|
83
|
+
export default { kit: { adapter: adapter({ fallback: 'index.html' }) } };
|
|
84
|
+
```
|
|
85
|
+
Why: 3.0.0 stack inversion — Axum `tower-http` serves static, single distroless binary.
|
|
86
|
+
|
|
87
|
+
**4. Do NOT: Check null in Rust**
|
|
88
|
+
```rust
|
|
89
|
+
// before (wrong)
|
|
90
|
+
if user != null { /* ... */ }
|
|
91
|
+
```
|
|
92
|
+
```rust
|
|
93
|
+
// after (right)
|
|
94
|
+
if let Some(u) = user { /* use u */ }
|
|
95
|
+
```
|
|
96
|
+
Why: Rust has no `null`; absence is `Option<T>` — compiler forces handling.
|
|
97
|
+
|
|
98
|
+
**5. Do NOT: Elide lifetimes unsafely**
|
|
99
|
+
```rust
|
|
100
|
+
// before (wrong)
|
|
101
|
+
fn longest(x: &str, y: &str) -> &str { x }
|
|
102
|
+
```
|
|
103
|
+
```rust
|
|
104
|
+
// after (right)
|
|
105
|
+
fn longest<'a>(x: &'a str, y: &'a str) -> &'a str { if x.len() > y.len() { x } else { y } }
|
|
106
|
+
```
|
|
107
|
+
Why: Borrow checker requires explicit `'a` when output borrows input.
|
|
108
|
+
|
|
109
|
+
## References
|
|
110
|
+
|
|
111
|
+
- `references/guardrails-patterns.md` — Level 2 detail for each anti-example (code before/after, signal, Why) — on-demand, not startup cost
|
|
112
|
+
- `project/AGENTS.md` Must-read pointer — this skill is first-loaded via `Must-read: project/skills/guardrails/SKILL.md before any code touching deps/Docker/HTML/auth`
|
|
113
|
+
|
|
114
|
+
## Gotchas
|
|
115
|
+
|
|
116
|
+
- Loads first, but only when high-risk surface present — `only reading` anti-triggers prevent bloat on explore tasks
|
|
117
|
+
- Never duplicate domain anti-examples — domain skills link here via `See ../../guardrails/SKILL.md — cross-cutting anti-examples`
|
|
118
|
+
- Single source for cross-cutting: this skill, not `AGENTS.md` body (AGENTS.md only holds the pointer)
|