Commit 85118ff
committed
refactor(system-prompt): reduce duplication in Current Date Context - Option A conservative
**Problem:**
System prompt had ~130 words of duplication (8% waste) after initial cleanup:
- web_operations examples repeated in Current Date Context AND RESEARCH-FIRST
- Hallucination warnings duplicated across 3 sections
- Same concepts explained multiple times
**Solution - Option A Conservative:**
Simplified Current Date Context to high-level guidance:
1. Removed detailed web_operations examples (already in RESEARCH-FIRST)
- Before: 'Internet research → Use web_operations', 'Product listings → Use web_operations'
- After: 'Use web_operations or other appropriate tools to fetch real, current information'
2. Removed duplicate hallucination warning
- Before: 'DO NOT hallucinate news, current events, or generate fake URLs/listings'
- After: Removed (already in RESEARCH-FIRST Prohibited fallbacks lines 81-83)
**Result:**
- Current Date Context focuses on date/location awareness
- RESEARCH-FIRST PRINCIPLE remains authoritative for tool usage details
- Clearer hierarchy: high-level context → detailed guidance
- ~70 word reduction (~6% size decrease)
**Design Decision:**
Chose conservative approach over aggressive to preserve intentional reinforcement:
- Some repetition may strengthen critical concepts
- Research-first principle is working (tested in commit d84a850)
- Lower risk than removing all duplication
**Testing:**
✅ Build: PASS (make build-debug complete)
✅ Swift compilation: No errors
✅ Code review: Changes maintain intent
**Impact:**
- Before: 256 lines, 12KB
- After: ~250 lines, ~11.3KB
- Remaining duplication: ~60 words (acceptable reinforcement)
**Files Modified:**
- Sources/ConfigurationSystem/SystemPromptConfiguration.swift
**Context:**
- Follows commit d84a850 which fixed TodoReminderInjector conflict
- Tools section (tools.txt) analyzed - no duplication found
- System prompt vs tools serve different purposes (behavioral vs operational)1 parent d84a850 commit 85118ff
1 file changed
Lines changed: 1 addition & 4 deletions
Lines changed: 1 addition & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
300 | 300 | | |
301 | 301 | | |
302 | 302 | | |
303 | | - | |
304 | | - | |
305 | | - | |
| 303 | + | |
306 | 304 | | |
307 | 305 | | |
308 | | - | |
309 | 306 | | |
310 | 307 | | |
311 | 308 | | |
| |||
0 commit comments