fix: prevent AI solver from ignoring changed/expanded requirements#1566
fix: prevent AI solver from ignoring changed/expanded requirements#1566konard wants to merge 4 commits into
Conversation
Adding .gitkeep for PR creation (default mode). This file will be removed when the task is complete. Issue: #1565
…1565) Root cause: When users expand scope via PR comments (e.g., "sync ALL features, not just temperature"), the AI solver would acknowledge the requirement but then silently narrow scope back to the original issue title. This happened 3 times in agent#244 before compliance. Two fixes: 1. Include latest reviewer comment verbatim in the continue-mode prompt (solve.feedback.lib.mjs) so requirements are impossible to miss 2. Add "Scope management" instructions to all prompt variants that explicitly forbid silent scope narrowing Case study with full timeline and root cause analysis included. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost: $3.641992📊 Context and tokens usage:
Total: (101.8K + 5.0M cached) input tokens, 19.4K output tokens, $3.641992 cost 🤖 Models used:
📎 Log file uploaded as Gist (2177KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
🔄 Auto-restart triggered (iteration 1)Reason: CI failures detected Starting new session to address the issues. Auto-restart-until-mergeable mode is active. Will continue until PR becomes mergeable. |
Revert manual version change in package.json and manual CHANGELOG entry. Add proper changeset file so the release workflow manages versioning automatically. Fixes failing "Check for Changesets" and "Check for Manual Version Changes" CI checks. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
🔄 Auto-restart-until-mergeable Log (iteration 1)This log file contains the complete execution trace of the AI solution draft process. 💰 Cost: $0.683837📊 Context and tokens usage:
Total: (33.8K + 744.6K cached) input tokens, 4.0K output tokens, $0.683837 cost 🤖 Models used:
📎 Log file uploaded as Gist (3928KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
✅ Ready to mergeThis pull request is now ready to be merged:
Monitored by hive-mind with --auto-restart-until-mergeable flag |
This reverts commit 8e4cd80.
Summary
Fixes #1565
solve.feedback.lib.mjs) so requirements are embedded directly in context, not discovered through tool useRoot Cause
The AI model has a built-in tendency toward minimal changes that conflicts with explicit user instructions that expand scope. Key evidence from logs:
The AI correctly understood 5 requirements from the user's comment, then decided to only implement 1 of them.
Changes
src/solve.feedback.lib.mjssrc/claude.prompts.lib.mjssrc/opencode.prompts.lib.mjssrc/codex.prompts.lib.mjssrc/agent.prompts.lib.mjsdocs/case-studies/issue-1565/README.mddocs/case-studies/issue-1565/improvements.mdCHANGELOG.mdpackage.jsonTest plan
eslintpasses on all modified source filesHow to verify the fix works
After this change, when a reviewer posts a comment on a PR and the AI solver restarts:
🤖 Generated with Claude Code