Models Architecture

Last Updated: September 18, 2025 Source: services/domain/models.py Total Models: 39 (38 dataclass models + 1 enum) Architecture: Hub-and-spoke documentation by technical layers

🗂️ By Technical Layer

Navigate by architectural concern and DDD purity level:

🏷️ By Business Function

Navigate by business capability and domain area:

🔤 Alphabetical Quick Lookup

A B C D E F I K L P S T U V W

A

B

C

D

E

F

I

K

L

P

S

T

U

V

W


Architecture Overview

Layer Distribution

Layer Count Primary Functions DDD Purity
Pure Domain 8 Business rules and concepts ⚠️ Highest - No infrastructure
Supporting Domain 7 Business with data needs ⚠️ High - Minimal infrastructure
Integration & Transfer 16 External contracts and enums ⚠️ Medium - External dependencies
Infrastructure 8 System mechanisms ⚠️ Low - Technical concerns

Business Function Coverage

Tag Model Count Percentage Primary Layer
#pm 12 31.6% Mixed (Pure + Integration)
#system 10 26.3% Infrastructure
#knowledge 9 23.7% Supporting + Integration
#workflow 5 13.2% Pure Domain
#spatial 5 13.2% Supporting Domain
#integration 6 15.8% Integration
#files 4 10.5% Integration
#ai 3 7.9% Mixed
#ethics 2 5.3% Pure Domain

Note: Some models have multiple tags, percentages sum > 100%


Business Function Views

#pm Models

Product Management Domain - Managing products, features, stakeholders, and work items

Model Layer Purpose File
Product Pure Domain Core product entity pure-domain.md
Feature Pure Domain Product capabilities pure-domain.md
Stakeholder Pure Domain People with product interest pure-domain.md
WorkItem Integration External work tracking integration.md
Project Integration PM workspace integration.md
ProjectIntegration Integration Tool configurations integration.md
ProjectContext Integration Workflow context integration.md

#workflow Models

Process Orchestration - Managing workflows, tasks, and execution

Model Layer Purpose File
Intent Pure Domain User intent classification pure-domain.md
Task Pure Domain Individual workflow tasks pure-domain.md
Workflow Pure Domain Workflow definitions pure-domain.md
WorkflowResult Pure Domain Execution results pure-domain.md

#knowledge Models

Information Management - Documents, analysis, and knowledge graphs

Model Layer Purpose File
Document Supporting Document memory system supporting-domain.md
KnowledgeNode Supporting Knowledge graph concepts supporting-domain.md
KnowledgeEdge Supporting Knowledge relationships supporting-domain.md
DocumentSample Integration Document processing integration.md
ContentSample Integration Content analysis integration.md
AnalysisResult Integration Analysis outputs integration.md
SummarySection Integration Summary structure integration.md
DocumentSummary Integration Document summaries integration.md

#spatial Models

Spatial Intelligence - Spatial metaphor system for navigation and context

Model Layer Purpose File
SpatialEvent Supporting Spatial metaphor events supporting-domain.md
SpatialObject Supporting Spatial environment objects supporting-domain.md
SpatialContext Supporting Spatial navigation context supporting-domain.md

#ai Models

AI Enhancement - AI-generated insights and humanization

Model Layer Purpose File
Intent Pure Domain User intent classification pure-domain.md
ActionHumanization Supporting AI text enhancement supporting-domain.md
InsightGenerated Infrastructure AI-generated insights infrastructure.md

#ethics Models

Ethics & Safety - Ethical decisions and boundary violations

Model Layer Purpose File
EthicalDecision Pure Domain Recorded ethical decisions pure-domain.md
BoundaryViolation Pure Domain Safety boundary events pure-domain.md

Layer Summaries

Pure Domain Models

⚠️ DDD Purity Warning: Models in this layer must have NO infrastructure dependencies, NO database concerns, and NO external system references. These represent pure business concepts and rules.

8 models representing core business domain: Product management (Product, Feature, Stakeholder), workflow orchestration (Intent, Task, Workflow, WorkflowResult), and ethical decision making (EthicalDecision, BoundaryViolation).

View detailed specifications →

Supporting Domain Models

⚠️ DDD Purity Warning: Models in this layer represent business concepts but require data structures, complex state, or specialized methods. Minimal infrastructure acceptable.

7 models supporting business capabilities: Document memory system (Document), spatial intelligence (SpatialEvent, SpatialObject, SpatialContext), knowledge graphs (KnowledgeNode, KnowledgeEdge), and AI enhancement (ActionHumanization).

View detailed specifications →

Integration & Transfer Models

⚠️ DDD Purity Warning: Models in this layer handle external system contracts and data transfer. External dependencies expected but should be contained.

16 models managing external integration: Work item synchronization (WorkItem), project configuration (Project, ProjectIntegration, ProjectContext), file handling (UploadedFile, ValidationResult, FileTypeInfo), document processing (DocumentSample, ContentSample, AnalysisResult, SummarySection, DocumentSummary), and analysis enums (AnalysisType).

View detailed specifications →

Infrastructure Models

⚠️ DDD Purity Warning: Models in this layer support system operations and technical concerns. Full infrastructure dependencies acceptable.

8 models providing system capabilities: Event tracking (Event, FeatureCreated, InsightGenerated), list management (List, ListItem, ListMembership), task tracking (Todo, TodoList), and conversation logging (Conversation, ConversationTurn).

View detailed specifications →



Migration from domain-models.md

This hub-and-spoke architecture replaces the outdated domain-models.md with current model documentation reflecting all 38 models in services/domain/models.py.

What’s Changed

Finding Models


Status: ✅ CURRENT - All models documented with complete field definitions and architectural context