Optimize native system prompt - 48% size reduction

Removed redundant and vague content from prompts/system/native.md:
- Simplified intro from 17 lines to 3 lines
- Reduced Code Search section to one line
- Removed duplicate Plan Mode example (kept one)
- Removed Action Envelope section (rarely used correctly)
- Removed verbose Memory Format details (tool description covers it)
- Removed Response Guidelines (obvious to modern LLMs)

Size: 8,620 chars -> 4,498 chars

Also updated:
- G3_IDENTITY_LINE constant for agent mode compatibility
- Test assertions to check for new prompt markers
- System prompt validation to use new marker string
This commit is contained in:
Dhanji R. Prasanna
2026-02-05 22:16:34 +11:00
parent d978032044
commit 3823f8b5f3
4 changed files with 22 additions and 131 deletions

View File

@@ -40,7 +40,7 @@ async fn test_context_window_initial_structure() {
// First message should be system prompt
let system_msg = &context.conversation_history[0];
assert!(system_msg.content.contains("You have access to tools"),
assert!(system_msg.content.contains("Use tools to accomplish tasks"),
"First message should be system prompt with tool instructions");
// Second message should be README content
@@ -285,7 +285,7 @@ async fn test_full_context_order() {
// Message 0: System prompt
let system = &context.conversation_history[0].content;
assert!(system.contains("You have access to tools"),
assert!(system.contains("Use tools to accomplish tasks"),
"Message 0 should be system prompt");
// Message 1: Combined content with project appended