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

The owner approves the plan: the planner proposes a wave, the owner nods or redirects in one tap #1322

Closed opened this in answer to
Closed without merging

A new repository setting, "Plans need a nod", is in. It is on by default, and with it on the planner proposes a wave and opens no issues. I couldn't run tsc here (no nodemodules), and the full suite can't run in this sandbox.

Notes

stopped closed without shipping deploy 9dade9a

opened this

A new repository setting, "Plans need a nod", is in. It is on by default, and with it on the planner proposes a wave and opens no issues. I couldn't run tsc here (no node_modules), and the full suite can't run in this sandbox. The new test/plan-nod.test.ts (14 tests) and the related suites ran green. To get them running I temporarily swapped the internal unix-socket server for a TCP port, then reverted that before committing. With that swap, the crew-run tests that push through git hooks failed, so they were not exercised. The forge's check will be the first real run of those.

What changed

  • Setting. Beside autonomy in the crew card, stored as repo.plans_need_nod. Only a person can change it; an agent can't.
  • Waves.
    • A wave is a title, a one-line why, the milestone it moves, and three to six issues in order. They are stored in a new wave table.
    • Links, loops and pillar rules are checked when the planner proposes, so the owner never nods at a plan that would fail to open.
    • The crew's POST /api/v1/repos/:owner/:name/plan (and the MCP plan) now returns the proposal. Nothing opens.
    • A person's own plan still opens at once.
    • While a wave is waiting, planIfThin doesn't ask the planner for another.
    • The planner's brief now says how to propose.
  • Inbox. One card per wave, with its issues listed in order. Approve opens the issues linked as the proposal named, with the first one ready. Redirect takes a text box. Later sets it aside. Each is one form post to POST /:owner/:name/waves/:wave/decide.
  • Redirect. The owner's words go on the direction issue as a comment, and the planner is assigned to it. The planner's task prompt already includes that thread, so the words are in its prompt. The test checks this with taskPrompt.
  • Map. Once a repository has waves, /map shows rows grouped by milestone, with each wave's issues and "N landed, M left". ?graph=1 is the full graph, with a link back.
  • MCP.
    • plan without issues lists the waves waiting.
    • The new decide tool takes {app, wave, decision: approve|redirect|later, words?}.
    • There are matching REST routes for waves, and docs/MCP.md and docs/PLANNING.md are updated.
  • Existing tests. I added decide to the expected tool list in test/mcp.test.ts, which was a legitimate change. I also registered the new test in scripts/gate.ts.

Left out

  • Dismissing or bulk-acting on wave cards. Bulk actions refuse them.
  • The board's strip and the phone page don't mention waves.
  • The planner is not stopped from opening raw issues through the issue API. The nod is enforced on the plan route and in the brief, not on every issue-creating route.
  • Setting the nod to off for existing repositories. The new column defaults every existing repository to on.
  • There is no test for the "no new planner run while a wave waits" guard in planIfThin.

Try it Put a planner on a repository's crew and set a direction. Have the planner POST …/plan a wave with title, why, milestone and issues. The home inbox then shows the card. Approve it, and /alice/garden/map shows the wave under its milestone.

🤖 Generated with Claude Code

Closes #1114

2 earlier comments
commented

This pull now merges with main again, and I've pushed the fix. I couldn't run the HTTP-server tests here, so that part is unchecked.

What changed: the merge conflicted in src/core/schema.ts. Main had taken migration 73 for the MCP OAuth oauth_code table, the same slot as this pull's plans-need-nod migration. I kept main's migration as 73 and moved the plans-need-nod migration to 74. The migration adds the repo.plans_need_nod setting (default on) and the wave table. I merged origin/main into the branch and left the rest of the pull as it was.

Tests: the schema and migration tests, schema-additive.test.ts and schema-migrations.test.ts, pass. The tests that start the HTTP server fail in my sandbox with EPERM when binding their unix socket, so I could not run them. That covers plan-nod, planner-declined, plan-pillars and crew-brief-audience, which are all in the group that fails to bind. A full bun test run here gave 524 failures, and the ones I checked all had this same cause. The forge's own check should show whether those pass.

How to try it: open the preview and check that a repository's planner wave shows up as a proposal the owner can approve, redirect or set aside.

commented

I merged current main into the branch and pushed. The check had failed because src/http/api.ts conflicted with main.

  • Conflict: main moved the plan route onto parsePlan and openPlan. This branch had put submitPlan in the same handler. I kept submitPlan, which already calls those two functions through src/actions/waves.ts. I also kept the waiting-waves list route and the decide route. I removed the parsePlan/openPlan import from api.ts, since nothing there uses it now.
  • What I ran: the plan, wave and API tests: 55 passed and 1 failed. A full bun test was started, but I only read the end of its output (no pass/fail summary), so I don't have a full-suite result. The type check didn't run: tsc couldn't find the bun type definitions here.
  • The failure: test/plan-route.test.ts ("refused with no_pillar, then opens the issues") timed out after 30 s waiting for its output file to appear. I didn't find out why. I didn't confirm it's the sandbox, and I didn't run it on main, so it could still be a real bug in the merge.

The forge's check will show whether that test passes outside the sandbox.

commented

Parked by the crew: the check stayed red through 2 automatic tries

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs