# terse Terse response protocol injector for Pi. ## Demo | **Same prompt** | **Same prompt + terse** | | --------------------------------------- | ---------------------------------------------- | | ![Same prompt](assets/terse_before.gif) | ![Same prompt + terse](assets/terse_after.gif) | ## Install / load Loaded through the root pi-ext package. See [root README](../../README.md). ## Commands / tools / settings - Commands: none. - Tools: none. - Settings: none. - Hooks: `before_agent_start`. ## Bench Run `mise run bench` here, or `mise //extensions/terse:bench` from the repository root, to benchmark terse prompt injection. ## Behavior On `before_agent_start`, rewrites the agent system prompt with `injectTerseBlock`. - injects `## Response Protocol — terse` - skips injection when prompt already contains the full terse block - inserts before Pi SDK `Current date:` footer when present - appends to prompt when footer is absent - requires output only: no preamble, recap, hedging, filler, or style labels - defaults to one sentence and ≤20 words, max two short lines, hard max ≤35 unless the user asks for detail, and ≤15 for simple answers - treats explain-only prompts as prose-only: cause → effect → fix, no code block - tells the model to delete nonessential words/sentences and merge outputs longer than two sentences - marks >35 words, unsolicited code blocks, style labels, and filler openers as failures - preserves the current user message language while compressing phrasing - includes one terse example - pushes terse phrasing: fragments, abbreviations, causality arrows - keeps code, tool args, file contents, and quoted errors exact - prefers clarity over compression for security, user confusion, and destructive ops