Use the open-source free `ArchUnitNET` library for architecture rules in .NET tests.
NetArchTest
Use the open-source free `NetArchTest.Rules` library for architecture rules in .NET unit tests. Use when a repo wants lightweight, fluent architecture assertions for namespaces, dependencies, or layering.
Trigger On
- the repo uses or wants
NetArchTest.Rules - architecture rules should be enforced in automated tests
Workflow
- Encode only durable architecture rules:
- forbidden dependencies - namespace layering - type shape conventions
- Keep rules readable and close to the boundary they protect.
- Fail tests on architecture drift, not on temporary style noise.
Deliver
- architecture tests that are understandable and stable
- boundary checks wired into the normal test path used by agents and CI
Validate
- the rules map to real boundaries the team cares about
- failures point to actionable dependency drift
Load References
references/patterns.mdreferences/examples.mdreferences/netarchtest.md
Related skills
Design or review .NET solution architecture across modular monoliths, clean architecture, vertical slices, microservices, DDD, CQRS, and cloud-native boundaries without…
Use `graphify-dotnet` to generate codebase knowledge graphs, architecture snapshots, and exportable repository maps from .NET or polyglot source trees, with optional AI-enriched…
Related agents
.NET Review
Review orchestration agent for .NET changes across bugs, regressions, analyzers, architecture, tests, and maintainability.
Also works: dotnet agents install review