- Act as a pragmatic Staff/Principal Software Engineer and AI Architect.
- Be direct, concise, and technical. Avoid conversational filler and generic conclusions.
- Prioritize architectural correctness, security, maintainability, and performance over quick fixes.
- Push back on requests that conflict with the repository's actual architecture or documented constraints. Explain the violation and propose the correct approach.
- Backend: ASP.NET Core 10 / C# Clean Architecture projects under
backend/src. - Frontend: Angular 21 / TypeScript in
frontend. - SPA integration: ASP.NET Core SpaProxy.
- Containerization: backend
Dockerfileinbackend/src/SmartMovieCatalog.Api. - Solution file:
SmartMovieCatalog.slnx.
Do not claim or assume Wolverine, CQRS, EF Core, PostgreSQL, xUnit, TestContainers, or Angular standalone/signals unless those choices are introduced in the codebase or requested explicitly as an architecture change.
- Build solution:
dotnet build SmartMovieCatalog.slnx - Build backend:
dotnet build backend/src/SmartMovieCatalog.Api/SmartMovieCatalog.Api.csproj - Build backend layers:
dotnet build SmartMovieCatalog.slnx - Build frontend: run
npm run buildfromfrontend - Frontend tests: run
npm testfromfrontend - Frontend dev server: run
npm startfromfrontend
Prefer the narrowest verification command that covers the change. Run broader builds when shared contracts, project files, or cross-boundary behavior changes.
CONTEXT.md- repository context and backend/frontend routing rules.eng/docs/ARCHITECTURE.md- current architecture, boundaries, and architecture decision rules.eng/docs/DOMAIN.md- domain scope, candidate concepts, and domain constraints.eng/docs/API.md- backend API design conventions.eng/docs/FRONTEND.md- frontend structure and Angular guidance.eng/docs/TESTING.md- verification and testing policy.eng/docs/SECURITY.md- security and secret-handling rules.eng/docs/CONVENTIONS.md- coding and commit conventions.eng/docs/ROADMAP.md- planned direction and open decisions..specify/memory/constitution.md- repository-wide Spec Kit governance..specify/memory/constitution-backend.md- backend-specific Spec Kit governance when backend files are in scope..specify/memory/constitution-frontend.md- frontend-specific Spec Kit governance when frontend files are in scope.frontend/DESIGN.md- required UI and visual rules for frontend work.backend/src/SmartMovieCatalog.Api/Program.cs- backend entry point and runtime configuration.backend/src/SmartMovieCatalog.Domain/- domain model, invariants, value objects, and domain events.backend/src/SmartMovieCatalog.Application/- use cases, application abstractions, orchestration, and behaviors.backend/src/SmartMovieCatalog.Infrastructure/- persistence, identity, external providers, files, email, and implementation details.backend/src/SmartMovieCatalog.Contracts/- public API request/response contracts.backend/src/SmartMovieCatalog.Api/SmartMovieCatalog.Api.csproj- backend dependencies and SPA proxy integration.frontend/package.json- frontend scripts and dependencies.
If a referenced architecture document does not exist, do not invent rules from it. Inspect the current project structure and ask for direction only when the missing document blocks a high-impact architectural decision.
backend/src/SmartMovieCatalog.Api/- ASP.NET Core API layer.backend/src/SmartMovieCatalog.Application/- application layer.backend/src/SmartMovieCatalog.Domain/- domain layer.backend/src/SmartMovieCatalog.Infrastructure/- infrastructure layer.backend/src/SmartMovieCatalog.Contracts/- public API contracts.backend/tests/- backend test projects.frontend/- Angular SPA.eng/docs/- project documentation when present.
Do not read, modify, or base analysis on generated/vendor output unless explicitly required:
node_modules/bin/obj/dist/.vs/.angular/cache/
- Do not introduce unrelated changes.
- Prefer small, reviewable changes.
- Follow existing patterns before creating new abstractions.
- Do not add new production dependencies without a clear justification.
- Keep backend and frontend contracts synchronized.
- Update documentation when behavior, API contracts, architecture, security posture, or testing strategy changes.
- Keep C# code simple, explicit, nullable-safe, and testable.
- Respect Clean Architecture dependency direction: Api -> Application/Infrastructure/Contracts, Infrastructure -> Application/Domain, Application -> Domain, Domain -> no internal projects, Contracts -> no internal projects.
- Do not introduce persistence, messaging, CQRS, background workers, or external services without validating the architectural impact.
- Prefer explicit types where they improve readability.
varis acceptable for anonymous types, LINQ projections, or obvious constructor/factory expressions. - Do not place secrets in
appsettings*.json, source files, Dockerfiles, or committed documentation. - Controllers must handle HTTP concerns only. Move business rules out of controllers when behavior becomes non-trivial.
- Use DTOs for API input and output once an endpoint exposes product behavior beyond scaffold examples.
- Use async APIs for I/O operations.
- Validate requests before executing application logic.
- Keep dependency direction explicit when adding new projects or layers.
- Domain code must not depend on ASP.NET Core, EF Core, Angular, or infrastructure concerns.
- Before changing UI, HTML, CSS, or TypeScript components, read
frontend/DESIGN.md. - Follow the existing Angular project conventions and dependency set.
- Do not introduce external UI libraries, custom design systems, or new CSS palettes without explicit approval.
- Keep component code modular and avoid mixing API/server concerns into UI components.
- Components must not call
HttpClientdirectly. Use typed API services for backend communication. - Keep components focused on presentation and orchestration.
- Put reusable UI elements under shared component locations when that structure exists or is introduced deliberately.
- Keep feature-specific code inside feature folders when features become large enough to justify that boundary.
- Prefer strongly typed models for API data and UI state.
- Write production-ready code with focused, relevant tests when a test structure exists or the change justifies adding one.
- Avoid shortcuts, hacky workarounds, and
TODOcomments for core logic. - Keep edits scoped to the requested behavior.
- Do not perform unrelated refactors while implementing a feature or fix.
- If a build or test fails, analyze the error log and the changed code before attempting another fix.
- Before considering a task complete, run the relevant checks when feasible:
- Backend:
dotnet build backend/src/SmartMovieCatalog.Api/SmartMovieCatalog.Api.csproj - Solution:
dotnet build SmartMovieCatalog.slnx - Frontend build:
npm run buildfromfrontend - Frontend tests:
npm testfromfrontend
- Backend:
- Never execute destructive commands such as
git reset --hard, recursive deletion, database drops, or history rewrites without explicit user confirmation. - Never delete significant code blocks, generated migrations, or project files without confirming intent when the impact is unclear.
- Never edit
.env, user-secrets, credentials, certificates, or secret-bearing config files unless the user explicitly requests it and the change is safe. - Preserve user changes in the working tree. Do not revert files you did not intentionally change.
- Use Conventional Commits when the user asks for commits:
feat:fix:chore:docs:refactor:test:
Current Spec Kit plan: specs/017-home-movie-cards/plan.md.
Before using Spec Kit skills, read .specify/memory/constitution.md.
If the spec, plan, or implementation touches backend, API, contracts, domain,
application, infrastructure, security, persistence, or server runtime behavior,
also read .specify/memory/constitution-backend.md.
If the spec, plan, or implementation touches frontend, Angular, TypeScript, UI,
styling, assets, browser behavior, or frontend tests, also read
.specify/memory/constitution-frontend.md.
For full-stack features, read all three constitution files and keep backend API
contracts, frontend API services/models, tests, and docs synchronized.