feat(framework): bootstrap via a wrapped user prompt, not a system-prompt preamble#458
feat(framework): bootstrap via a wrapped user prompt, not a system-prompt preamble#458suleimansh wants to merge 1 commit into
Conversation
… 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.
|
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. |
|
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 2. Half the diff was for the architect, which #549 deleted. What is still true is the third bullet: |
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
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.runPrompt): wraps its first user prompt when bootstrap is on.runFramework): prepends the lighterBOOTSTRAP_ARCHITECT_NOTEto 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.BOOTSTRAP_PREAMBLEexport and thebootstrapoption onsystemPromptBlock(bootstrap left the system channel entirely).--bootstrapflag + daemon flag mapping unchanged.Verify
wrapBootstrapPromptshape,runPromptwraps the user prompt (system channel unchanged),runFrameworknote scoped to the architect turn only.--bootstrap --fakeprompt run printsbootstrap: on, exit 0.claude -pinvocation (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.