This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
A single-page birthday joke web app: a "spot the 7 differences" puzzle between a colleague's photo and a cartoon lookalike — the punchline is there are 0 differences. Every tap on the images spawns a "Nope!" bubble; after 7 taps or pressing "I give up", a full-screen "Happy Birthday!" overlay with confetti is revealed.
Stack: vanilla HTML/CSS/JS in a single index.html (inline <style> and <script>). No build step, no dependencies, no tests. Designed mobile-first.
Files that matter:
index.html— entire app. Personalize the recipient by editing theNAMEconst near the top of the<script>block.assets/colleague.jpgandassets/cartoon.jpg— the two puzzle images (user-supplied).notes/todo.md,notes/lessons.md— required by the workflow rules below.
- Run locally:
python3 -m http.server 8000from the repo root, then openhttp://localhost:8000. Openingindex.htmldirectly viafile://also works but breaks if you later add features that need a real origin. - Test on a phone over LAN: same server; visit
http://<your-laptop-ip>:8000from the phone (laptop and phone on the same Wi-Fi). - Deploy: GitHub Pages serving from
main/ root. No build step — pushing tomainis the deploy.
Before doing ANY work:
- Read
notes/lessons.md— if it doesn't exist, you are blocked until you create it - Write
notes/todo.mdwith your plan — if this file has no plan for the current task, you are blocked until it does - You may NOT write code, create branches, or spawn subagents until both files exist and are populated
These are not optional. Skipping them is a bug in your workflow.
- Enter plan mode for ANY non-trivial task (3+ steps or architectural decisions)
- If something goes sideways, STOP and re-plan immediately - don't keep pushing
- Use plan mode for verification steps, not just building
- Write detailed specs upfront to reduce ambiguity
- Use subagents liberally to keep the main context window clean
- Offload research, exploration, and parallel analysis to subagents
- For complex problems, throw more compute at it via subagents
- One task per subagent for focused execution
- After ANY correction from the user: update
notes/lessons.mdwith the pattern - Write rules for yourself that prevent the same mistake
- Ruthlessly iterate on these lessons until mistake rate drops
- Review lessons at session start for relevant project
- Never mark a task complete without proving it works
- Diff behavior between main and your changes when relevant
git diff main...HEAD
- Ask yourself: "Would a staff engineer approve this?"
- Run tests, check logs, demonstrate correctness
- Verification can be delegated to a subagent
- Update
notes/lessons.mdwith relevant verification results
- For non-trivial changes: pause and ask "is there a more elegant way?"
- If a fix feels hacky: "Knowing everything I know now, implement the elegant solution"
- Skip this for simple, obvious fixes - don't over-engineer
- Challenge your own work before presenting it
- When given a bug report: just fix it. Don't ask for hand-holding
- Point at logs, errors, failing tests — then resolve them
- Zero context switching required from the user
- Go fix failing CI tests without being told how
- Plan First: Write plan to
notes/todo.mdwith checkable items - Verify Plan: Check in before starting implementation
- Track Progress: Present plan to user before starting implementation
- Explain Changes: High-level summary at each step
- Document Results: Add review section to
notes/todo.md - Capture Lessons: Update
notes/lessons.mdafter corrections
# Task: <name>
Branch: `task/<short-task-name>`
Date: YYYY-MM-DD
## Plan
- [ ] Step 1
- [ ] Step 2
- [ ] Step 3
## Subtasks (if parallel subagents used)
- [ ] Part A — branch: `task/<name>-part-a`
- [ ] Part B — branch: `task/<name>-part-b`
## Review
- Summary of changes
- Files touched
- Verification results# Lessons Learned
## YYYY-MM-DD — Short description
**Mistake**: What went wrong
**Root cause**: Why it happened
**Rule**: What to do differently going forward| Principle | Meaning |
|---|---|
| Simplicity First | Make every change as simple as possible. Minimal code impact. |
| No Laziness | Find root causes. No temporary fixes. Senior developer standards. |
| Minimal Impact | Changes touch only what's necessary. Avoid introducing bugs. |
| Parallel by Default | If subtasks are independent, use parallel subagents. |
| Prove It Works | Nothing is done until it's verified. |
| Use The Files | todo.md and lessons.md are not decoration. Write to them or you're doing it wrong. |