Repository navigation
Releases
v0.2.0
What's Changed
- ci: harden the release job against a burned tag and a masked fetch failure by @rjmurillo in #7
- ci: target the built commit and correct three release comments by @rjmurillo in #8
- docs(readme): pass tool arguments to dnx after a separator by @rjmurillo in #10
- chore(deps): automate dependency updates with Renovate and Dependabot by @rjmurillo in #11
- chore(deps): update actions/setup-dotnet action to v4.3.1 by @renovate[bot] in #12
- chore(deps): update dependency dotnet-sdk to v10.0.401 by @renovate[bot] in #13
- docs: explain how to verify a mechanical refactor by @rjmurillo in #15
- docs: add one class per file guide without ReSharper by @rjmurillo in #18
- chore(deps): update dependency microsoft.net.test.sdk to 17.14.1 by @renovate[bot] in #21
- chore(deps): update actions/checkout action to v4.4.0 by @renovate[bot] in #20
- docs: explain SA1402 and SA1649 file naming for same-name types by @rjmurillo in #17
- docs: compare Roslyn MCP servers with this CLI by @rjmurillo in #16
- docs: add guide to fix SA1402 across a whole repository by @rjmurillo in #19
- chore(deps): update dependency xunit.runner.visualstudio to 3.1.5 by @renovate[bot] in #24
- chore(package): add NuGet icon, release notes, and search tags by @rjmurillo in #22
- fix: find a renamed file by its kept path in the content phase by @rjmurillo in #26
- docs: correct generic naming, collision, and SA1649 claims by @rjmurillo in #28
- fix: skip generic partial parts in their named file by @rjmurillo in #23
- chore(deps): update actions/checkout action to v7 by @renovate[bot] in #25
- docs: make the README answer SA1402 searches and add llms.txt by @rjmurillo in #27
- feat(package): include agent context in NuGet tool by @rjmurillo in #46
- docs: explain NuGet MCP package context by @rjmurillo in #47
- docs: make MCP comparison guide task-focused by @rjmurillo in #50
- ci: gate Dependabot auto-merge on a 14 day package age by @rjmurillo in #45
- chore(deps): update actions/setup-dotnet action to v6 by @renovate[bot] in #43
- chore(deps): update dependency xunit.runner.visualstudio to v4 by @renovate[bot] in #49
- chore(deps): update dependency microsoft.net.test.sdk to v18 by @renovate[bot] in #48
- chore(deps): update dependency microsoft.codeanalysis.csharp to v5 by @renovate[bot] in #44
- ci(deps): merge Dependabot security fixes after checks by @rjmurillo in #51
- chore(deps): update dependency xunit.runner.visualstudio to 4.0.1 by @renovate[bot] in #52
- chore(deps): update dependency dotnet-sdk to v10.0.402 by @renovate[bot] in #53
- chore(deps): update dependency microsoft.net.test.sdk to 18.11.0 by @renovate[bot] in #54
- chore(deps): pin .NET SDK 10.0.403 by @rjmurillo in #55
- chore(deps): update actions/setup-dotnet action to v6.1.0 by @renovate[bot] in #56
- feat(cli): add SA1649-safe naming for cross-file collisions by @rjmurillo in #58
- feat(manifest)!: record a content hash and refuse a stale plan by @rjmurillo in #59
- feat(cli)!: write run results to a report file, never to the plan manifest by @rjmurillo in #60
- feat(cli): add metadata file naming for generic types by @rjmurillo in #57
- feat(cli)!: make the tool agent-first and ship a split-types Agent Skill by @rjmurillo in #61
- fix(rename): bound git mv with a time limit and pass paths as arguments by @rjmurillo in #62
- fix(cli): place a type in a nested namespace exactly once by @rjmurillo in #63
- fix(plan): report where the file is on a refused row that planned a rename by @rjmurillo in #64
- feat(cli)!: split a file that holds a file-local type around it by @rjmurillo in #65
- fix(encoding): keep the UTF-8 byte order mark on write by @rjmurillo in #66
- Bump .NET SDK pin to 10.0.404 (Nov 10 servicing) by @rjmurillo in #67
New Contributors
Full Changelog: v0.1.1...v0.2.0
v0.1.1
First release of agentic-roslyn-tool, a command line tool that splits C# files declaring
more than one top level type into one file per type, so a codebase can turn on StyleCop
SA1402.
It exists because dotnet format cannot do this job. SA1402CodeFixProvider does not
implement Fix All, so the formatter fixes one type and stops. This tool uses the Roslyn
Syntax API only, never a semantic model, so it runs over thousands of files without a
solution that compiles.
Install
dotnet tool install --global AgenticRoslynTool
Or run it once with no install:
dnx AgenticRoslynTool split-types --input src --dry-run --json
The tool needs the .NET 10 SDK.
What it does
Three phases, driven by a CSV manifest that carries state between them. plan decides
what would change and writes the manifest. renames moves any file whose primary type name does not match its file
name, every move through git mv so history follows. content
carves the extra types out into their own files.
Splitting is mechanical, never a behavior change:
- Using directives are never pruned. A using that looks unused can still supply an
extension method or a target typed conversion. - Types are removed and blank lines collapsed through Roslyn, never through text edits, so
a blank line inside a block comment or an#ifregion survives intact. - Encoding, byte order mark, newline style, and trailing newline are captured on read and
reapplied on write, so a touched file does not show up as a whole file diff. - Files where a preprocessor directive spans two types are refused rather than guessed at.
Every output is verified in memory before anything is written, per file. Line conservation
is checked against the source, so a dropped line fails the file instead of shipping it. A
file that fails verification is never written and is reported as failed.
Interface
The command line is designed for an agent to drive. Inputs come from a directory, a single .cs file, a list file, a CSV with a file column, or
standard input. --json writes one document to standard output
and nothing else, so it pipes straight into a parser. Everything human readable, the
manifest path, the summary line, and every error, goes to standard error.
Exit codes: 0 the run completed with no failures, 1 at least one file failed, 2 the
command line was wrong, 3 the run could not complete. Skips are not failures, so a run
that skips every file exits 0. Read summary from --json to learn whether work
happened.
--dry-run reports what would change without touching the working tree. --exclude skips
any input whose path contains the given substring, case insensitive. --require-header
requires a header on every emitted file: a file that does not already start with it has
it prepended, and a file still missing it after rendering is failed rather than written.
Known limits
- The manifest is both the plan and the run report, so a content run that fails a row
replaces itssplitplan withfailed. Recovery is to re-run the plan phase. - Staleness of a plan manifest is detected structurally only. An edit that preserves paths
and type names passes the mismatch check. - The header probe matches a multi-line banner literally, so a banner whose internal lines
carry trailing whitespace is not recognized and a second copy is injected.
Full documentation: README,
behavior contracts,
decision log.