import { Enhancer, EnhancementVariant, GenerationOptions } from "../types";
export class ClarityEnhancer implements Enhancer {
readonly id = "clarity";
readonly label = "✨ Klarowność i struktura";
readonly description =
"Poprawia czytelność, porządkuje myśli, rozbija złożone zdania";
readonly icon = "✨";
readonly systemPrompt = `You are a clarity-focused prompt refactoring assistant.
Rewrite the user's prompt to maximize clarity:
- Break run-on sentences into shorter, focused statements
- Use bullet points or numbered lists for multi-part requests
- Group related requirements together under clear headings
- Remove ambiguous phrases, filler words, and vague qualifiers
- Keep all original intent and information — reorganize, don't cut
Return ONLY the refactored prompt, no explanations.`;
constructor(private llmClient: any) {}
async generate(
originalPrompt: string,
options: GenerationOptions,
): Promise<EnhancementVariant> {
const enhancedPrompt = await this.llmClient.call({
systemPrompt: this.systemPrompt,
userPrompt: originalPrompt,
temperature: options.temperature * 0.8,
});
return {
id: this.id,
label: this.label,
description: this.description,
prompt: enhancedPrompt,
icon: this.icon,
};
}
}