---
title: Architests
description: "Enforce a repository's architecture policy as TUnit tests. Architests in the Architests documentation — open-source .NET tooling from Purview Dev."
owners: [purview-dev]
status: stable
lastReviewed: "2026-10-18"
sourceProject: architests
sourceRepo: purview-dev/architests
projectName: Architests
sourcePath: docs/index.md
editUrl: "https://github.com/purview-dev/architests/edit/main/docs/index.md"
docsChannel: live
docsRef: main
docsRefKind: branch
tags: [architecture, architecture-tests, csharp, dependency-rules, dotnet, nuget, roslyn, static-analysis, tunit]
sidebar:
  label: Architests
  order: -1
---

Enforce a repository's architecture policy as TUnit tests, so the rules are defined once rather than
copied into every repository's test project.

Adoption is a policy file at `.config/architecture-policy.json` and one derived test class:

```csharp
[InheritsTests]
public sealed class ArchitectureTests : PurviewArchitectureTests;
```

[Get started](getting-started/)

## Guides

- [Getting started](getting-started/) — adopt the package in a repository, step by step.
- [Tutorial](tutorial/) — grow one application and its policy from a two-project matrix to type, API, port and budget rules.
- [Policy reference](policy-reference/) — every field, every rule id, every default.
- [Type-level rules](type-level-rules/) — how the assembly check works and how an assembly is
  attributed to a project.
- [API contracts](contracts/) — the committed baseline, XML documentation and the port rules.
- [Migration and budget](migration/) — adopt incrementally, waive narrowly and ratchet the graph.
- [Command line](cli/) — validate, capture the API, review waivers and render the graph.
- [Extending](extending/) — add your own rule to the standard set.

## Reference

- [The policy schema](https://github.com/purview-dev/architests/blob/main/architecture-policy.schema.json)
- [The sample](https://github.com/purview-dev/architests/tree/main/src/samples/ArchitectureSample)
- [The package README](https://github.com/purview-dev/architests/blob/main/src/src/ArchitectureTesting/README.md)

## Agent skills

```bash
npx skills add purview-dev/architests
```

