> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# How decisions and law work

> Why a ruling you make once reaches every later session, and how a record earns the authority it carries.

A ruling stated in chat dies with the conversation. F\[no] records it: the question, your answer, and the authority it carries, in stores that outlive every session. A new session reads the record instead of asking you again.

To answer a question or drop a rule from chat, follow [answer from chat](/docs/guides/answer-from-chat.md). This page explains the model behind that guide.

> **Note:** This page describes F\[no] 0.4.9. Recording a law now names its near rulings first, and every law write keeps a decision log current. This page covers both. The nightly pass that retires law whose premise moved has its own page: [How law stays current](/docs/concepts/law-upkeep.md).

## Review a recorded decision

The Decisions view lists recorded rulings and their authority. Follow [Review recorded decisions](/docs/guides/review-decisions.md) to inspect a row, audit its authority, or retract or overrule it. The CLI query sections below provide the agent's lookup path.

## A ruling, traced

1. An agent needs a decision. It files a question that names the topic, the options, and its recommendation.
2. You reply in chat: "call it export".
3. The agent runs `fno inbox outstanding clear D1 --answer "call it export" --authority chat_attested --quote "<your exact words>"`. `D1` is the number your board shows for the question.
4. The command prints `closed D1 (decision d-... recorded)`. The question leaves your board.
5. A session weeks later reads current law for that topic and gets your ruling, not a new question.

The record identifies its recorder. `decided_by` names the recording session. `chat_attested` says the agent recorded your quoted words. A typed name in `relayed_by` is not proof of who made the ruling.

## One number for a question and its answer

A question is a decision not yet made. F\[no] treats the two as one record with one number. Your answer keeps the number of its question. Releases up to 0.4.7 print the `q-` hash instead. Upgrade to use the numbers below.

In the traced ruling above, the question is `D1` on your board. After you answer, `fno backlog decisions` lists the ruling as `D1` as well, with its question below it. The answer does not take a second number.

| Where you see the number | What it shows |
| - | - |
| The question board and `fno inbox outstanding` | `D1` beside the open question |
| The receipt of `outstanding clear` | `closed D1 (decision d-... recorded)` |
| `fno backlog decisions` | `D1` on the ruling, with its question below it |

Four rules apply:

* **One sequence.** A new question or decision takes the next `D` number. A number never changes after F\[no] assigns it.
* **Type the number.** `fno inbox outstanding clear` accepts `D1`, `d1` or the `d-` hash form, such as `d-c23bea6d`.
* **Old `Q` numbers still resolve.** A question that held a `Q` number before the change keeps it. A new question gets no `Q` number. For a new question, `Q2` prints "no question numbered Q2 on this machine yet". Use `D2`.
* **A new row can show its hash first.** The numbering job runs about once a minute. A row filed in the last minute can print its hash until the job reaches it.

With a shared store (`store.remote_url`), the primary machine assigns every number. Two machines then show one number for one question. A machine without a primary counts in its own store.

## The authority lanes

Every record answers one question first: who is entitled to decide this? F\[no] answers with a lane.

| Lane | Who writes it | What it authorizes |
| - | - | - |
| `law` | You: a terminal ruling, or your chat answer | Enforced rules that reach later sessions |
| `coord` | An agent, by default | Coordination between sessions, never enforcement |
| `grant` | A run you told to act without asking | What the grant named, nothing more |
| `unattributed` | Nobody provable | Nothing, ever |

An agent ruling never becomes law. A chat answer of yours is law once it is recorded. The record is marked `chat_attested`, the mark that your chat said it, and a chat answer never grants a merge.

## Where a ruling lives

One decision ID connects the record across three stores:

| Store | What holds it |
| - | - |
| Project journal | `<repo>/.fno/events.jsonl`, the audit trail |
| Decision index | `~/.fno/decisions.jsonl`, append-only, never rotates |
| The node | The `decisions` array on the node it is about |

The index never rotates. A ruling carried away by rotation is a ruling lost, and recall exists to prevent that. The journal is durable and project-local. The node carries the ruling where the node's readers already look.

## Read current law

```text theme={"theme":{"light":"min-light","dark":"min-dark"}}
Show me the current law for the topic I name. Explain any conflict before acting on it. Ask me for the topic if it is missing.
```

### What the agent runs

The agent substitutes your topic for `<topic>`:

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
fno backlog decisions <topic> --lane law --state live
```

The standing query prints one of three verdicts: `CURRENT LAW`, `LAW CONFLICT`, or `NO CURRENT LAW`. Only `CURRENT LAW` is an actionable answer. This standing query never resolves a conflict by choosing the newest row. The event rule set uses the precedence below. A damaged index is a read failure, never "no law".

## Law has a scope

A law applies to the project where it was recorded unless you choose a wider scope. The [guide](/docs/guides/answer-from-chat.md#record-a-law-with-limits) shows how to ask your agent to record one.

| Scope flag | Sessions it reaches |
| - | - |
| No flag | The recording project |
| `--global` | Every session |
| `--machine` or `--machine=<ID>` | This machine, or the named machine |
| `--user` or `--user=<NAME>` | This user, or the named user |

`--user` replaces `--person`. Older records can still carry `person:<name>`. One law accepts one scope flag. A global law, or one naming another machine or user, requires the certificate below.

Filters narrow a scope. `--filter <KEY>=<VALUE>` includes matching sessions. `--not <KEY>=<VALUE>` excludes them. Values can be comma-separated choices. A branch value ending in `*` matches that prefix.

Supported keys are `node`, `epic`, `project`, `priority`, `size`, `difficulty`, `domain`, `harness`, `provider`, `model`, `branch`, `role` and `lead`. A session with no value for a fact passes that filter. Do not treat a filter as proof of identity. The law command refuses `lane`, `pr_label` and `pr_over_lines`, which have no session facts yet.

`--paths` limits the law to matching file edits. A scoped law and its filters answer different questions: which sessions can read it, and which facts must match there.

## Active periods

A law can have a start, state checks, a daily window and an end date.

| Option | When the law applies |
| - | - |
| `--from date:<DATE>` | From that date or RFC 3339 timestamp |
| `--from event:<NODE_ID>` | After that node closes |
| `--while <COMMAND>` | While every specified command exits 0 |
| `--between HH:MM-HH:MM` | Inside that daily window in the machine's local time |
| `--until YYYY-MM-DD` | Through that last day |

A date without a time starts at local midnight. A daily window includes its start and excludes its end. It can cross midnight, such as `22:00-08:00`. Equal start and end times refuse. Every supplied condition must pass, subject to the unread-check behavior below.

The match and stage commands refresh state checks. The rule set reads their cached answers. The cache reuses checks younger than one minute. If a check cannot run, its previous answer remains. Without a previous answer, it leaves the law on. A time condition does not delete the law from history or prevent its retraction.

A rule that fires on its last day or the preceding day names its end date and the renewal command. [Renewing a law](/docs/guides/answer-from-chat.md#renew-a-law) records a new ID with the new end date. It supersedes the previous row.

## Strength and precedence

A law carries one of four strengths. Without `--strength`, it uses `inform`.

| Strength | Effect in the event rule engine |
| - | - |
| `inform` | Adds context |
| `warn` | Warns and allows the action |
| `require-ack` | Blocks until the event acknowledges the rule |
| `block` | Refuses the action |

These effects depend on the rule's trigger. A structural trigger matches facts such as an edit path. A ranked text match supplies context at a prompt or skill. A ranked match cannot block an action. Imported law rules also cap denying actions at `warn`.

For two live laws on one subject, the event rule set first chooses the narrower scope that applies here. User and machine scopes rank above project, which ranks above global. Paths narrow each scope further. At equal narrowness, the newer row wins. User and machine scopes have equal rank. A nonempty path list adds narrowness regardless of the number or length of its patterns. Losing rows remain in history and do not fire.

The standing query in [Read current law](#read-current-law) still reports `LAW CONFLICT` for multiple live rows. Its conflict requires resolution before a gate that reads that query acts. Rule-set precedence does not supersede or retract either record.

## Proof for wide laws

A user certificate binds one user name to one machine public key. The private user key signs that certificate. A certified machine signs the law rows it records. [Prepare a machine](/docs/guides/answer-from-chat.md#prepare-a-machine-for-a-wide-law) shows the setup through your agent.

A configured `fleet.owner` name is not enough for a global law or a law naming another machine or user. With no certificate, those writes refuse. Restoring such a law requires the same certificate check.

A certified machine also checks wide rows it reads: global, machine and user law. For rows recorded since 2026-11-03, it requires a signature proven by its own trusted user key. It withholds unsigned rows and rows signed under another user key. A retraction or supersession of proven wide law needs the same proof. The decisions query reports the withheld count.

Project law needs no such proof. Older rows retain their legacy behavior. A machine with no certificate reads rows as before. A chat-attested signature proves that the certified machine signed the row, not that you typed the quoted words.

## Rule explanations

An explanation checks a described event against the current rule set without performing its action. The [guide](/docs/guides/answer-from-chat.md#explain-why-a-rule-applies) shows the agent prompt and request.

Each response row carries a rule ID, action, tier, status and clauses. If the rule comes from law, the row also names its law ID. Each clause states its filter, whether it held, its patterns and the event value it saw.

| Status | Meaning |
| - | - |
| `applies` | A structural rule matches this event |
| `out-of-scope` | The event is outside the rule's scope |
| `expired` | The rule's end date passed |
| `stop-engine` | The Stop engine evaluates this rule's predicates |
| `unmatched` | At least one event filter failed |
| `retrieval` | A text rule needs ranking at a prompt or skill event |
| `unevaluated` | A classifier rule has no decision here |

Tier 0 means structural matching. Tier 1 means text ranking. Tier 2 means classification. A `retrieval` row is not proof that the rule fired. Explanation reads the same structural clauses as the decision engine.

## How a ruling ends

If a newer ruling replaces an older one, supersede it with `--supersedes <DECISION_ID>`. The old row stays, marked superseded. If a rule no longer applies, retract it: `fno inbox law retract <LAW_ID> --reason "<why>" --quote "<your exact words>"`. Restore undoes a retraction and prints a new id.

Since 0.4.9, recording a law also accounts for the rulings near it. Before `fno inbox law set` writes, it reads the live laws and lead role rulings, the rulings a lead role recorded, in the same scope. Near means at least 6 shared topic words with the new law, at half or more of the shorter text. The write refuses, with exit code 3, until you name each near ruling: `--supersedes <id>` retires it, `--keep <id>` keeps it beside the new law. After the write, the command mails the law to the owners of open work its words match, and `--sweep <word>` reaches nodes the words alone miss. [How law stays current](/docs/concepts/law-upkeep.md) covers the refusal and the sweep.

## The decision log

Since 0.4.9, one markdown file beside your plans dir lists the live rulings by subject and the last 30 days of retirements. The file is `decision-log.md`, and the plans dir is the directory your project keeps its plan files in. Every law write keeps it current: set, retract, restore and renew, plus `fno inbox decide` and `fno backlog decide-retract`. To rewrite it on demand and print its path, run `fno backlog decisions --log`.

Records can be live, expired, superseded, retracted, unknown or unscoped. `unknown` means a required graph read failed. `unscoped` means closure evidence is missing or ambiguous. Neither state counts as live. When its node closes, a coordination record can expire. Law does not expire because its node or PR closes. Its date limits control the active period of its event rule. None of these states deletes history.

## Consequences for you

* Only your word is law. An agent can record coordination in the same command group.
* If the record is unreadable or in conflict, a gate that reads current law answers "unanswered", never permission.
* If a subject has two live rows, the standing query says `LAW CONFLICT`. Resolve it before a gate uses that query.
* Law reaches a session at the moment it is needed, not in bulk. A session never loads all law.

## Next steps

* [Answer from chat](/docs/guides/answer-from-chat.md): the guide for the chat path.
* [How law stays current](/docs/concepts/law-upkeep.md): the nightly upkeep pass, near rulings and the decision log.
* [How the attention ledger works](/docs/concepts/attention-ledger.md): the weekly read of what coordination costs you.
* [How work is organized](/docs/concepts/work-contracts.md): nodes and claims.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.