What problem does it solve?
This skill codifies PowerX CRUD dependency injection conventions to prevent ad-hoc resource creation in handlers and services, reduce coupling, and ensure consistent initialization and lifecycle management across HTTP, gRPC, and background transports.
Core Features & Use Cases
- Architectural Enforcement: Verifies Deps struct and NewDeps factory, constructor-based service and repo wiring, and transport decoupling rules.
- Static CI Checks: Detects forbidden imports and direct external client instantiation in handlers and provides warning-level guidance for gRPC implementations.
- Templates and Wiring: Supplies example templates for deps, service, repo, and handler registration to standardize implementations across modules.
- Use Case: Integrate into repository onboarding or CI pipelines to automatically validate that newly added CRUD modules follow PowerX DI patterns and avoid runtime resource mismanagement.
Quick Start
Run a code scan applying the di.yaml rules to confirm internal/app/shared/deps.go defines Deps and NewDeps and that services, repos, and handlers are constructed via dependency injection.