[codex] add repository presets for contribution targeting#58
Merged
Conversation
dc449d7 to
4edc573
Compare
73df473 to
49d3dc7
Compare
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 adds a reusable repository preset system for contribution targeting, so users can save fixed sets of GitHub repositories, mark one preset as active, and reuse that scope across
scout,agent, andanalyzewithout retyping repositories every time.In addition to the new preset model and CLI surface, this PR also updates the runtime behavior so the active preset is automatically applied by default, while still preserving explicit overrides such as
--repo,--preset, and--all-repos.It also keeps the existing artifact publishing repository behavior intact, but renames the user-facing terminology from "target repository" to "artifact repository" to reduce ambiguity between publishing configuration and contribution exploration scope.
close: #27
What Changed
1. Added repository targeting config support
Introduced a new top-level
repositoryTargetingconfig section with:activePresetpresets: Record<string, { repos: string[] }>This includes:
2. Added
openmeta presetmanagement commandsAdded a dedicated preset command group:
openmeta preset listopenmeta preset add <name> --repo ... [--activate]openmeta preset use <name>openmeta preset remove <name>These commands are wired into the CLI and orchestration layers and persist their state through the existing config service.
3. Extended runtime commands with preset-aware targeting
Updated command surfaces for:
openmeta scoutopenmeta agentopenmeta analyzeNew options include:
--preset <name>for all three commands--all-reposforscoutandagentResolution precedence is now effectively:
--all-reposbypasses preset targeting forscoutandagent--repooverrides everything else--preset <name>selects that named preset4. Added shared repository targeting service
Introduced a shared service to centralize:
This keeps the targeting precedence and validation logic consistent across multiple commands.
5. Updated
openmeta init,config view, anddoctoropenmeta initnow includes a repository preset setup step before artifact repository setup.Behavior includes:
config viewnow surfaces:doctornow validates repository targeting state and distinguishes between:6. Added multi-repo preset behavior to
analyzeanalyzenow supports:--repo--presetFor preset-scoped analysis, the runtime now:
llmService.analyzeRepository(...)per repoprPotentialScore7. Added preset-aware
agentfallback flowagentnow understands preset scopes and uses them in a two-step strategy:automation.minMatchScoreThis means the agent can still produce a contribution path even when preset-scoped issue discovery is not strong enough.
The fallback path reuses the same repository-analysis selection model and then continues through the normal patch draft, implementation, PR draft, artifact, inbox, and proof-of-work flow.
8. Added preset-aware
scoutscoutnow:--preset--all-reposto bypass preset targeting9. Updated content rendering and docs
Repository analysis markdown output now supports grouped multi-repo rendering for preset-based analysis.
README/help-facing documentation was also updated to cover:
--all-reposWhy This Change
Before this PR, users had to repeatedly pass repository targets at runtime, even when they were exploring the same set of repositories over and over.
That made the contribution loop more repetitive than it needed to be, especially for users who want a stable exploration lane such as:
This PR makes repository targeting a first-class saved configuration concept while preserving the existing explicit command overrides.
User Impact
With this change, users can now:
scout,agent, andanalyzeagainst that preset by default--all-reposThis reduces repeated CLI input and makes scheduled or repeated open-source exploration much smoother.
Validation
Fresh verification run before publishing:
bunx tsc --noEmitbun test test/agent-run.test.ts test/scout-targeting.test.ts test/content.test.ts test/config-orchestrator.test.ts test/doctor.test.ts test/init-orchestrator.test.ts test/preset-orchestrator.test.ts test/preset-command.test.ts test/targeting-commands.test.ts test/state-services.test.ts test/agent-orchestrator.test.ts test/scheduler.test.ts test/issue-ranking.test.tsResult:
92 pass / 0 failNotes
This is intentionally a v1 preset system focused on fixed named repository sets.
It does not add:
Those could be layered on later if we want to expand the exploration model.