Skip to main content
T3 fan-out · strategy / product marketing: the flagship for_each. The number of pages is decided at RUNTIME by the competitor’s sitemap; max_parallel keeps the crawl polite, fail_fast: false keeps one dead page from killing the radar, retry: absorbs the flaky web.

The job

Monday 8am: what did they ship? Instead of 40 tabs, the sitemap is mapped, every page it says changed in the last window_days days (at most max_pages of them) is read concurrently, and one brief tells you what it signals. Every page that survives lands in the fan-in; every page that doesn’t is reported, not fatal.

The shape

The file

competitor-radar.nika

How it works

1

The collection is computed, not hardcoded

nika:date computes the cutoff and recent keeps the sitemap entries modified since then. That URL list crosses the boundary (urls: ${{ tasks.recent.output }} in with:), then for_each: { items: ${{ with.urls }} } fans out: six URLs this week, two next week. The DAG doesn’t change.
2

Resilience is per-iteration

retry: (exponential + jitter) and timeout: "30s" apply to EACH page fetch. fail_fast: false collects errors instead of aborting the batch.
3

The fan-in is just a reference

${{ tasks.pages.output }} is the array of per-page outputs, in input order. readable zips it back onto the URLs with jq transpose and drops the pages that failed; one prompt reads the result.

Constructs you just used

Run it

What it needs: Network access to the site you watch (nika.sh by default) and a local model (Ollama serving qwen3.5:4b) for the digest. No key and no secret.
1

Rehearse it

A mock model answers and nothing is written in your folder. Its network fetches still go out: a rehearsal replaces the model, not the tools. Before it runs, nika try names those hosts: may reach: nika.sh — the mock replaces the model, not the network.
2

Get your own copy

Save the file above as competitor-radar.nika in a new folder. It reads no sample file.
3

Check it, then run it

The run writes radar/competitor-brief.md.Any other model works: pass --model <provider>/<name> with its key, and cap a cloud model with --max-cost-usd.To watch another site, change inputs.sitemap_url and the host in permits.net.http together: a permit is a literal and cannot read an input (NIKA-AUTH-007).

Make it yours

  • Track THREE competitors: run the workflow once per sitemap with --var sitemap_url=…, each host listed in permits.net.http, and merge the briefs.
  • Narrow the selection in the recent jq expression (a path prefix such as /blog/, for example) before fanning out.
  • Schedule it for Monday 07:30 from your host’s cron. The brief is on your desk before standup.

Next · Localization factory

Chained fan-outs and the jq transpose zip: the whole docs tree, translated.