Prompt-Driven Development: Aligning Ideas, Tests, and Code

A presentation at IJ Conference 2025 in March 2025 in Antalya, Türkiye by Baruch Sadogursky

Slide 1

Slide 1

Prompt-Driven Development: Aligning Ideas, Tests, and Code

Slide 2

Slide 2

We have a Trust problem

Slide 3

Slide 3

Slide 4

Slide 4

AI generated code is not great

Slide 5

Slide 5

On top of that, it is dangerou s

Slide 6

Slide 6

Asking it to fix it is as reliable as the rest of it

Slide 7

Slide 7

Baruch Sadogursky - @jbaru ch × Developer Advocate at large (talk to me!) × Development -> DevOps -> #DPE

Slide 8

Slide 8

shownotes × × × × speaking.jbaru.ch Slides Video All the links!

Slide 9

Slide 9

Software design documents

Slide 10

Slide 10

Software design documents × Write-once × Read-maybe-once × (Mis)understood by humans

Slide 11

Slide 11

So why don’t they work? × Human (mis)understanding × Vague responsibility boundaries

Slide 12

Slide 12

Slide 13

Slide 13

Slide 14

Slide 14

Slide 15

Slide 15

We have a Trust problem (not only with AI)

Slide 16

Slide 16

Next thing you know: It’s a vei n diagram Software I like Software I know really well

Slide 17

Slide 17

But hey, we do have working s oftware sometimes × Good intentions × Professionalism × Tests and QA × End result observation

Slide 18

Slide 18

Until gen AI changed the game × × × × Good intentions Professionalism Tests and QA End result observation

Slide 19

Slide 19

Slide 20

Slide 20

Slide 21

Slide 21

Idea! What if we code in the intent and always verify against it?

Slide 22

Slide 22

Let’s express intent in tests × × × × Instead of SDDs Always up-to-date Generate consensus Parsed by the machine TDD?

Slide 23

Slide 23

Slide 24

Slide 24

What if it (almost) won’t look × × × × × like code? Instead of SDDs Always up-to-date Generate consensus Parsed by the machine Describe behavior instead of tests

Slide 25

Slide 25

What if it (almost) won’t look × × × × × like code? Always up-to-date BDD? Generate consensus Parsed by the machine Describe behavior instead of tests Almost plain English human language

Slide 26

Slide 26

Slide 27

Slide 27

But writing tests first is still a good idea, right?!

Slide 28

Slide 28

Why developers won’t write tes ts first × Developers are solution-biased × We already know how to solve the problem × Legacy code bases

Slide 29

Slide 29

Slide 30

Slide 30

How everything comes togeth er Product managers define what software should do LLM creates specs Specs are reviewed and agreed upon Tests are generated and reviewed Code is written to satisfy the tests -> specs -> design

Slide 31

Slide 31

Why does it work? × × × × × Product managers write text Specs are reviewed by all SDDs are Specs are living docs Everything else is derived from specs Previous steps are protected

Slide 32

Slide 32

PDD is BDD as it meant to be × Define and agree on intent × AI is protected from circular verification × Up-to-date context docs at all times

Slide 33

Slide 33

Slide 34

Slide 34

Slide 35

Slide 35

Slide 36

Slide 36

Rules/Guidelines × Mostly refined by Cascade × The full version covers an existing codebase scenario × Has a link in /docs

Slide 37

Slide 37

New project × Phase 1: Define requirements using the memento pattern × Phase 2: Define test scenarios and specs × Phase 3: Implement tests and business logic

Slide 38

Slide 38

Existing project × Phase 0: Examine code and produce full test coverage × Existing tests are protected

Slide 39

Slide 39

Protection rules × Requirement documents are protected after Phase 1. × If changes are needed, the phase is reset × Test scenarios and specs are protected after Phase 2.

Slide 40

Slide 40

Recovery rules × Source control commits after stages × Requirements changes trigger phase reset and re-alignment × Might convert the project into ”existing” mode

Slide 41

Slide 41

Cascade in Windsurf Pros × Speed × Conversation and reflection × Selectable models Cons × Not IntelliJ IDEA × .windsurfrules system is not ideal

Slide 42

Slide 42

Junie in intellij idea Pros × IntelliJ IDEA × Execution Plan × guidelines.md is better Cons × Speed × Introversion × No chat/reflection mode

Slide 43

Slide 43

Better Rules system? × × × × × Multiple files for different scenarios Flexible actuators File references for reuse Optionally, part of the documentation .cursor/rules for the best implementation ATM

Slide 44

Slide 44

Too much code? × New prompt – new context window × Memento pattern FTW × But what if even the initial context is too large? × Is it the perfect argument for microservices?

Slide 45

Slide 45

Who should fix the code? × Code inspections (linting in VS Code) integration × “Switch from AI generation to tool calling when needed” × Leonid Kuligin – “What is an AI agent? How to develop one?”

Slide 46

Slide 46

Developer productivity

Slide 47

Slide 47

Is it engaging?

Slide 48

Slide 48

Looks like a pretty easy fix…

Slide 49

Slide 49

Are the stops intentional?

Slide 50

Slide 50

Use tools, add guardrails Using IntelliJ IDEA code inspections Physically protect stage assets Machineverify stages compliance

Slide 51

Slide 51

Is it too rigid? × The process feels the opposite of agile × Making changes is a pain × Are there other options?

Slide 52

Slide 52

Use tools, add guardrails Using IntelliJ IDEA code inspections Physically protect stage assets Machineverify stages compliance

Slide 53

Slide 53

(Summary) PDD – BDD finally m a kes sense × Generates consensus × Features are verifiable back to requirements × We can start trusting AI code (🤞) × But there is still work to be done

Slide 54

Slide 54

THANKS! Q&A and Twitter X/Bsky/LinkedIn ads: x @jbaruch x #pdd x speaking.jbaru.ch