diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..55960ca --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,127 @@ +# AGENTS.md — FirstClassErrors + +Instructions for automated agents (OpenAI Codex and others) in this repository. +Two roles are covered: **writing code** and **reviewing pull requests**. + +## Project orientation (code changes) + +- .NET Standard 2.0 library. Errors are first-class, documented, diagnosable concepts. +- Build: `dotnet build FirstClassErrors.sln` +- Test: `dotnet test FirstClassErrors.sln` (analyzer tests: `dotnet test FirstClassErrors.Analyzers.UnitTests`). +- Repository language is **English** (code, comments, commits, PRs, issues, and + review comments). French lives only in `doc/README.fr.md` and must stay in sync + with the English README. +- `Error` and its hierarchy, `ErrorCode`, `ErrorContextKey`, `Outcome`/`Outcome` + and any value object are **`class`, never `struct`** — a struct exposes a + zero-initialized default that bypasses validating constructors. Enums + (`Transience`, `ErrorOrigin`) are the only value-type exception. +- Keep changes small and focused. Treat renamed error codes, diagnostic IDs and + public types as breaking changes. + +## Review guidelines (pull request reviews) + +READ THIS BEFORE REVIEWING. The full specification is in `code_review.md`; the +rules below are mandatory and inlined so they are never missed. + +### Output format — mandatory + +Every inline comment MUST use exactly this shape, with nothing around it: + +```text +