第 6 课 - 使用议题与会话
让智能体提出范围明确的产品改进建议,将想法转化为 GitHub 议题,并在隔离的会话中实现其中一个。
本课将:
- 为 Space Quiz 创建三个范围明确的议题。
- 在 Issues 中浏览待办事项。
- 从议题启动使用新工作树的会话。
- 在 Changes 选项卡中审查差异并验证功能。
在 Issues 中创建待办事项
发送以下提示词:
Review the space quiz and suggest three focused feature ideas that could each be completed in a short session. Create a separate GitHub issue for each idea with a clear title, user-focused description, and acceptance criteria. Do not implement them yet.打开 Issues,审查这三个议题,选择一个价值明确且范围可控的议题。
Issues 将所有存储库中的 GitHub 议题汇总到应用中,并按 Assigned to me、Created by me、Mentioning me 和 Done 筛选。
实现议题
-
从 Issues 打开选定的议题。
-
选择 New session。
-
出现提示时,选择 new worktree。
-
使用 Interactive 模式和偏好的模型。
-
发送以下提示词:
Implement this issue completely. Keep the single-file, dependency-free design, test the behavior in the integrated browser, and summarize the changes when finished.
新工作树将功能与默认分支隔离,直到准备好审查和合并。
亲自审查差异
智能体报告结果后,不要仅凭报告就认定工作无误。
- 打开右侧弹出面板,选择 Changes 选项卡。
- 查看会话修改过的每个文件的差异。
- 在集成浏览器中测试功能,确认满足议题的验收标准。
Changes 选项卡列出会话修改过的每个文件,并内联显示差异。
总结与后续步骤
已经创建待办事项,在隔离会话中实现一个议题,并审查了差异。继续学习第 7 课:先规划再编辑。