fix: route release prompts to prompt_sandbox instead of create_knowledge_base#248
Conversation
…dge_base Update tool descriptions and system prompt to ensure the LLM selects prompt_sandbox for release-related tasks instead of create_knowledge_base. The sandbox has a release-management skill that maintains RELEASE.md files. - System prompt: add explicit release routing to prompt_sandbox section - create_knowledge_base: narrow description to general reference notes only - prompt_sandbox: expand description to mention release management as primary use - Add tests for all three description changes Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughThis PR updates documentation and tool descriptions across three files to establish a "Sandbox-First" approach, directing release management and related workflows to the prompt_sandbox tool while clarifying the limited scope of create_knowledge_base for general reference notes only. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 1✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
lib/chat/tools/createPromptSandboxStreamingTool.ts (1)
41-46: Consider centralizing release-routing policy text to avoid drift.The same routing policy is now duplicated across prompt/tool descriptions; extracting shared policy constants will keep wording consistent as guidance evolves.
As per coding guidelines:
**/*.{ts,tsx}: Extract shared logic into reusable utilities following Don't Repeat Yourself (DRY) principle.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@lib/chat/tools/createPromptSandboxStreamingTool.ts` around lines 41 - 46, The prompt/tool description duplicates the release-routing policy text; extract that shared wording into a reusable constant (e.g., RELEASE_ROUTING_POLICY or routingPolicyText) in a new or existing shared utilities module (such as a prompts/constants or tools/shared file) and import it into createPromptSandboxStreamingTool to compose the full description string rather than duplicating the policy; update other tools that contain the same policy to use the same constant so wording stays centralized and consistent (search for similar description strings and replace with the imported constant when building tool descriptions).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@lib/chat/tools/createPromptSandboxStreamingTool.ts`:
- Around line 41-46: The prompt/tool description duplicates the release-routing
policy text; extract that shared wording into a reusable constant (e.g.,
RELEASE_ROUTING_POLICY or routingPolicyText) in a new or existing shared
utilities module (such as a prompts/constants or tools/shared file) and import
it into createPromptSandboxStreamingTool to compose the full description string
rather than duplicating the policy; update other tools that contain the same
policy to use the same constant so wording stays centralized and consistent
(search for similar description strings and replace with the imported constant
when building tool descriptions).
ℹ️ Review info
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (3)
lib/chat/__tests__/const.test.tsis excluded by!**/*.test.*,!**/__tests__/**and included bylib/**lib/chat/tools/__tests__/createPromptSandboxStreamingTool.test.tsis excluded by!**/*.test.*,!**/__tests__/**and included bylib/**lib/mcp/tools/files/__tests__/registerCreateKnowledgeBaseTool.test.tsis excluded by!**/*.test.*,!**/__tests__/**and included bylib/**
📒 Files selected for processing (3)
lib/chat/const.tslib/chat/tools/createPromptSandboxStreamingTool.tslib/mcp/tools/files/registerCreateKnowledgeBaseTool.ts
Summary
prompt_sandboxuse case and warns against usingcreate_knowledge_basefor releasescreate_knowledge_basedescription: Narrowed to "general reference notes, bios, or background context" with explicit exclusion of releases, tracks, and marketing plansprompt_sandboxdescription: Expanded to mention release management, RELEASE.md documents, and positions itself as the primary toolTest plan
SYSTEM_PROMPTrelease routing (3 tests)create_knowledge_basenarrowed description (4 tests)prompt_sandboxexpanded description (3 tests)prompt_sandboxprompt_sandboxprompt_sandbox🤖 Generated with Claude Code
Summary by CodeRabbit