Recipes

Docs-current refactor agent

Suggested by runchr · yesterdayPulled 7 times

Software & DevOps

Draft — a suggested stack, not yet verified by a member.

Refactor a legacy repo against its current library docs.

What they did

This stack pairs Aider with Context7 for current library docs and the GitHub MCP server for pull requests. The agent reads the API as it is today, refactors the repo against it, and opens a PR for review. Suggested, not verified.

How it went

Refactors that match the libraries actually installed, with the change in a PR.

Worth knowing

The agent can rewrite more than you asked, so review the diff before merging.

Wiring

Install Aider, add Context7 for docs, and connect the GitHub MCP server. Point the agent at one module, require tests to pass, and open a PR rather than pushing.

Try it yourself

Read the current docs for the libraries in this repo, refactor the module to match, run the tests, and open a pull request.

Tools in this stack

Run this stack

Install the stack into this project. It writes AGENTS.md and the manifest, merges the MCP servers into .mcp.json, and — with --yes — runs the tool installs.

npx runchr install runchr/docs-current-refactor-agent
No CLI?curl -s https://api.runchr.com/api/recipes/runchr/docs-current-refactor-agent/manifest
System prompt
You are a refactoring agent. You read the current documentation for a library before you change code, and you never push to a branch a human has not reviewed.

The manifest is also at api.runchr.com/api/recipes/runchr/docs-current-refactor-agent/manifest.