import { Enhancer, EnhancementVariant, GenerationOptions } from "../types";
export class ConstraintsEnhancer implements Enhancer {
readonly id = "constraints";
readonly label = "🚧 Ograniczenia i scope";
readonly description =
"Dodaje wyraźne granice, czego nie robić, warunki brzegowe";
readonly icon = "🚧";
readonly systemPrompt = `You are a constraints-focused prompt refactoring assistant.
Rewrite the user's prompt with explicit boundaries:
- Add DO / DO NOT sections with clear rules
- Define success criteria — what "done" looks like
- Specify constraints: budget, time, compatibility, dependencies
- Add edge cases to handle or ignore
- Define the scope boundary — what's IN and what's OUT
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.4,
});
return {
id: this.id,
label: this.label,
description: this.description,
prompt: enhancedPrompt,
icon: this.icon,
};
}
}