# 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.

Section: Getting Started · Type: concept · Last updated: 2026-09-13

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.

## The picture

What you have (API · model · SQL · rules · file) → Recipe + packs → Generate (locally) → Reuse (same bytes, receipt)

> The web page shows this as a diagram. Everything the diagram says is in the text here.

## 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

- 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

## Outputs

- 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 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.

## What 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.

## Related

- [What is WorkLens?](https://theworklens.com/docs/getting-started/what-is-worklens): What WorkLens is, what it makes, and the one idea underneath it: a recipe in, evidence out.
- [Recipes](https://theworklens.com/docs/recipes): A recipe describes what data WorkLens should generate: entities, fields, rules and links, in one JSON file you keep in git.

_← Previous: [What is WorkLens?](https://theworklens.com/docs/getting-started/what-is-worklens) · Next: [Quickstart](https://theworklens.com/docs/getting-started/quickstart) →_

_Canonical: https://theworklens.com/docs/getting-started/how-it-works · This copy: https://theworklens.com/docs/getting-started/how-it-works.md_
