Skip to content

feat: redesign /rewrite for a natural, casual voice#201

Merged
quiet-node merged 1 commit into
mainfrom
feat/rewrite-casual-voice
Jun 7, 2026
Merged

feat: redesign /rewrite for a natural, casual voice#201
quiet-node merged 1 commit into
mainfrom
feat/rewrite-casual-voice

Conversation

@quiet-node
Copy link
Copy Markdown
Owner

Overview

Redesigns the /rewrite slash command so it rewrites text into a natural, casual, everyday voice instead of lightly polishing it. The previous prompt only smoothed flow with minimal edits; the new prompt rewrites freely to sound like a fluent native speaker in everyday conversation while preserving the writer's meaning, personality, and point of view.

What changed

  • New /rewrite promptTemplate in src/config/commands.ts: defaults to a relaxed, conversational tone and only stays formal when the source clearly is, never making the text stiffer than the original.
  • Preserves the writer's voice: keeps expressive spellings ("heyyyy", "soooo"), contractions, slang, and any emoji the user wrote, and never adds energy, slang, or emoji the user did not use.
  • Preserves point of view: never invents a narrator and never turns an imperative or impersonal note into a "we" voice; each instruction stays a direct command.
  • Honors the existing [Additional instruction] follow-up channel, so tweaks like "make it more formal" override the defaults.
  • Output stays clean: no em dashes, no markdown, no decorative icons, only the rewritten text.
  • Refreshes the user-facing copy: command description, docs summary and behavior, and the prompt-help summary.
  • Regenerates the derived artifacts (docs/commands.md, src-tauri/prompts/generated/slash_commands.txt) from source via generate:commands.

How it works

/rewrite keeps the same unified dispatch and $INPUT substitution path; only the prompt content changed. Selected text plus a typed remainder still compose into selection\n\n[Additional instruction]: remainder, which the new prompt explicitly respects so follow-up tweaks keep working.

Testing

  • bun run test:coverage: 1521 frontend tests pass; the /rewrite prompt assertions in App.test.tsx were updated to the new template.
  • bun run typecheck, bun run lint:frontend, bun run format:check, bun run build:frontend: all clean.
  • Generated-artifact parity is enforced by commandArtifacts.test.ts.

Note: the backend is untouched apart from the regenerated prompt string that is baked in via include_str!; no Rust logic or test depends on its exact wording.

Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>
@quiet-node quiet-node merged commit c66519a into main Jun 7, 2026
3 checks passed
@quiet-node quiet-node deleted the feat/rewrite-casual-voice branch June 7, 2026 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant