logoalt Hacker News

rramadasstoday at 8:23 AM0 repliesview on HN

> Precise specs must always be given

This is the paramount need with AI.

Earlier when we were writing code by hand, since both specification and coding were done by us we could easily iterate over them in our head and thus keep them in sync.

Now the only input is the specification and it must be precise (however incomplete) so that we can be sure that there is no ambiguity when AI interprets it. Iterate and refine the spec as needed and you are assured that the code does what you want it to do. Inform AI to enforce the invariants from the spec directly in code as asserts/contracts and you have guaranteed traceability through code. This is the "Correctness-by-Construction" (CbC) approach to programming.

It would be worthwhile for folks to study the classic specification languages like Z-notation/B-method/Alloy/etc. and learn to use those productively with AI.

Some resources:

VibeContract: The Missing Quality Assurance Piece in Vibe Coding - https://arxiv.org/abs/2603.15691

Specification-Driven Development as the Foundation of AI-Native Enterprise Software Engineering - https://arxiv.org/abs/2607.16680