Skip to main content

Loading…

Skip to main content
HomeProjectsPostsApproachesStackResourcesContact
Justin Tsugranes LogoJustin Tsugranes Logo

Justin Tsugranes

HomeProjectsPostsApproachesStackResourcesContact

Stay in the loop

Occasional notes on what I'm building, lessons earned, and the studio behind it.

By subscribing, you agree to receive No spam. Unsubscribe in one click anytime. from Justin Tsugranes. No spam. Unsubscribe anytime. Privacy Policy

© 2026 Total Ventures LLC. All rights reserved.

Privacy PolicyTerms of ServiceCookie Policy
← All approaches

Approach · agents · in production

Agent-First Development

Agent-First Development is my method for optimizing codebases for AI agents to write and maintain most of the code, enabling me to scale product development as a solo operator.

Agent-First Development is the practice of structuring a codebase and its surrounding workflows to prioritize machine readability and generation over human-only authoring. I build assuming agents will write most of the code, so the codebase is optimized for them, not just for humans.

What it is

This approach flips the traditional development model. Instead of humans writing code and using tools to assist, I design systems where AI agents are the primary authors. This means defining explicit interfaces, strict conventions, and clear documentation that agents can consume and act upon. The goal is to minimize ambiguity for the agent and maximize its ability to autonomously generate, test, and integrate code. It's about architecting for automation from the ground up, treating the agent as a first-class developer on the team.

Why I do it this way

As a solo operator running Total Ventures, this is the only way I can manage a multi-product studio. I learned the hard way that trying to keep up with multiple codebases manually, even with standard automation, was unsustainable. The ability to manage Multiple Revenue Streams, One Back Office is only possible because the underlying code generation and maintenance are largely agent-driven. This approach allows me to ship features across brands like Total Formula 1, Pregnancy Power Hour, and Inky with a lean operational footprint. It's not about replacing humans, but augmenting my capacity to build and iterate rapidly, focusing my own time on architectural decisions and strategic product direction rather than routine CRUD operations.

How it works in practice

Implementation starts with rigorous convention enforcement. Every new project template includes a predefined ESLint and Prettier configuration, along with custom linters that check for agent-specific patterns. I use `AGENT_MAP` files – essentially structured YAML or JSON documents – that provide agents like Claude Code or Gemini with a high-level overview of module responsibilities, API contracts, and expected data flows. These maps act as the agent's architectural blueprint.

Deterministic test layouts are critical. For instance, in a Firebase Function, I expect `src/functions/myFunction/index.ts` to have a corresponding `src/functions/myFunction/index.test.ts` with a specific structure for unit and integration tests. Agents are trained on these patterns, making test generation and updates predictable. My pre-push Git hooks, powered by Husky, run a suite of checks including these custom linters and agent-specific validation scripts. These gates catch common agent mistakes – like misinterpreting an interface or introducing an unexpected dependency – before they hit the main branch. This integrates with my Audits as Crons system, where agent-generated code is continuously evaluated against performance and security benchmarks. For example, when building out new content features for Pregnancy Power Hour, agents generate the initial content structures and associated API endpoints, which are then validated by these automated checks. This systematic approach ensures that even agent-authored code adheres to the studio's quality standards, from the initial Lead Magnet → Paid Ladder content to the final product.

Where this breaks down

While powerful, Agent-First Development has its limits. Highly novel algorithms or complex, non-standard architectural refactors often require human intervention. Debugging agent-generated code can sometimes feel like untangling spaghetti if the initial prompt or `AGENT_MAP` was ambiguous. The initial setup overhead for defining all conventions, `AGENT_MAP`s, and custom validation scripts is significant. It's an investment that pays off over time, but it's not a quick win. Also, agents are only as good as their training data and the context they're given. Without clear, up-to-date documentation and explicit instructions, they can drift, leading to subtle bugs that are hard to trace back to the source. The system works best when the problem space is well-defined and the interfaces are stable. For exploratory R&D, a human-first approach is often more efficient initially.

FAQs

How do you handle agent-generated code that's hard for humans to read?
I prioritize correctness and functionality over human elegance for agent-written modules. Refactoring is handled by another agent, or I intervene for critical paths. The goal is output, not perfect human-readable prose. The strict conventions ensure consistency, even if the style isn't what a human would write.
Does this mean humans don't write code?
Humans architect the system, define interfaces, and write the initial scaffolding. Agents fill in the details, generate tests, and handle iterative changes. My role has shifted from author to architect and auditor, focusing on system design and validation rather than line-by-line coding.

I run this and four other brands. Want to see the operator playbook in detail?

Get the Builder's Playbook →
Written by Justin Tsugranes, Founder, Total Ventures· Founder, Total Ventures · U.S. Army veteran (13 years) · M.M. Jazz Studies, University of South Carolina
Last reviewed May 9, 2026