thunder / backend
AGENTS.md614 starsChanged 7 months agoApache-2.0View on GitHub
Read with the root AGENTS.md. The backend is a Go application under backend/ (module github.com/thunder-id/thunderid): domain packages under backend/internal/, entry points under backend/cmd/, public packages under backend/pkg/. For the canonical, deeper reference (flat package/file layout, export rules, logging), see the Backend Development overview.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- thunder-id/thunderidword for word, first seen May 12, 2026
Other versions1 project uses a version of this.
Word for word · 1
- thunder-id/thunderid★ 625100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
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
- docs/AGENTS.mdAGENTS.md
- frontend/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
The file
We split this AGENTS.md into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
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
- Very specific: line 3
Read with the root AGENTS.md.
- Distinctive: line 16
Ensure all identity-related code aligns with relevant RFC specifications.
≈ “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
Backend — Agent Guide
Read with the root AGENTS.md. The backend is a Go application under backend/ (module github.com/thunder-id/thunderid): domain packages under backend/internal/, entry points under backend/cmd/, public packages under backend/pkg/.
For the canonical, deeper reference (flat package/file layout, export rules, logging), see the Backend Development overview.
When to Load Other Guides
- Writing or changing any backend Go code → read .agent/skills/backend/SKILL.md first.
- Writing or fixing tests → read .agent/skills/backend-tests/SKILL.md.
- Touching
store.go, schema, or queries → read .agent/skills/db/SKILL.md. - Changing any interface → regenerate mocks with
make mockery. CI'sverify-mocksjob fails if mocks are out of sync. Never hand-edit mock files.
Conventions
- Ensure all identity-related code aligns with relevant RFC specifications.
- Declarative resource attributes use camelCase, matching the REST API. The
yamlstruct tag must use the same camelCase name as the field'sjsontag (for exampleyaml:"ouId", notyaml:"ou_id"). This does not apply to non-declarative YAML such asdeployment.yamlserver config, or tojsontags for protocol payloads (OAuth, DCR) that follow their own RFC conventions. - Logging: use the
logpackage frominternal/systemand pass the requestcontext.Contextfirst so entries carry the trace ID; avoid PII. See the overview for the full conventions (non-request contexts,log.MaskedString). - Cryptographic operations (encrypt/decrypt/sign/verify) must go through the injected
providers.RuntimeCryptoProvider, notinternal/system/cryptolibdirectly.cryptolibis a low-level primitives package meant to be wrapped by the default key manager provider (internal/system/kmprovider/defaultkm); other packages should depend on theRuntimeCryptoProviderinterface so alternate key manager providers stay swappable. - JWE "alg"/"enc" validation (e.g. checking a configured algorithm is supported) must use
jwe.JWEServiceInterface'sSupportedKeyEncryptionAlgorithms()/SupportedContentEncryptionAlgorithms()methods, not ad-hoc calls to the crypto provider or hardcoded algorithm lists.
Test Selection
- Inner loop:
- service / store / API handler change →
make test_unitfirst. - DB or API-contract change → also add
make test_integration(filter withRUN="TestName"orPACKAGE="pkg/path"). - Code only the Control Plane runs (wired in
cmd/cpserver) →make build_backend build_cp_backend, thenmake test_integration_cp. It setsINTEGRATION_PLANE=control, swaps the Control Plane binary into the distribution, boots the all-in-one server beside it as a Data Plane on port 8096, and by default runs onlytests/integration/controlplane(sameRUN/PACKAGEfilters).make test_integrationleaves that package out. - A flow that spans the Control Plane, its sync and the Data Plane (author on the Control Plane, prove on the Data Plane) →
make build_quickstart, thenmake test_integration_pack. It setsINTEGRATION_PLANE=pack, unzips the quickstart pack, runs itssetup.sh, starts auth-dp (8091), the Data Plane (8090) and the Control Plane (8095), and runs onlytests/integration/pack(sameRUN/PACKAGEfilters). It needs those ports free, so it does not run besidetest_integration_cp;make test_integrationleaves that package out. Calltestutils.PackSyncToDP()after a Control Plane write before reading the Data Plane.
- service / store / API handler change →
- Final gate:
make test_unit+make test_integration, ormake pr_checksbefore opening a PR.
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.

