D
Divine Adesiyan
Share:
Tech#Engineering#AI#Agentic#Workflows#Systems#Building#Productivity#Agents#Prompt#Hallucinations

Stop Prompt Engineering: 4 Systems Rules from 7 Months with AI

luisthe.dev ~ terminal01001100 01110101 01101001 011100110x7F4B 0x89C1 GO_MICROSERVICESREDIS::CIRCUIT_BREAKER::CLOSEDHIGH_AVAILABILITY 99.9% UPTIMEPOSTGRESQL // NEON // EVENT_LOOPGo/PHPRedisSystems Architect
Divine AdesiyanSystems Architect & Writer
October 24, 2026
5 min read
809 words
Stop Prompt Engineering: 4 Systems Rules from 7 Months with AI

I have spent the last seven months running AI models inside my daily workflow—testing different providers, modalities, local runners, and agent harnesses.

If there is one lesson that stands out above everything else, it is this:

Reliable AI performance is a systems engineering problem, not a prompt writing competition.

Most people treat an LLM like a magic search box. They spend twenty minutes crafting a paragraph-long prompt, get an inconsistent result, and wonder why the output falls apart. If you want consistently high-quality outputs across complex technical tasks, you have to build structure around the model.

Here are the four practical rules I rely on every day.


# 1. The Prompt Is Only the Tip of the Stack

When you type a message into an AI client or agent harness, that raw text is almost never sent in isolation.

A production harness wraps your input in layers of context before it ever reaches the model's inference engine:

┌────────────────────────────────────────────────────────┐
│ 1. Model Baseline (Weights & Context Window)          │
├────────────────────────────────────────────────────────┤
│ 2. System / Modelfile Persona (Tone & Boundaries)      │
├────────────────────────────────────────────────────────┤
│ 3. Workspace Context (Active Files, Git Diffs, Rules)  │
├────────────────────────────────────────────────────────┤
│ 4. Available Tools & Execution Schemas                 │
├────────────────────────────────────────────────────────┤
│ 5. Your User Prompt ("Build feature X...")             │
└────────────────────────────────────────────────────────┘

If you leave layers 2, 3, and 4 blank, your user prompt has to do all the heavy lifting. That is why results vary wildly between sessions.

The fix is compartmentalization through persona and instruction files.

Depending on your stack, you can implement this at two distinct levels:

  1. Runtime / Modelfile Level (Modelfile, system API parameters): Sets low-level parameters, token budgets, and base operational persona directly in the model initialization.
  2. Workspace / Markdown Level (AGENTS.md, .cursorrules, CLAUDE.md): Injected by the harness on every run to define domain-specific standards—architecture patterns, formatting rules, linting constraints, and forbidden anti-patterns.
<!-- Example: Focused engineering persona contract -->
Role: Principal Backend Architect
Focus: Distributed systems, idempotent API design, strict zero-trust validation.
Constraints:
- Never introduce new third-party dependencies without explicit approval.
- Enforce integer subunits (kobo/cents) for all financial ledgers.
- Keep responses strictly technical; skip conversational filler.

When you define discrete roles—whether for systems programming, legal contract review, or database tuning—the model stays inside its lane and executes with professional rigor.

(I will break down the exact structure I use for modular persona files in an upcoming post.)


# 2. Explain It Like You Are Teaching a Five-Year-Old

Frontier models have absorbed trillions of tokens of human knowledge. Because of that massive latent space, an unconstrained model often tries to "show off."

Ask for a simple CRUD endpoint with vague instructions, and you might get back an over-engineered enterprise microservices pattern with six layers of abstraction, factory classes, and unneeded external libraries.

The remedy is radical clarity.

Explain the task from first principles. If you can clearly conceptualize the step-by-step logic in your head and explain it plainly without ambiguity, the model will meet or exceed your target:

  • Define what goes in (the exact input format).
  • Define what happens in the middle (the core transformation).
  • Define what comes out (the exact expected state).
  • Explicitly state what not to touch.

When you remove ambiguity, you strip away the model's need to guess.


# 3. Catch the First Mistake Before Delusion Sets In

Collaboration with AI models requires the same feedback loop discipline as working with human engineers: verify early, verify often.

When an agent begins working through a multi-step problem, pay attention to the initial reasoning steps and scratchpad logs. If the model makes a bad assumption in step 1, it will not self-correct in step 5. Instead, it will rationalize that bad assumption, building layers of hallucinated logic on top of a flawed foundation.

Step 1: Flawed assumption about database schema
   ↓
Step 2: Builds queries based on imaginary columns
   ↓
Step 3: Writes mock tests that pass against fake data
   ↓
Step 4: Complete hallucination drift (hours wasted)

Read the reasoning trace or initial plan. If you spot a misunderstanding, interrupt the run immediately. Correcting one bad assumption at step 1 takes five seconds; unpicking forty corrupted files at step 10 can take hours.


# 4. Enforce Pre-Execution Contracts

Do not let an agent mutate your codebase or execute commands blindly. Build the habit of requiring documentation before execution.

Instruct your agent to supply an execution blueprint before touching any state:

Before applying any modifications:
1. List every file you intend to touch.
2. Provide a 2-3 line summary of each proposed change.
3. Outline the manual or automated test steps needed to verify correctness.
4. Wait for my confirmation before proceeding.

This simple contract accomplishes three critical things:

  1. Auditability: You have an exact record of what the agent touched, what can be tested, and what the expected result is.
  2. Alignment verification: You verify that the model actually understands the task before any code is modified.
  3. Zero surprise breaks: It completely eliminates situations where an agent quietly rewrites an unrelated utility file or deletes critical logic.

# Summary

The difference between wrestling with AI and getting genuine engineering leverage comes down to operational discipline:

Practice Old Approach The Systems Approach
Setup One massive prompt in an empty chat Modular instruction files (Modelfile / Markdown rules)
Direction Vague, high-level requests First-principles clarity with explicit constraints
Verification Inspecting the code after everything breaks Reviewing thought logs early to stop hallucination drift
Execution Letting the model run wild Requiring a pre-flight change contract and test plan

Treat your AI setup like software architecture. Build clean interfaces, define strict boundaries, demand auditability, and the outputs will take care of themselves.

Newsletter Dispatch

Enjoyed this breakdown?

Get email notifications when new deep dives on distributed architecture and systems design are published. Zero spam, unsubscribe anytime.

luisthe.dev ~ terminal01001100 01110101 01101001 011100110x7F4B 0x89C1 GO_MICROSERVICESREDIS::CIRCUIT_BREAKER::CLOSEDHIGH_AVAILABILITY 99.9% UPTIMEPOSTGRESQL // NEON // EVENT_LOOPGo/PHPRedisSystems Architect

Divine Adesiyan

Systems Architect & Writer

Technical Product and Project Manager with 8+ years of cross-functional experience steering product strategy, technical architecture, and end-to-end execution across high-throughput fintech, edtech, e-commerce, and enterprise SaaS platforms. Proven track record bridging technical engineering depth with product discovery, PRD authoring, backlog prioritization, and iterative user-driven rollouts. Adept at orchestrating Agile squads to launch resilient microservices architectures, scale transactional engines to 50k+ active users, reduce API response times by 70%, and optimize operational throughput while aligning engineering velocity with measurable business KPIs.