diff --git a/.github/CODE_REVIEW.md b/.github/CODE_REVIEW.md index 99a088887f..aeb7bebba7 100644 --- a/.github/CODE_REVIEW.md +++ b/.github/CODE_REVIEW.md @@ -3,7 +3,7 @@ How to review a pull request, a branch, or a working-tree diff in this repository. Written for both human and agent reviewers; the agent-specific rules are called out where they differ. -`CLAUDE.md` carries the two rules that have to hold before you have even decided you are +`AGENTS.md` carries the two rules that have to hold before you have even decided you are reviewing. Everything below applies once you are. ## Scope diff --git a/CLAUDE.md b/AGENTS.md similarity index 98% rename from CLAUDE.md rename to AGENTS.md index beb9e33fb3..8eb7f68c9d 100644 --- a/CLAUDE.md +++ b/AGENTS.md @@ -1,6 +1,6 @@ -# CLAUDE.md +# AGENTS.md -Guidance for Claude Code (and future Claude sessions) when working on ILSpy. +Guidance for coding agents when working on ILSpy. ## What this codebase is @@ -100,7 +100,7 @@ Never put more than one C# language feature on one branch. ## Test discipline - Always run the test suite with `--report-trx` so failures survive: `dotnet test --solution ILSpy.sln --report-trx` (the repo pins Microsoft.Testing.Platform in `global.json`; the bare `dotnet test ` form is the old VSTest syntax). Don't dismiss failures as flaky without first reproducing in isolation, then running repeatedly. -- The decompiler test suite (test kinds, fixture structure, how to write tests, the compiler-matrix model) is documented in [ICSharpCode.Decompiler.Tests/CLAUDE.md](ICSharpCode.Decompiler.Tests/CLAUDE.md). +- The decompiler test suite (test kinds, fixture structure, how to write tests, the compiler-matrix model) is documented in [ICSharpCode.Decompiler.Tests/AGENTS.md](ICSharpCode.Decompiler.Tests/AGENTS.md). - After matcher / rewriter edits, **run the relevant tests, not just the build.** `dotnet build` green ≠ behaviour correct. - **To see what a transform did, dump the ILAst:** `ilspycmd -m --ilast` prints the IL transform pipeline's result, and `--after-transform ` stops the pipeline early so two stages can be diffed. Debug builds only (like the UI's Debug Steps pane), so run it from a local build, not the installed tool. diff --git a/ICSharpCode.Decompiler.Tests/CLAUDE.md b/ICSharpCode.Decompiler.Tests/AGENTS.md similarity index 98% rename from ICSharpCode.Decompiler.Tests/CLAUDE.md rename to ICSharpCode.Decompiler.Tests/AGENTS.md index 1d0dab40c9..4aa7e1e210 100644 --- a/ICSharpCode.Decompiler.Tests/CLAUDE.md +++ b/ICSharpCode.Decompiler.Tests/AGENTS.md @@ -30,7 +30,7 @@ First test run on a machine: the `[SetUpFixture]` in `TestTraceListener.cs` call packs from NuGet (network required; cached under the test output directory afterwards) and builds the self-contained `ICSharpCode.Decompiler.TestRunner`. Package downloads check the `ILSpy-tests/nuget` folder first, so the `ILSpy-tests` submodule must be initialized (see the -root `CLAUDE.md` section on the submodule). +root `AGENTS.md` section on the submodule). ## Test kinds @@ -117,7 +117,7 @@ produced for that compiler's IL. This beats hand-running csc versions. dotnet test --solution ILSpy.sln --report-trx --filter FullyQualifiedName~PrettyTestRunner.SwitchExpressions ``` -(Microsoft.Testing.Platform syntax; see root `CLAUDE.md` "Test discipline".) A failing +(Microsoft.Testing.Platform syntax; see root `AGENTS.md` "Test discipline".) A failing comparison prints an aligned diff with ` + `/` - ` markers. On failure the decompiled output file is left on disk for inspection (Correctness failures print its path; output diffs are also written to `%TEMP%/.original.out` / `.decompiled.out`). diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/README.md b/ICSharpCode.Decompiler/CSharp/Syntax/README.md index 2cc8256c95..ae7b6d548f 100644 --- a/ICSharpCode.Decompiler/CSharp/Syntax/README.md +++ b/ICSharpCode.Decompiler/CSharp/Syntax/README.md @@ -160,7 +160,7 @@ A few things that are easy to get wrong when editing the generator or the nodes - **Build the way the repo expects.** Use the root pwsh scripts, and the OpenSSL env var is required: `OPENSSL_ENABLE_SHA1_SIGNATURES=1 pwsh ./build.ps1 -Configuration Debug --no-restore`. A bare - `dotnet build` prunes the lock files (see the root `CLAUDE.md`). + `dotnet build` prunes the lock files (see the root `AGENTS.md`). - **The generator is a cached analyzer assembly.** Editing a **node** file re-runs the generator (node files are its input). Editing **the generator's own source** may *not* re-run it on an incremental build -- the consuming project keeps using the cached analyzer. Force a fresh run by clearing the diff --git a/doc/DecompilerArchitecture.html b/doc/DecompilerArchitecture.html index 37d21b2b78..8607456436 100644 --- a/doc/DecompilerArchitecture.html +++ b/doc/DecompilerArchitecture.html @@ -1703,7 +1703,7 @@

11. Cross-cutting themes and further exploration

hundreds of "pretty" fixtures — C# source compiled by a matrix of compilers and options, decompiled, and diffed against expected output — plus round-trip tests that recompile the decompiler's output. When the C# compiler changes its codegen, these fixtures are where the new -pattern lands first (see ICSharpCode.Decompiler.Tests/CLAUDE.md for the +pattern lands first (see ICSharpCode.Decompiler.Tests/AGENTS.md for the fixture structure). A transform PR without a fixture is architecturally incomplete: the fixture is the pattern's definition.