docs: update specification — add DomainBaseModel as shared Pydantic base class #2581

Closed
freemo wants to merge 1 commits from spec/update-domain-base-model into master
+1 -1
View File
@@ -43830,7 +43830,7 @@ All domain models, configuration objects, and API schemas use **Pydantic V2** (>
#### Domain Models
Every domain entity — Plan, Decision, Action, Resource, Actor, Tool, Skill, Session, Invariant, AutomationProfile, Checkpoint, CorrectionAttempt — is a Pydantic `BaseModel` subclass. Fields use Python type annotations with Pydantic field validators for business rule enforcement.
Every domain entity — Plan, Decision, Action, Resource, Actor, Tool, Skill, Session, Invariant, AutomationProfile, Checkpoint, CorrectionAttempt — is a Pydantic model subclass. Domain entities that share the canonical configuration (`str_strip_whitespace`, `validate_assignment`, `arbitrary_types_allowed=False`, `populate_by_name`, `use_enum_values`) inherit from the shared `DomainBaseModel` base class (defined in `domain/models/base.py`) rather than directly from `pydantic.BaseModel`. Classes with genuinely different configuration requirements may still subclass `BaseModel` directly. Fields use Python type annotations with Pydantic field validators for business rule enforcement.
#### Configuration Objects