Files
noteflow/.rag/02-domain-entities.md
Travis Vasceannie 1ce24cdf7b feat: reorganize Claude hooks and add RAG documentation structure with error handling policies
- Moved all hookify configuration files from `.claude/` to `.claude/hooks/` subdirectory for better organization
- Added four new blocking hooks to prevent common error handling anti-patterns:
  - `block-broad-exception-handler`: Prevents catching generic `Exception` with only logging
  - `block-datetime-now-fallback`: Blocks returning `datetime.now()` as fallback on parse failures to prevent data corruption
  - `block-default
2026-01-15 15:58:06 +00:00

2.5 KiB

NoteFlow Domain Entities

Location

src/noteflow/domain/entities/ and domain/value_objects.py

Core Entities

Meeting (entities/meeting.py)

Aggregate root with lifecycle states.

  • Classes: MeetingLoadParams, MeetingCreateParams, Meeting
  • States: CREATED → RECORDING → STOPPED → COMPLETED (or ERROR, STOPPING)
  • Key Fields: id (UUID), title, state, project_id, created_at, started_at, stopped_at

Segment (entities/segment.py)

Transcript fragment with timing and speaker.

  • Key Fields: segment_id, text, start_time, end_time, speaker_id, language, confidence
  • Related: WordTiming for word-level boundaries

Summary (entities/summary.py)

Generated summary with key points and action items.

  • Key Fields: id, meeting_id, template_id, content, format, provider
  • Contains: KeyPoint[], ActionItem[]

Annotation (entities/annotation.py)

User annotation linked to segments.

  • Types: ACTION_ITEM, DECISION, NOTE, RISK
  • Key Fields: id, meeting_id, type, text, segment_ids, priority

NamedEntity (entities/named_entity.py)

NER extraction results.

  • Categories: PERSON, COMPANY, PRODUCT, TECHNICAL, ACRONYM, LOCATION, DATE, OTHER
  • Key Fields: id, name, category, segment_ids, meeting_id

Project (entities/project.py)

Workspace grouping for meetings.

  • Contains: ExportRules, TriggerRules
  • Key Fields: id, workspace_id, name, slug, members

Integration (entities/integration.py)

External service connections.

  • Types: AUTH, EMAIL, CALENDAR, PKM, CUSTOM
  • Statuses: DISCONNECTED, CONNECTED, ERROR

SummarizationTemplate (entities/summarization_template.py)

Configurable summary generation template.

  • Key Fields: id, name, tone, format, verbosity

Value Objects (value_objects.py)

Type-Safe IDs

  • MeetingId = NewType("MeetingId", UUID)
  • AnnotationId = NewType("AnnotationId", UUID)

Enums

  • MeetingState (IntEnum): UNSPECIFIED=0, CREATED=1, RECORDING=2, STOPPED=3, COMPLETED=4, ERROR=5, STOPPING=6
  • AnnotationType (Enum): ACTION_ITEM, DECISION, NOTE, RISK
  • ExportFormat (Enum): MARKDOWN, HTML, PDF

Error Hierarchy (errors.py)

  • Base: DomainError with ErrorCode enum mapping to gRPC StatusCode
  • 30+ specific error types (MEETING_NOT_FOUND, WORKSPACE_ACCESS_DENIED, etc.)

Identity Entities (domain/identity/)

  • User: User identity with email, name, picture
  • Workspace: Tenant container
  • WorkspaceMembership: User-workspace relationship with role
  • ProjectRole: Role definitions (owner, editor, viewer)