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
This commit is contained in:
José René White Enciso 2026-02-22 01:30:02 -06:00
parent 063c1a2f2d
commit d45d882437
12 changed files with 154 additions and 0 deletions

View File

@ -0,0 +1,8 @@
<Solution>
<Folder Name="/src/">
<Project Path="src/BuildingBlock.Catalog.Contracts/BuildingBlock.Catalog.Contracts.csproj" />
</Folder>
<Folder Name="/tests/">
<Project Path="tests/BuildingBlock.Catalog.Contracts.UnitTests/BuildingBlock.Catalog.Contracts.UnitTests.csproj" />
</Folder>
</Solution>

View File

@ -0,0 +1,22 @@
@startuml
skinparam packageStyle rectangle
package "building-block-catalog" {
package "BuildingBlock.Catalog.Contracts" {
class Products
class Tags
interface Abstractions
}
}
package "furniture-dal" as FurnitureDal
package "furniture-service" as FurnitureService
package "furniture-bff" as FurnitureBff
FurnitureDal --> Products
FurnitureDal --> Tags
FurnitureService --> Products
FurnitureService --> Tags
FurnitureBff --> Products
FurnitureBff --> Tags
@enduml

View File

@ -0,0 +1,17 @@
# Catalog Contract Catalog
## Package
- `BuildingBlock.Catalog.Contracts`
## Contract Groups
- `Products`: product contract shapes.
- `Tags`: tag, tag type, and tag override contract shapes.
- `Abstractions`: marker abstraction for contract ownership.
## Ownership Boundary
- This repository owns reusable catalog capability contracts.
- Persistence and transport concerns remain outside this package.
- Identity abstractions remain Thalos-owned.

View File

@ -0,0 +1,12 @@
# Catalog Versioning Policy
## Policy
- Prefer additive contract evolution to keep consumer compatibility.
- Breaking changes require major version increments.
- Deprecated members remain through one deprecation cycle.
## Compatibility Notes
- Consumers (`furniture-dal`, `furniture-service`, `furniture-bff`) update explicitly.
- Transport-specific adapters are out of scope for this contracts package.

View File

@ -0,0 +1,8 @@
namespace BuildingBlock.Catalog.Contracts.Abstractions;
/// <summary>
/// Marker contract for catalog capability request/response definitions.
/// </summary>
public interface ICatalogCapabilityContract
{
}

View File

@ -0,0 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,8 @@
namespace BuildingBlock.Catalog.Contracts.Products;
/// <summary>
/// Catalog product contract.
/// </summary>
/// <param name="ProductId">Product identifier in catalog capability scope.</param>
/// <param name="DisplayName">Product display name.</param>
public sealed record ProductContract(string ProductId, string DisplayName);

View File

@ -0,0 +1,9 @@
namespace BuildingBlock.Catalog.Contracts.Tags;
/// <summary>
/// Catalog tag contract.
/// </summary>
/// <param name="TagId">Tag identifier.</param>
/// <param name="TagTypeId">Tag type identifier.</param>
/// <param name="Value">Tag value.</param>
public sealed record TagContract(string TagId, string TagTypeId, string Value);

View File

@ -0,0 +1,9 @@
namespace BuildingBlock.Catalog.Contracts.Tags;
/// <summary>
/// Catalog tag override contract for consumer-specific overrides.
/// </summary>
/// <param name="TagId">Tag identifier.</param>
/// <param name="TargetScope">Override target scope.</param>
/// <param name="OverrideValue">Override value.</param>
public sealed record TagOverrideContract(string TagId, string TargetScope, string OverrideValue);

View File

@ -0,0 +1,8 @@
namespace BuildingBlock.Catalog.Contracts.Tags;
/// <summary>
/// Catalog tag type contract.
/// </summary>
/// <param name="TagTypeId">Tag type identifier.</param>
/// <param name="Name">Tag type name.</param>
public sealed record TagTypeContract(string TagTypeId, string Name);

View File

@ -0,0 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.4" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
<PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.4" />
</ItemGroup>
<ItemGroup>
<Using Include="Xunit" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\BuildingBlock.Catalog.Contracts\BuildingBlock.Catalog.Contracts.csproj" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,26 @@
using BuildingBlock.Catalog.Contracts.Products;
using BuildingBlock.Catalog.Contracts.Tags;
namespace BuildingBlock.Catalog.Contracts.UnitTests;
public class ContractShapeTests
{
[Fact]
public void ProductContract_WhenCreated_StoresRequiredValues()
{
var contract = new ProductContract("PRD-001", "Chair");
Assert.Equal("PRD-001", contract.ProductId);
Assert.Equal("Chair", contract.DisplayName);
}
[Fact]
public void TagOverrideContract_WhenCreated_StoresRequiredValues()
{
var contract = new TagOverrideContract("TAG-001", "furniture", "featured");
Assert.Equal("TAG-001", contract.TagId);
Assert.Equal("furniture", contract.TargetScope);
Assert.Equal("featured", contract.OverrideValue);
}
}