DEV Community

Samyak Jain
Samyak Jain

Posted on AI-assisted

I checked an AI-built login feature against its own PRD. Here is what it missed.

AI coding assistants write code that looks right. The question I kept asking was a different one: does it do what the requirements said?

A PR reviewer looks at the diff. Nobody looks at the diff against the original PRD. So we built a tool for that, and ran it on a real feature to see what happens. This post is what we found, including where it fell short.

I'm one of the maintainers of wardenIQ, the open-source tool I used. Take that into account.

wardenIQ dashboard

The setup

  • One feature: Authentication.
  • 12 frozen requirements, written up front so the target could not move.
  • A codebase with seeded defects, so we knew the right answers in advance.
  • Four stacked PRs implementing the feature step by step.

Step 1: requirements to test cases

I uploaded four requirement documents. In about 90 seconds wardenIQ produced 41 typed, prioritised test cases (functional, E2E, API, non-functional), each built from reusable steps.

That is the part people expect. It is not the interesting part.

Step 2: does the real code do it?

The "Mind Map" analysis reads the actual production code, the way an outside reviewer would, and judges every feature as covered, partial or uncovered, citing the files it read.

On this feature it scored 82.9% (34 of 41) covered. Three things stood out:

  1. "Written" is not "enforced." It told the difference between validation logic that exists and validation logic that is actually wired up, and it tracked that across a branch change instead of matching keywords.
  2. It caught a seeded security regression, naming the disabled check and quoting the code comment the author used to justify disabling it.
  3. It flagged a risk we had not seeded: a possible race condition in an in-memory store used for replay protection.

We also ran CodeRabbit, a PR reviewer, on the same PRs. It independently caught the same security defect and the same race-condition risk, by a different route (line-level comments on the diff). That is a good sign for both tools. They answer different questions: CodeRabbit asks "what is wrong in this diff?", wardenIQ asks "does the code satisfy the requirements?" I would run both.

Where it fell short

I would rather you hear this from me:

  • One feature is a data point, not a benchmark. This should be repeated on more features before anyone draws broad conclusions.
  • Two of its own analysis engines disagreed on a token-rotation case, reaching opposite conclusions on the same commit. It is three engines, not one oracle.
  • Test matching is weak. When checking whether an automated test exists for a requirement, it matched two seeded test-quality cases to unrelated tests at 20-33% confidence, with no clear difference between a strong and a weak match.
  • Results from the PR-level coverage check varied between runs.

We are working on these.

What it cost

The whole pilot used about 828K tokens, roughly $0.53, on a hosted model. It also runs on a local Ollama model, where cost is not a meaningful number. (That is observed usage on one feature, not a price per PR.)

Try it

It is MIT licensed and self-hosted. You bring your own model: Ollama, OpenAI, Anthropic, Gemini, Mistral, Groq or Bedrock. There is a public Docker image, so there is nothing to fork or build.

macOS / Linux:

curl -fsSL https://raw.githubusercontent.com/adlerqa/wardeniq/main/install.sh | bash
Enter fullscreen mode Exit fullscreen mode

Windows:

powershell -c "irm https://raw.githubusercontent.com/adlerqa/wardeniq/main/install.ps1 | iex"
Enter fullscreen mode Exit fullscreen mode

Then open http://localhost:8001. Choose the bundled mode for a fully local trial.

Repo: https://github.com/adlerqa/wardeniq

If you try it on your own PRD and it gets something wrong, open an issue. Honest bug reports are the most useful thing you can send.

Top comments (0)