Skip to content

fix: route release prompts to prompt_sandbox instead of create_knowledge_base#248

Merged
sweetmantech merged 1 commit intotestfrom
sweetmantech/myc-4361-prioritize-prompt_sandbox-tool-reduce-usage-of
Feb 28, 2026
Merged

fix: route release prompts to prompt_sandbox instead of create_knowledge_base#248
sweetmantech merged 1 commit intotestfrom
sweetmantech/myc-4361-prioritize-prompt_sandbox-tool-reduce-usage-of

Conversation

@sweetmantech
Copy link
Contributor

@sweetmantech sweetmantech commented Feb 28, 2026

Summary

  • System prompt: Added explicit release routing — lists release management as a prompt_sandbox use case and warns against using create_knowledge_base for releases
  • create_knowledge_base description: Narrowed to "general reference notes, bios, or background context" with explicit exclusion of releases, tracks, and marketing plans
  • prompt_sandbox description: Expanded to mention release management, RELEASE.md documents, and positions itself as the primary tool

Test plan

  • New tests for SYSTEM_PROMPT release routing (3 tests)
  • New tests for create_knowledge_base narrowed description (4 tests)
  • Updated tests for prompt_sandbox expanded description (3 tests)
  • All 15 tests pass
  • Lint clean on changed files
  • Manual: "add this info to Sweetman's release of nounish: new track: ⌐◨-◨" → prompt_sandbox
  • Manual: "create a new release for sweetman called delete feb 28" → prompt_sandbox
  • Manual: "where are we at with sweetman's releases?" → prompt_sandbox

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Clarified sandbox tool capabilities emphasizing release management workflows alongside file operations and data analysis.
    • Updated knowledge base tool description to focus on general reference storage and discourage use for release information.
    • Added guidance recommending sandbox tools for release-management use cases.

…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>
@vercel
Copy link
Contributor

vercel bot commented Feb 28, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
recoup-api Building Building Preview Feb 28, 2026 1:23pm

Request Review

@coderabbitai
Copy link

coderabbitai bot commented Feb 28, 2026

📝 Walkthrough

Walkthrough

This 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

Cohort / File(s) Summary
Sandbox-First Approach Guidance
lib/chat/const.ts
Added documentation emphasizing release management as primary use case for prompt_sandbox; added IMPORTANT note discouraging create_knowledge_base for releases.
Tool Description Updates
lib/chat/tools/createPromptSandboxStreamingTool.ts, lib/mcp/tools/files/registerCreateKnowledgeBaseTool.ts
Updated tool descriptions to reflect sandbox-first approach: prompt_sandbox for release management and multi-step tasks; create_knowledge_base limited to general reference notes only.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related PRs

Poem

🏝️ A sandbox blooms with newfound pride,
Release workflows find their rightful guide,
Clear descriptions steer the way,
Each tool knows its destined role today.
Chaos fades when intent is clear! 🎯

🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check name Status Explanation
Solid & Clean Code ✅ Passed PR demonstrates solid adherence to SOLID principles with focused SRP, minimal targeted changes, and no code duplication across modified files.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch sweetmantech/myc-4361-prioritize-prompt_sandbox-tool-reduce-usage-of

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 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

📥 Commits

Reviewing files that changed from the base of the PR and between 7941e52 and 9118baf.

⛔ Files ignored due to path filters (3)
  • lib/chat/__tests__/const.test.ts is excluded by !**/*.test.*, !**/__tests__/** and included by lib/**
  • lib/chat/tools/__tests__/createPromptSandboxStreamingTool.test.ts is excluded by !**/*.test.*, !**/__tests__/** and included by lib/**
  • lib/mcp/tools/files/__tests__/registerCreateKnowledgeBaseTool.test.ts is excluded by !**/*.test.*, !**/__tests__/** and included by lib/**
📒 Files selected for processing (3)
  • lib/chat/const.ts
  • lib/chat/tools/createPromptSandboxStreamingTool.ts
  • lib/mcp/tools/files/registerCreateKnowledgeBaseTool.ts

@sweetmantech sweetmantech merged commit 842bef6 into test Feb 28, 2026
3 checks passed
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.

1 participant