Conversation
在 system prompt 和 tool description 中增加隐式仓库意图识别场景: - 提到项目特有文件路径(如 "urhox 的 CLAUDE.md") - 讨论特定项目的架构/代码 - 引用外部报告中的代码片段 - 问题涉及项目特有技术栈 - 需要查看实际源码才能准确回答 新增"源码验证原则":涉及具体仓库代码时必须 setup_workspace 进行源码验证,不能仅凭训练知识回答。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Claude finished @lishuceo's task in 50s —— View job PR Review: feat: 增强 setup_workspace 隐式触发识别
✅ ApprovedThis PR is a prompt-only change (no logic, no runtime behavior change) that adds guidance to help the agent proactively identify implicit repository references and trigger Changes reviewed:
Assessment:
No issues found. Clean, focused PR. |
避免对特定仓库名(urhox/maker 等)过拟合,让识别模式适用于任何部署。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Claude finished @lishuceo's task in 47s —— View job PR Review: feat: 增强 setup_workspace 隐式触发识别
✅ ApprovedCommits reviewed: This is a prompt-only change — no runtime logic modified. Both files add well-structured guidance text for the agent.
Assessment:
No issues found. Clean, focused change. |
|
Claude finished @lishuceo's task in 44s —— View job PR Review: feat: 增强 setup_workspace 隐式触发识别
✅ ApprovedCommits reviewed: This is a prompt-only change — no runtime logic modified. Both files add well-structured guidance text for the agent.
Assessment:
No issues found. Clean, focused change. |
|
Claude finished @lishuceo's task in 45s —— View job PR Review: feat: 增强 setup_workspace 隐式触发识别
✅ ApprovedThis is a prompt-only change (no runtime logic modified) that adds guidance for proactive implicit workspace detection.
Assessment:
No issues found. |
Summary
动机
此前 Claude 只在用户显式说"切换到 X 仓库"或提到 repo URL 时才触发 setup_workspace。当用户隐式引用仓库(如讨论 urhox 架构、提到某仓库的 CLAUDE.md、问代码实现细节)时,Claude 倾向于在默认工作目录"空谈",缺少 CLAUDE.md 等项目上下文。
改动
src/claude/executor.ts— system prompt新增"积极识别仓库意图"段落,覆盖 6 种隐式场景:
新增"源码验证原则":不能凭训练知识回答关于特定仓库代码的问题。
src/workspace/tool.ts— tool description补充 3 条隐式触发场景到 MCP tool 描述。
Test plan
🤖 Generated with Claude Code