WorkLensDocs
    Studio
    concept

    How WorkLens works

    Every source WorkLens reads, what the engine does with it, and the artifacts that come out with a receipt — the whole picture in one diagram.

    Last updated 2026-09-13 · Markdown

    Summary

    Everything WorkLens can read, what it does with it, and what comes out. Each source is read for its shape — tables, columns, rules, relationships — never as the values to copy. The engine writes new data that obeys that shape, and a receipt saying what it did.

    WHAT YOU ALREADY HAVEWHAT YOU GET▸ WORKLENS1 · RECIPE + PACKSyou — or your AI — create therules and approved valuessay yes once — saved in git2 · GENERATEthe engine makes your datalocally — no cloud, no AIidentical every time3 · REUSErun it again anytime, anywherea receipt with every runsame bytes — forever{ }+recipe (rules) + packs (values)orders.wl.json · fixtures/packs/AvaACME2041→the engine fills the tableson your machine · zero upload✓✓✓sha256 9f4e…rerun → same bytes + receiptworklens.lock · verify anywhereYour API descriptionOpenAPIReads your API file✓ YAML or JSON spec✓ entities & links from schemas✓ enums, ranges, formats✓ AI lifts rules from descriptionsYour app's data modelPrismaReads your Prisma schema✓ models become entities✓ relations become links✓ types & defaults mappedYour database designSQLReads CREATE TABLE✓ tables become entities✓ primary & foreign keys✓ types, NOT NULL, uniquesYour data rulesJSON SchemaReads JSON Schema✓ properties become fields✓ required & enums✓ min / max boundsYour code's checksZodReads Zod checks✓ z.object becomes entities✓ validations become rulesYour code's typesTypeScriptReads TypeScript types✓ interfaces become entities✓ optionals & unions handledA sample fileCSV / XLSXLearns from one file✓ CSV · XLSX · JSON✓ shapes & masks — never values✓ privacy-safe histogramsAnything elseAI reads itYour AI reads it✓ Pentaho / Hop jobs✓ COBOL copybooks✓ plain-English specs✓ validator double-checksReady-to-use test datafiles for your teamFiles your team can use✓ CSV · JSON · XML✓ bank files: ABA & NACHA✓ custom fixed-width layouts✓ links intact · books balancedA receiptproof every rule heldSeven proof lines✓ rules held · totals add up✓ journeys legal · shapes real✓ trees & graphs verified✓ file format reconciled✓ + SHA-256 fingerprintA rerun guaranteeanyone can recreate it exactlyByte-identical, forever✓ same recipe + seed = same bytes✓ worklens.lock pins everything✓ perfect for CI diffsYOU STAY IN CONTROLsay yes oncetry variationsbreak things safely, on purposefresh data anytime — same rules

    How it works

    1. Recipe + packs: you, or your AI assistant, write the recipe from what you already have. You say yes once, and it is saved in git like code.
    2. Generate: the engine fills the tables on your machine — no cloud, no upload — and the result is identical every time for the same seed.
    3. Reuse: run it again anywhere for the same bytes, with a fresh receipt each run. Try variations, or break things safely on purpose.

    Inputs and outputs

    Goes in
    • Your API description (OpenAPI)
    • Your app's data model (Prisma)
    • Your database design (SQL)
    • Your data rules (JSON Schema)
    • Your code's checks (Zod)
    • Your code's types (TypeScript)
    • A sample file (CSV or XLSX)
    • Anything else — an AI assistant reads it and drafts the recipe
    Comes out
    • Ready-to-use test data — files for your team, in the format your system expects
    • A receipt — what was asked for, what was made, and which checks were run
    • A rerun guarantee — a lock file so anyone can recreate the run exactly

    What is checked

    WorkLens checks
    • Every rule the recipe declares is enforced while the rows are written, and the receipt records whether each check held.
    • Keys always point at a row that exists; totals match their children; values stay inside declared ranges and allowed lists.
    WorkLens does not check
    • A source that lacks a rule the engine needs leaves that rule undeclared. The receipt lists anything declared but not generated rather than filling the gap silently.
    • Whether your application behaves correctly on the data is outside the receipt — WorkLens describes the data, not your code.

    Common questions

    Does the engine copy values from my sample file?

    No. A sample file is read to derive a recipe — column names, types and patterns. The recipe that results is data-free (the check command verifies it), and it is the recipe, not the file, that generation runs from.

    What if my source does not say enough to build a full recipe?

    The recipe is a draft you finish. Whatever is missing can be added by hand or by an AI assistant, and anything the engine cannot honour is disclosed in the receipt rather than guessed.