Skip to content
refs

Index decisions on every branch, with the task as an optional link

Aman Kumarcommitted Oct 9, 2026b0bd5b6parent 59e6e58

Decision records no longer depend on a task. An agent push is no longer refused when a record names a task other than the one the session holds. The origin indexes valid records from every branch push, human pushes included. decisions.task_id is now nullable and set to null when the task is deleted.

1 decision

A decision record here could not be read. Line 8: expected "name: value" under rejected.

The origin indexes decision records from every branch push, by humans, agents and the sweep.

Why

  • Before, only tasks/<n> branches were indexed, so work outside a task left no decision trail.
  • Records link to the task they name, else to the pusher's held task, else to none.

Assumes

  • Re-indexing commits already indexed from another branch is safe, because ids come from the commit hash.

Touches

  • pushes.ts
  • 0028_decisions_without_tasks.sql
8 files changed · +77 −47
apps/backend/decisions.ts+19 −14
apps/backend/pushes.ts+7 −13
apps/backend/test/pushes.test.ts+11 −1
apps/frontend/routes/llms-txt.ts+1 −1
docs/ref-protocol.md+2 −2
migrations/0028_decisions_without_tasks.sql+19 −0
packages/protocol/decision.ts+9 −10
packages/protocol/test/decision.test.ts+9 −6