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:
parent
063c1a2f2d
commit
b0cddfe442
8
BuildingBlock.Inventory.slnx
Normal file
8
BuildingBlock.Inventory.slnx
Normal file
@ -0,0 +1,8 @@
|
||||
<Solution>
|
||||
<Folder Name="/src/">
|
||||
<Project Path="src/BuildingBlock.Inventory.Contracts/BuildingBlock.Inventory.Contracts.csproj" />
|
||||
</Folder>
|
||||
<Folder Name="/tests/">
|
||||
<Project Path="tests/BuildingBlock.Inventory.Contracts.UnitTests/BuildingBlock.Inventory.Contracts.UnitTests.csproj" />
|
||||
</Folder>
|
||||
</Solution>
|
||||
19
docs/architecture/inventory-contract-boundary.puml
Normal file
19
docs/architecture/inventory-contract-boundary.puml
Normal file
@ -0,0 +1,19 @@
|
||||
@startuml
|
||||
skinparam packageStyle rectangle
|
||||
|
||||
package "building-block-inventory" {
|
||||
package "BuildingBlock.Inventory.Contracts" {
|
||||
class Requests
|
||||
class Responses
|
||||
interface Abstractions
|
||||
}
|
||||
}
|
||||
|
||||
package "furniture-service" as FurnitureService
|
||||
package "furniture-bff" as FurnitureBff
|
||||
|
||||
FurnitureService --> Requests
|
||||
FurnitureService --> Responses
|
||||
FurnitureBff --> Requests
|
||||
FurnitureBff --> Responses
|
||||
@enduml
|
||||
17
docs/contracts/inventory-contract-catalog.md
Normal file
17
docs/contracts/inventory-contract-catalog.md
Normal file
@ -0,0 +1,17 @@
|
||||
# Inventory Contract Catalog
|
||||
|
||||
## Package
|
||||
|
||||
- `BuildingBlock.Inventory.Contracts`
|
||||
|
||||
## Current Contract Groups
|
||||
|
||||
- `Requests`: capability request shapes for inventory use cases.
|
||||
- `Responses`: capability response shapes for inventory use cases.
|
||||
- `Abstractions`: marker abstractions for inventory contract ownership.
|
||||
|
||||
## Ownership Boundary
|
||||
|
||||
- This repository owns inventory capability contracts only.
|
||||
- Implementation details stay in furniture-service, furniture-bff, or furniture-dal.
|
||||
- Identity abstractions are out of scope and remain Thalos-owned.
|
||||
12
docs/contracts/inventory-versioning-policy.md
Normal file
12
docs/contracts/inventory-versioning-policy.md
Normal file
@ -0,0 +1,12 @@
|
||||
# Inventory Versioning Policy
|
||||
|
||||
## Policy
|
||||
|
||||
- Contract changes follow additive-first evolution.
|
||||
- Breaking changes require a new major package version.
|
||||
- Deprecated members should remain for at least one release cycle.
|
||||
|
||||
## Compatibility Notes
|
||||
|
||||
- Consumer repositories (`furniture-service`, `furniture-bff`) should update contracts explicitly.
|
||||
- Transport adapters remain outside this contracts package.
|
||||
@ -0,0 +1,8 @@
|
||||
namespace BuildingBlock.Inventory.Contracts.Abstractions;
|
||||
|
||||
/// <summary>
|
||||
/// Marker contract for inventory capability request/response definitions.
|
||||
/// </summary>
|
||||
public interface IInventoryCapabilityContract
|
||||
{
|
||||
}
|
||||
@ -0,0 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@ -0,0 +1,7 @@
|
||||
namespace BuildingBlock.Inventory.Contracts.Requests;
|
||||
|
||||
/// <summary>
|
||||
/// Represents the contract request to lookup an inventory item.
|
||||
/// </summary>
|
||||
/// <param name="ItemCode">External item identifier.</param>
|
||||
public sealed record InventoryItemLookupRequest(string ItemCode);
|
||||
@ -0,0 +1,8 @@
|
||||
namespace BuildingBlock.Inventory.Contracts.Responses;
|
||||
|
||||
/// <summary>
|
||||
/// Represents the contract response for an inventory item lookup.
|
||||
/// </summary>
|
||||
/// <param name="ItemCode">External item identifier.</param>
|
||||
/// <param name="QuantityAvailable">Current quantity available.</param>
|
||||
public sealed record InventoryItemLookupResponse(string ItemCode, int QuantityAvailable);
|
||||
@ -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.Inventory.Contracts\BuildingBlock.Inventory.Contracts.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@ -0,0 +1,24 @@
|
||||
using BuildingBlock.Inventory.Contracts.Requests;
|
||||
using BuildingBlock.Inventory.Contracts.Responses;
|
||||
|
||||
namespace BuildingBlock.Inventory.Contracts.UnitTests;
|
||||
|
||||
public class ContractShapeTests
|
||||
{
|
||||
[Fact]
|
||||
public void InventoryItemLookupRequest_WhenCreated_StoresItemCode()
|
||||
{
|
||||
var request = new InventoryItemLookupRequest("SKU-001");
|
||||
|
||||
Assert.Equal("SKU-001", request.ItemCode);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void InventoryItemLookupResponse_WhenCreated_StoresContractData()
|
||||
{
|
||||
var response = new InventoryItemLookupResponse("SKU-001", 5);
|
||||
|
||||
Assert.Equal("SKU-001", response.ItemCode);
|
||||
Assert.Equal(5, response.QuantityAvailable);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user