@iwsdk/create 0.4.1 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +103 -41
- package/dist/cli.js +1003 -3418
- package/dist/guidance/agents/.agents/skills/iwsdk-debug/SKILL.md +96 -0
- package/dist/guidance/agents/.agents/skills/iwsdk-depth-occlusion/SKILL.md +135 -0
- package/dist/guidance/agents/.agents/skills/iwsdk-grab/SKILL.md +129 -0
- package/dist/guidance/agents/.agents/skills/iwsdk-physics/SKILL.md +92 -0
- package/dist/guidance/agents/.agents/skills/iwsdk-physics/references/component-reference.md +154 -0
- package/dist/guidance/agents/.agents/skills/iwsdk-physics/references/tuning-and-config.md +88 -0
- package/dist/guidance/agents/.agents/skills/iwsdk-physics/references/workflows.md +303 -0
- package/dist/guidance/agents/.agents/skills/iwsdk-planner/SKILL.md +364 -0
- package/dist/guidance/agents/.agents/skills/iwsdk-planner/references/api-reference.md +1489 -0
- package/dist/guidance/agents/.agents/skills/iwsdk-planner/references/build-milestones.md +241 -0
- package/dist/guidance/agents/.agents/skills/iwsdk-planner/references/design-deck.md +101 -0
- package/dist/guidance/agents/.agents/skills/iwsdk-planner/references/grounding.md +176 -0
- package/dist/guidance/agents/.agents/skills/iwsdk-planner/references/ideation.md +156 -0
- package/dist/guidance/agents/.agents/skills/iwsdk-planner/references/verification.md +199 -0
- package/dist/guidance/agents/.agents/skills/iwsdk-ray/SKILL.md +159 -0
- package/dist/guidance/agents/.agents/skills/iwsdk-scene-composer/SKILL.md +255 -0
- package/dist/guidance/agents/.agents/skills/iwsdk-scene-composer/agents/openai.yaml +5 -0
- package/dist/guidance/agents/.agents/skills/iwsdk-scene-composer/references/asset-authoring.md +295 -0
- package/dist/guidance/agents/.agents/skills/iwsdk-scene-composer/references/composition-patterns.md +243 -0
- package/dist/guidance/agents/.agents/skills/iwsdk-scene-composer/references/image-intake.md +191 -0
- package/dist/guidance/agents/.agents/skills/iwsdk-scene-composer/references/review-and-stop.md +99 -0
- package/dist/guidance/agents/.agents/skills/iwsdk-scene-composer/references/scene-format.md +458 -0
- package/dist/guidance/agents/.agents/skills/iwsdk-scene-composer/references/text-intake.md +82 -0
- package/dist/guidance/agents/.agents/skills/iwsdk-ui/SKILL.md +208 -0
- package/dist/guidance/claude/.claude/agents/iwsdk-project-code-reviewer.md +450 -0
- package/dist/guidance/claude/.claude/rules/assets-and-manifest.md +55 -0
- package/dist/guidance/claude/.claude/rules/ecs-api.md +102 -0
- package/dist/guidance/claude/.claude/rules/scene-json.md +64 -0
- package/dist/guidance/claude/.claude/rules/uikitml.md +60 -0
- package/dist/guidance/claude/.claude/settings.json +19 -0
- package/dist/guidance/claude/.claude/skills/iwsdk-debug/SKILL.md +96 -0
- package/dist/guidance/claude/.claude/skills/iwsdk-depth-occlusion/SKILL.md +135 -0
- package/dist/guidance/claude/.claude/skills/iwsdk-grab/SKILL.md +129 -0
- package/dist/guidance/claude/.claude/skills/iwsdk-physics/SKILL.md +92 -0
- package/dist/guidance/claude/.claude/skills/iwsdk-physics/references/component-reference.md +154 -0
- package/dist/guidance/claude/.claude/skills/iwsdk-physics/references/tuning-and-config.md +88 -0
- package/dist/guidance/claude/.claude/skills/iwsdk-physics/references/workflows.md +303 -0
- package/dist/guidance/claude/.claude/skills/iwsdk-planner/SKILL.md +364 -0
- package/dist/guidance/claude/.claude/skills/iwsdk-planner/references/api-reference.md +1489 -0
- package/dist/guidance/claude/.claude/skills/iwsdk-planner/references/build-milestones.md +241 -0
- package/dist/guidance/claude/.claude/skills/iwsdk-planner/references/design-deck.md +101 -0
- package/dist/guidance/claude/.claude/skills/iwsdk-planner/references/grounding.md +176 -0
- package/dist/guidance/claude/.claude/skills/iwsdk-planner/references/ideation.md +156 -0
- package/dist/guidance/claude/.claude/skills/iwsdk-planner/references/verification.md +199 -0
- package/dist/guidance/claude/.claude/skills/iwsdk-ray/SKILL.md +159 -0
- package/dist/guidance/claude/.claude/skills/iwsdk-scene-composer/SKILL.md +255 -0
- package/dist/guidance/claude/.claude/skills/iwsdk-scene-composer/agents/openai.yaml +5 -0
- package/dist/guidance/claude/.claude/skills/iwsdk-scene-composer/references/asset-authoring.md +295 -0
- package/dist/guidance/claude/.claude/skills/iwsdk-scene-composer/references/composition-patterns.md +243 -0
- package/dist/guidance/claude/.claude/skills/iwsdk-scene-composer/references/image-intake.md +191 -0
- package/dist/guidance/claude/.claude/skills/iwsdk-scene-composer/references/review-and-stop.md +99 -0
- package/dist/guidance/claude/.claude/skills/iwsdk-scene-composer/references/scene-format.md +458 -0
- package/dist/guidance/claude/.claude/skills/iwsdk-scene-composer/references/text-intake.md +82 -0
- package/dist/guidance/claude/.claude/skills/iwsdk-ui/SKILL.md +208 -0
- package/dist/guidance/claude/CLAUDE.md +142 -0
- package/dist/guidance/codex/.codex/config.toml +2 -0
- package/dist/guidance/common/AGENTS.md +151 -0
- package/dist/guidance/copilot/.github/instructions/assets-and-manifest.instructions.md +52 -0
- package/dist/guidance/copilot/.github/instructions/ecs-api.instructions.md +100 -0
- package/dist/guidance/copilot/.github/instructions/scene-json.instructions.md +63 -0
- package/dist/guidance/copilot/.github/instructions/uikitml.instructions.md +59 -0
- package/dist/guidance/cursor/.cursor/rules/assets-and-manifest.mdc +57 -0
- package/dist/guidance/cursor/.cursor/rules/ecs-api.mdc +104 -0
- package/dist/guidance/cursor/.cursor/rules/scene-json.mdc +66 -0
- package/dist/guidance/cursor/.cursor/rules/uikitml.mdc +62 -0
- package/dist/guidance/scoped-agents/public/scenes/AGENTS.md +63 -0
- package/dist/guidance/scoped-agents/public/ui/AGENTS.md +59 -0
- package/dist/guidance/scoped-agents/src/AGENTS.md +149 -0
- package/dist/template/common/README.md +13 -0
- package/dist/template/common/gitignore.template +45 -0
- package/dist/template/common/index.html +16 -0
- package/dist/template/common/nvmrc.template +1 -0
- package/dist/template/common/public/audio/chime.mp3 +0 -0
- package/dist/template/common/public/gltf/webxr-banner/banner.gltf +68 -0
- package/dist/template/common/public/textures/webxr.png +0 -0
- package/dist/template/common/public/ui/welcome.uikitml +98 -0
- package/dist/template/common/src/assets.ts +54 -0
- package/dist/template/common/src/components.ts +11 -0
- package/dist/template/common/src/index.ts +19 -0
- package/dist/template/common/src/panel.ts +38 -0
- package/dist/template/common/src/robot-component.ts +10 -0
- package/dist/template/common/src/robot.ts +38 -0
- package/dist/template/common/src/vite-env.d.ts +2 -0
- package/dist/template/common/tsconfig.json +15 -0
- package/dist/template/common/vite.config.ts +27 -0
- package/dist/template/common-js/README.md +13 -0
- package/dist/template/common-js/gitignore.template +45 -0
- package/dist/template/common-js/index.html +16 -0
- package/dist/template/common-js/nvmrc.template +1 -0
- package/dist/template/common-js/public/audio/chime.mp3 +0 -0
- package/dist/template/common-js/public/gltf/webxr-banner/banner.gltf +68 -0
- package/dist/template/common-js/public/textures/webxr.png +0 -0
- package/dist/template/common-js/public/ui/welcome.uikitml +98 -0
- package/dist/template/common-js/src/assets.js +45 -0
- package/dist/template/common-js/src/components.js +9 -0
- package/dist/template/common-js/src/index.js +14 -0
- package/dist/template/common-js/src/panel.js +31 -0
- package/dist/template/common-js/src/robot-component.js +8 -0
- package/dist/template/common-js/src/robot.js +37 -0
- package/dist/template/common-js/vite.config.js +25 -0
- package/dist/template/scenes/ar.iwsdk.scene.json +96 -0
- package/dist/template/scenes/immersive.iwsdk.scene.json +109 -0
- package/package.json +23 -17
- package/scripts/verify-release-ready.mjs +76 -0
- package/LICENSE +0 -21
package/README.md
CHANGED
|
@@ -12,8 +12,16 @@
|
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
14
|
npm create @iwsdk@latest
|
|
15
|
+
|
|
16
|
+
# Cloud harness or repository that is already checked out
|
|
17
|
+
npm create @iwsdk@latest . -- --yes --force --target vr
|
|
15
18
|
```
|
|
16
19
|
|
|
20
|
+
`.` selects the current directory. If the target contains any files, Create
|
|
21
|
+
requires the explicit `--force` confirmation. Forced scaffolding overwrites
|
|
22
|
+
conflicting generated files but preserves unrelated files and an existing Git
|
|
23
|
+
repository. `--yes` never implies overwrite permission.
|
|
24
|
+
|
|
17
25
|
Or with other package managers:
|
|
18
26
|
|
|
19
27
|
```bash
|
|
@@ -29,15 +37,33 @@ bun create @iwsdk
|
|
|
29
37
|
|
|
30
38
|
## Interactive Prompts
|
|
31
39
|
|
|
32
|
-
The
|
|
40
|
+
The default path is intentionally short and deterministic:
|
|
41
|
+
|
|
42
|
+
1. **Project name** - Asked only when it is not provided as an argument
|
|
43
|
+
2. **Starting point** - Virtual reality, mixed reality/passthrough, or Desktop 3D
|
|
44
|
+
3. **Setup** - Create with recommended settings or customize the setup
|
|
45
|
+
|
|
46
|
+
Recommended settings create a TypeScript project, initialize Git, and install
|
|
47
|
+
dependencies. They also apply a small target-specific baseline:
|
|
48
|
+
|
|
49
|
+
| Starting point | Recommended baseline |
|
|
50
|
+
| --------------------------- | --------------------------------------------------------------------------------------------------------- |
|
|
51
|
+
| Virtual reality | Locomotion on a worker and grabbing enabled; physics disabled |
|
|
52
|
+
| Mixed reality / passthrough | Grabbing enabled; physics, room surfaces/anchors, and real-world placement disabled |
|
|
53
|
+
| Desktop 3D | Dedicated non-XR scene with browser camera, input, locomotion, and interaction behavior; physics disabled |
|
|
54
|
+
|
|
55
|
+
Choose **Customize setup...** to select JavaScript, change applicable SDK
|
|
56
|
+
features, or opt out of Git initialization and dependency installation. The CLI
|
|
57
|
+
derives low-level WebXR feature settings from those choices instead of asking
|
|
58
|
+
for raw `No` / `Optional` / `Required` states.
|
|
33
59
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
60
|
+
Every project includes guidance and configuration for Claude Code, Codex,
|
|
61
|
+
Cursor, GitHub Copilot/VS Code, and OpenCode. Delete integrations you do not use;
|
|
62
|
+
there is no tool-selection step during scaffolding.
|
|
63
|
+
|
|
64
|
+
Before writing files, Create prints the resolved starting point, language, SDK
|
|
65
|
+
features, and generated `World.create` options. These settings remain editable
|
|
66
|
+
in `src/index.ts`; changing them does not require scaffolding again.
|
|
41
67
|
|
|
42
68
|
## What You Get
|
|
43
69
|
|
|
@@ -45,9 +71,10 @@ A fully configured project with:
|
|
|
45
71
|
|
|
46
72
|
- ⚡ **Vite** - Fast dev server with HMR
|
|
47
73
|
- 🎮 **WebXR Emulator** - Develop without VR hardware
|
|
74
|
+
- 🖥️ **Desktop 3D starter** - Browser-native camera, movement, pointer input, and interactions
|
|
48
75
|
- 📦 **GLTF Optimization** - Automatic asset compression
|
|
49
76
|
- 🔒 **HTTPS** - Required for WebXR, auto-configured
|
|
50
|
-
-
|
|
77
|
+
- 🧩 **Native scene workflow** - IWSDK scene JSON and editor tooling
|
|
51
78
|
|
|
52
79
|
## Example
|
|
53
80
|
|
|
@@ -55,21 +82,12 @@ A fully configured project with:
|
|
|
55
82
|
$ npm create @iwsdk@latest
|
|
56
83
|
|
|
57
84
|
===============================================
|
|
58
|
-
IWSDK Create CLI
|
|
85
|
+
IWSDK Create CLI v<current version>
|
|
59
86
|
Node v20.19.0
|
|
60
87
|
|
|
61
88
|
? Project name › iwsdk-app
|
|
62
|
-
?
|
|
63
|
-
?
|
|
64
|
-
? Enable Hand Tracking? › Optional
|
|
65
|
-
? Enable WebXR Layers? › Optional
|
|
66
|
-
? Enable locomotion? › Yes
|
|
67
|
-
? Deploy locomotion engine on a Worker? › Yes (recommended)
|
|
68
|
-
? Enable grabbing (one/two-hand, distance)? › Yes
|
|
69
|
-
? Enable physics simulation (Havok)? › No
|
|
70
|
-
? Enable Meta Spatial Editor integration? › No (Can change later)
|
|
71
|
-
? Set up a Git repository? › Yes
|
|
72
|
-
? Install dependencies now? › Yes
|
|
89
|
+
? What should this project start as? › Virtual reality - Start inside an authored virtual environment.
|
|
90
|
+
? Setup › Create with recommended settings
|
|
73
91
|
```
|
|
74
92
|
|
|
75
93
|
## Command Line Options
|
|
@@ -81,30 +99,65 @@ npm create @iwsdk@latest my-app
|
|
|
81
99
|
# Skip all prompts and use defaults
|
|
82
100
|
npm create @iwsdk@latest my-app -- -y
|
|
83
101
|
|
|
84
|
-
#
|
|
85
|
-
npm create @iwsdk@latest --
|
|
102
|
+
# Create a mixed reality starter non-interactively
|
|
103
|
+
npm create @iwsdk@latest mr-app -- -y --target ar
|
|
104
|
+
|
|
105
|
+
# Create a desktop browser 3D starter non-interactively
|
|
106
|
+
npm create @iwsdk@latest desktop-app -- -y --target browser
|
|
107
|
+
|
|
108
|
+
# Scaffold into the current, already-populated repository
|
|
109
|
+
npm create @iwsdk@latest . -- -y --force --target vr
|
|
110
|
+
|
|
111
|
+
# Use canary SDK bundle
|
|
112
|
+
npm create @iwsdk@latest -- --canary
|
|
86
113
|
```
|
|
87
114
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
|
115
|
+
Use `-y` / `--yes` for deterministic non-interactive scaffolding. Without it,
|
|
116
|
+
`--target` and its compatibility aliases can preselect the starting point, but
|
|
117
|
+
the interactive setup controls language, features, Git, and installation.
|
|
118
|
+
|
|
119
|
+
| Flag | Description |
|
|
120
|
+
| ---------------------------------------------------- | ------------------------------------------------------------------------------------------------ |
|
|
121
|
+
| `[name]` | Project directory; use `.` to scaffold in the current directory |
|
|
122
|
+
| `-y, --yes` | Skip prompts; defaults to VR, TypeScript, recommended features, Git, and dependency installation |
|
|
123
|
+
| `--force` | Confirm overwriting conflicting generated files when the target directory is non-empty |
|
|
124
|
+
| `--target <target>` | Starting point: `vr`, `ar`, or `browser` |
|
|
125
|
+
| `--mode <mode>` | Compatibility alias for XR targets: `vr` or `ar` |
|
|
126
|
+
| `--xr` / `--no-xr` | Compatibility selectors for VR (or `--mode ar`) and Desktop 3D |
|
|
127
|
+
| `--language <lang>` | `ts` or `js` |
|
|
128
|
+
| `--locomotion` / `--no-locomotion` | Enable or disable VR locomotion |
|
|
129
|
+
| `--grabbing` / `--no-grabbing` | Enable or disable VR/MR grabbing |
|
|
130
|
+
| `--physics` / `--no-physics` | Enable or disable physics |
|
|
131
|
+
| `--scene-understanding` / `--no-scene-understanding` | Enable or disable MR room surfaces and anchors |
|
|
132
|
+
| `--environment-raycast` / `--no-environment-raycast` | Enable or disable MR real-world placement |
|
|
133
|
+
| `--install` / `--no-install` | Install or skip dependencies |
|
|
134
|
+
| `--git` / `--no-git` | Initialize or skip a Git repository |
|
|
135
|
+
| `--canary` | Use the default canary SDK bundle |
|
|
136
|
+
| `--canary URL` | Use a custom HTTP(S) SDK bundle |
|
|
137
|
+
|
|
138
|
+
Automation and coding agents should map the requested experience to a target
|
|
139
|
+
and high-level feature flags before invoking Create, then pass those choices
|
|
140
|
+
with `--yes`. When the harness starts inside an existing repository, pass `.`
|
|
141
|
+
and `--force`; do not treat `--yes` as overwrite consent. The CLI does not infer
|
|
142
|
+
application intent from an open-ended description.
|
|
93
143
|
|
|
94
144
|
## Generated Templates
|
|
95
145
|
|
|
96
146
|
Based on your choices, one of these variants is generated:
|
|
97
147
|
|
|
98
|
-
| Template ID | Description
|
|
99
|
-
| ------------------- |
|
|
100
|
-
| `vr-manual-ts` | VR + TypeScript +
|
|
101
|
-
| `vr-manual-js` | VR + JavaScript +
|
|
102
|
-
| `
|
|
103
|
-
| `
|
|
104
|
-
| `
|
|
105
|
-
| `
|
|
106
|
-
|
|
107
|
-
|
|
148
|
+
| Template ID | Description |
|
|
149
|
+
| ------------------- | --------------------------------------------- |
|
|
150
|
+
| `vr-manual-ts` | VR + TypeScript + native workflow |
|
|
151
|
+
| `vr-manual-js` | VR + JavaScript + native workflow |
|
|
152
|
+
| `ar-manual-ts` | MR/passthrough + TypeScript + native workflow |
|
|
153
|
+
| `ar-manual-js` | MR/passthrough + JavaScript + native workflow |
|
|
154
|
+
| `browser-manual-ts` | Desktop 3D + TypeScript + native workflow |
|
|
155
|
+
| `browser-manual-js` | Desktop 3D + JavaScript + native workflow |
|
|
156
|
+
|
|
157
|
+
The scaffolded project includes native scene JSON under `public/scenes/` and is
|
|
158
|
+
ready for declarative scene authoring through the IWSDK managed workspace. It
|
|
159
|
+
also includes one canonical `AGENTS.md`; selected tool adapters add only their
|
|
160
|
+
native MCP, permission, skill, or import-shim files.
|
|
108
161
|
|
|
109
162
|
## Requirements
|
|
110
163
|
|
|
@@ -137,13 +190,22 @@ pnpm --filter @iwsdk/create dev
|
|
|
137
190
|
|
|
138
191
|
- `src/cli.ts` — Entrypoint: parses flags, runs prompts, scaffolds project
|
|
139
192
|
- `src/prompts.ts` — Interactive questions and defaults
|
|
140
|
-
- `src/
|
|
141
|
-
- `src/
|
|
193
|
+
- `src/project-target.ts` — Target-directory validation and in-place resolution
|
|
194
|
+
- `src/project-files.ts` — Builds the common source plus target manifest/scene
|
|
195
|
+
- `src/project-manifest.ts` — Generates the project manifest authority
|
|
196
|
+
- `src/scaffold.ts` — Safely writes the generated `ProjectFile[]`
|
|
142
197
|
- `src/installer.ts` — Dependency installation and next steps
|
|
143
198
|
- `src/types.ts` — Shared types (`VariantId`, `TriState`, `PromptResult`)
|
|
144
199
|
|
|
145
200
|
### How It Works
|
|
146
201
|
|
|
147
|
-
The CLI
|
|
202
|
+
The CLI ships one common TypeScript source tree, mechanically generated
|
|
203
|
+
JavaScript output, target scene seeds, and agent guidance in its own package.
|
|
204
|
+
It writes `iwsdk.config.json` and the selected `main.iwsdk.scene.json` locally;
|
|
205
|
+
scaffolding does not fetch a remote recipe.
|
|
206
|
+
|
|
207
|
+
Claude guidance is the canonical Agent Skills source. The package build derives
|
|
208
|
+
the `.agents/skills` tree used by Codex, Cursor, Copilot, and OpenCode and
|
|
209
|
+
translates path-scoped rules into each selected harness's native format.
|
|
148
210
|
|
|
149
211
|
</details>
|