AI coding agents
Coding agents spend context on whatever the build reports. If your build reports IDE0055 diagnostics,
the agent reads them, edits the file, and rebuilds — one round trip per mechanical offence, all of them
with a single right answer already written in your .editorconfig.
Curb eliminates that round trip.
Curb is parser-only: it needs no compilation, so it can run before the compiler — inside the
build, before CoreCompile. By the time the compiler reads your source, every formatting offence is
already gone. The agent never sees them.
What reaches the agent is the part that needs judgement: diagnostics that require a compilation to decide. That is the semantic pass, and it is the only part worth an agent's attention.
Delete the style section. Replace it with one line:
## Style
Formatting and syntax-level code style are applied automatically by the build — see `.editorconfig`.
Do not hand-format code; `dotnet build` does it.
Then put the actual rules in .editorconfig:
[*.cs]
indent_style = tab
max_line_length = 160
csharp_new_line_before_open_brace = all
csharp_prefer_braces = true
csharp_style_namespace_declarations = file_scoped
One source of truth, read by your IDE, by dotnet format, and by Curb.
| Scope | What is fixed |
|---|---|
| All layout | Indentation, spacing, brace placement, blank lines, reflow — decided from the parse tree. Nothing in this class reaches the agent's context. |
| Syntax style (opt-in) | Braces, expression bodies, file-scoped namespaces, modifier order, using placement — for every key you set in .editorconfig. |
| Semantic remainder (after build) | var, unused usings, readonly and more. curb cleanup reads the diagnostics your build already reported and applies the rewrites. See Cleanup. |
| Not handled, deliberately | Naming, unused members, unread assignments. Their fixes can change which overload binds or break a reflection string. Curb reports them; the agent decides. |
See Integrations for how to wire this into MSBuild, CI, and pre-commit hooks.