This textbook covers the practical process in generative AI and Codex Client, from cleaning up unstructured transcripts to sorting user roles, writing functional requirement tables, designing normal/exception scenarios, building open questions and an automated email pipeline.
The goal of this textbook is not to ask AI for a "plausible-looking document." It's to turn facts confirmed in the meeting source into traceable requirements, and to make specs developers can use for building and testing.
Explain the difference between one-off chat and Workspace-based work.
Separate roles, features, rules and undecided items from meeting notes.
Write functional requirements in a checkable format.
Design the normal flow together with key exception flows.
Check for source evidence, gaps, contradictions and made-up content.
Combine outputs, get human approval, then share.
This textbook includes lab code and prompt text. Use the [🖨️ Save as PDF / Print] button at the top to keep it as a clean A4 book-style PDF.
In typical generative AI use, people type a one-off prompt into the chat each time and get a short answer. But when building real business software and agent systems, you need more than quick questions and answers: you need 'system design' that keeps the many related files and rules in a project consistent.
| Type | ChatGPT prompt questions | Codex Workspace system design |
|---|---|---|
| Kind of work | One-off Q&A (single conversation) | Continuous project watching and file sync |
| Keeping Context | Depends on each person's prompt skills | Automatic caching and mapping of context across files |
| Output form | Simple text answer | Detailed markdown (MD) files in a local folder |
| Outside connections | Not possible (just chat) | Pipelines connected to outside APIs (Gmail, etc.) |
Context is the bundle of material and rules AI uses for its current judgment. Just because a file is in the Workspace doesn't mean it's all understood correctly. Make file names, latest versions, priorities and forbidden rules clear to reduce conflicts.
For an AI agent to handle business requirements precisely, beyond simple chat, it must go through this 3-stage pipeline.
The stage where all docs in the project (meeting notes, feature specs, business rules) are synced under one set of rules.
Goes beyond writing docs to actually connect with outside APIs and modules (e.g. automatic email).
Produces a detailed markdown doc (`requirements-specification.md`) that makes testing and code generation easy.
Situation: a teammate edited the meeting notes, but AI kept using the old requirements. What should you check first?
You need to check all three. In particular, first writing a rule like "use the latest file, and ask the user if there's a conflict" reduces the risk of AI picking a version on its own.
Simply put, a Workspace is a 'local shared planning folder' you give AI. When you make a lab folder (`automation/`) on your desktop and put related files in it, Codex Client treats the whole folder as its working memory (Context).
• Watching: watches all docs in the folder, like meeting-notes.md and open-questions.md
• Updating together: when one spec changes, updates all linked docs at once without data conflicts
• Consistent reasoning: applies Anti-Hallucination so it doesn't invent content not in the source docs
The raw meeting transcript (`meeting-notes-raw.md`) mixes in small talk and noise, so developers and designers can't use it directly as a spec. So it's essential to first make a plain-sentence key summary of 15 lines or fewer (`step 0`), then catalog it into user roles and feature objects (`step 1`).
| Type | Step 0. Clean up the meeting summary | Step 1. Sort planning objects |
|---|---|---|
| Main purpose | Filter back-and-forth chat and noise | Catalog cleaned info by type |
| Action | Informal summary in 15 plain sentences or fewer | Separate user roles, features, rules and undecided items |
| Output file | Create meeting-notes.md |
Define 4 kinds of planning component objects |
This chapter explains the 6-step lab process from an unstructured customer consultation transcript to the final email sharing pipeline, with the prompt and expected output for each step.
Read the raw transcript (`meeting-notes-raw.md`), remove greetings and small talk, and create clean meeting notes of 15 plain sentences or fewer focused on business requirements.
Input: meeting-notes-raw.md (raw transcript of about an hour of consultation)
Output: meeting-notes.md (cleaned key planning summary of 15 lines or fewer)
"For user convenience, provide easy login and recommendations." Adding features not in the source because they seem like common sense distorts the requirements.
"Customers view experts' available times and book a session. The login method was not decided in the meeting." It separates facts from undecided items.
Based on the cleaned `meeting-notes.md`, separate the service's main user roles, features users perform, features the system performs, business rules and undecided items.
| Category | Example | Reason |
|---|---|---|
| User roles | Customer, expert, admin | Who acts or holds permissions |
| User features | Choose session time | Done directly by the user |
| System features | Send booking confirmation notice | Done automatically when conditions are met |
| Business rules | Booking confirmed after payment succeeds | Conditions and limits of the work |
| Undecided | Cancellation fee rate | Needs approval or more discussion |
Don't put the same item in two categories, and leave a meeting-notes sentence or line number as evidence next to every item. If there's no evidence, move it to "undecided", not "guess".
Using the sorted objects, write clear, short sentences that fit the requirements spec table format.
1. Name the subject: write the subject clearly, like '[The Customer]' or '[The system]'.
2. Clear object: say what data is handled (e.g. expert list, payment method).
3. Same ending: use the same style, like 'must be able to ~' or 'must ~'.
4. Short sentences: put only one feature in each sentence.
"The system must handle bookings well, quickly and conveniently." Fast, convenient and well can't be measured.
"When payment is approved, the system must change the booking status to 'confirmed' and send a notice to the customer and expert." The condition, state change and recipients are visible.
[Actor] must [action] on [input/target] when [precondition], and provide [an observable result].
Developers and testers reading the sentence should picture the same screen and data state.
Design the basic steps that complete normally when users use the service, and the handling flow when exceptions happen, like a card payment failure or server error.
| Flow type | Normal flow (Happy Path) | Exception flow (Edge Case) |
|---|---|---|
| Session booking scenario | Choose expert ➔ choose time ➔ payment succeeds ➔ booking confirmation sent | Card over limit/error ➔ failure message pop-up ➔ prompt to retry payment |
| Expert approval scenario | Submit documents ➔ admin review ➔ approved ➔ profile goes live | Required documents missing ➔ write rejection reason ➔ email asking expert to resubmit |
Turn "the user books a seat" into 1 checkable requirement and 2 exception flows.
Requirement: while logged in, a user must be able to pick an available seat and time and submit a payment request.
Exception 1: if another user pays first and takes the seat, show the latest seat list.
Exception 2: if payment approval fails, don't confirm the booking; show the reason and how to retry.
Organize items not clearly decided in the meeting, like fee policies, refund rules and notification methods, and write a question list doc (`open-questions.md`) you can use right away when interviewing the client.
| What makes a good open question | Example |
|---|---|
| What to decide | What is the refund rate for same-day booking cancellations? |
| Options | A. No refund / B. 50% / C. Operator's choice |
| Impact | Affects billing logic, terms and customer messages |
| Decision maker · deadline | Service lead · before development starts |
Merge all the markdown docs from steps 0–4 into the final combined spec `requirements-specification.md`, and automatically send a report email to the approver through Codex Client's Gmail API connection.
Check that the Gmail plugin at the top right of Codex Client is turned on. Before sending, do a final check that the recipient address (`to`), subject (`subject`) and attachment name in the body are correct.
Create the email as a draft first; a person checks the recipient, attachments, personal data and undecided markers before sending. During the lab, use your own test address instead of a real customer's.
An assignment to define requirements for a platform that connects pet owners with pet sitters.
• User roles: owner (Customer), pet sitter (Sitter), admin (Admin)
• Key features: view care schedules, request a match, pay a deposit, write a care log
• Undecided: same-day refund rate for cancelled care, whether to require pet sitter identity insurance
An assignment to define requirements for an IoT system for study room seat booking and door access control via kiosk and mobile app.
• User roles: user (Student), store owner (Owner)
• Key features: QR code entry/exit control, remaining seat time alerts, study room light/air conditioning control
• Exception flow: automatic late fee and warning alert when check-out time is exceeded
| Review item | Detailed self-check criteria | Result |
|---|---|---|
| 1. Roles | Are users clearly split into Customer, Expert/Sitter and Admin? | [ ] Pass |
| 2. Cause and effect | Is the flow from payment success to booking confirmation and notification clear? | [ ] Pass |
| 3. Undecided items separated | Are pending items like refunds/fees separated out as undecided items? | [ ] Pass |
| 4. Fact check | Were unrelated features not in the source transcript left out? | [ ] Pass |
Pick one of the two topics and write the following files.
meeting-notes.md: 10–15 fact-based linesopen-questions.md: at least 3 questions, with options and impactrequirements-specification.md: at least 6 functional requirements and at least 4 exception flowsWrite requirements using only the notes below. The key skill at work isn't filling blanks with imagination; it's separating facts from undecided items.
Roles: student, owner. The door device can be noted separately as an external system that acts.
FR-01 Students must be able to view bookable seats. FR-02 Students must be able to choose a seat in 2-hour blocks. FR-03 The system must confirm only bookings whose payment is approved. FR-04 The system must allow entry when a valid QR code is checked. FR-05 The owner must be able to change a broken seat to not bookable.
Normal flow: view seats → choose time → payment approved → booking confirmed → QR issued → entry.
Exceptions: payment failure, seat taken while choosing, QR check failure. Network outage handling has no policy yet, so don't decide it yourself.
Undecided: P1 entry policy during network outage, P1 payment method, P2 cancellation fee. The first two block building the core flow, so they're high priority.
| Term | In plain words |
|---|---|
| Context | The range of files, chats and rules AI refers to when making a judgment now |
| Workspace | A workspace that manages related material and outputs as one project |
| Functional Requirement | An observable feature a user or system must perform |
| Business Rule | The conditions, limits and policies under which a feature works |
| Happy Path | The main normal flow that reaches the goal without errors |
| Edge Case | The handling needed at boundary conditions or in failures |
| Open Question | An unsettled item a responsible person must decide before building |
| Traceability | Being able to trace which source and decision a requirement came from |
Good AI use isn't about making nice sentences fast; it's about building a structure where facts and decisions can be traced.