graph-explorer
AGENTS.md484 starsChanged 2 months agoApache-2.0View on GitHub
Correct behavior is necessary but not sufficient — structural quality is a hard requirement. Don't accept a messy implementation just because it passes tests. Read the relevant doc before working in that area:
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 repository30 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- ask-mattSkill
- codebase-designSkill
- code-reviewSkill
- diagnosing-bugsSkill
- domain-modelingSkill
- grillingSkill
- grill-meSkill
- grill-with-docsSkill
- handoffSkill
- implementSkill
- implement-specSkill
- improve-codebase-architectureSkill
- prototypeSkill
- prSkill
- researchSkill
- resolving-merge-conflictsSkill
- retroSkill
- setup-matt-pocock-skillsSkill
- tddSkill
- teachSkill
- to-questionnaireSkill
- to-specSkill
- to-ticketsSkill
- triageSkill
- wait-whatSkill
- wayfinderSkill
- wizardSkill
- writing-for-agentsSkill
- writing-great-skillsSkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
28 rules. About 0 are common, 18 are distinctive, and 10 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈18
Distinctive · estimate
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 5
Every commit should have no type errors, lint errors, formatting issues, or failing tests
- Distinctive: line 6
Don't hard-wrap Markdown prose to a fixed column width, let it soft-wrap
- Distinctive: line 7
When possible, create failing tests first then implement the logic to make the tests pass
- Distinctive: line 8
Add or update tests for the code you change, even if nobody asked
- Very specific: line 9
Write temporary files (scratch notes, intermediate output) to the git-ignored .scratch/ directory at the repo root, never elsewhere in the …
- Distinctive: line 16
Prefer deep modules: simple interface, substantial implementation.
- Distinctive: line 17
Prefer single-pass, copy-free processing for collections that can grow large.
- Distinctive: line 18
Prefer "code judo": restructurings that delete whole layers, branches, or concepts rather than rearrange them.
- Distinctive: line 19
Don't push a file from under 1000 lines to over without explicit justification — treat the boundary as a decomposition signal and extract …
- Distinctive: line 21
Prefer direct, legible code.
- Very specific: line 22
Avoid unnecessary any, unknown, casts, or optionality.
- Distinctive: line 23
Keep feature logic in the feature layer.
- Distinctive: line 24
Don't serialize independent work or leave related state half-applied when a more atomic structure is available.
- Distinctive: line 28
Default to none; justify every one.
- Distinctive: line 30
Prefer descriptive names instead.
- Very specific: line 36
Prefer named function syntax over anonymous arrow functions for module-level declarations (function handleClick() {}, not const handleClick …
- Very specific: line 37
Use an explicit type alias instead of ReturnType<typeof ...> when one exists (e.g.
- Distinctive: line 39
Prefer Zod at boundaries to enforce contract and strong typing
- Very specific: line 40
Don't change the VS Code setting typescript.autoClosingTags
- Distinctive: line 41
Prefer throwing upward over local error laundering
- Very specific: line 42
Prefer named domain types over Record<string, unknown>
- Distinctive: line 43
Do not encode uncertainty as adapters, defaults, optionals, spreads, or catch blocks.
- Very specific: line 48
No branch or commit message prefixes (no chore:, fix:, feature/, etc.)
- Distinctive: line 50
Keep commit messages brief and descriptive
- Distinctive: line 54
Read the relevant doc before working in that area:
- Very specific: line 68
Every code review, including /code-review, uses these standards sources:
- Very specific: line 77
Run from project root with pnpm.
- Very specific: line 97
Default label vocabulary (needs-triage, needs-info, ready-for-agent, ready-for-human, wontfix).
≈ “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
Agent Rules
Core Rules
- Every commit should have no type errors, lint errors, formatting issues, or failing tests
- Don't hard-wrap Markdown prose to a fixed column width, let it soft-wrap
- When possible, create failing tests first then implement the logic to make the tests pass
- Add or update tests for the code you change, even if nobody asked
- Write temporary files (scratch notes, intermediate output) to the git-ignored
.scratch/directory at the repo root, never elsewhere in the tree
Code Quality Standards
Correct behavior is necessary but not sufficient — structural quality is a hard requirement. Don't accept a messy implementation just because it passes tests.
- Follow YAGNI principles.
- Prefer deep modules: simple interface, substantial implementation.
- Prefer single-pass, copy-free processing for collections that can grow large; small fixed lists don't need it.
- Prefer "code judo": restructurings that delete whole layers, branches, or concepts rather than rearrange them. Don't stop at "a bit cleaner."
- Don't push a file from under 1000 lines to over without explicit justification — treat the boundary as a decomposition signal and extract instead.
- Push new conditionals and special cases into a dedicated helper, state machine, or module — don't tangle them into an unrelated flow.
- Prefer direct, legible code. Flag thin wrappers, identity abstractions, and generic mechanisms that hide simple structure.
- Avoid unnecessary
any,unknown, casts, or optionality; make invariants explicit at boundaries instead of papering over them with silent fallbacks. - Keep feature logic in the feature layer; reuse existing canonical helpers instead of introducing near-duplicates in shared modules.
- Don't serialize independent work or leave related state half-applied when a more atomic structure is available.
Comments
- Default to none; justify every one.
- Capture rationale, never what or how the code already says.
- Prefer descriptive names instead.
- Doc comments (JSDoc) state what a symbol does — the exception.
- Be extremely concise.
TypeScript
- Prefer named function syntax over anonymous arrow functions for module-level declarations (
function handleClick() {}, notconst handleClick = () => {}). Arrow functions inside a function body are fine. - Use an explicit type alias instead of
ReturnType<typeof ...>when one exists (e.g.AppStore, notReturnType<typeof getAppStore>) - Prefer a branded type over a raw
string/numberwhenever the value is used for a lookup or passed to a function expecting a value that represents a specific concept — an ID, a node/edge label, a type name, etc. Construct them with their creator function (e.g.createVertexId()); never cast a bare string. This makes "which kind of string is this" a compile-time guarantee. - Prefer Zod at boundaries to enforce contract and strong typing
- Don't change the VS Code setting
typescript.autoClosingTags - Prefer throwing upward over local error laundering
- Prefer named domain types over
Record<string, unknown> - Do not encode uncertainty as adapters, defaults, optionals, spreads, or catch blocks. Resolve it into the owned contract.
Git
- Single trunk branch
main, always releasable - No branch or commit message prefixes (no
chore:,fix:,feature/, etc.) - Each commit is self-contained and cohesive — one logical change per commit
- Keep commit messages brief and descriptive
Conventions
Read the relevant doc before working in that area:
docs/agents/design.md— visual design system: color tokens, dark mode policy, Tailwind conventionsdocs/agents/react.md— components, hooks, query-language translationdocs/agents/testing.md— Vitest patterns, DbState, factories, backward-compatdocs/agents/connectors.md— Gremlin/openCypher/SPARQL query templatesdocs/agents/schema.md— schema storage, discovery, Jotai atomsdocs/agents/issue-tracker.md— GitHub issue and PR conventionsdocs/agents/documentation.md— writing user-facing docs (READMEs, guides, docs site)docs/agents/product.md— product overview, supported databases, architecturedocs/development.md— toolchain setup, the pinned pnpm and node versions, and the pnpm upgrade procedure
Reviews
Every code review, including /code-review, uses these standards sources:
REVIEW.md— severity, what not to report, and the verification bar. Wins where it conflicts with the others.- This file, plus the
docs/agents/*.mddoc for each area the diff touches.
Pass REVIEW.md by path to every reviewer sub-agent, not only the standards one. Sub-agents don't always load this file.
Commands
Run from project root with pnpm. Use only these scripts — never invoke tsc, vitest, oxlint, or oxfmt directly or via pnpx. The scripts pin tool versions and configs and cover every workspace package; bare tools use the wrong version and miss project context.
pnpm check:types— typecheck all packages (no per-file/per-package option; this is the granularity)pnpm checks— all static checks (types + lint + format); default validation for small changespnpm check:lint/pnpm lint— lint / lint and fixpnpm check:format/pnpm format— check / fix formattingpnpm test— run all testspnpm test <path>— test files matching a path substring (file, dir, or partial)pnpm test -t "suite > name"— test by name, with segments joined by a spaced>exactly as the reporter prints them; a single segment such as-t "renders empty state"also works (no--separator; pnpm forwards args verbatim, unlike npm)
pnpm check:types runs in parallel across packages in under a minute; just run it.
Agent skills
Issue tracker
Issues are tracked in GitHub Issues on aws/graph-explorer; external PRs are also a triage surface. See docs/agents/issue-tracker.md.
Triage labels
Default label vocabulary (needs-triage, needs-info, ready-for-agent, ready-for-human, wontfix). See docs/agents/triage-labels.md.
Domain docs
Single-context layout — one GLOSSARY.md + docs/adr/ at the repo root. See docs/agents/domain.md.
CONTEXT.md was renamed to GLOSSARY.md. When a skill or doc asks for CONTEXT.md or CONTEXT-MAP.md, use GLOSSARY.md or GLOSSARY-MAP.md instead.
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.

