# Engines — agent readiness

> Seven engines. Six install from npm and the command prints its own manual.
> Graft is a reference implementation that will not be published; the pattern
> worth copying from it is written out below.

```bash
npx @mrkt_frwd/job          # scene compiler for Blender
npx @mrkt_frwd/leaf         # single-file page, unfolded and folded back
npx @mrkt_frwd/award        # calibrated craft critic
npx @mrkt_frwd/reel         # deterministic browser recording
npx @mrkt_frwd/remap        # source-map reconstruction that refuses a path escape
npx @mrkt_frwd/trio         # Prisma + Zod + TS from one config; unknown type is an error
```

## Job — AI to Blender scene compiler
- Package: `@mrkt_frwd/job` (on npm)
- Schema: `job/1` · API: `job` `check` `run` `still` `exportScene`
- Examples: `npx @mrkt_frwd/job examples pull collar-01 --output-dir ./out`
  — ships the reference `collar-01.glb`, so you can compare your export
  against `5e507bc0` without installing Blender
- Docs: `npx @mrkt_frwd/job docs cat getting-started.md`
- Hosted MCP (read-only): `https://joeasare.com/api/job/mcp`
- Local MCP writes: `npx @mrkt_frwd/job mcp --output-dir <dir>`
- Skill: `skills/job/` in this repo
- Human page: `/engines/job` · Source: `github.com/mrktfrwd/job`

## Leaf — single-file page compiler
- Package: `@mrkt_frwd/leaf` (on npm) · Schema: `leaf/1`
- `npx @mrkt_frwd/leaf unpack page.html --output-dir ./out`
- `npx @mrkt_frwd/leaf pack ./out --out page.html` — reports whether the
  result is byte-identical to what was unpacked
- `npx @mrkt_frwd/leaf check page.html` — is it genuinely self-contained
- Human page: `/engines/leaf` · Source: `github.com/mrktfrwd/leaf`

## Award — calibrated craft critic
- Package: `@mrkt_frwd/award` (on npm)
- `npx @mrkt_frwd/award axes` · `prompt` · `score <axes.json>` · `verdict`
  · `brief` · `divergence` · `providers` · `doctrine`
- Award does not look at your page. It holds the rubric and the arithmetic;
  the judgement comes from a judge you supply. An abstained axis is dropped,
  never scored zero, and nothing scorable returns unscored rather than a number.
- Human page: `/engines/award` · Source: `github.com/mrktfrwd/award`

## Reel — deterministic browser recording
- Package: `@mrkt_frwd/reel` (on npm)
- `npx @mrkt_frwd/reel <script.json> --dry-run` validates the script and
  resolves every selector in seconds, so a capture never dies four minutes in
  on a renamed one
- `npx @mrkt_frwd/reel <script.json> --deterministic` runs a fixed clock, so
  the frames do not depend on how long a frame cost to draw
- The script is data, not code
- Needs Chromium and ffmpeg — the only engine here that is not zero-dependency
- Human page: `/engines/reel` · Source: `github.com/mrktfrwd/reel`

## Remap — source-map reconstruction
- Package: `@mrkt_frwd/remap` (on npm) · one dependency (`source-map`)
- `npx @mrkt_frwd/remap <file.js.map> --out <dir>`
- A source map's `sources` array is attacker-controlled text used to build
  filenames. Any entry that climbs out of the output directory is refused and
  reported, never relocated — a map that escapes is malformed or hostile, and
  quietly writing it elsewhere would be a guess about which
- A refusal is information, not a crash: it exits non-zero only if nothing
  came out at all, so an agent gets the safe files plus a named list of what
  was refused
- Human page: `/engines/remap` · Source: `github.com/mrktfrwd/remap`

## Not on npm

Not on npm: trio and graft, so an `npx @mrkt_frwd/<name>` instruction for
either will fail. Trio is awaiting a publish — clone the repo
and run the CLI from it; it ships its own tests (`npm test`) and a README that
leads with the defect it closes. Graft is a deliberate non-package: read the
pattern, do not install it.

### Trio — Prisma + Zod + TypeScript from one config
- Source: `github.com/mrktfrwd/trio` · zero dependencies
- `node cli.js <config.json> --out <dir>`
- An unknown type is an error naming the field, never a fallback to `String`.
  Nothing is written unless the whole config validates, and `check()` reports
  every problem at once rather than the first
- No human page yet

### Graft — a pattern, not a package
- Source: `github.com/mrktfrwd/graft` · reference implementation, **will not be published**
- It is ~200 lines of CLI over `ts-morph`, which does 101M downloads a month.
  Shipping it would mean asking you to install a wrapper instead of the library.
  What is worth copying is how it is *driven*, so that is written down here.

**Driving ts-morph when nobody is watching.** Two rules, both learned by getting
them wrong first, and both applicable to any codemod an agent runs unattended:

1. **Dry run by default; write only when asked.** Every operation takes
   `{ dryRun }` and returns what it *would* change. A refactoring tool that saves
   the moment it is called leaves the caller nothing to review and nothing to
   refuse — and an agent will call it. Make the cheap check precede the
   expensive, hard-to-undo step:
   ```js
   const project = new Project();
   project.addSourceFilesAtPaths(`${dir}/**/*.ts`);
   target.rename(newName);
   const touched = project.getSourceFiles().filter((f) => !f.isSaved());
   if (dryRun) { project.getSourceFiles().forEach((f) => f.refreshFromFileSystemSync()); }
   else project.saveSync();
   ```
2. **Account for every `any` you emit.** Extracting an interface from a class
   falls back to `any` for members with no annotation. An interface full of
   silent `any` compiles, looks finished, and documents nothing — so collect
   them and hand them back (`untyped[]`) rather than letting the output imply a
   completeness it does not have.

Refuse rather than proceed on: a symbol that is not there (name what you looked
for), a rename onto an existing name, an invalid identifier, a function whose
body already begins with `try`, an interface that already exists, and a directory
with no TypeScript in it. Each is a case where continuing produces something that
looks like success.

## Machine surfaces
- OpenAPI: `/engines/openapi.json` · Doc index: `/engines/llms.txt`
- Engine index: `/engines`

Studio: https://joeasare.com — Job is upstream of `/editor`.
