Create your first Loom
Create a Code-only capture Loom that saves this Run’s prompt as a Record. Keep Stage resources together; shared code can live in src. Paths below are relative to the source package.
package.json
tsconfig.build.json
stages/capture/stage.yaml
stages/capture/schema/state.ts
stages/capture/code/initialize.ts
stages/capture/code/save.ts
Install and build
CLI includes Compiler. Add @intloom/compiler as a development dependency when calling compileLoom() from your own program. Generated dist is an independent distribution containing a manifest, three named exports, declarations and resources. Compiler follows entry dependencies, so no build-specific include list is needed.
The initializer provides state on Stage entry. Code reads state, commits a Record and returns an outcome. Using the Run ID as Record ID is this example’s convention. Continue with building and distribution.