# IRIS Chat — Claude Code Setup Guide
*For Von · two-Mac workflow (home + office) · non-developer-friendly*

This gets the IRIS Chat project running in Claude Code as its own repo, synced across both Macs, with all your project files in place and the working discipline that keeps Claude Code on the rails.

---

## Part 1 — One-time setup (do this once, on either Mac)

### Step 1: Put the project files where you can find them
Download `iris-chat-project.zip` (from our chat), unzip it, and rename the folder to `iris-chat`. Move it somewhere permanent — same place you keep `Ai-PM-Project` (e.g. `~/Projects/`).

You should have:
```
~/Projects/iris-chat/
├── PROJECT_STATUS.md
├── DECISIONS.md
├── CLAUDE.md
├── PROJECT_BRIEF_IRIS_CHAT.md
├── prototype/iris_chat_prototype.html
└── pilot/ (plan, tester guide, feedback CSV)
```

### Step 2: Open it in Claude Code
Open Terminal and run:
```bash
cd ~/Projects/iris-chat
claude
```
That's it — Claude Code starts *inside* the project. It automatically reads `CLAUDE.md` on launch, so it already knows the architecture rules, the invariants it must never break, and your one-function-per-prompt discipline.

> First time on a Mac? If `claude` isn't found, install it first:
> `npm install -g @anthropic-ai/claude-code` (needs Node.js — if that's missing, get it from nodejs.org, LTS version).

### Step 3: Make it a Git repo (your safety net)
Inside the project, ask Claude Code in plain English:

> "Initialize this as a git repo, create a sensible .gitignore, and make the first commit."

Then create the remote. Easiest path — ask Claude Code:

> "Create a new private GitHub repo called iris-chat and push this to it."

(It'll use the `gh` CLI if you have it, or walk you through it. If you'd rather, create the empty private repo on github.com first and paste the URL.)

**Why Git matters for you specifically:** it's your undo button. Every time something works, commit. If a later change breaks it, you roll back in seconds instead of losing an evening. This was already your discipline on `Ai-PM-Project` — same here.

---

## Part 2 — Syncing across your two Macs

You already do this with `Ai-PM-Project`. Same pattern:

**Leaving a Mac (end of session):**
> "Sync the project and push to GitHub."

This updates `PROJECT_STATUS.md` + `DECISIONS.md` (the project-sync skill), commits, and pushes.

**Starting on the other Mac:**
```bash
cd ~/Projects/iris-chat
git pull
claude
```
Then just say:
> "Where were we?"

Claude Code reads `PROJECT_STATUS.md` and tells you the current phase and next step. No re-explaining.

> **The golden rule of two-Mac work:** always `git pull` before you start, always push before you stop. If you ever forget and edit both Macs, Git will flag a conflict — ask Claude Code to "help me resolve this merge conflict" and it will.

---

## Part 3 — How to work with Claude Code on this project

### The rhythm (unchanged from your existing workflow)
1. **One function per prompt.** "Add X" not "add X, Y, and Z." Small changes are easy to verify and easy to roll back.
2. **Test after each change.** Open `prototype/iris_chat_prototype.html` and try it.
3. **Commit when it works.** "Commit this — [what changed]."
4. **Sync at the end.** "Sync the project."

### Good prompts for this project
- *"Read CLAUDE.md and PROJECT_STATUS.md, then tell me where we are."* ← start of every session
- *"Add a new product to the seed dictionary: [brand] / [generic] / [code], group [IV/Inhaler/Nutra]."*
- *"A tester reported [paste feedback]. Reproduce it, propose a fix, but don't change anything until I approve."*
- *"That's the bug we fixed last week — add a regression test so it can't come back."*
- *"Sync the project and push."*

### The one habit that keeps quality high
When Claude Code proposes a change to masking, extraction, or the AI prompt, ask it:
> "Does this respect the architecture invariants in CLAUDE.md?"

Those invariants (server never sees real names, convert-don't-reject, no bare-surname aliases, etc.) are the hard-won rules from our testing. Making Claude Code check itself against them catches regressions before they ship.

---

## Part 4 — Testing the prototype

The prototype is a single HTML file. To test on your Mac:
- Just open `prototype/iris_chat_prototype.html` in a browser? **The AI won't work** — the AI bridge only works inside Claude.ai (this is the hosting blocker in the pilot plan).
- **For now, test the AI behavior by opening the file inside Claude.ai** (upload it or paste it), exactly as we've been doing this whole session.
- **The masking/extraction logic (typing, chip conversion, send gate) works in any browser** — so you can test *that* half locally anytime.

When IT builds the hosted version (PILOT_PLAN §5), the AI will work in a plain browser for doctors.

---

## Part 5 — When you're ready for the Expo build

Right now the repo holds the prototype and specs. When Wave 1 feedback stabilizes the composer, start the real app. Ask Claude Code:

> "Read PROJECT_BRIEF_IRIS_CHAT.md §8 and scaffold Phase 1 of the Expo app — the masking composer screen — following the invariants in CLAUDE.md. One function at a time; start with the seed dictionaries."

The brief's §4b–4d translate almost directly into the Expo code, and `CLAUDE.md` already governs both the prototype and the future app, so the rules carry over automatically.

---

## Quick reference card

| I want to… | Say to Claude Code |
|---|---|
| Start a session | "Where were we?" |
| Fix a tester bug | "Tester reported [X]. Reproduce, propose a fix, wait for my OK." |
| Add a product/hospital/alias | "Add [thing] to the seed dictionary/registry." |
| Save progress | "Sync the project and push." |
| Undo a bad change | "Roll back to the last commit." |
| Check quality | "Does this respect the invariants in CLAUDE.md?" |
| Move to the other Mac | (terminal) `git pull` → `claude` → "Where were we?" |

---
*Setup questions → bring them back to our chat. Keep the loop tight: change → test → commit → sync.*
