Skip to content

Retire Squadrons and fold their J5 behavior into projects (decided) #412

Closed

Description

@Jacksondr5

Status: decided on 2026-10-05. Squadrons are being retired. The text below is the original proposal, kept as written. Current status and what other users need to do are in this comment.

The question

Should J5 retire the Squadron as a concept separate from upstream's project, and attach the J5 behavior that hangs off Squadrons (the A2A ledger, Exchanges, placement, Crews, the Fleet page) to projects instead?

Why this came up

A new-thread UX question (the Squadron picker opening before every new thread) kept turning into a question about the Squadron itself. The Squadron was meant to work like an epic that spans several folders, which doesn't fit upstream's one-folder-one-project model. Multi-folder support was deferred, and so far there's no need for it. Meanwhile, keeping the Squadron mechanically separate from (though built on) projects has real costs:

  • Settings. Projects are hidden everywhere except settings, so the person meets a noun there that the rest of the app never shows them.
  • Shared projects. Two Squadrons can reference one project. That is a class of bugs upstream's model doesn't have, and a case no one uses.
  • Fork cost. 19 of the 58 cases in FORK.md touch Squadrons, including the largest new-thread seams (16, 19). Four entries in the register of divergences (D8–D11) exist only because a Squadron isn't a project. D11 is why scheduled tasks created in the UI can't start threads.
  • Open work. Around 15 open issues exist only because of the split (listed below).

The use case the Squadron was built for, several separate efforts on one repository, can already be covered inside one project by separate sets of agents and Crews. It isn't clear we'd outgrow that.

What we found

Measured against one live install, read-only:

  • Every Squadron references exactly one project. No project is shared by two Squadrons. No thread sits in a project its Squadron doesn't reference.
  • About half the live threads have no Squadron home. That looked like a bug, but isn't:

Measured against upstream (our pin 67a2be0 and current main 6414268):

  • Upstream allows one active project per folder. Retiring Squadrons loses "two separate efforts over one repository, each with its own name." Today that only exists as an unused capability.
  • A thread's project is fixed when the thread is created. projectId is set only by thread.create; thread.metadata.update can't change it. Drafts can change project before their first send, client-side only. So the Registrar's rule that "a home never changes" maps directly onto a thread's project.

Upstream now has threads without a project

Upstream merged these after our pin, so they arrive with the next upstream advance:

Why this matters for the proposal:

  • Another reason to fold.

    • Under projects, these features arrive as upstream built them.
    • Under Squadrons, every no-project thread needs a Squadron home, or send refuses. Supporting it means one of three things, each new fork work:
      • an automatic Squadron for the "No project" project, which the Squadron definition forbids (no default "junk drawer");
      • letting these threads go without a home, which leaves them out of the ledger and every Squadron filter;
      • hiding the feature.
  • It lands on Squadron seams. The PR rewrites:

    • DraftHeroHeadline, which J5 replaces wholesale (D8);
    • the palette's New thread in... list;
    • the new-thread shortcuts in _chat.tsx;
    • the no-projects screen;
    • mobile's new-task picker.

    The next advance conflicts on all of them either way. Under Squadrons, each one also has to be converted again.

  • It closes a gap D9 records. Requiring a folder rules out non-coding work. "No project" and name-only projects cover that upstream.

  • Upstream keeps the picker on "+". The new-thread friction that started this discussion is upstream's too.

If we fold, things to decide about no-project threads:

  • Accept upstream's default container? "No project" is the unnamed default the Squadron definition rejected as a junk drawer. It's probably fine, since upstream aims it at throwaway work, but it reverses a recorded decision and should be named as one.
  • One shared partition. All no-project threads on an environment share one project. That means one ledger partition and one Fleet group. Under upstream's same-project rule, agents in unrelated scratch threads could also archive each other or merge back.
  • Peer Agents and Crews started from a scratch thread. They would land in "No project". Whether they share the parent's folder or get their own depends on what spawn_agent passes (see spawn_agent puts every Peer Agent in the caller's branch and worktree #274). Not yet checked.
  • Hidden in J5 dev servers. Upstream withholds the feature when the home is inside a Git checkout, which is the case for a worktree's .j5code. Testing it needs a home outside a checkout.

What the change would be

  • Projects become the unit the person picks, filters by, and organizes around, as they are upstream. The J5 UI built for Squadrons goes back to upstream's project UI:
    • Create Squadron
    • the first-run Squadron gate
    • the welcome wizard's Squadron stage
    • the sidebar Squadron scope
    • the Squadron picker, draft chip and headline
    • the Squadron label on thread cards
  • J5 features re-key from Squadron to project:
    • the A2A ledger, Exchanges and the placement tree
    • Crews
    • the Fleet page
    • Peer Agents inheriting their spawner's home, which already lands them in the spawner's project
  • Agent-to-agent communication stays unbounded. "Never a boundary on communication" still holds; nothing about it depends on the Squadron.
  • Archive and merge-back checks collapse into upstream's existing same-project rule.
  • Removed: list_squadrons and join_squadron. Every thread already has a project.
  • Docs: the Squadron product definition is retired. The glossary, overview and register entries D8–D11 are rewritten. The FORK cases that exist only for Squadrons are removed as their code goes.

Lost:

  • Multi-folder Squadrons (Squadrons can target more than one folder #356).
  • Several named efforts over one folder.
  • The Squadron name as a fleet-native noun. Keeping "Squadron" as a UI label on projects would keep paying the fork cost D8 justified only by the many-to-many shape.

Migration (has to work for every live install)

J5 is live for more than one person, so this would need a migration that runs on each environment's server against data we can't see. Cases it would need a rule for:

  • One Squadron, one project. The normal case: the Squadron's ledger, memberships, placement and Crews move to the project.
  • Several Squadrons on one project. Merge their ledgers into the project, refuse to migrate, or something else? Their names would be lost or need a home.
  • One Squadron with several projects. The UI caps creation at one folder, but the server's create path accepts a list.
  • A Squadron whose project was deleted.
  • A Squadron name that differs from its project's title. Keep the project title, or offer to rename the project?
  • Threads with no home (mobile-created, the startup auto-bootstrap thread in Web-mode auto-bootstrap creates a Squadron-less project thread at startup #287). Backfill ledger membership, or register on first A2A use?
  • Mixed versions. Clients read Squadrons from every connected environment (the j5Squadrons capability). The mobile app ships separately and can talk to servers on different versions.
  • One-way. As with the V2 database cutover, it should be safe to snapshot before and roll back by restoring the snapshot.

Open questions

  1. Is "several efforts on one repository" something we want to keep supporting, by some means other than Squadrons?
  2. Should the ledger re-key to project ids, or keep a hidden one-to-one partition per project? Re-keying is cleaner. A hidden partition is a smaller migration, but keeps the separation this proposal is trying to remove.
  3. What should the migration do with shared-project and multi-project Squadrons on other installs?
  4. Do any other installs actually have shared-project Squadrons? Knowing that would settle question 3.
  5. If we keep Squadrons, how should upstream's no-project threads get a home? If we fold, do we accept "No project" as upstream ships it?

Issues this would close or reframe

The new-thread picker change that started this is parked until this is decided. If projects come back, the friction becomes upstream's own (the picker opens when there is more than one project), and any change to it would be a much smaller divergence.

🤖 Generated with Claude Code

Activity

  1. Jacksondr5 commented on Oct 3, 2026

    @Jacksondr5
    OwnerAuthor

    Tracking: #328 (forced Squadron delete) is held open pending this decision. If Squadrons are retired, close #328 without merging, since upstream's forced project delete covers it. #362 (a Squadron's end of life) is answered by the same decision.

    Posted by an AI agent on Jackson's behalf

  2. Jacksondr5 commented on Oct 8, 2026

    @Jacksondr5
    OwnerAuthor

    Decided: Squadrons are being retired and their behavior folded into projects (Jackson, 2026-10-05). No install is known to have two Squadrons on one folder. The work is under way.

    Where it stands (2026-10-08)

    PR What it does State
    #423 A delivery reads its sent event from its own ledger Merged
    #428 A reply to an ask from another Squadron is accepted Merged
    #430 A thread launched without a Squadron joins its project's Squadron Merged
    #429 Automatic database snapshot before the ledger migration Merged
    #431 Scheduled tasks created in the UI start threads again Merged
    #454 The Fleet page, Inbox and thread cards read projects Merged
    #455 New-thread doors and drafts go back to upstream Merged
    #456 Project creation, the sidebar filter and wording go back to upstream Merged
    #457 Onboarding goes back to upstream's three stages Held until the migration PR

    Still to come

    1. Migration and behavior.
      • The ledger re-keys from Squadrons to projects.
      • list_squadrons and join_squadron are removed. Other tools stop taking or returning Squadron ids.
      • Everything a person or an agent sees changes to "project": tool descriptions, message headers, error messages, the playbook author picker, and the j5 a2a command line.
      • Every thread except a provider Subagent is registered when it is created, including imported conversations, now and in future.
    2. Rename what is left in code and tests, with no behavior change.
    3. Docs and the site: the Squadron definition is retired, and the other product docs, user docs, runbooks, AGENTS.md and the marketing site are rewritten.
    4. The upstream sync, as one PR, after all of that.

    What other users need to know

    • Update everything together when the migration ships. After it, a client, desktop app or peer server on an older version refuses to work and shows an "update" message. Nothing is silently wrong, but mixed versions do not work.

    • The server takes a snapshot of its database before the migration runs, beside the database as statev2.pre-j5-<migration number>.sqlite. The restore steps are in docs/j5/runbooks/dogfood-runtime.md.

    • If you ever had two Squadrons on one folder, the migration refuses to run and says so by name. To check now, read-only:

      SELECT project_id, COUNT(*) AS squadrons
      FROM j5_a2a_squadron_project_reference GROUP BY project_id HAVING COUNT(*) > 1;

      No rows means you are fine.

    Decisions from the open questions above

    1. Several efforts on one repository: not kept as a separate concept. Crews and nested agents inside one project cover it.
    2. Ledger key: project ids, with the columns renamed. No hidden Squadron per project.
    3. Shared-project and multi-project Squadrons: the migration refuses a shared project by name. Multi-project Squadrons cannot be created, so nothing handles them.
    4. Other installs: none is known to have a shared project.
    5. Upstream's "No project" threads: accepted as upstream ships them. They arrive with the upstream sync.

    Follow-ups

    Posted by an AI agent on Jackson's behalf.

  3. changed the title [-]Proposal: retire Squadrons and fold their J5 behavior into projects[/-] [+]Retire Squadrons and fold their J5 behavior into projects (decided)[/+] on Oct 8, 2026
  4. Jacksondr5 commented on Oct 8, 2026

    @Jacksondr5
    OwnerAuthor

    Done. The fold is merged to j5/main: #423, #428, #429, #430, #431, #454, #455, #456, #457, #482 (migration 031), #483, #484 and #489 (peer wire, protocol version 2), plus the site in #477. The docs are in draft at #488. The follow-up check that the word is gone is #476.

    Upgrading: a server writes statev2.pre-j5-031.sqlite beside its database before the migration runs. Update the server, desktop app, mobile app and browser tabs together, and update peered servers together. A project that several Squadrons shared stops the server at start-up and names the project; none is known.

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

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions