feat: AI draft assistant -- voice-matched opportunity drafts (Peregrine CL writer pattern) #11

Open
opened 2026-04-22 07:06:45 -07:00 by pyr0ball · 0 comments
Owner

Summary

Wire the fine-tuned voice model into the opportunity draft editor as a split-pane AI draft assistant, following the same pattern as Peregrine's cover letter writer.

Depends on

  • avocet: voice benchmark + fine-tune tickets
  • Fine-tuned model registered in cf-orch

UI pattern (Peregrine cover letter writer)

Split-pane layout in the opportunity detail panel:

  • Left: thread context (title, body, community, signal reason) -- read-only
  • Right: draft editor with AI generation controls

Controls on right pane:

  • "Generate draft" button -- hits cf-orch with fine-tuned voice model
  • Tone selector: casual / technical / community-first (adjusts system prompt)
  • Regenerate button (re-rolls with same params)
  • Inline edit (textarea, always editable)
  • Character/word count (Lemmy/Reddit have limits)
  • Save draft + Approve flow unchanged

API

POST /api/v1/opportunities/{id}/generate-draft

  • Body: { tone: "casual" | "technical" | "community-first" }
  • Hits cf-orch with fine-tuned model ID + thread context + voice system prompt
  • Returns: { draft_body: string, model_used: string, tokens: number }
  • Saves generated draft to opportunity record

Notes

  • Fall back to default model if fine-tuned model unavailable (cf-orch handles routing)
  • Show model name used in UI (small tag under draft, for transparency)
  • Stream tokens if cf-orch supports SSE -- better UX for longer drafts
## Summary Wire the fine-tuned voice model into the opportunity draft editor as a split-pane AI draft assistant, following the same pattern as Peregrine's cover letter writer. ## Depends on - avocet: voice benchmark + fine-tune tickets - Fine-tuned model registered in cf-orch ## UI pattern (Peregrine cover letter writer) Split-pane layout in the opportunity detail panel: - **Left**: thread context (title, body, community, signal reason) -- read-only - **Right**: draft editor with AI generation controls Controls on right pane: - "Generate draft" button -- hits cf-orch with fine-tuned voice model - Tone selector: casual / technical / community-first (adjusts system prompt) - Regenerate button (re-rolls with same params) - Inline edit (textarea, always editable) - Character/word count (Lemmy/Reddit have limits) - Save draft + Approve flow unchanged ## API `POST /api/v1/opportunities/{id}/generate-draft` - Body: `{ tone: "casual" | "technical" | "community-first" }` - Hits cf-orch with fine-tuned model ID + thread context + voice system prompt - Returns: `{ draft_body: string, model_used: string, tokens: number }` - Saves generated draft to opportunity record ## Notes - Fall back to default model if fine-tuned model unavailable (cf-orch handles routing) - Show model name used in UI (small tag under draft, for transparency) - Stream tokens if cf-orch supports SSE -- better UX for longer drafts
Sign in to join this conversation.
No labels
bug
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Circuit-Forge/magpie#11
No description provided.