agentleFS
JetBrainsKnown publisherJetBrains/klibs-io/frontend/AGENTS.md

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.

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
  1. Very specific:

    Import via the @/* alias (@/app/ui/container), never deep relative paths.

    line 33
  2. Very specific:

    Prefer existing @rescui/* and @jetbrains/kotlin-web-site-ui components over hand-rolled UI.

    line 36
  3. Distinctive:

    Never push to the main branch.

    line 51
  4. Distinctive:

    Keep diffs minimal and localized.

    line 52

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

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 backend

Commands

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 holds page.tsx and a *-page-content.tsx client part.
  • src/app/ui/<kebab-case>/ — one component per folder: index.tsx + styles.module.css + colocated tests.
  • src/app/api.ts — all backend fetch calls, typed by src/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 with classnames; typography via textCn from @rescui/typography. No inline styles, no new CSS frameworks.
  • Prefer existing @rescui/* and @jetbrains/kotlin-web-site-ui components 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, so test:component skips 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.