CurieLabs.ai
by CurieLabs
The AI
Builder's
Playbook
For everyone who has an idea and wants to build and run it — without ever writing code.
18
Complete Prompts
8
Guided Parts
0
Lines of Code

An open, general-purpose playbook for building software with AI — from first idea to working product. Every prompt is complete, reusable, and ready to paste. You are the director. The AI is your expert assistant. This guide teaches you how to run that collaboration so it actually works.

How it works. Create a folder for your project. Copy the provided CLAUDE.md template inside it — this file is the living blueprint of your application, and Claude will keep it up to date throughout the entire build. Open a Claude session pointed at that folder. From that point on, Claude reads and updates CLAUDE.md directly. Every step in this guide either asks Claude a question or tells it to record what you just decided. The project documents itself as you go.
curielabs.ai Developed by CurieLabs · Freely shared
Born from building dozens of real projects.
Works with Claude,
Cursor, Copilot,
or any AI you prefer
⬇ Download CLAUDE.md ⬇ Install Playbook Coach Skill

Save CLAUDE.md in your project folder. To install the skill: download the file, then double-click it — Claude Code opens and installs it automatically.

Part One
CurieLabs.ai
Starting a New Project
Steps 1–5  ·  From idea to ready-to-build
Before Step 01 — Set Up Your Project Folder

Everything in this guide works because Claude has direct access to your project folder. It reads CLAUDE.md automatically at the start of each session and writes updates to it directly — no copying, no pasting documents back and forth. Do this once before you start:

1
Create a folder for your project anywhere on your computer. Name it after your project — no spaces, use hyphens. Example: my-app/
2
Copy the CLAUDE.md template from Part 5 of this guide into that folder. Save it exactly as CLAUDE.md. It starts mostly empty — that's correct.
3
Open a Claude session pointed at that folder. In Claude Code: cd my-app && claude. In Cowork or Cursor: select or open the project folder. Claude will find CLAUDE.md automatically.
4
Run Steps 1–5 in order. After each step, tell Claude to update CLAUDE.md with what you just established. By the time you finish Step 5, CLAUDE.md is complete and the project is ready to build.
Using a different AI?   Rename CLAUDE.md to match your tool (AGENT.md, COPILOT.md, etc.) and replace "Claude" in the prompts. Everything else is identical.
Step 01 Capture Your Requirements

Before any AI session begins, spend a few minutes thinking clearly about what you want. The prompt does the coaching — but the raw material is yours. Here is how to think about it.

Think of it like building a house
🏠
The Vision
What it looks like when finished. Who lives in it. How it feels.
🧱
The Foundation
The core that everything else depends on. Built first. Hard to change later.
🪵
The Framing
The structure. Rooms, layout, how things connect. Easier to adjust than foundation.
🎨
The Finish
Color, style, polish. Decisions you make last and can always change.
Most people come in with
🏠 The Vision — what it does, who it's for
🎨 The Finish — what it looks and feels like
The AI handles the rest
🧱 The Foundation — data, structure, technology
🪵 The Framing — components, logic, connections

Most people have never built software before and have no idea how to lay a foundation or frame a structure. That's exactly what the AI is exceptional at — given your clear goals, it will design the right foundation and frame the right structure for what you're trying to build. Your job is to bring the vision and be clear about the finish. The AI does the engineering in between. Every decision about what it does and what it's for is yours. Every decision about how to build it is the AI's. This guide is the process that connects the two.

Before you start the interview — ask yourself these questions
What does it do in one sentence?
Not what it might do — what is the one thing it must do for it to be worth building at all? If you can't say it in a sentence, you're not ready to start.
Who uses it and what do they need?
Is it just you? A team? Customers? Strangers on the internet? Each answer changes what the app needs to do, how secure it needs to be, and how simple it needs to feel.
What does it look like?
Does it need a dashboard? A chat interface? A map? A form? A report? A calendar? A visual that updates in real time? Knowing the interface type early shapes everything below it.
What data does it work with?
Does it store information? Read from a file or spreadsheet? Connect to a live feed? Pull from an API? The data is the foundation — define it early and change it carefully.
Is there a formula or logic at the core?
Does it calculate something? Score something? Match, rank, filter, or recommend? If there's a specific rule or formula that drives the app, describe it precisely — this is the engine inside the house.
What must it never do?
The constraints are as important as the features. What's out of scope? What would break trust with users? What complexity would you rather defer? Knowing the limits keeps the foundation clean.
Requirements are not a contract — they're a starting point.
You will learn things as you build. New ideas will emerge. Priorities will shift. That's expected and welcome. Update your requirements document any time — just do it consciously, with a reason, and make sure CLAUDE.md reflects the change. The goal is not to predict the future perfectly; it's to make each decision deliberately rather than by accident.
Prompt — Requirements Interview
I want to build something and need help thinking it through before writing any code.
My rough idea: [describe your idea in 2–3 sentences]

Here is what I already know about it:
- The one thing it must do: [your one sentence]
- Who uses it: [yourself / a team / customers / the public]
- Interface I'm imagining: [dashboard / chat / map / form / report / other]
- Data it works with: [what it stores, reads, or connects to — or "not sure yet"]
- Core formula or logic (if any): [describe any calculation, scoring, or rule at the center]
- Things it must NOT do: [scope limits, complexity to avoid, trust boundaries]

Act as a requirements engineer. Use what I've shared as a starting point and interview
me to fill in everything else. Ask ONE question at a time and wait for my answer.

Cover anything not already addressed: specific features for the first working version;
what a successful outcome looks like concretely; data, privacy, and security implications;
external services or APIs needed; what "done" looks like for this first version.

When the interview is complete, update the Requirements section of CLAUDE.md with
everything we established. Note anything I should revisit as the project evolves.
Confirm when CLAUDE.md has been updated.
Then say → Claude, update CLAUDE.md with the requirements we just established.
Requirements evolve. As you build and learn, come back and say "Claude, here's what changed — update the requirements in CLAUDE.md." The document grows with the project.
Step 02 Design the Architecture

The AI reads your requirements from CLAUDE.md, designs the technical structure, explains reasoning behind every choice, and surfaces key tradeoffs for you to consciously approve before building starts.

Prompt — Architecture Design
Read the requirements in CLAUDE.md.

Act as a software architect. Design the complete technical architecture for this system.
I am not a programmer — explain reasoning in plain language alongside technical terms.

Cover: the major components and what each does; how they connect and communicate; where
data is stored and why; technology choices with reasoning and alternatives considered;
the user's complete journey step by step; security and privacy — where sensitive data
lives and how it's protected; the biggest technical risks and how the design handles
them; what I will NOT be able to easily change once building starts.

At the end, present the 3–5 most significant design tradeoffs. For each: what you
chose, what you didn't, and why. I want to consciously agree before we proceed.
Then update the Architecture section of CLAUDE.md and confirm.
Then say → Claude, update CLAUDE.md with the architecture we just agreed on.
Step 03 Scope the MVP

The AI reads requirements and architecture from CLAUDE.md and defines precisely what the first working version includes and excludes. This agreement prevents scope creep before it starts.

Prompt — MVP Scope
Read CLAUDE.md. Based on the requirements and architecture there:

Define the MVP — the smallest version that is genuinely useful and worth building first.
1. Propose what the MVP includes: specific features and components for the first version.
2. Propose what the MVP excludes: desirable features that should wait.
3. For anything uncertain, ask me directly — one item at a time.
4. Once we've agreed: update the MVP Scope section of CLAUDE.md with the final list —
   IN (one-line reason each), OUT (one-line reason each), and one sentence describing
   exactly what this MVP does. Confirm when done.
Then say → Claude, update CLAUDE.md with the MVP scope we just agreed on.
Step 04 Create the Build Plan

The AI reads everything established so far from CLAUDE.md and creates a phased construction sequence. Each phase produces something demonstrably working. No phase starts until the previous phase's done criteria are met.

Prompt — Build Plan
Read CLAUDE.md. Based on the requirements, architecture, and MVP scope there:

Create a phased Build Plan for implementing this MVP.
Each phase must: have a name and single clear goal; list the specific components being
built; define concrete done criteria — specific things I can test or observe, not vague
descriptions; note what must be true before this phase begins; flag risks specific to
this phase.

Order phases so Phase 1 is the smallest possible working skeleton; each subsequent
phase adds one discrete layer; no phase begins until the previous phase's done
criteria are fully met. Note any decisions I must make before each phase begins.

Update the Build Plan section of CLAUDE.md with the complete plan. Confirm when done.
Then say → Claude, update CLAUDE.md with the build plan we just created.
Step 05 Initialize CLAUDE.md — The Launchpad

You now have four documents: Requirements, Architecture, MVP Scope, and Build Plan. This step combines all of them with the CLAUDE.md template from Part 5 into a single, unified project memory file. When this is done, the rocket is ready to launch.

For simple projects, Steps 1–5 can all be done in a single session.
Start a conversation, run the prompts in order, answer the questions, and by the time you finish Step 5 you have a fully initialized project ready to build. The more complex your project, the more time each step deserves — but there's no rule that says you need to stop between them.
What goes into CLAUDE.md
📋
Step 01
Requirements
🏗️
Step 02
Architecture
🎯
Step 03
MVP Scope
📅
Step 04
Build Plan
🚀
Step 05
CLAUDE.md

The CLAUDE.md template is in Part 5 of this guide. Copy it in full, paste it along with the four documents below, and Claude will merge everything into a single initialized file — structured, consistent, and ready for the first build session.

Prompt — Finalize CLAUDE.md
Read CLAUDE.md. You have updated it with requirements, architecture, MVP scope, and
build plan during Steps 1–4. Now finalize it:

1. Add the Session Protocol section with this exact text:
   "Before every session: Read this file. Identify the current Build Plan phase.
   State today's goal in one sentence. Tell me if anything in this file looks wrong
   or out of date before we begin.
   During every session: Stay on the current Build Plan phase. Record failures in
   Debugging History immediately. Update CLAUDE.md directly — do not wait until the end.
   After every session: Update Current State, Build Plan status, What's Next, and
   add a Session Log entry."

2. Set the Current State section to reflect that nothing is built yet.

3. Mark Phase 1 of the Build Plan as the active phase.

4. Confirm CLAUDE.md is complete by telling me:
   — What this project does in one sentence
   — What Phase 1 is and what its done criteria are
   — Any sections still containing placeholder text that I need to fill in

The project is ready to build.
🚀
The rocket is ready to launch.
CLAUDE.md is initialized. The AI knows what you're building, how it's structured, what phase you're in, and what the rules are. Every session from here opens with Step 6 — open your project folder, state today's goal, and build.
Part Two
CurieLabs.ai
Running Each Session
The build cycle  ·  Repeat this for every session, every phase, every feature
Step 06 Open Every Session

Open Claude in your project folder — it finds CLAUDE.md automatically. This prompt orients the session, confirms Claude has the right context, and locks in today's goal before any work starts.

How to open a session in your project folder
Claude Code (terminal)cd my-app && claude
Cowork / Cursor / WindsurfOpen the app → select your project folder
Prompt — Session Open
Read CLAUDE.md. If you cannot find it, stop and tell me before doing anything else.

Confirm:
1. What this project is in one sentence.
2. Which Build Plan phase we are currently in and its done criteria.
3. Any Critical Constraints relevant to today's work.
4. Today's goal: [YOUR ONE-SENTENCE GOAL FOR THIS SESSION]

Do not begin work until I confirm your understanding is correct.
The Build Loop — the heart of every session, repeated until the phase is done
Build It. Test It. Run It.

This is where the work happens. One piece at a time — build the next component, verify it works, get the exact commands to run it yourself. Then repeat. Each iteration is small enough that if something goes wrong, you know exactly what changed.

Prompt — Build the Next Piece
Read CLAUDE.md. We are working on: [current phase name and goal]

Build the next component: [describe the specific thing being built this iteration]

When done:
1. Tell me what files you created or changed and what each one does.
2. Give me the exact terminal commands to start the app and test this — copy-paste
   ready, nothing assumed. Include any environment setup needed.
3. Tell me exactly what I should see or do to confirm it's working correctly.
4. Tell me what failure looks like so I know the difference.
5. Update Current State in CLAUDE.md to reflect what now works.
Prompt — How Do I Run This?
Give me the complete instructions to run and test what we just built.

1. Every command I need to run in order — copy-paste ready for the terminal.
   Start from scratch as if I've just opened a new terminal window.
2. The URL or interface to open in my browser.
3. The exact steps to test this specific feature — what to click, type, or do.
4. What I should see when it's working correctly.
5. The most likely reason it might not work and what to check first.
🔨
Build
One piece at a time
▶️
Run
Exact commands, your terminal
Confirm
Does it do what you expected?
📝
Record
CLAUDE.md updated
🔁
Repeat
Next piece
Step 07 Scope Check

Use any time the AI starts working outside today's stated goal or proposes something out of scope.

Prompt — Scope Check
Stop. Today's goal is: [restate the one-sentence goal]
Current Build Plan phase: [phase name]

What you just proposed touches [describe what drifted]. That is not in scope today.

Either: redo your proposal to achieve today's goal without touching out-of-scope
components — or make the case for why these two things genuinely can't be separated
so I can decide whether to expand scope deliberately.
Do not make the change silently. Present the option and wait.
Step 08 External API or Service Integration

Use before implementing anything that connects to an external service. The AI's training data has a cutoff date; APIs don't. Forces current documentation before a line is written.

Prompt — External API Integration
Before writing any code for this integration, go to: [official documentation URL]
Read the current implementation guide for [specific feature].

Find and report: current authentication method; exact endpoints needed; required
request format and parameters; response format and how to handle it; rate limits
or quotas; any recent breaking changes or deprecated patterns.

If anything conflicts with what you might assume from older knowledge, flag it.
Only write code after I confirm your understanding of the current docs.
Step 09 Close Every Session

The most important step in the guide. Tell Claude to update CLAUDE.md directly — no copying, no pasting. The project documents itself. The next session starts from exactly where this one ended.

Prompt — Session Close & Self-Assessment
This session is ending. Update CLAUDE.md directly with the following:

1. CURRENT STATE — what is now confirmed working; what is broken or newly discovered
   to be broken; what is still unknown.
2. BUILD PLAN — mark the current phase Complete if done criteria were met and activate
   the next phase. If not complete, note what remains and any blockers.
3. DEBUGGING HISTORY — add a row for anything that failed this session: what was
   tried, what happened, root cause if known.
4. LOCKED DESIGN DECISIONS — add any new architectural decisions made today with
   their reasoning.
5. WHAT'S NEXT — the first thing the next session should do.
6. SESSION LOG — add an entry for today:
   Phase / Attempted / Succeeded / Failed / New constraints / Plan changes.

Write all updates to CLAUDE.md now. Confirm when done.
The Complete Build Cycle
Open → Build → Test → Run → Close
Repeat for every session, every feature, every phase. When the Build Plan says done — you've shipped.
The Eleven Principles — Keep These in Mind
01Requirements before design. Know what you're building before designing anything.
02Design before building. Architecture in writing, with reasoning, before code starts.
03Scope the MVP explicitly. Decide what's in and out before building starts.
04Build from a plan. Each phase has concrete done criteria. Meet them before moving on.
05Build incrementally. One piece at a time. Confirm it works before adding the next.
06CLAUDE.md is the project. If it isn't in the document, it doesn't exist.
07Use authoritative sources. Fetch live documentation before any API work.
08Lock decisions with reasoning. Record not just what you decided, but why.
09Document failures immediately. A failure recorded happens only once.
10Build the feedback loop. The project moves forward along the plan — never sideways.
11Understand before fixing. Never ask for a fix before you understand the root cause.
Power Tools
CurieLabs.ai
When You Need More
Debugging  ·  Recovery  ·  Version control  ·  Code quality  ·  Advanced techniques

The build cycle in Part Two is all you need for most sessions. The tools in this section are for when things get harder — something breaks, the session goes sideways, you need to protect your work, or you want to take a hard look at what you've built. Use them as reference. You won't need all of them at once.

Step 10 Diagnose Before You Fix

When something breaks, your first move is always to give Claude as much information as possible about exactly what you see. The more evidence you provide, the faster the diagnosis. Here are the four most powerful techniques — use them in combination.

① Copy and paste the exact error — always

Never describe an error when you can copy it. The exact text of an error message — including the line numbers, file paths, and stack trace — contains the precise information Claude needs to diagnose the problem. A paraphrase loses critical detail. Select all the red text in your terminal or browser console, copy it, and paste it in.

Prompt — Error Diagnosis
Something is broken. Do not propose any fix yet.

Here is the exact error: [paste the complete error message, including any stack trace]

Explain:
1. What this error means in plain language.
2. Which specific file, function, or line is the source of the failure.
3. WHY it happened — what caused the system to reach this state.
4. If there are multiple possible causes, list them in order of likelihood.

I will ask for a fix once I understand the problem.
② Show Claude what you see — attach a screenshot

If the problem is visual — a broken layout, an unexpected blank screen, a UI element in the wrong place — take a screenshot and attach it to your message. Claude can read images. Drag the screenshot directly into the chat window alongside your prompt. This is especially useful when the browser console shows no error but something still looks wrong.

How to take a screenshot
MacCmd + Shift + 4 — drag to select area
WindowsWin + Shift + S — drag to select area
Prompt — Visual Bug
Something doesn't look right. I've attached a screenshot.

Expected: [describe what you expected to see]
Actual: [describe what you actually see]

Identify what's causing the visual difference and propose a fix.
③ Tell Claude to read the logs

Every running application writes a log — a record of everything that happened, in order. When something fails silently (no visible error, but wrong behavior), the log usually contains the real story. Claude can read your log files directly from the project folder. If you don't know where your logs are, ask Claude to find them.

Prompt — Read the Logs
Something is failing but I don't have a clear error message.

Read the application logs for this project. Look for:
1. Any ERROR or WARNING entries around the time the problem occurred.
2. The last successful operation before things went wrong.
3. Any unexpected values, null responses, or timeout messages.

Tell me what the logs reveal. If you can't find the log files, tell me where
they should be and how to find them for this stack.
④ Set debugging traps to isolate exactly where it breaks

When you can't tell which part of the code is causing a problem, ask Claude to insert debug statements — lines that print the value of key variables at specific points as the code runs. You then run the app, watch what gets printed in the terminal, and see exactly where the expected value turns wrong. Once the problem is isolated, Claude removes the traps and fixes the real issue.

Prompt — Set Debugging Traps
I need to isolate exactly where this problem is occurring.

The symptom: [describe what goes wrong and when]
The suspected area: [which feature, function, or flow you think is involved]

Add debugging statements at key points in the relevant code to print:
- The value of important variables as they change
- Which functions are being called and in what order
- The exact point where the value becomes wrong or the flow goes unexpected

Do not fix anything yet — just instrument the code so I can see what's happening.
Tell me exactly what to run and what to look for in the output.
Once we've identified the problem, remove all debug statements before fixing.
📋
Copy the error
Exact text, not a paraphrase
📸
Screenshot it
Drag into chat when it's visual
📄
Read the logs
The real story is always there
🪤
Set traps
Print values at every step
Step 11 Recover a Runaway Session

Use when multiple changes have been made, something is broken, and you're not sure what changed or in what order.

Prompt — Session Recovery
Stop all changes. This session has gone off the rails.
Without making any further modifications:

1. List every change made to the codebase in this session, in order.
2. Identify what you believe is currently broken and your best theory why.
3. Identify the last point in this session where everything was working.
4. Propose the minimum rollback needed to return to that working state — not to
   fix everything, just to reach stable ground.

Once I confirm the rollback, I'll decide whether to continue or end the session
and capture what we learned.
Step 12 Get Unstuck

Use when you've lost the thread — unclear on priority, phase, or what to do next.

Prompt — Unstuck Assessment
I'm not sure what to do next. Do not write any code.
Read CLAUDE.md and review the current project state.

Give me an honest assessment:
1. What is the highest-priority broken thing right now?
2. What is the highest-value next thing to build, assuming nothing is broken?
3. Is there anything I'm ignoring that will become a serious problem later?
4. Is the Build Plan sequence still correct, or should it be reordered?

Be direct. If I should slow down or consolidate before building more, say so.
Step 13 Consolidation Session

Run every few sessions or whenever the project feels chaotic. You build nothing. You make everything accurate so the next phase starts from solid ground.

Prompt — Consolidation
This is a consolidation session. We are not building anything.
Goal: make CLAUDE.md accurately reflect the current state of the project.

Read CLAUDE.md and examine all files in this project folder.

1. ARCHITECTURE AUDIT — does the Architecture Overview match what was actually
   built, or has it drifted? Identify gaps.
2. BUILD PLAN AUDIT — which phases are genuinely complete? Which are partial?
   Should the sequence be reordered given what we now know?
3. CONSTRAINTS AUDIT — are there rules in the code not yet documented in
   Critical Constraints or Locked Decisions?
4. CURRENT STATE — produce an accurate Current State based on reality, not intent.
5. WHAT'S NEXT — propose a clean priority list for the next phase.

Output the revised CLAUDE.md sections. I will review and apply them.
Part Four
CurieLabs.ai
Reference
Prompt Index  ·  Quick lookup for every prompt in the Playbook
The Eleven Principles
01
Requirements before design
Know exactly what you're building before designing anything.
02
Design before building
Get architecture in writing, with reasoning, before code starts.
03
Scope the MVP explicitly
Decide what's in and out before building. State it in one sentence.
04
Build from a plan
Work in phases with concrete done criteria. Meet them before moving on.
05
Build incrementally
Start with the smallest working thing. Evaluate. Correct. Add the next layer.
06
CLAUDE.md is the project
If it isn't in the document, it doesn't exist. Update it every session.
07
Use authoritative sources
Fetch live documentation before any API or external service work.
08
Lock decisions with reasoning
Record not just what you decided, but why — so it can't be undone accidentally.
09
Document failures immediately
A failure recorded is a failure that happens only once.
10
Build the feedback loop
The project moves forward along the plan — never sideways or backward unless the plan is explicitly updated.
11
Understand before fixing
Never ask for a fix before you understand the root cause.
Prompt Index
Step Prompt When to use
Part 1 — Starting a New Project
01Requirements InterviewStarting a new project
02Architecture DesignAfter requirements
03MVP ScopeAfter architecture
04Build PlanAfter MVP scope
05Finalize CLAUDE.mdOnce, at end of setup — the launchpad
Part 2 — Running Each Session
06Session OpenStart of every session
Build It · Run It · Test ItThe core loop — repeat every iteration
07Scope CheckWhen session starts drifting
08External API IntegrationBefore connecting to any service
09Session Close / Self-AssessmentEnd of every session
Power Tools — When You Need Them
10Root Cause DiagnosisWhen something breaks
11Session RecoveryWhen changes have piled up wrong
12Unstuck AssessmentWhen you've lost the thread
13ConsolidationEvery few sessions, or when things feel chaotic
14Create CLAUDE.md from TemplateStarting any new project
15Git SetupOnce per project, before first commit
16Git Commit & PushEnd of every session
17Code Quality AuditAfter a working version exists
Part Five
CurieLabs.ai
Your Project Memory File
The CLAUDE.md template  ·  How to create it  ·  What every section does

CLAUDE.md is the single most important file in your project. It is the living document every AI session reads first and updates last. The template below captures everything your project needs to stay on track — architecture, decisions, constraints, what's working, what's broken, and what's next. You never fill it in from scratch; you use the prompt below to have Claude generate it from your requirements.

Step 14 Create CLAUDE.md from the Template

Paste this prompt into Claude along with the template below. Claude will create the actual file in your project folder, filled in with your project's specifics. Do this once, before your first working session.

Prompt — Create CLAUDE.md File
Create a file called CLAUDE.md in this project folder using the template on the
following page of the Playbook. Copy the entire template block and include it
after this instruction.

For every [bracketed section]: leave the placeholder text exactly as written —
we will fill it in during Steps 1–4 of the Playbook.

Set up the file now. Confirm the path when done.
Do this once, before Step 01. After that, every step writes directly into CLAUDE.md. You never need to re-create it or copy it between sessions — Claude always reads the live file from the project folder.
Template CLAUDE.md — Copy this entire block ⬇ Download CLAUDE.md
# [Project Name] — Engineering Guide

> Living document. Read at session start. Update at session end.
> Replace all [bracketed text] with your project specifics as you build.

## What This Project Is
[2–4 sentences. Plain language. What it does, who it's for, what makes it distinct.]

## Always Read First
1. This file — architecture, constraints, current state
2. [filename] — [what it contains and when to read it]

## Session Protocol — Mandatory
### Before starting any task
1. Read this entire CLAUDE.md. Do not skip sections.
2. Check Current State — what's working, what's broken, what's next.
3. Check Debugging History for the area you're working in. Do not repeat a failed approach.
4. For any external API: fetch live documentation first. Never rely on training data.
5. State today's goal in one sentence. Do not begin until confirmed.
### During the session
6. Stay on the current Build Plan phase. Do not drift without an explicit decision.
7. When an attempt fails, record it in Debugging History immediately.
8. Do not accept changes to out-of-scope components.
9. If you discover an undocumented constraint, add it to Critical Constraints.
### At the end of every session
10. Update Current State, Build Plan status, Debugging History, What's Next, Session Log.
11. Add new architectural decisions to Locked Design Decisions with reasoning.
Goal: no session repeats a failure a previous session diagnosed.
The project moves forward along the plan — never sideways or backwards
unless the plan is explicitly updated with new learnings.

## Architecture Overview
### Components
[Component 1] — [what it does]
[Component 2] — [what it does]
### How They Connect
[Describe data flow: what happens when a user does the primary action, step by step.]
### File Structure
[project-root]/
├── [file or folder]    ← [one-line description]
└── [file or folder]    ← [one-line description]

## Running the Project
# Start backend:  [command]
# Start frontend:  [command]
# Local URL:       http://localhost:[PORT]
Environment variables (in .env — never commit this file):
  [VAR_NAME] — [what it's for]

## Critical Constraints
> State as direct prohibitions. Add as discovered. Never remove.
- NEVER [rule]: [consequence if violated]
- NEVER [rule]: [consequence if violated]

## Locked Design Decisions
| Question | Decision | Reasoning |
|---|---|---|
| [What was decided?] | [What was chosen] | [Why — alternatives rejected] |

## Component / Service Status
> Prevents the AI from treating dead code as active.
| Component | File | Status | Notes |
|---|---|---|---|
| [Name] | [path] | Active | [what it does] |
| [Name] | [path] | Legacy — do not use | [what replaced it] |

## Build Plan
### Phase 1 — [Name]
Goal: [single sentence]
Builds: [specific components]
Done when: [concrete, observable test]
Status: [ ] Not started

### Phase 2 — [Name]
Goal:  Builds:  Done when:  Status: [ ] Not started

## MVP Scope
IN: [feature — one-line reason]
OUT: [feature — one-line reason why deferred]
MVP in one sentence: [what this version does, for whom]

## Current State
Confirmed Working: [list]
Known Issues: [list]
Unknown / Needs Investigation: [list]
Active phase: [Phase name] — Remaining: [what's left]

## What's Next
1. [Highest priority — specific enough to start immediately]
2. [Second priority]

## External Services and APIs
> Fetch live docs from these URLs before any integration work. Never assume.
| Service | Documentation URL | Auth Method | Status |
|---|---|---|---|
| [Name] | [URL] | [how auth works] | [integrated / pending] |

## Debugging History
> Add a row when something fails. Complete it when root cause is known. Never delete rows.
| Date | What Was Tried | What Happened | Root Cause |
|---|---|---|---|
| — | — | — | — |

## Session Log
> One entry per session, written during end-of-session self-assessment.
### [YYYY-MM-DD]
Phase: / Attempted: / Succeeded: / Failed: / New constraints: / Plan changes:

## Authoritative Sources
| Service / Library | Documentation URL | Last Verified |
|---|---|---|
| [Name] | [URL] | [date] |

---
CLAUDE.md reflects the current true state of the project.
If something here is wrong, correct it immediately.
A wrong document is worse than no document.
Cowork Skill Playbook Coach — Install the Active AI Coach ⬇ Install Skill

The Playbook Coach skill turns Claude into an active build partner in Cowork — not a tool you prompt, but a coach that reads your project state from CLAUDE.md and tells you exactly what comes next. No manual prompts required.

Download the .skill file and double-click it — Claude Code opens and installs it automatically. Once installed, opening any project folder with a CLAUDE.md will automatically trigger the coach.

To install
  1. Click ⬇ Install Skill above to download playbook-coach.skill
  2. Double-click the downloaded file
  3. Claude Code opens and installs the skill automatically
  4. The coach is now active in every session
What the coach does automatically
  • Reads CLAUDE.md and detects your current build stage
  • Announces what's done and what comes next
  • Runs the build loop: build → confirm → repeat
  • Switches to debug mode when something breaks
  • Fetches live docs before any external integration
  • Commits to git at every phase completion
  • Runs a code quality audit when your MVP is working
Works with Cowork only. The skill file format is specific to Claude Cowork. For Claude Code or other tools, use the prompts in this guide directly.
Part Six
CurieLabs.ai
Your Workspace
Folders  ·  Ports  ·  API Keys  ·  Running Multiple Projects
Before you build anything, set up a workspace that stays organized as your project count grows. The conventions in this section are the ones Claude expects — using them means you spend less time explaining where things are and more time building.
Concept Folder Organization

Keep all projects under one parent folder. Each project gets its own subfolder. Claude Code is started from the project folder — not the parent — so it sees only the relevant code.

Recommended Structure
~/projects/
├── my-app/              ← Project A root (start Claude Code here)
│   ├── CLAUDE.md        ← Project A memory document
│   ├── .env             ← API keys — never shared or committed
│   ├── .gitignore       ← Tells git what NOT to track
│   ├── backend/
│   └── frontend/
│
├── second-project/      ← Project B root
│   ├── CLAUDE.md
│   ├── .env
│   └── src/
│
└── experiment/          ← Low-stakes exploration project

When you open Claude Code, navigate into the specific project folder first. Claude will automatically read the CLAUDE.md it finds there — giving it the right memory for that project and nothing else.

Concept Ports — Why Projects Use Different Numbers

When you run a project locally, your computer opens it at an address like http://localhost:3000. The number (3000) is the port — think of it as a door on your computer. Each running project needs its own door, or they collide.

Common Port Conventions
PortTypically used for
3000React / Vite frontend (default)
5000Flask / Python backend (default)
8000FastAPI / Django backend
8080Alternative frontend or proxy
5432PostgreSQL database (default)

If you run two projects that both try to use port 3000, the second one will fail with a confusing error. Assign each project its own port range and document it in CLAUDE.md under "Running the Project." Tell Claude which port to use and it will configure everything accordingly.

Prompt — Assign Ports
Assign port numbers for this project so they don't conflict with my other projects.
My other projects use these ports: [list ports already in use, or "none yet"]

Pick an available port for:
- The frontend (the UI I open in a browser)
- The backend API server
- Any database, if applicable

Use these ports consistently throughout the project. Update CLAUDE.md under
"Running the Project" with the local URLs. Never change these ports without
updating CLAUDE.md and telling me.
Concept API Keys & Environment Variables

An API key is a secret password that lets your app use an external service — an AI model, a payment system, a map provider. These keys must be kept private. If they leak into public code, someone else can use your account and run up your bill.

The Golden Rule
API keys live in a file called .env in your project root. This file is never shared, never emailed, never committed to git, and never pasted into a chat. Claude reads it from your disk — you never need to paste the actual keys into a conversation.
What a .env file looks like
OPENAI_API_KEY=sk-proj-abc123...
GEMINI_API_KEY=AIzaSy...
DATABASE_URL=postgresql://user:pass@localhost:5432/mydb
STRIPE_SECRET_KEY=sk_live_...
Prompt — Set Up Environment Variables
Set up environment variable handling for this project.

1. Create a .env file in the project root with placeholder entries for
   every API key or secret this project will need:
   [list the services: e.g., OpenAI, Stripe, database, etc.]

2. Create a .env.example file with the same keys but empty values —
   this is safe to commit and shows collaborators what keys are needed.

3. Ensure .env is in .gitignore so it can never be accidentally committed.

4. Configure the application to read these values from the environment,
   never hardcoded in source files.

5. Add the variable names (not values) to CLAUDE.md under "Running the Project."
Concept Running Multiple Projects in Parallel

It's common to have several projects active at once — a main product, an experiment, a tool you built to support the main one. Claude Code handles this cleanly because its memory is entirely in the CLAUDE.md of whichever folder you start it from.

How parallel projects stay separate
Each project has its own CLAUDE.md — its own memory, its own build plan, its own constraints. When you start a session, you navigate into that project's folder first. Claude reads only that project's CLAUDE.md and has no knowledge of your other projects unless you explicitly bring it in.

This means you can have five projects active simultaneously with zero confusion — as long as each has its own folder, its own CLAUDE.md, and its own port assignments.
Prompt — Multi-Project Workspace Setup
I have multiple projects and need to organize them cleanly.

Projects: [list each project and what it does in one line]
Parent folder: [e.g., ~/projects/ or ~/Documents/dev/]

For each project:
1. Create its folder under the parent if it doesn't exist.
2. Create a minimal CLAUDE.md stub with the project name and a one-sentence description.
3. Create a .env placeholder and .gitignore.
4. Assign a unique port range (frontend + backend) that doesn't conflict across projects.

Produce a summary table showing: project name, folder path, frontend port,
backend port. I'll refer to this when starting sessions.
Part Seven
CurieLabs.ai
Version Control
Git  ·  GitHub  ·  How to never lose your work
The single biggest mistake non-technical builders make is not using version control. Without it, one bad session can destroy days of work with no way to recover. With it, every working state of your project is preserved forever. Claude sets this up and runs it on your behalf — you just need to understand what it's doing and why.
Concept What Git Is

Git is a time machine for your code. Every time you make a commit, Git takes a snapshot of your entire project at that moment. If a future session breaks something, you can travel back to any previous snapshot and restore it — or compare what changed between any two points in time.

Key concepts, plain language
Repository
Your project folder, tracked by git. Contains the full history of every change ever made.
Commit
A named snapshot. "Added login screen" or "Fixed audio playback crash." You can return to any commit.
Branch
A parallel copy of the project. Experiment freely on a branch without touching the working version.
.gitignore
A list of files git should never track — API keys, passwords, generated files, huge dependencies.
Rollback
Returning the project to a previous commit. The primary recovery tool when a session goes wrong.
Prompt — Git Setup (run once per project)
Set up git version control for this project.

1. Initialize a git repository if one doesn't exist.
2. Create a .gitignore that excludes: node_modules, .env, any file containing
   API keys or secrets, build output folders (dist/, build/, __pycache__/),
   log files, and OS files (.DS_Store, Thumbs.db).
3. Make an initial commit of all current project files with the message:
   "Initial commit — [project name] project scaffold"
4. Confirm the repository is initialized and the first commit is recorded.

From this point forward: after every working session, commit all changes
with a clear descriptive message summarizing what was built or fixed.
Concept What GitHub Is

Git lives on your local computer. GitHub is a cloud backup of your git history. If your computer is lost, stolen, or fails, your entire project — every commit, every snapshot — is safe on GitHub. It also makes it easy to share projects or collaborate.

GitHub is free for personal use at github.com. Create an account, then use the prompt below to have Claude push your project there. You only need to do the account setup once.
Prompt — Push to GitHub
Push this project to GitHub for cloud backup.

My GitHub username: [your username]
Repository name: [project-name — lowercase, hyphens not spaces]
Visibility: [private (recommended) or public]

1. Guide me through creating the repository on github.com if it doesn't exist.
2. Add the GitHub remote to this local repository.
3. Push the current branch and all commits.
4. Confirm the push succeeded.

From this point forward: after every local commit, also push to GitHub so
the cloud backup stays current.
Prompt — Commit & Push at Session End
Commit all changes from this session and push to GitHub.

Write a commit message that clearly describes what was built or changed today.
Format: "[type]: [description]"
Types: feat (new feature), fix (bug fix), refactor (restructure), docs (documentation)
Example: "feat: add audio playback controls to interview screen"

1. Stage all changed files.
2. Commit with the descriptive message.
3. Push to GitHub.
4. Confirm the commit hash and what files were included.
Step 15 Roll Back to a Working State

When a session breaks something and you can't recover it forward, roll back to the last known-good commit. This is the safety net that makes bold experimentation safe.

Prompt — Rollback
Something from this session has broken the project and I want to roll back.

1. Show me the last 10 commits with their messages and dates.
2. Identify which commit is most likely the last working state based on
   the session log and what we attempted today.
3. Tell me exactly what will be lost if I roll back to that commit.
4. If I confirm, perform the rollback.

Do not roll back until I explicitly confirm after seeing what will be lost.
Part Eight
CurieLabs.ai
Code Quality & Auditing
Security  ·  Weaknesses  ·  Bloat  ·  Technical debt
Once you have a working version of your project, run an objective audit before adding more features. AI builds fast — which means it can accumulate shortcuts, duplicate logic, and security gaps just as fast. The prompts in this section treat the AI as a critic, not a builder. Use them after every significant phase, not just at the end.
Step 16 Full Code Quality Audit

A systematic review of the entire codebase for security vulnerabilities, architectural weaknesses, dead code, and technical debt. The AI reports findings — it does not fix anything until you review and approve.

Prompt — Code Quality & Security Audit
Perform an objective audit of this codebase. Do not write any code or make any changes.

Examine every file and report findings under four categories:

1. SECURITY
   — Hardcoded API keys, passwords, or secrets anywhere in source files
   — User inputs that are passed to a database or shell without validation
   — Endpoints or routes that are accessible without authentication and shouldn't be
   — Sensitive data stored or transmitted without encryption
   — Dependencies with known vulnerabilities

2. ARCHITECTURAL WEAKNESSES
   — Components that do too many unrelated things (should be split)
   — Missing error handling — places where a failure will silently break something
   — Assumptions that will fail under real-world conditions (e.g., assumes fast network,
     assumes single user, assumes data always exists)
   — Circular dependencies or tight coupling that makes future changes risky

3. BLOAT & DEAD CODE
   — Functions, files, or routes that are defined but never called
   — Duplicate logic that exists in more than one place
   — Dependencies installed but not used
   — Over-engineered solutions for simple problems

4. TECHNICAL DEBT
   — Shortcuts taken that will cause problems at scale or with more users
   — Places where error messages are swallowed instead of surfaced
   — TODO comments or placeholder logic still in production paths
   — Inconsistent patterns that will confuse future development

For each finding: name the file and line, describe the problem, rate severity
(Critical / High / Medium / Low), and recommend the fix.
Order by severity. Be direct and specific. Do not soften findings.
Step 17 Dependency & Cost Audit

Checks what your project is spending — in API calls, compute, and third-party services — and whether any of it can be reduced without sacrificing functionality.

Prompt — Dependency & Cost Audit
Audit this project for unnecessary cost and dependency risk. Do not make any changes.

1. DEPENDENCIES — list every external library or package installed.
   For each: what is it used for, is it still actively maintained, could it be
   replaced with a simpler built-in alternative?

2. API CALL EFFICIENCY — identify every place an external API is called.
   For each: how often does it get called, could results be cached, is the
   same data fetched multiple times when once would suffice?

3. ESTIMATED COSTS — for any paid API (AI models, cloud services, payment
   processors), estimate the cost per user action and per month at 100 users
   and at 1,000 users. Flag anything that will scale expensively.

4. SINGLE POINTS OF FAILURE — identify any external dependency where if the
   service goes down, the entire application stops working. Note whether a
   fallback exists.

Report findings with severity and recommended action. Do not fix anything yet.
Step 18 Update CLAUDE.md After an Audit

After reviewing audit findings and deciding which to address, lock the prioritized fixes into the project memory document so they don't get lost.

Prompt — Record Audit Findings in CLAUDE.md
Based on the audit we just completed, update CLAUDE.md as follows:

1. Add a new section "Known Issues — Audit Findings" listing every issue we decided
   to fix, with severity and the agreed fix approach.

2. Insert the Critical and High severity fixes as the top items in What's Next,
   ahead of any feature work. Security issues are never deferred.

3. Add any new Critical Constraints discovered during the audit — things that must
   never be done in future development.

4. Update the Build Plan to include an "Audit Remediation" phase before the next
   feature phase, covering the Critical and High items.

Output the updated CLAUDE.md sections.