Public: anyone can read this; the crew can change it.

Build your team: the crew card shows auto mode and the three pillars, and warns when one is empty #7774

opened this in answer to

Merged 31d 1h ago, live in production

Settings › Crew now opens with a "Your team" card showing the three pillars. The MCP crew tool returns the same pillar state, so the page and agents agree. tsc, design-lint, and the touched tests (review-waits, mcp-crew, mcp-size, crew-settings-doors) pass.

Notes

opened this

Settings › Crew now opens with a "Your team" card showing the three pillars. The MCP crew tool returns the same pillar state, so the page and agents agree. tsc, design-lint, and the touched tests (review-waits, mcp-crew, mcp-size, crew-settings-doors) pass. I ran only those tests, not the full suite, and I haven't looked at the card in a browser, so the phone-width layout is unchecked.

  • Card:
    • A line says whether auto mode is on (and which mode) or off.
    • Each pillar (planner, builder, reviewer) shows who fills it and one plain line on what it does.
    • With auto mode on, an empty pillar shows "No <role>: <what won't happen>." The reviewer line is the old noReviewer text, so it now lives only here.
    • With auto mode off, an empty pillar reads "open seat" with no warning.
    • An admin gets one button per empty pillar, "Put <agent> on <role>". It posts agent and role to the existing crew-add route, which now sets the role if one is given. If no agent is free, a forge admin gets "Add an agent" instead.
  • One source: src/crew/pillars.ts (pillarsOf) feeds both the card and a new team field on the MCP crew list answer. No new tool, and mcp-size still passes.
  • Tests: new ones cover the MCP team field, the warning and invitation states, and the button setting the role. The existing settings assertion in review-waits still holds.
  • Docs: docs/features/team.md.

Left out:

  • The "auto mode" switch itself still lives in the "On its own" card, so the team card only points to it.
  • The button fills the first free agent. It doesn't let you pick an agent, since the roster below already does that.
  • The per-app rail card in studio/app.ts is unchanged.
  • #7637 (acting on a direction with no planner) is untouched.

Closes #7643

5 earlier comments
commented

Settings › Crew now opens with a "Your team" card showing the three pillars. The MCP crew tool returns the same pillar state, so the page and agents agree. tsc, design-lint, and the touched tests (review-waits, mcp-crew, mcp-size, crew-settings-doors) pass. I ran only those tests, not the full suite, and I haven't looked at the card in a browser, so the phone-width layout is unchecked.

  • Card:
    • A line says whether auto mode is on (and which mode) or off.
    • Each pillar (planner, builder, reviewer) shows who fills it and one plain line on what it does.
    • With auto mode on, an empty pillar shows "No <role>: <what won't happen>." The reviewer line is the old noReviewer text, so it now lives only here.
    • With auto mode off, an empty pillar reads "open seat" with no warning.
    • An admin gets one button per empty pillar, "Put <agent> on <role>". It posts agent and role to the existing crew-add route, which now sets the role if one is given. If no agent is free, a forge admin gets "Add an agent" instead.
  • One source: src/crew/pillars.ts (pillarsOf) feeds both the card and a new team field on the MCP crew list answer. No new tool, and mcp-size still passes.
  • Tests: new ones cover the MCP team field, the warning and invitation states, and the button setting the role. The existing settings assertion in review-waits still holds.
  • Docs: docs/features/team.md.

Left out:

  • The "auto mode" switch itself still lives in the "On its own" card, so the team card only points to it.
  • The button fills the first free agent. It doesn't let you pick an agent, since the roster below already does that.
  • The per-app rail card in studio/app.ts is unchanged.
  • #7637 (acting on a direction with no planner) is untouched.
commented

The failing check was docs/MCP.md's generated tool table, which had gone stale when I added the team field to the MCP crew tool. I regenerated it with bun scripts/mcp-tools.ts and pushed the result.

Locally, test/mcp-size.test.ts and test/mcp-crew.test.ts pass. I did not run the exact test the check named, "docs/MCP.md's tool table is current". I did run the three test files that match MCP.md (184 tests) and they pass, but those weren't the file named in the failure. I did not run the full suite. scripts/fast.ts named 965 of 1690 test files for this diff, which would take about 84 minutes, so I left that to the forge's check on the new push.

Nothing in the app or its tests changed in this commit. The pull description from my earlier message still holds.

commented

Parked by the crew: the check failed ("a cold plan names its stretches, stays under 50 ms, and keeps each limb's counts") and the decider saw no point in another try try 1: docs/features/team.md, src/crew/pillars.ts, src/http/mcp/tools/crew.ts, src/web/pages/crew-settings.ts (+4 more) try 2: docs/MCP.md

commented

Nothing new to push. The branch is already pushed, and bun x tsc --noEmit is clean. I ran the six test files for this change, plus the MCP docs test, and all 53 tests pass.

The check failure that parked this was "a cold plan names its stretches, stays under 50 ms". I did not run that test here. As you said, it is a timing budget that looks like load (#7789), so I left it alone and changed no timing code. If it fails again on that test alone, that is #7789's problem and not this change's.

What changed

  • The crew card in settings (src/web/pages/crew-settings.ts) now shows auto mode and the three pillars. It warns when a pillar has no one on it. The pillar logic is in src/crew/pillars.ts.
  • The MCP crew tool (src/http/mcp/tools/crew.ts) returns a team field, so an agent reaches the same facts. docs/MCP.md is regenerated to match, and docs/features/team.md is updated.
  • Tests in test/pillars.test.ts, test/plan-pillars.test.ts, test/mcp-crew.test.ts and test/crew-teams.test.ts cover the pillar logic, the plan route, the MCP field and the team pages.

Left out

  • I ran no unrelated tests. scripts/fast.ts named 965 of the 1,690 test files, which is too broad, so I picked the six that cover this change. The forge runs the full check on the push.
  • No new dependencies.

To try it

  • Open the crew settings page and read the crew card.
  • Call the crew MCP tool and read its team field.
commented

The crew card now shows the three seats on the page, in the terminal and in the MCP, with the review fixes in; the push is up for the check. I ran 715 tests across the crew, palette, about, MCP and docs files. One error was in crew-sandbox-real.test.ts, which needs rg, missing in this sandbox. Nothing failed. bun x tsc --noEmit and bun scripts/design-lint.ts are clean.

I ran the full file set for this change but not the whole suite. The earlier parked check ("a cold plan names its stretches, stays under 50 ms…") is in code I didn't touch. I merged main in, which may be what clears it; if it fails again the log will say.

What changed, by review point

  1. Terminal. The About card (I) has a row per seat. p puts the first free agent on the first empty seat, for an admin who is a person. The README and docs/features/team.md say so, and the new test/crew-seats.test.ts covers it, including that a non-admin sees no p.
  2. Naming. src/crew/pillars.ts is now src/crew/seats.ts with seatsOf. The MCP crew field is seats, and docs/MCP.md is regenerated.
  3. Tests. test/crew-seats.test.ts covers:
    • The state logic for auto off, auto on and crew off.
    • A filled seat.
    • The rendered form: right agent, right role.
    • No button for a non-admin.
    • An agent already on the crew keeping its role.
  4. Preview. seatsOf(db, repo, crewOff) makes empty seats invite instead of warn when the crew is off. The page and the MCP both pass crewOffInPreview().
  5. Design. The <b>, <br /> and muted span are gone. A seat is now a row with a plain title, a plain-text meta line, and a badge plus the button in the trail.
  6. Behaviour change, on purpose. The old "No reviewer" note under On its own showed only for autonomous, and #no-reviewer is removed. The reviewer seat now warns in every mode except off. I kept this and wrote it up in docs/features/team.md rather than restoring the old condition. Say if you want the autonomous-only rule back.
  7. crewAdd. addToCrew takes an optional role and sets it only when the agent joins now, so the silent overwrite is gone.

Left out

  • The terminal's p picks the first free agent alphabetically and has no picker.
  • Changing the role of an agent already on the crew still goes through its own role control.

Try it

  • Open Settings › Crew on a repository you administer.
  • In the terminal, open the About card on a repository and press p.
  • Call the MCP crew tool and read seats.
commented

The failing check is fixed and pushed as d948ab34.

Cause: the About screen in the terminal gained a "put an agent on planner" key hint. It pushed the admin's e egress hint off the end of the hint line, so the egress test no longer found it.

Fix: in src/tui/screens/about.ts, the seat button now reads fill <role> and sits last, just before esc. The e egress and c connections hints keep their place.

Checks run:

  • test/tui-egress.test.ts and test/crew-seats.test.ts pass.
  • All 915 tests in test/tui-*.test.ts pass.
  • bun x tsc --noEmit printed nothing in its tail.
  • I did not run bun scripts/gate.ts, scripts/fast.ts or the full suite. The forge runs the full check on this push.
Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs