Test-Driven Vibe Development: Integrating Quality Engineering with AI Code Generation

asos · E-commerce · 2025 · source Agentic: yes · promotional bias: med · source-backed · extracted with prompt 0.5.6 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: AI-assisted software delivery and quality engineering

ASOS needed to use LLM code generation without accepting the reliability risks of unstructured vibe coding, while building an internal stock discrepancy reporting system with a small part-time team.

Constraints:

Architecture

ASOS created Test-Driven Vibe Development, a workflow that puts acceptance criteria, BDD, TDD, and architecture-driven testing before AI-generated code. Agents generate tests and implementation in short validated loops for a backend API, Azure Functions, data stores, and React frontend.

Diagram confidence: reconstructed (reconstructed from prose).

flowchart LR
  architecture_driven_test_strategy["Architecture-driven test strategy"] --> acceptance_and_behavior_tests["Acceptance and behavior tests"]
  acceptance_and_behavior_tests --> ai_code_generation_agents["AI code generation agents"]
  ai_code_generation_agents --> generated_application["Generated application"]
  generated_application --> validation_loop["Validation loop"]
  validation_loop --> ai_code_generation_agents
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
Architecture-driven test strategy Uses architecture diagrams to define a relevant test strategy before generation. Acceptance and behavior tests
Acceptance and behavior tests Executable requirements used to guide and check generated code. AI code generation agents, Validation loop
AI code generation agents Generate tests and implementation for scoped feature slices. Acceptance and behavior tests, Generated application
Generated application Stock discrepancy reporting MVP with backend API, Azure Functions, data stores, and React frontend. Validation loop
Validation loop Runs tests and catches defects or hallucinations early. Generated application, AI code generation agents

Data flow

The workflow begins with architecture and acceptance criteria, converts expected behavior into tests, uses AI agents to generate code against those tests, and validates each increment before moving to the next feature slice.

3 supporting quotes
“using AI agents to generate both tests and code in a structured workflow that prioritizes acceptance test-driven development (ATDD), behavior-driven development (BDD), and test-driven development (TDD).”summary, stated
“Rather than generating functional code first and testing afterward (as in typical vibe coding), TDVD inverts this sequence”summary, stated
“Clear testable requirements as code are generated before functional implementation, ensuring alignment between what's intended and what's built.”summary, stated

Why this architecture

TDVD exists because LLMs are probabilistic and context-limited; test-first structure gives the model narrow targets and automated quality gates instead of asking it to improvise large systems.

3 supporting quotes
“LLMs built on the transformer architecture are probabilistic pattern-recognition engines that predict the next token by assigning probabilities to word sequences.”summary, stated
“This means accuracy declines as context increases and attention diffuses across more tokens.”summary, stated
“Bugs and hallucinations are caught early before they become costly to fix.”summary, stated

Models used: LLM code generation agents

Scale

Alternatives considered (roads not taken)

Typical vibe coding with code first and tests later

Rejected because: It exposes teams to hallucinated or low-quality code without early executable requirements.

“Rather than generating functional code first and testing afterward (as in typical vibe coding), TDVD inverts this sequence”summary, stated

Traditional manual delivery

Rejected because: The team estimated it would take much longer, though the baseline was influenced by stack unfamiliarity.

“The 7-10x acceleration is calculated against an estimate based on the team's lack of experience with the technology stack.”summary, stated

Patterns

eval-driven-development (quality)

Tests and acceptance criteria are written before generated code and used as continuous validation gates.

“Code generation is continuously validated against predefined requirements, creating an automated quality gate.”summary, stated

context-engineering (workflow design)

The team kept features small and iterations short to prevent context loss across long prompts.

“The team initially failed to keep features small enough and iterations short enough, resulting in context loss between lengthy prompt phases.”summary, stated

Tradeoffs

Use test-first AI development.

Chose TDVD with ATDD, BDD, and TDD over Unstructured vibe coding.

Rationale: The tests constrain model output and catch hallucinations early.

“Security and quality risks can be managed proactively rather than discovered late in the cycle.”summary, stated

Gotchas (what bit them)

Long prompts can lose development context.

Root cause: Transformer attention becomes thinly spread across large, complex contexts.

Resolution: Keep feature slices and iteration loops short, with tests anchoring intent.

“The probability function used in this process (softmax) has inherent limitations when handling large, complex contexts, as attention becomes "too thinly spread." This means accuracy declines as context increases and attention diffuses across more tokens.”summary, stated

Headline acceleration can be overstated if the baseline team lacks stack familiarity.

Root cause: The comparison used an estimate from a team unfamiliar with the technology stack.

Resolution: Treat the 7-10x claim as promising but caveated.

“The author acknowledges "another team might have quoted something leaner," which is a significant caveat. A more experienced team using the same technology without AI assistance might have delivered in 1-2 months rather than 4-6, which would reduce the acceleration factor considerably.”summary, stated

Evaluation

ASOS evaluated the workflow through delivery time, active development hours, test validation, and caveated comparison to traditional estimates.

Metrics: 4 week MVP delivery. · Approximately 42 active development hours. · 7-10x acceleration claim with baseline caveat. · Continuous validation against predefined test requirements.

“while maintaining quality through continuous validation against predefined test requirements”summary, stated
“With a team of effectively 2.5 people working part-time, they delivered a full-stack MVP”summary, stated

Outcomes

The case is a single internal MVP, not a broad production rollout; the clearest scale facts are 2.5 part-time people, four weeks, and 42 active hours.

“delivered a full-stack MVP (backend API, Azure Functions, React frontend) in 4 weeks”summary, stated