Add the Digital Core domain model from semprini-blog-dataproducts

The MD-DDL model (domain, entities, enums, the Canonical Party product
declaration) moves into its own repository, owned by the domain's modelling
team. Engineering teams consume its product declarations and generate products
from semprini-data-product-templates.

Adds the MD-DDL agent wrappers (md-ddl init), pyproject with md-ddl, and
README/CLAUDE.md describing the team split and the handoff interface.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
paulandClaude Opus 5 committed 2026-09-17 22:51:50 +12:00
commit aeba56e5f2
41 files changed
+3007

No files matched your search

+94
View File
@@ -0,0 +1,94 @@
# [Digital Core](../domain.md)
## Entities
### Service Agent
A Service Agent is a Party Role representing a staff member who serves customers — at a counter, on the phone, or in a chat window.
Agents are modelled as a role for the same reason customers are. An agent is a person, that person may also be a customer of the business, and treating them as one Party wearing two roles avoids the awkward duplicate that appears when staff buy their employer's products.
Recording which agent handled a transaction is what makes service quality measurable and gives every action an accountable human.
```mermaid
---
config:
layout: elk
---
classDiagram
class ServiceAgent{
* Service Agent Identifier : string
Employee Number : string
Assigned Location Identifier : string
}
ServiceAgent --|> PartyRole
ServiceAgent "1" --> "0..*" Transaction : processes
ServiceAgent "0..*" --> "1" ServiceLocation : assigned to
class PartyRole["<a href='./party_role.md'>Party Role</a>"]
class Transaction["<a href='./transaction.md'>Transaction</a>"]
class ServiceLocation["<a href='./service-location.md'>Service Location</a>"]
```
```yaml
extends: Party Role
existence: independent
mutability: slowly_changing
attributes:
Service Agent Identifier:
type: string
identifier: primary
description: Unique identifier for the service agent role instance.
Employee Number:
type: string
description: Internal staff identifier of the person acting as agent.
Assigned Location Identifier:
type: string
description: The service location the agent normally works from.
```
```yaml
governance:
pii: false
classification: Internal
retention: 7 years
retention_basis: Domain default
description: >
Agent records identify staff rather than customers, but they are still about people:
agent activity data should be used to improve service, not to build surveillance
metrics about individual employees.
access_role:
- SERVICE_MANAGER
- DATA_ANALYST
```
## Relationships
### Service Agent Processes Transaction
A Service Agent can handle one or more Transactions on a customer's behalf.
```yaml
source: Service Agent
type: associates_with
target: Transaction
cardinality: one-to-many
granularity: atomic
ownership: Service Agent
```
### Service Agent Assigned To Service Location
A Service Agent is assigned to a Service Location for operational purposes.
```yaml
source: Service Agent
type: assigned_to
target: Service Location
cardinality: many-to-one
granularity: atomic
ownership: Service Agent
```