refactor: Tighten initial instructions; exact + backend-aware CC tool table; list supported file types#1567
Conversation
12a6daf to
c7f78d3
Compare
|
Thank you! We have been running a dedicated effort to improve the instructions by building an in-house benchmark. I will take your proposal in consideration and soon merge the best of the formulations to commit the improved instructions. Since the changes we already have will have conflicts with the changes here, merging the PR as is makes no sense. But I will keep it as reference until improved instructions are on main, then close it, ok? |
|
@MischaPanch , of course, feel free to extract anything useful and close the PR when it's fine. |
…e CC tool table; list supported file types Apply Anthropic's current Opus 4.x prompting guidance to the instruction texts coding agents receive: cut redundancy, drop over-emphasis (CRITICAL/FORBIDDEN/ALWAYS), and prefer positive framing. - Make system_prompt, the claude-code context, and the editing mode laconic (~37/53/59% smaller) while preserving all load-bearing behavior. - cc_system_prompt_override: tool-mapping table now uses exact tool names and gains a JetBrains-backend section (jet_brains_* navigation/refactoring tools) gated on the configured language backend. Regenerate the prompt factory for the new `jetbrains_backend` var, add a SerenaPromptFactory override, and resolve the effective backend in `prompts print-cc-system-prompt-override` (global config + optional --project override). - Project activation message now lists supported file types, derived from each language's source filename matcher (new Language.get_source_file_extensions / FilenameMatcher.file_extensions). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
c7f78d3 to
9f2ad32
Compare
Summary
Refines the instruction texts coding agents receive from Serena, applying Anthropic's current Opus 4.x prompting guidance (cut redundancy, drop over-emphasis like
CRITICAL/FORBIDDEN/ALWAYS, prefer positive framing), and enriches the project activation message.Changes
system_prompt, theclaude-codecontext, and theeditingmode are made shorter (~37% / 53% / 59%) while preserving all load-bearing behavior. All Jinja conditionals and tool/config blocks are unchanged.cc_system_prompt_override's tool-mapping table now uses the real callable tool names, and gains a JetBrains-backend section (jet_brains_*navigation/refactoring tools) that renders only when the configured language backend is JetBrains.jetbrains_backendvariable, added aSerenaPromptFactoryoverride, and resolve the effective backend inserena prompts print-cc-system-prompt-override(global config, with an optional--projectoverride)..py, .pyi, .ts, ...), derived from each language's source filename matcher via newLanguage.get_source_file_extensions()/FilenameMatcher.file_extensions.Conclusion
Now initial instructions are significantly shorter (~1k tokens reduction).
My subjective impression is Claude Code works better with Serena now and calls its tools more ofter.
I hope you'll find those changes useful.