agentleFS
foxminchanfoxminchan/BookWorm/AGENTS.md

BookWorm

AGENTS.md508 starsChanged 8 days agoMITView on GitHub

BookWorm is a .NET 10 microservices application built around Aspire, DDD, and event-driven integration patterns. The codebase emphasizes Vertical Slice Architecture, CQRS, and clean service boundaries.

  • 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 repository6 other files it gives its agents.

The file

Show its rules and text

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

13 rules. About 1 is common, 4 are distinctive, and 8 are very specific to this project.

  • ≈1

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 8

    Very specific

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

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

    Prefer the repo task runner in mise.toml over raw dotnet or bun commands.

    line 7
  2. Distinctive:

    Do not start the Aspire AppHost unless the user explicitly asks for runtime validation.

    line 8
  3. Distinctive:

    If AppHost code changes, restart only when validation is requested or the app is already running.

    line 10
  4. Very specific:

    Run the app: mise run run only when explicitly requested

    line 19
  5. Very specific:

    Test projects should end with .UnitTests, .ContractTests, or .IntegrationTests.

    line 35
  6. Very specific:

    Never modify global.json or NuGet.config unless explicitly asked.

    line 37
  7. Distinctive:

    Follow Vertical Slice Architecture and DDD boundaries.

    line 41
  8. Very specific:

    Use the source-generated CQRS model from Mediator.SourceGenerator.

    line 42
  9. Very specific:

    Keep endpoints, handlers, DbContexts, and tests sealed by default.

    line 43
  10. Very specific:

    Keep asynchronous flows fully async/await with CancellationToken propagation.

    line 44
  11. Distinctive:

    Treat warnings as errors; use file-scoped namespaces and modern C# features where appropriate.

    line 45
  12. Very specific:

    Keep PostgreSQL identifiers and raw SQL in snake_case.

    line 46
  13. Common:

    Keep secrets out of source control.

    line 49

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

Agent Instructions

BookWorm is a .NET 10 microservices application built around Aspire, DDD, and event-driven integration patterns. The codebase emphasizes Vertical Slice Architecture, CQRS, and clean service boundaries.

Working style

  • Prefer the repo task runner in mise.toml over raw dotnet or bun commands.
  • Do not start the Aspire AppHost unless the user explicitly asks for runtime validation.
  • For routine changes, use the smallest relevant build, test, lint, or type-check command.
  • If AppHost code changes, restart only when validation is requested or the app is already running.

Quick start

  • Fresh clone: mise install, then mise run prepare
  • Restore: mise run restore
  • Build: mise run build
  • Test: mise run test
  • Format: mise run format
  • Run the app: mise run run only when explicitly requested

Project shape

  • .NET 10 / C# 14 microservices with Aspire orchestration.
  • AppHost: src/Aspire/BookWorm.AppHost/AppHost.cs
  • Shared libraries: src/BuildingBlocks
  • Frontend: src/Clients (Bun + Turbo + Next.js 16 / React 19)
  • Services: src/Services
  • Integrations: src/Integrations
  • Tests: tests
  • Documentation: README.md, docs/docusaurus, docs/eventcatalog

Common pitfalls

  • Mediator.SourceGenerator is not MediatR.
  • Test projects should end with .UnitTests, .ContractTests, or .IntegrationTests.
  • Frontend lockfiles are Bun-managed, not npm or pnpm.
  • Never modify global.json or NuGet.config unless explicitly asked.

Architecture and coding conventions

  • Follow Vertical Slice Architecture and DDD boundaries.
  • Use the source-generated CQRS model from Mediator.SourceGenerator; do not add MediatR.
  • Keep endpoints, handlers, DbContexts, and tests sealed by default.
  • Keep asynchronous flows fully async/await with CancellationToken propagation.
  • Treat warnings as errors; use file-scoped namespaces and modern C# features where appropriate.
  • Keep PostgreSQL identifiers and raw SQL in snake_case.
  • Centralize package versions in Directory.Packages.props; avoid pinning versions in individual project files.
  • Frontend is Bun-based; use bun run from src/Clients, not npm or pnpm.
  • Keep secrets out of source control; use user secrets/local environment variables instead.

Common patterns to preserve

  • Event-driven services use WolverineFx + Kafka with outbox/inbox patterns.
  • Auth is handled via Keycloak; apply authorization at endpoint boundaries.
  • Caching uses FusionCache; service boundaries should remain consistent with the existing architecture.
  • API versioning is explicit; follow the existing ApiVersions.V1 patterns.

References

  • README.md
  • .github/CONTRIBUTING.md
  • docs/docusaurus
  • docs/eventcatalog
  • .agents/skills

Official docs to prefer

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.