Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CODE_REVIEW.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions CLAUDE.md → AGENTS.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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 <sln>` 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 <assembly> -m <doc-id> --ilast` prints the IL transform pipeline's result, and `--after-transform <name-or-index>` 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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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%/<test>.original.out` / `.decompiled.out`).
2 changes: 1 addition & 1 deletion ICSharpCode.Decompiler/CSharp/Syntax/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion doc/DecompilerArchitecture.html
Original file line number Diff line number Diff line change
Expand Up @@ -1703,7 +1703,7 @@ <h2 id="s11">11. Cross-cutting themes and further exploration</h2>
hundreds of &quot;pretty&quot; fixtures &#8212; C# source compiled by a matrix of compilers and
options, decompiled, and diffed against expected output &#8212; 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 <span class="filecite">ICSharpCode.Decompiler.Tests/CLAUDE.md</span> for the
pattern lands first (see <span class="filecite">ICSharpCode.Decompiler.Tests/AGENTS.md</span> for the
fixture structure). A transform PR without a fixture is architecturally incomplete: the fixture
<em>is</em> the pattern's definition.</p>

Expand Down
Loading