Trigger-Specific Prompts
GitAuto loads different XML prompt files depending on what triggered the run - a new PR, a CI test failure, a review comment, or a scheduled task. Each prompt contains specialized instructions tailored to that scenario, ensuring the model approaches each type of work with the right mindset and context.
Why This Exists
A test-failure response requires fundamentally different context than a new-PR response. When fixing a test failure, the model needs to focus on error logs, understand what changed, and produce a minimal fix. When creating a new PR, the model needs to understand the task, explore relevant source files, and write comprehensive tests. A one-size-fits-all prompt led to poor results in both cases - the prompt was either too generic to be useful or too specific to one scenario. By splitting prompts per trigger type, each set of instructions can be optimized independently.
Why Models Need Explicit Context
Models have no awareness of what triggered them. A model receiving "fix this test failure" doesn't inherently know whether it was triggered by a CI failure, a reviewer comment, or a scheduled run. Each trigger implies different constraints - a review comment means someone is watching and expects a response; a schedule trigger means no one is waiting - but models treat all inputs identically unless explicitly told the context. Without trigger-specific instructions, the model applies the same generic approach to every situation, missing the nuances that make each scenario different. It cannot infer intent from the input alone because it has no memory of how or why it was invoked.
How It Works
When a trigger fires, GitAuto determines the trigger type and loads the corresponding XML prompt file. The main trigger types are:
- New PR - instructions for implementing features or writing tests from a GitHub issue description
- Test failure - instructions for analyzing CI logs and creating targeted fix commits
- Review comment - instructions for understanding reviewer feedback and making requested changes
- Schedule - instructions for proactive work like generating tests for uncovered files
The prompt files use XML structure for clear section boundaries. They are injected into the system message alongside other context like repository rules and coding standards.
Related Features
- Coding Standards - universal rules injected alongside trigger-specific prompts
- Test Failure Trigger - the trigger type that benefits most from specialized prompts
Need Help?
Have questions or suggestions? We're here to help you get the most out of GitAuto.
Contact us with your questions or feedback!