Repository navigation
Rewrites keep a text that switches language from one clause to the next more often (#1).
Text that switches language clause by clause
«Je t'envoie le rapport après le standup, but I still need to review the numbers first» has no single word out of place, so the word lists of 0.1.16 named nothing useful, and the five rewording actions wrote the whole text in one language. ProofKey now splits such a text at punctuation, gives each clause a language only when its short common words leave no doubt, and names each part and its language to Improve writing, Make professional, Make friendly, Simplify and Expand as parts to keep in their language. It fires when one part is English and another is Spanish, French, German or Portuguese.
When a rewrite of such a text still comes back in only one of the two languages, the same request is sent once more and the second reply is used if it keeps both. Not at temperature 0, where the same request gives the same reply; if the second request fails, the first reply is kept. On these texts that is a second request on Expand about four times in ten, billed to your key like the first; the other four actions almost never need one.
Fixed on the way: a long text with its non-English part after the sixth clause had only English parts named, and c’est with a typographic apostrophe was not recognised where c'est was.
How it is known
tools/action-eval.ts, the five rewording actions over six clause-mixed texts (--fixtures clauses), gemini-2.5-flash through OpenRouter:
- Naming the parts, 10 runs, 2026-10-17, against the version before: 232/300 → 272/300 checks kept both languages.
Qwen3-4Bon llama.cpp, temperature 0, 3 runs: 3/90 → 36/90. - Asking again, 10 runs, 2026-10-19, the same replies scored before and after the second request: 271/300 → 281/300, Expand 33/60 → 42/60, with 27 second requests in 300.
- Where it fires: over 14,161 paragraphs written in one language (Debian man pages in Spanish, French, German and Portuguese, and English documentation), it named parts in 13, all of them real untranslated English.
Expand still loses the mixture in 18 of 60 checks; #1 stays open. On the released tree, npm run verify reported 688 passing checks and no failures. Details and limits are in MODELS.md.