disable-model-invocation: true
Creates a full-stack feature: backend entity through to frontend page.
Infers everything possible from the feature description. Asks only when genuinely ambiguous (multiple valid designs with different tradeoffs). Prefers conventions from existing features.
Steps
This chains entity -> service/API -> frontend. Commit atomically after each logical unit.
Backend - Entity (see /new-entity):
- Domain: entity + enums + error messages
- Infrastructure: EF config + DbSet + migration
- Verify:
dotnet build src/backend/NetRockTemplate.slnx- loop until green - Commit:
feat({feature}): add {Entity} entity and EF configuration
Backend - Service & API (see /new-endpoint):
- Application:
I{Feature}Service+ Input/Output DTOs - Infrastructure:
{Feature}Service(internal) + DI extension - WebApi: controller + request/response DTOs + mapper + validators + Program.cs wiring
- Write tests: component, API integration, validator
- Verify:
dotnet test src/backend/NetRockTemplate.slnx -c Release- loop until green - Commit:
feat({feature}): add {Feature} service and API endpoints
Frontend (see /new-page):
- Regenerate types:
cd src/frontend && pnpm run api:generate - Add type alias to
src/frontend/src/lib/types/index.ts - Create components in
$lib/components/{feature}/with barrelindex.ts - Create page in
routes/(app)/{feature}/ - Add i18n keys to both
en.jsonandcs.json - Add sidebar navigation entry and command palette entry (both with permission if guarded)
- Verify:
cd src/frontend && pnpm run format && pnpm run lint && pnpm run check- loop until green - Commit:
feat({feature}): add {feature} frontend page
Always: If build/check fails, read the error, fix it, re-run. Never stop to report a fixable error.