Writing the spec with AI
Turn the narrowed idea into a lightweight spec — screens, user stories, and acceptance criteria — that guides every prompt after this.
A spec is not bureaucracy; it's the shared context you'll paste into future prompts so the model builds a coherent app instead of a pile of disconnected files. For a solo project it can be one page.
The three things a useful spec contains
- Screens — the list of views and how you move between them.
- User stories — short "As a user, I can…" statements that describe behavior.
- Acceptance criteria — testable conditions that tell you a story is done.
Here is my v1 scope for a journaling app called DayOne: [paste your bullet list]. Write a one-page spec with: (1) a list of screens and navigation between them, (2) user stories in "As a user, I can…" form, and (3) 2-3 acceptance criteria per story. Keep it realistic for a solo SwiftUI + SwiftData app. No backend accounts.
This is the SCTB pattern from Module 1 again — stack (SwiftUI + SwiftData), target (a one-page spec), behavior (the three numbered sections), constraint (no backend accounts). It works on documents, not just code.
You'll get something like this, which you should save as SPEC.md in your project folder:
# DayOne — v1 Spec
## Screens
- EntryList → the home screen, a list of entries (newest first)
- EntryEditor → create or edit an entry (body only — the title is generated by AI later)
- EntryDetail → read an entry and its AI insights
Navigation: EntryList → tap "+" → EntryEditor
EntryList → tap a row → EntryDetail → Edit → EntryEditor
## User stories
1. As a user, I can write a new entry and save it.
- Save is disabled until the body has text
- The new entry appears at the top of the list
2. As a user, I can see my past entries, newest first.
- Each row shows the AI-generated title (or the first line of the body) and the date
- The list updates immediately after an entry is created or deleted
3. As a user, I can generate AI insights for an entry.
- Tapping "Reflect" produces a title, a mood, and a question
- A spinner shows while it's working; errors show a retry buttonFrom now on, every build prompt can start with "Per SPEC.md, implement the EntryEditor screen…" The model stays consistent because it shares your mental model. This single habit is the biggest quality lever in AI-assisted development.