Maintain strong tests while using AI coding agents.
Project details
agent-roast actively prevents AI coding agents from bypassing essential quality checks in your code. It scrutinizes changes, ensuring that tests and coverage thresholds remain robust, rather than allowing builds to pass through weakened checks. This tool runs offline without any tokens, making it a reliable addition to any development workflow.
agent-roast serves as an essential tool for ensuring the integrity of code checks by preventing AI coding agents from compromising the reliability of test results. This innovative solution detects instances where builds turn green not by rectifying the underlying code, but by undermining various checks—such as loosening assertions, bypassing tests, lowering coverage thresholds, or allowing CI steps to fail. Unlike traditional linters that may overlook these subtle but crucial changes, agent-roast performs a comprehensive comparison of code modifications, identifying discrepancies in real-time as a hook integrated into Git workflows or pull request checks. The key features of agent-roast include:
To demonstrate its functionality, agent-roast can be executed with the following commands:
npx agent-roast demo # Run a scripted example in a temporary repository
npx agent-roast # Review uncommitted changes in the current repository
The tool actively monitors pull requests, ensuring changes maintain the integrity of the codebase by blocking weak modifications as specified in its configuration file. The following YAML describes how to set up agent-roast in GitHub Actions:
# .github/workflows/agent-roast.yml
name: Agent Roast
on: pull_request
permissions: { contents: read, pull-requests: write }
jobs:
audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with: { fetch-depth: 0 }
- uses: Nari-Ab/agent-roast@v1
with: { comment: true }
agent-roast is designed to catch a wide variety of rule violations that can indicate weakened checks, including:
Users can customize rules and severities for various scenarios in a .agentroastrc.json configuration file, ensuring that the tool fits seamlessly into the development process.
By utilizing agent-roast, developers can trust that their code remains reliable and that changes—especially those made by AI agents—adhere to established quality standards. This automated assurance mechanism stands out in a landscape where AI-assisted coding is becoming increasingly prevalent, providing an essential layer of oversight in software development workflows. For detailed documentation, users can refer to the agent-roast documentation and explore how to maintain quality and performance in their coding practices.
Comments
0Start the conversation
Share the first comment.