Experimental · timings and targets in the simulation are invented
Semantic Works: Cyber Kitchen: Episode 2: The Workflow
October 2026

Cyber Kitchen:
Episode 2: The Workflow

A restaurant manager with a tablet briefing the staff before service

From a restaurant you can watch to one you can measure: a view of the work itself, with a target and a chart for everything on screen. Built by Pasha and Claude in about two hours.

Dr. Pavel (Pasha) Simakov
About the author
Dr. Pavel (Pasha) Simakov Managing Partner, Semantic Works LLC linkedin.com/in/pavelsimakov

The source for this episode is on GitHub: Semantic-Works-LLC/semantic-works-public

Before the story

Play with it right away

The finished restaurant runs live on the next slide, inside this presentation. Nothing to install, nothing to configure.

Play with it live View the source code on GitHub

You can also see the source code of everything presented here, and how the application runs.

Press ▶ below to play with it. After that, ▶ continues with the story.

What you are about to experience is live.

We built a restaurant simulator, and it is running right now. Close this window, then interact with it:

  • Click a table, a waiter, a cook or an order ticket to see what it is and how it is doing against its target.
  • Switch views with the button beside the magnifying glass: this flow of work, or the restaurant floor.
  • Change the staff in the flow view with the minus and plus buttons, and the speed with 1× to 16×.

When you are done, press ▶ below to see how it was built.

Close View the source code on GitHub
0:00 · Turn 1

We started from Episode 1's restaurant

Look around the project, start the local server, and let's see the Cyber Kitchen in operation before we go on.Pasha

Episode 1 left an animated floor plan: twelve tables, two waiters, two cooks, tickets on a rail and plates on a pass, with every object clickable.

It shows the restaurant as a room. You can watch it get crowded, but nothing on the page says where the time goes.

We copied it into a new folder, so Episode 1 stays as its own record.

Episode 1's floor plan running, 36 simulated seconds in
Where Episode 2 began.
0:03 – 0:05 · Turns 2 – 4

Pasha asked how to model the flow of work

… add another view: a graph of the flow of work. I need your help, because I don't know exactly how to model it. Some things are stationary, like tables and stoves, and some move, like guests, waiters and food. How should I model this as a flow of work so that I can optimize the flow later?Pasha, lightly trimmed

Claude's recommendation, given in chat before any building: model the work, not the movement.

RoleWhat it isIn the restaurant
Flow itemThe thing that travels and gets finishedA party, which becomes an order ticket, which becomes plates
StepSomething that happens to the item, or a place it waitsAt the door, reading the menu, ticket on the rail, cooking, eating
ResourceLimited capacity a step needs before it can startTables, waiters, cooks, stoves, the pizza oven, the coffee machine

Waiters and cooks are resources, although they move. Food stays a stage of the order and not a separate item, because here one cook makes a whole order and it goes out together.

0:07 – 0:14 · Turn 5

First, we built a flow graph

A new button flips the page between the restaurant and a second view. Both draw the same running simulation, and a selection made in one is kept in the other.

While this was being built, Pasha asked for no new tests and no test runs, to move faster.

I'm not sure I like the model you built, visually.Pasha
A loop of twelve step boxes with a resources panel in the middle
Attempt 1: the flow graph.
0:16 – 0:20 · Turn 6

Then, a status board

Pasha described three sections, and we built them as a board of cards:

The same button now cycled through three views.

I like the third view, but I'd like to see more motion.Pasha
A board with three sections of cards: tables, kitchen, and people and equipment
Attempt 2: the status board.
0:23 – 0:27 · Turn 7

We added arrows and motion to the board

Claude could not look at this one: the browser pane was hidden, so it was checked only from inside the page. Pasha looked, and the board did not hold up.

I have difficulty understanding this view.Pasha
The status board with arrows between the top boxes and a return line below them
The board with arrows and gliding chips.
0:27 – 0:31 · Turn 8

Then, a workflow from left to right

Pasha asked for something generic: things start on the left and complete on the right, with nothing tied to the room.

This view is much better. I'm surprised the cook does not put the food into the "food on pass" state … "food on pass" may not be a state of the table. Maybe it's a queue, which we should represent differently.Pasha, lightly trimmed
A row of twelve step boxes with four lanes below and a few markers in them
Attempt 3: the workflow, left to right.
0:31 – 0:34 · Turn 9

We drew queues differently from steps

This is where the model settled: a step is where something happens, and a queue is where things wait for someone.

The workflow with dashed orange queue columns and a wide dashed area for guests waiting for food
Attempt 4: the same workflow, with queues as columns.
0:36 – 0:38 · Turn 10

The fifth attempt was the one we kept

The idea was Pasha's: the party's states as the foundation, with the two queues modelled as things of their own.

Pasha's description got stuck on how a cook moves food between states. In this layout the cook never touches a party state: the cook moves only between the two queues, and the waiter connects the party to them.

This view is perfect.Pasha
Party state boxes along the top, two dashed queues below, and a Cook box with four slots
Attempt 5: the service view, in its first form.
0:39 – 0:43 · Turns 11 – 12

We deleted the other views and made selection work in both

The service view with a tables panel and a waiter ringed in cyan
Everything on the floor can now be selected here too: a Tables panel, a slot for each piece of equipment, and the selected waiter ringed in cyan.
The restaurant floor with table 5 glowing cyan
Removing three views also removed the selection glow, by mistake. It came back in cyan, a colour used for nothing else.
0:43 · Turn 12

Pasha set a rule: only what was asked

You made some changes I didn't ask for. Please be careful and follow my instructions. I accept these changes as they are, but keep this in mind for the future.Pasha

He was right. In fixing the selection, Claude had also done four things nobody asked for:

They stayed, as Pasha said. From then on Claude made only the requested change and listed anything else as a suggestion for Pasha to decide.

0:46 – 0:50 · Turn 13

We gave every object a measure and a target

The about card became static text. Under it, each object got a metrics card:

The 80% limit for kitchen equipment is Pasha's. Every other target is Claude's judgement, set near what the simulation produces.

Pasha also asked for 8× and 16× speeds, just to see.

The service view with the pizza oven selected and its metrics card showing 48%
The pizza oven: in use 48% of the time, within the 80% limit.
0:52 · Turn 13

The numbers started to say something

With the clock at 16×, the front door's card after 35 simulated minutes:

Each bar in the chart is one party, green within the target and red over it.

These figures come from invented timings. What is real is that the page can now say where the waiting is.

The service view with At the door selected and its metrics: 0:32 on average, a little over target
"At the door" selected.
0:52 – 0:58 · Turns 14 – 16

We added charts on clock time

The first charts were ordered by party, not by time. Pasha asked for a second chart under each, on real clock time:

In the same stretch, "Wait for food" got a card of its own, the page went down to one legend shared by both views, and the prep counter, sink and fridge left the service view.

Wait for food selected, with a bar chart and below it a clock-time chart with a yellow now line
"Wait for food" selected: 1:32 on average against a 1:00 target, with one bar per order on the clock below.
0:59 – 1:00 · Turns 17 – 18

Pasha asked where the targets came from

How did you set the targets? Are they just random numbers, or something better?Pasha

Not random, but not much better. Apart from the 80%, each was picked by judgement to sit near what this simulation produces.

TargetValueWhere it came from
Equipment in useAt most 80%Pasha's number
Waiter or cook busyAt most 85%A guess at "almost always busy"
Ticket on the railAt most 0:15One short wait for a free person
Food on the passAt most 0:10Short on purpose, because food goes cold there
Order taken to servedAt most 1:00A round number near the average in test runs

The simulation's seconds are not restaurant minutes, so none of these says anything about a real dining room. Better targets would come from the owner's service standard, or from times measured on a real evening.

1:04 – 1:07 · Turn 19

We added buttons to change the staff

The service view with minus and plus buttons above the waiters and cooks boxes
Minus and plus above "Waiters, free" and "Cooks, free", from zero to six of each, while the simulation runs.
The service view with one waiter: eight tables orange, wait to order highlighted
With one waiter and four cooks, the tables turn orange: orders are not being taken, and "wait to order" averages 1:17 against a 0:15 target.
1:14 – 1:18 · Turn 20

We split the code into modules, with a build step

Until now all the JavaScript sat inside the HTML file. Pasha asked for small modules, built back into one standalone page.

PathWhat it is
js/23 small files, one per area: staff, guests, orders, metrics, charts and so on
index.template.htmlThe HTML and CSS, with one marker line where the JavaScript goes
build.pyCopies the files into the template and writes the page
site/index.htmlThe built page: still one standalone file

Every file goes in byte for byte, and the build checks that.

An editor's file list showing the js folder with its module files
The js/ folder in Pasha's editor.
1:20 – 1:52 · Turns 23 – 24

We built the test suite in one go, at the end

SuiteTestsCoverage
Python server20100% of server.py
Browser tests of the page191100% of every module (1368 lines)
Total211, all passing
A terminal summary: 68 tests, 59 passed, 9 failed, 83% of lines covered, with coverage listed per module
The starting point: Episode 1's 68 tests run against the new page. Nine fail, and 83% of lines are covered.
2:00 · Finished

What we ended up with: the service view

The same restaurant, drawn as work.

The finished service view 2:30 into service
The finished service view, 2:30 into service.
2:00 · Finished

What we ended up with: metrics

The order rail selected, with its metrics card and two charts
Click a queue: how long things wait there, against the target, party by party and on the clock.
A ticket selected, with its stages as bars and its journey on the clock
Click a ticket: where its time went, stage by stage.
The result

The restaurant as work, measured, on one page.

It's all done!!! See where every order waits, check anything against its target, and change the staff to watch the queues move.

Two viewsThe room and the work, drawn from one running simulation. One button flips between them.
Queues you can seeThe order rail and the pass are things of their own, so a pile-up shows the moment it starts.
A target for everythingEach object has an objective, a number and a green or red verdict.
One clockEvery chart shares the last three minutes and a yellow "now" line.
Try the staffingZero to six waiters and cooks, changed while it runs, at up to 16× speed.
Still one file23 modules built into one standalone page. No libraries; opens straight from disk.
The finished service view with the order rail's metrics open

You can run it yourself in a minute, with nothing to install but Python.

0:00 – 2:06 · The whole conversation

What it took in tokens

Counted from the session's own log: 49.4 million tokens across 151 requests to the model, all Claude Opus 5.5.

KindTokensWhat it is
Re-read from cache48,627,115The conversation so far, read again on every request. This is 98.4% of the total and is billed at a small fraction of the normal rate.
New input454,672Text entering the conversation for the first time: Pasha's messages, tool results, files and screenshots.
Output322,243Everything Claude wrote: answers, code, commands and its working notes.
Total49,404,030

The total is large because of how a long conversation works, not because much was written. Each of the 151 requests re-reads everything before it, so the same text is counted again and again: on average about 322,000 tokens of history per request. Not included: the next morning's wording changes to the README and the commit.

Other statistics

29turns of conversation
5 / 1views tried and kept
23JavaScript modules
211tests, 100% coverage
If bought as API calls, with no subscription

What that would cost in dollars

About $19.80 on Claude Opus 5.5, the model that ran the session.

ModelRough costNotes
Claude Opus 5.5about $19.80What we used: $9.73 for cache re-reads, $3.64 for new input, $6.44 for output.
Claude Sonnet 5.5about $14.80The same token counts at Sonnet's prices. Its cache-read price is the same as Opus.

Caching is what keeps this small. With no caching, every re-read would be billed as fresh input: about $203 on Opus 5.5.

Open

What is not done

The conversation that built the page, with Pasha's words as spoken, is in TRANSCRIPT.md.

The story of the floor plan it started from is in Episode 1.

Follow the Episode 1 journey

Thank you for your interest

Want to see more?

There is more from Semantic Works to explore.

See our public projects

Dr. Pavel (Pasha) Simakov
About the author
Dr. Pavel (Pasha) Simakov Managing Partner, Semantic Works LLC linkedin.com/in/pavelsimakov

Happy vibe coding with LLM AI!