Skip to content

Complete writing style transformation implementation #58

@frankbria

Description

@frankbria

Problem

Different writing styles are mentioned in the user manual (Professional, Conversational, Academic, Creative, Technical) but not fully implemented.

Current Behavior

  • Writing styles may be listed in UI
  • Unclear if style transformation actually works
  • Style differences may not be significant
  • May only work in draft generation, not style conversion

Expected Behavior

  • Users can select any writing style
  • AI transforms existing text to match selected style
  • Style transformation preserves meaning and facts
  • Clear differences between styles
  • Users can compare styles before committing

Implementation Guidance

  1. Create style transformation prompts for each style type
  2. Test that each style produces distinctly different output
  3. Add style selector to chapter editor
  4. Implement "Transform to [Style]" action
  5. Show preview before applying transformation
  6. Allow reverting to previous version

Files Likely Involved

  • backend/app/services/ai_service.py - Add style transformation
  • backend/app/prompts/style_templates.py - Create style prompts (if doesn't exist)
  • frontend/src/components/chapters/StyleSelector.tsx - Style UI
  • backend/app/api/routes/style.py - Create endpoint

Acceptance Criteria

  • All 5 writing styles implemented
  • Each style produces clearly different output
  • Users can transform existing text to any style
  • Preview shows before/after comparison
  • Users can revert to previous style
  • Style transformation preserves facts and meaning
  • Integration tests verify distinct style outputs
  • E2E test covers style transformation flow

Blocked by

Metadata

Metadata

Assignees

Labels

aiAI/ML relatedbackendBackend/API workfeatureNew feature implementationfrontendFrontend/UI workmediumMedium priority - important but not blocking

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions