The Agentic Engineering Workflow That Ships 40 PRs a Day

Abhishek Dash6 min read

Most AI coding setups still bottleneck on you. You review each diff, re-prompt the agent, wait for it to finish the boring parts. Kun Chen flipped that. You set direction and quality. The agents do the execution and the checking. When it works, the output is 40 to 50 tested PRs a day that are actually ready to merge.

The captain-and-crew model

Picture yourself as a captain with a crew of agents. You do not row. You decide where to go, what good looks like, and let the crew do the work.

Captain (you)
  └─ First Mate (orchestrator agent)
       ├─ Crewmate 1 → worktree 1 → no-mistakes pipeline → PR
       ├─ Crewmate 2 → worktree 2 → no-mistakes pipeline → PR
       ├─ Crewmate 3 → worktree 3 → no-mistakes pipeline → PR
       └─ ...

This moves your bottleneck from execution to direction. You spend more time talking to users, looking at what competitors are doing, and writing a clear roadmap. The crew builds it.

The terminal environment

The stack is plain and portable, which is the point.

  • WezTerm for the terminal. It is GPU accelerated, works on Linux and macOS, and reloads its Lua config without a restart.
  • tmux for sessions. You can split panes, keep everything alive after you disconnect, and reattach from another device.
  • Neovim for editing. Modal, hands on keyboard, no mouse needed.
  • A dotfiles repo so you can clone the whole environment onto a new machine.

Nothing here is exotic. That is why it holds up when you run it all day.

Agent harnesses

The workflow does not depend on one harness:

Harness Best For
Claude Code Anthropic subscribers; best default UX
Codex CLI Performance, open-source (Rust)
Pi Coding Agent Minimalism, extensibility
OpenCode Model-agnostic, balanced

Pick the one you already pay for or can self-host. The rest of the system stays the same.

Memory and skills

There are two kinds of memory.

Global memory is about 27 lines. It holds your personal preferences, the blind spots you have seen in models, and how you want tests written. You symlink it across every harness so each session loads the same file.

Project memory grows from your sessions. When the agent makes a mistake, correct it and ask it to record what it learned. Over weeks this becomes the shared notes for that repo.

Skills use progressive disclosure. Only a short description is loaded into the system prompt, and the full content loads only if the agent decides it needs it. If your global or project memory gets long, move the conditional parts, like deployment steps or release checklists, into skills. That keeps both small.

A note on safety: skills can run arbitrary commands on your machine. Some popular skills with 177k GitHub stars have measured 5 percent more tokens with worse results. Use only skills that have published evaluations you can read.

Voice input

OpenSuperWhisper is free, open source, and runs a local Whisper model. It is about three times faster than typing. Add your project vocabulary to its system prompt so it gets names and terms right. Type only when you must, for URLs, file paths, and exact code snippets.

Planning with Lavish

When an agent replies with a wall of text, that is hard to review in a terminal. Lavish fixes this by generating an HTML artifact from your project's design system. The agent opens a browser tab with an interactive planning page where you can annotate, click decision points, and give feedback directly. No back and forth in the terminal. When you are ready, you say "Start building" and the agent starts implementing.

The no-mistakes pipeline

AI writes code faster than you can review it line by line. The answer in this system is a fixed pipeline every agent must run before it opens a PR. It is eleven steps:

  1. Create branch
  2. Commit changes
  3. Spin up an isolated worktree
  4. Intent analysis, where the agent reads session history to figure out what you actually wanted
  5. Rebase on latest remote main and resolve conflicts
  6. Adversarial review, where a fresh agent in a clean context reviews the code. Most bugs are caught here
  7. E2E test against the original intent with recorded evidence, like a screenshot, video, or log
  8. Documentation pass
  9. Lint check
  10. Push branch and raise PR
  11. Babysit the PR for merge conflicts and CI failures, and apply fixes

For low-risk changes, you can skip reading the diff. The pipeline already did the work. For high-risk changes, use your judgment and read it.

Parallel agents with Treehouse

Running multiple agents in the same repo normally causes conflicts. Git worktrees help but leave you with manual cleanup and the mental overhead of remembering what each tree was for.

Treehouse trims that overhead:

treehouse        # drops you into a fresh worktree
treehouse status # list all worktrees and their status

Close the tab and Treehouse frees the worktree for reuse. You do not have to track it yourself.

Overnight agents with gnhf

To keep agents working while you sleep, use gnhf, short for Goodnight Have Fun. You give it a stop condition and a token or iteration cap, then let it run.

gnhf "Pretend you are a 7 year old kid and use the app end-to-end.
      Find the first usability problem that will confuse you.
      If you find a problem, stop and fix it, then rinse and repeat."

You monitor progress by commit count. This works well for automated usability checks, bringing down page load time, filling gaps in E2E coverage, or running small research loops overnight.

First Mate: the orchestrator

Running three or more agents in parallel gets tiring to manage yourself. First Mate handles the orchestration. It breaks work into parallel tasks, opens tmux tabs, calls Treehouse for worktrees, launches agents, and keeps track of everything.

git clone https://github.com/kunchenguid/firstmate
claude  # run an agent in this repo directory

You stay at the direction level. First Mate does the juggling.

Daily workflow

Morning: check what landed overnight. Review the recorded evidence, approve or ask for changes, merge the low-risk PRs without reading diffs.

During the day: speak a request with voice input. If the task is complex, plan it in Lavish, then say "start building" and let the no-mistakes pipeline run while you start the next one.

Evening: look at what shipped, update project memory with what you corrected, start a gnhf loop for overnight, and close the laptop.

Quick-start checklist

  • Install WezTerm, tmux, Neovim
  • Choose an agent harness
  • Create a global memory file, about 20 to 30 lines
  • Create a project-level memory file
  • Symlink agent memory files across harnesses
  • Install Skill Creator: npx skills@latest add skill-creator
  • Install OpenSuperWhisper for voice input
  • Install Lavish for interactive planning
  • Install Treehouse for worktree management
  • Install gnhf for overnight loops
  • Clone and set up First Mate for orchestration
  • Build project memory by correcting agent mistakes over time

Frequently asked questions

What is the captain-and-crew model in agentic engineering?

You are the captain: you set direction and define quality standards. A First Mate orchestrator decomposes work into parallel tasks. Each crewmate is an independent agent working in its own isolated git worktree, running the no-mistakes validation pipeline, and raising a PR. Your bottleneck shifts from execution to direction.

What is the no-mistakes pipeline?

An 11-step validation pipeline every agent runs before raising a PR: create branch, commit, spin up an isolated worktree, intent analysis, rebase on main, adversarial review by a fresh agent, E2E test with recorded evidence, documentation pass, lint check, push and PR, then babysit for CI failures and merge conflicts.

How do you run agents overnight?

gnhf (Goodnight Have Fun) sets a token cap or iteration cap with a stop condition, then lets the agent work autonomously while you sleep. Example: "Pretend you are a 7-year-old using the app end-to-end. Find the first usability problem, fix it, rinse and repeat." Monitor via commit count.

What tools are in the agentic engineering stack?

WezTerm (terminal), tmux (multiplexer), Neovim (editor), Claude Code or Codex CLI (agent harness), OpenSuperWhisper (voice input), Lavish (interactive planning), Treehouse (worktree manager), First Mate (orchestrator), and gnhf (overnight loops).

How do you manage multiple agents without conflicts?

Each agent runs in its own isolated git worktree via Treehouse. Close the tab and Treehouse auto-frees the worktree for reuse. First Mate handles orchestration across agents so you do not have to juggle sessions manually.