klibs-io / frontend
AGENTS.md108 starsChanged 4 months agoApache-2.0View on GitHub
Next.js 14 (App Router) frontend for klibs.io. React 18 + TypeScript, JetBrains @rescui/* design system. Pick the cheapest level that proves the behavior:
- Reads credentials
- Installs packages
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository3 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- kotlin-multiplatform-libraries-expertSkill
The file
We split this AGENTS.md into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 33
Import via the @/* alias (@/app/ui/container), never deep relative paths.
- Very specific: line 36
Prefer existing @rescui/* and @jetbrains/kotlin-web-site-ui components over hand-rolled UI.
- Distinctive: line 51
Never push to the main branch.
- Distinctive: line 52
Keep diffs minimal and localized.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md
Next.js 14 (App Router) frontend for klibs.io. React 18 + TypeScript, JetBrains @rescui/* design system.
Setup
npm install
cp .env.example .env.local # NEXT_PUBLIC_API_URL points at the backendCommands
npm run dev # dev server on :3000
npm run build # production build — run before claiming a change is done
npm run lint # ESLint (next/core-web-vitals + next/typescript); also a pre-commit hook
npm run test:component # Vitest + React Testing Library (jsdom)
npm run test:visual # UI Verify visual tests in real Chromium (needs npm run pw:install once)
npm run test:e2e # Playwright user journeys (needs a running frontend)Structure
src/app/— App Router routes; each route folder holdspage.tsxand a*-page-content.tsxclient part.src/app/ui/<kebab-case>/— one component per folder:index.tsx+styles.module.css+ colocated tests.src/app/api.ts— all backendfetchcalls, typed bysrc/app/types.ts. Add new calls here, not in components.src/app/{types,helpers,constants,hooks,media,analytics}.ts— shared primitives.src/test/— Vitest setup and fixtures.e2e-tests/— Playwright specs.
Conventions
- Import via the
@/*alias (@/app/ui/container), never deep relative paths. - Server Components by default; add
'use client'only for state, effects, or event handlers. - Styling: CSS Modules (
styles.module.css) composed withclassnames; typography viatextCnfrom@rescui/typography. No inline styles, no new CSS frameworks. - Prefer existing
@rescui/*and@jetbrains/kotlin-web-site-uicomponents over hand-rolled UI. Avoid adding dependencies. - 4-space indent, 120-char lines, default export for components.
- Client-visible env vars must be prefixed
NEXT_PUBLIC_and added to.env.example.
Testing
Pick the cheapest level that proves the behavior:
*.test.tsx— rendering, links, keyboard, filters. Assert user-visible outcomes via Testing Library queries; don't assert implementation details or call order.*.visual.test.tsx— layout and styling regressions only. Runs as a separate Vitest project, sotest:componentskips it. Import the global CSS the component needs, pin an explicit viewport, and disable animations/transitions so frames are deterministic.e2e-tests/*— reserve for full journeys crossing routing or backend boundaries.
Guardrails
- Never delete branches.
- Never push to the main branch.
- Keep diffs minimal and localized. No drive-by refactors, renames, or reformatting.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

