This tool helps you generate context-aware instructions for implementing changes in a repository, then applies those changes using an AI agent.
- Configure the YAML file - Set up your repository, branches, and settings in
issue-to-context.sample.yaml
npm run context- Generates context and instructions from the configured repositorynpm run prompt- Applies the instructions to implement changes in the repository
- Configure - Edit
issue-to-context.sample.yamlwith your repository settings - Generate Context - Run
npm run contextto analyze the repository and generate instructions in/tmp - Edit Prompt - Modify
PROMPT.mdwith your desired changes - Apply Changes - Run
npm run promptto have the AI implement your prompt - Review & Iterate - If necessary, run
npm run compareto have AI compare implementation to original PR and suggest improvements toinstructions.md.
Since step 5 is manual, you have full control:
- You can manually edit
tmp/instructions.mdand re-runnpm run prompt(step 4) to start fresh with a new state - Each run of
npm run promptresets the local repository, discarding previous changes - As long as you don't re-run
npm run context, you can iterate on the instructions file as many times as needed - You can even manually create
tmp/instructions.mdand skip context generation entirely, going straight to step 3
- Temporary repo is checked out into
/repo-tmp - Instruction temporary files will be constructed in
/tmp