docs/adr/, which people read, and a rule file under .actual/rules/, which the checks read. Both are laid out the way Actual AI’s repository sync writes them, so a later sync updates the same files instead of adding a second copy.
A decision’s parts
A decision document can also carry Rationale, Consequences and References sections, for people to read.
The two files
Both file names come from the decision’s id and title. The header carries the id, the status and the paths the decision applies to.
A rule file
A rule file opens with a YAML header between--- lines, then lists the decision’s rules, each with an id. This one, shortened from the CLI’s test fixtures, governs one directory of one package:
When the header declares paths, a file outside the decision’s root is never governed by it, and a file that matches an exclude never gets that decision. A rule’s id, joined to its file’s name, is what you name when you override it:
cross-cutting-api-handlers-validate-input-2f9d::R-APIH-001.
Reading the header needs Actual CLI 0.9.0 or later. A rule file with no header is still read in the original format, and both kinds can share .actual/rules/. A header the CLI can’t parse is a warning, not an error: actual rules ls reports it and the rest of the file is still read. Only .md files directly under .actual/rules/ count; the CLI skips subdirectories.
Accepted or draft
An accepted decision governs at once: the checks read its rules. A draft governs nothing until it’s accepted. The checks leave out a decision whose status isdraft, deleted, archived-draft, deferred, rejected, suggested, superseded or deprecated. Any other status, and a missing one, counts as active.
actual adr new writes an accepted decision when you run it at a terminal and a draft when no person is at one, as in a coding agent’s shell, a script or CI, so an agent never publishes a governing decision on its own. --status accepted or --status draft sets it explicitly. To accept a draft that adr new wrote, change status: draft to status: accepted in the header of both files, and the decision document’s Status: proposed line to Status: accepted.
Where decisions come from
From your terminal, signed out.actual adr new (CLI 0.14.0 or later) writes both files:
actual adr check runs that check on the decision files under docs/adr/ and lists likely duplicates. The files are yours to review and commit.
In Actual AI, signed in. Manage your organization’s decisions at app.actual.ai, or from the terminal with actual adr create, update, publish and the other actual adr commands. Actual AI opens a sync pull request in your repository that writes both files for each accepted decision, and merging it brings them in. A later change to a decision reaches the rule files through the same sync pull request. actual adr create --file sends a decision that adr new wrote to Actual AI and renames its two files to the names the sync uses.
Write and draft decisions walks through both ways, and actual adr lists every command and flag. To see what the checks will read, run actual rules ls, which lists the rule files with their counts by level and any warnings.
