Field notes / BackfocusLab

For agents & developers

Stable inputs, deterministic calculations, explicit units, and portable results.

Use the same model as the workbench

The static browser modules export config, compute(state), and resultReport(state). Import them as ES modules. compute validates and normalizes inputs without mutating them, uses no network requests, and returns structured checks. No hosted calculation API or authentication service is implied.

Plan contract

Version 1 plans contain product, version, fields, tables.train, and demo. All dimensions use millimeters except pixel size in micrometers. The reducer and refractive index are dimensionless. Components require name, length, input, output, and source, with an empty string allowed for source. Imports normalize known keys; published schemas describe the normalized output.

Result contract

Result JSON carries schemaVersion, product, methodVersion, plan, units, result, and limitations. result.raw values are unrounded. Display strings are localized and should not be parsed as numbers. Check statuses are pass, review, or unknown. A nominal pass never establishes physical or optical compatibility.

Limits and safe automation

Files are limited to 2 MiB and tables to 10,000 rows. Shared URLs are capped at 12,000 characters. Source URLs permit HTTP and HTTPS without credentials and are not fetched automatically. CSV exports neutralize spreadsheet formulas. Prefer a JSON export when a rig is too large for a link.

Machine-readable resources

import { compute } from './assets/domain.mjs';
import { readPlan } from './assets/plans.mjs';

const result = compute(readPlan(planDocument));
console.log(result.raw.gap); // mm, positive = add spacing

Keep exploring

Reference documentation

Build your backfocuslab