Develop

AI-Native Development

Updated: Sep 4, 2026
IWSDK gives an AI coding tool structured access to your development session through the Model Context Protocol (MCP). The agent can author native scene files, inspect the running application, emulate WebXR input, capture evidence, and debug ECS state without relying on screen coordinates.

How it works

An AI-assisted IWSDK session has three parts:
  1. The iwsdk CLI starts the development server and a managed Playwright browser.
  2. The iwsdk-runtime MCP server exposes the current public tool contract to your AI tool.
  3. Adapter configuration and generated guidance teach the AI tool how to use the project and the IWSDK tools safely.
Start the workspace and confirm browser-command readiness:
npx iwsdk dev up
npx iwsdk dev status
The managed browser contains two views in one workspace:
  • Runtime runs your application and handles browser, WebXR, and ECS operations.
  • Editor previews and inspects native IWSDK scene files.
You can switch between the views in a headed workspace. IWSDK does not open a second application browser automatically. Open the runtime URL yourself when you need an additional browser outside the managed session.

Native scene composition

Native scene files under public/scenes/ are a direct authoring surface for both people and agents. An agent can split a scene into imported modules, edit those JSON files with normal file tools, and use MCP to validate and preview the result.
Use this order for a composed scene:
  1. Edit the root scene and its imported modules on disk.
  2. Call scene_render_file for each changed module and then for the composed root.
  3. Call scene_flatten_file once to write an import-free runtime scene.
  4. Call scene_open only on the flattened file.
  5. Use scene_get_state, scene_set_camera, and scene_screenshot to inspect the editor result.
  6. Use browser_screenshot and browser_get_console_logs to verify the application runtime.
scene_render_file renders a detached file without replacing the active editor document. If validation fails, it returns diagnostics and does not produce a preview image. scene_open rejects a composition that still contains imports, so flattening is required before opening that composition. Write the flattened output to the scene path configured by iwsdk.config.json, or update that manifest path and restart the session, before testing the application runtime. A successful flatten reports matching sourceRuntimeHash and outputRuntimeHash; the source-document, composed-document, and runtime hashes represent different projections and are not expected to equal one another.

Generated agent guidance

New IWSDK projects include a canonical AGENTS.md, scoped guidance, and portable skills under .agents/skills/. The generated skills include iwsdk-scene-composer for native scene work. Claude-compatible projects also receive Claude-native skills and a CLAUDE.md shim that imports the canonical guidance.
Run npx iwsdk adapter sync to refresh supported MCP adapter and permission entries. Sync preserves unrelated configuration, but it does not refresh the generated skill files or overwrite existing instruction files. See Getting started with AI for adapter-specific files and approval behavior.

Development modes

IWSDK provides two explicit AI modes:
ModeManaged browserDevUIUse it when
collaborate
Headed and resizable
On
A person and an agent share the same visible session.
agent
Headless with a fixed viewport
Off
An agent runs a deterministic, unattended session.
Running npx iwsdk dev up without --ai-mode starts a headed, open workspace-only session. It does not silently select an AI mode. See Modes for the full settings matrix.

Available capabilities

At IWSDK 0.5.3, iwsdk-runtime exposes 45 public tools across these areas:
  • WebXR session, pose, controller, hand, and input control
  • Runtime screenshots, console logs, and page reloads
  • Native scene validation, composition, editor state, camera control, and screenshots
  • Live runtime hierarchy, transform, and render-stat inspection
  • UIKitML asset discovery and preview rendering
  • ECS inspection, mutation, stepping, snapshots, and diffs
Use npx iwsdk mcp inspect to read the installed tool inventory. Use npx iwsdk mcp inspect --tool <tool-name> to read one tool’s current input schema. The MCP tools reference describes the public groups and their evidence boundaries.

Optional MCP servers

Adapter sync always configures iwsdk-runtime. It can also register these installed packages:
  • @iwsdk/reference for IWSDK reference lookup and local reference-asset utilities
  • @meta-quest/metavr for its separately installed MCP capabilities
Use the package’s own status or setup commands before depending on an optional server.

Next steps