ποΈ What
Add an architecture fitness-test layer (NetArchTest.Rules / maintained fork / ArchUnitNET β evaluate at adoption time) that turns our architectural rules into red tests, extending the existing structural-pin culture (Story278 route sweeps, disclosure contracts, zero-diff gates) down to the generic layer the csproj graph can't see.
π― Why
- The build loop is agents-under-review β every rule converted from reviewer judgment into a red test makes builders self-correcting and reviews cheaper (same reasoning as the house mutation-test standard).
docs/ARCHITECTURE.md is internal-only; an arch-test project is the shipped, executable subset of the architecture β the one form that can't drift (see the 2026-08-07 /document pass for how much prose had).
- For GenWave Business: edition boundaries ("Business assemblies depend on Core, never on demo/spectator internals") are exactly the silently-eroding kind of rule fitness tests hold forever β and "here's the test that fails if the layering breaks" is the answer an auditor wants.
π Candidate starter rules (encode rulings, not habits β see dependency below)
GenWave.Core stays framework-free (no ASP.NET/Npgsql/Dapper types) β CLAUDE.md law
- Npgsql/Dapper types appear only inside the repository layer (
GenWave.MediaLibrary.Station)
HttpClient construction only at designated client seams (CatalogProxyService etc.) β SSRF surface control
- DTO/record immutability conventions in
Core.Abstractions
- Namespace discipline inside
Host (Api / Theming / middleware boundaries)
Rules that restate a csproj reference are dead weight β only encode what the compiler can't see. Domain-specific pins (routes, disclosure) stay bespoke; this is the generic layer beneath them.
βοΈ Dependency
Blocked on a /design session ruling the architecture laws first ("once we decide on them" β Dean, 2026-08-07). Compile-time alternatives (NsDepCop / custom Roslyn analyzers) fit the -warnaserror culture but cost more to author; xUnit fitness tests are the idiomatic entry point given the existing spec culture.
(From a 2026-08-07 discussion; full rationale in the conversation that created projects #3β#9.)
ποΈ What
Add an architecture fitness-test layer (NetArchTest.Rules / maintained fork / ArchUnitNET β evaluate at adoption time) that turns our architectural rules into red tests, extending the existing structural-pin culture (Story278 route sweeps, disclosure contracts, zero-diff gates) down to the generic layer the csproj graph can't see.
π― Why
docs/ARCHITECTURE.mdis internal-only; an arch-test project is the shipped, executable subset of the architecture β the one form that can't drift (see the 2026-08-07/documentpass for how much prose had).π Candidate starter rules (encode rulings, not habits β see dependency below)
GenWave.Corestays framework-free (no ASP.NET/Npgsql/Dapper types) β CLAUDE.md lawGenWave.MediaLibrary.Station)HttpClientconstruction only at designated client seams (CatalogProxyServiceetc.) β SSRF surface controlCore.AbstractionsHost(Api / Theming / middleware boundaries)Rules that restate a csproj reference are dead weight β only encode what the compiler can't see. Domain-specific pins (routes, disclosure) stay bespoke; this is the generic layer beneath them.
βοΈ Dependency
Blocked on a
/designsession ruling the architecture laws first ("once we decide on them" β Dean, 2026-08-07). Compile-time alternatives (NsDepCop / custom Roslyn analyzers) fit the-warnaserrorculture but cost more to author; xUnit fitness tests are the idiomatic entry point given the existing spec culture.(From a 2026-08-07 discussion; full rationale in the conversation that created projects #3β#9.)