feat: Auto-generate fix PRs for failing readiness criteria (`agentrc fix --pr`)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.1k
- Forks
- 94
- Avg merge
- 8d 3h
- Merged PRs (30d)
- 7
Description
Problem
Today, agentrc init and agentrc instructions generate instruction files locally and write them to disk. The user must then manually commit, push, and open a PR. For batch adoption — onboarding 10, 50, or 200 repos across an org — this manual step is the bottleneck.
Field teams working with enterprise customers need a way to run AgentRC assessments across many repos and then automatically create PRs with the recommended configurations, so repo owners can review and merge rather than generate from scratch.
Proposal
New command: agentrc fix
A command that generates recommended files and opens a PR:
agentrc fix [path] --pr
Behavior:
- Run
agentrc analyzeon the repo - Run
agentrc readinessto identify failing criteria - For each fixable criterion, generate the missing file(s):
- Missing
.github/copilot-instructions.md→ generate viainstructions - Missing lockfile → run
npm install --package-lock-only(or equivalent) - Missing
.github/dependabot.yml→ generate a starter config - Missing MCP config → generate a template
mcp.json
- Missing
- Create a branch (
agentrc/fix-readiness-<date>) - Commit generated files with descriptive commit messages
- Open a PR with a summary of what was generated and why
Integration with batch
Extend agentrc batch to support --fix --pr:
agentrc batch readiness --fix --pr repos.txt
This would iterate over repos, clone each, run fix, and open PRs. Combined with the webapp or CI integration, this enables an org-wide "fix it" workflow.
Safeguards
- Never force-push or modify existing files — only add new files or files that don't exist
- Draft PRs by default —
--draftflag (default: true) so repo owners must actively merge - Dry-run mode —
--dry-runshows what would be created without making changes - Require explicit opt-in —
--prflag is required; without it, files are written locally only (current behavior) - Configurable branch prefix — allow orgs to set a standard branch naming pattern
PR body template
The generated PR should include:
- AgentRC readiness score (before)
- What files were generated and why
- Link to AgentRC docs for each generated file type
- Instructions for customizing the generated content
Context
- Discussed in "AgentRC: Quick Chat on Futures" meeting
- Key use case: FDE customer engagements where dozens of repos need onboarding
- Automation was identified as critical for making AgentRC a central tool for the upcoming fiscal year
- Related:
agentrc batchalready supports multi-repo readiness assessment (#batch command)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the existing agentrc analyze, readiness, instructions, and batch commands to understand their entry points and outputs. Define the fix --pr workflow and its dry-run, draft-PR, opt-in, and no-overwrite safeguards, then verify that generated files, commits, branches, PR bodies, and batch execution match the proposal.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100