mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-03 08:53:36 +00:00
fix(server): Add explicit JSON response instructions for Cursor prompts
Cursor was writing JSON to files instead of returning it in the response. Added clear instructions to all Cursor prompts: 1. DO NOT write any files 2. Return ONLY raw JSON in the response 3. No explanations, no markdown, just JSON Affected routes: - generate-spec.ts - generate-features-from-spec.ts - validate-issue.ts - generate-suggestions.ts 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -189,11 +189,17 @@ The response will be automatically formatted as structured JSON.`;
|
||||
|
||||
const provider = ProviderFactory.getProviderForModel(model);
|
||||
|
||||
// For Cursor, include the JSON schema in the prompt
|
||||
// For Cursor, include the JSON schema in the prompt with clear instructions
|
||||
const cursorPrompt = `${prompt}
|
||||
|
||||
IMPORTANT: You must respond with a valid JSON object matching this schema:
|
||||
${JSON.stringify(suggestionsSchema, null, 2)}`;
|
||||
CRITICAL INSTRUCTIONS:
|
||||
1. DO NOT write any files. Return the JSON in your response only.
|
||||
2. After analyzing the project, respond with ONLY a JSON object - no explanations, no markdown, just raw JSON.
|
||||
3. The JSON must match this exact schema:
|
||||
|
||||
${JSON.stringify(suggestionsSchema, null, 2)}
|
||||
|
||||
Your entire response should be valid JSON starting with { and ending with }. No text before or after.`;
|
||||
|
||||
for await (const msg of provider.executeQuery({
|
||||
prompt: cursorPrompt,
|
||||
|
||||
Reference in New Issue
Block a user