Skip to content

fix(s10): assemble system prompt from dynamic context instead of static strings - #488

Merged
Bill-Billion merged 1 commit into
mainfrom
fix/s10-use-dynamic-context-in-prompt
Jul 28, 2026
Merged

fix(s10): assemble system prompt from dynamic context instead of static strings#488
Bill-Billion merged 1 commit into
mainfrom
fix/s10-use-dynamic-context-in-prompt

Conversation

@Bill-Billion

Copy link
Copy Markdown
Collaborator

PROMPT_SECTIONS["memory"] was defined but never referenced, and update_context() collected enabled_tools and workspace that assemble_system_prompt() ignored, using hardcoded strings instead. This undermined the chapter's core demonstration of runtime prompt assembly from context.

Now assemble_system_prompt reads tools and workspace from the context dict, and PROMPT_SECTIONS only holds the identity line. All three README code snippets are synchronized.

Closes #471.

…ic strings

PROMPT_SECTIONS["memory"] was defined but never referenced, and
update_context() collected enabled_tools and workspace that
assemble_system_prompt() ignored, using hardcoded strings instead.

Now assemble_system_prompt reads tools and workspace from the
context dict, and PROMPT_SECTIONS only holds the identity line.
All three README code snippets are synchronized.

Closes #471
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
❌ Deployment failed
View logs
learn-claude-code b4e7269 Jul 28 2026, 02:28 PM

@Bill-Billion
Bill-Billion merged commit ac82266 into main Jul 28, 2026
3 of 6 checks passed
@Bill-Billion
Bill-Billion deleted the fix/s10-use-dynamic-context-in-prompt branch July 28, 2026 14:36
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.

s10 让提示词组装与运行时 context 保持一致

1 participant