---
title: "Store versions, not view strings"
lesson_id: "02"
---

# Store versions, not view strings

- **Lesson ID:** 02
- **Goal:** Define a prompt record with id, text, status, and replaces. State that Apple does not host the registry.
- **Human lesson:** [02-store-versions.html](02-store-versions.html)

## Prerequisites

- Lesson 01, or the copy-needs-versions idea.

## Inputs, outputs, and artifacts

- **Inputs:** Instruction text for one feature.
- **Outputs:** A Codable registry sketch.
- **Artifacts:** Progressive `.flow` diagrams and a Swift record.

## Agent build steps

1. Say the registry is yours, not an Apple service.
2. Require id, text, status, and replaces.
3. Allow one live record per feature.
4. Link eval harness and streaming metrics.

## Constraints

Keep the language simple, friendly, and literal. iOS 27 and macOS 27 only. No quizzes, Mermaid, or em dashes. Do not invent API names. Mark sketches as sketches and tell the reader to confirm them in the Xcode 27 SDK.

## Key concepts

- The registry is a list of prompt records. Apple does not host it.
- Start with JSON in the app bundle. One live record per feature.
- Retired records stay for rollback. Do not delete the last good version.
- Put the live id in logs and eval samples.

## Takeaways

- Keep one live version per feature.
- Do not edit live records in place.
- Pin the prompt version on every log and eval row.

## Acceptance checks

- Record fields are listed.
- Apple hosted registry is denied.
- Sibling links, progressive `.flow` diagrams, and an Agent brief link are present.
- [ ] Proceed to [lesson 03 brief](03-route-with-profiles.llms.md).
