ArchLinterNet.Unity 0.3.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package ArchLinterNet.Unity --version 0.3.1
                    
NuGet\Install-Package ArchLinterNet.Unity -Version 0.3.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ArchLinterNet.Unity" Version="0.3.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ArchLinterNet.Unity" Version="0.3.1" />
                    
Directory.Packages.props
<PackageReference Include="ArchLinterNet.Unity" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ArchLinterNet.Unity --version 0.3.1
                    
#r "nuget: ArchLinterNet.Unity, 0.3.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ArchLinterNet.Unity@0.3.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ArchLinterNet.Unity&version=0.3.1
                    
Install as a Cake Addin
#tool nuget:?package=ArchLinterNet.Unity&version=0.3.1
                    
Install as a Cake Tool

<p align="center"> <img src="docs/assets/logo.png" alt="ArchLinterNet" width="420"> </p>

CI Test coverage

The CI badge tracks one workflow that runs all quality signals in the same validate job, so a green badge means all of them passed:

Quality signal Source
Build/test make acceptance (lint + all tests)
Test coverage (line %) make test-coverage-badge — merged cobertura line coverage across all test projects; regenerate and update the badge above when it changes meaningfully
Architecture validation strict ArchLinterNet self-policy check (architecture/dependencies.arch.yml)
Architecture coverage strict/audit coverage JSON artifacts + Markdown report + sticky PR comment

See CI integration for how the coverage gate and PR comment work.

Declarative architecture contracts and dependency linting for .NET repositories.

ArchLinterNet helps teams keep architecture boundaries executable: define a YAML policy, run it locally or in CI, and catch dependency drift before it becomes hidden design debt.

Status: early preview. The YAML policy surface is being stabilized for the first public 0.x NuGet and .NET tool releases.

Why ArchLinterNet?

Many .NET projects enforce architecture with handwritten test helpers or tribal knowledge. That works, but policy quickly becomes hard to discover, hard to reuse across repositories, and hard for humans or AI agents to review.

ArchLinterNet uses a repository-owned policy file as the source of truth:

architecture/dependencies.arch.yml
        ↓
ArchLinterNet CLI / test adapter
        ↓
strict or audit architecture validation
        ↓
human diagnostics + CI artifacts

Use it when you want architecture rules to be declarative, reviewable, CI-friendly, and independent from one-off test code.

Quick start

Create architecture/dependencies.arch.yml:

version: 1
name: Example Architecture Contract

layers:
  application:
    namespace: MyApp.Application
  domain:
    namespace: MyApp.Domain
  infrastructure:
    namespace: MyApp.Infrastructure

analysis:
  target_assemblies:
    - MyApp.Application
    - MyApp.Domain
    - MyApp.Infrastructure

contracts:
  strict:
    - id: application-not-infrastructure
      name: application-must-not-depend-on-infrastructure
      source: application
      forbidden: [infrastructure]
      reason: Application code must depend on abstractions, not concrete infrastructure.

  strict_layers:
    - id: clean-architecture-layering
      name: clean-architecture-layering
      layers: [infrastructure, application, domain]
      reason: Dependencies must point inward toward the domain.

Run from this repository during development:

dotnet run --project src/ArchLinterNet.Cli -- --policy architecture/dependencies.arch.yml --mode strict

After installing the .NET tool from NuGet.org:

arch-linter-net --policy architecture/dependencies.arch.yml --mode strict

Main capabilities

ArchLinterNet focuses on static architecture guardrails:

  • YAML policy loading and schema-backed contract authoring.
  • Namespace/layer dependency contracts and allow-only contracts.
  • Ordered layer contracts and reusable layer templates.
  • Dependency cycle, acyclic sibling, and independence checks.
  • Protected surface contracts for importer restrictions.
  • External dependency leakage checks for vendor/framework namespaces.
  • Method-body forbidden API checks.
  • Unity .asmdef dependency validation.
  • Coverage contracts for unmapped first-party namespaces, projects, and assemblies.
  • Project/solution discovery when assemblies are not hand-listed.
  • Policy-consistency diagnostics for contradictory or unreachable policy definitions.
  • Strict gates, audit diagnostics, JSON output, timings, and migration baselines.

ArchLinterNet does not validate runtime dependency injection behavior, authorization/security correctness, code ownership, semantic data flow, or arbitrary custom YAML fields outside the documented schema.

Documentation

Public product documentation is published through MkDocs and GitHub Pages:

Internal project documentation remains in repository Markdown files such as docs/internal/, openspec/, .github/, and root governance files. It is not part of the published product site.

Local documentation workflow

make venv        # create Python virtual environment
make docs-serve  # preview MkDocs locally
make docs-build  # build the static documentation site
make fmt-docs    # auto-format markdown documentation
make lint-docs   # strict documentation validation

Generated site/ output is a build artifact and should not be committed.

NuGet packages should expose only public user-facing links:

  • project/documentation URL: the GitHub Pages MkDocs site;
  • repository URL: this GitHub repository;
  • package README: this concise product README;
  • license: repository license expression.

NuGet metadata must not point users to internal backlog governance, OpenSpec archives, or maintenance-agent instructions as product documentation.

License

MIT.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.4.2 128 7/10/2026
0.4.1 112 7/10/2026
0.4.0 113 7/8/2026
0.3.1 118 7/3/2026
0.3.0 109 6/29/2026
0.2.0 115 6/27/2026
0.1.0 127 6/21/2026
0.1.0-preview.4 70 6/19/2026
0.1.0-preview.3 80 6/18/2026
0.1.0-preview.2 66 6/18/2026
0.1.0-preview.1 1,036 6/18/2026

<!-- Release notes generated using configuration in .github/release.yml at e75ddd13ac387f1fa0c5333e9a9412f864bb968d -->

## What's Changed
### Breaking Changes
* Tooling: Extract runner setup pipeline services (#136) by @eugenemalaschuk-source in https://github.com/eugenemalaschuk-source/arch-linter-net/pull/152
### Other Changes
* [TASK][AI] Tooling: Core architecture blueprint by @eugenemalaschuk-source in https://github.com/eugenemalaschuk-source/arch-linter-net/pull/150
* [TASK][AI] Tooling: Introduce composition root by @eugenemalaschuk-source in https://github.com/eugenemalaschuk-source/arch-linter-net/pull/151
* Tooling: Complete contract-family handler execution model (#137) by @eugenemalaschuk-source in https://github.com/eugenemalaschuk-source/arch-linter-net/pull/153
* [TASK][AI] Tooling: Shrink runner into validation session context (#138) by @eugenemalaschuk-source in https://github.com/eugenemalaschuk-source/arch-linter-net/pull/156
* Tooling: Introduce replaceable infrastructure seams by @eugenemalaschuk-source in https://github.com/eugenemalaschuk-source/arch-linter-net/pull/157
* Tooling: Normalize static production services (#154) by @eugenemalaschuk-source in https://github.com/eugenemalaschuk-source/arch-linter-net/pull/158
* Tooling: Convert remaining static production services to DI singletons (#159) by @eugenemalaschuk-source in https://github.com/eugenemalaschuk-source/arch-linter-net/pull/160
* Tooling: Normalize Core interface Abstractions namespaces (#155) by @eugenemalaschuk-source in https://github.com/eugenemalaschuk-source/arch-linter-net/pull/174
* [TASK][AI] Tooling: Rewire adapter Core seam by @eugenemalaschuk-source in https://github.com/eugenemalaschuk-source/arch-linter-net/pull/176
* [TASK][AI] Tooling: Add architecture seam tests by @eugenemalaschuk-source in https://github.com/eugenemalaschuk-source/arch-linter-net/pull/177
* Tooling: Add self-policy guardrails by @eugenemalaschuk-source in https://github.com/eugenemalaschuk-source/arch-linter-net/pull/178


**Full Changelog**: https://github.com/eugenemalaschuk-source/arch-linter-net/compare/v0.3.0...v0.3.1