Skip to content
Purview Dev logo

Engineering Principles

Experimental Engineering Playbook Reviewed 2026-10-15 purview-dev/engineering-playbook Star on GitHub architecture-tests best-practices coding-agents conventions csharp documentation dotnet engineering msbuild-sdk tunit

Experimental. This project is an experiment: the public API, defaults and packaging can change between prereleases, and there is no production support guarantee.

These are the ten rules the Purview repositories are held to. This page is an index: each rule is stated once, in full, on the page named beside it. That page carries the failure the rule prevents, the mechanism that makes it true, and what a smaller repository does instead — so a rule is never written twice and the two copies cannot disagree. Where a rule has no dedicated page, the line here is its full statement.

The distinction that runs through all ten: a convention a build can check is checked by the build; a convention only a reviewer can check is labelled a review obligation and never described as enforced. A rule that claims enforcement it does not have is worse than no rule, because people stop looking.

#PrincipleIn one lineDetail
1Convention over configurationA repository declares as little as possible; one MSBuild SDK supplies the defaults, so a project file is short.Repository Shape
2Identity is derived, never repeatedA name appears once, in the folder and file name; RootNamespace and AssemblyName are computed from it.Repository Shape
3Architecture is a test, not a diagramThe dependencies a layer may have are asserted by tests, so a wrong ProjectReference fails the build.Architecture as Tests, Project Responsibilities
4The build is the only authorityA convention a build can check is checked by the build; the rest is labelled a review obligation, never described as enforced.Documentation Convention
5Warnings are not acceptable outputA clean build has no warnings: fix one, suppress it where it occurs with a justification, or turn the rule off deliberately.Testing and Test Data
6Every claim about a consumer is proved by a consumerA package that documents how it must be used ships something that builds that documented consumer and asserts the documented outcome.Contracts and Data Exchange
7Documentation is a build artefact of the repositoryThe wiki lives in the repository it describes, and the repository owns its mkdocs.yml, navigation and edit_uri.Documentation Convention
8Everything a test needs is built by one builderDomain content in a test comes from TestBuilder; a test overrides only the value it is proving.Testing and Test Data
9An agent is a reader with no memoryA repository states its purpose, layout and conventions in AGENTS.md; nothing important is discoverable only from the code.Agent Enablement
10A change is verified in proportion to its riskChecks are tiered; a pull request runs the fast tier, and the slow tier is run deliberately.Verification Model

Enforcement is stated per rule on the linked page. Three are enforced by the build in a way worth knowing at a glance: identity (rule 2) by PurviewProjectFileNameMismatch and the SDK’s derivation, architecture (rule 3) by the architecture tests, and the verification tiers (rule 10) by the pipeline’s TestFilter. The rest are enforced partly by the build and partly by review, and each page says which.

Every rule has a smaller version, and taking one before the problem it prevents exists is pure cost. Adopting This at Your Scale decides which rules apply to a small, medium or large repository, and in what order to adopt them.