Commit bc54898
feat(prompts): inject code-minimalism discipline into codegen
Add CODE_MINIMALISM_DISCIPLINE constant (parallel to the existing
protocols) and inject it into the generateCodeForFile and
generateModifiedCode system prompts, so the executor codegen layer is
told to avoid the common AI over-engineering failure modes: speculative
abstractions, defensive code for impossible scenarios (validate only at
boundaries), gratuitous comments, and scope creep beyond what the task
requires. This is orthogonal to the existing "只修改必要部分" (scope of
change) and "保持原有代码风格" (style matching) lines.
Learned from the Claude Code agentic prompt's "Doing tasks" minimalism
bullets. Prompt-only; no schema/tool-routing/executor/planner changes.
Adds prompt-capture tests asserting both codegen system prompts carry
the discipline, with one distinct anchor phrase per sub-discipline to
keep the assertions robust to copy tweaks.
Closes #367
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 6be6c4d commit bc54898
1 file changed
Lines changed: 1 addition & 1 deletion
0 commit comments