Kaushik Gopal's Agentic Flow State
Table of content

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
- Principal Engineer at Instacart, leading Caper smart cart development
- Co-founder of Fragmented, one of the longest-running Android podcasts
- Google Developer Expert for Android
- IIT Madras and Carnegie Mellon graduate
- Created RxJava-Android-Samples (7.5k GitHub stars)
GitHub | Blog | Fragmented Podcast
The Four-Step Workflow
Gopal’s agentic coding methodology breaks into four discrete phases:
| Phase | Purpose |
|---|---|
| Set the Stage | Load master AI instructions from AGENTS.md |
| Plan with Agent | Decompose task into executable steps |
| Release Agents | Spawn parallel agents for implementation |
| Verify & Refactor | Run 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:
| Agent | Role |
|---|---|
| Implementer | Executes core logic from the plan |
| Tester | Writes tests for the functionality |
| Documenter | Updates 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:
- Typical runs: 30+ minutes
- Longest documented: approximately 1 hour
- Tested across multiple pull requests
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:
- Project level: Codebase-specific rules in root AGENTS.md
- User level: Personal preferences that apply globally
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:
- Problem statement
- Dependencies
- Numbered execution steps
- 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
| Principle | Implementation |
|---|---|
| Plan before executing | Use structured templates with success criteria |
| Run agents in parallel | Implementer, Tester, Documenter work simultaneously |
| Consolidate instructions | Single AGENTS.md instead of tool-specific configs |
| Treat plans as fungible | Delete after execution, keep the shipped code |
| Fork with tmux | Preserve context for exploratory work |
Links
- kau.sh
- GitHub: @kaushikgopal
- Fragmented Podcast
- Getting Into Flow State with Agentic Coding
- Keep your AGENTS.md in sync
- ExecPlans - How to get your coding agent to run for hours
- Forking subagents with tmux
- AI Programming Paradigms: A Timeline
Next: Jesse Vincent’s Superpowers Skills Framework
Get updates
New guides, workflows, and AI patterns. No spam.
Thank you! You're on the list.