Part 2 begins. You look at Codex's built-in plan mode once, then let the grill skills interview you in two rounds about auctions, bids and users. At the end you approve the build slices and Codex starts writing the first one.
~/codex-course/workshop, and the workshop project is open in Codex. Part 1 can keep running in its terminal; Part 2 uses different ports.auction_part_2) inside the same Postgres container.Every new task gets a new chat. That is a habit I want you to build from today, so we start Part 2 in a fresh conversation even though the workshop project already has one from guide 7.
In the Codex sidebar, under Projects → workshop, click New chat. Above the message box you should see the chips workshop and Local (and your branch name). Under the message box, the model picker should say 5.6 Sol Medium and the approvals button Approve for me. If either is different, click it and fix it now, before the long run starts.
A model does not read words; it reads tokens, small chunks of text roughly three-quarters of a word long. Everything in a chat, your messages, Codex's replies, every file it opened, every command output, is converted into tokens and sent to the model again with each new turn. The total amount it can hold at once is the context window. When a chat grows long, three things happen: each turn costs more (you pay for all those tokens again), the model gets slower, and it starts to lose track of early details because the window is crowded. A fresh chat per task keeps the window small, focused and cheap. Codex still knows the project, because AGENTS.md and the files are always there.
An empty chat that asks “What should we build in workshop?” with no earlier messages above it.
If you see a ⚡ symbol in front of the model name, the Speed setting is on Fast. Fast costs more per token and we do not need it; click the picker and set Speed to Standard.
Before we use the grill skills, I want you to see what Codex offers out of the box, so you can judge the difference yourself. Type /plan in the message box and pick Plan mode – Turn plan mode on from the menu that pops up. Do not send any message.
/plan
Plan mode is a built-in Codex mode where the agent is only allowed to think and write, not to edit files or run commands. You describe a task, it reads the codebase and comes back with a step-by-step plan for your approval. The intention is good: define the feature before building it. The weakness is that it mostly plans from its own assumptions; it asks you few or no questions, so the gaps in your request stay gaps in the plan. For a well-understood task it is fine. For a new feature with real design decisions (who are the users? how is money stored? what happens when two people bid at once?) I want a tool that interrogates me first. That is what grilling does, and it is why plan mode stays off for the rest of this course.
Look at the message box, then turn plan mode back off: click the Plan chip that appeared under the message box, or type /plan again and pick the “turn off” option.
While it is on: a Plan chip next to “Approve for me”, and the placeholder text in the box changes to “Describe your task to generate a plan…”. After you click the chip: the chip disappears and the message box is back to normal, with the usual placeholder.
If your Codex version does not show Plan mode in the / menu, skip this step entirely. Nothing in the course depends on it.
We are about to rely on the grill skills for a long run, so confirm they are available first. Type /grill in the message box and do not send it. Codex filters its skill list to the ones whose name matches what you typed.
/grill
Grilling flips the usual order. Instead of you writing a long prompt and hoping you covered everything, the agent interviews you: it reads the code, works out what is undecided, and asks numbered questions in rounds, each with options A / B / C and a recommended answer. You answer, it asks the next round, and when nothing is left open it writes the agreed design down and proposes slices to build. The value is that every design decision is made deliberately, by you, before a single line of code exists. Without this, the model makes those decisions silently, you discover them only when the code is wrong, and you pay twice to fix them. Grilling costs tokens up front and saves many more later.
What the three skills do:
~/.agents/skills/grilling/SKILL.md; open it in VS Code when you have a minute, it is just a Markdown file telling the model how to behave.CONTEXT.md, docs/adr/…) inside the part's folder. Its instructions are in ~/.agents/skills/grill-with-docs/SKILL.md. This is the one we use.An ADR is a short text file that records one decision: what we decided, what the options were, and why we chose this one. For example: “Money is stored as integer cents in USD. Options: floating point dollars, decimal type, integer cents. Chosen: integer cents, because floating point rounds and the app is USD only.” Teams keep ADRs in a docs/adr/ folder so that six months later nobody has to guess why the code looks the way it does. For us they have a second use: Codex reads them in future chats, so the decisions you make today keep steering it in guides 9 and 10 without you repeating yourself.
Delete /grill from the box when you have seen the list. If the skills are missing, reinstall them with the command below, in the Terminal app:
npx skills@latest add schneidenbach/skills
As in guide 5: tick exactly domain-modeling, grill-me, grill-with-docs, grilling, choose scope Global and method Symlink. Then quit Codex fully (Cmd+Q) and reopen it, because Codex only scans the skills folder on startup.
Three entries above the message box, each marked Personal: Grill Me (Sharpen a plan through interview), Grilling (Stress-test thinking a round of questions at a time) and Grill with Docs (Grill a design and write its docs). “Personal” means the skill came from your own ~/.agents/skills folder, not from the project.
Now the real work starts. Read the prompt before you paste it, because every phrase in it is doing a job:
/ menu.I want to add on the ability to post auctions and make bids. these should be stored in the postgres database (see the docker compose file - that's where the database should live). GRILL ME with DOCS! we're working out of folder 2 - copy the files from folder 1 and build off of those in folder 2
Why both paragraphs in one message? If you send only the first, Codex reads the project, notices that folder 2 is empty, and stops to ask where it should work. That is a wasted turn and wasted tokens. Telling it up front gets you straight to the questions. Press Enter to send.
The status Working for … with a running timer, then a short opening statement similar to: “I'm using the grilling skill to stress-test the auction and bidding design against the existing docs and code in Part 1… I'll run at most two focused rounds of 8–10 questions before proposing 2–4 browser-reviewable vertical slices. I'll hold off on copying or implementing until you confirm those slices.”
After about a minute, during which Codex reads docker-compose.yml and the Part 1 code, it posts Grilling round 1 — Product and domain boundaries. You get about 8 numbered questions (❓ Q1, Q2…). Each has options A / B / C and a ➡️ Recommendation line. Nothing has been copied or built yet; folder 2 is still empty.
Click the small caret next to Working for … to expand what Codex is reading and thinking. You will see it open the compose file, Part 1's AGENTS.md and the server code. The “8–10 questions” and “2 rounds max” limits it mentions come straight from the workshop's root AGENTS.md you read in guide 7; that is the file doing its job.
Cost: two grilling rounds plus the Slice 1 build is the biggest run so far. Slice 1 alone ran for about 9 minutes in my run on Sol. Check platform.openai.com → Usage afterwards if you are watching your spend.
Read every question properly. Your questions may be worded, ordered or numbered differently from mine, because the model is not deterministic, so match them by topic and make the same decision. Here is what I decided, and why:
users table with 10 seeded users and a small user switcher at the bottom of the page. No real login. Why: real authentication (passwords, sessions, sign-up) is a whole project of its own and teaches nothing about auctions. A switcher lets us act as different bidders in seconds, which we need badly in guides 11 and 12.1845000. Never store money as a decimal number like 18450.00 in a floating-point column: computers cannot represent many decimals exactly, and you end up with bids of $10.000000001. Whole integers never round.Seed data is the starting content a database is filled with when it is created: our 10 users and 6 hardware items. It is written as a script that runs after the migrations, so every fresh database, on every machine, starts with the same rows. Without seeds a new database is empty and the app looks broken. Seeds are also what makes a “reset” meaningful: drop everything, run migrations, run seeds, and you are back to a known state.
Type your answers as one message, one line per question. Use the block below as a template and change the numbers if your questions are numbered differently.
1. the actors are predefined users - go ahead and make a users table as well with 10 user records seeded. at the bottom of the page, add a small switcher so we can switch between users well. 2. take recommend 3. take recommend 4. take recommend 5. a 6. a 7. a 8. please explain this to me better
Shortcuts I use when answering:
take recommend means “go with your recommended option”. Codex understands it.a, b, c) picks that option. Codex also accepts the compact form “1A, 2B…”.take recommend is fine unless it clashes with one of the decisions above. If it clashes, write a sentence stating the decision in your words.If you type instead of pasting: Shift+Enter starts a new line, Enter sends. Pressing Enter after the first line sends an incomplete answer.
Codex sums up what is settled, similar to: “Locked so far: ten seeded users with a persistent page-bottom user switcher, immediate publication, required listing fields, category-based illustrations, UTC closing timestamps, integer USD cents, and a fully database-backed catalog seeded from the six existing items.”
Then it explains reset: only an explicit npm run db:reset wipes Part 2. It drops only the auction_part_2 database, recreates it, runs all migrations and restores the seed data. A normal npm start or a container restart keeps everything. Part 1's database is never touched. Below that comes Grilling round 2 — Interaction and rules.
I find the recommendations right 80–90% of the time, and I still read every single question. “Take all recommends and go” works too, but I almost never do it, and when I have, I have usually regretted it: the 10–20% it gets wrong are exactly the decisions that are expensive to undo later.
Same approach: match each question by topic, not by number. Round 2 is about how users interact and what the rules are. My decisions:
auction_part_2 is dropped and rebuilt. This is the follow-up to my “explain this better” in round 1.localStorage, starting with the first seeded user. localStorage is a small key-value store inside the browser that survives page reloads, so your chosen user stays selected when you refresh. We change this in guide 9 to a random user per browser tab, for reasons you will see then./auctions/new. After posting, you land on the new auction's own page.Q12 says the minimum-bid rule is checked “in the API and not only in the browser”. Browser checks are for convenience: they give instant feedback and save a round trip. But anyone can bypass the browser and send a request straight to the API with a tool like curl, or simply have an old page open. If the rule lives only in the browser, a bid of $0.01 above (or below) the current price gets through. The API is the only place every request must pass, so every business rule is enforced in the API; the browser copy is a bonus. This is one of the most important habits in backend engineering, and the AGENTS.md rule “validate inputs” is about exactly this.
9. a 10. a 11. a 12. a 13. a 14. a 15. a 16. a 17. b
Working for …, then a summary similar to: “We have a shared design. No implementation has started yet; Folder 2 remains untouched. The final product decisions will be recorded in Folder 2's GRILL.md:” followed by a bullet list of the decisions above (ten seeded users, footer switcher, sellers cannot bid on their own auctions, bids at least $1 higher, db:reset restores users and auctions, and so on). Read that list once and confirm it matches what you meant. This is your last cheap chance to correct a misunderstanding.
If your options are ordered differently, do not type my letters blindly. For each question, pick the letter that means the same decision as in the list above. If a decision you want is not offered at all, write it out in a sentence; Codex accepts free text alongside letters.
Scroll through the rest of Codex's reply. Below the decision list there is a diagram. Click it to open it full size; the viewer has zoom buttons in a corner.
A Mermaid diagram is a flow chart written as plain text, a few lines like flowchart LR and Web --> API, which Codex renders into boxes and arrows. The root AGENTS.md asks Codex for one after every grilling session, because a picture of “who talks to whom” is the fastest way to check that the model's understanding of the architecture matches yours.
Then read Proposed vertical slices. Each slice is one thin end-to-end piece of the feature (database → API → UI), and each one ends with a Browser checkpoint: a concrete thing you can click in Chrome to confirm the slice works before the next one starts. That checkpoint is your review gate.
A diagram similar to this: inside a box React/Vite Web App :5102, Active predefined user → Footer user switcher → localStorage (active user ID). Three screens, Catalog and search, Auction details and bid history, and Post auction, each call Fastify API :3102 over HTTP, and the API stores users, auctions and accepted bids in PostgreSQL auction_part_2. Note the new ports: Part 2 gets 5102 and 3102, so it can run alongside Part 1.
Then slices similar to:
The reply ends with: Reply “approve the slices” to authorize Slice 1, or tell me what you want rearranged.
Got different slices, or four instead of three? That is expected and perfectly fine, as long as you have 2–4 slices, each with a browser checkpoint, and together they cover users, posting and bidding. If a slice is missing something you decided (for example, no bid history anywhere), say so now in a sentence before approving.
Send the approval. This is the moment Codex is allowed to touch files. It builds one slice, checks it with tests and a browser run, then stops and waits for you before starting the next one. You stay in control at every boundary.
approve the slices
Codex starts Slice 1, with an opening like: “Slice 1 is underway. I'll first copy the Part 1 application into Folder 2 while excluding installed dependencies and historical build logs…” A to-do list appears above the message box, showing progress such as Step 1/4:
Each item gets ticked as Codex finishes it.
Slice 1 ran for about 9 minutes in my run. Let it work; do not send more messages into this chat while the timer is running, because a new message interrupts the current task. Guide 9 continues in this same chat once Slice 1 reports done.
While Codex works, it helps to see what it is actually doing on disk. The to-do list above the message box comes from the Codex app itself (the “harness” that wraps the model and gives it tools), not from the model's text, so it is a reliable progress indicator. To see the files, open the workshop in VS Code from the Terminal app, then expand part-2-create-auction-and-bid in the Explorer.
code ~/codex-course/workshop
If VS Code is already open on the workshop from guide 7, this just brings that window to the front. Files Codex creates show up in the Explorer within a second or two, with the usual green “new file” colour in the tree.
part-2-create-auction-and-bid filling up with a copy of Part 1: AGENTS.md, GRILL.md, README.md, package.json, server/, web/. In my run, Codex sensibly left out Part 1's node_modules (it reinstalls them), CODEX.md and codex-logs/. After the copy, Codex keeps editing files inside that folder: a new migration under server/, a seed script, new API routes, and changes to the React pages.
Open part-2-create-auction-and-bid/GRILL.md as soon as it appears. It is the written record of everything you decided in Steps 5 and 6. If something there is wrong, you want to know now, not after Slice 3.
Start over: if grilling went off track, or Codex started building something odd, stop it with the ■ button to the right of the message box. Empty folder 2 with the first command below, then start a new chat and send the Step 4 prompt again. Starting over costs a few minutes; building on a wrong foundation costs hours.
cd ~/codex-course/workshop && rm -rf part-2-create-auction-and-bid && mkdir part-2-create-auction-and-bid
That line moves into the workshop, deletes the Part 2 folder with whatever is in it, and creates it again empty, which is exactly the state the Step 4 prompt expects.
Catch up: the second command replaces your Part 2 with the reference copy's version. Be aware that it is the end state of the whole part: all three slices done, plus a bidding-war test that we add in guide 12. If you use it, you skip the build steps in guides 9 and 10 and only do their browser checks (run it with npm install and npm start inside that folder).
cd ~/codex-course/workshop && rm -rf part-2-create-auction-and-bid && cp -R ../reference/part-2-create-auction-and-bid ./ && git add -A && git commit -m "Catch up: part 2 from reference"