Specter is a writing assistant built around a deliberate constraint: the system prompt tells DeepSeek its goal is "not to write the text for the user, but to help the user write better." Instead of generating replacement prose, every analysis pass returns two lists: potential directions to develop and specific areas for improvement. That keeps the suggestions ephemeral scaffolding around your draft rather than content that could just replace it.
Those two lists come back from the model as one block of free text, not structured JSON, so the client has to split it back apart itself. The system prompt asks for the headings Potential Directions: and Areas for Improvement:, and the response handler does the rest with a regex split and some line filtering:
// llm returns "potential directions: ... areas for improvement: ..."; split and strip heading lines
const [directionsSection, improvementsSection] = response.content.split(/Areas for Improvement:/i);
const directions = (directionsSection || '').split('\n')
.filter(line => line.trim() && !line.includes('Potential Directions:'))
.map(line => line.trim());
const improvements = (improvementsSection || '').split('\n')
.filter(line => line.trim() && !line.includes('Areas for Improvement:'))
.map(line => line.trim());
setPotentialDirections(directions);
setAreasForImprovement(improvements);
A separate "inspiration" mode uses a different system prompt entirely: one asking for opening hooks and an outline rather than critique. Its output gets appended straight into the draft textarea instead of a suggestions panel, since the point there is to get you unstuck, not to evaluate what you've already written.