Skip to content

refactor: condense system prompt, prioritize prompt_sandbox#247

Merged
sweetmantech merged 1 commit intotestfrom
sweetmantech/myc-4360-api-system-prompt-prioritize-prompt_sandbox-tool-for
Feb 28, 2026
Merged

refactor: condense system prompt, prioritize prompt_sandbox#247
sweetmantech merged 1 commit intotestfrom
sweetmantech/myc-4360-api-system-prompt-prioritize-prompt_sandbox-tool-for

Conversation

@sweetmantech
Copy link
Contributor

@sweetmantech sweetmantech commented Feb 28, 2026

Summary

  • Condensed the system prompt from ~85 lines to ~50 by merging overlapping sections and removing redundant examples
  • Added a prominent Sandbox-First Approach section instructing the LLM to default to prompt_sandbox for files, code, data analysis, content generation, and any multi-step tasks
  • Other tools are positioned for quick, single-purpose lookups or updates only

What changed

Removed/merged:

  • "Core Capabilities" (5 numbered items) + "Specialized Knowledge" (3 bullets + context analysis) → merged into concise "Core Expertise" section
  • "How You Think" (detailed monetization examples, execution if/then blocks) → condensed into "How You Work"
  • "Behavior Rules" (8 bullets, many duplicating earlier sections) → key rules folded into other sections
  • Closing tagline removed

Added:

  • "Sandbox-First Approach" section — prominently placed as the second section, telling the LLM that prompt_sandbox is its primary tool and listing when to use it vs when other tools are better

Preserved:

  • Identity/personality, communication style, markdown formatting rules
  • All dynamic sections in getSystemPrompt.ts (context values, image editing, user/artist/knowledge base) — untouched

Test plan

  • All 30 getSystemPrompt tests pass
  • All 11 buildSystemPromptWithImages tests pass
  • Verify in chat that the LLM reaches for prompt_sandbox more readily for file/content tasks
  • Verify the LLM still uses quick tools (Spotify lookup, web search, image edit) appropriately

🤖 Generated with Claude Code

Summary by CodeRabbit

Release Notes

  • Chores
    • Updated system configuration to optimize task execution and response efficiency.

Reduce the system prompt from ~85 lines to ~50 by merging overlapping
sections (Core Capabilities + Specialized Knowledge, How You Think +
Behavior Rules) and removing redundant examples.

Add a prominent "Sandbox-First Approach" section that instructs the LLM
to default to prompt_sandbox for files, code, data analysis, content
generation, and any multi-step tasks — only using other tools for quick
lookups or single-purpose updates.

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 0:19am

Request Review

@coderabbitai
Copy link

coderabbitai bot commented Feb 28, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent 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 c854a1f and 8979180.

📒 Files selected for processing (1)
  • lib/chat/const.ts

📝 Walkthrough

Walkthrough

The SYSTEM_PROMPT constant in lib/chat/const.ts has been simplified and reoriented toward the music industry. The prompt now emphasizes a sandbox-first approach using the prompt_sandbox tool as the primary workflow, replaces extensive capability descriptions with concise directives, and streamlines formatting guidelines while removing verbose behavioral prescriptions.

Changes

Cohort / File(s) Summary
System Prompt Simplification
lib/chat/const.ts
Refactored SYSTEM_PROMPT from verbose multi-section prose to compact, tool-centric workflow. Repositioned assistant as music industry-focused with explicit prompt_sandbox tool as primary, removed extensive knowledge sections, simplified formatting guidelines, and added autonomous execution directive.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Poem

🎵 A prompt grows lean, from verbose to keen,
The sandbox shines bright, where artists take flight,
No permission to ask—just build and attack,
Music industry dreams, powered by clean code streams. 🎸

🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check name Status Explanation
Solid & Clean Code ✅ Passed PR demonstrates SOLID & Clean Code principles through strategic consolidation, reducing complexity while maintaining clarity and functionality across all 41 passing tests.

✏️ 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-4360-api-system-prompt-prioritize-prompt_sandbox-tool-for

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.

@sweetmantech sweetmantech merged commit 7941e52 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