Engineering vibe coding: AI inside guardrails

Yingchen Liu
How I moved from Cursor pairing to Claude Code and Codex agent teams by treating AI as a capable engineering team member: explicit behaviour, architecture, design rules, reusable workflows and evidence—not prompts alone.
- AI-assisted engineering
- System design
- Engineering workflow

01
What I mean by engineered vibe coding
Vibe coding is the feeling of moving from an idea to working software at extraordinary speed with an AI coding assistant. Engineered vibe coding keeps that speed, but places it inside a system that makes the product maintainable, reviewable and safe to change.
I developed this approach across Mapify, Henri and AxIT. Henri was the main proving ground: I was validating a personal AI tutor and, at the same time, validating whether AI could help build a serious production product rather than only a demo. Mapify extended the method across a mature web and backend estate. AxIT later added Codex agent teams, isolated worktrees and stricter evidence boundaries for mobile, shared calculations and release work.
The principle is simple: I do not ask an agent to replace engineering judgement. I use it to amplify that judgement. I remain responsible for understanding the vague requirement, exposing the trade-offs, choosing the architecture, defining what evidence is sufficient and deciding when the result is ready.
02
The problem
The attraction of vibe coding is real: follow the idea, describe the next move and watch working software appear at a speed that used to feel impossible. The uncomfortable questions are equally real. Can another engineer maintain it? How is quality protected? Is the speed creating a backlog of hidden assumptions and technical debt?
The old answer treated speed and quality as opposites. Move quickly for a demo, or slow down for serious engineering. Better models changed the size of that trade-off, but they did not remove engineering responsibility. An assistant can understand a large codebase, learn conventions and write strong code; it can also confidently optimise the wrong requirement, repeat an old mistake or hide uncertainty behind a convenient fallback.
The useful question therefore became: how can I use AI for high-quality product development, not merely fast code generation? My answer was to let AI ‘vibe’ inside guardrails. The freedom remains inside the task; the product behaviour, architectural boundaries, review points and evidence stay explicit.
03
The operating system around the coding agent
Architecture
The engineer leads the problem and the evidence. The agent accelerates the work inside explicit product, architecture and delivery guardrails.
Human judgement
What does the engineer decide?
Turn an ambiguous request into a reviewable solution before optimising for implementation speed.
- 01
Frame the real problem
Clarify the user outcome, current system, stakeholders, constraints and what is still unknown.
- 02
Choose the boundaries
Compare architecture, security, performance, compatibility and technical-debt trade-offs.
- 03
Define acceptable evidence
State which tests, environments and human decisions can prove each part of the change.
AI-assisted execution
How does AI execute safely?
Give the agent durable context, a bounded plan, reusable workflows and a verification loop.
- 01
Read the project rules
Load the behaviour spec, architecture, design system, critical rules and current status.
- 02
Plan, build and ask
Propose the approach, implement within scope and stop to ask instead of silently guessing.
- 03
Test, audit and record
Run the right checks, review the complete diff, preserve evidence and update the shared state.
A progression, not a tool switch
I started with Cursor as a close coding assistant: useful for exploring a code path, drafting a change and shortening the distance between a question and a working implementation. That improved code-level throughput, but the quality of the result still depended heavily on how much project context I could fit into the conversation.
Claude Code changed the unit of collaboration from a code fragment to a repository. The first retained Henri commit containing its project instructions is from 5 December 2025; by January 2026 I had reorganised the supporting documentation and expanded the rules and reusable skills. The assistant could now start by reading how the product was supposed to behave, how the UI was designed, how the system was structured and how work should be verified.
Codex agent teams extended the same operating model. On AxIT, isolated agents and worktrees can research, implement or verify different parts of a problem in parallel. That only works because ownership is explicit: each agent has a bounded task, repositories hold durable specifications, unrelated work is preserved and evidence is reported at the level it actually proves.
Treat the assistant like a capable junior engineer
My most useful mental model is not autocomplete and not an autonomous replacement for a team. It is a highly capable junior engineer: fast, broadly knowledgeable, able to learn, and strong at implementation, but still short of the product history, organisational context and judgement that experienced engineers build by living with consequences.
That changes how I communicate. I act as the lead and architect. I explain the goal and constraints, review the proposed approach, make the hard trade-offs and give feedback on recurring mistakes. I expect the assistant to participate in requirements discussions and technical design, not to receive an ambiguous ticket and quietly decide what the company meant.
The comparison also explains why communication cost does not disappear. Faster implementation can reduce development cost dramatically, but alignment still matters. A product manager, domain expert and engineer still need to agree on behaviour. The difference is that AI can turn those conversations into precise, reviewable artefacts much faster.
Teach the project before asking for code
Each repository needs a compact entry point—originally CLAUDE.md, and later agent guidance that works across tools. That file does not try to contain the whole project. It routes the assistant to the sources that own behaviour, architecture, design, release procedure and verification.
The rules cover ordinary code quality, but also the things a generic model cannot infer safely. On Henri that included Apple Human Interface Guidelines, a design system with spacing, radius, typography and colour tokens, and a hierarchy of base and application components. A new screen could therefore reuse a coherent visual language even when no final design file existed.
The system made detailed decisions reusable as well: semantic typography rather than one-off font sizes, consistent spacing and radius scales, explicit timestamp formats, multilingual search behaviour, theme colours and component states. Those are small decisions individually; together they stop an AI-generated interface from looking and behaving like unrelated screens.
I also keep ‘critical rules’: concise records of mistakes that must not recur. During Henri's pre-release MVP, one rule rejected backwards-compatibility scaffolding that no real user needed; after launch, the production rule changed to preserve live data and behaviour. If a fallback once hid a configuration error, another rule can require failure to stay visible instead of inventing a default. If a component bypassed the spacing scale, the rule can point back to the token. This turns feedback from one task into training for every later task, while still allowing the rule to evolve with the product stage.
Turn requirements into behaviour the team can review
A requirements document—often exported from a product workspace—is an input, not an implementation plan. I ask the assistant to rewrite it as a behavioural specification: what a person can do, what the system shows, which state changes, and what must happen when an operation fails.
For combinatorial behaviour, the assistant drafts truth tables or state matrices so every meaningful combination has an explicit result. For workflows, it drafts state machines and flow diagrams. It enumerates edge cases, proposes the data model and lists deployment constraints that could make a locally correct design fail in production.
The assistant does the writing and analysis; the product and engineering owners do the confirmation. That distinction matters. A junior engineer can propose a table structure, but the lead must confirm ownership, lifecycle, migration and privacy. A model can enumerate states, but the team must decide which transitions are valid. The artefact makes the disagreement visible before code buries it.
- Truth tables expose what should happen for every meaningful combination of flags, roles or states.
- State machines make lifecycle and transition rules reviewable before UI logic spreads them across screens.
- Flow diagrams reveal service boundaries, retries and failure paths to non-specialist reviewers.
- Data models force an early decision about ownership, identity, retention and migration.
- Deployment constraints keep a design honest about production infrastructure, configuration and platform limits.
Plan mode is the technical design review
Before a substantial change, I ask for a plan that identifies the current implementation, proposed boundaries, files that own the behaviour, alternatives, risks and verification. That makes the assistant show its reasoning at the level I need to review without requiring me to supervise every generated line.
I can then challenge the approach: Should this rule live in the shared domain layer or the iOS app? Is a database migration reversible? Does a retry preserve idempotency? Which compatibility constraint is real, and which is only habit? Once those decisions are settled, implementation becomes faster because the agent is not discovering the architecture by accident.
This is where experienced judgement has the highest leverage. I do not need to control every line of code. I need to control the solution, the interfaces, the failure behaviour and the feedback loop.
Package the way of working into reusable skills
Repository skills turn repeated procedures into executable team knowledge. Instead of reminding an assistant how to investigate a bug, prepare a release or audit a feature every time, the project routes that task to a maintained workflow with the relevant checks and evidence requirements.
The debugging workflows teach the assistant to collect the right signal: logs for runtime sequence, view hierarchy for UI ownership and performance exports for measured bottlenecks. The core instruction is to ask when the evidence is missing rather than make a plausible guess.
Other workflows preserve coordination. An issue tracker records discoveries that do not belong in the current scope. A status document records what is complete, what is blocked and what remains. Audit skills remind the assistant to review the full change, not only the file it just edited. Research tasks can require reading multiple current sources, comparing them and writing a report before a recommendation changes the project.
This is training and memory for an AI-enabled team. It reduces repeated explanation, keeps important steps from being forgotten and lets a new agent enter the project with the same working agreement as the previous one.
How the method changed across three products
On Mapify, AI assistance accelerated work across TypeScript, backend services, data migration and operations, but system design still determined the result. Search needed a user-transparent S3-to-PostgreSQL migration, speech-to-text needed explicit retry and provider boundaries, and summarisation needed one contract across browser, workers and backend. The agent could help implement and investigate; I still had to define the cut-over, fallback, observability and production evidence.
Henri was the deliberate proving ground. The product itself used AI to create knowledge trees, lessons, quizzes and images, while Claude Code helped build the product inside behavioural specifications, design tokens, component rules, plans and tests. That pairing was important: I was not only validating whether Henri could teach; I was validating whether an AI-assisted engineering process could carry a native app and cloud system to production without losing coherence.
AxIT made the workflow more distributed. Codex agents can compare iOS, Android, web and backend behaviour, work in isolated checkouts and run targeted verification in parallel. The surrounding rules preserve the distinction between code evidence, replay evidence, simulator behaviour, physical hardware, generated reports and release approval. Parallelism increases speed; the evidence model prevents that speed from becoming overconfidence.
04
The decision
I chose to make AI part of the engineering system rather than an optional editor feature. The repository carries product knowledge, the task begins with problem framing, substantial work begins with a reviewable plan, and repeated procedures become skills. Agents are expected to ask questions, preserve state and report exactly what they verified.
This also defines the human role more clearly. I spend less time typing routine implementation and more time on requirements, system boundaries, cross-platform architecture, security, performance, technical debt and the way teams coordinate. AI expands the amount of work I can examine and execute; it does not outsource accountability.
The decisions that shaped the system
- 01
Keep problem framing and architecture human-owned
The assistant can explore options and challenge a design, but I own the requirement, system boundaries, trade-offs, failure modes and acceptance level. Speed is useful only after the team is solving the right problem.
- 02
Specify behaviour before asking for implementation
A vague request becomes a behavioural specification, state matrix, edge-case list, state machine, flow and data model. Product and engineering can review those artefacts before code makes an assumption expensive.
- 03
Give every repository durable operating instructions
Project rules, architecture references, design tokens and critical constraints live with the code. The agent reads the same source of truth on every task instead of depending on a long prompt or my memory.
- 04
Make uncertainty visible
The working agreement tells the assistant to ask when the evidence is missing rather than inventing a requirement, fallback or default. An explicit question is cheaper than a plausible but incorrect implementation.
- 05
Separate implementation from proof
Code generation, tests, replay evidence, simulator behaviour, physical-device checks and release acceptance answer different questions. Agent output is a candidate change; it is never its own proof of correctness.
05
What improved
The immediate benefit is iteration speed, but the more valuable change is repeatability. The next task begins with the same project rules, design language and verification expectations. A solution does not depend on whether I remembered to paste the right paragraph into a new chat.
Documentation becomes an active part of delivery rather than a report written afterwards. Behavioural specifications help product review; plans help technical review; skills help execution; status and issue records help coordination; audits help handover. The artefacts are useful to people and agents at the same time.
The quality is good enough for serious production work because the workflow does not confuse generated code with a finished product. Tests, measurements, domain review, device checks and release decisions remain separate gates. The result is lower implementation cost without pretending that communication, judgement or evidence are free.
06
What I learned
AI is an amplifier. It amplifies clear thinking, strong architecture and disciplined verification; it can also amplify weak assumptions, accidental complexity and false confidence. The difference between an engineer using vibe coding and a non-engineer using the same tool is not typing speed. It is sensitivity to security, performance, failure modes, maintainability and technical debt.
The highest-leverage control point is the overall approach, not every line. When the behaviour, boundaries, interfaces and evidence are right, the assistant has room to work quickly. When those are vague, detailed code review arrives too late to rescue the design cheaply.
Communication remains essential. AI changes the format: more decisions become specifications, matrices, plans and reusable workflows. That documentation is not bureaucracy added to fast coding; it is what makes fast coding safe enough to repeat across a team.
Finally, the engineer’s role shifts rather than shrinks. I write less routine code by hand, but I do more system design, product clarification, review, training and coordination. The goal is not to make the AI imitate one developer. It is to make AI a dependable participant in how the whole team builds software.
Takeaways
- Treat AI as a capable team member, with context, feedback and review—not as an authority.
- Convert vague requirements into behavioural specifications before implementation.
- Keep project rules, architecture and design decisions close to the code.
- Package repeated debugging, delivery and audit practices into reusable skills.
- Let agents accelerate execution while humans own trade-offs and acceptance.
- Control the solution and evidence loop rather than supervising every generated line.