This is my first time here, but I really need good reviews and insights from professionals and people.
I built Ghost because I have a bad habit: I write code first, tell myself I’ll write the tests later, and then never do because setting up mocks and imports breaks my flow state. I wanted a tool that acts less like a chatbot and more like a background daemon that handles the grunt work. What it does: Ghost watches your file system. When you save a .py file, it: Scans Context: Instead of dumping raw files, it uses Python’s ast module to map functions and classes to minimize token usage. Generates: Writes a pytest suite using your local LLM (Ollama) or Groq. Executes & Heals: Runs the test in a subprocess. If it fails (e.g., ModuleNotFoundError or syntax errors), it captures the stderr, feeds it back to the model, and patches the file automatically. The "Judge" Problem: A big issue with AI testing tools is that they often modify tests to match buggy code ("testing the implementation"). I added a "Judge" step: if a test fails due to a logic error (AssertionError), a separate prompt analyzes whether the source code is buggy or the test is wrong. If the code is buggy, it halts and alerts you rather than fixing the test to pass. Stack: Python (Watchdog, Rich) LLM Support: Ollama (Local), Groq (Fast), OpenAI. License: MIT It’s definitely still in beta, but the self-healing loop is working well for my side projects. I’d love feedback on the AST context injection strategy or the self-healing logic. Repo: https://github.com/tripathiji1312/ghost Pip: pip install ghosttest