- Rename docs/decisions/adr-012-lazar-conformance.md → adr-012-feature-conventions.md - Strip "Lazar", "Plan 8/9/10/11", "refactor-logs" refs from all ADRs, architecture docs, HTML explainers, and feature/core AGENTS.md files - Update all incoming links in docs/, packages/*/AGENTS.md, HTML explainers Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1.1 KiB
1.1 KiB
ADR-002: InversifyJS for Dependency Injection
Status: Accepted
Context
Need DI for clean architecture. Options: InversifyJS, tsyringe, manual composition root.
Decision
InversifyJS with symbol-based resolution + targeted agent documentation.
Rationale
- Scales to 20+ services with automatic dependency chain resolution
- Built-in singleton/transient/request scopes
- Middleware support for logging/tracing (Sentry integration)
- Matches the Clean Architecture reference implementation
- Agent readability gap (4/10 → 7/10) mitigated by resolution tables and step-by-step recipes in di/AGENTS.md
- Familiar to developers from Java/C# backgrounds
Trade-offs
- Requires reflect-metadata + decorator config in tsconfig
- Symbol indirection harder to trace than plain functions
- Extra dependency (inversify + reflect-metadata)
Update (2026-05-04)
The vertical-feature refactor preserved InversifyJS but moved from a single shared container in packages/core/src/di/ to per-feature containers in each feature package (packages/<feature>/src/di/container.ts). See ADR-008.