-
Notifications
You must be signed in to change notification settings - Fork 0
Prompt Optimization
ToddSpect edited this page May 23, 2026
·
3 revisions
Todd of AIDLC optimizes prompts before they reach any AI provider. You get fewer wasted tokens and clearer, more reliable answers — on Copilot, Cursor, Claude, Devin, and Kiro alike.
On by default. Configure under Todd of AIDLC: Open Configuration → Workspace.
| Without optimization | With Todd of AIDLC optimization | |
|---|---|---|
| Efficiency | Long chats and duplicate lines inflate every request | History trim, dedupe, file caps, merged system text |
| Quality | Models may ramble or repeat attached files | Response contract: goal first, minimal diffs, mode-specific rules |
| Multi-provider | Rules differ per vendor UI | Same Todd of AIDLC guidance on every provider pill |
Before AgentRouter sends your message:
- Normalize — trim whitespace; collapse excessive newlines (code fences preserved).
- Dedupe — skip back-to-back identical user messages.
- Prune — remove empty assistant placeholders.
- Merge — combine duplicate Todd of AIDLC system guidance into one block.
- Guidance — inject provider-agnostic instructions (efficiency + quality contract).
- Mode hints — Ask / Agent / Spec+Agent each get targeted behaviour (plans, specs, no unsolicited edits).
- Trim history — keep recent turns only (default 24 messages).
- Context files — truncate large attachments (default 12 000 chars/file, head + tail kept).
- Goal-first answers — less preamble and process narration
- Structured output — bullets for lists; short paragraphs otherwise
- Safer coding — Agent mode encourages small steps and self-check
- Spec+Agent — specs treated as authoritative acceptance criteria
- One clarifying question when blocked — reduces wrong guesses on security or data loss
- Lower estimated tokens in on long sessions (see User Manual → Spending)
- Fewer duplicate charges from repeated user text or stacked system blocks
- Large context files remain useful without sending the entire file every turn
| VS Code setting | Default |
|---|---|
toddspect.promptOptimization.enabled |
true |
toddspect.promptOptimization.maxContextCharsPerFile |
12000 |
toddspect.promptOptimization.maxHistoryMessages |
24 |
- Why Todd of AIDLC — product advantages
- Context and Specs — what gets attached before optimization
- Copilot Modes — Ask / Agent / Spec+Agent
- Repo doc: docs/prompt-optimization.md
Getting started
Using Todd of AIDLC
Agents
Advanced
Help