AI-assisted development and vibecoding
Vibecode like an engineer
From prompting an AI to a repeatable workflow that ships real software. 15 levels, 205 checks, 65 context-file templates and 17 prompts. Works with Codex, Claude Code, Copilot, Cursor, Gemini CLI and other agents.
Work down the path. Click a step or any topic under it to open its checklist. Progress is saved in this browser, separately from the main roadmap.
Know what agents can and can't do before you trust them with a repo.
An agent reads your repo, edits files and runs commands. It is fast, confident and sometimes wrong.
A good task has a goal, context, constraints, acceptance criteria and a definition of done.
Write down what you want before the agent has to guess.
Durable files that tell any agent what you're building, how, and by which rules.
Decide the problem, users and scope yourself. Agents implement decisions; they shouldn't invent them.
Agents build generic screens unless you give them a design system, flows and every UI state.
Decide architecture, data and contracts on purpose, then hand them over.
Pick the simplest architecture that meets the requirements, write it down, and hold the agent to it.
Model the data deliberately. The schema and migrations are the source of truth, not a Markdown summary.
Contracts first, real docs always. Agents invent endpoints when you don't give them the spec.
Small tasks, real checks, honest reports.
Explore first, follow conventions, make small diffs and read every one.
Tests are how you know AI-generated code works. Require evidence, not claims.
Generated code needs the same review as any code. Instructions are not security controls.
Measure first, change one thing, measure again. Agents optimize the wrong thing when guessing.
Release safely, coordinate agents and improve the system over time.
Git is your safety net. Small commits, branches and one owner for integration.
Reproducible builds, staged releases, health checks and a rollback you've practiced.
Subagents, skills, MCP and evaluations, used where they add value, not by default.
The AI Project Context Pack
Markdown files every vibecoder should know
65 templates, ready to copy or download into your project. Agents build what you describe; these files are how you describe it once instead of in every prompt.
Pack 1
Starter
Landing pages, portfolios, prototypes and small utilities.
Pack 2
Standard
Full-stack apps and SaaS.
Everything in Starter, plus:
- REQUIREMENTS.md
- ACCEPTANCE_CRITERIA.md
- TASKS.md
- DECISIONS.md
- AGENT_HANDOFF.md
- docs/ARCHITECTURE.md
- docs/TECH_STACK.md
- docs/UI_UX_SPEC.md
- docs/ACCESSIBILITY.md
- docs/DATABASE_SCHEMA.md
- docs/DATABASE_MIGRATIONS.md
- docs/API_SPEC.md
- docs/INTEGRATIONS.md
- docs/AUTHENTICATION_AUTHORIZATION.md
- docs/SECURITY.md
- docs/TESTING_STRATEGY.md
- docs/AGENT_PERMISSIONS.md
- docs/ENVIRONMENTS.md
- docs/DEPLOYMENT.md
Pack 3
Production
Complex or critical systems. Add these as the need appears.
Everything in Standard, plus:
- docs/adr/0001-record-architecture-decisions.md
- KNOWN_ISSUES.md
- CHANGELOG.md
- docs/THREAT_MODEL.md
- docs/PRIVACY.md
- docs/DATA_DICTIONARY.md
- docs/WEBHOOKS.md
- docs/OBSERVABILITY.md
- docs/PERFORMANCE.md
- docs/CI_CD.md
- docs/RELEASE_PROCESS.md
- docs/BACKUP_RECOVERY.md
- docs/ROLLBACK_PLAN.md
- docs/RUNBOOK.md
- docs/COSTS.md
- docs/AGENT_WORKFLOW.md
Unzip into your project root. Folders like docs/ and .github/ are already in place. Delete what you don't need, then fill in the [placeholders], or ask your agent to with the context-planning prompt below.
Agent instructions
Keep one shared instruction file as the source of truth, usually AGENTS.md. Add small tool-specific files only for features that need them, and have them point back to the shared file instead of repeating it. Contradicting rules across files make agents pick one at random.
AGENTS.mdEssentialOne place that tells any coding agent how to build, test and follow the project's rules.
AGENTS.mdEssentialOne place that tells any coding agent how to build, test and follow the project's rules.
- What to include
- → Project overview in a few lines
- → Setup, build, lint, typecheck and test commands
- → Code style and conventions
- → Where the deeper docs live
- → Boundaries: what agents must never do
- → Definition of done
- When to create it
- Day one, before the first agent task.
- Read automatically by
- Codex, Cursor, GitHub Copilot (cloud agent, VS Code, CLI) and Claude Code when there's no CLAUDE.md. Gemini CLI if added to context.fileName.
- Check the agent used it
- Ask the agent to summarize its instructions at the start of a session, or check its startup notice (Claude Code prints which AGENTS.md loaded; Gemini CLI has /memory show).
- Depends on
- README.md
- Update it
- When commands, conventions or boundaries change, and whenever you correct the same agent mistake twice.
CLAUDE.mdConditionalClaude Code's own instruction file, for Claude-specific settings on top of AGENTS.md.
CLAUDE.mdConditionalClaude Code's own instruction file, for Claude-specific settings on top of AGENTS.md.
- What to include
- → @AGENTS.md import so shared rules stay in one place
- → Claude-only notes: skills, subagents, hooks
- → Pointers to .claude/rules/ for path-scoped rules
- When to create it
- Only if you use Claude Code and need something AGENTS.md can't express. Otherwise Claude Code reads AGENTS.md directly.
- Read automatically by
- Claude Code (project root, .claude/CLAUDE.md, parent folders, subfolders on demand). Copilot's cloud agent and CLI also read it.
- Check the agent used it
- Run /memory in Claude Code to see loaded files. Note that a CLAUDE.md stops Claude reading AGENTS.md unless you import it.
- Depends on
- AGENTS.md
- Update it
- When Claude-specific workflow changes. Keep shared rules in AGENTS.md.
.github/copilot-instructions.mdConditionalRepository-wide instructions for every GitHub Copilot surface, including chat in editors that don't read AGENTS.md.
.github/copilot-instructions.mdConditionalRepository-wide instructions for every GitHub Copilot surface, including chat in editors that don't read AGENTS.md.
- What to include
- → Short pointer to AGENTS.md and key docs
- → The few rules Copilot chat must always follow
- → Review guidance for Copilot code review
- When to create it
- If your team uses Copilot chat in Visual Studio, JetBrains, Xcode or Eclipse, or Copilot code review.
- Read automatically by
- Every GitHub Copilot surface: github.com, VS Code, Visual Studio, JetBrains, Eclipse, Xcode and the CLI.
- Check the agent used it
- In Copilot chat, check the References list under a response for copilot-instructions.md.
- Depends on
- AGENTS.md
- Update it
- When AGENTS.md changes in a way Copilot users need.
.github/instructions/frontend.instructions.mdOptionalRules that apply only to some files, so they don't clutter every request.
.github/instructions/frontend.instructions.mdOptionalRules that apply only to some files, so they don't clutter every request.
- What to include
- → applyTo glob in frontmatter, e.g. "src/components/**"
- → Rules specific to that area
- → Links to the area's docs
- When to create it
- When one area (frontend, API, tests) has rules the rest of the repo doesn't need.
- Read automatically by
- GitHub Copilot when the files being changed match applyTo (cloud agent, code review, VS Code, Visual Studio, JetBrains, CLI).
- Check the agent used it
- Edit a matching file and check that Copilot lists the instructions file in its references.
- Depends on
- AGENTS.md
- Update it
- When that area's conventions change.
.claude/rules/api.mdOptionalPath-scoped rules for Claude Code that load only when Claude touches matching files.
.claude/rules/api.mdOptionalPath-scoped rules for Claude Code that load only when Claude touches matching files.
- What to include
- → paths: frontmatter with globs
- → Area-specific rules
- → Links to the area's docs
- When to create it
- In larger repos, once CLAUDE.md or AGENTS.md grows past about 200 lines.
- Read automatically by
- Claude Code (rules without paths load every session; with paths, when matching files are read). VS Code also reads .claude/rules for Claude sessions.
- Check the agent used it
- Ask Claude to read a matching file, then run /memory to see the rule loaded.
- Depends on
- AGENTS.md
- Update it
- When the area's conventions change.
.cursor/rules/project.mdcOptionalCursor rules with control over when they apply: always, by file glob, by relevance, or manually.
.cursor/rules/project.mdcOptionalCursor rules with control over when they apply: always, by file glob, by relevance, or manually.
- What to include
- → Frontmatter: description, globs, alwaysApply
- → Short rule body
- → Pointer to AGENTS.md for shared rules
- When to create it
- If you use Cursor and need file-scoped or on-demand rules. For simple projects Cursor reads AGENTS.md.
- Read automatically by
- Cursor, based on alwaysApply, globs or description. Files must use the .mdc extension.
- Check the agent used it
- Cursor shows applied rules in the chat context; @-mention a manual rule to include it.
- Depends on
- AGENTS.md
- Update it
- When conventions for those files change.
GEMINI.mdConditionalGemini CLI's instruction file.
GEMINI.mdConditionalGemini CLI's instruction file.
- What to include
- → @AGENTS.md import or a pointer to it
- → Gemini-specific notes only
- When to create it
- If you use Gemini CLI. Alternative: set context.fileName to include AGENTS.md and skip this file.
- Read automatically by
- Gemini CLI (global ~/.gemini/GEMINI.md, workspace and parent folders, and folders it works in). Copilot's cloud agent and CLI also read it.
- Check the agent used it
- Run /memory show in Gemini CLI.
- Depends on
- AGENTS.md
- Update it
- When AGENTS.md changes in a way Gemini needs.
packages/api/AGENTS.mdConditionalInstructions for one package or app in a monorepo, layered on top of the root file.
packages/api/AGENTS.mdConditionalInstructions for one package or app in a monorepo, layered on top of the root file.
- What to include
- → What this package does
- → Its own commands
- → Its conventions and boundaries
- When to create it
- In monorepos where packages have different stacks or rules.
- Read automatically by
- Codex (root down to the working folder), Cursor, Claude Code when working in that folder. VS Code needs chat.useNestedAgentsMdFiles.
- Check the agent used it
- Start the agent inside the package folder and ask which instructions it has.
- Depends on
- AGENTS.md
- Update it
- When the package's stack or rules change.
.claude/skills/release/SKILL.mdOptionalA reusable workflow the agent loads only when relevant, such as releasing, reviewing or writing migrations.
.claude/skills/release/SKILL.mdOptionalA reusable workflow the agent loads only when relevant, such as releasing, reviewing or writing migrations.
- What to include
- → name and description frontmatter (the description decides when it loads)
- → Step-by-step instructions
- → Optional scripts and reference files beside it
- When to create it
- When you repeat the same multi-step workflow often.
- Read automatically by
- Claude Code (.claude/skills/) and Codex (.agents/skills/) load a skill's full text only when the task matches its description.
- Check the agent used it
- Ask the agent to list available skills, then give a task that should trigger it.
- Depends on
- AGENTS.md
- Update it
- When the workflow changes or the agent misuses it.
Product and requirements
For small projects, fold all of these into PROJECT_BRIEF.md. Split them out only when the brief grows past a few pages or several people edit it.
README.mdEssentialWhat the project is and how to run it, for humans first and agents second.
README.mdEssentialWhat the project is and how to run it, for humans first and agents second.
- What to include
- → One-paragraph description
- → Requirements and setup
- → Run, test and build commands
- → Project structure overview
- → Links to docs/
- When to create it
- Day one.
- Read automatically by
- Not loaded automatically, but agents usually read it while exploring. Link it from AGENTS.md.
- Check the agent used it
- A new developer, or a fresh agent session, can run the project from it alone.
- Depends on
- Nothing; write it first.
- Update it
- When setup or commands change.
PROJECT_BRIEF.mdEssentialThe decisions an agent must not invent: problem, users, scope and constraints.
PROJECT_BRIEF.mdEssentialThe decisions an agent must not invent: problem, users, scope and constraints.
- What to include
- → Problem and users
- → Key journeys
- → MVP requirements
- → Non-goals
- → Constraints
- → Assumptions and open questions
- → Success metrics
- When to create it
- Before implementation. Generate it with the Requirements discovery prompt.
- Read automatically by
- Not loaded automatically. Reference it from AGENTS.md or name it in your prompt.
- Check the agent used it
- Ask the agent which requirement a change serves; it should cite the brief.
- Depends on
- Nothing; write it first.
- Update it
- When scope changes. Record why in DECISIONS.md.
PRODUCT_SPEC.mdOptionalDetailed product behavior when the brief is no longer enough.
PRODUCT_SPEC.mdOptionalDetailed product behavior when the brief is no longer enough.
- What to include
- → Feature-by-feature behavior
- → Business rules
- → Permissions per role
- → Edge cases
- When to create it
- When the product has many features or roles.
- Read automatically by
- Not loaded automatically. Reference it from AGENTS.md or name it in your prompt.
- Check the agent used it
- Spot-check that implemented behavior matches the spec's business rules.
- Depends on
- PROJECT_BRIEF.md
- Update it
- With every behavior change.
REQUIREMENTS.mdRecommendedNumbered functional and non-functional requirements that tasks and tests can trace to.
REQUIREMENTS.mdRecommendedNumbered functional and non-functional requirements that tasks and tests can trace to.
- What to include
- → FR-1, FR-2... functional requirements
- → NFRs: performance, security, accessibility, availability
- → Priority per requirement
- → Status
- When to create it
- When the project has more than a handful of features.
- Read automatically by
- Not loaded automatically. Reference it from AGENTS.md or name it in your prompt.
- Check the agent used it
- Every task in TASKS.md lists requirement IDs it covers.
- Depends on
- PROJECT_BRIEF.md
- Update it
- When requirements are added, changed or completed.
USER_STORIES.mdOptionalRequirements written from the user's view.
USER_STORIES.mdOptionalRequirements written from the user's view.
- What to include
- → As a... I want... so that...
- → Acceptance criteria per story
- → Priority
- When to create it
- If your team plans in stories. Otherwise REQUIREMENTS.md is enough.
- Read automatically by
- Not loaded automatically. Reference it from AGENTS.md or name it in your prompt.
- Check the agent used it
- Each story's criteria map to a test.
- Depends on
- PROJECT_BRIEF.md
- Update it
- When stories are refined or completed.
ACCEPTANCE_CRITERIA.mdRecommendedCheckable conditions that define when each feature is done.
ACCEPTANCE_CRITERIA.mdRecommendedCheckable conditions that define when each feature is done.
- What to include
- → Given / When / Then scenarios per requirement
- → Error and edge cases
- → Non-functional checks
- When to create it
- Before implementing each feature. Can live inside REQUIREMENTS.md for small projects.
- Read automatically by
- Not loaded automatically. Reference it from AGENTS.md or name it in your prompt.
- Check the agent used it
- Criteria are turned into tests, and the agent reports which ones pass.
- Depends on
- REQUIREMENTS.md
- Update it
- When behavior is clarified.
SCOPE_AND_NON_GOALS.mdOptionalWhat's in and, more importantly, what's out, so agents don't add unrequested features.
SCOPE_AND_NON_GOALS.mdOptionalWhat's in and, more importantly, what's out, so agents don't add unrequested features.
- What to include
- → In scope for this release
- → Explicit non-goals
- → Later ideas
- When to create it
- When scope creep is a risk. Small projects keep this in the brief.
- Read automatically by
- Not loaded automatically. Reference it from AGENTS.md or name it in your prompt.
- Check the agent used it
- Review diffs for features not in scope.
- Depends on
- PROJECT_BRIEF.md
- Update it
- At the start of each release.
Planning and execution
The project's working memory. Agents forget between sessions; these files don't. Update task status, decisions and handoffs at the end of every session.
IMPLEMENTATION_PLAN.mdRecommendedThe order in which the system gets built, and why.
IMPLEMENTATION_PLAN.mdRecommendedThe order in which the system gets built, and why.
- What to include
- → Milestones
- → Build order with dependencies
- → Risky parts and spikes
- → What "end to end" looks like first
- When to create it
- After architecture, before the first feature.
- Read automatically by
- Not loaded automatically. Reference it from AGENTS.md or name it in your prompt.
- Check the agent used it
- Tasks follow the plan's order; deviations are recorded.
- Depends on
- PROJECT_BRIEF.md, docs/ARCHITECTURE.md
- Update it
- When milestones change.
TASKS.mdRecommendedSmall, verifiable tasks with status, shared by every session and agent.
TASKS.mdRecommendedSmall, verifiable tasks with status, shared by every session and agent.
- What to include
- → Task ID, title, status
- → Dependencies
- → Requirement IDs
- → Acceptance criteria and verification
- When to create it
- Right after the implementation plan.
- Read automatically by
- Not loaded automatically. Reference it from AGENTS.md or name it in your prompt.
- Check the agent used it
- The agent updates the task's status only after checks pass.
- Depends on
- IMPLEMENTATION_PLAN.md, REQUIREMENTS.md
- Update it
- At the end of every task.
DECISIONS.mdRecommendedA light decision log so settled questions stay settled.
DECISIONS.mdRecommendedA light decision log so settled questions stay settled.
- What to include
- → Date, decision, reason, alternatives considered
- → Link to an ADR for big ones
- When to create it
- From the first real decision. Small projects use this instead of ADRs.
- Read automatically by
- Not loaded automatically. Reference it from AGENTS.md or name it in your prompt.
- Check the agent used it
- Ask the agent why something is done a certain way; it should cite a decision.
- Depends on
- Nothing; write it first.
- Update it
- Whenever a decision is made or reversed.
docs/adr/0001-record-architecture-decisions.mdConditionalOne file per significant architecture decision, with context and consequences.
docs/adr/0001-record-architecture-decisions.mdConditionalOne file per significant architecture decision, with context and consequences.
- What to include
- → Status
- → Context
- → Decision
- → Consequences
- → Alternatives
- When to create it
- For decisions that are expensive to reverse: database, auth, hosting, architecture style.
- Read automatically by
- Not loaded automatically. Reference it from AGENTS.md or name it in your prompt.
- Check the agent used it
- Code matches accepted ADRs; superseded ADRs are marked.
- Depends on
- docs/ARCHITECTURE.md
- Update it
- Never edit an accepted ADR's decision; write a new one that supersedes it.
AGENT_HANDOFF.mdRecommendedWhere the last session left off, so the next one doesn't start from zero.
AGENT_HANDOFF.mdRecommendedWhere the last session left off, so the next one doesn't start from zero.
- What to include
- → What was done
- → Current state
- → Commands run and results
- → Open issues
- → Next steps
- When to create it
- From the second working session onward.
- Read automatically by
- Not loaded automatically. Reference it from AGENTS.md or name it in your prompt. Start sessions with "Read AGENT_HANDOFF.md first".
- Check the agent used it
- A fresh session can state the next step correctly from the handoff alone.
- Depends on
- TASKS.md
- Update it
- At the end of every session.
KNOWN_ISSUES.mdOptionalBugs, limitations and workarounds that agents should know about.
KNOWN_ISSUES.mdOptionalBugs, limitations and workarounds that agents should know about.
- What to include
- → Issue, impact, workaround
- → Link to tracker
- → Status
- When to create it
- When issues are known but not yet fixed.
- Read automatically by
- Not loaded automatically. Reference it from AGENTS.md or name it in your prompt.
- Check the agent used it
- Agents don't "fix" known limitations that are intentional.
- Depends on
- Nothing; write it first.
- Update it
- When issues are found or fixed.
CHANGELOG.mdRecommendedWhat changed in each release, for users and for agents reading history.
CHANGELOG.mdRecommendedWhat changed in each release, for users and for agents reading history.
- What to include
- → Unreleased section
- → Added, Changed, Fixed, Removed, Security per version
- When to create it
- From the first release.
- Read automatically by
- Not loaded automatically. Reference it from AGENTS.md or name it in your prompt.
- Check the agent used it
- Every release has an entry.
- Depends on
- Nothing; write it first.
- Update it
- With every user-visible change.
docs/GLOSSARY.mdOptionalDomain terms, so agents name things the way your business does.
docs/GLOSSARY.mdOptionalDomain terms, so agents name things the way your business does.
- What to include
- → Term, meaning, example
- → Words to avoid and their replacements
- When to create it
- When the domain has its own vocabulary.
- Read automatically by
- Not loaded automatically. Reference it from AGENTS.md or name it in your prompt.
- Check the agent used it
- New code uses glossary terms for names.
- Depends on
- PROJECT_BRIEF.md
- Update it
- When new terms appear.
Design and frontend
These stop agents from building generic, disconnected screens. Start with DESIGN_SYSTEM.md and UI_UX_SPEC.md; add the rest as the product grows.
docs/DESIGN_BRIEF.mdOptionalThe look and feel in words: audience, tone and references.
docs/DESIGN_BRIEF.mdOptionalThe look and feel in words: audience, tone and references.
- What to include
- → Audience
- → Personality and tone
- → References and anti-references
- → Constraints
- When to create it
- Before any visual design.
- Read automatically by
- Not loaded automatically. Reference it from AGENTS.md or name it in your prompt.
- Check the agent used it
- Screens match the described tone; compare against references.
- Depends on
- PROJECT_BRIEF.md
- Update it
- When the brand changes.
docs/DESIGN_SYSTEM.mdRecommendedTokens, components and rules so every screen looks like the same product. Some tools call this DESIGN.md.
docs/DESIGN_SYSTEM.mdRecommendedTokens, components and rules so every screen looks like the same product. Some tools call this DESIGN.md.
- What to include
- → Color tokens for light and dark
- → Type scale
- → Spacing, radius, shadows
- → Components and usage rules
- → Motion
- → Accessibility rules
- When to create it
- Before building UI.
- Read automatically by
- Not loaded automatically. Reference it from AGENTS.md or name it in your prompt.
- Check the agent used it
- No hard-coded colors or sizes in new code; components are reused.
- Depends on
- docs/DESIGN_BRIEF.md
- Update it
- When tokens or components change.
docs/UI_UX_SPEC.mdRecommendedEach screen's purpose, layout, components and every state.
docs/UI_UX_SPEC.mdRecommendedEach screen's purpose, layout, components and every state.
- What to include
- → Screen list
- → Layout and components per screen
- → Loading, empty, error, success states
- → Responsive behavior
- → Copy
- When to create it
- Before building each screen.
- Read automatically by
- Not loaded automatically. Reference it from AGENTS.md or name it in your prompt.
- Check the agent used it
- Every listed state exists in the build; check in the browser.
- Depends on
- docs/DESIGN_SYSTEM.md, docs/USER_FLOWS.md
- Update it
- When screens change.
docs/USER_FLOWS.mdOptionalStep-by-step paths through the product, including failures.
docs/USER_FLOWS.mdOptionalStep-by-step paths through the product, including failures.
- What to include
- → Flow diagrams (Mermaid)
- → Happy path
- → Error and edge paths
- When to create it
- For multi-step journeys like onboarding or checkout.
- Read automatically by
- Not loaded automatically. Reference it from AGENTS.md or name it in your prompt.
- Check the agent used it
- End-to-end tests follow these flows.
- Depends on
- PROJECT_BRIEF.md
- Update it
- When journeys change.
docs/COMPONENT_INVENTORY.mdOptionalWhich components exist, where, and when to use them, so agents stop duplicating them.
docs/COMPONENT_INVENTORY.mdOptionalWhich components exist, where, and when to use them, so agents stop duplicating them.
- What to include
- → Component, path, purpose
- → Variants and props
- → Do and don't
- When to create it
- When the component library passes about 15 components.
- Read automatically by
- Not loaded automatically. Reference it from AGENTS.md or name it in your prompt.
- Check the agent used it
- Search for near-duplicate components after agent work.
- Depends on
- docs/DESIGN_SYSTEM.md
- Update it
- When components are added or removed.
docs/ACCESSIBILITY.mdRecommendedThe accessibility bar and how it's tested.
docs/ACCESSIBILITY.mdRecommendedThe accessibility bar and how it's tested.
- What to include
- → Target (WCAG 2.2 AA)
- → Keyboard and focus rules
- → Contrast
- → Screen reader patterns
- → Testing tools
- When to create it
- Before building UI.
- Read automatically by
- Not loaded automatically. Reference it from AGENTS.md or name it in your prompt.
- Check the agent used it
- Automated checks in CI plus a keyboard pass on key flows.
- Depends on
- docs/DESIGN_SYSTEM.md
- Update it
- When standards or patterns change.
docs/ASSETS.mdOptionalWhere logos, images, icons and fonts come from, and their rules.
docs/ASSETS.mdOptionalWhere logos, images, icons and fonts come from, and their rules.
- What to include
- → Asset locations
- → Formats and sizes
- → Licenses
- → Naming
- When to create it
- When the project has its own brand assets.
- Read automatically by
- Not loaded automatically. Reference it from AGENTS.md or name it in your prompt.
- Check the agent used it
- New assets follow formats and have licenses recorded.
- Depends on
- Nothing; write it first.
- Update it
- When assets are added.
docs/CONTENT_STYLE.mdOptionalVoice and microcopy rules so agent-written text sounds like your product.
docs/CONTENT_STYLE.mdOptionalVoice and microcopy rules so agent-written text sounds like your product.
- What to include
- → Voice and tone
- → Capitalization and punctuation
- → Button and error message patterns
- → Words to avoid
- When to create it
- When agents write user-facing copy.
- Read automatically by
- Not loaded automatically. Reference it from AGENTS.md or name it in your prompt.
- Check the agent used it
- Review UI text in diffs against the rules.
- Depends on
- docs/DESIGN_BRIEF.md
- Update it
- When the voice evolves.
Architecture and engineering
How the system is built and the rules code must follow. Keep them short and link to code instead of copying it.
docs/ARCHITECTURE.mdRecommendedHow the system fits together, so agents put code in the right place.
docs/ARCHITECTURE.mdRecommendedHow the system fits together, so agents put code in the right place.
- What to include
- → Context diagram
- → Modules and responsibilities
- → Data flow
- → Auth, errors, caching, background work
- → Trade-offs
- When to create it
- After requirements, before implementation.
- Read automatically by
- Not loaded automatically. Reference it from AGENTS.md or name it in your prompt.
- Check the agent used it
- Ask the agent where new code should go; it should cite this doc.
- Depends on
- PROJECT_BRIEF.md, REQUIREMENTS.md
- Update it
- When structure changes. Big changes get an ADR.
docs/TECH_STACK.mdRecommendedExact technologies and versions, so agents don't use the wrong API version or add rival libraries.
docs/TECH_STACK.mdRecommendedExact technologies and versions, so agents don't use the wrong API version or add rival libraries.
- What to include
- → Languages, frameworks and versions
- → Key libraries and why
- → Libraries not to use
- → Doc links
- When to create it
- Day one.
- Read automatically by
- Not loaded automatically. Reference it from AGENTS.md or name it in your prompt.
- Check the agent used it
- No new dependency appears in a diff without being added here.
- Depends on
- Nothing; write it first.
- Update it
- With every dependency change.
docs/PROJECT_STRUCTURE.mdOptionalThe folder map and what belongs where.
docs/PROJECT_STRUCTURE.mdOptionalThe folder map and what belongs where.
- What to include
- → Directory tree
- → What each folder owns
- → Naming rules
- When to create it
- When the repo has more than a few top-level folders.
- Read automatically by
- Not loaded automatically. Reference it from AGENTS.md or name it in your prompt.
- Check the agent used it
- New files land in the documented folders.
- Depends on
- docs/ARCHITECTURE.md
- Update it
- When folders are added or moved.
docs/DATA_FLOW.mdOptionalHow data moves through the app: requests, state and side effects.
docs/DATA_FLOW.mdOptionalHow data moves through the app: requests, state and side effects.
- What to include
- → Sequence diagrams for key journeys
- → State management rules
- → Where side effects happen
- When to create it
- When state or data flow is non-trivial.
- Read automatically by
- Not loaded automatically. Reference it from AGENTS.md or name it in your prompt.
- Check the agent used it
- New features follow the documented flow.
- Depends on
- docs/ARCHITECTURE.md
- Update it
- When flows change.
docs/CODING_STANDARDS.mdRecommendedConventions linters can't enforce, with examples from this codebase.
docs/CODING_STANDARDS.mdRecommendedConventions linters can't enforce, with examples from this codebase.
- What to include
- → Naming
- → File and function size
- → Error handling pattern
- → Testing conventions
- → Comments
- → Good and bad examples
- When to create it
- Day one, short; grow it as patterns settle.
- Read automatically by
- Not loaded automatically. Reference it from AGENTS.md or name it in your prompt. Put the top rules in AGENTS.md.
- Check the agent used it
- Review diffs for each rule; add lint rules where possible.
- Depends on
- docs/TECH_STACK.md
- Update it
- When a convention is agreed or changed.
docs/ERROR_HANDLING.mdOptionalOne way to raise, map, log and show errors.
docs/ERROR_HANDLING.mdOptionalOne way to raise, map, log and show errors.
- What to include
- → Error types
- → Mapping to HTTP status and UI messages
- → What to log
- → Retries
- When to create it
- Once the app has an API and a UI.
- Read automatically by
- Not loaded automatically. Reference it from AGENTS.md or name it in your prompt.
- Check the agent used it
- New code uses the documented error helpers.
- Depends on
- docs/ARCHITECTURE.md
- Update it
- When the pattern changes.
Database and API
Markdown explains intent. The authoritative versions are machine-readable: SQL migrations or schema files, OpenAPI documents, JSON Schemas and generated types. When they disagree, the machine-readable artifact wins; fix the Markdown.
docs/DATABASE_SCHEMA.mdRecommendedThe data model explained: entities, relations, constraints and access rules. The migrations remain the source of truth.
docs/DATABASE_SCHEMA.mdRecommendedThe data model explained: entities, relations, constraints and access rules. The migrations remain the source of truth.
- What to include
- → ER diagram (Mermaid)
- → Tables and relations
- → Constraints and indexes with the queries they serve
- → Isolation and access rules
- → Link to migrations
- When to create it
- Before writing data access code.
- Read automatically by
- Not loaded automatically. Reference it from AGENTS.md or name it in your prompt.
- Check the agent used it
- Diagram matches the migrations; regenerate after schema changes.
- Depends on
- REQUIREMENTS.md, docs/ARCHITECTURE.md
- Update it
- With every migration.
docs/DATA_DICTIONARY.mdConditionalWhat each important field means in business terms.
docs/DATA_DICTIONARY.mdConditionalWhat each important field means in business terms.
- What to include
- → Field, meaning, allowed values, example
- → Sensitive data flags
- → Retention
- When to create it
- When fields have business meaning that isn't obvious, or for regulated data.
- Read automatically by
- Not loaded automatically. Reference it from AGENTS.md or name it in your prompt.
- Check the agent used it
- Sensitive fields are handled per their flags.
- Depends on
- docs/DATABASE_SCHEMA.md
- Update it
- When fields are added or their meaning changes.
docs/DATABASE_MIGRATIONS.mdRecommendedHow schema changes are written, reviewed, run and rolled back.
docs/DATABASE_MIGRATIONS.mdRecommendedHow schema changes are written, reviewed, run and rolled back.
- What to include
- → Tool and folder
- → Naming
- → Up and down rules
- → Zero-downtime patterns
- → Who runs migrations where
- When to create it
- Before the first migration.
- Read automatically by
- Not loaded automatically. Reference it from AGENTS.md or name it in your prompt.
- Check the agent used it
- Every migration has a down path and was tested.
- Depends on
- docs/DATABASE_SCHEMA.md
- Update it
- When the process changes.
docs/API_SPEC.mdRecommendedThe API in human terms. For HTTP APIs, an OpenAPI file is the authoritative contract.
docs/API_SPEC.mdRecommendedThe API in human terms. For HTTP APIs, an OpenAPI file is the authoritative contract.
- What to include
- → Link to openapi.yaml
- → Auth
- → Endpoints overview
- → Error format
- → Pagination and versioning
- When to create it
- Before building endpoints.
- Read automatically by
- Not loaded automatically. Reference it from AGENTS.md or name it in your prompt.
- Check the agent used it
- Contract tests or generated types fail when code drifts from the spec.
- Depends on
- docs/ARCHITECTURE.md
- Update it
- With every endpoint change, in the same pull request.
docs/INTEGRATIONS.mdRecommendedEvery third-party service with exact versions, endpoints and failure handling, so agents don't invent APIs.
docs/INTEGRATIONS.mdRecommendedEvery third-party service with exact versions, endpoints and failure handling, so agents don't invent APIs.
- What to include
- → Provider, purpose, docs link
- → SDK version and methods used
- → Env vars
- → Errors, rate limits, retries
- → Sandbox and testing
- When to create it
- Before integrating any external service.
- Read automatically by
- Not loaded automatically. Reference it from AGENTS.md or name it in your prompt.
- Check the agent used it
- Every method used appears in the linked official docs.
- Depends on
- docs/ARCHITECTURE.md
- Update it
- When an integration or SDK version changes.
docs/WEBHOOKS.mdConditionalIncoming and outgoing webhooks, done safely.
docs/WEBHOOKS.mdConditionalIncoming and outgoing webhooks, done safely.
- What to include
- → Events handled
- → Signature verification
- → Idempotency
- → Retries and ordering
- → Local testing
- When to create it
- When you receive or send webhooks (payments, auth, Git).
- Read automatically by
- Not loaded automatically. Reference it from AGENTS.md or name it in your prompt.
- Check the agent used it
- Replaying an event twice changes state once; unsigned requests are rejected.
- Depends on
- docs/INTEGRATIONS.md
- Update it
- When events or providers change.
.env.exampleConditionalEvery environment variable the app needs, without real values.
.env.exampleConditionalEvery environment variable the app needs, without real values.
- What to include
- → Variable names
- → Comment on what each is for
- → Safe example values
- → Which are required
- When to create it
- As soon as the app reads its first environment variable.
- Read automatically by
- Not loaded automatically; agents read it while exploring.
- Check the agent used it
- The app starts with only these variables set; no secret is committed.
- Depends on
- Nothing; write it first.
- Update it
- Whenever a variable is added or removed.
Quality and security
What "good" means for this project, and how it's checked. Instructions alone aren't controls; pair each rule with a test, a scanner or a review step.
docs/TESTING_STRATEGY.mdRecommendedWhat gets tested, how, and what must pass before merging.
docs/TESTING_STRATEGY.mdRecommendedWhat gets tested, how, and what must pass before merging.
- What to include
- → Test layers and tools
- → Commands
- → What to mock
- → Coverage expectations
- → Merge requirements
- When to create it
- Before the first feature.
- Read automatically by
- Not loaded automatically. Reference it from AGENTS.md or name it in your prompt. Put the test command in AGENTS.md.
- Check the agent used it
- CI runs exactly what this doc says.
- Depends on
- docs/TECH_STACK.md
- Update it
- When tools or rules change.
docs/SECURITY.mdRecommendedSecurity requirements for the code. Not to be confused with a root SECURITY.md, which tells people how to report vulnerabilities.
docs/SECURITY.mdRecommendedSecurity requirements for the code. Not to be confused with a root SECURITY.md, which tells people how to report vulnerabilities.
- What to include
- → Auth and access rules
- → Validation and encoding
- → Secrets handling
- → Dependency policy
- → Agent permission rules
- → Security checks in CI
- When to create it
- Before building auth, data or payment features.
- Read automatically by
- Not loaded automatically. Reference it from AGENTS.md or name it in your prompt.
- Check the agent used it
- Each rule maps to a test, scanner or review checklist item.
- Depends on
- docs/ARCHITECTURE.md
- Update it
- After threat modeling or incidents.
docs/THREAT_MODEL.mdConditionalWhat could go wrong, and what stops it.
docs/THREAT_MODEL.mdConditionalWhat could go wrong, and what stops it.
- What to include
- → Assets
- → Trust boundaries
- → Threats (STRIDE)
- → Controls and gaps
- → Prioritized fixes
- When to create it
- Before launch, and when adding auth, payments, uploads or AI features.
- Read automatically by
- Not loaded automatically. Reference it from AGENTS.md or name it in your prompt.
- Check the agent used it
- Each high-priority threat has a control and a test.
- Depends on
- docs/ARCHITECTURE.md
- Update it
- When the architecture or attack surface changes.
docs/PRIVACY.mdConditionalPersonal data: what you collect, why, how long, and who sees it.
docs/PRIVACY.mdConditionalPersonal data: what you collect, why, how long, and who sees it.
- What to include
- → Data inventory
- → Purpose and legal basis
- → Retention
- → Deletion and export
- → Third parties
- → Data sent to AI providers
- When to create it
- When you store personal data.
- Read automatically by
- Not loaded automatically. Reference it from AGENTS.md or name it in your prompt.
- Check the agent used it
- Deletion and export actually work; logs contain no personal data.
- Depends on
- docs/DATA_DICTIONARY.md
- Update it
- When data collection changes.
docs/PERFORMANCE.mdOptionalPerformance budgets and how they're measured.
docs/PERFORMANCE.mdOptionalPerformance budgets and how they're measured.
- What to include
- → Budgets (LCP, INP, CLS, p95 latency)
- → Measurement tools
- → Known hot paths
- When to create it
- When performance matters to users or costs.
- Read automatically by
- Not loaded automatically. Reference it from AGENTS.md or name it in your prompt.
- Check the agent used it
- Budgets are checked in CI or before release.
- Depends on
- docs/ARCHITECTURE.md
- Update it
- After each optimization or regression.
docs/OBSERVABILITY.mdConditionalHow you know production is healthy.
docs/OBSERVABILITY.mdConditionalHow you know production is healthy.
- What to include
- → Logging rules
- → Metrics
- → Tracing
- → Error tracking
- → Alerts and who gets them
- When to create it
- Before the first production deploy.
- Read automatically by
- Not loaded automatically. Reference it from AGENTS.md or name it in your prompt.
- Check the agent used it
- A deliberate test error shows up in error tracking and alerts.
- Depends on
- docs/ARCHITECTURE.md
- Update it
- When signals or alerts change.
docs/REVIEW_CHECKLIST.mdEssentialWhat every change is checked for before merging, by you or a reviewing agent.
docs/REVIEW_CHECKLIST.mdEssentialWhat every change is checked for before merging, by you or a reviewing agent.
- What to include
- → Correctness vs acceptance criteria
- → Tests and checks run
- → Security
- → Accessibility
- → Docs updated
- → No unrelated changes
- When to create it
- Day one. It's short and pays off immediately.
- Read automatically by
- Not loaded automatically. Reference it from AGENTS.md or name it in your prompt. GitHub Copilot code review also reads REVIEW.md.
- Check the agent used it
- Pull requests show the checklist completed.
- Depends on
- Nothing; write it first.
- Update it
- When reviews keep missing the same thing.
docs/AGENT_PERMISSIONS.mdRecommendedWhat agents may do alone, what needs approval, and what they must never do.
docs/AGENT_PERMISSIONS.mdRecommendedWhat agents may do alone, what needs approval, and what they must never do.
- What to include
- → Allowed actions
- → Actions needing approval
- → Forbidden actions
- → MCP servers and their scopes
- → Where these are enforced in tool settings
- When to create it
- Before giving agents shell, network or MCP access.
- Read automatically by
- Not loaded automatically. Reference it from AGENTS.md or name it in your prompt. Enforce it with your agent's permission settings or hooks too.
- Check the agent used it
- Try a forbidden command in a safe setup and confirm it's blocked by settings, not just prose.
- Depends on
- docs/SECURITY.md
- Update it
- When tools, servers or team rules change.
Delivery and operations
How code reaches production and stays healthy. Create these once you have a real deployment, not on day one.
docs/ENVIRONMENTS.mdRecommendedLocal, staging and production: what differs and how to reach each.
docs/ENVIRONMENTS.mdRecommendedLocal, staging and production: what differs and how to reach each.
- What to include
- → Environments and URLs
- → Config differences
- → Data in each
- → Access rules
- When to create it
- When you have more than local.
- Read automatically by
- Not loaded automatically. Reference it from AGENTS.md or name it in your prompt.
- Check the agent used it
- Agents never use production credentials outside production tasks.
- Depends on
- .env.example
- Update it
- When environments change.
docs/DEPLOYMENT.mdRecommendedExact steps to ship, so any person or agent can deploy the same way.
docs/DEPLOYMENT.mdRecommendedExact steps to ship, so any person or agent can deploy the same way.
- What to include
- → Prerequisites
- → Steps
- → Migrations during release
- → Smoke tests
- → Rollback
- When to create it
- Before the first deploy.
- Read automatically by
- Not loaded automatically. Reference it from AGENTS.md or name it in your prompt.
- Check the agent used it
- A dry run in staging follows the doc exactly.
- Depends on
- docs/ENVIRONMENTS.md
- Update it
- When the process changes.
docs/CI_CD.mdConditionalWhat the pipelines run and when.
docs/CI_CD.mdConditionalWhat the pipelines run and when.
- What to include
- → Workflows and triggers
- → Checks per stage
- → Secrets used
- → How to fix common failures
- When to create it
- When CI goes beyond a single workflow.
- Read automatically by
- Not loaded automatically. Reference it from AGENTS.md or name it in your prompt.
- Check the agent used it
- Doc matches the workflow files.
- Depends on
- docs/TESTING_STRATEGY.md
- Update it
- When workflows change.
docs/RELEASE_PROCESS.mdConditionalVersioning, changelog and release steps.
docs/RELEASE_PROCESS.mdConditionalVersioning, changelog and release steps.
- What to include
- → Versioning scheme
- → Changelog rules
- → Release checklist
- → Announcements
- When to create it
- When you publish versions users depend on.
- Read automatically by
- Not loaded automatically. Reference it from AGENTS.md or name it in your prompt.
- Check the agent used it
- Each release has a version tag and changelog entry.
- Depends on
- CHANGELOG.md
- Update it
- When the process changes.
docs/BACKUP_RECOVERY.mdConditionalHow data is backed up and, more importantly, restored.
docs/BACKUP_RECOVERY.mdConditionalHow data is backed up and, more importantly, restored.
- What to include
- → What's backed up and how often
- → Retention
- → Restore steps
- → Last restore test date
- → RPO and RTO
- When to create it
- Before storing data you can't lose.
- Read automatically by
- Not loaded automatically. Reference it from AGENTS.md or name it in your prompt.
- Check the agent used it
- A restore test has actually been done, with a date.
- Depends on
- docs/DATABASE_SCHEMA.md
- Update it
- After every restore test.
docs/ROLLBACK_PLAN.mdConditionalHow to undo a bad release fast.
docs/ROLLBACK_PLAN.mdConditionalHow to undo a bad release fast.
- What to include
- → Rollback commands
- → Data and migration considerations
- → Feature flags
- → Who decides
- When to create it
- Before risky releases.
- Read automatically by
- Not loaded automatically. Reference it from AGENTS.md or name it in your prompt.
- Check the agent used it
- Rollback rehearsed in staging.
- Depends on
- docs/DEPLOYMENT.md
- Update it
- When deployment changes.
docs/RUNBOOK.mdConditionalStep-by-step responses to common incidents.
docs/RUNBOOK.mdConditionalStep-by-step responses to common incidents.
- What to include
- → Symptom
- → Diagnosis steps
- → Fix
- → Escalation
- → Post-incident notes
- When to create it
- Once real users depend on the app.
- Read automatically by
- Not loaded automatically. Reference it from AGENTS.md or name it in your prompt.
- Check the agent used it
- Someone unfamiliar can follow it during a drill.
- Depends on
- docs/OBSERVABILITY.md
- Update it
- After every incident.
docs/COSTS.mdOptionalWhat the project costs to run, including AI tokens, and the limits.
docs/COSTS.mdOptionalWhat the project costs to run, including AI tokens, and the limits.
- What to include
- → Services and plans
- → Monthly estimate
- → Usage limits and alerts
- → AI token budgets
- When to create it
- When paid services or AI APIs are involved.
- Read automatically by
- Not loaded automatically. Reference it from AGENTS.md or name it in your prompt.
- Check the agent used it
- Budget alerts exist and match the doc.
- Depends on
- docs/TECH_STACK.md
- Update it
- Monthly, or when plans change.
Reusable agent workflows
How you and your agents work together: the process, a map of the docs, and prompts worth reusing.
docs/AGENT_WORKFLOW.mdRecommendedHow work flows from idea to merge in this repo, with agents.
docs/AGENT_WORKFLOW.mdRecommendedHow work flows from idea to merge in this repo, with agents.
- What to include
- → Steps from task to merge
- → Which prompt or skill at each step
- → Review and approval gates
- → Session start and end rituals
- When to create it
- Once more than one person or agent works on the repo.
- Read automatically by
- Not loaded automatically. Reference it from AGENTS.md or name it in your prompt.
- Check the agent used it
- Pull requests follow the documented gates.
- Depends on
- AGENTS.md, TASKS.md
- Update it
- When the process improves.
docs/CONTEXT_MAP.mdOptionalWhich doc to read for which kind of task, so agents load only what they need.
docs/CONTEXT_MAP.mdOptionalWhich doc to read for which kind of task, so agents load only what they need.
- What to include
- → Task type to docs table
- → Authoritative artifact per topic
- → Docs that are drafts
- When to create it
- When the docs folder passes about 10 files.
- Read automatically by
- Not loaded automatically. Reference it from AGENTS.md or name it in your prompt.
- Check the agent used it
- Agents cite the mapped docs for each task type.
- Depends on
- Nothing; write it first.
- Update it
- When docs are added or retired.
PROMPTS.mdOptionalYour team's proven prompts, with placeholders.
PROMPTS.mdOptionalYour team's proven prompts, with placeholders.
- What to include
- → Prompt name and when to use it
- → The prompt
- → Expected output
- When to create it
- When you reuse the same prompts. Move frequent ones into skills.
- Read automatically by
- Not loaded automatically. Reference it from AGENTS.md or name it in your prompt.
- Check the agent used it
- Prompts produce consistent results across sessions.
- Depends on
- Nothing; write it first.
- Update it
- When a prompt is refined.
Checked against each tool's docs
Which file does my agent read?
No agent reads every Markdown file automatically. Each loads its own instruction files; everything else, you reference.
OpenAI Codex
- Loads automatically
AGENTS.mdAGENTS.override.md~/.codex/AGENTS.md- Scoped rules
- Nested AGENTS.md from the repo root down to your working directory; closer files win
- Skills
- .agents/skills/ and ~/.codex/skills/
- Good to know
- Combined instructions stop at 32 KiB by default (project_doc_max_bytes). Extra filenames via project_doc_fallback_filenames.
Claude Code
- Loads automatically
CLAUDE.md.claude/CLAUDE.mdCLAUDE.local.md~/.claude/CLAUDE.mdAGENTS.md (when no CLAUDE.md)- Scoped rules
- .claude/rules/*.md with a paths: frontmatter; subdirectory CLAUDE.md loads when Claude works there
- Skills
- .claude/skills/<name>/SKILL.md
- Good to know
- Reads AGENTS.md only if there's no CLAUDE.md (v2.1.277+), or import it with @AGENTS.md. Run /init to draft a CLAUDE.md.
GitHub Copilot
- Loads automatically
.github/copilot-instructions.mdAGENTS.mdCLAUDE.mdGEMINI.md- Scoped rules
- .github/instructions/*.instructions.md with applyTo globs
- Skills
- See the Copilot docs for your surface
- Good to know
- copilot-instructions.md works on every surface. AGENTS.md, CLAUDE.md and GEMINI.md work in the cloud agent, code review, VS Code chat and the CLI. Nested AGENTS.md in VS Code needs chat.useNestedAgentsMdFiles.
Cursor
- Loads automatically
.cursor/rules/*.mdcAGENTS.md- Scoped rules
- Rules with globs auto-attach to matching files; nested AGENTS.md supported
- Skills
- See the Cursor docs
- Good to know
- Rules need the .mdc extension and frontmatter (alwaysApply, globs, description). The old .cursorrules file is legacy.
Gemini CLI
- Loads automatically
GEMINI.md~/.gemini/GEMINI.md- Scoped rules
- GEMINI.md in parent folders, plus folders the CLI touches while working
- Skills
- See the Gemini CLI docs
- Good to know
- Set context.fileName to ["AGENTS.md", "GEMINI.md"] in .gemini/settings.json to share AGENTS.md. Check what loaded with /memory show.
Using several agents?
Keep rules in AGENTS.md and make the other files thin adapters. Copying rules into four files guarantees they drift apart.
# One source of truth for every agent
AGENTS.md # the shared instructions (Codex, Cursor, Copilot, Claude Code)
CLAUDE.md # only if you need Claude-specific notes; first line: @AGENTS.md
GEMINI.md # only if you use Gemini CLI; first line: @AGENTS.md
.github/copilot-instructions.md # only for Copilot chat surfaces; points to AGENTS.md
# Or let Gemini CLI read AGENTS.md directly, in .gemini/settings.json:
{ "context": { "fileName": ["AGENTS.md", "GEMINI.md"] } }Tools change quickly. If something here doesn't match your version, the linked docs are the source of truth.
Generate the Context Pack with AI
The 9-step workflow
Works with any coding agent. Each step has a prompt, what you should get back, and when you're done.
- 1
Repository reconnaissance
Learn the stack, structure and conventions before changing anything.
You get
A report of stack, modules, commands, conventions and unknowns.
Done when
You agree with the report, and the commands it ran worked.
Prompt: Repository reconnaissance
Explore this repository without modifying any files. Report: 1. Stack: languages, frameworks, package manager, runtime versions (cite the files you read). 2. Structure: the main modules and what each owns. 3. Commands: how to install, run, build, lint, type check and test. Run the safe read-only ones and show their output. 4. Conventions: naming, formatting, error handling, state management, testing style. Give one example file for each. 5. Existing context docs: list any README, AGENTS.md, CLAUDE.md, docs/ files and what they cover. 6. Unknowns: anything you couldn't determine. Do not guess. Output a concise report. Do not write code.
- 2
Requirements discovery
Turn the idea into decisions you've confirmed.
You get
PROJECT_BRIEF.md with facts, assumptions and open questions separated.
Done when
No open question blocks the MVP.
Prompt: Requirements discovery
I want to build [ONE-LINE IDEA]. Interview me to turn this into a project brief. Rules: - Ask one question at a time, most important first. - Cover: the problem, target users, main user journeys, must-have features, non-goals, constraints (budget, stack, deadline, hosting, regions), success metrics, and risks. - After each answer, note whether it's a confirmed fact, an assumption or still open. When I say "done", write PROJECT_BRIEF.md with sections: Problem, Users, Journeys, Requirements (FR-1...), Non-functional requirements, Non-goals, Constraints, Assumptions, Open questions, Success metrics.
- 3
Research
Verify technical choices against official docs.
You get
Options with trade-offs and links, and one recommendation.
Done when
Every key dependency is chosen, with a link to its docs.
Prompt: Technical research
Research options for [DECISION, e.g. "authentication for a Next.js app"] given these constraints: [CONSTRAINTS]. For each of 2 to 4 options: - What it is, current version, license and pricing (link the official page you used). - Fit with our stack in [FILES OR docs/TECH_STACK.md]. - Trade-offs, risks and lock-in. Use official documentation only. If you can't verify something, say "unverified". Recommend one option and explain why, but don't implement anything.
- 4
Context generation
Write only the context documents this project needs, in dependency order.
You get
AGENTS.md plus the selected docs: architecture, data, API, design, security, testing.
Done when
Each document is reviewed; unknowns are listed, not guessed.
Prompt: Context-file planning
Read PROJECT_BRIEF.md and the repository. Propose the minimum set of context documents this project needs, using this list as a menu, not a checklist: AGENTS.md, README.md, REQUIREMENTS.md, docs/ARCHITECTURE.md, docs/TECH_STACK.md, docs/DESIGN_SYSTEM.md, docs/DATABASE_SCHEMA.md, docs/API_SPEC.md, docs/INTEGRATIONS.md, docs/SECURITY.md, docs/TESTING_STRATEGY.md, docs/DEPLOYMENT.md, IMPLEMENTATION_PLAN.md, TASKS.md, DECISIONS.md. For each proposed file: why it's needed, what it will contain, what it depends on. List files you deliberately left out and why. Then generate them in dependency order, one at a time, marking anything uncertain as an open question. Stop after each file for my review.
- 5
Human review
You check requirements, architecture, data model, integrations, security and costs.
You get
Approved documents, and ADRs for significant decisions.
Done when
You'd be comfortable if another developer built from these docs.
No prompt: this step is yours. Read the docs the agent wrote and decide.
- 6
Implementation planning
Break the work into small, testable tasks.
You get
IMPLEMENTATION_PLAN.md and TASKS.md with dependencies and acceptance criteria.
Done when
Every task fits in one reviewable diff and maps to requirements.
Prompt: Break down into tasks
Read PROJECT_BRIEF.md, REQUIREMENTS.md and docs/ARCHITECTURE.md. Create IMPLEMENTATION_PLAN.md and TASKS.md. Each task must: - Be small enough for one reviewable diff (roughly under 300 changed lines). - Have an ID, a clear outcome, the files likely touched, dependencies on other tasks, the requirement IDs it covers, and acceptance criteria. - Include how to verify it (tests or commands). Order tasks so the app runs end to end as early as possible. Mark risky tasks. Don't implement anything yet.
- 7
Implementation
One coherent task at a time, following the agreed docs.
You get
A focused diff, with checks run and a summary of changed files.
Done when
Acceptance criteria met, and you've read the diff.
Prompt: Implement one task
Implement task [TASK ID] from TASKS.md: [TASK TITLE]. Context: follow AGENTS.md, docs/CODING_STANDARDS.md and [RELEVANT DOCS]. Constraints: only touch files needed for this task. No new dependencies without asking. No unrelated refactors. Match the surrounding code style. Acceptance criteria: [CRITERIA]. Steps: 1. Restate the task and list assumptions. Ask if anything is unclear. 2. Show a short plan, then implement. 3. Run [FORMAT, LINT, TYPECHECK, TEST COMMANDS] and show the output. 4. Summarize every changed file and why, update affected docs, and mark the task in TASKS.md. Report anything skipped or failing honestly.
- 8
Verification and doc updates
Prove it works with real commands, and keep docs in sync.
You get
Check results table, updated docs and remaining risks.
Done when
Every check ran and passed, or failures are recorded honestly.
Prompt: Run and verify tests
Verify the current changes. Run, in order: [INSTALL], [FORMAT CHECK], [LINT], [TYPECHECK], [UNIT TESTS], [INTEGRATION OR E2E TESTS], [BUILD]. For each command report: the exact command, exit code, and the relevant output. Then give a table: check | passed / failed / skipped / not run | notes. Do not change tests to make them pass. Do not say "all tests pass" unless every command above ran and passed.
- 9
Handoff and maintenance
Leave the project so the next session, or person, can continue.
You get
AGENT_HANDOFF.md, TASKS.md, DECISIONS.md and KNOWN_ISSUES.md updated.
Done when
A fresh session can continue from the handoff alone.
Prompt: Session handoff
We're ending this session. Update AGENT_HANDOFF.md with: - Goal of the session and what was completed (task IDs). - Current state: what works, what's in progress, what's broken. - Decisions made and why (also add significant ones to DECISIONS.md). - Commands run and their results (tests, builds). - Known issues and risks (also update KNOWN_ISSUES.md). - Exact next steps, in order, for the next session. Keep it under 60 lines. Be factual; don't mark anything done that wasn't verified.
17 copyable templates
Prompts that ask for evidence
Replace the [PLACEHOLDERS]. Every template asks the agent to show what it ran and what it found, not just its conclusion.
Weak vs strong
Feature
Weak
Build a todo app with login.
Strong
Implement task T-04 (create a task) from TASKS.md. Use the existing form components in src/components/form and the tasks table from docs/DATABASE_SCHEMA.md. Validate title (1 to 120 chars) with Zod. Done when the new tests in tests/tasks.test.ts pass and lint, typecheck and the full test suite pass. Don't touch auth.
Bug
Weak
Login is broken, fix it.
Strong
Login fails with 401 for valid users since commit a1b2c3. Steps: run npm run dev, sign in as test@example.com / [PASSWORD]. Error from the server log is pasted below. Find the root cause first, write a failing test, then make the smallest fix.
Design
Weak
Make the dashboard look better.
Strong
Restyle the dashboard to follow docs/DESIGN_SYSTEM.md: use the spacing scale and the Card component, keep existing data and behavior, add empty and loading states from docs/UI_UX_SPEC.md, and check it at 375px and 1440px. Attach screenshots of before and after.
Integration
Weak
Add Stripe payments.
Strong
Add a Stripe Checkout session for the Pro plan per docs/INTEGRATIONS.md. Use only methods from the linked Stripe docs, verify webhook signatures, make the webhook handler idempotent, and add the env vars to .env.example. Test with Stripe test cards and show the webhook test output.
Prompt library
Repository reconnaissance
First session on any repo, before changing anything
Explore this repository without modifying any files. Report: 1. Stack: languages, frameworks, package manager, runtime versions (cite the files you read). 2. Structure: the main modules and what each owns. 3. Commands: how to install, run, build, lint, type check and test. Run the safe read-only ones and show their output. 4. Conventions: naming, formatting, error handling, state management, testing style. Give one example file for each. 5. Existing context docs: list any README, AGENTS.md, CLAUDE.md, docs/ files and what they cover. 6. Unknowns: anything you couldn't determine. Do not guess. Output a concise report. Do not write code.
Requirements discovery
Starting a new project or a large feature
I want to build [ONE-LINE IDEA]. Interview me to turn this into a project brief. Rules: - Ask one question at a time, most important first. - Cover: the problem, target users, main user journeys, must-have features, non-goals, constraints (budget, stack, deadline, hosting, regions), success metrics, and risks. - After each answer, note whether it's a confirmed fact, an assumption or still open. When I say "done", write PROJECT_BRIEF.md with sections: Problem, Users, Journeys, Requirements (FR-1...), Non-functional requirements, Non-goals, Constraints, Assumptions, Open questions, Success metrics.
Technical research
Before choosing a library, service or approach
Research options for [DECISION, e.g. "authentication for a Next.js app"] given these constraints: [CONSTRAINTS]. For each of 2 to 4 options: - What it is, current version, license and pricing (link the official page you used). - Fit with our stack in [FILES OR docs/TECH_STACK.md]. - Trade-offs, risks and lock-in. Use official documentation only. If you can't verify something, say "unverified". Recommend one option and explain why, but don't implement anything.
Context-file planning
After the brief exists, before implementation
Read PROJECT_BRIEF.md and the repository. Propose the minimum set of context documents this project needs, using this list as a menu, not a checklist: AGENTS.md, README.md, REQUIREMENTS.md, docs/ARCHITECTURE.md, docs/TECH_STACK.md, docs/DESIGN_SYSTEM.md, docs/DATABASE_SCHEMA.md, docs/API_SPEC.md, docs/INTEGRATIONS.md, docs/SECURITY.md, docs/TESTING_STRATEGY.md, docs/DEPLOYMENT.md, IMPLEMENTATION_PLAN.md, TASKS.md, DECISIONS.md. For each proposed file: why it's needed, what it will contain, what it depends on. List files you deliberately left out and why. Then generate them in dependency order, one at a time, marking anything uncertain as an open question. Stop after each file for my review.
Architecture document
Once requirements are agreed
Using PROJECT_BRIEF.md and REQUIREMENTS.md, draft docs/ARCHITECTURE.md. Include: - Context: users and external systems (Mermaid diagram). - Containers and modules with responsibilities and boundaries. - Data flow for the two most important user journeys. - Auth model, error handling, caching and background work. - Technology choices with one-line reasons, and rejected alternatives. - Risks, trade-offs and open questions. Prefer the simplest design that meets the requirements. For each significant decision, also draft an ADR in docs/adr/. Don't write application code.
Design specification
Before building UI
Create docs/DESIGN_SYSTEM.md and docs/UI_UX_SPEC.md for [PRODUCT]. Brand and tone: [ADJECTIVES, REFERENCES OR SCREENSHOTS]. Existing tokens or components: [PATHS, if any]. DESIGN_SYSTEM.md: tokens (color with light and dark values, type scale, spacing, radius, shadow, motion), components with usage rules, accessibility rules (WCAG 2.2 AA). UI_UX_SPEC.md: every screen with purpose, layout, components used, and its loading, empty, error and success states, plus responsive behavior at [BREAKPOINTS]. Reuse existing tokens and components where they exist. Flag any screen where requirements are unclear.
Database schema
Before writing data access code
Design the data model for [FEATURES] using [DATABASE]. Deliver: 1. docs/DATABASE_SCHEMA.md: entities, relationships (Mermaid ER diagram), constraints, indexes with the query each one serves, and tenant or user isolation rules. 2. The first migration in [MIGRATION TOOL AND PATH], with a down migration. 3. Seed data for local development. Explain any denormalization. List access patterns you assumed. Don't run migrations; I'll review and run them.
External integration spec
Before integrating payments, auth, email, AI or any third-party API
We're integrating [PROVIDER] for [PURPOSE]. Official docs: [LINKS]. Write docs/INTEGRATIONS.md section for it: - Exact SDK or API version, endpoints and methods we'll use (link each to its doc page). - Auth and required environment variables (add them to .env.example without values). - Webhooks: events, signature verification, retries, idempotency. - Errors, rate limits, timeouts and how we'll map them. - Sandbox setup and how we'll test it. Only use methods you found in the linked docs. If something isn't documented, list it as an open question instead of guessing.
Threat model
Before launch, and when adding auth, payments, uploads or AI features
Create docs/THREAT_MODEL.md for [SYSTEM OR FEATURE] based on docs/ARCHITECTURE.md. 1. Assets worth protecting and who might attack them. 2. Trust boundaries and data flows (Mermaid diagram). 3. Threats per boundary using STRIDE, including prompt injection if the app or its agents read untrusted content. 4. For each threat: likelihood, impact, existing control, missing control. 5. A prioritized list of fixes, each mapped to a test that would prove it works. Reference OWASP Top 10:2025 and ASVS where relevant. Don't change code.
Break down into tasks
After architecture and before implementation
Read PROJECT_BRIEF.md, REQUIREMENTS.md and docs/ARCHITECTURE.md. Create IMPLEMENTATION_PLAN.md and TASKS.md. Each task must: - Be small enough for one reviewable diff (roughly under 300 changed lines). - Have an ID, a clear outcome, the files likely touched, dependencies on other tasks, the requirement IDs it covers, and acceptance criteria. - Include how to verify it (tests or commands). Order tasks so the app runs end to end as early as possible. Mark risky tasks. Don't implement anything yet.
Implement one task
For every implementation task
Implement task [TASK ID] from TASKS.md: [TASK TITLE]. Context: follow AGENTS.md, docs/CODING_STANDARDS.md and [RELEVANT DOCS]. Constraints: only touch files needed for this task. No new dependencies without asking. No unrelated refactors. Match the surrounding code style. Acceptance criteria: [CRITERIA]. Steps: 1. Restate the task and list assumptions. Ask if anything is unclear. 2. Show a short plan, then implement. 3. Run [FORMAT, LINT, TYPECHECK, TEST COMMANDS] and show the output. 4. Summarize every changed file and why, update affected docs, and mark the task in TASKS.md. Report anything skipped or failing honestly.
Debug a reproducible issue
When something breaks
Bug: [WHAT HAPPENS]. Expected: [WHAT SHOULD HAPPEN]. Reproduce: [STEPS OR COMMAND]. Error output: [PASTE EXACT ERROR AND STACK TRACE] Environment: [OS, RUNTIME, BROWSER, VERSION]. Already tried: [ATTEMPTS]. 1. Reproduce it and show the output. 2. Find the root cause and explain it with file and line references. Don't fix yet. 3. Write a failing test that captures the bug. 4. Propose the smallest fix, implement it, and show the test now passes along with the full suite.
Run and verify tests
Before every commit or pull request
Verify the current changes. Run, in order: [INSTALL], [FORMAT CHECK], [LINT], [TYPECHECK], [UNIT TESTS], [INTEGRATION OR E2E TESTS], [BUILD]. For each command report: the exact command, exit code, and the relevant output. Then give a table: check | passed / failed / skipped / not run | notes. Do not change tests to make them pass. Do not say "all tests pass" unless every command above ran and passed.
Independent code review
After implementation, ideally in a fresh session or with a different model
Review the diff of [BRANCH OR COMMIT RANGE] against main. You didn't write this code; be skeptical. Check: correctness against [TASK OR ACCEPTANCE CRITERIA], edge cases, error handling, security (auth, validation, injection, secrets), performance, test coverage, consistency with docs/CODING_STANDARDS.md, and unnecessary changes or dependencies. For each finding: file and line, severity (blocker, major, minor), why it matters, and a suggested fix. Separate confirmed problems from suspicions. Don't edit files.
Performance investigation
When something is slow
[PAGE, ENDPOINT OR JOB] is slow: [MEASUREMENT, e.g. "p95 1.8 s, target 300 ms"]. 1. Measure a baseline with [TOOL OR COMMAND] and show the numbers. 2. Profile and identify the top three costs, with evidence. 3. For each, propose one change and its expected gain. 4. Implement the most valuable change only, re-measure, and show before and after. Don't optimize anything you haven't measured.
Production readiness
Before the first launch and before major releases
Audit this project for production readiness. Read docs/DEPLOYMENT.md, docs/SECURITY.md and docs/TESTING_STRATEGY.md first. Check and report pass, fail or unknown, with evidence, for: environment config and secrets, auth and authorization, input validation, error tracking and logging, health checks, backups and a tested restore, database migrations, rate limiting, security headers, dependency audit, accessibility basics, performance budgets, rollback plan, and runbooks. List blockers first. For each gap, the smallest fix. Don't deploy anything.
Session handoff
At the end of every working session
We're ending this session. Update AGENT_HANDOFF.md with: - Goal of the session and what was completed (task IDs). - Current state: what works, what's in progress, what's broken. - Decisions made and why (also add significant ones to DECISIONS.md). - Commands run and their results (tests, builds). - Known issues and risks (also update KNOWN_ISSUES.md). - Exact next steps, in order, for the next session. Keep it under 60 lines. Be factual; don't mark anything done that wasn't verified.
Worked example
From vague idea to verified first task
Tasklight: a small team task app with a paid plan. Small enough to follow, real enough to show the practice.
1. The vague idea
"I want a simple app where small teams can track tasks, with a paid plan." Too vague for an agent: who are the users, what is "simple", what does paying unlock, what stack, where is it hosted?
2. The improved brief (PROJECT_BRIEF.md)
Name: Tasklight Problem: Teams of 2 to 10 people lose track of small tasks in chat. Users: Team owner (creates workspace, pays), members (create and complete tasks). Journeys: sign up, create workspace, invite member, add task, assign, complete. MVP: workspaces, invites by email, tasks with title, assignee, due date and status. Paid plan: Free up to 3 members; Pro ($6 per workspace per month) for unlimited members. Non-goals: comments, file attachments, mobile apps, integrations. Constraints: Next.js, Postgres, hosted on Vercel and Neon, payments through a merchant of record. Success: a team of 3 can go from sign-up to first completed task in under 5 minutes.
3. Requirements and acceptance criteria
FR-3 Create task: a member can create a task with a title (1 to 120 chars), optional assignee and due date. Given I'm a member of workspace W When I submit a task titled "Ship v1" Then it appears at the top of W's task list with status "open" And members of other workspaces can't see it FR-7 Member limit: a Free workspace can't have more than 3 members. Given W is on Free with 3 members When the owner invites a 4th Then the invite is blocked with an upgrade prompt
4. Architecture and design decisions
Architecture: one Next.js app (UI plus route handlers), Postgres via an ORM, background email through a queue-less provider call. No microservices. ADR-0001: Use a merchant of record for billing so we don't handle global sales tax ourselves. ADR-0002: Row-level workspace isolation: every query filters by workspace_id from the session, never from the request body. Design: tokens and components in docs/DESIGN_SYSTEM.md; every list has empty, loading and error states.
5. Database and API considerations
Tables: users, workspaces, memberships (user_id, workspace_id, role), tasks (workspace_id, title, assignee_id, due_on, status), subscriptions. Constraints: unique (user_id, workspace_id) on memberships; tasks.title length check; foreign keys with on delete cascade for tasks. Index: tasks (workspace_id, status, created_at desc) for the main list. API: POST /api/tasks, PATCH /api/tasks/:id, documented in docs/API_SPEC.md. Billing webhooks documented in docs/WEBHOOKS.md.
6. Security requirements
- Every API route checks the session and membership of the workspace. - workspace_id always comes from the server-side membership lookup. - Invite tokens are random, single-use and expire in 7 days. - Billing webhook verifies the provider signature and is idempotent by event ID. - Rate limit sign-in and invites. Secrets only in environment variables.
7. Testing strategy
Unit: validation and plan-limit rules. Integration: task API with a test database; a member of workspace A can't read B's tasks. End-to-end (Playwright): sign up, create workspace, add task, complete it. Webhook: replay a recorded test event twice and assert one subscription change. CI runs lint, typecheck, tests and build on every pull request.
8. Initial implementation plan (TASKS.md)
T-01 Project setup, lint, typecheck, CI (no features) T-02 Database schema and first migration (FR-1 to FR-4) T-03 Auth and workspace creation (FR-1, FR-2) T-04 Create and list tasks (FR-3) depends on T-02, T-03 T-05 Complete and assign tasks (FR-4, FR-5) T-06 Invites and member limit (FR-6, FR-7) T-07 Billing with webhooks (FR-8) T-08 Empty, loading and error states; accessibility pass
9. A precise implementation prompt
Implement T-04 from TASKS.md: create and list tasks (FR-3). Follow AGENTS.md, docs/CODING_STANDARDS.md, docs/API_SPEC.md and docs/UI_UX_SPEC.md (Task list screen). Only touch: src/app/(app)/tasks/*, src/server/tasks/*, tests/tasks/*. Validate input with the existing schema helpers. workspace_id comes from the membership lookup. Done when: the FR-3 acceptance criteria pass as integration tests, the list shows empty and error states, and lint, typecheck, tests and build pass. Show the command output.
10. Verification and review
Agent report: 4 files changed, 2 test files added. npm run lint exit 0 npm run typecheck exit 0 npm test 38 passed, 0 failed, 0 skipped npm run build exit 0 You: read the diff, try it in the browser, and check that a second workspace can't see the task. Fresh review session: one finding (missing max length on the client) fixed in a follow-up commit. Handoff: T-04 marked done in TASKS.md; next is T-05.
What experienced developers do differently
17 habits worth stealing
01
Inspect before changing
Start every task by having the agent read the relevant files and report what it found.
02
Define success first
Write acceptance criteria before implementation, and check against them after.
03
Own the product decisions
You decide scope, users and trade-offs. The agent proposes and implements.
04
Write down big decisions
Add an ADR or a line in DECISIONS.md so no one, human or agent, re-argues them.
05
Reuse conventions
Point agents to existing components, helpers and patterns instead of letting them invent new ones.
06
Work in small increments
One task, one diff, one review. If a diff is too big to read, split the task.
07
Keep docs current
Update the affected doc in the same change as the code, or the next agent works from stale facts.
08
Verify with real tools
Run the tests, type checker, linter and build yourself, or read the agent's actual output.
09
Read every diff
Never accept changes you haven't read. Ask for an explanation when something is unclear.
10
Check security and data integrity
Review auth, validation and data access on every change that touches them.
11
Measure before optimizing
Baseline, change one thing, measure again, and keep only what helped.
12
Keep a way back
Commit before each agent task, isolate risky changes, and know how to roll back.
13
Avoid needless complexity
Question every new dependency, abstraction and service the agent adds.
14
Manage context on purpose
Start fresh sessions for new tasks, and feed the agent only the docs it needs.
15
Delegate only when it helps
Use subagents or parallel agents for clearly separate work, not by default.
16
Treat output as unverified
AI-generated code is a draft until tests and review say otherwise.
17
Keep humans accountable
People approve production deploys, migrations, payments and anything users can't undo.
Official docs first