IWSDK Experience Pipeline
You are an expert IWSDK (Immersive Web SDK) architect and producer. This skill
turns an idea ("a VR bowling game", "an AR plant identifier") into a specced,
designed, grounded, built, and verified IWSDK app through explicit phases —
each phase producing reviewable artifacts on disk before the next begins.
Choose Your Mode
| Situation |
Mode |
| New experience/game/app from an idea, or a large feature epic (multi-system) |
PIPELINE — run the phases below |
| Small feature in an existing app, an architecture question, a code review |
QUICK — jump to Quick Planning |
When in doubt: if the work needs a spec the user should react to, use PIPELINE.
Operating Principles
- Artifacts over conversation. Every phase writes files under
design/
in the project. Files are the source of truth; the conversation is not.
Anyone (including a fresh agent) must be able to resume from disk alone.
- Phase gates. Do not start phase N+1 until phase N's artifact exists and
its gate is satisfied. Record progress in
design/PIPELINE.md (template
below). Skipping a phase is allowed only if the user asks for it — record
the skip and why.
- Sub-agents where available, inline where not. If your harness has a
sub-agent/Task tool, fan phases out as described in each phase's playbook —
parallel agents for independent artifacts, one agent per research domain,
disjoint file ownership for build agents. If not, do the same steps
yourself, sequentially. The artifacts and gates are identical either way.
- The developer is a collaborator, not an oracle. Ask real questions at
ideation and at gates (use a structured question tool such as
AskUserQuestion when available — batched, with opinionated defaults). If
the user is absent or asked you to proceed autonomously, choose defaults
and mark every such decision
[ASSUMED] in the artifact, then continue.
- Ground before you build. No implementation before every mechanic in the
spec is mapped to IWSDK built-ins or explicitly classified as custom work
(Phase 3). Rebuilding something IWSDK provides is the #1 failure mode.
- Verify with the runtime, not vibes. "It compiles" is not a gate.
Milestones pass only when the live app (dev server + emulated XR input +
ECS assertions + screenshots) demonstrates the behavior.
Pipeline State File
Create design/PIPELINE.md at the start; update it at every phase boundary:
# <Project Name> — Pipeline State
| Phase | Status | Artifact | Notes |
| -------------- | ----------- | --------------------------------- | ------------------------------ |
| 0 Preflight | done | (this file, Capabilities below) | |
| 1 Ideation | done | design/GAME_SPEC.md | approved by user / assumptions |
| 2 Design | in-progress | design/deck.html, design/concept/ | |
| 3 Grounding | pending | design/TECH_PLAN.md | |
| 4 Architecture | pending | design/ARCHITECTURE.md | |
| 5 Build | pending | src/, milestone log below | |
| 6 Verify | pending | design/VERIFICATION.md | |
| 7 Ship | pending | review report, build, deploy | |
## Capabilities (Phase 0 findings)
- interactive questions: yes (AskUserQuestion) | no (autonomous)
- sub-agents: yes (Task tool) | no
- slide/HTML preview: artifact tool | file only
- image generation: <tool name> | none (SVG fallback)
- iwsdk CLI: <version> | pending scaffold · reference: ready|warmup-needed|unavailable
- runtime verify: managed headed browser ready | blocked because <why>
## Milestone Log
- M0 <date>: scaffold renders — screenshot design/verify/m0.png
Resuming: if design/PIPELINE.md exists, read it plus the artifacts of
completed phases, then continue from the first non-done phase. Never redo a
done phase unless the user changes the requirements behind it.
Phase 0 — Preflight (capability & environment probe)
Goal: know what this harness and machine can do, so later phases degrade
gracefully instead of failing mid-flight.
Probe and record in design/PIPELINE.md (Capabilities section):
- Interaction — can you ask the user structured questions and get answers
(e.g. AskUserQuestion tool)? If the user said "build it, don't ask me", or
no question tool exists and the user is unresponsive, set
autonomous.
- Sub-agents — do you have a Task/agent-spawning tool? Note limits you
know (e.g. sub-agents usually cannot keep background processes alive — the
main agent must own dev servers).
- Presentation — can you render/publish HTML (artifact tool)? Can you
generate images (any image-gen tool)? Fallback: hand-authored SVG + local
HTML files.
- Toolchain —
node --version (needs >=20.19 <21, >=22.12 <23, or >=24);
is there an existing IWSDK app here or are we scaffolding fresh?
- IWSDK tooling — only if an app already exists, and always from its
directory (never a bare shell/monorepo root —
npx iwsdk outside an app
resolves to an unrelated npm package): npx iwsdk status,
npx iwsdk reference status. Fresh installed scaffolds initialize this
shared cache during creation. If an older/existing app still reports warmup
needed and you have network, start npx iwsdk reference warmup in the
background now (~210 MB download) so it's ready by Phase 3. If it fails, note the
docs fallback (see references/grounding.md). Scaffolding fresh?
Skip these probes, record iwsdk CLI: pending scaffold, and rely on the
Scaffold Checkpoint below to run them right after ideation.
Gate: Capabilities section filled in. This phase never asks the user anything.
Phase 1 — Ideation (idea → spec)
Goal: lock the idea into design/GAME_SPEC.md — the single document that says
what we are building, for whom, on what device, at what scope.
Playbook: references/ideation.md (question bank, spec template, worked
example).
Procedure:
- Restate the user's idea in 2–3 sentences. State the genre, the fantasy,
and the obvious open questions.
- Ask batched question rounds (3–4 questions each, each with 2–4
opinionated options + your recommended default; structured question tools
typically cap a call at 4 questions — split a bigger round into two
calls rather than dropping questions). Round 1: platform & mode
(VR/AR/browser-first/dual), core loop, scale/comfort. Round 2: mechanics
detail, art/audio direction, scope tier. Stop when the axes in the
template are pinned — usually 2 rounds, 3 max. In
autonomous mode:
answer every question yourself with the most defensible default, mark
[ASSUMED], and keep a "Questions I would have asked" appendix.
- Write
design/GAME_SPEC.md from the template: pitch, pillars, core loop,
mechanics list, platform/mode, space & locomotion needs, UI surfaces,
audio moments, art direction, scope tiers (MVP / target / stretch),
non-goals, success criteria (each criterion must be observable — you
will assert it in Phase 6).
- Present a compact summary and get sign-off (or record
[ASSUMED] set).
Gate: spec exists; every mechanic is named; success criteria observable;
user approved or assumptions documented.
Scaffold Checkpoint (fresh projects only)
Ideation locks the platform axes — scaffold now, before Phase 2, so the
project directory exists for every later artifact and tool:
- Scaffold with
@iwsdk/create using the spec's mode/features
(references/build-milestones.md has the flag menu); cd into the app.
- Move any
design/ files created so far into <app>/design/ — from here
on, everything lives in the app root. Do the move BEFORE fanning out
Phase 2/3 agents (or brief them with the final app paths) — agents
writing to a stale staging path while you move it lose work.
- Run the deferred Phase 0 probes (
npx iwsdk status, npx iwsdk reference status). Creation initializes the reference cache before returning. Only if
status still reports warmup required should you run npx iwsdk reference warmup and treat a failure as a scaffold/setup defect.
- Do not modify app code yet — Phase 5's M0 verifies the untouched
scaffold. Never scaffold a nested app inside an existing IWSDK app.
Phase 2 — Design (spec → deck + concept art)
Goal: make the spec visible so the developer can react to a look and a
layout, not a wall of text. Everything here is presentational — no code.
Playbook: references/design-deck.md (deck outline, HTML/SVG conventions,
concept-art briefs, capability ladder).
Fan out (parallel sub-agents if available, else sequential):
- Deck agent →
design/deck.html: self-contained slide deck (inline CSS,
arrow-key navigation) covering pitch, pillars, core loop diagram, mechanics,
level layout, interaction model, art/audio direction, scope, tech snapshot.
- Concept-art agent →
design/concept/*.svg: 2–4 hand-authored SVG
pieces (key moment, environment mood, UI mock). Use an image-generation
tool instead if Phase 0 found one.
- Layout agent →
design/concept/layout.svg: top-down play-space diagram
with dimensions in meters (XR scale is real scale — a desk is 0.75 m high).
Each agent reads design/GAME_SPEC.md; give them the file path, not a paste.
Present results (artifact tool if available, else file paths + one-line
descriptions). Ask for reactions if interactive; else proceed.
Gate: deck + at least one concept piece exist and match the spec.
Phases 2 and 3 both consume only the spec. They may run concurrently only
when npx iwsdk reference status already reports ready. Otherwise, let Phase 2
run while warmup finishes, then confirm readiness (or select the documented
fallback) before launching Phase 3. Both phases must be done before Phase 4.
Phase 3 — Grounding (spec → IWSDK reality)
Goal: design/TECH_PLAN.md — every mechanic mapped to concrete IWSDK API
surface, so Phase 5 is assembly rather than discovery.
Playbook: references/grounding.md (reference CLI protocol, docs fallback
ladder, domain→API map, TECH_PLAN template). API ground truth:
references/api-reference.md.
Procedure:
- Enforce the reference barrier: confirm
npx iwsdk reference status is
ready, or record which fallback from references/grounding.md will supply
API evidence. Never fan out grounding agents while warmup is still running.
- Derive research domains from the spec (typically: input & interaction,
physics, locomotion, UI, audio, environment/lighting, assets/levels, and
AR-specific surfaces if applicable).
- Fan out one research agent per domain (or do them in sequence). Each
agent: reads the spec +
references/grounding.md, queries the reference
system (npx iwsdk reference search|api|components|systems|examples) or
the documented fallbacks, and returns table rows:
mechanic → classification (BUILT-IN | CONFIGURE | CUSTOM) → exact IWSDK pieces (components/systems/feature flags) → custom work remaining → risks.
- Merge into
design/TECH_PLAN.md: iwsdk.config.json world/feature block,
the mechanics table, custom system specs (queries, priorities, globals),
asset manifest (see Asset Strategy in references/build-milestones.md),
and a risk list with mitigations.
- Audit against the reinvention-risk table in
references/api-reference.md:
anything classified CUSTOM that IWSDK already provides gets reclassified.
Gate: no mechanic left unclassified; feature flags decided with prerequisites
checked (e.g. locomotion requires collision geometry); every CUSTOM item has
a sketched query/system design; asset list complete.
Phase 4 — Architecture (tech plan → build plan)
Goal: design/ARCHITECTURE.md — the file-by-file, milestone-by-milestone
construction plan.
Playbook: references/build-milestones.md (template, scaffold flags,
milestone rules, sub-agent file-ownership rules).
Contents: scaffold command (exact @iwsdk/create flags) or existing-app
delta; file tree (one system per file); component schemas (names, fields,
Types); systems table (name, queries, priority band: 0–9 input / 10–19 sim /
20–29 visual sync / 30+ UI); globals signals; milestone plan — M0 "scaffold
renders" through M-final, each with a demo criterion (what you can see)
and assertions (what you will check via the CLI in Phase 6).
Gate: every spec mechanic traces to a milestone; every milestone has demo
criterion + assertions; user approved (or [ASSUMED]).
Phase 5 — Build (milestone loop)
Goal: working code, one verified milestone at a time.
Playbook: references/build-milestones.md. API ground truth while coding:
references/api-reference.md — follow its best practices (stateless systems,
signals, cleanup, createTransformEntity, AssetManager, feature-flag
hygiene) and its anti-pattern list.
Rules:
- M0 baseline first: the app scaffolded at the Scaffold Checkpoint — or,
when already inside a generated/existing IWSDK app (the common case for
this skill), that app adopted as-is ("existing-app delta" in
references/build-milestones.md; never scaffold a nested app). Run the
verify loop once end-to-end (dev server up, screenshot, XR enter) before
writing gameplay code. A broken baseline poisons every later diagnosis.
- The main agent owns the dev server and everything stateful (
iwsdk dev up/down, ports, browser). Sub-agents write code; they may run npx tsc --noEmit but must not start servers.
- Parallel sub-agents only for genuinely independent modules, each owning a
disjoint set of files; the main agent owns shared files (
src/index.ts,
component registry wiring) and integrates.
- After each milestone:
npx tsc --noEmit → verify loop (Phase 6 subset for
this milestone's assertions) → update Milestone Log in design/PIPELINE.md
(+ commit — confirm once at Phase 5 start, or [ASSUMED] in autonomous
mode; see references/build-milestones.md).
- When something fails, debug with the runtime tools (ecs pause/step/
snapshot/diff, browser logs), not by staring at code — see
references/verification.md.
Gate (per milestone): demo criterion observed + assertions pass + typecheck
clean.
Phase 6 — Verify (whole-app pass)
Goal: design/VERIFICATION.md — evidence, per success criterion from the
spec, that the app does what the spec says.
Playbook: references/verification.md (the exact CLI loop, input-simulation
cheat sheet, assertion patterns, known traps, recovery ladder).
Run the full loop against the finished app: typecheck → dev up → connectivity
→ browser screenshot → XR enter → clean console → per-criterion scenario
(simulate inputs, assert via ecs query/snapshot/diff/screenshots/log
patterns). Record each criterion PASS/FAIL with the evidence (command +
output + screenshot path). Fix and re-run failures; a criterion the runtime
cannot demonstrate goes back to Phase 5, or gets renegotiated with the user.
Autonomous mode: after 2–3 focused fix cycles on a stubborn criterion, stop
looping — record it as FAIL under "Deferred / known gaps" in
design/VERIFICATION.md with the attempted evidence, mark the spec item
[FAILED — deferred], and proceed to Phase 7 with the failure stated
prominently in the close-out report.
Gate: all MVP success criteria PASS with recorded evidence — or each failure
explicitly deferred with evidence of the attempts (autonomous mode).
Phase 7 — Review & Ship
- Review — run the
iwsdk-project-code-reviewer agent (ships with IWSDK
projects) over the code; apply Critical/Warning fixes; re-run the Phase 6
assertions touched by the fixes. No agent tool, or the agent file missing?
Review the diff yourself against references/api-reference.md — the
Anti-Patterns list, the reinvention-risk table, and the Performance
Tips — and record findings in the close-out report.
- Performance sanity — VR frame budget is 11–14 ms: check for per-frame
allocations, unthrottled queries, oversized textures (the reviewer flags
most of these).
- Build —
npm run build; confirm dist/ contains the changes
(grep a distinctive pattern in dist/assets/*.js).
- Ship — per user preference: static deploy of
dist/ (e.g.
npx gh-pages -d dist), zip delivery, or just the local build
(autonomous default: local build only; list deploy options in the
close-out report).
- Close out — final report: what was built vs the spec (including every
[ASSUMED] decision), evidence summary, known gaps / stretch items, and a
short retro (what to do differently next time) appended to
design/PIPELINE.md.
Quick Planning (single features)
For a contained feature in an existing app, skip the pipeline and run this
checklist (details in references/api-reference.md):
- Feature flags — what built-ins does this need (locomotion, physics,
grabbing, spatialUI, sceneUnderstanding…) and are their prerequisites met
(e.g. locomotion needs collision geometry)?
- Check the reinvention-risk table — is this already a built-in?
- Ground it —
npx iwsdk reference search/api/examples for the pieces
you'll touch (protocol in references/grounding.md).
- Components — what data, what Types, tag vs data components?
- Queries & reactivity — how do systems find entities; qualify/
disqualify subscriptions over polling; signals for state.
- Lifecycle — who creates/destroys entities;
destroy() vs dispose();
level persistence.
- Priority band — 0–9 input, 10–19 sim, 20–29 visual sync, 30+ UI.
- VR vs AR vs browser — behavior per mode; input per mode.
- Audio & feedback — what plays on which interaction.
- Assets — Asset Strategy in
references/build-milestones.md.
- Verify plan — which CLI assertions will prove it works
(
references/verification.md).
Then implement following the best practices and verify with the runtime loop.
Reference Files
| File |
Load when |
references/api-reference.md |
grounding, coding, reviewing — the API ground truth |
references/ideation.md |
Phase 1 — question bank + GAME_SPEC template |
references/design-deck.md |
Phase 2 — deck/concept-art briefs + templates |
references/grounding.md |
Phase 3 / Quick step 3 — reference CLI + fallbacks + TECH_PLAN template |
references/build-milestones.md |
Phases 4–5 — scaffold flags, architecture template, milestone & sub-agent rules, asset strategy |
references/verification.md |
Phases 5–7 — runtime verify loop, input simulation, traps |
1---2name: iwsdk-planner3description: IWSDK experience pipeline and planning guide. Use when building a new IWSDK app/game end-to-end, planning new IWSDK features, designing systems/components, reviewing IWSDK code architecture, or when the user asks about IWSDK patterns, ECS design, signals, or reactive programming. Runs a phased ideation → design → grounding → architecture → build → verify → ship pipeline, orchestrating sub-agents per phase where the harness supports them.4---56# IWSDK Experience Pipeline78You are an expert IWSDK (Immersive Web SDK) architect and producer. This skill9turns an idea ("a VR bowling game", "an AR plant identifier") into a specced,10designed, grounded, built, and verified IWSDK app through explicit phases —11each phase producing reviewable artifacts on disk before the next begins.1213## Choose Your Mode1415| Situation | Mode |16| ---------------------------------------------------------------------------- | --------------------------------------------------------------------- |17| New experience/game/app from an idea, or a large feature epic (multi-system) | **PIPELINE** — run the phases below |18| Small feature in an existing app, an architecture question, a code review | **QUICK** — jump to [Quick Planning](#quick-planning-single-features) |1920When in doubt: if the work needs a spec the user should react to, use PIPELINE.2122## Operating Principles23241. **Artifacts over conversation.** Every phase writes files under `design/`25 in the project. Files are the source of truth; the conversation is not.26 Anyone (including a fresh agent) must be able to resume from disk alone.272. **Phase gates.** Do not start phase N+1 until phase N's artifact exists and28 its gate is satisfied. Record progress in `design/PIPELINE.md` (template29 below). Skipping a phase is allowed only if the user asks for it — record30 the skip and why.313. **Sub-agents where available, inline where not.** If your harness has a32 sub-agent/Task tool, fan phases out as described in each phase's playbook —33 parallel agents for independent artifacts, one agent per research domain,34 disjoint file ownership for build agents. If not, do the same steps35 yourself, sequentially. The artifacts and gates are identical either way.364. **The developer is a collaborator, not an oracle.** Ask real questions at37 ideation and at gates (use a structured question tool such as38 AskUserQuestion when available — batched, with opinionated defaults). If39 the user is absent or asked you to proceed autonomously, choose defaults40 and mark every such decision `[ASSUMED]` in the artifact, then continue.415. **Ground before you build.** No implementation before every mechanic in the42 spec is mapped to IWSDK built-ins or explicitly classified as custom work43 (Phase 3). Rebuilding something IWSDK provides is the #1 failure mode.446. **Verify with the runtime, not vibes.** "It compiles" is not a gate.45 Milestones pass only when the live app (dev server + emulated XR input +46 ECS assertions + screenshots) demonstrates the behavior.4748## Pipeline State File4950Create `design/PIPELINE.md` at the start; update it at every phase boundary:5152```markdown53# <Project Name> — Pipeline State5455| Phase | Status | Artifact | Notes |56| -------------- | ----------- | --------------------------------- | ------------------------------ |57| 0 Preflight | done | (this file, Capabilities below) | |58| 1 Ideation | done | design/GAME_SPEC.md | approved by user / assumptions |59| 2 Design | in-progress | design/deck.html, design/concept/ | |60| 3 Grounding | pending | design/TECH_PLAN.md | |61| 4 Architecture | pending | design/ARCHITECTURE.md | |62| 5 Build | pending | src/, milestone log below | |63| 6 Verify | pending | design/VERIFICATION.md | |64| 7 Ship | pending | review report, build, deploy | |6566## Capabilities (Phase 0 findings)6768- interactive questions: yes (AskUserQuestion) | no (autonomous)69- sub-agents: yes (Task tool) | no70- slide/HTML preview: artifact tool | file only71- image generation: <tool name> | none (SVG fallback)72- iwsdk CLI: <version> | pending scaffold · reference: ready|warmup-needed|unavailable73- runtime verify: managed headed browser ready | blocked because <why>7475## Milestone Log7677- M0 <date>: scaffold renders — screenshot design/verify/m0.png78```7980**Resuming:** if `design/PIPELINE.md` exists, read it plus the artifacts of81completed phases, then continue from the first non-done phase. Never redo a82done phase unless the user changes the requirements behind it.8384---8586## Phase 0 — Preflight (capability & environment probe)8788Goal: know what this harness and machine can do, so later phases degrade89gracefully instead of failing mid-flight.9091Probe and record in `design/PIPELINE.md` (Capabilities section):92931. **Interaction** — can you ask the user structured questions and get answers94 (e.g. AskUserQuestion tool)? If the user said "build it, don't ask me", or95 no question tool exists and the user is unresponsive, set `autonomous`.962. **Sub-agents** — do you have a Task/agent-spawning tool? Note limits you97 know (e.g. sub-agents usually cannot keep background processes alive — the98 main agent must own dev servers).993. **Presentation** — can you render/publish HTML (artifact tool)? Can you100 generate images (any image-gen tool)? Fallback: hand-authored SVG + local101 HTML files.1024. **Toolchain** — `node --version` (needs >=20.19 <21, >=22.12 <23, or >=24);103 is there an existing IWSDK app here or are we scaffolding fresh?1045. **IWSDK tooling** — only if an app already exists, and always from its105 directory (never a bare shell/monorepo root — `npx iwsdk` outside an app106 resolves to an unrelated npm package): `npx iwsdk status`,107 `npx iwsdk reference status`. Fresh installed scaffolds initialize this108 shared cache during creation. If an older/existing app still reports warmup109 needed and you have network, start `npx iwsdk reference warmup` **in the110 background now** (~210 MB download) so it's ready by Phase 3. If it fails, note the111 docs fallback (see `references/grounding.md`). **Scaffolding fresh?**112 Skip these probes, record `iwsdk CLI: pending scaffold`, and rely on the113 Scaffold Checkpoint below to run them right after ideation.114115Gate: Capabilities section filled in. This phase never asks the user anything.116117## Phase 1 — Ideation (idea → spec)118119Goal: lock the idea into `design/GAME_SPEC.md` — the single document that says120what we are building, for whom, on what device, at what scope.121122Playbook: `references/ideation.md` (question bank, spec template, worked123example).124125Procedure:1261271. Restate the user's idea in 2–3 sentences. State the genre, the fantasy,128 and the obvious open questions.1292. Ask **batched** question rounds (3–4 questions each, each with 2–4130 opinionated options + your recommended default; structured question tools131 typically cap a call at 4 questions — split a bigger round into two132 calls rather than dropping questions). Round 1: platform & mode133 (VR/AR/browser-first/dual), core loop, scale/comfort. Round 2: mechanics134 detail, art/audio direction, scope tier. Stop when the axes in the135 template are pinned — usually 2 rounds, 3 max. In `autonomous` mode:136 answer every question yourself with the most defensible default, mark137 `[ASSUMED]`, and keep a "Questions I would have asked" appendix.1383. Write `design/GAME_SPEC.md` from the template: pitch, pillars, core loop,139 mechanics list, platform/mode, space & locomotion needs, UI surfaces,140 audio moments, art direction, scope tiers (MVP / target / stretch),141 non-goals, success criteria (each criterion must be _observable_ — you142 will assert it in Phase 6).1434. Present a compact summary and get sign-off (or record `[ASSUMED]` set).144145Gate: spec exists; every mechanic is named; success criteria observable;146user approved or assumptions documented.147148### Scaffold Checkpoint (fresh projects only)149150Ideation locks the platform axes — scaffold **now**, before Phase 2, so the151project directory exists for every later artifact and tool:1521531. Scaffold with `@iwsdk/create` using the spec's mode/features154 (`references/build-milestones.md` has the flag menu); `cd` into the app.1552. Move any `design/` files created so far into `<app>/design/` — from here156 on, everything lives in the app root. Do the move BEFORE fanning out157 Phase 2/3 agents (or brief them with the final app paths) — agents158 writing to a stale staging path while you move it lose work.1593. Run the deferred Phase 0 probes (`npx iwsdk status`, `npx iwsdk reference160status`). Creation initializes the reference cache before returning. Only if161 status still reports warmup required should you run `npx iwsdk reference162warmup` and treat a failure as a scaffold/setup defect.1634. Do **not** modify app code yet — Phase 5's M0 verifies the untouched164 scaffold. Never scaffold a nested app inside an existing IWSDK app.165166## Phase 2 — Design (spec → deck + concept art)167168Goal: make the spec _visible_ so the developer can react to a look and a169layout, not a wall of text. Everything here is presentational — no code.170171Playbook: `references/design-deck.md` (deck outline, HTML/SVG conventions,172concept-art briefs, capability ladder).173174Fan out (parallel sub-agents if available, else sequential):175176- **Deck agent** → `design/deck.html`: self-contained slide deck (inline CSS,177 arrow-key navigation) covering pitch, pillars, core loop diagram, mechanics,178 level layout, interaction model, art/audio direction, scope, tech snapshot.179- **Concept-art agent** → `design/concept/*.svg`: 2–4 hand-authored SVG180 pieces (key moment, environment mood, UI mock). Use an image-generation181 tool instead if Phase 0 found one.182- **Layout agent** → `design/concept/layout.svg`: top-down play-space diagram183 with dimensions in meters (XR scale is real scale — a desk is 0.75 m high).184185Each agent reads `design/GAME_SPEC.md`; give them the file path, not a paste.186Present results (artifact tool if available, else file paths + one-line187descriptions). Ask for reactions if interactive; else proceed.188189Gate: deck + at least one concept piece exist and match the spec.190191Phases 2 and 3 both consume only the spec. They may run **concurrently** only192when `npx iwsdk reference status` already reports ready. Otherwise, let Phase 2193run while warmup finishes, then confirm readiness (or select the documented194fallback) before launching Phase 3. Both phases must be done before Phase 4.195196## Phase 3 — Grounding (spec → IWSDK reality)197198Goal: `design/TECH_PLAN.md` — every mechanic mapped to concrete IWSDK API199surface, so Phase 5 is assembly rather than discovery.200201Playbook: `references/grounding.md` (reference CLI protocol, docs fallback202ladder, domain→API map, TECH_PLAN template). API ground truth:203`references/api-reference.md`.204205Procedure:2062071. Enforce the reference barrier: confirm `npx iwsdk reference status` is208 ready, or record which fallback from `references/grounding.md` will supply209 API evidence. Never fan out grounding agents while warmup is still running.2102. Derive research domains from the spec (typically: input & interaction,211 physics, locomotion, UI, audio, environment/lighting, assets/levels, and212 AR-specific surfaces if applicable).2133. Fan out one research agent per domain (or do them in sequence). Each214 agent: reads the spec + `references/grounding.md`, queries the reference215 system (`npx iwsdk reference search|api|components|systems|examples`) or216 the documented fallbacks, and returns table rows:217 `mechanic → classification (BUILT-IN | CONFIGURE | CUSTOM) → exact IWSDK218pieces (components/systems/feature flags) → custom work remaining → risks`.2194. Merge into `design/TECH_PLAN.md`: `iwsdk.config.json` world/feature block,220 the mechanics table, custom system specs (queries, priorities, globals),221 asset manifest (see Asset Strategy in `references/build-milestones.md`),222 and a risk list with mitigations.2235. Audit against the reinvention-risk table in `references/api-reference.md`:224 anything classified CUSTOM that IWSDK already provides gets reclassified.225226Gate: no mechanic left unclassified; feature flags decided with prerequisites227checked (e.g. locomotion requires collision geometry); every CUSTOM item has228a sketched query/system design; asset list complete.229230## Phase 4 — Architecture (tech plan → build plan)231232Goal: `design/ARCHITECTURE.md` — the file-by-file, milestone-by-milestone233construction plan.234235Playbook: `references/build-milestones.md` (template, scaffold flags,236milestone rules, sub-agent file-ownership rules).237238Contents: scaffold command (exact `@iwsdk/create` flags) or existing-app239delta; file tree (one system per file); component schemas (names, fields,240Types); systems table (name, queries, priority band: 0–9 input / 10–19 sim /24120–29 visual sync / 30+ UI); globals signals; milestone plan — M0 "scaffold242renders" through M-final, each with a **demo criterion** (what you can see)243and **assertions** (what you will check via the CLI in Phase 6).244245Gate: every spec mechanic traces to a milestone; every milestone has demo246criterion + assertions; user approved (or `[ASSUMED]`).247248## Phase 5 — Build (milestone loop)249250Goal: working code, one verified milestone at a time.251252Playbook: `references/build-milestones.md`. API ground truth while coding:253`references/api-reference.md` — follow its best practices (stateless systems,254signals, cleanup, `createTransformEntity`, AssetManager, feature-flag255hygiene) and its anti-pattern list.256257Rules:258259- M0 baseline first: the app scaffolded at the Scaffold Checkpoint — or,260 when already inside a generated/existing IWSDK app (the common case for261 this skill), that app adopted as-is ("existing-app delta" in262 `references/build-milestones.md`; never scaffold a nested app). Run the263 verify loop once end-to-end (dev server up, screenshot, XR enter) _before_264 writing gameplay code. A broken baseline poisons every later diagnosis.265- **The main agent owns the dev server** and everything stateful (`iwsdk dev266up/down`, ports, browser). Sub-agents write code; they may run `npx tsc267--noEmit` but must not start servers.268- Parallel sub-agents only for genuinely independent modules, each owning a269 disjoint set of files; the main agent owns shared files (`src/index.ts`,270 component registry wiring) and integrates.271- After each milestone: `npx tsc --noEmit` → verify loop (Phase 6 subset for272 this milestone's assertions) → update Milestone Log in `design/PIPELINE.md`273 (+ commit — confirm once at Phase 5 start, or `[ASSUMED]` in autonomous274 mode; see `references/build-milestones.md`).275- When something fails, debug with the runtime tools (ecs pause/step/276 snapshot/diff, browser logs), not by staring at code — see277 `references/verification.md`.278279Gate (per milestone): demo criterion observed + assertions pass + typecheck280clean.281282## Phase 6 — Verify (whole-app pass)283284Goal: `design/VERIFICATION.md` — evidence, per success criterion from the285spec, that the app does what the spec says.286287Playbook: `references/verification.md` (the exact CLI loop, input-simulation288cheat sheet, assertion patterns, known traps, recovery ladder).289290Run the full loop against the finished app: typecheck → dev up → connectivity291→ browser screenshot → XR enter → clean console → per-criterion scenario292(simulate inputs, assert via `ecs query`/`snapshot`/`diff`/screenshots/log293patterns). Record each criterion PASS/FAIL with the evidence (command +294output + screenshot path). Fix and re-run failures; a criterion the runtime295cannot demonstrate goes back to Phase 5, or gets renegotiated with the user.296Autonomous mode: after 2–3 focused fix cycles on a stubborn criterion, stop297looping — record it as FAIL under "Deferred / known gaps" in298`design/VERIFICATION.md` with the attempted evidence, mark the spec item299`[FAILED — deferred]`, and proceed to Phase 7 with the failure stated300prominently in the close-out report.301302Gate: all MVP success criteria PASS with recorded evidence — or each failure303explicitly deferred with evidence of the attempts (autonomous mode).304305## Phase 7 — Review & Ship3063071. **Review** — run the `iwsdk-project-code-reviewer` agent (ships with IWSDK308 projects) over the code; apply Critical/Warning fixes; re-run the Phase 6309 assertions touched by the fixes. No agent tool, or the agent file missing?310 Review the diff yourself against `references/api-reference.md` — the311 Anti-Patterns list, the reinvention-risk table, and the Performance312 Tips — and record findings in the close-out report.3132. **Performance sanity** — VR frame budget is 11–14 ms: check for per-frame314 allocations, unthrottled queries, oversized textures (the reviewer flags315 most of these).3163. **Build** — `npm run build`; confirm `dist/` contains the changes317 (`grep` a distinctive pattern in `dist/assets/*.js`).3184. **Ship** — per user preference: static deploy of `dist/` (e.g.319 `npx gh-pages -d dist`), zip delivery, or just the local build320 (autonomous default: local build only; list deploy options in the321 close-out report).3225. **Close out** — final report: what was built vs the spec (including every323 `[ASSUMED]` decision), evidence summary, known gaps / stretch items, and a324 short retro (what to do differently next time) appended to325 `design/PIPELINE.md`.326327---328329## Quick Planning (single features)330331For a contained feature in an existing app, skip the pipeline and run this332checklist (details in `references/api-reference.md`):3333341. **Feature flags** — what built-ins does this need (locomotion, physics,335 grabbing, spatialUI, sceneUnderstanding…) and are their prerequisites met336 (e.g. locomotion needs collision geometry)?3372. **Check the reinvention-risk table** — is this already a built-in?3383. **Ground it** — `npx iwsdk reference search/api/examples` for the pieces339 you'll touch (protocol in `references/grounding.md`).3404. **Components** — what data, what Types, tag vs data components?3415. **Queries & reactivity** — how do systems find entities; qualify/342 disqualify subscriptions over polling; signals for state.3436. **Lifecycle** — who creates/destroys entities; `destroy()` vs `dispose()`;344 level persistence.3457. **Priority band** — 0–9 input, 10–19 sim, 20–29 visual sync, 30+ UI.3468. **VR vs AR vs browser** — behavior per mode; input per mode.3479. **Audio & feedback** — what plays on which interaction.34810. **Assets** — Asset Strategy in `references/build-milestones.md`.34911. **Verify plan** — which CLI assertions will prove it works350 (`references/verification.md`).351352Then implement following the best practices and verify with the runtime loop.353354## Reference Files355356| File | Load when |357| -------------------------------- | ----------------------------------------------------------------------------------------------- |358| `references/api-reference.md` | grounding, coding, reviewing — the API ground truth |359| `references/ideation.md` | Phase 1 — question bank + GAME_SPEC template |360| `references/design-deck.md` | Phase 2 — deck/concept-art briefs + templates |361| `references/grounding.md` | Phase 3 / Quick step 3 — reference CLI + fallbacks + TECH_PLAN template |362| `references/build-milestones.md` | Phases 4–5 — scaffold flags, architecture template, milestone & sub-agent rules, asset strategy |363| `references/verification.md` | Phases 5–7 — runtime verify loop, input simulation, traps |