Skip to content

Remove the greenfield flow: a build always extends the existing codebase - #1689

Merged
suleimansh merged 1 commit into
mainfrom
remove-greenfield
Aug 24, 2026
Merged

Remove the greenfield flow: a build always extends the existing codebase#1689
suleimansh merged 1 commit into
mainfrom
remove-greenfield

Conversation

@suleimansh

Copy link
Copy Markdown
Contributor

Rom's review on #1683 (inline on build_prompt.md): the greenfield prompt's goal is unclear — remove it and tree-shake. This does that.

What's removed

  • prompts/build_prompt.md + prompts/scaffold_prompt.md (and their SPECs) — the ai-autopilot-era empty-folder flow: "build this app end to end" and the Loop can't recover an empty/unbuilt workspace: 'improve' framing blocks scaffolding #182 "create it from scratch NOW" retry. A TF project is a repo that already exists; no product path leads a build agent into an empty workspace.
  • isWorkspaceEmpty and its helpers — the check existed only to pick greenfield vs extend.
  • agent.ts: the Loop can't recover an empty/unbuilt workspace: 'improve' framing blocks scaffolding #182 scaffold-retry block, and the opening-prompt fork — a build now always opens with extendPrompt. The fake driver (whose workspace always read empty, so it always took the greenfield path) now gets the extend framing too, so the tests exercise the one real path.
  • The three greenfield tests; the fake-driver trigger matchers moved from the build wording to the extend wording, which live-asserts the new opening.

steps.ts is now just extendPrompt over the compiled template. Specs updated: steps.SPEC.md, steps.test.SPEC.md, prompts/SPEC.md, prompts/README.md.

Tests

Full suite green: 1581 node tests (5 greenfield tests removed) + 827 dashboard tests; pnpm typecheck clean. Repo-wide grep finds zero remaining references to the removed symbols or files.

🤖 automated

…base (#1683 review)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@suleimansh

Copy link
Copy Markdown
Contributor Author

@brillout greenfield removed as requested

@suleimansh
suleimansh merged commit 61ad1eb into main Aug 24, 2026
2 checks passed
@suleimansh
suleimansh deleted the remove-greenfield branch August 24, 2026 13:53
suleimansh added a commit that referenced this pull request Aug 24, 2026
…is gone (#1683 review) (#1691)

With the greenfield flow removed (#1689), `prompts/extend_prompt.md` was a second place
where the user prompt got framed — beside the `# User prompt` slot that
`prompts/system_prompt.md` already provides for exactly that — and it said nothing the
system prompt did not: "in this workspace" is the Workspace section, "existing codebase"
is what a project is, and the closing summary it asked for feeds nothing (the PR body
comes from the `open-pr` block).

A build and a prompt session now open the same way: the text rendered through the
system prompt's user-prompt slot (`renderSystemPrompt(...).user`); vanilla, transparent
and continuations stay verbatim. `steps.ts` and the prompt file go with their specs;
`agent.SPEC.md` also drops the greenfield sections #1689 left behind.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant