Fix/complexity-prompt-json-output#1407
Conversation
…is prompt The complexity analysis prompt was missing the final instruction specifying that output should be a JSON object with a 'complexityAnalysis' key containing the array of analysis objects. This caused inconsistent output formatting. This fix ensures the AI model returns properly structured JSON output that can be reliably parsed by the complexity analysis module.
🦋 Changeset detectedLatest commit: 0e59606 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
WalkthroughA changeset entry is added for a patch release, and the complexity analysis prompt is updated to enforce a consistent JSON output format with a fixed schema containing a complexityAnalysis array, optional metadata, and an expanded codebase analysis workflow section in the user instructions. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🧰 Additional context used🧠 Learnings (6)📓 Common learnings📚 Learning: 2025-07-18T17:08:48.695ZApplied to files:
📚 Learning: 2025-07-18T17:10:02.683ZApplied to files:
📚 Learning: 2025-09-22T19:45:04.337ZApplied to files:
📚 Learning: 2025-11-12T18:23:46.054ZApplied to files:
📚 Learning: 2025-09-03T13:46:00.640ZApplied to files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (3)
Comment |
* fix(prompts): add JSON output format instruction to complexity analysis prompt The complexity analysis prompt was missing the final instruction specifying that output should be a JSON object with a 'complexityAnalysis' key containing the array of analysis objects. This caused inconsistent output formatting. This fix ensures the AI model returns properly structured JSON output that can be reliably parsed by the complexity analysis module. * chore: add changeset for complexity prompt fix --------- Co-authored-by: Your Name <you@example.com>
What type of PR is this?
Description
Related Issues
How to Test This
# Example commands or stepsExpected result:
Contributor Checklist
npm run changesetnpm testnpm run format-check(ornpm run formatto fix)Changelog Entry
For Maintainers
Summary by CodeRabbit
Bug Fixes