generated from coulomb/repo-seed
feat(goals): add domain/repo goal tracking and update_workstream MCP tool
- Migration c5d6e7f8a9b0: domain_goals and repo_goals tables, repo_goal_id FK on workstreams - DomainGoal: one active per domain (partial unique index), status active/archived/superseded - RepoGoal: integer priority, status active/paused/completed/archived, optional domain_goal_id link - WorkstreamUpdate schema and router extended with repo_goal_id and repo_goal_id filter - 6 new MCP goal tools: create_domain_goal, get_domain_goals, activate_domain_goal, create_repo_goal, get_repo_goals, update_repo_goal - update_workstream MCP tool: patch any subset of workstream fields (title, description, owner, due_date, repo_goal_id, status) - get_domain_summary extended with goal_guidance (needs_workplan, alignment_warnings) signals - Dashboard goals.md page and docs/goals.md reference page - CLAUDE.md template updated to act on goal_guidance signals at session start - CUST-WP-0010 workplan for this feature Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
31
api/schemas/domain_goal.py
Normal file
31
api/schemas/domain_goal.py
Normal file
@@ -0,0 +1,31 @@
|
||||
import uuid
|
||||
from datetime import datetime
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from api.models.domain_goal import DomainGoalStatus
|
||||
|
||||
|
||||
class DomainGoalCreate(BaseModel):
|
||||
domain_id: uuid.UUID
|
||||
title: str
|
||||
description: str
|
||||
status: str = DomainGoalStatus.active.value
|
||||
|
||||
|
||||
class DomainGoalUpdate(BaseModel):
|
||||
title: str | None = None
|
||||
description: str | None = None
|
||||
status: str | None = None
|
||||
|
||||
|
||||
class DomainGoalRead(BaseModel):
|
||||
model_config = ConfigDict(from_attributes=True)
|
||||
id: uuid.UUID
|
||||
domain_id: uuid.UUID
|
||||
domain_slug: str
|
||||
title: str
|
||||
description: str
|
||||
status: str
|
||||
created_at: datetime
|
||||
updated_at: datetime
|
||||
37
api/schemas/repo_goal.py
Normal file
37
api/schemas/repo_goal.py
Normal file
@@ -0,0 +1,37 @@
|
||||
import uuid
|
||||
from datetime import datetime
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from api.models.repo_goal import RepoGoalStatus
|
||||
|
||||
|
||||
class RepoGoalCreate(BaseModel):
|
||||
repo_id: uuid.UUID
|
||||
domain_goal_id: uuid.UUID | None = None
|
||||
title: str
|
||||
description: str
|
||||
priority: int = 100
|
||||
status: str = RepoGoalStatus.active.value
|
||||
|
||||
|
||||
class RepoGoalUpdate(BaseModel):
|
||||
title: str | None = None
|
||||
description: str | None = None
|
||||
priority: int | None = None
|
||||
status: str | None = None
|
||||
domain_goal_id: uuid.UUID | None = None
|
||||
|
||||
|
||||
class RepoGoalRead(BaseModel):
|
||||
model_config = ConfigDict(from_attributes=True)
|
||||
id: uuid.UUID
|
||||
repo_id: uuid.UUID
|
||||
repo_slug: str
|
||||
domain_goal_id: uuid.UUID | None = None
|
||||
title: str
|
||||
description: str
|
||||
priority: int
|
||||
status: str
|
||||
created_at: datetime
|
||||
updated_at: datetime
|
||||
@@ -16,6 +16,7 @@ class WorkstreamCreate(BaseModel):
|
||||
owner: str | None = None
|
||||
due_date: date | None = None
|
||||
repo_id: uuid.UUID | None = None # GEMS primary: the owning repository
|
||||
repo_goal_id: uuid.UUID | None = None
|
||||
|
||||
|
||||
class WorkstreamUpdate(BaseModel):
|
||||
@@ -25,6 +26,7 @@ class WorkstreamUpdate(BaseModel):
|
||||
owner: str | None = None
|
||||
due_date: date | None = None
|
||||
repo_id: uuid.UUID | None = None
|
||||
repo_goal_id: uuid.UUID | None = None
|
||||
|
||||
|
||||
class WorkstreamRead(BaseModel):
|
||||
@@ -32,6 +34,7 @@ class WorkstreamRead(BaseModel):
|
||||
id: uuid.UUID
|
||||
topic_id: uuid.UUID
|
||||
repo_id: uuid.UUID | None = None
|
||||
repo_goal_id: uuid.UUID | None = None
|
||||
slug: str
|
||||
title: str
|
||||
description: str | None = None
|
||||
|
||||
Reference in New Issue
Block a user