Vibe Coding
Vibe Coding in Production (Part 2): Guardrails, Custom Skills & Parallel AI Agents
How I scaled AI development across 81 plans without context loss using AGENTS.md, custom skills, a Go MCP server, and parallel Git worktrees isolated with AGY_SLOT.

Once a vibe-coded project grows beyond a few files, speed collapses unless you replace ad-hoc prompting with three systems: persistent repo guardrails (AGENTS.md), reusable skills and MCP tools, and isolated parallel execution. In Part 1, we set up the blueprint; here is the operational engine I built over 29 days and 384 commits to keep multiple AI agents shipping cleanly without stepping on each other.

1. Turning Tribal Knowledge into Living Memory (AGENTS.md)
New agent sessions start with zero memory of yesterday's decisions. If you rely on re-typing project rules in every prompt, you will miss a constraint—and an agent will happily violate a business invariant it never saw.
My solution was keeping AGENTS.md in the repository root as living, executable documentation, paired with targeted workspace rules. Every time I caught a recurring mistake or shipped a structural invariant, I distilled it into one crisp rule in AGENTS.md:
- Exact repository layout: Where Go packages live (
backend/internal/...), where Astro SSR routes live (frontend/src/pages/), and where React islands sit (frontend/src/components/). - Canonical commands: How to boot Postgres, run unit tests (
make test-backend,make test-frontend), and run Playwright (make test-e2e). - Hard Rules that never bend: Which routes require
RequireAdminvs.RequireAuth, which JSON fields are strictly rejected, why visitor IPs are never stored, and which paths bypass maintenance mode.
Because the agent reads AGENTS.md automatically at session start, new sessions behave like engineers who read the onboarding manual before touching a single line of code.
2. The Core Feature Loop: Plan -> Failing Test -> Implement -> Independent Review
After burning hours untangling half-finished features early on, I banned direct "write feature X right now" prompts on non-trivial work. Every feature on Find And Feed runs through a deterministic loop backed by 81 written plan documents (docs/plans/ and docs/superpowers/plans/):
- Plan First: Inspect existing files, migrations, and test patterns, then write an explicit task list naming exact files owned, files untouched, and exact verification commands.
- Failing Test First (TDD): Write the unit, integration, or Playwright assertion before writing production logic so we prove the test actually catches failure.
- Implement Within Scope: Execute one task at a time inside its stated file boundaries.
- Independent Review (Never Self-Review): Dispatch a fresh reviewer with the task brief and
git diffto check spec compliance and code quality. If it finds Critical or Important issues, fix and re-review (capped at 5 rounds). - Evidence File Verification: Record exact commands, exit codes, and verified screenshots into
.worktrees/evidence/before considering a task done.
Adding this structured loop feels slower for the first 10 min, yet it saves hours of manual bug hunting across the week.
3. Packaging Repeated Workflows into Custom Skills & MCP Tools
A practical rule of thumb for agentic engineering: whenever you type the same multi-step workflow prompt three times, package it into a Skill or an MCP tool.
Inside .agents/plugins/findandfeed-ops/, I bundled workspace-specific skills and a custom Go MCP server (backend/cmd/mcp) so agents execute complex procedures reliably every time:
parallel-worktree-devskill: Automates planning, Git worktree creation, slot isolation, subagent-driven implementation, evidence checks, and PR/merge flags.editorial-pipelineskill: Enforces bilingual (en+vi) drafting paired bytranslation_key, SEO rune counts, AEO takeaways/FAQs, keyword-only infographics, and zero-Amazon-price compliance.merge-codeagent & skill: Commits clean work, checks if a new SQL migration collides withbackend/internal/db/migrations/onmain(renumbering it cleanly if two parallel branches picked the same number), opens a pull request, and merges.- Custom Go MCP Server (
findandfeed-ops): Runs over stdio JSON-RPC 2.0 with a20 sHTTP timeout, exposingfindandfeed_catalog_snapshot,findandfeed_content_gaps,findandfeed_validate_article, andfindandfeed_upsert_articleso editorial workflows validate rules programmatically before touching the database.
4. Running Multiple AI Agents in Parallel Without Collisions
Running two coding agents inside the same working directory is chaos: one edits a component while the other runs tests against stale files or resets the shared E2E database mid-run.
To run parallel workstreams safely on one machine, I combined Git worktrees with AGY_SLOT environment isolation in the Makefile:
- Separate working directories: Each plan branches from
HEADinto.worktrees/<slot>-<slug>on branchwt/<slot>-<slug>, symlinking.envwithout ever copying secrets into Git. - Port & Database Isolation via
AGY_SLOT: SettingAGY_SLOT=1,2,3offsets every runtime port and allocates dedicated test and E2E Postgres databases, whiletestutil.NewDBacquirespg_advisory_lock(948271)and E2E tests seed isolated records withuid().
AGY_SLOT |
API Port | Web Port | E2E API Port | E2E Web Port | Test Database | E2E Database |
|---|---|---|---|---|---|---|
0 (main checkout) |
8080 |
4321 |
18080 |
14321 |
findandfeed_test |
findandfeed_e2e |
1 (worktree 1) |
8081 |
4322 |
18081 |
14322 |
findandfeed_test_1 |
findandfeed_e2e_1 |
2 (worktree 2) |
8082 |
4323 |
18082 |
14323 |
findandfeed_test_2 |
findandfeed_e2e_2 |
With this setup, one agent can build an admin feature in Slot 1 while another fixes frontend SEO tests in Slot 2—neither blocks the other's Playwright suite.
5. Splitting Models by Role to Balance Quality and Speed
Using the largest frontier reasoning model for every boilerplate file edit or git merge burns quota fast and slows down iteration.
In Find And Feed, I split responsibilities by model tier inside parallel-worktree-dev:
- High-Tier Model (Planning Only): Deep reasoning models (such as Gemini Argon or Grok 4.7) inspect the codebase, check migrations and edge cases, write an unambiguous step-by-step plan, and immediately exit.
- Fast / Cost-Effective Execution Model: Runs the orchestrator, scoped implementers, task reviewers, evidence screenshot checks, and
merge-code(gemini-3.8-flashorcomposer-2.5).
Because every ambiguous architectural decision is settled during the short planning pass, faster execution models follow the rails cleanly at a fraction of the token cost. You can see our deeper breakdown of model capabilities in Claude vs Google Antigravity.
6. Series Navigation: Back to Part 1 & Preview of Part 3
If you missed how we designed the minimal Go + Astro + Postgres foundation before setting up these guardrails, start with Part 1: From Idea to AI Blueprint.
Ready to see what still goes wrong even with strong processes? Continue to Part 3: Engineering Pitfalls, Quality Control & Real Results, where I break down the 5 traps that cost me the most debugging hours and show the complete 29-day output—before we tackle Deployment & Security in Part 4.
Frequently asked questions
What should go into AGENTS.md for an AI coding project?
Keep AGENTS.md concise and actionable: folder architecture, exact test and build commands, migration rules, and hard invariants such as auth middleware requirements and caching rules.
How do you run multiple AI coding agents at the same time without breaking tests?
Each plan runs inside its own Git worktree (.worktrees/<slot>-<slug>) with a unique AGY_SLOT value that offsets API, web, and Playwright ports and points to isolated test and E2E Postgres databases.
Why build a custom MCP server instead of just writing long prompts?
A custom MCP server like Find And Feed's Go stdio server validates rules deterministically in code—catching SEO length gaps, trailing slashes, or missing translations before saving.
How does splitting models between planning and execution help?
High-tier models make great architectural plans in one short pass, while fast, lower-cost models execute tasks, run tests, check screenshots, and merge PRs reliably without burning rate limits.



