agentleFS
digital-go-jpdigital-go-jp/design-system-example-components-react/AGENTS.md

design-system-example-components-react

AGENTS.md685 starsChanged 26 days agoMITView on GitHub

Shared rules for AI coding agents (Claude Code, Copilot, etc.) working on this repo. React + TailwindCSS + Storybook reference implementation of the Digital Agency Design System (DADS) v2. Components are ported from the HTML reference: digital-go-jp/design-system-example-components-html. Read these before making design decisions: Run these before declaring work complete: Before writing or editing any component, read the component-rules skill. It covers component design principles, file layout, styling rules (Tailwind tokens, Preflight, data-* patterns), accessibility, Storybook conventions, and testing. Workflow-specific tasks…

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.

    Of the AGENTS.md files we read, the 31,439 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 repository7 other files it gives its agents.

The file

We split this AGENTS.md into the rules it gives an agent

6 rules. About 0 are common, 3 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read these before making design decisions:

    line 11
  2. Distinctive:

    Run these before declaring work complete:

    line 25
  3. Very specific:

    Do not add runtime or dev dependencies without user approval.

    line 41
  4. Distinctive:

    Default to no comments. Add one only when the "why" is non-obvious (hidden constraint, workaround, surprising invariant).

    line 45
  5. Very specific:

    Follow Biome's import ordering.

    line 48
  6. Very specific:

    Use the create-commit skill — it covers the message format, scope conventions, and approval flow used in this repo.

    line 59

≈ “Common” is an estimate: at least 1 in 5 of the 40,246 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

Shared rules for AI coding agents (Claude Code, Copilot, etc.) working on this repo.

Project overview

React + TailwindCSS + Storybook reference implementation of the Digital Agency Design System (DADS) v2. Components are ported from the HTML reference: digital-go-jp/design-system-example-components-html.

Required reading

Read these before making design decisions:

  • src/docs/introduction.mdx — project positioning, supported environments, how to file issues
  • src/docs/development-policy.mdx — design principles (customizability, simplicity, HTML/CSS-native preferred), browser support, accessibility policy

Tech stack

  • React 19
  • TailwindCSS 3 with @digital-go-jp/tailwind-theme-plugin
  • Storybook 10
  • TypeScript, Biome, Markuplint, Vitest

Commands

Run these before declaring work complete:

  • npm run lint — Biome lint
  • npm run lint:markup — Markuplint (also checks .stories.tsx, e.g. heading-level skips)
  • npm run build — tsc && vite build (doubles as typecheck)
  • npm test — Vitest (unit + Storybook)
  • npm run storybook — local Storybook on :6006 for manual verification

Working on components

Before writing or editing any component, read the component-rules skill. It covers component design principles, file layout, styling rules (Tailwind tokens, Preflight, data-* patterns), accessibility, Storybook conventions, and testing.

Workflow-specific tasks have their own skills (see Skills below). They build on top of component-rules rather than restating it.

Dependencies

Do not add runtime or dev dependencies without user approval. The project deliberately keeps dependencies minimal (see introduction.mdx).

Code style

  • Default to no comments. Add one only when the "why" is non-obvious (hidden constraint, workaround, surprising invariant). No comments that restate what the code does.
  • Comments, commit messages, variable/type names: English.
  • UI copy, Story display names (name field), component-spec.md contents, PR descriptions: Japanese (matches the user-facing product).
  • Follow Biome's import ordering. Separate type imports from value imports.
  • No any. Avoid let where const suffices.

Branch naming

<scope>/<slug>, lowercase, hyphen-separated. Scopes observed: feature, refactor, chore, docs.

Examples: feature/progress-indicator, refactor/button-styles, docs/agents-rules.

Commit messages

Use the create-commit skill — it covers the message format, scope conventions, and approval flow used in this repo.

Skills

Skills under .agents/skills/:

  • component-rules — rules and conventions for every component (read this first).
  • port-html-to-react — port a component from the HTML reference to this project.
  • write-tests — write UI / hook / util tests with the project's conventions.
  • write-component-docs — author Storybook autodocs (description / docs.page) translated from the HTML version's MDX structure.
  • pre-completion-check — run lint, markup lint, build, and tests before declaring a task done.
  • review — review changed code against the project's review checklist.
  • create-commit — stage, draft a Conventional Commits message in this repo's style, and commit after user approval.

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.