You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Every work item must trace back to the company root goal. This issue creates the goal hierarchy model and the ancestry traversal API that powers goal-anchored task context.
Goal Levels
company | team | agent | task
Acceptance Criteria
llc_goals table created via Alembic:
id UUID PK
company_id UUID FK NOT NULL (enforces isolation)
title TEXT NOT NULL
description TEXT nullable
level ENUM(company, team, agent, task) NOT NULL
parent_id UUID FK → llc_goals.id nullable
owner_agent_id UUID FK → agent_org_nodes.id nullable
owner_user_id UUID FK → users.id nullable
status ENUM(planned, active, achieved, cancelled) NOT NULL DEFAULT planned
created_at, updated_at TIMESTAMPTZ
Invariant enforced: at least one company-level goal per company (checked on company create)
Cycle detection on parent_id
GoalService.get_ancestry(goal_id) returns ordered list from leaf to root
GoalService.get_tree(company_id) returns nested goal tree
/api/llc/companies/{id}/goals route group: GET /, POST /, GET /{goal_id}, PATCH /{goal_id}, DELETE /{goal_id}, GET /{goal_id}/ancestry, GET /tree
On goal create/update, goal title + description indexed into company:{company_id} ChromaDB collection via existing KB interface
✅ `LLCGoal` SQLAlchemy model with self-referential `parent_goal_id` FK and `vision → mission → objective → key_result` hierarchy — `llc/models/goal.py`
✅ `GoalService` in `autobot-backend/llc/services/goal.py` extending `LLCServiceBase`: create, get, list_by_company, update, delete; `get_ancestors(goal_id)` (cycle-safe parent-chain walker, root-first); `get_subtree(goal_id)` (BFS); `_index_goal()` ChromaDB upsert to `{company_id}_llc_goals` collection on create/update (non-fatal on error)
✅ API routes in `autobot-backend/llc/api/goals.py`: GET/POST /llc/goals, GET/PATCH/DELETE /llc/goals/{id}, GET /llc/goals/{id}/ancestors — wired into LLC router
✅ Tests in `autobot-backend/llc/tests/test_goals.py` — 14 async unit tests covering all paths; all files pass `py_compile`
Activity
mrveiss commentedon May 23, 2026
✅ Closed — GH#8212 implemented and merged
Merge commit: `309108ab2` → `Dev_new_gui` (PR #8451, 2026-05-23T09:41:17Z)
Acceptance Criteria Met:
Code review (MVA-821): 4 blocking findings identified and resolved by author in commit `e1de2d4b1` before merge.
mrveiss commentedon May 23, 2026
Implemented and merged via PR #8451 (merged 2026-05-23T09:41Z). Closes GH#8212.
mrveiss commentedon May 23, 2026
✅ Closed — implemented and merged via PR #8451 (commit `309108ab` → Dev_new_gui, 2026-05-23T09:41Z).
Acceptance Criteria Met: