nestjs-architecture-principles
NestJS Architecture and Principles
Make architecture decisions from the repository's actual constraints. Prefer the least complex design that protects the required boundaries and can evolve safely.
Pre-execution conflict guard
Run this guard after identifying every applicable skill and before editing files, installing packages, generating code, running migrations, or executing any other state-changing command. Read-only inspection is allowed while resolving the guard.
Prerequisites
- Read the target repository's instructions, manifests, module/bootstrap files, tests, and the coordination contract of every other active skill.
- Identify the requested outcome, public contracts that must remain stable, and the files and commands likely to be affected.
- Do not assume that activating this skill gives it ownership of every NestJS decision.
Primary ownership
This skill leads decisions about architecture level, capability and module boundaries, dependency direction, public module APIs, data/write ownership, transaction boundaries, ports, and service extraction.
It shares provider/module placement with nestjs-oop-design-patterns and shares transport, deployment, and scaling boundaries with nestjs-features-performance. It yields local object responsibilities and pattern selection to the OOP skill, and yields NestJS lifecycle mechanisms, error/transport mapping, security controls, testing strategy, runtime performance, and delivery operations to the features skill.