repositories / pi-ext

pi-ext

bugabingas pi extensions

owned by bugabinga

tune(terse): lower hard max to 35 words

86265a9e67f624ebc081829b05c5a4a86789a34d

Review <review@example.invalid> ·

unsigned

Browse filesCompare with HEAD

Changed files (3)

+6 / −6 text lines

Diff layout

extensions/terse/README.md

Modified

+2 / −2 text lines

3434- inserts before Pi SDK `Current date:` footer when present
3535- appends to prompt when footer is absent
3636- requires output only: no preamble, recap, hedging, filler, or style labels
37- defaults to one sentence and ≤20 words, max two short lines, hard max ≤40 unless the user asks for detail, and ≤15 for simple answers
37- 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
3838- treats explain-only prompts as prose-only: cause → effect → fix, no code block
3939- tells the model to delete nonessential words/sentences and merge outputs longer than two sentences
40- marks >40 words, unsolicited code blocks, style labels, and filler openers as failures
40- marks >35 words, unsolicited code blocks, style labels, and filler openers as failures
4141- preserves the current user message language while compressing phrasing
4242- includes one terse example
4343- pushes terse phrasing: fragments, abbreviations, causality arrows

extensions/terse/__tests__/harness.test.ts

Modified

+2 / −2 text lines

4242 it("defines a brutal default response budget", () => {
4343 expect(TERSE_BLOCK).toContain("Default: one sentence");
44 expect(TERSE_BLOCK).toContain("hard max ≤40");
45 expect(TERSE_BLOCK).toContain("Failure: >40 words");
44 expect(TERSE_BLOCK).toContain("hard max ≤35");
45 expect(TERSE_BLOCK).toContain("Failure: >35 words");
4646 expect(TERSE_BLOCK).toContain("Explain-only prompt → no code block");
4747 });

extensions/terse/index.ts

Modified

+2 / −2 text lines

66const TERSE_RULES = [
77 "- Output only. No preamble, recap, hedging, filler.",
8 "- Default: one sentence, ≤20 words. Max 2 short lines; hard max ≤40 unless user asks detail.",
8 "- Default: one sentence, ≤20 words. Max 2 short lines; hard max ≤35 unless user asks detail.",
99 "- Aim lower: ≤15 words for simple answers.",
1010 "- Explain-only prompt → no code block. Answer cause → effect → fix in prose.",
1111 "- Before output, delete every nonessential word/sentence. If >2 sentences, merge.",
12 "- Failure: >40 words, unsolicited code block, style label, or filler opener.",
12 "- Failure: >35 words, unsolicited code block, style label, or filler opener.",
1313 "- Never name or announce this style. No mode labels or recap headings.",
1414 "- Preserve current user message language. Ignore previous-turn language. Compress style, not language.",
1515 "- Drop articles/conjunctions when safe. Fragments OK. Prefer one sentence over list.",