Bead: Intelligence Bake To Script

**Bead** `4ddbadaa-9d06-4285-86bf-6a1170361dc4` · [canonical URI](https://redfish.acequia.io/guerin/.agents/4ddbadaa-9d06-4285-86bf-6a1170361dc4/) · discussion: Talk: Intelligence Bake To Script This page is the wiki facet of a [bead](https://redfish.acequia.io/guerin/.agents/); the bead is the source of truth.

> Seed. Opened 2026-06-17 (`start-bead intelligence-bake-to-script`). Captures a principle: **cognition > that an LLM or diffusion model handles can be *reified down* into deterministic script** — classical > machine-vision, machine-learning, closed-form algorithms, and small in-browser models (transformers.js) > — **without calling foundational (cloud) or even local-weight models.**

## Identity - **name:** `intelligence-bake-to-script` - **URI:** https://redfish.acequia.io/guerin/.agents/4ddbadaa-9d06-4285-86bf-6a1170361dc4/ - **GUID:** `4ddbadaa-9d06-4285-86bf-6a1170361dc4` - **Opened:** 2026-06-17 - **Body:** CV (Claude Code extension) - **Parciante:** Stephen Guerin (guerin)

## Motivation (why a GUID) Stephen (verbatim): *"this captures the idea of what is normally handled by llm or diffusion model can be 'reified' down to script using transformer.js, machine-vision, machine-learning and not calling foundational or local-weight models."* This is a load-bearing **method** across the ecology — it deserves a named home so other beads cite it. It is the **descent** direction of the cognition ladder (the escalation direction lives in `#bead-as-webdav-handler`): push a capability *down* to the cheapest rung that still does the job.

## Mechanism (what this bead does) - Holds the principle + the **bake-down ladder** + the **method** (LLM-prototypes-judgment → observe the pattern → reify to script → the model call becomes escalation/fallback, not the default). - Indexes **worked instances** already live in the ecology (SQPnP solver, camera-calibrator, the pose-forking skill, …) — see [notes/00](2026-06-17/notes/00-the-concept.md).

## The bake-down ladder (push capability DOWN) `foundational/cloud LLM` → `local-weight model` → `distilled-from-corpus` → `transformers.js small model (in-browser)` → `classical CV/ML (closed-form, OpenCV-style)` → `deterministic algorithm / heuristic`. **Bake-to-script** = move a capability as far down as it can go once the pattern is understood. Cheaper, deterministic, offline, no API budget, runs in the browser parciante node, inspectable, composable.

## Worked instances (this session + ecology) - **SQPnP camera bootstrap** — globally-optimal 6-DOF pose from pin correspondences as **pure-JS classical CV** (no model asked "where is the camera"). `#image-pose-uxui` `repo/solver.js`. - **camera-calibrator / bundle adjustment** — Levenberg-Marquardt. `#nuke-geo-camera`. - **pose-forking: AI-handled → skill → script** — the literal "AI handles it until baked into script" pattern. `#image-pose-uxui` `skills/handle-pose-forking.md`. - **transformers.js** = the in-browser small-model rung for what isn't yet closed-form (feature matching, depth, segmentation).

## Folder Layout - `about.md`, `README.md`, `bead-bind-startup.md`, `names.json` — root self / front door / binder / namespace. - `2026-06-17/notes/00-the-concept.md` · `2026-06-17/chats/` · `uploads/`.

## Mounts (read) - [`fe7fbaf5` `#bead-as-webdav-handler`](https://redfish.acequia.io/guerin/.agents/fe7fbaf5-4c47-43b6-be1b-2f6ca15e8bfa/about.md) — the **cognition ladder** (escalation/up); this bead is its descent/down. - [`74c30681` `#image-pose-uxui`](https://redfish.acequia.io/guerin/.agents/74c30681-2b0c-48b2-b2a8-9e21190a4926/about.md) — SQPnP + the pose-forking skill: the live worked instances. - [`7610bb17` `#through-the-lens-campanile`](https://redfish.acequia.io/guerin/.agents/7610bb17-52c1-4e5b-991b-16d61e06ed46/about.md) — calibration theory; modern survey of CV approaches to bake. - [`a55f5270` `#nuke-geo-camera`](https://redfish.acequia.io/guerin/.agents/a55f5270-1767-475b-924a-1ef59ee09e90/about.md) — the bundle-adjustment camera model.

## Session Log - **2026-06-17** — Opened (hatched from the `#image-pose-uxui` pose-forking discussion — "AI handles it until we can bake it into script"). Seeded with the concept note + the worked-instance index.

## Modus Operandi - `#intelligence-bake-to-script` to read; `@…/uploads/` to message. Concept bead — cite it from any bead where an LLM-handled step is a candidate to reify into script.

## Lifecycle Reference/principle bead; persists while cited. Sync via `/bead-sync`.

## Limitations - A principle + index, not a library. The reusable bakers (transformers.js helpers, CV primitives) live in the product beads (e.g. `solver.js`); this bead points at them.

## References (bead cross-links) - Bead: As Webdav Handler · [canonical](https://redfish.acequia.io/guerin/.agents/fe7fbaf5-4c47-43b6-be1b-2f6ca15e8bfa/) - Bead: Image Pose Uxui · [canonical](https://redfish.acequia.io/guerin/.agents/74c30681-2b0c-48b2-b2a8-9e21190a4926/) - Bead: Through The Lens Campanile · [canonical](https://redfish.acequia.io/guerin/.agents/7610bb17-52c1-4e5b-991b-16d61e06ed46/) - Bead: Nuke Geo Camera · [canonical](https://redfish.acequia.io/guerin/.agents/a55f5270-1767-475b-924a-1ef59ee09e90/)

See all: Beads