この記事の図の多くと依頼文は、英語で記録したものです。
2026-10-06に、CodexをMCPでLaydyneにつないで実行したユースケースです。診療所・要件・試算に与えた数値は架空です。以下の結果はすべて実行ログから取った値です(facts.json)。
誰が、何をしたいか
小さな設計・内装事務所が、既存ビルの1階に地域の診療所を開く医師に向けて、最初の提案を準備しています。来週、施主との打ち合わせがあります。持っていきたいのは次のものです。
- 要件に合い、議論の土台になる最初の配置
- それが成り立つ根拠:通路幅、車椅子の経路、混む午前に待合が足りるか
- 同じ条件で試した別案1つと、採る・採らない理由
- 縮尺付きの図面、部屋の面積、打ち合わせ用に残した案と経緯
マウスで家具を動かすことはしません。自分のAI(ここではCodex)に文章で頼み、AIが、開いているLaydyne Studioのタブで作業します。
手元にあったもの:要件の文章だけ
図面も実測もありません。区画は21 × 15 mで、動かせない柱が4本、道路側がガラス面、奥に通用口があります。要件は、診察室4、処置室、操作室付きのX線室、スタッフ室、多目的トイレと一般トイレ、車椅子2台分と子どもコーナーのある約20席の待合、2人用の受付カウンターです。医師からは、月曜午前の概算も聞いています。開院直後は1時間に約24人、その後は少なめ、医師2人、診察は数分ずつ、というものです。
流れ
依頼文は6つで、それぞれ別のCodexセッションで実行しました。セッションの間も、作業はStudioのタブに残ります(案件、配置案、保存した工程案、比較)。そのため、各依頼文には次にしてほしいことだけを書いています。
手順
1. 要件から最初の配置へ
要旨:区画の寸法・柱・出入口と、部屋ごとの要件を伝え、壁・扉・室名・主な家具を配置し、2Dと3Dを見せ、仮定した寸法を挙げるよう頼む。
I'm an interior architect preparing a first proposal for a new neighbourhood clinic. I only have the brief below, no drawings yet. Please build a first layout in Laydyne, in the Studio I have open (start a fresh project called "Linden Street Clinic").
The unit: ground floor of an existing building, a rectangle 21 m wide along the street (south side) and 15 m deep, clear height 3.0 m. Glazed shopfront on the street side with the entrance in the middle (1.8 m automatic sliding door). A staff/service door in the back (north) wall near the east corner. Four existing columns, 0.5 × 0.5 m, centred at x = 7 m and x = 14 m on the lines 5 m and 10 m back from the street front. They can't move.
Brief (2 doctors, 2 receptionists, 2 nurses, a part-time radiographer):
- Entrance with a wind lobby and room to park a wheelchair and a buggy
- Reception and payment counter for 2 staff, visible from the entrance and the waiting area
- Waiting area: about 20 seats, 2 wheelchair spaces, a small kids' corner
- 4 consultation rooms, about 3.0 × 3.6 m each: desk, doctor's chair, patient chair, exam couch, hand basin
- Treatment room about 4 × 4 m with 2 couches (injections, drips)
- X-ray room about 4 × 4.5 m with a small control area (shielding is the specialist's job, just note it)
- Staff room with lockers and a small kitchenette
- Toilets: one accessible WC (at least 2.0 × 2.0 m inside) and one standard WC
- Corridors at least 1.5 m wide for wheelchairs, doors at least 0.9 m clear
Lay out the walls, doors and rooms (label each room with a floor zone), place the main furniture, and show me the 2D plan and a 3D view. Tell me which sizes you assumed.
Codexは案件を作り、壁・引き戸・室名つきの区画・家具を約30 KBの変更1つにまとめました。apply_changes の予行(dry-run)を2回行ってから反映し、平面図で確かめ、check_space の指摘(X線操作室の扉の前の椅子、スタッフ室脇の細い隙間)を直して、もう一度描きました。仮定した寸法も挙げています。診察室3.0 × 3.6 m、処置室4.0 × 4.0 m、多目的トイレ2.4 × 2.4 m、一般トイレ1.8 × 2.4 m、風除室4.2 × 2.8 m、室内の扉は有効幅1.0〜1.2 m、外壁200 mm・間仕切り150 mmです。


315 m²に部品169個を、469秒・ツール呼び出し32回で作りました。失敗した呼び出しが1回ありました(1回の変更で同じ壁を更新と削除の両方に入れた)が、次の呼び出しで直っています。
2. 人に見せる前に確かめる
要旨:重なり・0.9 m未満の通路・ふさがれた扉を直し、通路1.5 m、多目的トイレ内の直径1.5 mの回転、入口から各室への車椅子の経路を確かめ、Laydyneが確かめたことと確かめられないことを説明するよう頼む。指摘がなくなったら要件を案件に保存し、「A: shared reception counter」として配置案を保存する。
Before I show the clinic layout to anyone, please check it in Laydyne (the Linden Street Clinic is open in my Studio).
Run check_space and fix overlaps, passages narrower than 0.9 m and blocked doors. I also need the accessibility basics: corridors 1.5 m clear, a 1.5 m turning circle inside the accessible WC, and a wheelchair user able to get from the entrance to every consultation room, the treatment room, the X-ray room and the accessible WC (use a wheelchair-sized route check if Laydyne has one). Tell me plainly what Laydyne checked and what it cannot check (I will still do the code review myself).
When it is clean, save the brief with the project, save this layout as design option "A: shared reception counter", and save the project in the browser.
check_space の指摘は最初27件で、すべて5〜75 cmの狭い隙間でした。多くは、壁から少し離れて置かれた家具です。Codexはそれらを動かしてから、幅0.9 m(半径0.45 m)の移動体で、入口から診察室4室・処置室・X線室・多目的トイレと途中の扉まで、16か所の経路を確かめました。すべて到達できました。直径1.5 mの円での確認で、多目的トイレ内の回転スペースも確かめています。要件を保存し、配置案A(部品170個、指摘0件)を保存しました。

Codexは限界も明確に述べています。これはモデル上の形状の確認であり、車椅子の実際の軌跡、扉の操作、移乗、機器への近づきやすさ、法令適合は確かめていない、という説明です。
最初の実行で起きたこと。 この依頼文の最初の実行では、Codexが保存の前に止まりました。便器の脇の隙間3件が、主要な「狭い通路」として報告されたためです。そのうち多目的トイレの便器と側壁の0.25 mは、手すりに手が届くための意図した寸法です。さらに、便器を壁から0.65 m離すよう勧める改善案まで出ていました。Codexは、これを例外として残すか尋ねました。現在のLaydyneは、便器・小便器・洗面台の脇で人が通れない幅の隙間を、器具を使うための空間として扱います。また、確認済みの指摘が残っていても案を保存してよいことを、ツールの説明に明記しました。ここに載せたのは、その修正後に同じ依頼文で実行した結果です。
3. 混む午前を試算する
要旨:医師の概算(到着は9〜10時に毎時24人、10〜11時に16人、11〜11時半に10人。受付1〜3分、診察4〜12分(多くは7分)、処置20%・5〜15分、X線10%・5〜10分と再診2〜4分、同じカウンターで会計1〜2分、受付2人が兼務)で午前を何度も実行し、各待ち・滞在時間・職種ごとの忙しさ・待合のピーク人数を20席と比べ、工程案として保存するよう頼む。
Next I want to see how layout A copes with a busy morning, using Laydyne's process simulation. These numbers are the doctor's rough guesses, not measurements:
- Doors open 9:00, last check-in 11:30. Patients arrive at random: about 24 per hour from 9:00 to 10:00, 16 per hour from 10:00 to 11:00 and 10 per hour from 11:00 to 11:30.
- Everyone checks in at the reception counter (1 to 3 minutes), then waits in the waiting area.
- They see one of the 2 doctors in a consultation room: 4 to 12 minutes, usually about 7.
- About 20% then go to the treatment room with one of the 2 nurses (5 to 15 minutes).
- About 10% are sent by the doctor for an X-ray with the radiographer (5 to 10 minutes) and come back for a short second look by a doctor (2 to 4 minutes).
- Finally everyone pays at the same reception counter (1 to 2 minutes) and leaves. The 2 receptionists do both check-in and payment.
Run the whole morning several times and show me: the waits for check-in, for the doctor and for payment, the time from arriving to leaving, how busy each kind of staff is, and how many people are in the waiting area at the peak compared with the 20 seats. Save the setup and result as a process option for layout A so I can compare later. Say which inputs I should measure in a real clinic before trusting the numbers.
Codexは工程カタログを読み、シナリオを書きました。到着率は毎時24・16・10人、職員は資源、診察は医師と2室のどちらか、処置とX線は重み付きの分岐、場所の間の移動は平面図上の経路です。同じ乱数で20回の午前を実行し、工程案として保存しました。
| 指標(20回の午前の平均) | 結果 | 午前ごとの平均の範囲 |
|---|---|---|
| 受付の待ち | 17秒 | 7〜44秒 |
| 最初の診察までの待ち | 29.5分 | 10.1〜65.1分 |
| X線後の再診の待ち | 29.8分 | 7.8〜64.0分 |
| 会計の待ち | 8秒 | 2〜15秒 |
| 来院から帰るまで | 48.8分 | 27.8〜84.1分 |
医師は、最後の患者が帰るまでの時間の92%がふさがっていました(Codexの定義。Laydyne自身の比較では、終盤の空いた時間も含む6時間全体で52%)。受付は39%、看護師は22%、放射線技師は17%です。待合のピークは平均15.1人で、6〜32人の幅がありました。20回中4回は20席を超え、最も多い午前では12席足りませんでした。最後の患者が帰るのは平均12時22分です。
つまり、詰まりの原因は医師であり、待合は平均的な午前には足りても、悪い日には足りません。Codexは、この数値を信じる前に実測すべきものも挙げました。実際の到着(開院時の行列を含む)、診察時間と入れ替え、処置とX線の割合、職員の休憩や他の業務、付き添いと座席の使い方です。
Codexはカタログを5つ同時に読もうとし、うち2つが「busy」(タブの同時処理は3件まで)で返されたため再試行しました。160秒、22回でした。
4. 同じ条件で案Bを試す
要旨:会計を出口近くの窓口に分け、受付と会計に1人ずつ置く案Bを、案Aを起点に作り、通路と車椅子の条件は保ったまま確かめて保存する。配置を compare_design_options で比べ、同じ到着・乱数・回数で午前を実行して compare_process_options で比べる。医師2人で診察室を5室にする効果と、ばらつきを超える差がどれかも尋ねる。
Let's try an alternative under exactly the same conditions as the morning run for layout A.
Option B: give payment its own window near the exit, so check-in and payment don't share one queue: one receptionist on check-in at the reception counter, one on payment at the new window. Change the layout for that (start from design option A), keep the corridors and accessibility as they are, run check_space, and save it as design option "B: separate payment window". Compare A and B with compare_design_options and tell me what changed.
Then run the same morning on B with the same arrivals, seed and number of runs, save it as a process option, and compare A and B with compare_process_options. The doctor also asked whether a fifth consultation room would help with only 2 doctors; answer that from the model too if you can. Tell me which differences are real and which are inside the noise.
Codexは案Aを復元し、風除室の出口側に低いカウンター付きの会計窓口を加え、受付カウンターを短くし、椅子を1脚動かしました。compare_design_options の結果は、追加2・移動3・変更5・不変165です。指摘は0件で、経路はすべて到達できるままでした。


続けて、案Bで同じ午前を同じ乱数(20261006〜20261025)で実行し、乱数ごとに対にして比べました。
| 指標 | 案A | 案B | 20組の対の差 |
|---|---|---|---|
| 受付の待ち | 17.5秒 | 113.6秒 | +96.1秒。20組すべてで悪化(+29〜+314秒) |
| 会計の待ち | 8.3秒 | 12.2秒 | +3.9秒(−11〜+13秒) |
| 最初の診察までの待ち | 29.5分 | 28.3分 | −74秒(−267〜+2秒) |
| 来院から帰るまで | 48.8分 | 48.8分 | +0.3秒(−36〜+47秒):差なし |
| 診た患者数 | 44.25人 | 44.25人 | 差なし |
| 患者全員の歩行距離(1午前) | 4,303 m | 3,518 m | −785 m(−1,178〜−497 m) |

受付と会計を2人で兼ねると、1本の列を2人でさばく形になります。これを1人ずつの2本の列に分けると、受付の待ちは伸びます。一方、院内にいる時間は変わりません。それを決めているのは医師だからです。案Bで減るのは歩く距離で、時間ではありません。5室目についてCodexは、モデルから答えました。診察室の待ちはどの回も0でした(シナリオでは医師2人をそれぞれ2室のどちらかに組み合わせている)。そのため、部屋を増やしても診察の待ちは縮まない、という答えです。5室目を別に試算してはいません。
190秒、20回、失敗なしでした。
5. 判断と、詳細づくり
医師は案Aを選びました。次の依頼文です。
要旨:受付と会計を2人で兼ねる案Aに決まったので、打ち合わせ用に、各室の家具・機器・設備を入れる。完全に合う部品がなければ近い部品を使い、各品に出典「仮定」と施主確認のメモを付ける。通路と車椅子の経路は保つ。
The doctor read the A/B comparison and is keeping option A: one shared counter where both receptionists can check in and take payment. Please refine option A for the client meeting with the furniture, equipment and fixtures in every room. Start from design option A in Laydyne.
- Consultation rooms: desk, doctor's chair, patient chair, a chair for a companion, exam couch, hand basin, a cabinet
- Treatment room: 2 couches with curtains or screens, a trolley, a sink, cabinets
- X-ray room: the X-ray unit and table, a control desk behind a screen, note "shielding by specialist"
- Staff room: lockers, a table with chairs, kitchenette, fridge
- Reception: the counter with 2 workstations, a payment terminal, a cabinet for files
- Waiting area: the seats, 2 wheelchair spaces kept clear, kids' corner with a rug and a low shelf, plants, a water dispenser
- Toilets: WC, basin, and a note on grab rails in the accessible WC
Use the closest part Laydyne has where there is no exact one, and give each item a source ("assumed") and a short note where the client must confirm. Run check_space again and keep the corridors and wheelchair routes as they are. Show me a 3D view of the waiting area and of one consultation room, and save it as design option "A2: A with furniture".
Codexはまず変更全体を予行で確かめ、1回の編集で部品19個を追加し、82個を更新しました(位置・出典・メモ)。再確認すると指摘は0件で、経路も保たれていました。部品189個の案A2として保存しています。Laydyneにはまだ医療用の部品がないため、近い部品で代用しました。診察台はベッド、X線装置と給水器は機械、カーテンはスクリーン、端末は決済端末です。いずれも施主確認のメモ付きです。


144秒、17回でした。1回の変更で便器を2回指定した呼び出しが1回ありましたが、次の呼び出しでまとめ直しています。
6. 受け渡す
要旨:案A2の縮尺付き図面をPDFで(断片をつなぎSHA-256を確認)、部屋の面積と部品数をCSVで、A・B・A2の比較資料をHTMLで、案件全体の控えを作り、ブラウザにも保存する。最初の配置からの変更の経緯と、各ファイルの説明も求める。
Please prepare the pack for the client meeting from the Linden Street Clinic project and put the files in the current folder:
- The scaled drawing set of option A2 as a PDF (get_view_image with delivery: true and format "pdf"; join the pieces and check the SHA-256).
- Room areas and part counts from get_space_quantities, as a CSV.
- A comparison handout of the design options A, B and A2 (get_design_packet, HTML), so the doctor can see why we kept A.
- A backup of the whole project with export_project (it keeps the options and the process comparison).
- Save the project in the browser too.
Then give me a short history of what changed since the first layout (from the project's change log), and list each file with what it is.
作られたファイルは次のとおりです。
- 図面(PDF、A3・1:100)
- 部屋の面積と部品数(CSV)
- A・B・A2を比べるHTMLの資料(2.1 MB。実行フォルダに保存)
- すべての配置案・工程案・保存した比較を含む案件ファイル
CodexはどのファイルもSHA-256で照合しています。166秒、13回でした。

この実行で弱かったのは経緯の記録です。受け渡し時の変更履歴には最後の3件しか残っていませんでした。配置案を復元するたびに、履歴が最初からやり直しになっていたためです。これは修正済みで、今は復元が案件の履歴の次の1行として記録されます。戻れる時点(ブラウザ保存と配置案)は、最初から最後まで残っていました。



結果と数値
| ステップ | 時間 | 入力トークン(うちキャッシュ) | 出力トークン | ツール呼び出し(失敗) |
|---|---|---|---|---|
| 1. 最初の配置 | 469秒 | 1,589,311(1,488,256) | 13,316 | 32(1) |
| 2. 確認(修正後) | 184秒 | 1,072,643(988,416) | 4,103 | 25(0) |
| 3. 午前の試算 | 160秒 | 1,161,202(1,055,616) | 3,869 | 22(2) |
| 4. 案Bと比較 | 190秒 | 915,346(822,272) | 3,224 | 20(0) |
| 5. 家具入りのA2 | 144秒 | 855,066(779,136) | 3,062 | 17(1) |
| 6. 受け渡し | 166秒 | 841,846(758,272) | 4,066 | 13(0) |
| 合計 | 1,313秒(22分) | 6,435,414(5,891,968) | 31,640 | 129(4) |
Codexのモデルは gpt-6-astra、推論の強さは low でした。入力トークンの91.6%はキャッシュです。新しいセッションのたびに、Laydyneのツール一覧(約30.9万文字)とそれまでのやり取りを読み直すためです。失敗4回はすべてエージェント側のもの(1回の変更で同じ部品を2回指定、並列の呼び出し)で、次の呼び出しで回復しました。手順2の最初の実行(止まった方)は、別に261秒・23回かかっています。これらはエージェントの時間です。設計者が読んで判断する時間は測っていません。
事務所が打ち合わせに持っていけるものは次のとおりです。
- 要件の文章から作った配置と、仮定の一覧
- 形状と車椅子の経路の確認
- 医師が詰まりの原因で、悪い日には待合が足りないことを示す午前の試算
- 理由を添えて見送った別案1つ
- 家具入りの案
- 図面、面積、すべての案を含む案件
できないこと
- 人の流れの物理は計算しません。 待っている患者は1点に重なります。10時の待合の画像では、3人が3つの席に座るのではなく、1人の姿に「×3」と表示されます。待ち行列は人数と容量で表しており、物理的な列や、ぶつかる・避けるといった動きは計算しません。
- 法令・安全は確かめません。 避難、消防やバリアフリーの基準、放射線の遮蔽、扉の操作、移乗の空間は確認していません。経路の確認は幅0.9 mの円で行っており、車椅子の実際の軌跡ではありません。
- 入力は概算です。 到着率と所要時間は医師の大まかな見込みです。数値は同じ見込みのもとで案Aと案Bを比べたものであり、実際の診療所の予測ではありません。
- 稼働率は定義次第です。 Codexの92%(最後の患者が帰るまで)とLaydyneの52%(6時間全体)は、同じ実行を別の定義で表したものです。
- 医療用の部品ライブラリはまだありません。 診察台、X線装置、給水器は、メモ付きの汎用部品です。
- 寸法は実測ではありません。 すべての寸法は要件から取ったものか仮定で、部品のメモにそう書いてあります。


試してみる
Laydyne Studioを開き、自分のAIをMCPでつないでから(マニュアル)、手元の要件で始めてください。
I only have a written brief, no drawings. In Laydyne, in the Studio I have open, start a fresh project called "<name>" and build a first layout: the unit is <width> × <depth> m with <fixed elements: columns, entrance, service door>. Rooms: <list with approximate sizes and what goes in them>. Corridors at least <width> m, doors at least <width> m clear. Label each room with a floor zone, place the main furniture, run check_space and fix overlaps and narrow passages, then show me the 2D plan and a 3D view and tell me which sizes you assumed. Save it as design option "A".
そのあとは、上の手順2〜6のように、確認、工程の試算(Pro)、2つ目の案へと進めます。

