-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Description
Feature hasn't been suggested before.
- I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
This is PR1 of #14398
Overspecification Hurts Performance
Two landmark studies prove that excessive specification in prompts degrades LLM performance:
| Study | Finding | Evidence |
|---|---|---|
| Tang et al. (2025) | Over-prompting degrades performance | Performance peaks at 5-20 examples, then declines |
| Zi et al. (2025) | More detail ≠ better code generation | Excessive constraints create cognitive overload |
Implication: Too few constraints → model ignores them. Too many → performance degrades.
Optimal: 5-7 high-impact constraints per category.
PR-1: Overspecification Audit & Reduction
Priority Score: 9.6/10 (HIGH impact, VERY HIGH evidence, LOW effort, ZERO overspec risk)
What: Audit all prompts and reduce constraints to 5-7 per category. Remove redundant instructions, verbose explanations, and duplicate content. Target <1500 tokens per prompt.
Why: Research proves excessive constraints degrade performance. Tang et al. (2025) found performance peaks at 5-20 examples then declines. Zi et al. (2025) confirmed excessive constraints create cognitive overload.
Evidence:
- Tang et al. (2025): Performance peaks at 5-20 examples, then declines
- Zi et al. (2025): Excessive constraints create cognitive overload
- Chen et al. (2025): Promptware anti-patterns identified
Tasks:
- Audit all prompt files in
packages/opencode/src/session/prompt/*.txt - Count MUST/NEVER rules per category (target: ≤7)
- Count examples per file (target: ≤5)
- Measure token count per file (target: <1500)
- Remove redundant/duplicate instructions
- Create validation script
scripts/audit-overspecification.ts - Add to CI pipeline
Files: packages/opencode/src/session/prompt/*.txt, scripts/audit-overspecification.ts