from dataclasses import dataclass # ── Business Layer ── @dataclass class Capability: capability_id: str name: str description: str priority: str # must / should / could phase: str related_value_flows: list[str] @dataclass class ValueFlow: value_flow_id: str name: str trigger: str actor: str steps: str outcome: str phase: str related_capabilities: list[str] @dataclass class UserJourney: journey_id: str name: str actor: str precondition: str steps: str postcondition: str phase: str related_value_flows: list[str] @dataclass class ScopeAndGoals: doc_id: str title: str core_problem: str users: str constraints: str # ── Application Layer ── @dataclass class Module: module_id: str name: str layer: str # backend / frontend description: str phase: str depends_on: list[str] capabilities: list[str] @dataclass class Integration: integration_id: str source_id: str target_id: str target_type: str direction: str protocol: str trigger: str phase: str description: str @dataclass class ExternalSystem: system_id: str name: str type: str protocol: str direction: str phase: str description: str @dataclass class ApiContract: doc_id: str path: str method: str operation_id: str summary: str @dataclass class CodebaseAlignment: module_id: str repo_root: str code_root: str package_name: str @dataclass class ModuleBoundaryRule: doc_id: str title: str content: str @dataclass class SystemContext: doc_id: str title: str content: str @dataclass class SolutionLayer: doc_id: str title: str content: str # ── Data Layer ── @dataclass class Entity: entity_id: str name: str domain: str owner_module: str description: str phase: str source_file: str @dataclass class DataFlow: data_flow_id: str source: str target: str data_content: str trigger: str protocol: str phase: str description: str @dataclass class DataSecurity: security_id: str sensitivity: str entities: str protection: str # ── Technology Layer ── @dataclass class TechSelection: category: str technology: str version: str purpose: str rationale: str alternatives_considered: str phase: str @dataclass class RuntimeComponent: component_id: str name: str type: str technology: str port: str @dataclass class RuntimeTopology: doc_id: str title: str content: str @dataclass class Environment: env_id: str name: str purpose: str infra: str @dataclass class OperationalBaseline: doc_id: str title: str content: str @dataclass class ReleasePlan: doc_id: str title: str content: str # ── Cross-Layer ── @dataclass class TraceabilityLink: trace_id: str capability_id: str module_id: str entity_ids: list[str] value_flow_ids: list[str] notes: str @dataclass class ChangeLogEntry: change_id: str date: str scope: str description: str @dataclass class ADR: adr_id: str title: str status: str context: str decision: str @dataclass class DesignDocument: doc_id: str title: str version: str status: str owners: list[str] upstream: list[str] downstream: list[str] file_path: str # ── Domain Layer ── @dataclass class Domain: domain_name: str overview: str modules: list[str] entities: list[str] @dataclass class UbiquitousTerm: term_id: str term: str english_term: str code_symbol: str domain: str definition: str @dataclass class SharedTerm: term_id: str term: str english_term: str definition: str used_by_domains: list[str] @dataclass class Scenario: scenario_id: str name: str trigger: str actors: str steps: str outcome: str related_capabilities: list[str] @dataclass class DomainModule: module_id: str module_name: str domain: str description: str layer_in_code: str @dataclass class DomainEntity: entity_id: str entity_name: str type: str description: str key_attributes: str