Your browser sucks, JavaScript disabled! Gunnar's console needs JavaScript and WebAssembly. Git over SSH on port 2222 does not.

nordisk/nornir

.nornir/funnel-token-and-plan-from.md

Funnel: token config + plan-from workspace autodiscovery — the idiot-proof guide

Everything a human needs to make the funnel fire on this box: how funnel plan-from finds your workspace, and exactly where to put the Claude (Anthropic) token so the LLM planner/executor + the 🤖 Claude tab work. Both degrade gracefully — offline modes exist and the human-facing errors point right back here.


1. funnel plan-from <idea-id> — how the workspace is discovered

plan-from turns a funnel idea into a plan-DAG: it builds the cross-repo dependency graph, classifies the idea → component(s), computes the affected set, and weaves one node per affected component. To build the graph it must find the workspace's nornir-workspace.toml descriptor.

Resolution order (first hit wins)

The descriptor is resolved by mimir::resolve_descriptor_at(workspace_root, config_path) — the SAME resolver submit/idea/mimir use, so every funnel verb agrees:

  1. $NORNIR_WORKSPACE — an explicit pin. May be the descriptor file (…/nornir-workspace.toml) OR a directory holding it. Always wins.
  2. <workspace_root>/nornir-workspace.toml
  3. <workspace_root>/workspace_holger/nornir-workspace.toml (legacy holger).
  4. <workspace_dir>/nornir-workspace.toml — the workspace_*/ dir itself, i.e. the grandparent of a workspace_<name>/release/nornir.toml config.
  5. <config_dir>/nornir-workspace.toml (next to release/nornir.toml).

The bug this fixes

Standing in git/workspace_nordisk, config::discover sets workspace_root = git/ and config_path = workspace_nordisk/release/nornir.toml. The descriptor lives at workspace_nordisk/nornir-workspace.toml — the config's grandparent. The old list only searched git/, workspace_holger/, and release/, so plan-from failed with "no nornir-workspace.toml found" even though the file was right there. Candidate #4 (and the $NORNIR_WORKSPACE pin #1) close that gap for any workspace name, not just workspace_holger.

Prove it end-to-end

cd git/workspace_nordisk
nornir funnel idea "add a dark theme toggle"      # → i-042
nornir funnel plan-from i-042                      # builds the graph, derives the plan
nornir funnel show                                 # displays the plan p-NNN + its nodes

--dry-run prints the derived plan without writing it; --component <name> skips classification and targets a component directly (handy when the local LLM isn't running). If a workspace member is git-sourced and not yet cloned locally, the graph build asks you to bootstrap that checkout — that is a workspace provisioning step, separate from descriptor discovery. On a box with local checkouts, pin a path=-member descriptor via $NORNIR_WORKSPACE.


2. Where to put the Claude (Anthropic) token

The LLM planner (funnel prompt --llm), funnel decompose, the funnel run executor (claude: generator backend), and the 🤖 Claude tab all talk to the Anthropic Messages API through ONE client (viz::claude). They resolve the key from a single chain — first non-blank wins:

# Source Put it here
1 env ANTHROPIC_API_KEY export ANTHROPIC_API_KEY=sk-ant-… (best for CI / headless / systemd Environment=)
2 file ~/.nornir/anthropic-key printf '%s' sk-ant-… > ~/.nornir/anthropic-key && chmod 600 ~/.nornir/anthropic-key (durable; survives restarts)
3 🤖 Claude tab session token paste sk-ant-… into the tab's field — held in memory for that session only, never written to disk

Do NOT reuse ~/.nornir/token for this — that file is the nornir-server bearer token (a different secret). The Anthropic key has its own file, ~/.nornir/anthropic-key, so the two are never conflated.

Quick setup (the durable way)

umask 077
printf '%s' 'sk-ant-YOURKEYHERE' > ~/.nornir/anthropic-key
chmod 600 ~/.nornir/anthropic-key            # 0600 — owner-only
# verify (should print a plan, not a "no key" hint):
nornir funnel prompt --llm i-042

Graceful degradation (no token present)

The funnel never panics when the key is absent — it degrades:


3. The plan-DAG grows

Once a plan exists, the 🗂 Plan-DAG view (metric-bearing facett-plandag) renders every node and grows as nodes are added. On dwarf the funnel panel (dwarves/crates/nornir-funnel-embed) auto-polls Funnel.Show on an interval, so the DAG grows on its own as ideas land — no manual refresh. Coverage:


See also