Skip to content

refactor(pipeline): 抽取提示词模板为独立helper并添加最小切入原则#9

Merged
JiGuangWorker merged 1 commit into
mainfrom
dev/v1-pipeline
Jul 4, 2026
Merged

refactor(pipeline): 抽取提示词模板为独立helper并添加最小切入原则#9
JiGuangWorker merged 1 commit into
mainfrom
dev/v1-pipeline

Conversation

@JiGuangWorker

Copy link
Copy Markdown
Owner

改动内容

1. 提示词模板重构(internal/pipeline/prompts.go)

  • 将 buildCodingPrompt 中的长模板抽取为独立 helper buildCodingPromptTemplate()
  • 降低构造函数行数,便于 lint 检查通过

2. 新增「最小切入原则」(编码提示词)

约束 Agent 行为边界,避免过度修改:

  • 修正:只改导致问题的根因行,不顺手重构周边代码
  • 开发:只实现 Issue 验收标准要求的功能,不写以防万一的抽象
  • 推进:每轮只做一件聚焦的事,不把多个无关改动打包
  • 新增规则第8条:每行改动必须有与 Issue 验收标准或 reviewer 反馈的直接关联证据

3. 编译产物忽略(.gitignore)

  • 将 worker 可执行文件加入 .gitignore,防止误提交

- 将 buildCodingPrompt 中的长模板抽取为 buildCodingPromptTemplate()
- 在编码提示词中新增最小切入原则,约束 Agent 行为边界
- 新增规则第8条:每行改动需有直接关联证据,否则撤回
- 将 worker 编译产物加入 .gitignore
@JiGuangWorker JiGuangWorker merged commit 3244639 into main Jul 4, 2026
1 check passed
@JiGuangWorker JiGuangWorker deleted the dev/v1-pipeline branch July 4, 2026 14:50
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.

2 participants