agentleFS
kyashrathorekyashrathore/Claxedo/AGENTS.md

Claxedo

AGENTS.md88 starsChanged 43 days agoMITView on GitHub

Before changing code, inspect the implementation, callers, contracts, tests, and runtime flow. Find the canonical owner, then extend, simplify, move, or fix it so the repository keeps one clear path. Reuse shared mechanisms while keeping caller-specific policy separate. Extract abstractions when they reduce future change locations or name a real concept. Give every function, file, directory, and package one clear responsibility, an accurate name, a narrow API, and the correct dependency direction. Keep related code and tests together. Preserve persisted…

  • 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 32,671 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 repository4 other files it gives its agents.

The file

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

5 rules. About 0 are common, 3 are distinctive, and 2 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.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run bun run test:architecture-ratchets before completing any change that adds, removes, or redirects a production import.

    line 19
  2. Distinctive:

    Start with the direct answer, then build the mental model from the real code flow.

    line 27
  3. Very specific:

    Use nested labels when they make ownership and calls easier to follow.

    line 30
  4. Distinctive:

    Use diagrams as optional summaries after the plain-English flow is understandable.

    line 44
  5. Distinctive:

    Keep the first explanation concise, then add depth through concrete causality and code references.

    line 45

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

Engineering quality

Before changing code, inspect the implementation, callers, contracts, tests, and runtime flow. Find the canonical owner, then extend, simplify, move, or fix it so the repository keeps one clear path. Reuse shared mechanisms while keeping caller-specific policy separate. Extract abstractions when they reduce future change locations or name a real concept. Give every function, file, directory, and package one clear responsibility, an accurate name, a narrow API, and the correct dependency direction. Keep related code and tests together. Preserve persisted and external contracts when required. Work in complete, reviewable slices; remove replaced paths; and verify behavior through focused tests, typechecks, builds, repository searches, and real public entrypoints.

Learn the patterns in nearby code before adding a new implementation, including why those patterns exist. Look for existing code to extend or improve, and extract an abstraction when it gives repeated behavior one clear owner. Remove duplication, obsolete branches, and superseded code as part of the change. Aim for fewer concepts and fewer places to change; reduce lines by simplifying the design, never by compressing readable code or dropping necessary behavior. Keep these improvements tied to the requested work.

Honest completion

Treat work as complete when the implemented behavior satisfies the goal through real entrypoints and acceptance checks. Keep tests meaningful: exercise the actual implementation, preserve useful coverage, and investigate failures rather than shaping the test around the result. Use canonical data and events from their authoritative producer. Keep one implementation per responsibility and finish migrations by removing obsolete routes, flags, helpers, and temporary paths. Fallback and backward compatibility require an explicit user request. Verify the positive flow and relevant negative flows, including failure, recovery, persistence, security, and isolation. Report the exact commands run and their outcomes. When an environment or dependency is unavailable, identify the unverified acceptance criterion directly. Keep plans and documentation aligned with live code. Finish every requirement that can be completed; for anything blocked, state the unmet requirement, evidence, blocker, owner, and concrete follow-up.

Validation cadence

During implementation, run only targeted tests and checks for the behavior being changed. Once all requested implementation work is finished and ready for final verification, run the applicable broader suites, corpus, typechecks, and architecture checks once. Do not run broad validation after each edit or run fixed repetition loops. If final validation fails, investigate and rerun only the affected tests or checks after fixing the cause; repeat a broader suite only when evidence shows the fix affects it. This cadence applies to package-level validation requirements too.

Benchmarks and performance measurement are not routine completion requirements, including during final verification. Run them only when the user requests benchmarking or performance measurement. Benchmark documentation and driver instructions are reference material for that work, not a requirement to run benchmarks for other changes.

Architecture ratchets

Run bun run test:architecture-ratchets before completing any change that adds, removes, or redirects a production import. The pre-push hook runs this command after typecheck so deterministic closure drift fails locally instead of in CI.

When a ratchet fails, do not blindly raise a ceiling or baseline. First identify the newly reachable module and its dependency chain, then remove an accidental edge or reuse the canonical owner. If the dependency is intentional, run the affected product's full verify:closure, raise only the exact measured ceiling with no headroom, and update the adjacent comment to name the reviewed owner and why it belongs in that product. Never hide a dependency from the scanner with an opaque dynamic import.

When a file-size ratchet fails (the 800-line production budget or a reviewed per-file ceiling), treat it as a design signal, not a line-count problem. Ask how the file can become modular: name the responsibilities it holds, find the ones that are separate concepts or already have an owner, and split the file along them into several files with narrow APIs. Never shrink a working system to fit the number by joining lines, deleting comments or blank lines, inlining helpers, or shortening names, and never raise the ceiling instead of splitting.

Explanations and summaries

Start with the direct answer, then build the mental model from the real code flow. Begin with the user action or system event that starts the behavior. Trace execution in order using exact repository names for components, functions, services, events, and files. Use nested labels when they make ownership and calls easier to follow. For example: A. WorkspaceSidebar → A.1 WorkspaceList → A.1.1 useWorkspaces(). Continue through the real boundary: useWorkspaces() calls workspace.list, which reads WorkspaceStore. For each step, explain what it receives, what it does, what it returns, and what runs next. Include meaningful branches in place: “If cached, return it; otherwise fetch it.” Identify where state lives and which component is authoritative for it. Trace the result back to the UI, client, or original caller. Explain relevant failure, disconnection, retry, and recovery behavior in the same flow. Clearly distinguish observed code, evidence-based inference, and proposed behavior. Explain the current flow completely before explaining a change. Then name the precise change point: “A.1.1 changes from X to Y because Z.” State which surrounding steps and contracts remain unchanged. Separate distinct user flows instead of merging them into one abstraction. Introduce a new term only when it names a necessary concept, and label proposed terms explicitly. Use diagrams as optional summaries after the plain-English flow is understandable. Keep the first explanation concise, then add depth through concrete causality and code references. End with the user-visible result, why the change helps, and any meaningful downside.

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.