-
Epic
-
Resolution: Unresolved
-
Normal
-
None
-
None
-
Kessel | Layered architecture for Inventory
-
Quality / Stability / Reliability
-
False
-
-
False
-
Unset
-
In Progress
-
67% To Do, 11% In Progress, 22% Done
-
-
-
Review the CRCPLAN parent feature for additional context, including the feature overview, goals, user stories and use cases, acceptance criteria, designs, dependencies, risks, assumptions, pending questions and documentation callouts.
Summary and goal
Organize Inventory into a clearly layered architecture, using packages to model the 5 layers described in Inventory Application Architecture.
Acceptance Criteria
- Inventory codebase package structure clearly reflects the 5 layers
- Each layer's responsibility and dependency rules are documented
- The layers follow the rules and dependency structure
- Developers can understand the architecture, and implement new features following its rules and guidance
- Linters automatically enforce simple mechanical rules where appropriate (e.g. import ruels)
- LLMs can "understand" the architecture, and automatically implement new features or abstractions following its rules and guidance
Order
These refactorings have all been prototyped and designed to be implemented in a specific order to minimize disruption and churn between changes:
- Separate presentation from application
- Move types that should be into the model, to the model
- Add/move logic that should be in the model, to the model (potentially with new value types)
- Validate resource schema with the application service, not middleware
- Move tuple calculation to Schema (it is coupled to schema)
- Remove gorm from Repository interface(s)
- Move repository implementations to infrastructure
- Move Authorizer interface to consolidated model and implementation to infrastructure
- Integrate the Consumer into the model
- Integrate the ListenManager into the application layer
- Refactor observability code into observers & probes (domain oriented observability pattern)
- [Stretch] Reorganize config deserialization
Checklist
| Checklist Item | Required | Notes or Comments |
|---|---|---|
| Workstream or external team dependencies? | N | |
ADR Required?
|
N | |
Testing plans
|
N | Architecture includes testing accommodations |
Known dependencies?
|
N |
Open Questions
Capture any open questions and resolutions related to the epic goal or acceptance criteria. Add any additional details, questions or decisions that need to be made or addressed.