--- id: CUST-WP-0010 type: workstream title: Domain and Repository Goals domain: custodian status: completed owner: custodian topic_slug: the-custodian state_hub_workstream_id: "def8455a-9de4-4891-a15a-5b09ca98ab1e" created: 2026-03-08 updated: 2026-03-09 --- # Domain and Repository Goals ## Purpose Capture strategic intent at two levels — domain and repository — as first-class entities in the State Hub. Domain goals express the high-level direction for a domain; repository goals refine that into actionable targets for a specific repo. Workstreams can be linked to a repo goal so the goal hierarchy is visible when planning and reviewing progress. ## Schema ### `domain_goals` - One active goal per domain at a time (partial unique index enforced by DB) - `status`: active | archived | superseded - Activating a new goal auto-supersedes the previous active one ### `repo_goals` - Multiple active goals per repo, ordered by `priority` (integer, lower = higher) - Optional FK to `domain_goal_id` — traces which domain goal drove this repo goal - `status`: active | paused | completed | archived ### `workstreams.repo_goal_id` - Nullable FK added so workstreams can be tagged to a specific repo goal ## MCP Tools Added - `create_domain_goal(domain_slug, title, description)` - `get_domain_goals(domain_slug, status?)` - `activate_domain_goal(goal_id)` - `create_repo_goal(repo_slug, title, description, domain_goal_id?, priority?)` - `get_repo_goals(repo_slug, status?)` - `update_repo_goal(goal_id, ...)` ## Seed Data **railiance domain goal** (active): > "Improve the railiance repositories so that I can securely set up a three > phoenix server setup to provide for the coulomb infrastructure with proper > IT-Security, Backup and Update management in a fully automated way." **railiance-cluster repo goal** (active, priority 10): > "Bootstrap a new server securely at hosteurope that can function as the > second kubernetes host for the railiance setup. Focus on security and single > server; defer automated provisioning (railiance-hosts) for now." ## Tasks ### Implement Goals schema, API, and MCP tools ```task id: T01 status: done priority: high state_hub_task_id: "051fd9e1-d15c-4665-adc9-704c4d2b24ea" ``` ### Seed railiance example goals ```task id: T02 status: done priority: high state_hub_task_id: "103b46d9-6241-4ef1-9063-054478900b5c" ```