Audience: Contributors | Reviewers | AI Agents
Status: Authoritative
Source Anchors:AGENTS.md,PROJECTS.md,docs/internal/QUICK_REFERENCE.md,docs/internal/GOVERNANCE.md
Use this checklist before proposing, authoring, or accepting code changes. It provides a structured, high-signal self-review to catch regressions and architectural rot before submission.
- Focused Scope: Change remains strictly within the requested task; no unrelated refactoring, cosmetic touchups, or opportunistic cleanup in unmodified files.
- Protected Paths Untouched: Migrations (
Explore.Persistence.Migrations.*), generated clients (Clients/EventApiClient.g.cs), and CI scripts (.ci/**) were not modified unless explicitly authorized by the task. - Dependency Direction: Clean Architecture dependencies flow strictly inward:
Explore.Domain$\leftarrow$ Explore.Application$\leftarrow$ Explore.Persistence/Explore.Infrastructure$\leftarrow$ Explore.API. - Blazor Isolation:
Explore.Blazor.ClientandExplore.Blazordo not reference Domain, Application, or Persistence projects; all backend communication flows through generated API client contracts.
- Zero Hard-Coded Secrets: No passwords, API keys, private tokens, certificates, or real connection strings are committed in source code, appsettings, test fixtures, or docs.
- Secrets Source of Truth: All configuration secrets bind dynamically through Infisical, environment variables documented in
.env.example, or User Secrets in Development. - Fail-Closed Authorization:
GETendpoints are explicitly[AllowAnonymous]; write/mutation endpoints are protected by[Authorize]. Provider identity resolves viaPlatformIdentityPrincipalExtensions. - Tenant Isolation: Database queries respect global query filters and PostgreSQL Row-Level Security (
FORCE ROW LEVEL SECURITY).IgnoreQueryFilters()is never called without naming specific non-tenant filters (e.g.SoftDelete).
- Auto-Property Parameters: Component parameters (
[Parameter]) are declared as auto-properties only (public string Value { get; set; } = string.Empty;). - No Parameter Mutation via
@ref: Component parameters are never set or modified imperatively through component references (@ref). - Parameter State Management: Parameter updates use
ParameterState<T>where applicable to manage reactive state transitions cleanly. - CSS Isolation & Theming: Styling uses scoped
.razor.cssfiles, BEM naming, MudBlazor v9 tokens, andCssBuilder. Hard-coded style attributes or colors are prohibited. - HAL-Driven Action Affordances: Client buttons, menus, and actions (Edit, Delete, Transfer) are gated strictly by checking the presence of HAL
_linksin the received DTO, never by local role/claim checks. - Accessibility (a11y): Interactive elements maintain keyboard navigation, semantic headings, proper focus management, and accessible ARIA attributes.
- Entity Return Rule: Repositories return Domain entities only, never DTOs. DTO mapping happens strictly inside native CQS handlers.
- Manual Validator Instantiation: FluentValidation validators are manually instantiated inside handlers/services (
new CreateEventCommandValidator()), never injected via DI. - RFC 7807 Error Responses: Handler errors map to ProblemDetails via
CommandFailurePolicyorMapCommandResponse. Raw command objects or custom error payloads are never returned as failure bodies. - Scheduler Primacy: Periodic tasks use Quartz.NET
IJobsweeps registered withAddSweepJob<TJob>. Hand-rolledwhile (!ct.IsCancellationRequested)loops inBackgroundServiceare banned. - No Generic CRUD Controllers: Controllers inherit
EventControllerBaseand remain concrete presentation adapters without generic CRUD base classes.
- Behavioral Coverage: Focused tests were added or updated for every observable behavior change (RFC 2119 requirements).
- Invariant-First Sequencing: Tests were authored in the Red phase before production code, asserting against pre-agreed public seams (native CQS requests, HTTP routes, aggregate methods).
- No Tautological Tests: Expected assertion values derive from independent literal specifications, not by repeating the production calculation (
items.Sum(x => x.Price)). - No Internal Mocking: Internal domain entities, aggregates, repositories, and CQS handlers are NOT mocked. Mock ONLY external infrastructure (payment processors, third-party email, system clock).
- bUnit Interaction Best Practices: Component tests re-query DOM elements after actions, use async helpers (
ClickAsync,InputAsync), and leverageTimeProvider/FakeTimeProviderrather than fragileTask.Delay. - Test Naming Conventions: Test method names describe the scenario and expected outcome clearly without ending in
TestorAsync, and withoutTest_prefixes or trailing underscores.
- Minimal & Focused Diff: Diffs are concise, readable, and free of extraneous line shifts or whitespace churn.
- No Warning Suppressions: No compiler warnings or analyzer diagnostics were suppressed via
#pragma warning disableor[SuppressMessage]to force a build to pass. Root causes must be resolved. - XML Documentation: Public types, interfaces, methods, and properties in Domain and Application layers include clear XML
<summary>doc comments. - Code Formatting: Code complies with the repository
.editorconfigrules (file-scoped namespaces, brace styles, member order). - No Ad-Hoc Scripts: No ad-hoc Python or Node.js scratch scripts were used or committed. Tooling lives in
eng/as C# or POSIX Bash.
- Commands Run & Exit Codes: Final summary explicitly records every command run (build, test, format) with exact outcomes.
- Checks Not Run with Reasons: Relevant checks omitted (e.g. Ring 3 persistence matrix for a UI-only change) are noted with technical justifications.
- Zero Fictitious Claims: No test or build is claimed as passed unless physically executed and verified in the session.