AGPL-3.0-or-later · forever.

the workflow library

t3-localization-factory

every doc translated in parallel, the tree mirrored back. A pack showcase file, shown whole to read; nika run t3-localization-factory.nika.yaml is the honest affordance — this site never fabricates a replay for it.

  • 6tasksthe plan below walks them
  • 6wavesrun together when they can
  • invoke · inferverbsthe whole grammar it speaks
  • browseread, then runno fabricated replay

the plan

derived from the file, never drawn by hand
filesinvoke
textsinvoke
pairsinvoke
translatedinfer
bundleinvoke
mirrorinvoke

the file, whole

t3-localization-factory.nika.yaml
t3-localization-factory.nika.yaml
nika: v1workflow:  id: localization-factory  description: "glob docs → parallel read → parallel translate → mirror tree"model: ollama/qwen3.5:4b   # local default · swap for mistral/mistral-large (EU model for EU locales)vars:  lang: "fr"  source_glob: "./docs/**/*.md"tasks:  files:    invoke:      tool: "nika:glob"      args:        pattern: "${{ vars.source_glob }}"        exclude: ["**/node_modules/**"]  texts:    with:      files: ${{ tasks.files.output }}    for_each: ${{ with.files }}    max_parallel: 8    invoke:      tool: "nika:read"      args: { path: "${{ item }}" }  pairs:    with:      files: ${{ tasks.files.output }}      texts: ${{ tasks.texts.output }}    invoke:      tool: "nika:jq"      args:        input: ["${{ with.files }}", "${{ with.texts }}"]        expression: "transpose | map({path: .[0], text: .[1]})"  translated:    with:      pairs: ${{ tasks.pairs.output }}    for_each: ${{ with.pairs }}    max_parallel: 3                    # rate-limit the provider    fail_fast: false                   # finish the batch · a failed file yields null at its index    on_error:      recover: null                    # null keeps the transpose zip aligned (order preserved)    infer:      prompt: |        Translate to ${{ vars.lang }} · keep markdown structure, code blocks        untouched, and the original tone ·        ${{ item.text }}  bundle:    with:      pairs: ${{ tasks.pairs.output }}      translated: ${{ tasks.translated.output }}    invoke:      tool: "nika:jq"      args:        input: ["${{ with.pairs }}", "${{ with.translated }}"]        expression: "transpose | map(select(.[1] != null)) | map({path: .[0].path, text: .[1]})"  mirror:    with:      bundle: ${{ tasks.bundle.output }}    for_each: ${{ with.bundle }}    max_parallel: 8    invoke:      tool: "nika:write"      args:        path: "./i18n/${{ vars.lang }}/${{ item.path }}"        content: "${{ item.text }}"        create_dirs: trueoutputs:  files:    value: ${{ tasks.files.output }}    description: "Every source file that was mirrored"

lines 4344: for_each: one run per doc, three in flight at a time. Source: the spec pack · open it in the playground →

Watch the recorded one replay on the home page, walk the showcase gallery, or install and run the file yourself.