slug: data-models title: Core Data Models & Persistence created: 2026-02-11T04:57:27.301245673Z phase: specified phase_history: - phase: draft entered: 2026-02-11T04:57:27.301245673Z exited: 2026-02-11T05:00:37.605345054Z - phase: specified entered: 2026-02-11T05:00:37.605345054Z artifacts: audit: status: pending path: audit.md design: status: approved path: design.md approved_by: user approved_at: 2026-02-11T05:04:37.331925447Z qa_plan: status: pending path: qa-plan.md qa_results: status: pending path: qa-results.md review: status: pending path: review.md spec: status: approved path: spec.md approved_by: user approved_at: 2026-02-11T05:00:33.399672269Z tasks: status: draft path: tasks.md total: 12 tasks: - id: task-001 title: SQL migrations - Create PostgreSQL migration files for projects, tasks, labels, task_labels, and assignments tables status: pending - id: task-002 title: Domain entities and errors - Create Project, Task, Label, Assignment, TaskLabel domain types with strong-typed IDs, constructors, validation, and domain error sentinels status: pending - id: task-003 title: Domain entity tests - Unit tests for all domain constructors, validation, and enum types status: pending - id: task-004 title: Port interfaces - Define repository interfaces for Project, Task, Label, TaskLabel, and Assignment status: pending - id: task-005 title: PostgreSQL adapters - Implement repository interfaces with sqlx for all five entities status: pending - id: task-006 title: Project and Label services - Business logic services for Project CRUD and Label CRUD with duplicate detection status: pending - id: task-007 title: Task and Association services - Business logic for Task CRUD with project FK validation, and AssociationService for task-label and task-user operations status: pending - id: task-008 title: Service layer tests - Unit tests for Project, Task, Label, and Association services with mock repositories status: pending - id: task-009 title: Project and Label HTTP handlers - CRUD handlers for projects and labels with request/response types and error mapping status: pending - id: task-010 title: Task and Association HTTP handlers - CRUD handlers for tasks and association endpoints (task-labels, assignments) status: pending - id: task-011 title: Handler tests - HTTP integration tests for all project, task, label, and association handlers status: pending - id: task-012 title: Routes, OpenAPI spec, and main.go wiring - Register all routes, update OpenAPI spec, wire database connection, migrations, and dependency injection in main.go status: pending