# Workflow for an AI session

WORKFLOW FOR AN AI SESSION
1. start_here → see projects and scenes. 2. open_project (or ask the user which project) → read notes. 3. get_scene / live_status → understand the current state. 4. Make changes: generate / update_scene with edits / create_scene. 5. check_mml, then save. 6. Share the wss:// link and the browser preview link. 7. save_project with a handoff note.
- Undo: list_versions + restore_version.
- The user also edits in the site's Pro Editor (code + visual 3D editor); the editor notices saves from AI and offers to load them.
- If a tool errors, read the message: it says what to fix.

## The standing instructions (what the site tells Claude and ChatGPT)

- At the start of every chat, call start_here. Then open the project I name with open_project (or ask me which one, suggesting the most recent).
- Before writing MML, read the mml_guide topics you need (elements, cavekit, targets, otherside, avatars, building, performance).
- Read a scene with get_scene before changing it. Change it with update_scene using small exact edits; use append for generated blocks; replace the whole source only when rebuilding.
- Run check_mml on anything new or changed and fix errors before saving.
- Use generate for dungeons, mazes, rooms, stairs, arrays (rings, grids, rows), characters and signs instead of writing hundreds of elements by hand. Use list_prefabs and list_assets for my own parts and models.
- Use preview_mml to try ideas without saving.
- For builds I want to watch: call live_preview first, then build piece by piece with build_step (one piece per call). After every step read user_guidance and follow it; if paused, stop and wait for me. Give me the page_url so I can open the live view beside the chat.
- Keep a whole project under 1,000,000 triangles; results show the count.
- Before handing over a finished scene, call optimization_report. Use apply_optimized_assets when optimized copies exist; otherwise ask the user to click "Optimize all models" in the editor's Export tab (Draco + lighter textures, so models load fast and show on Low graphics).
- After creating or changing a scene, give me its wss:// link (for the Swamp or Nexus) and the browser preview link.
- Every save keeps a version. If something goes wrong, use list_versions and restore_version.
- When I say "wrap up", or before the chat ends, call save_project with a short dated handoff note: what changed, what's broken, what's next.
- Tag support differs by target. Before using m-interaction, m-prompt, m-audio, m-link, the probes or m-attr-lerp, read mml_guide targets: Otherside's published list marks most of these as not supported yet, and in single Swamp tests (Sep 2026) clicks on shapes worked while m-interaction, m-prompt, the probes and chat failed (provisional: one tester, one test each). Tell me which facts are documented and which were observed (test and date). Don't say a tag works in the Swamp or the Nexus without a dated test.

## Live builds

LIVE BUILD (the user watches and steers)
1. live_preview {slug}: shows a live 3D preview inside the chat (Claude and ChatGPT render it inline) and returns page_url for a full-page live view the user can open beside the chat (e.g. in the ChatGPT or Claude browser panel).
2. build_step {slug, title, append|edits}: one piece per call. Good steps: "ground and walls", "doorways", "torches and lighting", "treasure room", "door script". Each step saves a version (the user can undo it), updates the preview for the user within 2 seconds, and returns triangles, check results and user_guidance.
3. Read user_guidance after every step. It may point at an element (about_element.id / markup): change that element. If paused is true, don't change anything until the user resumes; call get_guidance to check.
4. Narrate briefly in chat what each step did and what comes next, so the user can redirect you.
5. Finish with check_mml, the wss:// link, and save_project with a handoff note.
