Every weekday a single, opinionated rule for senior C#/.NET engineers using Cursor. Here's the full week in one read — canonical posts live on
Rule 13: Strongly-Typed IDs
Sat 20 Jun
OrderId as record struct OrderId(Guid Value) beats raw Guid everywhere. Stops the AI passing a CustomerId where an OrderId was expected — a bug the compiler can't catch with primitive obsession but catches instantly with domain primitives.
Rule 11: Rethrow, Don't throw ex
Thu 18 Jun
throw ex resets the stack trace. throw preserves it. Cursor gets this wrong about 40 percent of the time when generating catch blocks. Rewrite any naked throw ex to throw unless the exception has been explicitly wrapped.
Rule 9: Scoped Capture in Singleton
Tue 16 Jun
The single most expensive .NET runtime bug: a Singleton holding a Scoped service. Cursor cheerfully writes this without warning. Audit constructor parameters of any class registered as Singleton — if any are typically Scoped (DbContext, repositories, MediatR sender), flag it before merge.
Try one rule before you trust the whole kit
The free Canonical home for everything in this digest: https://agenticstandardcontact-byte.github.io/agentic-architect/blog/.
Full kit (£9.00, one-time):
SOCIAL SHARE CARD GENERATOR