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.
- AGENTS.mdAGENTS.md
- cmd/inventory/AGENTS.mdAGENTS.md
- cmd/orca/AGENTS.mdAGENTS.md
- internal/helpers/AGENTS.mdAGENTS.md
- unbounded-agent-qemu-vm-e2eSkill
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
- Distinctive: line 7
Only two kinds of package:
- Distinctive: line 17
Use the first rule that fits:
- Distinctive: line 21
If one component writes an annotation and another reads it, the writer defines the key.
- Very specific: line 23
Every component must agree on it and none owns it: internal/<name>.
- Distinctive: line 26
If nothing fits, each component may keep a short private copy.
≈ “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.
Files
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 theconventionsrule in.golangci.yaml. - Helpers,
internal/helpers/<name>: small functions or constants that two or more components use. Readinternal/helpers/AGENTS.mdfirst.
Where new code goes
Use the first rule that fits:
- It is part of a CRD or other API type:
api/. - One component uses it: keep it in that component.
- 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.
- Every component must agree on it and none owns it:
internal/<name>. - 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,typesorkube, and nothing ending inutil. - 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/.
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.

