berd / design-system
AGENTS.md1k starsChanged 3 months agoApache-2.0View on GitHub
This folder contains the in-app Goose Design System Explorer. Treat it as a real product surface, not a docs dump. Every component page should use the same structure unless Morgan explicitly asks for a different treatment: 1. PageIntro with a short human-readable purpose. 2. ComponentSpec using the component name. This pulls source, variants, and slots from the generated manifest. Do not hand-write those facts. 3. ComponentPlayground for the live component preview and controls. 4. ComponentTokenDetails for the current preview's color…
We split this AGENTS.md into the rules it gives an agent
16 rules. About 0 are common, 11 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈11
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Every component page should use the same structure unless Morgan explicitly asks for a different treatment:
- Distinctive: line 30
When populating a component page:
- Very specific: line 32
Always use ComponentSpec for manifest-owned facts.
- Distinctive: line 45
Keep the token details aligned to the current preview state.
- Distinctive: line 54
Prefer controls for props, modes, composition choices, and states that cannot be easily inspected by directly interacting with the preview.
- Distinctive: line 56
Do not add a control for state the user can naturally change in the preview, such as an accordion's open section, unless the state is …
- Distinctive: line 59
Keep controls scoped to real component API or real product states.
- Distinctive: line 61
Do not add scenario/content presets when they only swap demo copy.
- Very specific: line 66
Remove impossible options when another control changes the valid state space.
- Distinctive: line 69
Use the smallest set of controls that explains the component.
- Distinctive: line 78
Do not show visible label text as token metadata.
- Distinctive: line 79
Do not show raw Tailwind utility pills in the Tokens section.
- Very specific: line 80
Prefer explicit values over vague values like inherited, state-dependent, or disabled opacity.
- Very specific: line 92
Use Goose extension tokens only for product-specific surfaces and identities, such as bg-surface-composer, bg-canvas-base, chip colors, …
- Very specific: line 97
Do not use raw palette utilities like bg-gray-100, direct hex colors, or component-specific one-off color tokens without first adding them …
- Distinctive: line 103
After changing component source or explorer pages, run:
≈ “Common” is an estimate: at least 1 in 5 of the 36,368 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
Design System Explorer
This folder contains the in-app Goose Design System Explorer. Treat it as a real product surface, not a docs dump.
Repeatable Component Page Contract
Every component page should use the same structure unless Morgan explicitly asks for a different treatment:
PageIntrowith a short human-readable purpose.ComponentSpecusing the component name. This pulls source, variants, and slots from the generated manifest. Do not hand-write those facts.ComponentPlaygroundfor the live component preview and controls.ComponentTokenDetailsfor the current preview's color states and text styling.
The generated manifest owns facts that can be read from code: source file,
exports, data-slots, CVA variants, state classes, token classes, and source
token classes. The page owns designer judgment: what the preview should render,
which controls matter, anatomy labels, state rows, and the plain-language
description.
Populating Component Pages
The manifest is an inventory scanner, not a page generator. Use it to keep generated facts honest and to prevent docs drift, but do not expect it to infer the best live demo.
When populating a component page:
- Always use
ComponentSpecfor manifest-owned facts. Do not duplicate source paths, slots, variants, or generated token facts by hand. - Render the actual shared UI primitive in the playground whenever it can be safely shown in-page. A manifest summary card is only a fallback for helper modules or components that cannot be meaningfully rendered without app state.
- Author playground controls around meaningful product states, even when the
manifest reports
Variants: None. Useful controls may include selected value, open/closed, disabled, invalid, loading, placeholder text, option count, orientation, density-sensitive size, or empty state. - For trigger/portal components, include the full composition, not only the
trigger. For example, a Dialog playground needs
DialogTriggerandDialogContent; a Popover playground needsPopoverTriggerandPopoverContent. - Keep the token details aligned to the current preview state. If a control changes disabled, invalid, open, selected, or destructive state, the token rows should describe that state.
Playground Control Heuristics
Playground controls should help designers inspect meaningful component behavior, not turn the preview into a remote-controlled demo.
- Prefer controls for props, modes, composition choices, and states that cannot be easily inspected by directly interacting with the preview.
- Do not add a control for state the user can naturally change in the preview, such as an accordion's open section, unless the state is otherwise hard to reach or compare.
- Keep controls scoped to real component API or real product states. Do not invent visual variants just to fill the control panel.
- Do not add scenario/content presets when they only swap demo copy. Add them only when each preset exposes a distinct component behavior, layout stress, or product state.
- Hide controls when they do not apply to the selected mode instead of showing a disabled control with unclear meaning.
- Remove impossible options when another control changes the valid state space.
For example, if a single accordion cannot collapse, the open-section choices
should not include
None. - Use the smallest set of controls that explains the component. A strong page usually exposes 3-6 high-signal controls rather than every possible state.
Token Table Rules
- Color rows answer: what background, text/icon, and border color is visible for each anatomy/state combination?
- Text rows answer: what typography styling is visible? Keep color out of the text table.
- Do not show visible label text as token metadata.
- Do not show raw Tailwind utility pills in the Tokens section.
- Prefer explicit values over vague values like
inherited,state-dependent, ordisabled opacity. - Disabled states should name the base token plus opacity, for example
--foreground / 50%.
Token Usage
Component source should use the shadcn semantic token contract first:
bg-background, text-foreground, bg-card, bg-popover, bg-muted,
text-muted-foreground, bg-accent, bg-primary, bg-destructive,
border-border, border-input, and ring-ring.
Use Goose extension tokens only for product-specific surfaces and identities,
such as bg-surface-composer, bg-canvas-base, chip colors, status colors,
and composer placeholder color. Use bg-card-glass for floating chrome glass
(nav panes, right rail, the global composer pill).
Do not use raw palette utilities like bg-gray-100, direct hex colors, or
component-specific one-off color tokens without first adding them to the design
system.
Validation
After changing component source or explorer pages, run:
pnpm design-system:generate
pnpm design-system:coverage
just checkThen visually verify the changed page in the in-app explorer.
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 28,693 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 repository18 other files it gives its agents.
- AGENTS.mdAGENTS.md
- bb-cli/AGENTS.mdAGENTS.md
- distro/skills/berd-help/references/agents.mdAGENTS.md
- LAWS/AGENTS.mdAGENTS.md
- src/shared/ui/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- src/shared/ui/CLAUDE.mdCLAUDE.md
- assistive-uxSkill
- berdctl-new-commandSkill
- code-reviewSkill
- create-prSkill
- experimental-featuresSkill
- agent-builderSkill
- berd-helpSkill
- berd-monitorSkill
- berd-orchestratorSkill
- skill-builderSkill
- buzz-handoffSkill
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.

