@call-me-sensei/toonlab 0.4.19 → 0.4.20

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.
Files changed (115) hide show
  1. package/NPM-LIBRARY.md +225 -0
  2. package/README.md +54 -18
  3. package/agents/PROMPTS.md +87 -0
  4. package/agents/README.md +9 -14
  5. package/agents/claude/CLAUDE.md +8 -0
  6. package/agents/codex/AGENTS.md +159 -0
  7. package/agents/cursor/toonlab.mdc +37 -0
  8. package/agents/references/runtime-entry-points.md +5 -4
  9. package/agents/skills/claude/rock-ground-shaders/SKILL.md +16 -0
  10. package/agents/skills/codex/rock-ground-shaders/SKILL.md +16 -0
  11. package/cli/toonlab.mjs +3 -2
  12. package/database/fal-patina.mjs +131 -0
  13. package/database/generation-service.mjs +108 -7
  14. package/database/migrations/0007_creation_revisions.sql +80 -0
  15. package/database/migrations/0008_creation_revision_hardening.sql +98 -0
  16. package/database/migrations/0009_creation_revision_delete_integrity.sql +11 -0
  17. package/database/migrations/0010_external_catalog_assets.sql +28 -0
  18. package/database/providers.mjs +195 -16
  19. package/database/repository.mjs +518 -70
  20. package/database/seeds/catalog/0003_2026-08-open-assets.sql +159086 -0
  21. package/database/seeds/catalog/0004_2026-08-c7-rocks.sql +39405 -0
  22. package/mcp/server.mjs +28 -10
  23. package/mcp/vite-plugin.mjs +78 -2
  24. package/package.json +30 -9
  25. package/scripts/generate-catalog-seed.mjs +34 -7
  26. package/src/asset-policy/catalogLicenses.js +64 -6
  27. package/src/assetlib/loadImported.js +15 -1
  28. package/src/catalog/officialCatalogAssetRuntime.js +13 -2
  29. package/src/catalog/officialCatalogLod.js +34 -1
  30. package/src/catalog/officialCatalogPlacement.js +29 -14
  31. package/src/character/animationRetarget.js +2 -0
  32. package/src/character/characterRig.js +6 -1
  33. package/src/character/characterRuntime.js +175 -7
  34. package/src/environment/environmentMaterialAdapter.js +30 -0
  35. package/src/environment/environmentPresets.js +90 -0
  36. package/src/environment/environmentSunShadowPass.js +42 -0
  37. package/src/environment/toonLabSurfaceLighting.js +108 -10
  38. package/src/environment/urbanPropMaterial.js +104 -2
  39. package/src/lighting/lightingSystem.js +65 -10
  40. package/src/renderer/index.js +7 -0
  41. package/src/renderer/styleComparison.js +985 -0
  42. package/src/rock-shader/index.js +5 -0
  43. package/src/rock-shader/rockGeometryDetail.js +701 -0
  44. package/src/rock-shader/rockMaterial.js +782 -39
  45. package/src/rock-shader/rockRegionRuntime.js +185 -0
  46. package/src/rock-shader/rockSemanticMaterialRuntime.js +337 -0
  47. package/src/rock-shader/rockShaderRuntime.js +354 -67
  48. package/src/rock-shader/rockShaderSettings.js +246 -16
  49. package/src/rock-shader/rockTangentIntegrity.js +136 -0
  50. package/src/rock-shader/rockTextureIntegrity.js +115 -0
  51. package/src/rockgen/index.js +1 -0
  52. package/src/rockgen/rockDocument.js +27 -3
  53. package/src/rockgen/surface/c7GeologySurface.js +372 -0
  54. package/src/shaders-tsl/water.js +8 -0
  55. package/src/sky/cloudShadow.js +25 -1
  56. package/src/sky/skySystem.js +9 -0
  57. package/src/styles/index.js +23 -0
  58. package/src/styles/neutralStylePresets.js +712 -0
  59. package/src/styles/sceneStyleRuntime.js +51 -4
  60. package/src/styles/styleAdapters.js +13 -2
  61. package/src/styles/styleBundle.js +1 -1
  62. package/src/texgen/evaluateTexture.js +30 -3
  63. package/src/texgen/textureGenerators.js +63 -31
  64. package/src/texgen/textureSettings.js +25 -8
  65. package/src/toon/toonSettings.js +96 -2
  66. package/src/vegetation/branchTree.js +327 -42
  67. package/src/vegetation/index.js +2 -0
  68. package/src/vegetation/scatter.js +366 -0
  69. package/src/vegetation/stylizedTree.js +309 -19
  70. package/src/vegetation/stylizedTreeFoliage.js +229 -7
  71. package/src/vegetation/treeSurfaceTextures.js +328 -0
  72. package/src/version.js +1 -1
  73. package/src/water/waterSettings.js +15 -7
  74. package/types/asset-policy/catalogLicenses.d.ts +2 -0
  75. package/types/asset-policy/index.d.ts +2 -0
  76. package/types/assetlib/loadImported.d.ts +3 -1
  77. package/types/catalog/officialCatalogLod.d.ts +63 -5
  78. package/types/character/characterRig.d.ts +59 -0
  79. package/types/character/characterRuntime.d.ts +1 -0
  80. package/types/environment/environmentMaterialAdapter.d.ts +3 -1
  81. package/types/environment/toonLabSurfaceLighting.d.ts +20 -3
  82. package/types/index.d.ts +89 -0
  83. package/types/lighting/lightingSystem.d.ts +7 -0
  84. package/types/react/index.d.ts +20 -0
  85. package/types/renderer/index.d.ts +1 -0
  86. package/types/renderer/styleComparison.d.ts +409 -0
  87. package/types/rock-shader/index.d.ts +5 -0
  88. package/types/rock-shader/rockGeometryDetail.d.ts +300 -0
  89. package/types/rock-shader/rockMaterial.d.ts +3 -0
  90. package/types/rock-shader/rockRegionRuntime.d.ts +86 -0
  91. package/types/rock-shader/rockSemanticMaterialRuntime.d.ts +29 -0
  92. package/types/rock-shader/rockShaderRuntime.d.ts +2 -0
  93. package/types/rock-shader/rockShaderSettings.d.ts +19 -5
  94. package/types/rock-shader/rockTangentIntegrity.d.ts +51 -0
  95. package/types/rock-shader/rockTextureIntegrity.d.ts +61 -0
  96. package/types/rockgen/index.d.ts +1 -0
  97. package/types/rockgen/rockDocument.d.ts +29 -1
  98. package/types/rockgen/surface/c7GeologySurface.d.ts +8 -0
  99. package/types/sky/cloudShadow.d.ts +1 -0
  100. package/types/styles/index.d.ts +1 -0
  101. package/types/styles/neutralStylePresets.d.ts +944 -0
  102. package/types/styles/sceneStyleRuntime.d.ts +20 -0
  103. package/types/vegetation/branchTree.d.ts +4 -0
  104. package/types/vegetation/index.d.ts +9 -0
  105. package/types/vegetation/scatter.d.ts +1 -0
  106. package/types/vegetation/stylizedTree.d.ts +1 -0
  107. package/types/vegetation/stylizedTreeFoliage.d.ts +1 -0
  108. package/types/version.d.ts +1 -1
  109. package/agents/references/geology-playbook.md +0 -118
  110. package/agents/skills/claude/karst-cliff-construction/SKILL.md +0 -258
  111. package/agents/skills/claude/outdoor-world/SKILL.md +0 -492
  112. package/agents/skills/claude/outdoor-world/references/coastal-landform-formation.md +0 -100
  113. package/agents/skills/codex/karst-cliff-construction/SKILL.md +0 -258
  114. package/agents/skills/codex/outdoor-world/SKILL.md +0 -492
  115. package/agents/skills/codex/outdoor-world/references/coastal-landform-formation.md +0 -100
package/NPM-LIBRARY.md ADDED
@@ -0,0 +1,225 @@
1
+ # ToonLab npm library guide
2
+
3
+ This guide is included in `@call-me-sensei/toonlab`. It is the package-first
4
+ reference for version 0.4.20 and does not require access to the source
5
+ repository.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm install @call-me-sensei/toonlab three
11
+ ```
12
+
13
+ ToonLab requires Node.js 18 or newer for its command-line and local MCP tools.
14
+ The rendering library targets the Three.js TSL/NodeMaterial stack and is
15
+ WebGPU-first with a WebGL2 fallback through the same public materials.
16
+
17
+ ## Supported product surface
18
+
19
+ The public package follows the 15 Labs currently shown in ToonLab Pro. Several
20
+ Labs share one runtime because they author different scopes of the same
21
+ portable document.
22
+
23
+ | ToonLab Pro Lab | npm runtime |
24
+ | --- | --- |
25
+ | Character & Creature Shader | `@call-me-sensei/toonlab/toon` |
26
+ | Tree Shader | `@call-me-sensei/toonlab/vegetation-shaders` |
27
+ | Grass Shader | `@call-me-sensei/toonlab/vegetation-shaders` |
28
+ | Flower Shader | `@call-me-sensei/toonlab/vegetation-shaders` |
29
+ | Rock & Geology Shader | `@call-me-sensei/toonlab/rock-shader` |
30
+ | Terrain & Ground Shader | `@call-me-sensei/toonlab/ground-shader` |
31
+ | Manufactured Surface Shader | `@call-me-sensei/toonlab/environment` |
32
+ | Water & Liquid Shader | `@call-me-sensei/toonlab/water` |
33
+ | Sky Shader | `@call-me-sensei/toonlab/sky` |
34
+ | Cloud Shader | `@call-me-sensei/toonlab/cloud` |
35
+ | Sky & Cloud | `@call-me-sensei/toonlab/sky` and `/cloud` |
36
+ | Rock & Cliff Generation | `@call-me-sensei/toonlab/rockgen` |
37
+ | Tree & Shrub Generation | `@call-me-sensei/toonlab/vegetation` |
38
+ | Grass & Groundcover Generation | `@call-me-sensei/toonlab/vegetation` |
39
+ | Texture & Material Map Generation | `@call-me-sensei/toonlab/texgen` |
40
+
41
+ These stable support entry points are also public because the visible Labs,
42
+ Library, Gallery, style-bundle workflow, or integration examples depend on
43
+ them:
44
+
45
+ - `@call-me-sensei/toonlab/styles` for portable bundles, strict labels,
46
+ auditing, and coordinated application;
47
+ - `@call-me-sensei/toonlab/assetlib`, `/asset-policy`, and
48
+ `/official-catalog` for policy-aware Library and Gallery discovery;
49
+ - `@call-me-sensei/toonlab/character` and `/loaders` for supported preview and
50
+ host-model integration;
51
+ - `@call-me-sensei/toonlab/runtime`, `/renderer`, `/lighting`, and
52
+ `/world-collision` for the shared scene contract used by the documented
53
+ integration examples;
54
+ - `@call-me-sensei/toonlab/post` for the coordinated optional post pipeline;
55
+ - focused aliases such as `/toon-settings`, `/water-settings`, `/grass`,
56
+ `/grass-palettes`, `/post-processing`, and `/vegetation-shaders` when a
57
+ consumer does not want a larger barrel.
58
+
59
+ The package deliberately does not export Weather, Climate, Biome, Landscape,
60
+ path/building/village generation, debris generation, fauna, ambient effects,
61
+ game feel, camera behavior, soundscape, or gameplay VFX. Those areas may exist
62
+ as repository experiments or host examples, but they are not npm APIs in this
63
+ release. A one-asset Node rock annotation compiler is also repository-only.
64
+
65
+ ## What the package contains
66
+
67
+ The npm artifact contains four supported layers:
68
+
69
+ 1. The JavaScript runtime and TypeScript declarations for the public imports.
70
+ 2. Text-only agent guides, prompts, references, and paired Codex/Claude skills
71
+ under `agents/`.
72
+ 3. The `toonlab` manifest audit CLI and `toonlab-mcp` local stdio MCP server.
73
+ 4. The local MCP database/catalog support required for Library and asset
74
+ discovery workflows.
75
+
76
+ It does not contain the ToonLab website, Lab application UIs, examples,
77
+ screenshots, models, textures, or other binary media. Optional public fixtures
78
+ are identified by immutable `https://assets.toonlab.io` metadata rather than
79
+ being bundled.
80
+
81
+ ## Use a focused runtime
82
+
83
+ ```js
84
+ import {
85
+ applyToonShader,
86
+ createToonSettings,
87
+ } from '@call-me-sensei/toonlab/toon';
88
+
89
+ const settings = createToonSettings({
90
+ rimLight: { intensity: 0.35, mode: 'depth' },
91
+ outline: { thickness: 1.6 },
92
+ skinTone: { skinShadowBrightness: 0.94 },
93
+ });
94
+
95
+ applyToonShader(characterRoot, { settings });
96
+ ```
97
+
98
+ For a multi-domain scene, label roots and materials before applying a bundle.
99
+ Strict mode preflights the complete plan and stops before mutation when a
100
+ target, material role, or adapter is missing.
101
+
102
+ ```js
103
+ import {
104
+ CALL_ME_SENSEI_STYLE_BUNDLE,
105
+ createSceneStyleRuntime,
106
+ } from '@call-me-sensei/toonlab/styles';
107
+
108
+ const look = createSceneStyleRuntime({ renderer, scene, sky, water, post });
109
+ await look.apply(CALL_ME_SENSEI_STYLE_BUNDLE, {
110
+ discovery: 'scene-labels',
111
+ mode: 'strict',
112
+ });
113
+
114
+ renderer.setAnimationLoop(() => {
115
+ const delta = clock.getDelta();
116
+ look.update(delta, camera);
117
+ renderer.render(scene, camera);
118
+ });
119
+ ```
120
+
121
+ The host application still owns renderer creation, geometry and XZ layout,
122
+ cameras, controls, gameplay, dynamic physics, navigation, persistence, and the
123
+ frame loop. ToonLab does not turn a prompt into a finished world.
124
+
125
+ ## Install the agent guidance
126
+
127
+ Everything in this section is present in the installed npm package.
128
+
129
+ ### Codex
130
+
131
+ ```bash
132
+ cp node_modules/@call-me-sensei/toonlab/agents/codex/AGENTS.md ./AGENTS.md
133
+ mkdir -p .agents/skills
134
+ cp -R node_modules/@call-me-sensei/toonlab/agents/skills/codex/* .agents/skills/
135
+ ```
136
+
137
+ ### Claude Code
138
+
139
+ ```bash
140
+ cp node_modules/@call-me-sensei/toonlab/agents/claude/CLAUDE.md ./CLAUDE.md
141
+ mkdir -p .claude/skills
142
+ cp -R node_modules/@call-me-sensei/toonlab/agents/skills/claude/* .claude/skills/
143
+ ```
144
+
145
+ ### Cursor
146
+
147
+ ```bash
148
+ mkdir -p .cursor/rules
149
+ cp node_modules/@call-me-sensei/toonlab/agents/cursor/toonlab.mdc .cursor/rules/
150
+ ```
151
+
152
+ Use `agents/PROMPTS.md` for ready-to-paste prompts. Begin with `game-dev` for
153
+ an existing scene and add `asset-sourcing` when Library, Gallery, or MCP asset
154
+ discovery is involved.
155
+
156
+ ## Connect MCP
157
+
158
+ ### Local npm MCP
159
+
160
+ The package executable runs as a local stdio server. With no `DATABASE_URL`,
161
+ it uses the disk workspace passed through `--workspace`; no account is needed.
162
+
163
+ ```json
164
+ {
165
+ "mcpServers": {
166
+ "toonlab-local": {
167
+ "command": "npx",
168
+ "args": [
169
+ "-y",
170
+ "@call-me-sensei/toonlab@0.4.20",
171
+ "--workspace",
172
+ "/absolute/path/to/your-game/.toonlab"
173
+ ],
174
+ "env": {
175
+ "TOONLAB_LEGACY_WORKSPACE": "1"
176
+ }
177
+ }
178
+ }
179
+ }
180
+ ```
181
+
182
+ This server provides the anime-game profile, runtime guide, live-Lab
183
+ contracts, deterministic document creation and mutation, policy validation,
184
+ public asset discovery, local Library operations, and optional provider-backed
185
+ generation when the developer supplies server-side provider keys.
186
+
187
+ ### ToonLab Pro MCP
188
+
189
+ Add `https://toonlab.io/mcp` as a remote MCP server and authorize in the
190
+ browser. The hosted server adds the signed-in Pro Library, published Gallery,
191
+ stored characters, and managed generation. Local and remote servers may be
192
+ connected at the same time; inspect the tool description before choosing one
193
+ when names overlap.
194
+
195
+ Full live setup and tool documentation is available at
196
+ <https://toonlab.io/docs/mcp>.
197
+
198
+ ## CLI
199
+
200
+ The `toonlab` executable audits JSON scene manifests without starting a
201
+ renderer:
202
+
203
+ ```bash
204
+ npx toonlab audit --input scene.json --bundle call-me-sensei --mode strict --pretty
205
+ ```
206
+
207
+ Supported operations are `inspect`, `audit`, `plan`, `apply`, and `verify`.
208
+ Use `--out` to write a report. `apply --write-manifest` is the only operation
209
+ that replaces the input file and should be used only after reviewing the plan.
210
+
211
+ ## Documentation without the source repository
212
+
213
+ - This installed guide is the complete npm boundary and setup reference.
214
+ - `README.md` provides the longer runtime tour.
215
+ - `agents/README.md` explains the packaged agent resource layout.
216
+ - `agents/PROMPTS.md` contains supported prompts.
217
+ - `agents/references/` contains the machine-readable runtime, style, sourcing,
218
+ and MCP contracts used by the skills.
219
+ - <https://toonlab.io/docs> provides hosted user documentation.
220
+ - <https://toonlab.io/docs/labs> documents all 15 public Labs.
221
+ - <https://toonlab.io/docs/reference> and
222
+ <https://toonlab.io/docs/reference.md> provide the settings reference.
223
+
224
+ GitHub access is not required for npm installation, agent setup, MCP setup, or
225
+ the supported runtime workflows above.
package/README.md CHANGED
@@ -19,7 +19,7 @@ Use ToonLab as a focused runtime library (`@call-me-sensei/toonlab` on npm), as
19
19
  an asset/preset authoring workspace, or as an asset-discovery service—not as a
20
20
  one-shot world generator.
21
21
 
22
- ## Versioned expectation: 0.4.19
22
+ ## Versioned expectation: 0.4.20
23
23
 
24
24
  For a correctly constructed and semantically labeled scene, one strict Call Me
25
25
  Sensei bundle application is expected to establish the supported visual
@@ -34,12 +34,11 @@ and reversible per-domain inspection.
34
34
 
35
35
  The host still authors the level, geometry, asset selection and placement,
36
36
  material labels, cameras, gameplay, dynamic physics, and navigation. Labeled
37
- solid objects receive conservative static collision by default. Arbitrary imported assets are
38
- not guaranteed to route automatically; strict mode blocks uncertain contracts
39
- instead of guessing. See [What ToonLab 0.4.19 can and cannot
40
- do](https://github.com/call-me-sensei/toonlab/blob/main/docs/capability-status.md)
41
- for the complete public contract, measured imported-asset readiness, and the
42
- required verification sequence.
37
+ solid objects receive conservative static collision by default. Arbitrary
38
+ imported assets are not guaranteed to route automatically; strict mode blocks
39
+ uncertain contracts instead of guessing. The installed
40
+ [npm library guide](./NPM-LIBRARY.md) defines the complete shipped surface,
41
+ exclusions, agent setup, MCP setup, and package-first documentation paths.
43
42
 
44
43
  ## Recommended scope today
45
44
 
@@ -61,9 +60,8 @@ The recommended production workflow is:
61
60
 
62
61
  Whole-world generation, terrain/biome/coast/cliff formation, automatic set
63
62
  dressing, Weather/Climate composition, gameplay systems, and autonomous scene
64
- classification belong under experimentation. See
65
- [What ToonLab is ready for today](https://github.com/call-me-sensei/toonlab/blob/main/docs/capability-status.md)
66
- for the exact boundary and a recommended agent brief.
63
+ classification belong under experimentation. The exact supported boundary and
64
+ a recommended agent brief ship in `NPM-LIBRARY.md` and `agents/PROMPTS.md`.
67
65
 
68
66
  ## Quickstart
69
67
 
@@ -86,6 +84,19 @@ permissive signatures only where inference cannot produce a valid public type.
86
84
  Package verification compiles a clean packed consumer with `strict: true` and
87
85
  `skipLibCheck: false`.
88
86
 
87
+ The npm artifact is self-documenting when the source repository is unavailable:
88
+
89
+ - `NPM-LIBRARY.md` is the versioned install, runtime, agent, MCP, and support
90
+ boundary guide.
91
+ - `agents/PROMPTS.md` contains ready-to-paste supported prompts.
92
+ - The Codex, Claude Code, and Cursor guidance files are included under
93
+ `agents/` alongside their paired feature skills.
94
+ - Live user documentation remains available at
95
+ [toonlab.io/docs](https://toonlab.io/docs), including the
96
+ [15 public Labs](https://toonlab.io/docs/labs),
97
+ [MCP setup](https://toonlab.io/docs/mcp), and
98
+ [settings reference](https://toonlab.io/docs/reference).
99
+
89
100
  ```ts
90
101
  import {
91
102
  CALL_ME_SENSEI_STYLE_BUNDLE,
@@ -159,6 +170,7 @@ TRIPO_API_KEY=
159
170
  MESHY_API_KEY=
160
171
  MESHY_API_KEYS=
161
172
  GEMINI_API_KEY=
173
+ FAL_KEY=
162
174
  OPENAI_API_KEY=
163
175
  ARK_API_KEY=
164
176
  POLYPIZZA_API_KEY=
@@ -178,6 +190,9 @@ safe to run again.
178
190
 
179
191
  The local MCP server exposes the same configured image/3D providers through
180
192
  `generate_ai_asset`, `get_generation_job(s)`, and `save_generated_asset`.
193
+ With `FAL_KEY`, `kind: "material"` creates a seamless Fal Patina preview and a
194
+ durable grouped PBR bundle (basecolor, normal, roughness, metalness, and height)
195
+ at 1K–8K instead of flattening the maps into unrelated image jobs.
181
196
  Meshy text mode first generates a concept with the selected `image_model`,
182
197
  then submits that PNG/JPEG to Meshy 7 as one trackable MCP job. The existing
183
198
  `generate_asset` tool remains the deterministic procedural-recipe contract.
@@ -220,6 +235,18 @@ opaque objects under `.toonlab/objects`; Postgres stores their metadata and
220
235
  generation history. Saved generated assets appear in `/library/` with preview,
221
236
  Open, asset-download, JSON-export, and delete actions.
222
237
 
238
+ Every meaningful Library save also creates an immutable local revision. Open a
239
+ creation in `/library/` to browse or download earlier documents, give important
240
+ versions a unique name, add version-only tags and notes, pin milestones, or
241
+ restore an earlier snapshot. Identical saves are deduplicated, and restore
242
+ always creates a new head revision instead of rewriting history. This revision
243
+ number is Library history; a document's own `version` field remains its portable
244
+ schema version. Style-bundle revisions also record the exact revisions of saved
245
+ documents referenced by their slots. Local runtimes can request the locked,
246
+ self-contained bundle with
247
+ `fetchStyleBundle('/api/toonlab/library/<bundle-id>/resolved')`; a missing lock
248
+ fails explicitly instead of substituting a newer dependency.
249
+
223
250
  ### Updating an existing installation
224
251
 
225
252
  Use the same update sequence for every ToonLab release, whether it contains
@@ -249,7 +276,9 @@ seed batches in order. Existing installations apply only newer batches.
249
276
  Catalog data therefore does **not** use a separate downloadable “current
250
277
  seed,” and new datasets are **not** schema migrations. Keeping every released
251
278
  batch in the repository gives fresh and upgraded installations the same final
252
- catalog while preserving a simple, auditable upgrade path.
279
+ catalog while preserving a simple, auditable upgrade path. The checked-in
280
+ catalog currently contains 8,163 official assets: 480 first-party ToonLab
281
+ rocks plus 7,683 verified open assets.
253
282
 
254
283
  Applied filenames and SHA-256 digests are recorded in `schema_migrations` and
255
284
  `catalog_seed_batches`. Never edit, rename, or replace a released migration or
@@ -497,6 +526,10 @@ separators; maximum 10 tags and 32 characters each) and are
497
526
  stored independently from the portable document so they remain searchable
498
527
  after reload and edits.
499
528
 
529
+ Revision history is unlimited in the local workspace. Creation tags above are
530
+ separate from version tags: creation tags remain discovery metadata, while
531
+ version tags describe a particular immutable snapshot.
532
+
500
533
  Start by loading one style bundle, explicitly labeling the scene targets, and
501
534
  preflighting the complete routing plan. Strict mode is atomic: if any target
502
535
  is unlabeled, unsupported, or missing an adapter, nothing is mutated.
@@ -637,9 +670,8 @@ visual assets.
637
670
  The skills teach the agent the runtime boundary, asset-discovery order,
638
671
  frame-loop contract, and each focused subsystem API. Start with `game-dev` for
639
672
  integration into an existing scene and `asset-sourcing` for Gallery/MCP work.
640
- `outdoor-world`, `karst-cliff-construction`, and current Sky/Cloud guidance are
641
- experimental research aids: use them to qualify a bounded experiment or record
642
- a gap, not as a promise that an agent can build a polished world in one pass.
673
+ Experimental whole-world, natural-cliff, Weather/Climate, camera, game-feel,
674
+ and gameplay-VFX skills are intentionally not included in the npm artifact.
643
675
 
644
676
  ```bash
645
677
  # Claude Code — feature skills + project guidance
@@ -658,6 +690,8 @@ cp node_modules/@call-me-sensei/toonlab/agents/cursor/toonlab.mdc .cursor/rules/
658
690
  ```
659
691
 
660
692
  See [`agents/README.md`](agents/README.md) for the full layout.
693
+ Ready-to-paste supported prompts are included in
694
+ [`agents/PROMPTS.md`](agents/PROMPTS.md).
661
695
 
662
696
  ### 2. Connect MCP for asset discovery
663
697
 
@@ -673,15 +707,17 @@ into a disk-backed `.toonlab/` workspace:
673
707
  "mcpServers": {
674
708
  "toonlab-local": {
675
709
  "command": "npx",
676
- "args": ["-y", "@call-me-sensei/toonlab@latest", "--workspace", "/absolute/path/to/your-game/.toonlab"]
710
+ "args": ["-y", "@call-me-sensei/toonlab@latest", "--workspace", "/absolute/path/to/your-game/.toonlab"],
711
+ "env": { "TOONLAB_LEGACY_WORKSPACE": "1" }
677
712
  }
678
713
  }
679
714
  }
680
715
  ```
681
716
 
682
- If you run the labs from a checkout (`npm run dev`), open
683
- `http://localhost:5175/settings/` for a ready-made config instead. See
684
- [Local MCP and workspace](https://github.com/call-me-sensei/toonlab/blob/main/docs/mcp.md).
717
+ The npm server defaults to this disk workspace when `DATABASE_URL` is absent.
718
+ See [the installed npm guide](./NPM-LIBRARY.md) and
719
+ [live MCP documentation](https://toonlab.io/docs/mcp) for the complete local
720
+ and hosted setup.
685
721
 
686
722
  **ToonLab Pro (remote, OAuth).** [toonlab.io](https://toonlab.io) hosts a
687
723
  remote MCP server that adds an indexed CC0 asset search with ToonLab-styled
@@ -0,0 +1,87 @@
1
+ # ToonLab agent prompts
2
+
3
+ These prompts are included with the npm package. They use only the supported
4
+ 0.4.20 runtime, agent skills, and MCP workflows.
5
+
6
+ ## Existing-scene integration
7
+
8
+ ```text
9
+ Using the ToonLab game-dev skill, integrate @call-me-sensei/toonlab into this
10
+ existing Three.js scene. Inventory every renderable root and material. Assign
11
+ stable ToonLab target ids, rendering domains, material ids, and semantic roles.
12
+ Apply the Call Me Sensei bundle in strict mode through the documented focused
13
+ runtimes for the domains actually present. Preserve the scene's geometry, XZ
14
+ layout, cameras, gameplay, dynamic physics, navigation, and frame loop. Run the
15
+ app's typecheck, tests, build, and visual smoke check. Finish only when the
16
+ style audit is ready or report each remaining blocker with a concrete fix.
17
+ ```
18
+
19
+ ## Character or manufactured-material before/after
20
+
21
+ ```text
22
+ Using the ToonLab toon-shading or environment skill as appropriate, create a
23
+ true before/after comparison for the supplied model. The before side must use
24
+ its normal Three.js PBR material and the same camera, pose, lights, exposure,
25
+ background, and source textures as the after side. The after side may change
26
+ only the selected ToonLab shader/profile. Do not flatten, unlight, or otherwise
27
+ degrade the before side. Verify that the comparison demonstrates the shader's
28
+ effect rather than a scene-lighting difference.
29
+ ```
30
+
31
+ ## Policy-aware asset discovery
32
+
33
+ ```text
34
+ Using the ToonLab asset-sourcing skill and whichever ToonLab MCP servers are
35
+ connected, load get_anime_game_profile and confirm the project's sourcing
36
+ policy. Search project/local Library first, then ToonLab Gallery, then allowed
37
+ external open sources. Validate provenance, license, anime-style support, and
38
+ policy decision before selection. Generate only after the searches fail and a
39
+ custom asset gap has been recorded and approved. Report the selected stable id,
40
+ source, license, dimensions, semantic domain, and material-role readiness.
41
+ ```
42
+
43
+ ## Author a portable Lab document
44
+
45
+ ```text
46
+ Use ToonLab MCP to call list_live_labs, choose the named public Lab, and call
47
+ get_lab_features before editing. Create a schema-valid starter with
48
+ create_lab_document, make only requested semantic changes, and validate the
49
+ result. Save it to my Library only if I asked for persistence. Keep preview
50
+ camera, stage, lighting, playback, and comparison state out of the portable
51
+ document.
52
+ ```
53
+
54
+ ## Tree or grass generation
55
+
56
+ ```text
57
+ Using the ToonLab vegetation-sky skill, create the requested tree, shrub,
58
+ grass, or groundcover with the public vegetation runtime. Keep species/recipe,
59
+ seed, geometry, palette, and placement separate from the Tree/Grass/Flower
60
+ shader profile. Emit stable modeled-part and material-role labels, preserve
61
+ the recipe for regeneration, and verify LOD and shadow behavior. Do not use the
62
+ repository-only experimental species engine.
63
+ ```
64
+
65
+ ## Rock generation and shader separation
66
+
67
+ ```text
68
+ Using the ToonLab rockgen and rock-ground-shaders skills, create or edit the
69
+ requested rock asset with @call-me-sensei/toonlab/rockgen and style it with
70
+ @call-me-sensei/toonlab/rock-shader. Keep geometry identity, seed, LOD,
71
+ collision, and baked channels in the rock document; keep reusable appearance in
72
+ the rock shader profile. Validate the portable documents and verify the result
73
+ from multiple useful views. Do not deep-import repository compilers or test
74
+ fixtures.
75
+ ```
76
+
77
+ ## Apply a Style Bundle
78
+
79
+ ```text
80
+ Using the ToonLab scene-style-application skill, load the selected portable
81
+ Style Bundle. Inventory and explicitly label only the domains present in this
82
+ scene, audit in strict mode, and stop before mutation if any target, material
83
+ role, required mask, or adapter is missing. Apply the accepted plan atomically,
84
+ preserve asset identity and current scene conditions, then verify that every
85
+ populated slot has an owning runtime and that teardown restores the source
86
+ materials.
87
+ ```
package/agents/README.md CHANGED
@@ -4,11 +4,11 @@ These are downloadable AI coding agent resources for developers using ToonLab
4
4
  runtime features in their own apps. They are not maintenance instructions for
5
5
  this repository.
6
6
 
7
- The recommended agent workflow starts from an existing scene: apply focused
8
- shaders/vegetation/water/post, find assets through Gallery or MCP, and author
9
- bounded portable outputs. `outdoor-world`, `karst-cliff-construction`, and
10
- current Sky/Cloud guidance are experimental research/qualification resources,
11
- not a promise of reliable one-shot scene construction.
7
+ The recommended agent workflow starts from an existing scene: apply the
8
+ focused character, manufactured, ground, rock, vegetation, water, sky, cloud,
9
+ lighting, and post runtimes; find assets through Gallery or MCP; and author
10
+ bounded portable outputs. The package does not promise reliable one-shot scene
11
+ construction.
12
12
 
13
13
  Layout:
14
14
 
@@ -33,18 +33,13 @@ integration and `asset-sourcing` for Gallery/MCP work):
33
33
  - `rockgen`
34
34
  - `style-presets`
35
35
  - `toon-shading`
36
- - `vegetation-sky` (vegetation path; its Sky/Cloud path is experimental)
36
+ - `vegetation-sky`
37
37
  - `visual-verification`
38
38
  - `water`
39
39
 
40
- Experimental or host-owned boundary skills:
41
-
42
- - `camera`
43
- - `game-feel`
44
- - `karst-cliff-construction`
45
- - `lighting`
46
- - `outdoor-world`
47
- - `weather`
40
+ Experimental and host-owned skills are intentionally omitted from the npm
41
+ artifact. This includes whole-world construction, natural cliff formation,
42
+ Weather/Climate composition, camera behavior, game feel, and gameplay VFX.
48
43
 
49
44
  These text-only resources ship with the npm package beside the runtime source.
50
45
  The package does not include ToonLab lab applications, examples, review
@@ -0,0 +1,8 @@
1
+ @node_modules/@call-me-sensei/toonlab/agents/codex/AGENTS.md
2
+
3
+ ## Claude Code
4
+
5
+ - Use `agents/skills/claude/` as the user-facing usage guides for ToonLab
6
+ runtime features.
7
+ - Keep this file short; shared guidance belongs in `agents/codex/AGENTS.md`.
8
+ - Keep these downloadable resources focused on runtime usage.