What it does
product-mode is a drop-in CLAUDE.md / AGENTS.md for Claude Code,
Cursor, Codex, and any coding agent that reads one. It targets the mistake that costs product
teams most: shipping the wrong thing, well.
Karpathy's guidelines fix how agents write code. product-mode adds the missing layer: problem framing, scope discipline, tradeoffs, outcome measurement, and decision logging, applied before the code gets written.
| # | Principle | What it prevents |
|---|---|---|
| 1 | Frame the Problem Before the Solution | Building for the wrong user |
| 2 | Make Assumptions & Unknowns Visible | Silent guessing |
| 3 | Ship the Minimum Viable Change | Scope creep, gold-plating |
| 4 | Name the Tradeoffs | Invisible costs, political decisions |
| 5 | Define Done by Outcome, Not Output | "Merged" mistaken for "done" |
| 6 | Instrument Before You Ship | Shipping blind |
| 7 | Log the Decision, Flag Reversibility | Repeating mistakes, calcifying defaults |
Before any non-trivial change, the agent fills a five-box pre-flight checklist: Problem, Why now, Scope, Primary metric, and Reversibility. If a box is empty, it fills it or says out loud that it is going ahead without it.
The full rules live in one file: CLAUDE.md on GitHub.
Resolve uncertainty and keep moving
Before asking questions, the agent checks project context, prior decisions, code, and accessible data. It asks about missing answers that materially change the problem, scope, success criteria, or a costly commitment. Independent questions can be grouped; dependent choices wait for their prerequisite answers.
| Unknown | Next step |
|---|---|
| Missing fact | Inspect accessible evidence or request what is missing. |
| Product choice | Recommend an option, name the tradeoffs, and get the needed decision. |
| UX question | Try the smallest prototype users can react to. |
| Outcome hypothesis | Define a small experiment with a success signal and guardrails. |
Agreement on scope does not validate customer demand. The agent should make missing evidence visible and record how assumptions will be tested. Once the next useful step is clear, it continues authorized, reversible work. It pauses the affected work when a missing answer changes correctness or requires sign-off. Deeper product challenge sessions are available when you explicitly ask for one.
When to reach for it
Not every change needs all seven principles. The file opens with this table, so the agent scales the rigor to the change:
| Change type | Apply |
|---|---|
| Typo, comment, obvious one-liner | None. Just do it. |
| Bug fix, small internal refactor | Principles 2, 3, 5 |
| New user-facing feature | All seven |
| Architecture, pricing, public API, data model | All seven + explicit one-way-door sign-off |
The goal is fewer costly mistakes on non-trivial work, not ceremony on trivial work.
What it looks like
Three worked examples. They are authored teaching scenarios, not model transcripts or measured results.
The questions below illustrate missing context. If your request already supplies the evidence or decision, the agent should use it and move forward.
Add a dashboard
- Request
- "Add a dashboard to our SaaS app with charts, filters, and export."
- Asks first
- Which user needs this, and what decision will they make after looking at it?
- Smallest scope
- A list of overdue jobs, sorted by age, linking to the existing job detail page.
Build a complete referral system
- Request
- "Build referrals with invite codes, credits, leaderboards, fraud detection, and an admin dashboard."
- Asks first
- What evidence says customers want to refer others, and what is the smallest pilot that would test it?
- Smallest scope
- A small, opt-in referral pilot with a simple way to record introductions. No rewards engine yet.
Add an onboarding checklist
- Request
- "Add an onboarding checklist so more users activate."
- Asks first
- What observable action means the user received value, and how often does it happen today?
- Smallest scope
- Guide users to one existing action that represents first value, with a way to resume it later.
It's working if
- Fewer rebuilds because "we shipped the wrong thing."
- Assumptions get challenged before code, not in review.
- Tradeoffs appear in writing, not just in Slack threads.
- Every shipped feature has a metric attached, checked on a date.
- The decision log is the first thing new teammates read, and it's useful.
Try the six uncertainty evaluation cases to check whether your agent uses supplied context, asks useful questions, avoids invented evidence, and keeps routine work moving. They are authored prompts for comparison; improvements in agent behavior still need to be measured on real work.
Common questions
- Do I need to install anything?
- No. The instructions are a text file your agent reads. The CLI is optional. It saves checklists and decision logs, and needs Node.js 20.19 or newer.
- I already have a CLAUDE.md. Will this overwrite it?
- No. The install command refuses to overwrite an existing file. Copy the guidelines you need into your file and resolve any conflicts. The merge guide walks through it.
- Which agents does it work with?
- Claude Code, Cursor, Codex, and any coding agent that reads
CLAUDE.mdorAGENTS.md. Both files have the same content. - Will it slow down small changes?
- Routine fixes can use lighter rigor. The optional
product-mode trivialcommand gives advisory guidance; use the change-type table above to choose the review needed. The updated classifier on GitHub only automatically qualifies small edits to existing ordinary documentation. Code and agent instructions require review. This classifier awaits a new npm release. - Are the examples real results?
- No. They are authored scenarios. To test it on your own work, send the same request in fresh sessions with and without the guidelines. Here is the comparison protocol.
- Is it free?
- Yes. MIT license. Fork it, adapt it, make it your team's own.
Where it fits
product-mode is the thinking layer. It decides what is worth building. These open-source tools are the doing layers:
- strategy-mcp
- MCP server that gives Claude 12 product strategy frameworks as tools (RICE, JTBD, assumption mapping, TAM/SAM/SOM, Wardley).
- founder-mode
- Claude Code plugin that turns it into an AI co-founder: strategy review, competitor scan, stress-test, stakeholder updates.
- agent-pm
- Claude Code plugin with 12 commands for building AI agent products, from "should this even be an agent?" to production readiness.
Want your team working like this? Book a workshop.