Skip to content

Devil's Advocate

devil's advocate is a cli tool that vibe checks your code.

Core trick

Gemini writes adversarial pytest cases, runs them, and feeds crash logs back to patch the source file automatically.

Tags

Description

devil's advocate is a cli tool that vibe checks your code. everyone uses ai to generate scripts now, but they usually break on edge cases. this tool uses gemini to write hostile tests that purposefully crash your app, then uses the error logs to auto-fix the source code. basically, it breaks your code so you don't have to, then patches it instantly. it turns "vibe coding" into actual working software.
NOTDHRUVIL/devil-s-advocate★ 00 forksPythonCreated Dec 13, 2025 · last push Dec 13, 2025

README excerpt

# devil's advocate 😈

autonomous vibe debugger.

most ai code looks right but breaks on edge cases. this tool acts as a hostile qa engineer. it writes aggressive unit tests to purposefully crash your script, then uses the error logs to self-repair the source code.

![success](https://github.com/user-attachments/assets/7e0fccd2-5efe-463d-b168-5432f2efa40f)

### how it works
1. **analyses** your python file.
2. **generates** hostile `pytest` cases (overflows, nulls, type errors).
3. **executes** the attack.
4. **patches** the code automatically if it crashes.

### run it

```bash
# install
pip install -r requirements.txt

# set key
export GEMINI_API_KEY="your_key"

# run ui
python ui.py

Team