From supervibe
Use WHEN delivering production ASP.NET Core API behavior TO apply minimal APIs, controllers, DI, EF Core, middleware, auth, validation, observability, and migration rollback safely.
How this skill is triggered — by the user, by Claude, or both
Slash command
/supervibe:aspnet-domain-deliveryThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
ASP.NET Domain Delivery turns an ASP.NET Core API change into a production-grade implementation plan. It treats endpoint shape, dependency lifetimes, EF Core behavior, middleware order, auth policies, validation, async cancellation, OpenTelemetry, and database migration rollback as one delivery system.
ASP.NET Domain Delivery turns an ASP.NET Core API change into a production-grade implementation plan. It treats endpoint shape, dependency lifetimes, EF Core behavior, middleware order, auth policies, validation, async cancellation, OpenTelemetry, and database migration rollback as one delivery system.
The playbook assumes modern ASP.NET Core with minimal APIs or controllers, IServiceCollection/IHostApplicationBuilder DI, EF Core, structured logging, health checks, and OpenAPI. It is not a generic web checklist; it is for deciding exactly where behavior belongs and how it is proven safe.
Follow <resolved-supervibe-plugin-root>/docs/references/skill-expert-operating-standard.md: read local source first, preserve evidence, follow ASP.NET conventions, keep graph execution fast with scoped verification, and cap confidence when stack-specific runtime proof, rollback, or ownership is missing.
Use when adding or changing an ASP.NET Core route, controller action, minimal API group, service, repository, EF Core model, migration, middleware, authorization policy, validation rule, or telemetry path. Use for architecture review when a change crosses HTTP, DI, persistence, and operations.
Do not use for a pure Razor/UI change, static docs update, or mechanical formatting change with no runtime behavior.
Program.cs, service registrations, auth policy setup, middleware order, DbContext configuration, migrations, and relevant tests.Is this endpoint simple CRUD with local orchestration only?
YES -> minimal API group is acceptable if local conventions already use it.
NO -> prefer controller/service or existing feature-slice pattern.
Does it mutate persistent state?
YES -> design service-layer transaction, EF migration, idempotency, rollback, and cancellation behavior.
NO -> use AsNoTracking, explicit projection, caching headers only when justified.
Does the request require authorization beyond authentication?
YES -> encode as named policy/requirement, not inline role checks in handlers.
NO -> still record anonymous/authenticated behavior explicitly.
Is a schema migration required?
YES -> include forward migration, deploy order, backfill plan, rollback or compensating migration, and data risk.
NO -> prove no persistence contract changed.
Choose the HTTP surface: minimal API route group or controller action. Keep handlers thin: bind DTOs, call an application service, map the response.
Define request and response DTOs. Never expose EF entities on the wire. Use explicit nullable fields, validation attributes or FluentValidation, and examples when OpenAPI is generated.
Place business logic in scoped services. Register dependencies with correct lifetimes: DbContext and request services scoped, stateless helpers singleton only when they consume no scoped services.
Model persistence with EF Core intentionally: configure keys, indexes, relationships, concurrency tokens, delete behavior, and query projections. Use AsNoTracking for reads and explicit includes/projections to avoid N+1 queries.
Put transaction boundaries in the application service or unit-of-work layer, not middleware or controller actions. Pass CancellationToken to every async EF, HTTP, cache, and queue call.
Wire middleware in operational order: exception handling, forwarded headers when applicable, routing, authentication, authorization, rate limiting/CORS, endpoints, health and metrics according to local convention.
Encode authorization as policies, requirements, handlers, or endpoint metadata. Avoid hard-coded role strings inside business methods.
Instrument the path with structured logs, Activity tags, metrics, health impact, and trace correlation. Prefer OpenTelemetry semantic conventions already present in the service.
Plan migrations as deployment artifacts: forward migration, compatibility with old/new app versions, backfill timing, lock risk, rollback/compensation, and data verification query.
Write or update targeted tests: unit tests for service rules, integration tests for endpoint/auth/validation, EF tests for migration-sensitive queries where local standards expect them.
Record rollback: feature flag, route disablement, policy rollback, migration revert/compensation, and telemetry signal that triggers rollback.
Read the source artifact, owned file paths, graph/task scope, and current project convention; record the evidence path, command, receipt, or runtime state that proves the starting point.
If required source, owner, dependency, runtime boundary, or approval is missing, stop and return BLOCKED with the missing field, impacted artifact, and next action instead of guessing.
After edits or reviewer findings, repair the smallest changed slice, rerun the same scoped command, and record command, exit code, pass/fail status, artifact path, confidence, and remaining blocker before completion.
Requirement: add POST /api/orders/{id}/cancel.
Good delivery: route/controller accepts CancelOrderRequest, validates reason length, requires Orders.Cancel policy, calls OrderCancellationService.CancelAsync(orderId, user, reason, ct), service loads the order with required row version, rejects shipped orders with a domain error, saves inside a transaction, emits an audit event, and records order.cancelled metric. If a migration adds CancelledAt, the plan states that the nullable column deploys first, backfill is not needed, rollback leaves the nullable column unused, and a later cleanup removes it.
Verification: endpoint integration tests cover unauthenticated, unauthorized, invalid reason, not found, already shipped, success, and cancellation token propagation at service boundary.
Good delivery path: deliver through controller, request DTO validation, authorization policy, scoped service, EF Core row-version check, transaction, audit/outbox, and cancellation-token propagation. Runtime-specific tests include WebApplicationFactory or minimal-host integration coverage for middleware, auth, model binding, cancellation, service rollback, EF concurrency tokens, and migration shape. Rollback disables the endpoint or flag, leaves nullable migration columns unused until cleanup, and drains outbox messages. Failure boundaries are model validation, policy denial, not found, row-version conflict, database failure, outbox failure, and client disconnect.
Bad unsafe path: mutate the aggregate directly from the controller, ignore CancellationToken, add an irreversible migration, and prove it with service-only tests. That path has no runtime-specific tests for the changed stack surface, no concrete rollback beyond hope or manual cleanup, and weak failure boundaries for model validation, policy denial, not found, row-version conflict, database failure, outbox failure, and client disconnect.
Down." Generated rollback can be wrong for data loss, indexes, default constraints, and long-running operations.DbContext, IHttpContextAccessor state, or any scoped service..Result, .Wait(), blocking file/network IO, or omit cancellation tokens.surface: route/controller/minimal API group and request/response DTOs.placement: service, repository, validator, middleware, policy, and migration files to touch.diContract: lifetimes and dependency graph risks.persistencePlan: EF Core query, transaction, migration, rollback, and data checks.securityPlan: authentication, authorization policy, validation, and rate-limit decisions.operabilityPlan: logs, traces, metrics, health, dashboards, alerts, and rollback trigger.verificationCommands: targeted commands only, plus what behavior each proves.residualRisk: unresolved framework, data, scale, or deployment concern.Use the narrow command declared by the owning task, such as dotnet test <project> --filter <case>, a migration script generation command, or the repository's targeted integration command. Before claiming delivery, verify endpoint behavior, validation failures, auth failures, EF migration compatibility, cancellation, and telemetry shape. Broad release gates remain final handoff only when repository policy requires them.
references/practice-pack.md - Load when aspnet-domain-delivery needs deeper load rules, local evidence anchors, gotchas, or the final checklist.
scripts/self-check.mjs - Run with --check before claiming the aspnet-domain-delivery resource tree is complete; add --json when machine-readable evidence is needed.
evals/regression.json - Use when tuning the aspnet-domain-delivery trigger boundary or checking should-trigger and should-not-trigger prompts.
examples/workflow.md - Load when a concrete ASP.NET Domain Delivery execution example or anti-example would clarify the next action.
templates/output-contract.md - Use when emitting aspnet-delivery-plan so status, evidence, blockers, confidence, and nextAction stay consistent.
examples/delivery.md - worked ASP.NET implementation example, anti-example, and verification fixture.
domain-packs/aspnet.md - ASP.NET practice pack with review matrix, rollback prompts, and MVP guard rails.
evals/regression.json - Use when calibrating aspnet-domain-delivery trigger boundaries, happy-path/failure-path coverage, boundary rollback behavior, or resource-tree regressions.
supervibe:source-driven-developmentsupervibe:test-strategysupervibe:error-envelope-designsupervibe:auth-flow-designsupervibe:verificationnpx claudepluginhub vtrka/supervibe --plugin supervibeGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.