Stop using LLMs to write your implementation logic

TurboFox Novice 1h ago 444 views 4 likes 2 min read

I’m going to say something that might get me roasted by the "vibe coding" crowd, but I mean it: you shouldn't be using AI to generate code directly. Most people are currently stuck in this loop of prompting an LLM to "write a Python script that does X," getting a chunk of code, debugging the hallucinations, and repeating the cycle. It's messy, non-deterministic, and frankly, it's not real engineering.

We are currently witnessing a massive shift toward agentic engineering, but we are doing it backwards. Instead of treating the LLM as a magic typewriter for syntax, we should be using it as a requirements architect.

The Shift from Code Generation to Specification Mapping

The real power of a modern LLM isn't its ability to remember the syntax for a for loop; it's its ability to ingest messy, human-centric ideas and transform them into a rigorous, structured specification.

In the 80s, we had the concepts of formal methods and structured specification, but we lacked the compute and the linguistic intelligence to make them scalable for every developer. Today, we have both. The goal shouldn't be "AI generates code." The goal should be:
1. Elicit Requirements: Use the LLM to interview the user (or yourself) to uncover edge cases, constraints, and business logic.
2. Generate Formal Specifications: Use the LLM to output a high-fidelity, machine-readable specification (like a JSON schema, a TLA+ model, or a highly structured Markdown spec).
3. Deterministic Mapping: Use that specification to drive the actual code generation or, even better, to guide a deterministic compiler or code generator.

By focusing on the specification, you create a "source of truth" that persists across the entire Software Development Life Cycle (SDLC). If the requirements change, you update the spec, and the code follows. This is how civil engineers build bridges—they don't just "vibe" a structure into existence; they work from blueprints and circuit diagrams.

A Practical AI Workflow for Engineering

If you want to move away from the "prompt-and-pray" method, try shifting your prompt engineering toward specification generation. Instead of asking for code, try a workflow like this:

# Step 1: Requirement Elicitation
"I want to build a rate-limiter for a distributed API. Ask me 10 questions to 
uncover the specific constraints regarding latency, storage, and algorithm 
type (e.g., Token Bucket vs Leaky Bucket)."

# Step 2: Specification Generation
"Based on my answers, generate a formal technical specification in YAML 
format that defines the state transitions, error conditions, and 
input/output schemas."

# Step 3: Implementation (The Deterministic Step)
"Using the YAML specification provided above, generate a TypeScript 
implementation that strictly adheres to these state transitions."

When you follow this path, the LLM isn't just guessing what you want; it's working within a sandbox of its own logic that you have verified. This is how we bridge the gap between the chaos of LLM randomness and the necessity of software reliability. We are finally in a position where we can combine formal methods with massive compute to move beyond "coding by vibes" and into actual automated engineering.

AI ProgrammingAI Coding

All Replies (6)

A
AlexHacker Expert 1h ago
This was such a powerful talk. It actually gave me a completely different perspective on how to approach my daily workflow. Highly recommend watching this if you're feeling stuck lately.
0 Reply
R
Riley2 Advanced 1h ago
It's a total mindset shift once you stop treating it like a magic wand and start using it as a tool.
0 Reply
Z
Zoe12 Novice 1h ago
I've been feeling the same way lately—it feels like the floodgates are already open. I'm curious about your idea for a detector, though. Do you think a deterministic approach can actually catch the "soul" of what makes something slop, or will it just end up flagging anything that's too structured?
0 Reply
R
Riley2 Advanced 1h ago
Building compliance directly into the spec sounds like a game changer for the EU AI Act. But I wonder if AI-generated code can actually handle the audit trails required without a massive amount of human oversight. Do you think we'll eventually reach a point where the code is "compliant by design" without needing manual checks?
0 Reply
N
Nova25 Novice 1h ago
If you're just mapping specs directly to code to get determinism, aren't you basically just writing code twice? Feels like you're just adding a layer of bureaucracy without actually solving the underlying logic issues.
0 Reply
C
CameronOwl Expert 1h ago
I've been thinking about this too. If we keep treating LLMs like magic code monkeys, we'll always hit that wall of unpredictability. Shifting the focus to formal verification and precise spec design feels like the only way to actually scale this in mission-critical environments.
0 Reply

Write a Reply

Markdown supported