facebook/immersive-web-sdk-iwsdk-planner
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.
This is a copy. The original lives at facebook/iwsdk-planner.
npx skills add https://github.com/facebook/immersive-web-sdk --skill iwsdk-planner
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.
| 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.
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.
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-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.
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.
spec is mapped to IWSDK built-ins or explicitly classified as custom work
(Phase 3). Rebuilding something IWSDK provides is the #1 failure mode.
Milestones pass only when the live app (dev server + emulated XR input +
ECS assertions + screenshots) demonstrates the behavior.
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.
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):
(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.
know (e.g. sub-agents usually cannot keep background processes alive — the
main agent must own dev servers).
generate images (any image-gen tool)? Fallback: hand-authored SVG + local
HTML files.
node --version (needs >=20.19 <21, >=22.12 <23, or >=24);is there an existing IWSDK app here or are we scaffolding fresh?
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.
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:
and the obvious open questions.
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.
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).
[ASSUMED] set).Gate: spec exists; every mechanic is named; success criteria observable;
user approved or assumptions documented.
Ideation locks the platform axes — scaffold now, before Phase 2, so the
project directory exists for every later artifact and tool:
@iwsdk/create using the spec's mode/features(references/build-milestones.md has the flag menu); cd into the app.
design/ files created so far into <app>/design/ — from hereon, 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.
npx iwsdk status, `npx iwsdk referencestatus`). 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.
scaffold. Never scaffold a nested app inside an existing IWSDK app.
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):
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.
design/concept/*.svg: 2–4 hand-authored SVGpieces (key moment, environment mood, UI mock). Use an image-generation
tool instead if Phase 0 found one.
design/concept/layout.svg: top-down play-space diagramwith 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.
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:
npx iwsdk reference status isready, or record which fallback from references/grounding.md will supply
API evidence. Never fan out grounding agents while warmup is still running.
physics, locomotion, UI, audio, environment/lighting, assets/levels, and
AR-specific surfaces if applicable).
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`.
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.
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.
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]).
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:
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.
up/down, ports, browser). Sub-agents write code; they may run npx tsc
--noEmit` but must not start servers.
disjoint set of files; the main agent owns shared files (src/index.ts,
component registry wiring) and integrates.
npx tsc --noEmit → verify loop (Phase 6 subset forthis 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).
snapshot/diff, browser logs), not by staring at code — see
references/verification.md.
Gate (per milestone): demo criterion observed + assertions pass + typecheck
clean.
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).
iwsdk-project-code-reviewer agent (ships with IWSDKprojects) 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.
allocations, unthrottled queries, oversized textures (the reviewer flags
most of these).
npm run build; confirm dist/ contains the changes(grep a distinctive pattern in dist/assets/*.js).
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).
[ASSUMED] decision), evidence summary, known gaps / stretch items, and a
short retro (what to do differently next time) appended to
design/PIPELINE.md.
For a contained feature in an existing app, skip the pipeline and run this
checklist (details in references/api-reference.md):
grabbing, spatialUI, sceneUnderstanding…) and are their prerequisites met
(e.g. locomotion needs collision geometry)?
npx iwsdk reference search/api/examples for the piecesyou'll touch (protocol in references/grounding.md).
disqualify subscriptions over polling; signals for state.
destroy() vs dispose();level persistence.
10. Assets — Asset Strategy in references/build-milestones.md.
11. Verify plan — which CLI assertions will prove it works
(references/verification.md).
Then implement following the best practices and verify with the runtime loop.
| 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 |
Take facebook/immersive-web-sdk-iwsdk-planner from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.
The instructions reference npx.
Without those the skill loads but fails at the first command.