Integrate Deepwork Reviews mechanism into Jobs self-review#254
Open
Integrate Deepwork Reviews mechanism into Jobs self-review#254
Conversation
…r self-review Remove the --external-runner claude arg from the MCP config so Jobs always uses self-review mode. Refactor the self-review code path in finished_step to use the Deepwork Reviews mechanism (ReviewTask + write_instruction_files + format_for_claude) instead of the previous custom instruction-file generation. Add adapter function adapt_reviews_to_review_tasks in quality_gate.py that bridges Jobs review data into ReviewTask objects without modifying the Reviews code. https://claude.ai/code/session_013pcsdysk56DbD3mnXj8qC8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR refactors the Jobs self-review system to use the Deepwork Reviews mechanism (
deepwork.review) instead of building review instructions directly. This enables reuse of the Reviews pipeline's instruction file generation and formatting code, reducing duplication and improving consistency across the platform.Key Changes
New adapter functions in
quality_gate.py:adapt_reviews_to_review_tasks(): Converts Jobs review dicts intoReviewTaskobjects that the Reviews pipeline can consume_build_review_instructions_text(): Translates Jobs structured quality criteria into free-text markdown instructions_flatten_output_paths(): Helper to flatten output paths for review tasksRefactored
finished_step()intools.py:write_instruction_files()andformat_for_claude()from the Reviews moduleaiofilesimport (no longer needed; Reviews module handles file I/O)--external-runnerflag from Claude MCP server config (self-review is now the default)Updated tests in
test_tools.py:.deepwork/tmp/review_instructions/directory structure (from Reviews module)subagent_type(fromformat_for_claude())Implementation Details
The adapter bridges the gap between Jobs' review format (with
run_each,quality_criteria,additional_review_guidance) and the Reviews pipeline'sReviewTaskdataclass. This allows Jobs to leverage the Reviews module's:The refactoring maintains backward compatibility with existing Jobs review configurations while enabling future improvements to the Reviews mechanism to automatically benefit Jobs self-review.
https://claude.ai/code/session_013pcsdysk56DbD3mnXj8qC8