From d6378920559d0f1d41b2641a2be2e9f0bd81fc66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Ren=C3=A9=20White=20Enciso?= Date: Sun, 22 Feb 2026 01:30:02 -0600 Subject: [PATCH] feat(stage3): scaffold task-001 baseline - WHY: establish Stage 3 task-001 execution baseline per repo intent - WHAT: add minimal solution/project skeleton and boundary docs - RULE: apply stage3 execution runtime and repository workflow directives --- Furniture.DAL.slnx | 8 +++++++ docs/architecture/dal-layer-map.puml | 20 ++++++++++++++++ docs/dal/persistence-cache-policy.md | 12 ++++++++++ docs/dal/provider-boundaries.md | 12 ++++++++++ .../Caching/ICacheInvalidationPolicy.cs | 8 +++++++ src/Furniture.DAL/Furniture.DAL.csproj | 7 ++++++ .../Providers/ICatalogDataProvider.cs | 8 +++++++ .../Providers/IFurnitureDataProvider.cs | 8 +++++++ .../Repositories/ICatalogRepository.cs | 8 +++++++ .../Repositories/IFurnitureRepository.cs | 8 +++++++ .../BoundaryShapeTests.cs | 23 +++++++++++++++++++ .../Furniture.DAL.UnitTests.csproj | 20 ++++++++++++++++ 12 files changed, 142 insertions(+) create mode 100644 Furniture.DAL.slnx create mode 100644 docs/architecture/dal-layer-map.puml create mode 100644 docs/dal/persistence-cache-policy.md create mode 100644 docs/dal/provider-boundaries.md create mode 100644 src/Furniture.DAL/Caching/ICacheInvalidationPolicy.cs create mode 100644 src/Furniture.DAL/Furniture.DAL.csproj create mode 100644 src/Furniture.DAL/Providers/ICatalogDataProvider.cs create mode 100644 src/Furniture.DAL/Providers/IFurnitureDataProvider.cs create mode 100644 src/Furniture.DAL/Repositories/ICatalogRepository.cs create mode 100644 src/Furniture.DAL/Repositories/IFurnitureRepository.cs create mode 100644 tests/Furniture.DAL.UnitTests/BoundaryShapeTests.cs create mode 100644 tests/Furniture.DAL.UnitTests/Furniture.DAL.UnitTests.csproj diff --git a/Furniture.DAL.slnx b/Furniture.DAL.slnx new file mode 100644 index 0000000..fae3c97 --- /dev/null +++ b/Furniture.DAL.slnx @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/docs/architecture/dal-layer-map.puml b/docs/architecture/dal-layer-map.puml new file mode 100644 index 0000000..fa043d9 --- /dev/null +++ b/docs/architecture/dal-layer-map.puml @@ -0,0 +1,20 @@ +@startuml +skinparam packageStyle rectangle + +package "furniture-dal" { + interface IFurnitureDataProvider + interface ICatalogDataProvider + interface IFurnitureRepository + interface ICatalogRepository + interface ICacheInvalidationPolicy + + IFurnitureRepository --> IFurnitureDataProvider + ICatalogRepository --> ICatalogDataProvider + IFurnitureRepository --> ICacheInvalidationPolicy + ICatalogRepository --> ICacheInvalidationPolicy +} + +package "furniture-service" as FurnitureService +FurnitureService --> IFurnitureRepository +FurnitureService --> ICatalogRepository +@enduml diff --git a/docs/dal/persistence-cache-policy.md b/docs/dal/persistence-cache-policy.md new file mode 100644 index 0000000..daae1b1 --- /dev/null +++ b/docs/dal/persistence-cache-policy.md @@ -0,0 +1,12 @@ +# DAL Persistence and Cache Policy + +## Responsibilities + +- Repositories coordinate provider calls for aggregate persistence. +- Cache invalidation policy is owned by DAL. +- Service layer does not implement persistence or cache invalidation details. + +## Policy + +- Persistence writes must define cache invalidation triggers. +- Cache keys and invalidation behavior are centralized in DAL policy definitions. diff --git a/docs/dal/provider-boundaries.md b/docs/dal/provider-boundaries.md new file mode 100644 index 0000000..75f810c --- /dev/null +++ b/docs/dal/provider-boundaries.md @@ -0,0 +1,12 @@ +# DAL Provider Boundaries + +## Ownership + +- `IFurnitureDataProvider`: furniture persistence provider boundary. +- `ICatalogDataProvider`: catalog persistence provider boundary. + +## Rules + +- Providers encapsulate datastore-specific access. +- Providers do not contain orchestration concerns. +- Provider contracts are consumed by DAL repositories. diff --git a/src/Furniture.DAL/Caching/ICacheInvalidationPolicy.cs b/src/Furniture.DAL/Caching/ICacheInvalidationPolicy.cs new file mode 100644 index 0000000..f84c871 --- /dev/null +++ b/src/Furniture.DAL/Caching/ICacheInvalidationPolicy.cs @@ -0,0 +1,8 @@ +namespace Furniture.DAL.Caching; + +/// +/// Defines cache invalidation policy boundary for DAL operations. +/// +public interface ICacheInvalidationPolicy +{ +} diff --git a/src/Furniture.DAL/Furniture.DAL.csproj b/src/Furniture.DAL/Furniture.DAL.csproj new file mode 100644 index 0000000..6c3a887 --- /dev/null +++ b/src/Furniture.DAL/Furniture.DAL.csproj @@ -0,0 +1,7 @@ + + + net10.0 + enable + enable + + diff --git a/src/Furniture.DAL/Providers/ICatalogDataProvider.cs b/src/Furniture.DAL/Providers/ICatalogDataProvider.cs new file mode 100644 index 0000000..090a94c --- /dev/null +++ b/src/Furniture.DAL/Providers/ICatalogDataProvider.cs @@ -0,0 +1,8 @@ +namespace Furniture.DAL.Providers; + +/// +/// Defines provider access for catalog persistence operations. +/// +public interface ICatalogDataProvider +{ +} diff --git a/src/Furniture.DAL/Providers/IFurnitureDataProvider.cs b/src/Furniture.DAL/Providers/IFurnitureDataProvider.cs new file mode 100644 index 0000000..66f7e81 --- /dev/null +++ b/src/Furniture.DAL/Providers/IFurnitureDataProvider.cs @@ -0,0 +1,8 @@ +namespace Furniture.DAL.Providers; + +/// +/// Defines provider access for furniture persistence operations. +/// +public interface IFurnitureDataProvider +{ +} diff --git a/src/Furniture.DAL/Repositories/ICatalogRepository.cs b/src/Furniture.DAL/Repositories/ICatalogRepository.cs new file mode 100644 index 0000000..923d34c --- /dev/null +++ b/src/Furniture.DAL/Repositories/ICatalogRepository.cs @@ -0,0 +1,8 @@ +namespace Furniture.DAL.Repositories; + +/// +/// Defines catalog aggregate repository boundary owned by DAL. +/// +public interface ICatalogRepository +{ +} diff --git a/src/Furniture.DAL/Repositories/IFurnitureRepository.cs b/src/Furniture.DAL/Repositories/IFurnitureRepository.cs new file mode 100644 index 0000000..a98ec30 --- /dev/null +++ b/src/Furniture.DAL/Repositories/IFurnitureRepository.cs @@ -0,0 +1,8 @@ +namespace Furniture.DAL.Repositories; + +/// +/// Defines furniture aggregate repository boundary owned by DAL. +/// +public interface IFurnitureRepository +{ +} diff --git a/tests/Furniture.DAL.UnitTests/BoundaryShapeTests.cs b/tests/Furniture.DAL.UnitTests/BoundaryShapeTests.cs new file mode 100644 index 0000000..a8923ca --- /dev/null +++ b/tests/Furniture.DAL.UnitTests/BoundaryShapeTests.cs @@ -0,0 +1,23 @@ +using Furniture.DAL.Caching; +using Furniture.DAL.Providers; +using Furniture.DAL.Repositories; + +namespace Furniture.DAL.UnitTests; + +public class BoundaryShapeTests +{ + [Fact] + public void ProviderBoundaries_WhenReflected_AreInterfaces() + { + Assert.True(typeof(IFurnitureDataProvider).IsInterface); + Assert.True(typeof(ICatalogDataProvider).IsInterface); + } + + [Fact] + public void RepositoryAndCacheBoundaries_WhenReflected_AreInterfaces() + { + Assert.True(typeof(IFurnitureRepository).IsInterface); + Assert.True(typeof(ICatalogRepository).IsInterface); + Assert.True(typeof(ICacheInvalidationPolicy).IsInterface); + } +} diff --git a/tests/Furniture.DAL.UnitTests/Furniture.DAL.UnitTests.csproj b/tests/Furniture.DAL.UnitTests/Furniture.DAL.UnitTests.csproj new file mode 100644 index 0000000..07412cf --- /dev/null +++ b/tests/Furniture.DAL.UnitTests/Furniture.DAL.UnitTests.csproj @@ -0,0 +1,20 @@ + + + net10.0 + enable + enable + false + + + + + + + + + + + + + +