Prompt: rewrite as a neanderthal caveman — broken grammar,
grunt words (ugh, oog), simplest names (big rock, fire stick),
dropped articles and conjugations, thoughts about food/shelter/danger,
raw emotional outbursts.
The old prompt had two problems:
1. {style} placeholder was filled with the full promptModifier sentence,
producing gibberish like "rewrite strongly in a Rewrite in a
sarcastic... style"
2. The promptModifier was then repeated as its own line
New design separates concerns cleanly:
- intensityMap no longer uses {style} placeholder — instructions are
pure intensity adverbs ("strongly", "subtly, with a light touch", etc.)
- buildSystemPrompt strips the leading "Rewrite" verb from the style
modifier and combines both into one non-redundant instruction:
"Rewrite the text strongly: in a sarcastic, snarky tone with biting wit"
Example outputs by intensity:
1: Rewrite the text subtly, with a light touch: in a sarcastic...
3: Rewrite the text strongly: in a sarcastic...
5: Rewrite the text with absolute maximum intensity, no restraint: ...
- SvelteKit project scaffolded with TypeScript
- Type definitions for Style, StyleCategory, ConversionRequest, ConversionResponse, LLMConfig
- Style definitions with 6 categories and 25 sub-styles
- Intensity mapping (1-5) with prompt modifier placeholders
- LLM client using OpenAI-compatible API (Ollama default)
- POST /api/convert endpoint with input validation
- Animated loading modal with per-letter animations
- Main page UI with category/style selectors, intensity slider
- Copy to clipboard, collapsible prompt display
- Vitest tests for styles, LLM prompt building, and API validation
- Environment configuration for LLM settings