# Production and Prototyping

Tuesday, October 27

---

# 📆 Today

- Prototyping and testing
- In-class feedback/work
- Thursday: [Working with agents quiz](../../resources/working-with-agents-quiz.guide.md)

---

<!-- id: this-week-in-ai -->

<x-sfx-cue src="../assets/this-week-in-ai-theme.mp3" on="player:block-enter" />

![@image(fit=contain).background](../assets/this-week-in-ai.png)

---

# X-Risk?

^ Things have been strangely quite on this front.

---

[@embed php issues](https://x.com/HackingLZ/status/2113025408975143080?s=20)

^ however some *real* safety issues have popped up

---

<!--
play:
  variant: section
-->

# Build > Test > Build

---

# Planning and Prototyping

- Trying things is now "cheap"
- Trying with real users is the only way to know if it works
- The loop: Build > Test > Build Again

---

<!--
play:
  variant: fact
-->

# Docs + Prototype

- Your docs are the "source of truth" and context for your agents and you.
- Your app code lives along side of it so your agent gets automatic context

^ Make sure you've recorded your prior test results; this week we'll learn how to observe in actual use

---

# The loop

1. **Docs:** what you are building, in `docs/project.md`
2. **Prototype:** HTML, CSS, JS etc.
3. **Test:** People who will use your app
4. **Learn:** What did they do/say/not say?
5. **Update docs and prototype,** and test again

^ Go around as many times as the week allows. Two loops with real people beat one perfect build nobody touched.

---

# Docs as source of truth

| Doc | Holds |
| --- | --- |
| `docs/project.md` | Who it's for, their problem, the core features |
| `docs/research.md` | What people told you before you built |
| `docs/tests.md` | Test observations and notes |
| `docs/decisions.md` | What you changed, and why |


---

<!--
play:
  variant: section
-->

# A prototype you can test

---

# Real enough to test

- **Looks legit:** should look and feel like a real product.
- **Works on a phone,** most users will be using phones
- **The core task "works"** the user can complete a full task
- **Faking it:** Use sample data instead of a database, no accounts/logins yet

---

<!--
play:
  variant: fact
-->

# Real front-end, fake back-end

---

<!--
play:
  variant: section
-->

# Testing with real users

---

# Run a test

1. Find **three people who have the problem** (start with your research)
2. Give them **a task, not a tour:** _"Post a ride home for Thursday."_
3. **Watch, don't help.** Ask them to think out loud
4. Afterward, ask **two or three questions**
5. Write **what they did** in `docs/tests.md`, in their words

^ Their confusion is what you came to see. If you explain the screen, you've lost the data. Write it down right away; you'll forget the details within the hour.

---

# What to watch for

- Where do they **pause**?
- What do they **try first**?
- What did they **expect** to happen?
- What do they **skip**?

^ Watch what people do, not what they say they'd do. "I'd totally use this" is the least useful sentence in user testing.

---

# Then change it

1. Pick the **biggest problem** you saw
2. **Decide** the change and write it in your docs (`decisions.md`, and `project.md` if the product changed)
3. **Brief your agent from the doc**
4. **Test again**

---

<!--
play:
  variant: section
-->

# The Studio

---

# Your project, with an agent beside it

- **Agent:** builds from your docs, one working step at a time
- **App:** your prototype, running, at laptop or phone size
- **Docs:** your docs folder, as pages
- **Code and History:** every change is a commit you can undo
- **Put it online:** a real link testers open on their own phones

[Open the Studio](../../project/index.md)

^ Demo: brief the agent from a project doc, watch it build, look at it on a phone, undo a step, put it online and open the link on a phone.

---

# Brief from your docs

- _"Build a prototype of the core feature in docs/project.md, with sample data."_
- _"Make the post button easier to find on a phone."_
- _"Testers kept looking for a search box. I wrote it in docs/tests.md. Add one."_

^ Notice the last one: the learning lives in the docs, and the brief points at it.

---

# You stay in the driver's seat

- Your agent **asks about the look** before it styles
- It **asks before** adding a server, accounts or a dependency
- It **never writes** your project doc, your research or your test notes
- **Read its plan** before it builds, and **try every change**
- Anything it commits, you can **undo**

^ The same habits as the Working with agents badge: brief, steer the plan, check what it built.

---

<!--
play:
  variant: section
-->

# This week

---

# First slice: prototype and test

- A prototype of your core features, built in the Studio from your docs
- A test plan in `docs/tests.md`
- Three people with the problem try it, and you write what happened
- Your docs change from what you learned, then the prototype does

[First slice](../../build/first-slice.milestone.md) · [Testing with users](../../project/guides/user-tests.guide.md)

---

# Thursday

[Working with agents quiz](../../resources/working-with-agents-quiz.guide.md): in class, open book, 20 minutes, in the Quiz Space.
