Skip to content

Long-term: migrate the pm stack into Supabase — refactor component state into schemas for central management #3142

Open

Description

@dezren39

Long-term tracker: migrate the pm stack into Supabase and refactor its parts into schemas for central management

Drew asked for this as the long-term tracking issue (2026-10-31). The pm stack (aggregator, fleet feed, dashboard, orchestration, dispatch, usage hub) grew up as local files and laptop-local stores. The direction, proven piece by piece on 2026-10-31, is: state lives in Supabase (muse-dev2) in domain-appropriate schemas, components read/write the database, and local files become caches or exports — never the only copy.

Where things stand (verified 2026-10-31)

Already Supabase-backed:

Still local-only:

  • Orchestrator working state: orchestration.json / orchestrator-state.json / orchestrator-log.md (goal workspace hidden_files) — the dashboard reads these files.
  • Aggregator actions store + comments store (laptop-local) — Drew's dashboard triage actions and comments.
  • Fleet-feed JSON pipeline (collector -> scp -> laptop aggregator serving JSON files).
  • Backlog markdown files the orchestrator reads (backlog-*.md in the goal workspace).

Scope (phased, each phase its own implementation issue)

  1. Orchestration state: move tier/classification state + run log to Supabase tables (automation schema or a dedicated pm schema); orchestration.json becomes a generated export for the dashboard contract (impl(aggregator): slice 2 — mobile, needs-Drew/needs-orchestrator tiers, time-granular roadmap, session clarity #898 shape preserved).
  2. Aggregator stores: actions + comments into Supabase with the same apply/result semantics (design+impl(aggregator): triage actions on /attention - acknowledge, snooze, escalate, answer - orchestrator-mediated #1152/impl(aggregator): 'request status change' action on project/board cards - orchestrator applies it as single writer #1154/impl(aggregator): session actions from /sessions and /attention - poke, answer, stop - keeper/orchestrator-mediated #1156 contracts preserved); the laptop aggregator reads/writes the DB.
  3. Feed pipeline: fleet-feed snapshots land as DB rows first; the served JSON is derived, not transported.
  4. Backlogs/queues: backlog state derived from DB + GitHub instead of hand-maintained markdown (markdown becomes a view).
  5. Central management: one schema map (pm-stack/SHARED-SCHEMA-MAP.md, with the migration plan at pm-stack/SHARED-SCHEMA-MIGRATION-PLAN.md), one place to inspect/pause/repair every component's state.

Non-goals / constraints

Related: #2767, #2768, #2796, #898, #899, #910, #2155.

Phase implementation issues (filed 2026-11-03, task 8438):

Activity

  1. added
    epicMeta-issue grouping multiple items (org Project Type=Epic)
    on Oct 31, 2026
  2. dezren39 commented on Oct 31, 2026

    @dezren39
    MemberAuthor

    Direction from Drew (2026-10-31, main chat, deciding #941): this migration starts NOW and starts in Supabase. Order of work:

    1. First slice: the aggregator's identity/provenance + comments/actions data goes into Supabase (muse-dev2) as part of the aggregator(dashboard): comment API accepts self-asserted author identities — anyone can post as Drew into the orchestrator/GitHub flow (PR #920) #941 fix (accept + attribute design: tailscale identity/IP/client details stamped server-side; operator tokens + login session foundation stored there).
    2. Then move the rest of the aggregator's tables after, in the phases this issue already lays out — the comments/actions migration is the pilot that proves the pattern (single-writer rules and the impl(aggregator): slice 2 — mobile, needs-Drew/needs-orchestrator tiers, time-granular roadmap, session clarity #898 dashboard contract shape still hold).

    No big-bang change; this note only fixes the starting point and the order: Supabase first, comments/actions + identity first, rest of the tables after.

  3. added
    queue/queuedHas a queued task in the Supabase agent queue
    source/creatorFiled by the new-issue-creator job
    task/triageQueue packet kind: verify, reproduce, and route this item
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    and removed
    queue/claimedQueue worker lifecycle state
    on Nov 3, 2026
  4. 1 remaining item

  5. added
    queue/claimedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 3, 2026
  6. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

  7. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done

  8. developing-today commented on Nov 3, 2026

    @developing-today
    Contributor

    agent-note:v1
    state: triaged (coverage pass)
    Coverage pass 2026-11-03: reviewed in the fleet-wide per-issue pass (drift / overlap / already-handled / stale / blockers / ordering). Verdict: still live; queued in repo-health-code-pilot as triage at priority 30 (priority/none). If this is already handled at current main, the triage closes it with evidence; if it needs splitting, the triage files the split.
    Found via: coverage pass 2026-11-03

  9. removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 3, 2026
  10. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · triaged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

epicMeta-issue grouping multiple items (org Project Type=Epic)source/creatorFiled by the new-issue-creator jobtask/triageQueue packet kind: verify, reproduce, and route this item

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions