Skip to content

The build-opening prompts live in prompts/ as markdown (#1347) - #1683

Merged
suleimansh merged 2 commits into
mainfrom
build-prompts-as-markdown
Aug 24, 2026
Merged

The build-opening prompts live in prompts/ as markdown (#1347)#1683
suleimansh merged 2 commits into
mainfrom
build-prompts-as-markdown

Conversation

@suleimansh

Copy link
Copy Markdown
Contributor

Closes #1347.

prompts/README.md promised that nothing agent-facing is written in TypeScript, but steps.ts still built three prompts as string arrays (the issue counted four — improvePrompt was already removed with the production-grade gate). Changing what we tell an agent in those cases meant editing code (#1224 was a one-word prompt edit through a TypeScript file).

What changed

  • New prompts/build_prompt.md, prompts/extend_prompt.md, prompts/scaffold_prompt.md — the prompt text moved verbatim, with ${{ tf.prompt }} for the user's intent (the same name the system prompt gives it). Each with its SPEC.md sibling carrying the rationale that lived in the code comments (Support running against an existing project (not just from-scratch) #185's naming-the-workspace point, Loop can't recover an empty/unbuilt workspace: 'improve' framing blocks scaffolding #182's don't-refuse retry, [The Framework] Remove meta-select + the architect #545's stack-is-the-agent's-call).
  • steps.ts keeps the three functions and isWorkspaceEmpty — the functions are now one-line renderTemplate fills over the generated constants, so call sites are untouched.
  • Rendered output is byte-identical to the old strings — verified by direct comparison, and the existing steps.test.ts content assertions all still pass unchanged. Break-checked: editing extend_prompt.md's first line fails the test.
  • prompts/README.md table row added; prompts/SPEC.md and steps.SPEC.md updated — the prompt-content spec now lives with the prompts, steps.SPEC keeps only the choice + fill and the emptiness check.

Tests

Full suite green: 1586 node tests + 817 dashboard tests; pnpm typecheck clean. No behavior change intended, and the byte-identity check says none happened.

🤖 automated

…ery other agent-facing prompt (#1347)

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

Copy link
Copy Markdown
Contributor Author

DRY check — two duplications in this PR:

  1. The per-prompt SPEC.md files paraphrase the prompts they sit next to. build_prompt.SPEC.md's business-logic paragraph restates build_prompt.md nearly clause for clause (scaffold the whole project, package manifest with scripts, install dependencies, one-paragraph summary), and scaffold_prompt.SPEC.md does the same for its prompt. The prompt file is already prose — the reviewable artifact — so this is the same content in two places, and the copy in the SPEC will silently drift on the next prompt edit. The fix: each SPEC keeps only what the prompt itself does not say — when it is sent, and the rationale (the dropped how-to-behave rules, the stack being the agent's call, why the retry insists an empty directory is expected) — and stops re-narrating the prompt body.

  2. steps.ts builds the identical render context three times. All three functions are renderTemplate(X, { tf: { prompt: intent } }) — the context shape is repeated per function. A local fill(template, intent) helper would leave one place that knows how a build-opening prompt renders.

Not counting: the prompts/SPEC.md bullet appearing in both the TL;DR and the "What lives here" list — every other category in that file already appears in both, so that repetition is the file's existing pattern, not new.

🤖 curated

…per renders all three (#1347)

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

Copy link
Copy Markdown
Contributor Author

Pushed the dedup: the three SPECs now carry only when-sent + rationale (the prompt file beside each is the prose of what the agent is told), and steps.ts renders through one fill helper. Steps tests + typecheck green.

🤖 curated

@suleimansh

suleimansh commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

@brillout prompt files moved (#1347) — review welcome, merging

@suleimansh
suleimansh merged commit c5f419e into main Aug 24, 2026
2 checks passed
@suleimansh
suleimansh deleted the build-prompts-as-markdown branch August 24, 2026 13:09
The workspace may be empty — if so, scaffold the whole project from scratch:
create package.json with scripts, all config, and every source file, install
the dependencies, and make the app run.
When done, summarize what you built in one short paragraph.

@brillout brillout Aug 24, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand the goal of this prompt. Can we remove it and tree-shake (remove all code related to it)?

@@ -0,0 +1,13 @@
The greenfield build prompt: the opening prompt of a build agent whose workspace holds no app yet.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's remove all of the greenfield stuff for now (and tree-shake)

@brillout

Copy link
Copy Markdown
Contributor

@suleimansh Up for reviewing the prompts? I'll do a second review after yours.

@suleimansh

Copy link
Copy Markdown
Contributor Author

It was the ai-autopilot greenfield flow (empty-folder builds) — dead path today. Agreed — removal PR incoming. Prompts review next.

suleimansh added a commit that referenced this pull request Aug 24, 2026
…base (#1683 review) (#1689)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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.

Four agent-facing prompts are still written in TypeScript

2 participants