mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-01-30 06:12:03 +00:00
CLI-based providers (OpenCode, etc.) only accept a single prompt via stdin/args and don't support separate system/user message channels like Claude SDK. When systemPrompt is passed to these providers, it was silently dropped, causing: - BacklogPlan JSON parsing failures with OpenCode/GPT-5.2 (missing "output ONLY JSON" formatting instruction) - Loss of critical formatting/schema instructions for structured outputs This fix adds embedSystemPromptIntoPrompt() method to CliProvider base class that: - Prepends systemPrompt to the user prompt before CLI execution - Handles both string and array prompts (vision support) - Handles both string systemPrompt and SystemPromptPreset objects - Uses standard \n\n---\n\n separator (consistent with codebase) - Sets systemPrompt to undefined to prevent double-injection Benefits OpencodeProvider immediately (uses base executeQuery). CursorProvider still uses manual workarounds (overrides executeQuery). Fixes the immediate BacklogPlan + OpenCode bug while maintaining backward compatibility with existing Cursor workarounds. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>