Skip to content

feat(framework): bootstrap via a wrapped user prompt, not a system-prompt preamble - #458

Closed
suleimansh wants to merge 1 commit into
mainfrom
feat/bootstrap-wrap-prompt-457
Closed

feat(framework): bootstrap via a wrapped user prompt, not a system-prompt preamble#458
suleimansh wants to merge 1 commit into
mainfrom
feat/bootstrap-wrap-prompt-457

Conversation

@suleimansh

Copy link
Copy Markdown
Member

Closes #457. Part of #297.

Rom's steer on #297: treat Claude Code as a black box and wrap the user prompt rather than inject via --append-system-prompt / --system-prompt. Instructions carried in the prompt itself outweigh "contextual" system-prompt text the agent is tempted to skip. #448 shipped bootstrap as a forceful system-prompt preamble; this reworks it to the wrap-the-prompt approach.

What

  • New wrapBootstrapPrompt(userPrompt): rewords a brand-new-project intent into instructions (analyze the request, showMarkdown() the analysis + plan, await approval, no code before approval). Original request rides at the end unchanged.
  • Direct-prompt path (runPrompt): wraps its first user prompt when bootstrap is on.
  • Build path (runFramework): prepends the lighter BOOTSTRAP_ARCHITECT_NOTE to the architect turn only; its plan-approval gate already awaits the plan, and the note is JSON-shape compatible so it does not fight the architect's answer contract. Build/scaffold turns keep the raw intent.
  • Removes the BOOTSTRAP_PREAMBLE export and the bootstrap option on systemPromptBlock (bootstrap left the system channel entirely).
  • CLI --bootstrap flag + daemon flag mapping unchanged.

Verify

  • framework tests 472 (471 pass / 0 fail / 1 skipped), incl. new: wrapBootstrapPrompt shape, runPrompt wraps the user prompt (system channel unchanged), runFramework note scoped to the architect turn only.
  • Workspace typecheck clean; framework build clean; --bootstrap --fake prompt run prints bootstrap: on, exit 0.
  • Composed prompts confirmed byte-correct against a real claude -p invocation (bootstrap framing now rides the user prompt, not the append-system-prompt). The real-LLM behavioral confirmation (stops for a plan, writes nothing) is a one-command run in a logged-in shell; the plumbing is covered by the unit tests above.

… system-prompt preamble

Closes #457. Part of #297.

Rom's steer on #297: treat Claude Code as a black box and wrap the user
prompt rather than injecting via --append-system-prompt. New
wrapBootstrapPrompt() rewords a brand-new-project intent into instructions
(analyze, showMarkdown the analysis + plan, await approval, no code first),
with the original request preserved at the end. The direct-prompt path wraps
its first user prompt; the build path prepends the lighter
BOOTSTRAP_ARCHITECT_NOTE to the architect turn, whose plan-approval gate
already awaits. Removes the BOOTSTRAP_PREAMBLE system-prompt export and the
bootstrap option on systemPromptBlock. CLI --bootstrap and daemon mapping
unchanged.
@suleimansh suleimansh added enhancement New feature or request priority: low Nice to have / latent the-framework ♻️ labels Jul 13, 2026
@suleimansh suleimansh self-assigned this Jul 13, 2026
@suleimansh
suleimansh marked this pull request as draft July 13, 2026 14:18
@suleimansh

Copy link
Copy Markdown
Member Author

Holding this as draft. Rom is redesigning the anti-laziness into a single always-injected 'analyze' prompt (ANALYZE_PROMPT.md, #457 comment), which subsumes bootstrap-as-a-mode. Keeping this open as the wrap-the-user-prompt reference; will fold into the unified prompt rather than merge as-is.

@suleimansh

Copy link
Copy Markdown
Member Author

Closing this. Two things happened since I opened it, and between them there is nothing left of it.

1. You reversed the premise. This PR exists because of the "wrap the user prompt, don't inject via --append-system-prompt" steer on #297. On #326 you said the opposite: "I changed my mind: I think we should start with the easy path - I'm open for using --append-system-prompt if it makes our lives easier." So reworking the mechanism buys nothing.

2. Half the diff was for the architect, which #549 deleted. BOOTSTRAP_ARCHITECT_NOTE and the architect turn it attached to are both gone.

What is still true is the third bullet: BOOTSTRAP_PREAMBLE should not be in the system prompt. I have put that question on #457 on its own, without the mechanism change riding along.

@suleimansh suleimansh closed this Jul 15, 2026
@suleimansh
suleimansh deleted the feat/bootstrap-wrap-prompt-457 branch July 30, 2026 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request priority: low Nice to have / latent the-framework ♻️

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[The Framework] Remove BOOTSTRAP_PREAMBLE from the system prompt

1 participant