How matthew-kissinger/kiln works
Kiln is a local toolkit for creating and revising procedural 3D assets with a coding agent. The main loop is agent-authored JavaScript, execution into an asset, rendered views and structural checks for review, then GLB export; source can be retained and edited through immutable revisions. CLI and MCP expose the engine, while Discovery, optional requirements, animation review, scene composition, and the interactive asset viewer are distinct capabilities. README workflow descriptions guide the high-level links; sampled source confirms selected module responsibilities, but not every connection between subsystems.
Main entry points: run.ts Agent tool loop · evaluator/index.ts Program evaluator · views/index.ts View capture · cli.ts CLI
Components 21
User interfaces
- CLI
src/cli.ts - MCP server
src/mcp-server.ts
Authoring and discovery
- Helper discovery
src/discovery/service.ts - Agent tool loop
src/agent/run.ts - Tool registry
src/tools/registry.ts - Program tools
src/tools/programs.ts
Asset construction
- Program evaluator
src/evaluator/index.ts - Geometry helpers
src/geometry.ts - Material recipes
src/material-recipes.ts - Scene composer
src/composer/index.ts
Review and rendering
- View capture
src/views/index.ts - Structural checks
src/qa/index.ts - Animation review
src/animation-cli.ts - Render service client
src/render-service-client.ts - Render service
render-service/src/server.mjs
Revision and delivery
- Program revisions
src/program-store.ts - Anchored editing
src/edit-cli.ts - GLB exporter
src/asset-export.ts - Asset viewer
src/viewer/app.ts - Web gallery
site/src/App.tsx
Other components
- Coding agent
Connections 23
- Coding agent → CLI: invokes
- Coding agent → MCP server: invokes tools
- CLI → Helper discovery: queries helpers
- MCP server → Helper discovery: queries helpers
- Coding agent → Agent tool loop: authors asset
- Agent tool loop → Tool registry: uses tools
- Tool registry → Program tools: dispatches
- Program tools → Program evaluator: runs program
- Program evaluator → Geometry helpers: evaluates helpers
- Program evaluator → Material recipes: evaluates helpers
- Program evaluator → Scene composer: evaluates scenes
- Agent tool loop → View capture: requests views
- View capture → Program evaluator: renders program
- View capture → Render service client: requests rendering
- Render service client → Render service: sends render request
- Agent tool loop → Structural checks: checks asset
- Agent tool loop → Animation review: reviews animation
- Agent tool loop → Program revisions: stores source
- Coding agent → Anchored editing: requests edits
- Anchored editing → Program revisions: reads revisions
- Agent tool loop → GLB exporter: exports asset
- GLB exporter → Asset viewer: provides GLB
- Web gallery → Asset viewer: opens specimen