agentleFS
Microsoft AzureKnown publisherAzure/unbounded/internal/AGENTS.md

unbounded / internal

AGENTS.md46 starsChanged 9 days agoApache-2.0View on GitHub

Shared code that no single component owns. Only two kinds of package: - Conventions, internal/<name>: something every component must do the same way. The approved conventions are the build version (version), the log format (logger), the system namespace (systemns) and the bootstrap-token format (bootstraptoken). Ask before adding one, and add it to the conventions rule in .golangci.yaml. - Helpers, internal/helpers/<name>: small functions or constants that two or more components use. Read internal/helpers/AGENTS.md first. Use the first rule that fits: 1.…

  • 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 33,398 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 repository5 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, 4 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Only two kinds of package:

    line 7
  2. Distinctive:

    Use the first rule that fits:

    line 17
  3. Distinctive:

    If one component writes an annotation and another reads it, the writer defines the key.

    line 21
  4. Very specific:

    Every component must agree on it and none owns it: internal/<name>.

    line 23
  5. Distinctive:

    If nothing fits, each component may keep a short private copy.

    line 26

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

internal/

Shared code that no single component owns.

What can go here

Only two kinds of package:

  • Conventions, internal/<name>: something every component must do the same way. The approved conventions are the build version (version), the log format (logger), the system namespace (systemns) and the bootstrap-token format (bootstraptoken). Ask before adding one, and add it to the conventions rule in .golangci.yaml.
  • Helpers, internal/helpers/<name>: small functions or constants that two or more components use. Read internal/helpers/AGENTS.md first.

Where new code goes

Use the first rule that fits:

  1. It is part of a CRD or other API type: api/.
  2. One component uses it: keep it in that component.
  3. If one component writes an annotation and another reads it, the writer defines the key. Both use that definition. The same rule applies to message formats and shared validation rules: import the owner's definition, not a copy.
  4. Every component must agree on it and none owns it: internal/<name>.
  5. It is a small function or constant that two or more components use and none owns: internal/helpers/<name>.

If nothing fits, each component may keep a short private copy.

Rules for internal/<name>

  • One convention per package, named for it. Not util, common, helpers, misc, shared, types or kube, and nothing ending in util.
  • It may import only api/, internal/helpers/, the standard library and third-party modules.
  • Its package comment says what the convention is and why every component follows it.

Until #1175

You may edit existing component packages such as internal/gantry. Put new private packages in cmd/<component>/internal/. Export shared definitions from the owning component's existing package under internal/.

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.