Skip to content
Purview Dev logo

Engineering Playbook

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

This is the playbook for building and maintaining a Purview repository. It records the conventions the projects under purview-dev are held to: how a repository is laid out, how its architecture is enforced by tests rather than by review, how a change is verified in tiers, how data crosses a boundary, how tests are written and fed, and how a repository is made legible to a coding agent.

The conventions were previously discoverable only by reading the repositories and inferring the pattern from the repetition. They are stated here once, with the evidence and the trade-offs attached, and scaled so that a repository adopting them can take the part that fits.

The wiki is one folder per topic, and the sidebar and the tables below carry the same sections in the same order. _Sidebar.md is what the published site reads for page order, so a page that is not listed there has no place in the navigation. A page’s folder is part of its published URL (foundations/Repository-Shape.md is published under foundations/), so a page moves folder only when it changes topic.

Section Where it lives
Get started the wiki root
Repository foundations foundations/
Data and persistence data/
Testing testing/
Working with agents agents/
Adoption and governance governance/
The reference implementation examples/

Four pages stay at the wiki root: Home.md is this hub, _Sidebar.md is the navigation, Getting-Started.md is the first page to read, and Engineering-Principles.md is the index that links each rule to the page stating it in full. Every other content page belongs to a topic folder.

Every content page follows the same shape:

Section Answers
The rule What is expected.
Why The failure the rule prevents.
How it is enforced The mechanism that makes it true — or an explicit note that it is a review obligation.
At your scale What to do when the repository is smaller than the one the rule came from.

Rules a build can enforce are labelled as such. Rules only a reviewer can enforce are labelled as review obligations. A convention that claims to be enforced when it is not is worse than no convention at all, so the two are never blurred.

This page is navigation rather than a rule, and Engineering Principles is an index that links to the page stating each rule in full.

Read these first. They establish the vocabulary and the smallest repository that satisfies every rule.

Page Answers
Getting Started The smallest repository that satisfies every rule, in the order you would build it.
Engineering Principles The non-negotiable rules, and where the authoritative statement of each one lives.

How a repository is laid out, what each project owns, how the architecture is enforced, and how the documentation itself is written.

Page Answers
Repository Shape Where a file goes, what it is called, and how a project’s name becomes its namespace.
Project Responsibilities What each project is for, how it is named, and what it may depend on.
Architecture as Tests How the build refuses a dependency that points the wrong way.
Verification Model Which checks run, in which tier, for which change.
Documentation Convention How the wiki is written, structured and published.
Dependency Versions Which version to declare — the latest for an application, the lowest compatible for a published component.

These apply only when the repository persists data. Value objects, schemas and results cross a boundary first; the identifier and EF Core rules then decide how that data is stored.

Page Answers
Contracts and Data Exchange How value objects, schemas and results cross a boundary.
Well-Known Identifiers Identities whose value must be identical in every process and restart, derived with UUIDv5.
GUID Key Strategy Choosing and applying a store-ordered GUID key for SQL Server or PostgreSQL.
EF Core Integration How the context, providers, value objects, models and migrations fit together.

How tests are written, and where their data comes from.

Page Answers
Testing and Test Data How tests are written, and where their data comes from.

How a repository is made legible to a coding agent, and how shared guidance is published as a skill.

Page Answers
Agent Enablement How a repository is made legible to a coding agent.
Agent Skills Distribution How a skill is published once and reaches both a package’s consumers and an agent’s own directories.
Agent Guidance Skills The shared architecture, telemetry and persistence guidance, and the context an agent must establish first.

Which parts of the playbook apply at your size, how a claim about another repository is checked, and how a change to either the playbook or a release is made.

Page Answers
Adopting This at Your Scale Which parts apply to a small, medium or large repository.
Cross-Repository Harvest Which repository owns which convention, how it is read at main, and what the snapshot records.
Contributing How to change the playbook itself.
Release Flow How a change becomes a version, and what a release means here.

src/ in this repository is a deliberately small layered repository that is built, linted and tested by the same pipeline every Purview repository uses. It exists so the rules in this playbook are not just prose: the dependency-direction rules fail the build when they are broken, and the test-data conventions are shown in the form they are meant to be copied.

Page Answers
Worked Examples The reference implementation in this repository, walked end to end.

The conventions that need EF Core live in samples/Acme.Persistence, a standalone runnable sample started with just samples. It is outside src/ so the reference implementation stays in-memory. EF Core Integration, Well-Known Identifiers and GUID Key Strategy are the rules it proves.

Every rule here is drawn from Purview repositories and the public specifications and packages cited on its page — chiefly build-sdk (the MSBuild SDK that supplies the defaults), containers (a multi-package library with two backends), value-objects, results and event-sourcing (data exchange at a boundary), and purview-dev.github.io (the public catalogue, and documentation as a published surface). Each page names the public repository, specification or package a claim can be checked against, so a claim can always be checked against running code; Cross-Repository Harvest is how that claim stays true.