Kaushik Gopal's Agentic Flow State

Table of content
Kaushik Gopal's Agentic Flow State

Kaushik Gopal is a Principal Engineer at Instacart and co-host of the Fragmented Android developer podcast. A Google Developer Expert for Android with degrees from IIT Madras and Carnegie Mellon, he’s known for open source work like RxJava-Android-Samples and TrueTime. His blog at kau.sh documents his evolving approach to AI-assisted development, with 22 posts on AI and a focus on multi-agent workflows.

Gopal’s core insight: the planning step separates senior engineers from junior ones in an AI-reliant future. While everyone can prompt an agent, structuring work so agents run for hours requires deliberate methodology.

Background

GitHub | Blog | Fragmented Podcast

The Four-Step Workflow

Gopal’s agentic coding methodology breaks into four discrete phases:

PhasePurpose
Set the StageLoad master AI instructions from AGENTS.md
Plan with AgentDecompose task into executable steps
Release AgentsSpawn parallel agents for implementation
Verify & RefactorRun tests, fix failures, review changes

What makes this different: parallel execution. Rather than one agent doing everything sequentially, Gopal spawns three specialized agents simultaneously.

Three-Agent Architecture

From his blog post on flow state:

AgentRole
ImplementerExecutes core logic from the plan
TesterWrites tests for the functionality
DocumenterUpdates project documentation

Each agent assumes the others will complete their work. The parallel structure minimizes merge conflicts because each agent touches different parts of the codebase.

Gopal uses tmux to fork subagents with identical context, allowing exploratory work in separate sessions while the main agent continues.

ExecPlans for Extended Runs

The biggest unlock: detailed planning before execution. Gopal maintains plans in a .ai/plans/ directory, with a master plan at .ai/plans/PLANS.md and temporary plans gitignored in .ai/plans/tmp/.

The approach, adapted from Aaron Friel’s template, enables agents to run for extended periods:

From his exec-plans post:

“On an average I’ve definitely gotten my agents to run for much longer successfully.”

Plans are treated as fungible. Once executed, delete them. The artifact is the shipped code, not the plan.

AGENTS.md as Single Source of Truth

Gopal advocates consolidating AI instructions into one AGENTS.md file rather than maintaining separate configurations for each tool:

project/
  AGENTS.md          # Root instructions
  .ai/
    plans/           # Execution plans
    docs/            # AI-maintained documentation
    skills/          # Reusable commands

Two levels of instructions:

The benefit: no vendor lock-in. When you switch from Cursor to Claude Code, your methodology transfers.

Planning as Engineering Skill

Gopal frames planning as the critical skill for AI-assisted development:

“This planning step is what will distinguish the senior engineers from the junior ones.”

He uses an “Expert Task Decomposer” prompt that requires three-step interactive approval before generating execution plans. Each plan follows a structured template:

  1. Problem statement
  2. Dependencies
  3. Numbered execution steps
  4. Success criteria

The process forces clarity before any code gets written. Agents execute better when they understand the full scope upfront.

Upfront Context Investment

Gopal emphasizes loading context early:

“I may be writing less of the boilerplate code, but I’m still doing a lot of code thinking.”

Important instructions that you repeat every session belong in your master AGENTS.md. The time invested pays off across every future session.

Key Takeaways

PrincipleImplementation
Plan before executingUse structured templates with success criteria
Run agents in parallelImplementer, Tester, Documenter work simultaneously
Consolidate instructionsSingle AGENTS.md instead of tool-specific configs
Treat plans as fungibleDelete after execution, keep the shipped code
Fork with tmuxPreserve context for exploratory work

Next: Jesse Vincent’s Superpowers Skills Framework

Topics: ai-coding workflow agents automation