Summary note: This is a summary of Praveen J U’s article, “I Let AI Agents Run My Personal Projects. Here’s What Kept Them Honest.” (29 November 2026), published on Medium, not a reprint of the original. Original link: https://medium.com/@praveen.u/i-let-ai-agents-run-my-personal-projects-heres-what-kept-them-honest-a1ac597b5a35

Note: when checked (30 November, around 09:00), x.com returned HTTP 403 across the site, so the original X post for this article could not be opened; the content and details here follow the Medium original. The diagrams in the original could not be obtained through the page fetch, so this summary has no images.

Praveen’s main project is an investment-analysis platform that is live in production. He has run personal projects with Claude Code for over a year, going from one AI, one chat box, and reviewing every change himself, to shipping features steadily every week — and the difference is not a stronger model but a workflow he built himself: the Gated Agent Loop.

His core judgment is a single sentence: prompts are wishes, hooks are facts. A prompt asks the model to behave; a hook runs outside the model and decides whether an action is allowed to happen at all. This article is about turning “I hope the AI doesn’t make mistakes” into “the AI can’t get past the gate even when it makes a mistake.”

The conclusion first: a three-layer structure

Praveen splits the workflow into three layers, and the order he invests in them is the opposite of most people’s:

  • Context sets the quality ceiling. However strong the model, bad context produces confidently wrong code — and wrong with conviction is worse, because it gets through review more easily.
  • The harness sets the quality floor. This is the part the model cannot argue with: it runs outside the model and decides whether an action is allowed to happen.
  • Agents only set the speed. They decide who does what, in what order. The quality they add comes from structure — for example a tester that cannot see the code — and that structure is enforced by the harness. Agents are also the first thing to go stale.

Most setups spend everything on agents: names, personas, rosters. Praveen spends most of his effort on the first two layers.

How he got here

This system was not designed in one go; it accumulated over more than a year of trial and error, each step teaching him one thing:

  • Cursor, Claude Code, Codex, solo: one AI, one chat box, reviewing every change himself. Useful, but he was the bottleneck.
  • Multi-agent: several agents working on one problem. It worked, but burned tokens fast. More agents did not mean better work, only more expensive work. The first lesson: agents are the last thing worth investing in, not the first.
  • GSD (Get Shit Done): an open-source Claude Code workflow that plans in phases before writing code. Results got noticeably better, and it taught him the most important habit — plan first, then build. But a plan is only instructions. Nothing stopped a session from skipping a step, changing files outside its plan, or claiming a phase was done when it wasn’t.
  • The goals command: give the AI a goal and let it keep working until it gets there. It taught him autonomy — the AI could run for a long time without approval. But “done” was still the AI’s own word, and with nobody watching, small shortcuts added up.
  • Paperclip: trying a whole team of agents. The conclusion was that more structure around the agents doesn’t help much if nothing outside them checks the work.

The Gated Agent Loop keeps GSD’s plan-first discipline and the goals command’s autonomy, and adds the missing piece: rules the AI can’t get around, checked outside the AI by the harness.

Six gates, and the deploy gate belongs only to him

Every piece of work starts as an intent — a short statement of what should be true when it’s done, like “users should be able to download their reports as PDF.” It then moves through planning and building, with a gate at each step:

Gate Contents
Gate 0: Discovery map approved For an existing codebase only, done once. The AI first maps how the current system works, and he corrects that map himself
Gate 1: Intent approved What is being built and why, written down and approved, with all assumptions listed
Gate 2: Design approved The requirements, the architecture, the list of risks, and how the work is split into smaller units
Gate 2b: Plan approved, for each unit Each unit’s step-by-step plan is approved before any code is written
Gate 3: Build approved All units are built, tested, reviewed, and work together
Gate 4: Deploy approved Release to production. Only he can pass this one; the AI never does

For gates 1 to 3, he gave the AI a standing approval: once the harness checks pass, the AI records the approval itself. Those checks are concrete — the gate’s document exists, the approval is tied to the exact content it covers, and, depending on the gate, plans have been through the plan critic or every requirement traces to a test. If any check fails, the AI simply can’t record the approval. Every approval says how it was given, so he can always tell which ones the AI recorded and which ones he did; and he can take the standing approval back at any time by changing one setting.

The gates are front-loaded on purpose: planning is the cheapest place to be wrong. A 30-line plan gets a real design objection; a 600-line code change gets comments about variable names. So the most valuable gate is the one that approves each plan before any code is written.

All of this state lives in the repository, next to the code: what phase the work is in, which piece of work is active, which gates are approved, and a short brief per unit of work saying exactly which parts of the codebase it may touch. The issue tracker only mirrors it.

Task management: no task, no work

He uses Plane as his task board, and one rule runs everything: nothing is worked on unless a task for it already exists. Every intent, every bug, every problem a routine notices gets a task, so nothing lives only in his head or a chat log.

There are two kinds of work, and the weight of the process matches the size of the work:

  • A feature adds something new to the product, like letting users download their reports as PDF. It goes through the full Gated Agent Loop: design, a plan for each unit, and every gate from intent to deploy.
  • A regular task is smaller, standalone work: a bug fix, a small improvement, an upgrade, or a problem one of the routines noticed. It skips the design gates and lives only on the board.

Running a one-line bug fix through six gates would be pure ceremony; building a whole feature without gates is how wrong designs and quiet scope creep get in. Both kinds still follow the same basics: a task on the board first, one session and one workspace per task, and an automatic review before anything merges.

When to split: a task must be small enough to finish in one AI session. Anything bigger is split when it’s picked up, not halfway through. A feature is split by the lifecycle into units, each with its own plan; inside the feature’s session, units move through a pipeline of subagents, so one can be in review while the next is being built, and a unit that depends on another waits for it. A regular task becomes a parent task with sub-tasks by phase: design, implement, then verify and review in parallel. Each sub-task is labelled with the specialist that owns it, like the API specialist or the test specialist. Trivial phases are skipped instead of faked. When one task depends on another, the task says so in its description, and it isn’t started until the blocker is done.

One task, one fresh chat session. Every task, including each sub-task of a regular task, gets its own separate AI chat session, started fresh. Inside a feature’s session, each unit runs as its own subagent with a clean context. He never lets one long conversation carry several tasks: a session that has already worked on something else brings that history with it — old assumptions, half-finished ideas, files it touched for a different reason. Over a long conversation that history gets squeezed down, and details from one task leak into the next. A fresh session starts with only what this task needs: its task on the board, its brief, and the files it’s allowed to change. It also means each session has its own workspace and its own branch, so two tasks running at the same time can never step on each other, and if one goes wrong, he throws away that session and nothing else.

Keeping the board honest. Work runs in weekly sprints. A task moves to “In progress” the moment work starts and to “Done” the moment its change is merged (it reaches production with that week’s deploy), and every move gets a short comment and a notification. A task that sits “In progress” for three hours with no sign of life is treated as dead and put back in the queue.

For features, the repo is still the source of truth, and the board mirrors it, updated at each gate; regular tasks live only on the board, so for them the board is the record. If he edits a feature’s status on the board by hand, the next update overwrites it. That’s deliberate: two places that can both change the truth will eventually disagree.

The harness: the part that actually matters

A harness is everything around the model that it can’t argue with. A prompt asks the model to behave. The harness makes it behave, because it runs outside the model and decides whether an action is allowed to happen at all.

Claude Code lets you attach small scripts, called hooks, to moments in a session: when you send a message, before the AI edits a file, before it runs a command, and when it says it’s done. Each hook can let the action through, block it with a reason, or add context. A few of the rules his harness enforces:

  • Edits stay inside the current piece of work. The AI can only change the files that the active unit declared, and only after its plan was approved. Hotfixes and regular tasks are left alone by this rule, because a hook that blocks the whole repo gets switched off within a day. Regular tasks still go through the other checks: their own workspace, an automatic review, and merged-only deploys.
  • The lifecycle is in every message. The current phase and open gates are added automatically, so the AI never has to remember where it is.
  • Approvals are tied to content. Approving a plan records a fingerprint of it. If the plan changes afterwards, the approval no longer counts. Otherwise scope quietly grows, and nobody ever decided to grow it.
  • No document, no approval. A gate can’t be approved unless the agent responsible actually produced its document. That’s what guarantees the agents get used.
  • Only merged code reaches production. “Only deploy what’s merged” sat in a prompt for weeks and was ignored. Now it’s checked.

The habit worth copying: every one of these rules exists because a written instruction failed once. When a rule is broken, stop rewording the prompt and turn it into a check.

The agents: each one justified

At the core are eight lifecycle agents, and each must earn its place through at least one of three things: doing work in parallel, being independent of the work it judges, or handling more context than one session can hold. If an agent can’t claim any of these, the main session does that work, or it becomes a simple script.

What defines each agent is what it’s not allowed to do. The most important example: an agent that tests its own code writes tests that pass. So his tester never reads the implementation it’s testing. It gets the acceptance criteria and the interface it has to call, and nothing else. Likewise, the risk agent writes its risk list before seeing the design, because a risk list written afterwards just agrees with the design.

And the right agent has to actually run. If you leave it to the AI to pick an agent from its description, it usually won’t. So the build steps run from a fixed script, not from the model’s judgment.

Every agent here runs as a subagent: a separate AI worker that the main session hands one job to. It starts with a clean slate, gets its own instructions and its own limited set of tools, does the job, and sends back a short result. That simple setup is what makes the rest of the system work:

  • The main session stays a coordinator. It runs the lifecycle, hands out work and records the gates. The heavy reading, like going through dozens of files or a long test run, happens inside subagents, and only the conclusion comes back. The main session’s context stays small and sharp, even on a run that lasts hours.
  • Work runs side by side. Units of a feature move through a pipeline, so one unit can be in review while the next is still being built. The tester and the reviewer check the same unit at the same time. When mapping an existing codebase, one read-only subagent maps each area in parallel.
  • Independence comes for free. A subagent only knows what it’s given. The tester is never handed the implementation, so it can’t write tests that just agree with it. No prompt has to ask it not to look.

Besides the eight lifecycle agents, he keeps about twenty specialists for the parts of the codebase that need expert knowledge: the API, database changes, tests, security, deployment and day-to-day operations. A sub-task’s label decides which specialist picks it up. They follow the same rule as the core eight: each one has to justify its place.

There are limits, too. Every subagent costs time and usage, so small jobs stay in the main session. Subagents that only need to look are read-only. And no subagent can approve a gate: approvals belong to the main session and, for deploys, to him.

Which model does which job: by the cost of a mistake, not the size of the task

Each subagent has its model set individually, chosen for its job. Nothing picks a model on the fly: each agent has its own file, and the model is set right there, next to its instructions and the tools it may use. It can’t switch partway through a job. That makes every run predictable: the same agent always thinks with the same model, whoever starts it.

The rule for choosing is simple: pick by how costly a mistake would be, not by how big the task is.

  • Planning always gets the best model. A mistake in the plan gets copied into every step after it, so the planner and the plan critic run on the strongest model available (Claude Opus, in his setup).
  • The same strong model goes to every other judgment where an error is expensive or hard to spot, and to anything that can’t be undone: building, testing, reviewing, security, database changes and deploys.
  • A faster, cheaper model (Claude Sonnet) goes to work that something downstream will check anyway: mapping the codebase, specialist drafting, tracking the sprint, product and design notes. A mistake there gets caught at the next gate.

Each agent is pinned to an exact model version, not a “latest” alias, so an upgrade is a decision he makes instead of something that just happens. And like everything else here, it’s checked: a validator agent confirms that every agent’s model matches the policy, and flags any agent whose instructions try to choose a model on the fly.

He stopped engineering prompts

When he started, everyone said prompting was the skill that mattered most: how you word the request decides what you get back. Back then, that was true. He spent a lot of time crafting long, careful prompts.

That changed once he saw how the goals command worked, and after a lot of reading and watching how others build with agents. Today he doesn’t engineer prompts for his framework anymore. He just says what he wants, in a sentence or two, and the system does the rest:

  1. Subagents analyse the request. They look at the codebase, the existing tasks and the project docs, and work out what it really involves.
  2. They ask him questions up front, only if they need to. If something is genuinely unclear at this stage, like a product decision only he can make, they ask before any task is created. Once a run has started, it doesn’t stop to ask: it takes the option that’s easy to undo and writes the assumption down.
  3. They create the tasks. The work is split up, and each task gets the details it needs: what done looks like, which part of the codebase it touches, and what it depends on.
  4. The scheduled routines pick the tasks up. When a slot is free, a routine starts a fresh session for the next ready task.
  5. Each task follows the lifecycle, from planning through building, testing and review, until it’s ready to deploy. Then it stops and waits for him.

The quality no longer comes from how well he phrases the request. It comes from the context the agents can read, the questions they’re allowed to ask, and the gates the work has to pass. A good prompt helps one session. A good system helps every task after it.

His part: once a week. The agents notify him and wait for his input only when they need him: the weekly deploy, a change to one of the sensitive areas, or a real stop like spending money. A change that’s waiting on him pauses new work, so those are the one thing he clears the same day. Everything else, up to the deploy stage, runs without him. Once a week he reviews that week’s changes, and approving the deploy is the end of that review. Then the changes go to production together. So the system works all week, and he spends his time on the one decision that matters most: what actually ships.

One command, with clear stops

In practice it’s one command plus the idea in plain English. The command, /gated:run, isn’t built into Claude Code. It’s a custom command he created as part of this framework. The AI then works through every phase on its own, recording each gate as it goes.

Creating a command like this is simpler than it sounds. In Claude Code, a custom command is just a text file of plain-English instructions saved in a special folder of the repo. The file’s name becomes the command, and whatever he types after it is passed in as the request. His tells the AI to read where the lifecycle stands, work out the next step, do it, record the gate, and keep going. Anthropic’s documentation explains the format, where custom commands are now part of what it calls skills.

If you build your own setup, Claude Code also has a built-in /doctor command that’s worth running now and then. It checks the setup itself: the installation, the skills and other add-ons you aren’t using and what they cost in context, slow hooks, and instruction files that have grown too large. It reports what it finds first and asks before changing anything.

It makes engineering decisions itself and writes down why, so it can run for hours without asking him something every ten minutes. It stops only for things that genuinely need a person: spending money, deploying, irreversible production actions, or anything with legal or financial risk. It ends by saying plainly: not deployed. Deploying is his call.

Running on its own: scheduled routines

You don’t have to type the command, either. A set of scheduled routines runs through the day and keeps the board moving with nobody at the keyboard.

  • The picker runs every two hours. It looks at the sprint for ready tasks and starts one fresh AI session per task, each in its own workspace, up to three at a time. Each session runs the lifecycle that fits its task (the full one for a feature, the lighter one for a regular task) and stops at a pull request, ready for the reviewer. The picker never writes code itself.
  • The reviewer runs every two hours too. It runs the tests, asks specialist reviewers (always including security), and merges the clean ones automatically. Anything else becomes a fix task on the same branch. Changes to a few sensitive areas never auto-merge; they wait for him.
  • The deploy routine runs once a week, after he’s reviewed and approved that week’s changes. It ships only merged code, watches a real health check, and rolls back automatically if it fails.
  • Idle time gets used. If a slot is free, a ready task is waiting and nothing is waiting for review, the next one starts. If nothing is waiting, the routine exits in one line instead of spending a whole session finding that out.
  • The review queue drains first. No new task is picked while a finished one is still waiting to be merged. Before that rule, a dozen unmerged branches once piled up. If a change is stuck waiting on him, the picker parks it, pings him and holds, instead of quietly working around it.

Limits he learned to respect

Unattended AI runs out of things you don’t notice in a normal session: memory, disk and plan usage.

  • Memory and disk. The app once crashed because the machine ran out of memory, and each AI workspace is a full copy of the repo. So a workspace is removed as soon as its work is pushed, not days later after the merge.
  • Hard caps. At most three tasks run in parallel per repo. That number isn’t a rule of the system; it’s the limit of his own machine’s memory. Every parallel task means another AI session, its own subagents, and its own copy of the repo, and past three his laptop starts to struggle. On a machine with more memory, the cap could go higher. On top of that, no more than three routines run at once, and every routine has a time budget.
  • Plan usage. Once, the weekly usage limit ran out and every routine failed for two days without him noticing. Now a watcher alerts on that, and routines run every two hours during the day instead of hourly around the clock.
  • Stray processes. A check at the start of every run looks for idle background processes and low disk, after two forgotten wait loops once ran for seven hours.

Spending fewer tokens

Tokens are the real budget of unattended AI. Every file read, every long command output and every repeated explanation costs usage, and when usage runs out, everything stops. So he treats token use as something to optimise, the same as memory.

Part of it is outside tools, and the list keeps growing:

  • RTK sits between the AI and the command line and trims long command output down to what matters before the AI reads it.
  • Graphify turns the codebase into a knowledge graph, so the AI can ask how things connect instead of reading file after file to find out.
  • Headroom works on the context itself, keeping what’s sent to the model lean.

Part of it is the design of the loop itself. Fresh sessions don’t carry old history. Subagents do the heavy reading and send back only the conclusion. Once the per-folder guides are in place, a session will read only the guide for the part it’s working on. Routines with nothing to do exit in one line. And cheaper models handle the work that gets checked later anyway.

In parallel, he’s working on his own way of optimising tokens, built around how this particular loop works. It’s still early, and like the rest of this setup, it improves a little with every retrospective.

Cleaning up after a merge

Removing a workspace as soon as its work is pushed frees memory right away. On top of that, a cleanup routine runs every four hours and sweeps up whatever is left: it removes any finished workspaces that were missed, deletes branches that are already merged (both locally and on the server), and archives the AI sessions that worked on them. It is careful by default: it never removes anything with unsaved changes, and never deletes a commit that exists only on this machine. Cleanup that destroys work is worse than no cleanup at all.

Learning from every task

This is the part he’s building right now, so treat it as a design rather than something that’s been running for months.

Shipping a task isn’t the end of it. Every task should finish with a short retrospective: what went wrong, what surprised the AI, and what the next session should do differently. Without this, each new session starts from zero and makes the same mistakes again, because AI sessions don’t remember each other.

The hard part is keeping those lessons useful. A single “lessons learned” file grows with every task until it’s too long for anyone, human or AI, to read. So the learnings follow a few rules:

  • Lessons are short rules, not stories. “Check the cache before calling the slow service,” not a paragraph about the afternoon it broke. If a lesson repeats an existing one, the old one is sharpened instead of a new one being added.
  • They’re split by where they apply. Domain learnings cover one part of the product, like sign-in, billing or deployment. Agent learnings cover one agent’s job, like what the tester keeps missing or what the reviewer should always check. A session only reads the learnings for the area and the agent it’s working with.
  • Lessons graduate. When the same lesson keeps coming back, it stops being a note and becomes a check in the harness. Then it’s removed from the doc. That’s what keeps the docs from growing forever: the best lessons leave them.

A guide in every folder. The plan is for agent learnings to sit with each agent’s own instructions, so an agent picks them up every time it runs. Domain learnings will live next to the code they’re about. Each main part of the codebase gets its own guide for AI agents (a file named AGENTS.md): what that part does, how it’s organised, its conventions, and its learnings. The guide at the top of the repo stays short: a basic overview plus an index of the guides below it. A session reads the top guide, follows the index to the part it’s working on, and reads only that part’s detailed guide.

This is the context layer from the start of the article, put into practice. The AI gets exactly what it needs for this task, and nothing about the twenty other parts of the codebase it isn’t touching.

Adopting it on an existing codebase

His main project wasn’t new; it had months of code before any of this existed. Three things made it stick:

  1. Start with one area, not the whole repo.
  2. Map before you build. Read-only agents first map each part of the existing system, and a human corrects the map. It forces you to write down the architecture nobody ever wrote down.
  3. Use a ratchet. Checks only apply to work done after the start date. A check that fails on all the old code on day one gets disabled on day two.

What he’d tell you before you start

  1. Invest in context and the harness first, agents last.
  2. When a rule is broken once, turn it into a check. Prompts are wishes; hooks are facts.
  3. Scope checks narrowly, so they never get in the way of unrelated work.
  4. Tie approvals to the exact content approved.
  5. Make independence structural. The tester can’t see the implementation.
  6. If something can be a simple check, don’t make it an agent.
  7. End every task with a retrospective (the step he’s adding now), and file each lesson where the next session will read it.
  8. Keep it simple to run. A harness that needs an install step is a harness that gets skipped.
  9. Give it time, and run retrospectives on the system itself. It won’t be good in the first week.

None of this was built in one go. The first version had a handful of agents and almost no checks, and it failed in all the ways this article describes. What made it better wasn’t one big redesign. It was steady, regular investment.

So alongside the per-task retrospectives he’s adding now, he already runs his own retrospectives on the system itself. Every so often he steps back and asks: which rule was broken this week, and why didn’t a check catch it? Which agent never got used, or keeps getting the same thing wrong? Where did a run stop and wait for him when it didn’t need to? What was slow, expensive, or crashed the machine? Each answer becomes a small change: a new check, a sharper agent, a clearer guide, a tighter limit. Most of the rules in this article started as one of those answers.

A multi-agent setup is not a tool you install and forget. It’s a system you tune, a little every week. The time you put into it compounds.

The short version: the model is rarely the problem. What it knows, and what it’s physically prevented from doing, is where most of the gains are.

Written byAuthor

Buy me a coffee~

Solana

Solana

Solana

Solana

Solana

Solana

Background music
Jump to comments
Settings
Back to top
Go to bottom
Collapse toolbox