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 the Agentic Architect blog .
7 daily senior rules
Rule 18: WebApplicationFactory for Integration Tests
Sun 22 Nov
In-memory EF Core providers lie. Use WebApplicationFactory with Testcontainers (SQL Server, Postgres) for real integration coverage. Cursor defaults to UseInMemoryDatabase — it passes locally and ships the bug to production. Flag the in-memory provider in test projects.
→ Permalink on the blog
Rule 17: ConfigureAwait false in Libraries
Sat 21 Nov
Library code (non-ASP.NET) should ConfigureAwait false on every awaited Task. ASP.NET Core code should not. Cursor mixes the two contexts in the same solution. Detect the project type and enforce the right default.
→ Permalink on the blog
Rule 16: async void Outside Event Handlers
Fri 20 Nov
async void is a deadlock and unhandled-exception trap everywhere except UI event handlers.…