Skip to main content
Law recorded once reaches every later session. A ruling can outlive its premise, the fact it was made about. Code merges, CI changes, and a stored check reads differently than at record time. F[no] ships three pieces that keep the law set current: the nightly upkeep pass, the near-ruling check on new law, and the decision log. The model behind law itself, and the difference between a ruling and a law, is on How decisions and law work.

Why law goes stale

A law with a state check, such as --while <COMMAND>, stores the answer it saw. State checks and end dates are covered under Active periods. The fno inbox law match and fno inbox law stage commands refresh that answer each time they run. When merged code or CI changes, the stored reading can stop describing the world: the law row is stale. A law whose --until date passed is expired. If a check cannot run at all, the row reads unknown. All three states mean the law is not dependable, so the upkeep pass looks for them.

Run the pass

Run the pass in your project root. Without --apply it reports and touches nothing:
Add --apply to act, and --json for machine-readable output:
With --apply, the pass decides one action for each row:
Note: Rows with your quoted words are never retracted by the pass. The question lands on your board, the open-question list fno inbox outstanding shows, and names the law, the moved premise, and your exact words. It asks you to retire, renew or restore the law by hand. One question per law stays open per stale episode, one nightly finding, so the nightly pass never re-asks.
The pass writes every retraction as a record. The record carries retracted_by: law-upkeep and a reason that names the state and the moved reading. The record history then shows why the row died. With --json, the summary counts each state and action: Two laws can carry the same subject. The pass reports them. It never merges or deletes either row.

The nightly agent

Install the pass as a nightly launchd agent:
The agent runs fno inbox law upkeep run --apply every night at 02:30 local time, half an hour after groom, F[no]‘s other nightly job, so the two never race. --hour N moves the hour. --dry-run prints the agent file and registers nothing. On macOS the plist lands at ~/.fno/agents/Library/LaunchAgents/sh.fno.law-upkeep.plist, and the label reads sh.fno.law-upkeep with a per-home suffix. The agent writes law-upkeep.out.log and law-upkeep.err.log into the logs dir beside it. On other systems, such as Linux, the command prints status unsupported and the cron line to schedule by hand: 30 2 * * * fno inbox law upkeep run --apply. Check the installed state:
A terminal. The command prints one JSON line: installed is false, the label carries a per-home suffix, and no run is on record yet. Captured from a source build of fnodotdev/fno main (PRs 156, 157 and 179), not a release binary. The JSON prints on one line. This shot wraps it for print. The status prints installed only with the plist file on disk and the label loaded in launchd. The age of the last run comes from the out log. A plist without a loaded label reads as not installed. Uninstall the agent:

Name near rulings

Recording law writes a rule other sessions obey. A new law that says nearly the same thing as a live ruling has to account for it. When you run fno inbox law set, the command first reads the live laws and lead role rulings, the rulings a lead role recorded. The read covers one scope, the reach a law’s scope flags set. Near means at least 6 shared topic words with the new law, at half or more of the shorter text. Topic words are the words that carry the subject. The write refuses until you name each near ruling:
--supersedes <id> records the new law and retires the old row. --keep <id> records the new law and leaves the old row live beside it. The refusal exits with code 3 and names the ruling ids, so an agent can act on it.

The sweep

A law that exists changes no work by itself. After the write, the command ranks your open nodes, the unfinished work items on How work is organized, by the law’s words. Rare words weigh more, and the read takes up to 5 words. Every open node that matches gets the law in one message from fno/law-sweep in the fleet’s mail (message agents). The session that owns the work sees the rule the day it lands. The word read can miss a guide that never uses the law’s own words. Pass the missing word yourself:
Each --sweep <word> adds the open nodes that carry the word. A node with an owner session gets the message. A node with no owner prints one line on stderr instead.

The decision log

The decision log is one markdown file beside your plans dir, the directory your project keeps its plan files in: decision-log.md. It lists the live rulings by subject, then the retirements of the last 30 days. One file shows what stands and what recently died. Every law write rewrites it: fno inbox law set, retract, restore and renew, plus fno inbox decide and fno backlog decide-retract. To rewrite it on demand and print its path:

Next steps