netarchtest

Featured

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. USE FOR: the repo uses or wants NetArchTest.Rules; architecture rules should be enforced in automated tests. DO NOT USE FOR: very rich architecture modeling that needs a heavier DSL. INVOKES: inspect the repository context, edit targeted files, and run relevant build, test, lint, or validation commands when changes are made.

Testing & QA 463 stars 35 forks Updated 2 days ago MIT

Install

View on GitHub

Quality Score: 94/100

Stars 20%
89
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# NetArchTest ## Trigger On - the repo uses or wants `NetArchTest.Rules` - architecture rules should be enforced in automated tests ## Value - produce a concrete project delta: code, docs, config, tests, CI, or review artifact - reduce ambiguity through explicit planning, verification, and final validation skills - leave reusable project context so future tasks are faster and safer ## Do Not Use For - very rich architecture modeling that needs a heavier DSL ## Inputs - the nearest `AGENTS.md` - architecture boundaries to enforce - target assemblies ## Quick Start 1. Read the nearest `AGENTS.md` and confirm scope and constraints. 2. Run this skill's `Workflow` through the `Ralph Loop` until outcomes are acceptable. 3. Return the `Required Result Format` with concrete artifacts and verification evidence. ## Workflow 1. Encode only durable architecture rules: - forbidden dependencies - namespace layering - type shape conventions 2. Keep rules readable and close to the boundary they protect. 3. Fail tests on architecture drift, not on temporary style noise. ## Bootstrap When Missing If `NetArchTest.Rules` is not configured yet: 1. Detect existing setup: - `rg -n "NetArchTest\\.Rules" -g '*.csproj' .` 2. Add the package to the architecture test project: - `dotnet add TEST_PROJECT.csproj package NetArchTest.Rules` 3. Add at least one executable boundary rule test. 4. Wire architecture tests into the standard `test` command in `AGENTS.md` and CI. 5. Run...

Details

Author
managedcode
Repository
managedcode/dotnet-skills
Created
4 months ago
Last Updated
2 days ago
Language
C#
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

Testing & QA Featured

archunitnet

Use the open-source free `ArchUnitNET` library for architecture rules in .NET tests. Use when a repo needs richer architecture assertions than lightweight fluent rule libraries usually provide. USE FOR: the repo uses or wants ArchUnitNET; architecture testing needs richer modeling than simple dependency checks. DO NOT USE FOR: the lightest possible architecture rule checks. INVOKES: inspect the repository context, edit targeted files, and run relevant build, test, lint, or validation commands when changes are made.

463 Updated 2 days ago
managedcode
AI & Automation Solid

architecture-fitness-functions

Use when architecture choices need executable guardrails: dependency rules, cycle checks, boundary tests, ownership review gates, ADR compliance, runtime/resilience checks, and CI fitness functions.

8 Updated today
Xopoko
Code & Development Listed

getff

Use when treating any codebase rule (architectural, naming, dependency, test-quality, contract, SLO) as an executable test that fails the build when violated, or when the user asks about enforcing code quality, fighting AI-generated code drift, setting up linters/tests/CI/pre-commit hooks, designing review processes, mutation testing, contract testing, fitness functions, observability-driven development, SLO-as-code, or any version of "how do I make my codebase resistant to AI agents breaking my conventions". Also trigger on any mention of ArchUnit, Stryker, Pact, dependency-cruiser, AI Factory (aif), Husky, lint-staged, ESLint flat config, Zod validation strategy, or shift-left/shift-right testing. Strongly trigger when the user mentions Claude Code, Cursor, or Copilot writing code that "looks fine but is wrong" — that is the core problem this skill addresses.

0 Updated today
artyhoo