MaxCode: Integrate MergeAgent into PrimaryAgent pipeline and update conversion tools#27
Open
MaxCode: Integrate MergeAgent into PrimaryAgent pipeline and update conversion tools#27
Conversation
… tools Updates PrimaryAgent to use MergeAgent for directory-mode conversions instead of processing files independently. Updates migration_tool to handle the new model+utils output format and auto-run verification. - primary_agent.py: directory path now merges files before conversion - model_conversion_agent.py: updated for multi-file merged input - single_file_agent.py: tightened single-file conversion path - migration_tool.py: handles model+utils output, runs scorecard Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
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
Updates the core pipeline orchestration so that directory-mode conversions now use
MergeAgentto merge and filter repository files before converting, instead of processing each file independently. Also updates the migration tool to handle the new output format and auto-run verification.Key changes
primary_agent.py(+632 / -221 lines) — Major rewriteMergeAgent.run()to produce a single merged model file + optional utils file, then converts the merged output in one shot. Previously processed each file independently, leading to inconsistent cross-file references.maxtext_conversion_agent,validation_agent.model_conversion_agent.py(+47 lines modified)single_file_agent.py(+62 lines modified)repo_agent.py(2 lines)migration_tool.py(+136 lines modified)PrimaryAgent.Files
agents/migration/primary_agent.pyagents/migration/model_conversion_agent.pyagents/migration/single_file_agent.pyagents/migration/repo_agent.pytools/migration_tool.pyDependencies
This PR references
MergeAgent,ValidationAgent, andMaxTextConversionAgentwhich are introduced in sibling PRs (#24, #25, #27). It also uses the updated prompts from #26.Test plan
PrimaryAgent.run()on a directory containing multiple model files — verify it merges before convertingPrimaryAgent.run()on a single file — verify single-file path still worksconvert_codetool returns model + utils output and prints verification scorecardSplit from #17 — PR 5 of 8