{"slug": "stop-letting-ai-mark-its-own-homework", "title": "Stop Letting AI Mark Its Own Homework", "summary": "A developer warns that AI coding tools like Claude Code produce 'almost right' code that passes a glance but fails in production, creating a circular trust problem when the same AI writes and verifies code. To solve this, they built Greenlight, an open-source tool that enforces test-driven development by isolating agents: one writes tests from contracts, another implements until tests pass, and a third scans for vulnerabilities, with the test runner as the sole judge.", "body_md": "Last month I watched Claude Code write a beautiful authentication module. Clean abstractions, sensible error handling, well named functions. It looked like something a developer would write. Then I ran it. It failed immediately. The module was calling a method that didn't exist on the object it was importing. Claude hadn't made a logic error. It had made a confidence error. It wrote code that read correctly, explained correctly, and looked like it would work. But nobody had asked it to prove it. I stared at the screen for a minute, fixed the bug manually, and then thought: how many times will this happen again? Who is checking if all this code actually works?\n\nHere's what I've noticed after a year of building with AI coding tools: the failure mode isn't that the code is bad. It's that the code is almost right. Close enough to pass a glance. Close enough that Claude will confidently explain why it works. Close enough that you could ship it, and if you don't have guards in place bugs will show up in production.\n\nThis isn't a Claude problem per se, it's an LLM problem. These models are trained to produce plausible output. And plausible code is the most dangerous kind of code, because it doesn't look wrong. The traditional answer to this has always been testing. Write the test first, write the implementation, run the test, see green. TDD isn't new. But here's what changed: the developer writing the code is now also an AI, and if the same AI writes the code and decides whether the code works, we've got a circular trust problem.\n\nReviewing your own code is basically marking your own homework. AI is no different.\n\nSo I went looking for answers. The Claude Code ecosystem has some genuinely brilliant tools. GSD, short for Get Shit Done, stood out immediately. It interviews you about what you're building, creates atomic plans, and executes in phases using fresh subagents with clean context windows. It solves a great part of the context rot problem. If you haven't tried it, you should.\n\nBut after a few weeks, I kept hitting the same wall. GSD manages complexity and it's rather good at it. The planning is structured, the execution is disciplined, the main context stays clean. But when it comes to verification, the same agent that writes the code also checks the code. It basically asks \"what must be TRUE for this to work?\", which is a sensible question. But the agent is answering a question about its own output.\n\nGSD was great at planning, but we also needed a trust boundary.\n\nThe idea is simple: go back to basics and embrace TDD. What if the agent that writes the test is not allowed to write the implementation? That one constraint changes the flow. Once you enforce that separation, the agent can't fake confidence. The tester doesn't know how the code will work. The coder can't change the tests. And the thing that decides pass or fail isn't AI at all, it's your pytest, jest, go test. A mechanical process with no opinions and no ego.\n\nI called it Greenlight. Green means done. Not \"the agent thinks it's done.\" Actually done.\n\nIt has agents, each with hard boundaries. Here is the core team:\n\nThe test runner sits in the middle and judges. Not Claude. Not any AI. The machine. If tests pass, we move forward. If they don't, the coder keeps working. The project lives at [github.com/atlantic-blue/greenlight](https://github.com/atlantic-blue/greenlight).\n\nClaude Code is powerful but permissive. It writes code, reviews its own work, and moves on. There's no external verification. Greenlight fixes this by enforcing agent isolation: one agent writes tests from contracts, another implements until tests pass, a third scans for vulnerabilities, and the test runner is the only judge. No agent ever sees its own tests.\n\nThis matters because:\n\nA set of Claude Code slash commands, agents, and engineering standards that enforce test-driven development:\n\n`/gl:init`\n\n, `/gl:design`\n\n, `/gl:slice`\n\n, `/gl:ship`\n\n, and so on) that orchestrate the workflowClaude Code just shipped Agent Teams, an experimental feature where multiple Claude sessions coordinate, message each other, and work in parallel. The agent roles already exist in Greenlight. The trust boundaries are already defined. What Agent Teams adds is concurrency and real-time coordination.\n\nRight now, Greenlight's agents run sequentially. With Agent Teams, picture the test writer and implementer running as parallel teammates. The security agent scanning code as it's written, not after. The architect coordinating as team lead. Slices without dependencies executing simultaneously. All communicating through Claude Code's native messaging, all respecting their information boundaries.\n\nThe roles exist. The primitives exist. Wiring them together is the natural next step.\n\nThe real bottleneck isn't capability. The bottleneck is trust.\n\nWe're at a place in time where AI coding tools are good enough that capability isn't the limiting factor. Claude can write authentication modules, API gateways, database migrations, React components, infrastructure. The models will keep getting better. Costs will keep dropping. The bottleneck is trust.\n\nCan you trust that what it wrote actually works? Can you deploy it without manually reading every line? Can you sleep at night knowing unreviewed code is running in production? TDD has always been the answer to that question. It just needed to be adapted for a world where the developer is also an AI.\n\nHappy coding.\n\nIf you're building with Claude Code and want to stop vibe coding, give it a go. Or tell me I'm wrong. I'd genuinely love to hear how others are solving the trust problem. Greenlight is open source, MIT licensed: [github.com/atlantic-blue/greenlight](https://github.com/atlantic-blue/greenlight).\n\n*First published in my LinkedIn newsletter, Built from Scratch.*\n\n*This was originally published on juliantellez.com. It is part of my newsletter on video, streaming, and building reliable systems from scratch: the architecture, the tradeoffs, and the occasional 3am incident.*\n\nIf it was useful, [subscribe for the next one](https://juliantellez.com/#newsletter). No spam, unsubscribe anytime. If you are building something similar and want to compare notes, [say hello](mailto:hello@juliantellez.com). I read every message.\n\nBuilt from scratch, like everything here.", "url": "https://wpnews.pro/news/stop-letting-ai-mark-its-own-homework", "canonical_source": "https://dev.to/_juliantellez/stop-letting-ai-mark-its-own-homework-4p07", "published_at": "2026-07-29 13:01:09+00:00", "updated_at": "2026-07-29 13:06:48.649535+00:00", "lang": "en", "topics": ["artificial-intelligence", "developer-tools", "ai-agents", "ai-safety"], "entities": ["Claude Code", "Greenlight", "GSD", "Atlantic Blue"], "alternates": {"html": "https://wpnews.pro/news/stop-letting-ai-mark-its-own-homework", "markdown": "https://wpnews.pro/news/stop-letting-ai-mark-its-own-homework.md", "text": "https://wpnews.pro/news/stop-letting-ai-mark-its-own-homework.txt", "jsonld": "https://wpnews.pro/news/stop-letting-ai-mark-its-own-homework.jsonld"}}