Improve code review prompts and add prompt testing tools#10
Conversation
1. Update code review prompts to better identify effective code changes 2. Add detailed working hours estimation guidelines 3. Create test_prompt.py for testing individual diff files 4. Create batch_test_prompts.py for batch testing from GitLab 5. Create test_codedog_prompt.py for testing with CodeDog prompts 6. Add test cases with high and low score examples 7. Add documentation for prompt testing tools
|
Caution Review failedThe pull request is closed. WalkthroughThis update introduces a comprehensive orchestration framework for code review within the CodeDog project. It adds a new environment variable ( Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant run_codedog.py
participant CodeReviewChainFactory
participant CodeReviewChain
participant OrchestratedCodeReviewChain
participant CodeReviewOrchestrator
participant ReviewCoordinator
participant SpecializedAgents
User->>run_codedog.py: Trigger code review (with USE_ORCHESTRATION)
run_codedog.py->>CodeReviewChainFactory: create_chain(llm, use_orchestration, models)
alt use_orchestration == false
CodeReviewChainFactory->>CodeReviewChain: from_llm(llm)
CodeReviewChain-->>run_codedog.py: Chain instance
else use_orchestration == true
CodeReviewChainFactory->>OrchestratedCodeReviewChain: from_llms(models)
OrchestratedCodeReviewChain-->>run_codedog.py: Orchestrated chain instance
end
run_codedog.py->>OrchestratedCodeReviewChain: acall(inputs)
OrchestratedCodeReviewChain->>CodeReviewOrchestrator: review_files(change_files)
CodeReviewOrchestrator->>ReviewCoordinator: analyze_context(code_diff)
CodeReviewOrchestrator->>ReviewCoordinator: distribute_work(code_diff, context, agents)
ReviewCoordinator->>SpecializedAgents: review(code_diff, context)
SpecializedAgents-->>ReviewCoordinator: review results
ReviewCoordinator->>ReviewCoordinator: integrate_reviews(reviews)
ReviewCoordinator->>ReviewCoordinator: generate_report(integrated_review, context)
ReviewCoordinator-->>CodeReviewOrchestrator: CodeReview
CodeReviewOrchestrator-->>OrchestratedCodeReviewChain: CodeReview(s)
OrchestratedCodeReviewChain-->>run_codedog.py: Aggregated code reviews
run_codedog.py-->>User: Output/report
Possibly related PRs
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (11)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Summary by CodeRabbit