Production Agent Workflow

Elevate How You Work
With Your Agent.

A template for organizing your individual context and work style so your agent can meet you where you are. You don't need to change your workflow. You're equipping your agent to work the way you already do.

The Opportunity

Your Agent Needs Your Context

When an agent doesn't have access to your conventions, architecture knowledge, and verification habits, common friction points emerge naturally.

Large PRs

500+ lines, multiple concerns tangled together. Reviewers can't hold the full context. Reviews take hours instead of minutes.

Failing CI

Push, wait 15 minutes, see the failure, fix, push again. Each cycle burns time and blocks the team.

Merge Conflicts

Long-lived branches diverge from main. The longer a branch lives, the more painful the merge.

Code Nobody Understands

The agent generated it, the human committed it, but nobody can explain what it does or why.

These aren't failures of the practitioner. They're the natural result of an agent that doesn't have enough context about your codebase and workflow. This template gives you a place to organize that context.

The Shift

Organize Your Context. Elevate Your Output.

You already know how you work best. This template helps you encode that knowledge so your agent has access to it every session.

Without Your ContextWith Your Context
"Generate a feature"Orient on existing patterns, then build one layer
Push and see if CI passesRun the pre-push checklist locally
One big PR with everythingStacked PRs, one concern each
Trust the AI output blindlyUnderstand the full implementation before committing
No conventions documentedConventions encoded so the agent follows them
Hope it worksVerify it works, then ship

The Core Insight

An agent is only as good as the context you give it. When your agent has access to your conventions, architecture knowledge, and verification habits, it becomes a more effective collaborator - one that is more likely to produce output aligned with how you already work. Your expertise still validates every result.

Why This Works

Built for Goose. Works With Any Agent.

This template was developed using Goose, an open-source AI agent that reads AGENTS.md files at session start. The directory structure maps directly to how Goose discovers and uses context.

How Goose uses it

  • AGENTS.md - read at session start, shapes all behavior
  • conventions/ - consulted before generating code
  • pre-push-checklist - executed before every push
  • workflow.md - followed when building features

Works with other agents too

  • Cursor - reads .cursorrules (same concept)
  • Copilot Workspace - reads project context
  • Windsurf - reads .windsurfrules
  • Aider - reads project conventions

The conventions are agent-agnostic. The knowledge you encode (architecture, testing, PR workflow) is useful regardless of which agent reads it.

For Teams

Individual Context. Collective Benefit.

When everyone on a team organizes their individual context, the whole team moves faster.

PRs get smaller - the agent knows the scoping norms

CI passes on first push - the checklist runs locally

Reviews are faster - the code already follows team patterns

Onboarding accelerates - new engineers build their world model by mining reviews

What Production Looks Like

Three Layers of Context

The template organizes your knowledge into three layers. Each one helps your agent understand more about how you work and what your codebase expects.

1

Identity and Boundaries

Who are you? What can the agent do without asking? What requires your confirmation? This is your AGENTS.md file - the first thing your agent reads.

AGENTS.md

"The agent can commit to feature branches. It cannot push to main. It cannot post to Slack without confirmation."

2

Workflow and Verification

How does work move from idea to shipped code? What gates exist between 'generated' and 'merged'? The pre-push checklist is the single highest-leverage document.

workflow.md + conventions/pre-push-checklist.md

Format check, lint, compile, test - all locally, before every push. CI should never be the first time you discover a problem.

3

Conventions and World Model

What does your codebase expect? Where does logic live? How are things tested? This is the accumulated knowledge that makes your agent effective in your specific codebase.

conventions/

"Side effects belong in the repository layer. Use cases are thin one-liner delegations. State that derives from other state is computed, not stored."

The Compound Effect

Convention Mining

Every code review teaches you something about how your team thinks about code. Convention mining is the practice of capturing those insights as they appear so they compound into your personal knowledge base - and your agent's.

For You

Your PRs align with team expectations from the first draft. Fewer review cycles. Faster merges.

For Your Agent

Encoded conventions help the agent produce output more likely to follow team patterns instead of inventing new ones.

For the Team

Implicit knowledge becomes explicit. Onboarding accelerates. New engineers learn the codebase architecture as a system.

How it works:

  1. 01Notice when a review comment expresses a general principle (not a one-time fix)
  2. 02Capture it in imperative form with source attribution
  3. 03Categorize it (architecture, testing, PR workflow, security)
  4. 04Cross-reference with existing conventions (don't duplicate, note tensions)

After a few weeks, your conventions directory reflects how your team actually thinks about code.

The Template

What You Get

~/research/
├── AGENTS.md                    # Agent norms and boundaries
├── workflow.md                  # Idea-to-ship phases
├── world-model.md              # How shared + individual knowledge work together
├── goose.md                    # Why this structure works with Goose
├── prompts.md                  # Copy-paste prompts for your agent
├── setup.sh                    # Interactive setup script
├── conventions/
│   ├── architecture.md          # Layer responsibilities
│   ├── testing.md               # Test design principles
│   ├── pr-workflow.md           # PR size, stacking, review norms
│   ├── pre-push-checklist.md    # Platform-specific verification
│   ├── shipping-safely.md       # Feature flags, prototype lifecycle
│   └── convention-mining.md     # Learning from code reviews
├── references/                  # Platform knowledge
├── active/                      # Current work-in-progress
├── sessions/                    # Session logs (optional)
└── examples/
    └── mobile-android/          # Worked example

Start here: Fill in AGENTS.md and conventions/pre-push-checklist.md. You can be productive in 15 minutes. The rest compounds over weeks.

Get Started

15 Minutes to a More Impactful Collaboration

1

Clone the template

git clone https://github.com/dakotafabro/production-agent-workflow.git ~/research
2

Run the interactive setup

cd ~/research && ./setup.sh

The script walks you through identity, boundaries, and platform-specific pre-push commands. It writes your AGENTS.md and pre-push checklist based on your answers.

3

Let your agent fill in the rest

Open prompts.md for copy-paste prompts that help your agent analyze your codebase, CI config, and test suite to populate the remaining conventions.

4

Start using it

Point your agent at the repo. It reads AGENTS.md at session start and knows your context immediately. Over time, mine conventions from code reviews and watch your collaboration deepen.