# Custom packs

> Writing a pack of your own — the manifest every pack shares, provenance, tokens, and the agent loop that drafts one when a run is missing it.

Section: Packs · Type: guide · Last updated: 2026-09-13

validate_recipe returned missing_packs. Every entry there is a token the recipe requires and no registered pack supplies. Draft the pack, show it to the user for approval, and have them save it next to the recipe — the next run resolves cleanly. Never drop the requirement to make the error disappear, and never substitute a pack that happens to be close.

## The picture

validate_recipe (missing_packs) → plan_packs (how many values) → Draft pack (you or your agent) → register_pack / --pack

WorkLens supplies the shape, the requirement and the validation; the values come from you.

## pack_manifest

- name — string (required) — kebab-case, e.g. 'jp-locale'
- version — string (required) — semver, start at 1.0.0
- owner — string (optional) — who maintains it
- provides — string[] (required) — the exact tokens this pack satisfies, e.g. ['locale:jp.names']. These must match the recipe's manifest.requires entries character for character, or the resolver will not find them.

## pack_provenance

- method — string — 'ai-drafted' | 'sourced' | 'bundled'
- drafted_by — string (optional) — the model or person that wrote it
- drafted_at — string (optional) — ISO date
- reviewed_by — string|null — null is the honest default. Do not fill this in on your own behalf.
- basis — string (optional) — what the contents were derived from, plainly
- caveats — string[] (optional) — what you know is shaky. Say it here rather than nowhere: "postcodes were not checked against the postal authority" is far more useful than silence.

## A minimal locale pack

```json
{
  "pack_manifest": {
    "name": "nz-locale",
    "version": "1.0.0",
    "owner": "you",
    "provides": [
      "locale:nz.surnames"
    ]
  },
  "pack_provenance": {
    "method": "ai-drafted",
    "drafted_by": "your agent",
    "drafted_at": "2026-09-13",
    "reviewed_by": null,
    "basis": "General knowledge; not a published register."
  },
  "datasets": {
    "surnames": {
      "columns": [
        "surname"
      ],
      "rows": [
        [
          "Smith"
        ],
        [
          "Wilson"
        ],
        [
          "Tane"
        ]
      ]
    }
  }
}
```

node packages/sdk-node/bin/worklens.js generate recipe.wl.json --pack nz-locale.json

## Common questions

**Who writes the values?**

You, or your own agent, never WorkLens. The engine states what a recipe requires and how many distinct values each field needs; the pack content is yours to draft and review, and the receipt carries the pack’s provenance so a reader knows what the data rests on.

**Who vouches for a pack?**

Its provenance and its hash. pack_provenance records who drafted it, when, on what basis and who reviewed it; the SHA-256 in every receipt proves the contents have not changed since. WorkLens does not sign packs — if your organisation needs a signature, your CI signs the pack file with its own identity.

## Related

- [Locale packs](https://theworklens.com/docs/packs/locale): Names, companies, streets, suburbs and bank codes for a region come from a locale pack you register. None ships with WorkLens; examples live in the repository.
- [Domain recipes](https://theworklens.com/docs/packs/domain): No domain recipe ships with WorkLens. Your AI assistant drafts one for your business through MCP; worked examples live in the repository.
- [register_pack](https://theworklens.com/docs/mcp/tools/register-pack): Hand a pack you drafted back to the engine so generation can use it — a locale pack (datasets for a region) or a rule fragment (one type_def or one…
- [plan_packs](https://theworklens.com/docs/mcp/tools/plan-packs): Turn a recipe into a pack requirement plan — and read the shelf off it: which packs are needed, which of those a pack on this machine already resolves (name,…

_← Previous: [Domain recipes](https://theworklens.com/docs/packs/domain) · Next: [Validate](https://theworklens.com/docs/validate) →_

_The manifest shape and the authoring rules come from the pack-authoring guide the MCP server serves. Source: get_recipe_schema (pack_authoring)._

_Canonical: https://theworklens.com/docs/packs/custom · This copy: https://theworklens.com/docs/packs/custom.md_
