Skip to main content
The rule files under .actual/rules/ are the decisions that govern a repository today: they’re what plan-check and impl-check read. actual rules lists them and picks the ones that govern a path or a plan, with no sign-in. Signed in, actual adr list and actual adr show read your organization’s decisions in Actual AI, drafts and suggestions included.

The rule files in a repository

actual rules ls lists every rule document under .actual/rules/, with a count of its rules by level and any parse warnings or errors:
A rule file can open with a YAML header that names its decision’s id, status and the paths it governs. A decision whose status is draft, deferred, rejected or similar doesn’t govern. With --json, a document with a header also reports its adr_id, status and root. Reading headers needs Actual CLI 0.9.0 or later.

Decisions that govern a path

Give actual rules select a file or a directory with --file, and it returns the rule documents whose paths cover it:
A path-only query scores each document on the paths its rules name, and uses no model and no network. A rule set whose rules name no paths therefore returns nothing for every file, which says nothing about whether those rules govern it. To see what your agent would be briefed for a file, run actual rules brief --file <path> instead (see Rule briefs): when no path covers the file, it retries with the path’s words as the query.

Decisions that govern a plan

Give actual rules select a plan, with or without the paths it touches, to see the decisions a plan check would weigh:
Selection runs in two stages. The first is a deterministic prefilter over a scope index of the rule files: it ranks every document by its paths, its scope sentence and its title, with no model and no network. The second asks your configured runner which of the candidates govern the change, and runs only when the prefilter returns more candidates than --limit allows and the query has plan text to judge. The runner can only keep, drop or promote candidates; it never adds one. When it can’t run or fails, the prefilter’s answer stands, and the Stage 2 line of the report says why. The second stage has a 90-second deadline, and a measured plan took between 6 and 218 seconds. Pass --no-rank when you can’t wait. Plan and change checks explains how the checks use the same selection.

The scope index

The selection commands keep a scope index of the rule files in your user config directory, never in the repository. It’s keyed by the exact bytes of every rule file, so any edit, addition, removal or rename rebuilds it on the next query. actual rules index builds or refreshes it yourself and prints a summary:

Decisions in Actual AI

Sign in with actual login (see Sign in) to read the decisions your organization keeps in Actual AI, including drafts and suggestions that don’t govern yet.
adr list uses the connected repository your checkout’s origin remote names, or the one --repo names by its name, owner/name or id, and lists the whole organization when neither names one. --state takes active, draft, suggested, updated or archived, the same lists as the web app’s decisions page. --limit (1 to 200, default 50) and --offset page through a long list, and --json prints the result as JSON. The same decisions are in the web app at app.actual.ai. An accepted decision reaches the repository’s rule files through the pull request Actual AI’s sync opens.

Duplicates of a new decision

Check for one that already says it. actual adr check lists likely duplicates among your decision files and, signed in, your decisions in Actual AI, and actual adr create refuses a look-alike unless you pass --allow-duplicate. Write and draft decisions covers both.