The dirty secret of AI-generated tests
Your AI coding assistant writes tests. Great. But when does it write them?
After the code. After looking at the seeded data. After seeing the implementation.
That's not testing. That's the AI confirming its own work. It's like grading your own exam — you'll always pass.
Write the tests BEFORE looking at the data
I built Don Cheli, an open-source framework where TDD is an iron law:
- Describe what you want
- Spec gets generated (Gherkin with acceptance criteria)
- Tests are written from the spec — the AI hasn't seen any data yet (RED)
- Code is the minimum to make tests pass (GREEN)
- Refactor
The framework blocks you from advancing if tests don't exist first. No shortcuts. No // TODO: add tests later.
But wait, there's more
Before you even start coding:
-
/razonar:pre-mortem— Imagine the project already failed. Why? Fix it now. -
/dc:estimate— 4 models estimate effort independently (COCOMO, Planning Poker AI, Function Points, Historical) -
/dc:debate— PM vs Architect vs QA argue your design. Each MUST find at least one problem.
After coding:
-
/dc:security-audit— OWASP Top 10 scan with file, line, and fix -
/dc:review— 7-dimension peer review (performance, architecture, security, style, tests, correctness, clean diff)
The numbers
- 72+ commands
- 43 modular skills
- 15 reasoning models
- 6 formal quality gates
- Works with: Claude Code, Cursor, Google Antigravity
- Languages: EN, ES, PT (commands translate to your language)
Try it
bash
curl -fsSL https://raw.githubusercontent.com/doncheli/don-cheli-sdd/main/scripts/instalar.sh | bash -s -- --global --lang en
GitHub: https://github.com/doncheli/don-cheli-sdd
Open source. Apache 2.0. Stop letting AI grade its own homework.
Top comments (0)