agentleFS
asgardeoasgardeo/thunder/backend/AGENTS.md

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

  • Other versions1 project uses a version of this.

    Word for word · 1

    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.

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
  1. Very specific:

    Read with the root AGENTS.md.

    line 3
  2. Distinctive:

    Ensure all identity-related code aligns with relevant RFC specifications.

    line 16

≈ “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

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's verify-mocks job 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 yaml struct tag must use the same camelCase name as the field's json tag (for example yaml:"ouId", not yaml:"ou_id"). This does not apply to non-declarative YAML such as deployment.yaml server config, or to json tags for protocol payloads (OAuth, DCR) that follow their own RFC conventions.
  • Logging: use the log package from internal/system and pass the request context.Context first 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, not internal/system/cryptolib directly. cryptolib is a low-level primitives package meant to be wrapped by the default key manager provider (internal/system/kmprovider/defaultkm); other packages should depend on the RuntimeCryptoProvider interface so alternate key manager providers stay swappable.
  • JWE "alg"/"enc" validation (e.g. checking a configured algorithm is supported) must use jwe.JWEServiceInterface's SupportedKeyEncryptionAlgorithms() / 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_unit first.
    • DB or API-contract change → also add make test_integration (filter with RUN="TestName" or PACKAGE="pkg/path").
    • Code only the Control Plane runs (wired in cmd/cpserver) → make build_backend build_cp_backend, then make test_integration_cp. It sets INTEGRATION_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 only tests/integration/controlplane (same RUN/PACKAGE filters). make test_integration leaves 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, then make test_integration_pack. It sets INTEGRATION_PLANE=pack, unzips the quickstart pack, runs its setup.sh, starts auth-dp (8091), the Data Plane (8090) and the Control Plane (8095), and runs only tests/integration/pack (same RUN/PACKAGE filters). It needs those ports free, so it does not run beside test_integration_cp; make test_integration leaves that package out. Call testutils.PackSyncToDP() after a Control Plane write before reading the Data Plane.
  • Final gate: make test_unit + make test_integration, or make pr_checks before opening a PR.

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.