Библиотека · EN
Library for Gemini
v0.1 · 2026-10-19 · от Better Mechanics · ниво: общност (текст, без протокол от проверка)
Claude's check notes are marked [check].
1 · What Gemini reads
GEMINI.md (project conventions) · AGENTS.md (shared multi-agent standard) · the system instruction · .cursorrules / .windsurfrules [check: Gemini's claim; not verified that it parses these].
2 · Prompt patterns that work with Gemini
- Delimited blocks:
<role_definition>,<context>,<technical_constraints>,<expected_output>. - Strict negative constraints: "DO NOT use arbitrary Tailwind values (e.g.
w-[243px]); use tokens." "DO NOT add prose around the code." - Schema / type contracts for the output (TypeScript interface or JSON Schema).
- Self-check before output: evaluate against a checklist (contrast, 320 px overflow) before emitting code. [check: a self-check is not proof — the recipe still runs the real tools.]
3 · Failure modes and guards
| Failure | Symptom | Guard |
|---|---|---|
| Tailwind v3/v4 mixing | @tailwind base next to @import "tailwindcss" |
state the exact Tailwind version in the prompt contract |
| Generic template syndrome | centred rounded cards, purple/indigo accents, grey borders | strict brand token list (e.g. monochrome, 3 px borders, radius 0) |
| Overflow at 320 px | fixed widths, unwrapped tables | max-width:100%, minmax(min(…,100%),1fr) + a Playwright assertion |
| Newest CSS without fallback | @starting-style, popover with no fallback |
name the target browsers; require @supports fallbacks |
| Cyrillic metric jump | fonts without Cyrillic → fallback jump | unicode-range + fallback metrics (size-adjust, ascent-override); and Bulgarian locl verified on the file |
| [check] Overconfident numbers and legal claims | invented budgets (e.g. "LCP < 1.8 s"), wrong law references (Impressum attributed to TDDDG/TMG instead of DDG § 5) | every number and law in a Gemini recipe is checked against the source before publishing |
4 · Tools Gemini works with
Vite (MIT) · Biome (MIT/Apache-2.0) · Playwright (Apache-2.0) · axe-core CLI (MPL-2.0) · Lighthouse CLI (Apache-2.0) · Stylelint (MIT) · Tailwind CLI (MIT). [check: licences as stated by Gemini; verify on the repos before listing as GREEN.]
5 · First 10 recipes (Gemini's titles)
gemini-core-brutalist-tokens— zero-radius monochrome tokens with OKLCH alert coloursgemini-cyrillic-latin-font-stack— dual-script variable type with no fallback layout shiftgemini-320px-unbreakable-grid— grid that passes the 320 px overflow assertiongemini-apca-accessible-data-table— dense data table with keyboard traversalgemini-wcag-aaa-dialog-primitive— modal with focus restore, Escape, backdropgemini-perf-inp-form— multi-step form without long tasksgemini-schema-org-software-graph— JSON-LD linking specs, author, codegemini-tailwind-v4-clean-migration— v3 → v4@thememigrationgemini-strict-csp-nginx-config— CSP with noncesgemini-playwright-auto-qa-pipeline— axe + 320 px + LCP budget in CI
[check] "AAA" and "APCA" targets are Gemini's ambition; our standard is WCAG 2.2 AA unless a recipe states otherwise.