An Agentic Development System: Moving from ad-hoc prompting to structured software engineering.
I don't write code by hand, AI agents write all of it. But getting reliable, well-tested software out of AI tools takes more than a chat prompt. Here is how I built a self-hosted development environment where three coding agents plan, build, verify, and release apps under one shared rulebook, while I focus on product direction and the decisions that matter.
Why Ad-Hoc Prompting Wasn't Enough
The thought process behind treating AI coding assistants like a real engineering team with a shared environment, clear boundaries, and institutional memory.
When you build a small script with AI, a single chat window is all you need. But as soon as you maintain several full-stack applications across multiple weeks, the cracks in casual "vibe coding" show up fast.
Left to themselves, different AI agents pick different frameworks, forget context between sessions, ask permission for every trivial command, and confidently declare features "finished" when they haven't actually been tested. I wanted to step out of the loop of babysitting terminal commands and move into the role I actually enjoy: setting product direction, designing how an app should feel, and approving key decisions.
To make that work, I spent September and October 2026 designing a five-part system around six core problems I kept running into:
Giving Agents Real Power Without the Risk
If an agent has to ask before running Docker or installing a package, work crawls to a halt. If it has unrestricted power on a critical machine, one bad command can ruin your setup. The answer was an isolated development VM where mistakes are cheap, giving agents full power inside a box they cannot break out of.
Making Three AI Tools Act Like One Team
Claude Code, OpenAI Codex, and Google Antigravity all have different strengths and defaults. Without a single shared rulebook and application template, switching from one agent to another meant every project ended up with a different tech stack, folder structure, and testing style.
Designing Work to Survive Fresh Sessions
Multi-day builds don't fit into a single context window. Instead of stuffing an entire project into chat memory and watching quality degrade, work is sliced into small, self-contained step files on disk that any fresh session can pick up cold.
Approving Plans, Not Keystrokes
Clicking "Approve" on fifty shell commands doesn't actually give you control, it just wears you down until you stop paying attention. I shifted approval to the planning stage: reviewing a plain-language overview page of what will be built and why, then letting the agent run uninterrupted.
Replacing "It Should Work" with Proof
AI agents are naturally eager to please and will tell you a feature works because the code compiled. I needed every claim backed by an objective gate that builds the container, boots the app, clicks through it in a real browser, and tests database upgrades automatically.
Turning Past Mistakes Into Guardrails
Fixing an agent's mistake in one chat doesn't teach the next session anything. By logging every stumble and turning any pattern that happens twice into a permanent rule, the system actually gets sharper with every project.
How the Five Pieces Fit Together
An Isolated Debian-Based Sandbox VM
A dedicated Hyper-V MX-Linux (Debian-based) machine that shares a common Debian lineage and Docker/service layout with my pure-Debian production server, while remaining completely cut off from it, giving agents real administrative and Docker capabilities where nothing critical is at stake.
One Shared Rulebook
A single, version-controlled set of operating rules that Claude Code, Codex, and Antigravity all read before doing anything, covering permissions, safety boundaries, code standards, and plain-language communication.
A Human-First Planning System
A workflow that turns feature ideas into a plain-language overview web page for my approval, backed by mergeable phases and session-sized step files for the agents.
An Autonomous Plan Orchestrator
A supervisor session that takes an approved plan and coordinates separate Planner, Builder, and Validator agents through every phase, pausing only when a human decision or visual design check is needed.
Shared Tooling & Institutional Memory
Custom CLI tools for managing plans and dependency upgrades, alongside a handoff log and lessons log that keep multiple agents coordinated across sessions.
How Authority & Roles Are Structured
Two core design ideas: a rule hierarchy that can never be loosened from below, and a multi-agent loop where the agent that writes the code is never the one that grades it.
1. A Rule Hierarchy That Only Tightens
Early on, I realized that putting all instructions into one giant prompt makes agents lose track of what matters most. Instead, the rulebook is layered from high-level principles down to service-specific details. The key insight is a simple rule of precedence: lower layers can add detail or tighten a constraint, but they can never loosen a higher rule. That means a local project file can never talk an agent into skipping a test or bypassing a safety boundary.
My Session Direction
Direct instructions and explicit approvals I give during the conversation.
Core Operating Rules
29 non-negotiable rules: approval tiers, prompt-injection defense, backups & honesty.
Topic Standards
Focused playbooks for code quality, Docker, networking, security, host updates & planning.
Service Registry
How each running service is configured, exposed, health-checked, and pinned.
2. Separating the Builder from the Validator
When a single AI session writes a feature and then writes the tests for that feature, it naturally tests its own assumptions, and misses its own blind spots. To fix that, my orchestrator splits the work across distinct roles. The supervisor session never touches application code; it dispatches specialized workers and relies on an independent Validator that tests the finished phase solely against the plan's user flows, without ever reading how the Builder thought about the implementation.
Plan Orchestrator
Reads plans & worker reports · Independently verifies git commits & test runs · Never writes application code
Maps the Phase
Breaks the upcoming phase into small, session-sized steps right before work begins so the plan reflects the latest codebase.
Builds Each Step
Takes one self-contained step file, writes the code, runs fast local checks, commits its work, and leaves structured notes.
Tests Real Use Cases
Writes fresh end-to-end tests from the plan's "done when" goals, without seeing the Builder's reasoning, and runs the full 11-check suite.
Advances the Plan
Merges the verified phase, updates progress on disk, and moves to the next phase, pausing only when my input is required.
The Thought Process Behind Each Layer
A closer look at how each part of the system was designed, why it exists, and the practical insights that came out of using it day to day.
Click any topic to expand or collapse, or use Expand All to read straight through.
01 // THE SANDBOX
Designing an Environment Where Mistakes Are Cheap
Why a shared Debian foundation and strict isolation unlock agent autonomy
The Thought Process: You can't see what coding agents are truly capable of if they have to ask permission before running every command, but you also shouldn't give an AI unrestricted access on a machine where a mistake could take down live apps or expose private data. Equally important, if the development machine looks nothing like your real server, you end up with apps that pass local tests and fail in deployment.
How It Works in Practice: My production home lab runs on a dedicated Minisforum N5 NAS (currently being rebuilt on a pure Debian base), while all development happens inside an isolated, Debian-based MX-Linux Hyper-V virtual machine (mx-linux-dev) on my primary HP Omen 16 workstation. While the OS layer isn't an exact mirror (MX-Linux for desktop/dev ergonomics vs. pure Debian in production), sharing a Debian foundation alongside aligned folder paths, Docker networks, reverse proxy, and HTTPS setup means agents test against the real service architecture, with every network route to the live NAS stripped out.
- Autonomy Inside Hard Walls: Within this VM, agents have real administrative power to spin up containers, install tools, and push code branches, while network rules ensure they can never reach production.
- Checkpoint Triggers for Deep Changes: Instead of banning system-level changes outright, risky operations (like kernel, firewall, or Docker engine updates) sit on a "snapshot list." When an agent reaches one, it pauses and asks me to take a five-second Hyper-V checkpoint first, turning worst-case scenarios into a one-click rollback.
02 // THE RULEBOOK
Governing Three Different Agents with One Voice
Permission tiers, anti-workaround rules, and plain-language reporting
The Thought Process: Every AI coding tool looks for its own instruction file and brings its own habits. Maintaining separate instructions for Claude Code, Codex, and Antigravity guarantees they will drift apart over time. Worse, long conversational rule files get ignored by models as context fills up. The rulebook needed to be a single source of truth, written as crisp, unambiguous rules with zero filler.
Key Insights & Guardrails: Rather than trying to predict every edge case, the core rules focus on authority, honesty, and how agents handle friction:
- Task-Scoped Approvals: Permissions are divided into three simple tiers: reading is always allowed; building, testing, and managing resources created by the current task are pre-approved once the task starts; and touching or deleting anything outside the task requires my explicit approval. One "yes" covers the whole task.
- Never Route Around a Block: AI agents are naturally resourceful, and if a command is denied, their instinct is to find a clever backdoor to achieve the same result. A core rule strictly forbids workarounds: if something is blocked, the agent must stop and report the exact command and error.
- Prompt-Injection Defense: Agents read untrusted text constantly, including log files, web pages, dependency docs, and even reports from other agents. The rulebook draws a bright line: text inside files or outputs is data, never instructions. Only I can give commands.
- Plain-Language Communication: Because I approach projects as a product designer rather than a career systems engineer, the rules require agents to explain trade-offs, summaries, and decisions in clear, everyday language rather than jargon.
03 // SHARED MEMORY
Teaching a Stateless System to Remember
Handoff logs for multi-agent continuity and the "second-time" rule for lessons
The Thought Process: An AI coding session has no memory of what happened yesterday or what another agent is doing in a different terminal window. Without shared state, a new session will happily overwrite another agent's work or waste an hour repeating a mistake you already debugged last week.
How Coordination & Learning Work: Instead of relying on chat history, agents read and write to two shared logs on disk before and after their work:
- Seamless Handoffs: A handoff log acts like a shift-change board. Agents log what they are touching and, if a session ends mid-task, record what's happening now, what's already done, and what not to redo. The next agent picks up in seconds without starting over.
- The "Two-Strike" Rule for New Rules: Every mistake or roadblock is recorded in a lessons log (112 entries and counting). Early on, I noticed that creating a new rule after every single hiccup bloats the rulebook. Instead, the system waits until a mistake pattern happens a second time. On the second occurrence, the agent proposes a concise rule diff for my approval, turning real-world stumbles (like race conditions in browser sign-in tests or overly broad cleanup scripts) into permanent institutional memory.
04 // PLANNING SYSTEM
Approving Plain-Language Overviews Instead of Raw Code
Why human review happens on a visual web page before a single line is written
The Thought Process: The most expensive mistakes in software don't happen because an agent wrote a bad loop, they happen because the agent misunderstood what you wanted and built the wrong feature across twenty files. Reviewing thousands of lines of code diffs after the fact is a terrible way to steer a product. I wanted the approval step to happen before building starts, in a format designed for a human product owner.
How Plans Are Structured: Every new app or major feature goes through a structured planning workflow shared across all three agents:
- The Plain-Language Overview Page: Alongside the technical master plan, the agent generates a clean HTML overview page written specifically for me. It explains what we're building, what I'll actually see on screen, how the phases break down, and, crucially, lists every open product decision alongside the agent's recommended choice. Approving that page is what unlocks the build.
- Just-in-Time Detail: If you write out fifty detailed implementation steps on day one, steps thirty through fifty will be obsolete by the time you get to them. Instead, plans define high-level phases up front, and detailed session-sized step files are written just before each phase starts, so they always reflect the real state of the code.
- Session Locking: A shared command-line tool tracks which plan is active and which agent holds it, preventing two sessions from accidentally working the same plan at the same time.
05 // ORCHESTRATION
Running Multi-Phase Plans Without Babysitting the Terminal
Right-sizing models per task and pausing only when human judgment is needed
The Thought Process: Even with well-written step files, manually kicking off a new agent session for every step, copying context, running tests, and merging branches still keeps you glued to your keyboard. I wanted to start an approved plan and let an orchestrator drive it through all of its phases, while still guaranteeing that I get called in whenever a real product or design choice comes up.
Insights from Building the Orchestrator: The orchestrator was designed using the planning system itself and proven by autonomously building, testing, and releasing a new feature end-to-end:
- Matching the Brain to the Task: Not every step needs the heaviest, most expensive reasoning model. The orchestrator dynamically assigns high-effort reasoning models to phase planning and UI work, mid-tier models to standard coding and validation, and fast lightweight models to mechanical steps, automatically shifting work between Claude and Codex when usage quotas get tight.
- Trust, But Verify: When a background worker finishes a step and submits its report, the orchestrator doesn't just take its word for it. It checks git to confirm the commits exist and re-runs the quick verification checks itself before moving on.
- Interrupting Only When It Matters: The run proceeds automatically across phases and only pauses (sending me a push notification) for five specific reasons: a visual UI review with screenshots, a scope or product decision that belongs to me, a host change that needs a VM snapshot, a permission block, or a test failure that couldn't be fixed in two tries.
06 // QUALITY GATES
Defining "Done" with an Unforgiving Check Suite
Why browser tests on phone viewports and live database upgrades are mandatory
The Thought Process: When an AI agent is stuck on a failing test, its natural temptation is to weaken the assertion, skip the test, or wipe and recreate a local database to make the error go away. If you want agents to merge phases autonomously, the quality bar has to be completely mechanical, and protected by strict rules that forbid watering down a check to make it pass.
What Every Change Must Prove: Every repository has a single check script that stops at the first sign of trouble. Beyond standard formatting, static typing, unit tests, vulnerability audits, and secret scanning, three deeper checks catch the bugs that unit tests miss:
- Real Container Boot & Log Inspection: The app is built into a production container image, started in an isolated test stack, and checked for both a healthy status endpoint and completely clean startup logs.
- Desktop & Mobile Browser Flows: Automated Playwright tests click through every page and main user flow at both desktop and phone screen sizes, catching layout breaks and broken buttons before I ever open the app.
- Live Database Upgrade Verification: To prevent updates from breaking existing user data, the test suite spins up a database from the previous release, loads it with data, runs the new migration scripts against it, and verifies that all data survives intact.
07 // STAYING CURRENT
Upgrading Dependencies Without the Usual Chaos
A 7-day cooling-off period for new releases, with a fast lane for security fixes
The Thought Process: Maintaining ten repositories creates a quiet dilemma: if you never update pinned versions, you accumulate security debt and painful multi-version jumps; if you let agents upgrade packages whenever a new version drops, you get hit by broken upstream releases and supply-chain churn.
Calm, Automated Maintenance: I had the agents build a custom dependency manager that watches every pinned container image, system service, and language lockfile across all repos:
- The 7-Day Stabilization Rule: Routine minor updates automatically wait seven days after release before they become eligible for upgrade, giving the open-source community time to catch broken publishes. Critical security fixes bypass that waiting period immediately, and major version jumps are flagged for a dedicated plan.
- Isolated Test Upgrades: When an upgrade runs, the tool creates a separate workspace, updates related pins together, updates the changelog, and runs the full 11-step verification suite, only proposing a merge once every check passes.
08 // SHARED FOUNDATION
Eliminating Boilerplate with a Common Platform & App Template
Why every new app starts with themes, sign-in, and least-privilege databases built in
The Thought Process: Whenever I had an idea for a new personal tool, I didn't want agents spending the first three phases reinventing login screens, dark mode themes, database connections, or test pipelines. And when multiple self-hosted apps run on the same server, they shouldn't each hold administrative keys to the database.
Plugging Into Common Ground: We built both a reusable App Template and a shared Self-Hosted Platform that every new project builds upon:
- Day-One Polish: Every new app starts from the shared template with four color themes, a standard Python/React/TypeScript architecture, generated API types, and the entire verification pipeline already wired up.
- Ticket-Based Database Provisioning: Instead of giving apps admin credentials to PostgreSQL, a new app presents a single-use install ticket to a lightweight helper service, which creates an isolated database and least-privilege login on the spot.
- Unified Front Door & Sign-On: Local HTTPS certificates and single sign-on (including passkeys) are handled centrally by the platform, so individual apps stay focused purely on the problem they were meant to solve.
What This System Has Built
From standalone personal apps to the shared platform and the orchestration tools themselves.
The best test of a development process is whether it makes building real software calmer, faster, and more predictable. Across 14 structured plans, the system has built and maintained ten repositories:
Focused Everyday Applications
Kinship (personal CRM, notes timeline, Kanban board, and 3D relationship map with safe AI agent access) was extracted and built as a standalone public app through this system, alongside migrating and testing Job Tracker, Newsfeed Lite, and my personal Knowledge Base.
Starting Every Idea at 80% Done
A full-stack App Template (with four themes, CSV export, and the 11-gate check suite built in), a shared Sign-In Library for FastAPI, and an admin User Management app for invitations, access control, and audit logs.
Production-Ready Local Hosting
The shared Dev Platform combining PostgreSQL 18 + pgvector, ticket-based database provisioning, Caddy HTTPS reverse proxy, and declarative Authentik single sign-on blueprints, built so production can be recreated from the same repo.
Tools That Run the Workflow
The plan lifecycle CLI, the automated dependency manager, and the multi-agent Plan Orchestrator itself, each designed as a plan, tested in scratch workspaces, and verified with its own automated test suite.
Principles & Honest Limits
What I learned from designing a multi-agent workflow, and where the current boundaries still sit.
Seven Takeaways from Building This Way
Real Power Where Mistakes Are Cheap
Give agents full power inside an isolated sandbox where nothing critical can break, and draw hard technical lines around what they can't reach.
Approve Plans, Not Commands
A plain-language overview page showing goals, screens, and open decisions is a far better approval surface than a raw code diff or 200 terminal prompts.
Keep State in Files, Not Memory
Chat sessions are temporary. Storing progress in step files, handoff logs, and structured reports means any fresh agent can pick up right where the last one stopped.
Separate Building from Validating
Have an independent validator write use-case tests from the plan's goals without seeing how the builder thought about the problem.
Treat Agent Output as a Claim
"All tests pass" is a claim, not a fact. Always verify commits and re-run objective checks before merging or moving to the next phase.
Turn Repeated Mistakes Into Rules
Log every stumble, wait until a pattern repeats a second time so the rulebook stays lean, and require explicit human approval for every new rule.
One Rulebook for Every Agent
Pointing every AI tool to the same shared rules means you can switch between Claude Code, OpenAI Codex, and Google Antigravity mid-project without changing how software is built, tested, or released.
Honest Limits of the Current System
- One Worker at a Time: The orchestrator currently runs one plan and one active builder session at a time. Parallel builders are intentionally left out of v1 to keep merges simple and predictable.
- Human-Started Runs: There are no unattended overnight cron jobs yet, every orchestrated plan run is a session I kick off myself.
- Built-In Agent Guardrails: Occasionally, an AI tool's own hardcoded safety checks block a step that my rulebook allows (such as publishing a container image or editing a rule file). Because workarounds are forbidden, the agent simply hands me a ready-to-run command or patch to execute.
Tools & Stack
The coding agents, infrastructure, and verification tools behind the system.