architectural-fitness

Enforce .NET assembly dependency rules and naming conventions via NetArchTest.Rules.

4|1|Updated Mar 15, 2026
One-click install
npx skills add https://github.com/FaysilAlshareef/dotnet-ai-kit --skill architectural-fitness
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: architectural-fitness
Source: https://github.com/FaysilAlshareef/dotnet-ai-kit/tree/main/skills/quality/architectural-fitness
Command: npx skills add https://github.com/FaysilAlshareef/dotnet-ai-kit --skill architectural-fitness

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Prevents architectural drift by codifying layer dependency rules and naming conventions as automated tests so unintended references and naming violations fail the test suite.

Core Features & Use Cases

  • Layer dependency enforcement: Validate that Domain, Application, and Infrastructure assemblies follow declared boundaries and do not reference forbidden layers.
  • Naming and structure checks: Ensure handlers, validators, and entities follow naming conventions and structural expectations (for example, handlers end with Handler and entities use private setters).
  • CI integration: Run architecture tests in pipeline to catch regressions before merge; useful when onboarding contributors or evolving large .NET solutions.

Quick Start

Add NetArchTest.Rules to your test project and create dependency and naming tests that run in CI to enforce your project's layer and naming conventions.

Frequently Asked Questions about architectural-fitness

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce .NET assembly dependency rules to prevent architectural drift?

Enforce .NET assembly dependency rules by codifying layer boundaries as automated tests using NetArchTest. This prevents architectural drift by causing test suite failures when Domain, Application, or Infrastructure assemblies reference forbidden layers.

How do I automate naming conventions checks for .NET handlers and entities in CI?

Automate naming conventions checks for .NET handlers and entities by adding NetArchTest to a test project configured to run in CI. Assertions validate structural expectations like handlers ending with Handler and entities using private setters, failing the build on violations.

What is the best way to validate layer dependencies in a .NET solution before merge?

Validating layer dependencies in a .NET solution before merge is best done by running architecture tests in CI pipelines. This catches unintended references and naming regressions early, which is especially useful when onboarding contributors or evolving large solutions.

Does NetArchTest work with .NET test projects in CI pipelines?

Yes, NetArchTest works with .NET test projects in CI pipelines. It requires the NetArchTest.Rules package added to your test project, where you create dependency and naming tests that run during CI and fail the build on rule violations.

What are the limitations of using NetArchTest for architecture tests?

Limitations of using NetArchTest for architecture tests include its strict requirement for .NET test projects configured to run in CI. It cannot enforce rules outside .NET ecosystems and relies entirely on assertions that must fail the build to catch regressions effectively.