Goals
Persistent, long-horizon outcomes tracked as one YAML file per goal under workspace/goals/, independent of any conversation.
2 min read
Goals represent long-horizon outcomes with lifecycle management, progress tracking, and prioritization. They exist independently from conversations — a goal survives session restarts, provider changes, and workspace relocation because it is just a file.
The engine lives in packages/goals/src/index.ts as
FilesystemGoalStore and GoalEngineImpl, wired together by createGoalEngine(storage).
Principles
- File-first. One YAML file per goal under
workspace/goals/. - No database required. Goals work at Level 1 on the filesystem alone.
- Linkable. A goal can reference kanban tasks, automations, and assigned agents.
File layout
workspace/goals/
project-refactor.yaml
learn-golang.yaml
_index.yaml # optional explicit orderingSchema
apiVersion: anvio.io/v1
kind: Goal
metadata:
slug: project-refactor
createdAt: '2026-06-01T00:00:00Z'
updatedAt: '2026-06-19T08:00:00Z'
spec:
title: Finish software project refactor
description: Migrate monolith modules to packages with tests
status: active # active | paused | completed | archived
priority: high # critical | high | medium | low
progress:
percent: 35
milestones:
- name: Extract core package
completed: true
completedAt: '2026-06-10'
- name: Migrate agents package
completed: false
assignedAgents:
- architect
linkedTasks:
- kanban/task-001
dueDate: '2026-08-31'Lifecycle
GoalEngineImpl exposes create, updateProgress, complete, pause, resume, and
prioritize. complete() sets status: completed and forces progress.percent to 100.
Prioritization
FilesystemGoalStore.sortGoals() orders goals by, in order:
- Explicit
priority(critical>high>medium>low). dueDateascending (when both goals set one).- Position in
workspace/goals/_index.yaml(kind: GoalIndex). metadata.updatedAtdescending.
The _index.yaml order is maintained automatically — create() appends new slugs, delete()
removes them, and prioritize(slugs) rewrites the full order.
Integration points
| System | Integration |
|---|---|
| Kanban | Tasks link via linkedTasks; tasks link back via linkedGoal. |
| Automation | Automations can target a goal slug. |
| Souls | A soul's long-term goals may sync with goal files. |
Recover a deleted goal
Goal files are plain YAML in your workspace. If you delete one by mistake and the workspace is under git, restore it from history — there is no separate trash or soft-delete.
TODO: The CLI verbs in
docs/26-goal-system.md(anvio goal create,anvio goal progress, etc.) and theGOAL_*event subjects describe the intended surface. Verify each against the currentapps/cli/srccommand table before treating them as stable — the engine API inpackages/goals/src/index.tsis the authoritative contract.
Last updated on