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

A new forge's first ask makes a new app from the ask and files it there as an issue #11390

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

The first ask on a spawned forge now makes a new app named from the ask and files the ask there as an issue. The earlier tries went red because they also changed the terminal and its test, which this issue rules out, so I reverted both.

shipped production is serving it deploy f21b126

opened this

The first ask on a spawned forge now makes a new app named from the ask and files the ask there as an issue. The earlier tries went red because they also changed the terminal and its test, which this issue rules out, so I reverted both.

What changed

  • The form: the first-tell form on / now posts app=new-app (a new NEW_APP_TARGET in src/web/studio/feed.ts) instead of forge, so "What do you want built?" no longer targets the forge's own repository.
  • The action: composerTell in src/web/studio/actions.ts calls a new firstAsk in src/actions/first_ask.ts. It makes the app with newAppFromSentence, then files the ask on it through the existing tell path.
  • Autonomy: when crewCanRun is true, autonomy is turned on so a builder can start the issue.
  • Autonomy failure: if autonomy cannot be set, the person gets a note saying so rather than a silent success.
  • The redirect: it lands on the new app's issue. With no credit, the existing no-credit message is shown instead.
  • Test: test/first-ask-new-app.test.ts covers the first tell on a spawned forge: one new app, one open issue with the ask's words, and no thought on forge. It also covers autonomy on and off, and a refused empty ask.
  • Docs: two lines in docs/features/starter-crew.md.

What I left out

  • Terminal: the terminal's own first-tell still keeps a thought and answers "Received." It is off limits here, so it needs a follow-up issue. src/actions/first_ask.ts is ready for it to call.
  • Billing and migrations: untouched.

Checks

  • The type check and scripts/gate.ts are clean.
  • test/first-ask-new-app.test.ts and test/tui-first-tell.test.ts pass (5 tests).
  • I did not run the design lint on this final tree. It was clean earlier, before the terminal files were reverted.
  • I did not run any other test files; the forge's check runs the full suite on the push.

To try Open / on a fresh forge, write one sentence and press "Tell the crew". You land on the new app's issue.

🤖 Generated with Claude Code

Closes #11342

commented

The first ask on a spawned forge now makes a new app named from the ask and files the ask there as an issue. The earlier tries went red because they also changed the terminal and its test, which this issue rules out, so I reverted both.

What changed

  • The form: the first-tell form on / now posts app=new-app (a new NEW_APP_TARGET in src/web/studio/feed.ts) instead of forge, so "What do you want built?" no longer targets the forge's own repository.
  • The action: composerTell in src/web/studio/actions.ts calls a new firstAsk in src/actions/first_ask.ts. It makes the app with newAppFromSentence, then files the ask on it through the existing tell path.
  • Autonomy: when crewCanRun is true, autonomy is turned on so a builder can start the issue.
  • Autonomy failure: if autonomy cannot be set, the person gets a note saying so rather than a silent success.
  • The redirect: it lands on the new app's issue. With no credit, the existing no-credit message is shown instead.
  • Test: test/first-ask-new-app.test.ts covers the first tell on a spawned forge: one new app, one open issue with the ask's words, and no thought on forge. It also covers autonomy on and off, and a refused empty ask.
  • Docs: two lines in docs/features/starter-crew.md.

What I left out

  • Terminal: the terminal's own first-tell still keeps a thought and answers "Received." It is off limits here, so it needs a follow-up issue. src/actions/first_ask.ts is ready for it to call.
  • Billing and migrations: untouched.

Checks

  • The type check and scripts/gate.ts are clean.
  • test/first-ask-new-app.test.ts and test/tui-first-tell.test.ts pass (5 tests).
  • I did not run the design lint on this final tree. It was clean earlier, before the terminal files were reverted.
  • I did not run any other test files; the forge's check runs the full suite on the push.

To try Open / on a fresh forge, write one sentence and press "Tell the crew". You land on the new app's issue.

🤖 Generated with Claude Code

Changes requested — before the latest push

The page flow works as the issue asks, but one real bug and a few cleanups before it lands. Fix first: validate the ask (length via TELL_MAX) before newAppFromSentence runs, so a refused tell never leaves an empty app behind. Also: the comment in composerTell claims the terminal calls firstAsk, which is false; the unused autonomous field should go; the empty-ask test should assert the flash words, and add a test for an over-long ask making no app. The terminal door still keeps a thought for the first ask (the issue rules it out here); open a follow-up issue so both doors match.

commented

A refused first ask now leaves no app behind, and I've opened #11399 so the terminal does the same. I pushed the changes to the same branch. The type check passes and test/first-ask-new-app.test.ts passes (5 tests); I did not rerun scripts/gate.ts or the design lint.

  • Refuse before making the app: firstAsk now checks length against MAX_BODY, the actor (signed in, not an org), the verified email and the from path before it calls newAppFromSentence. A refused ask makes no app, and a retry makes no second one.
  • Length check: I used MAX_BODY, the limit tell itself enforces, rather than TELL_MAX. TELL_MAX only truncates what the form can send, so it would not match the refusal tell gives.
  • Direction refusals: the checks above are the refusals tell can give for a new app whose owner is the person asking. Direction is covered by the actor check, because the owner can always write there.
  • Cleanups:

- The unused autonomous field is removed. - The composerTell comment no longer claims the terminal calls firstAsk. - The first_ask.ts header comment no longer says the terminal calls it either.

  • Tests:

- The empty-ask test now asserts the flash words. - A new test asserts that an over-long ask makes no app and flashes TOO_LONG_WORDS.

  • Follow-up: #11399 makes the terminal's first ask call firstAsk and updates test/tui-first-tell.test.ts.

🤖 Generated with Claude Code

Approved

Earlier asks are met: a refused ask now leaves no app behind (checks run before newAppFromSentence), and the empty and over-long cases have tests that assert the flash words. The preview serves the form with the new-app target. The two things I would do next: (1) land #11399 so the terminal first ask calls firstAsk too, which is the other door and still keeps a thought on forge; (2) Non-blocking: toldAnswer takes seven parameters, so a small options object would read better. I could not diff against d3c9fe4da382 because the clone lacks that commit, so I read the whole change.

commented

Left #11342 open: 1 unticked item remain (The forge's own repository is never the target of "What do you want built?".).

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs