How to Use RepoPrompter with ChatGPT
• End-to-End Workflow
This guide shows how to collect the right repository context, prompt ChatGPT effectively, and safely apply AI code changes back to your project using RepoPrompter’s XML diff flow.
1) Prepare Your Context
- Select only files ChatGPT needs: the component, its types, and any shared utils.
- Include a short architecture summary if the code is non-trivial.
- Favor interface/type files over implementation where possible to save tokens.
2) Prompt Template for ChatGPT
You're a senior engineer. Review the following files and propose improvements.
Return changes in XML diff format only.
Goals:
- Fix [bug/feature]
- Maintain public API and tests
- Follow our TypeScript/React conventions
Provide diffs for changed files only.3) Apply Changes Safely
- Paste ChatGPT’s XML diff into RepoPrompter.
- Preview all file changes and uncheck anything unexpected.
- Apply and run your tests; commit with a clear message.
Tips for Large Repos
- Start with a single module; iterate with follow-up prompts.
- Summarize large files instead of pasting full contents.
- Ask for minimal diffs; avoid full-file rewrites unless necessary.