Skip to content

afx: surface architect↔builder ownership (spawned_by_architect) in status + a queryable filter #1057

Description

@waleedkadous

Problem

afx status lists every builder in a workspace but does not show which architect spawned each one. In multi-architect workspaces this makes ownership-scoped operations (cleanup sweeps, PR-close, messaging) error-prone. Example: the Shannon workspace currently runs 8 architects (main, feedback, reflection, cost, users, onboarding, admin, notif) and ~17 concurrent builders. An architect doing a cleanup sweep must only touch their own builders — but afx status gives no way to tell whose is whose.

The data already exists and is correctly populated: <workspace>/.agent-farm/state.dbbuilders.spawned_by_architect (Spec 755). It's simply not exposed through the CLI. Today the only way to answer "is this builder mine?" is a raw sqlite3 query against an internal table:

sqlite3 "$(pwd)/.agent-farm/state.db" \
"SELECT id, spawned_by_architect FROM builders ORDER BY spawned_by_architect, id;"

That's brittle (internal schema, no stable contract) and easy to get wrong — exactly the cases where getting it wrong means touching a sibling architect's in-flight work.

Ask

Surface the architect↔builder mapping through the CLI:

  1. afx status — add an owner (spawning-architect) column to builder rows. Group or sort by owner when multiple architects are present.
  2. Machine-readable outputafx status --json so tooling/agents can filter on spawnedByArchitect without scraping the human table.
  3. Ownership filterafx status --architect <name> (or afx builders --mine) to list only one architect's builders. Bonus: resolve the current architect's name from its terminal session so --mine needs no argument.

Why it matters

Cleanup, PR-close, and afx send sweeps must be scoped to the spawning architect (siblings' builders are hands-off). Making ownership a first-class, queryable part of afx status removes the need to hand-query an internal SQLite table and prevents cross-architect mistakes.

Filed from the Shannon workspace (cluesmith/shannon) by the main architect.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/towerArea: Tower server / agent farm CLI

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions