Auditing sources
A tool MAY audit the sources of the rules it collects (see Sources). An audit reads every rule in the document model, disabled rules included, with no change involved. For each source of each rule it finds whether the source resolves in the cited file, and compares the source with its review record in the lock file (see The lock file). It reports what it finds as findings (see Findings). An entry that an error excludes is not audited, and an audit changes no Lore file and no lock file.
A source's file names, after its prefix, a file of the governed repo,
of an external folder's repository or of a loose folder (see
File paths). The file exists when it is a tracked file
there, or for a loose folder a file of that folder. A tool that cannot
look at the files a source needs MUST report source-unchecked for
that source, and MUST NOT report it as resolved or as missing.
The level of each finding comes from the audit settings (see Audit settings). What a tool does with a level, such as its exit status, any options that override the settings for one run, and how it prints findings are tool behavior, outside this specification.
money-in-minor-units was reviewed against its section, which has not
changed since. dates-from-locale cites a section that resolves but
was never reviewed, and price-from-quote has no source:
Example 106 (audit)
<rule id="money-in-minor-units" category="functional_correctness" severity="blocking">
<source>
file: docs/checkout-review.md
heading: Money is integer minor units
</source>
Amounts are integers in minor units (cents).
</rule>
<rule id="dates-from-locale" category="functional_correctness">
<source>
file: docs/checkout-review.md
heading: Dates
</source>
Displayed dates are formatted with the shop's locale.
</rule>
<rule id="price-from-quote" category="functional_correctness">
A displayed price must come from the quote that produced it.
</rule>
# Checkout review
## Money is integer minor units
Amounts are integers in minor units (cents).
## Dates
Dates are shown in the shop's locale.
{"lore-reviews":1}
{"rule":"money-in-minor-units","file":"docs/checkout-review.md","heading":"Money is integer minor units","phrase":null,"reviewed":"2026-11-02","hash":"9f413384c605"}
2026-11-12
{
"findings": [
{
"name": "never-reviewed", "level": "warn", "rule": "dates-from-locale", "file": ".lore/checkout.lore",
"source": { "file": "docs/checkout-review.md", "heading": "Dates", "phrase": null }, "reason": null
}
],
"summary": { "counts": { "never-reviewed": 1 }, "rulesWithSource": 2, "rulesWithoutSource": 1 }
}
Matching inside the file
A file is Markdown when its path ends in .md, .mdx or
.markdown, compared case-sensitively, so docs/NOTES.MD is not
Markdown.
These two definitions hold throughout Auditing sources, this section and the ones after it included. A line ending (or line break) is CR LF, LF or CR, and a cited file's lines end there and only there. Whitespace is a space (U+0020) or a tab (U+0009), and nothing else. U+00A0, U+FEFF, U+2028, U+2029 and every other character are ordinary characters, and a blank line is one that holds nothing, or only whitespace.
Byte order mark. When a cited file is valid UTF-8, a tool ignores one U+FEFF at its start, as it does in a Lore file (see Files and folders): heading matching, phrase matching and fingerprints read the file without it. A U+FEFF anywhere else, a second one at the start included, stays an ordinary character. A file that is not valid UTF-8 keeps every byte (see Fingerprints).
Fenced code blocks. A Markdown file's fenced code blocks are found by the line rule that follows, which is their whole definition: a tool needs no Markdown parser, and other constructs, such as list items, block quotes and HTML comments, are not considered. An opening fence is a line of zero to three spaces, then three or more backticks or three or more tildes; after a run of backticks, the rest of the line holds no backtick. The fence closes at the next line of zero to three spaces, then a run of the same character at least as long as the opening run, then only whitespace. A fence that never closes runs to the end of the file. A line indented by four or more spaces, or by a tab, neither opens nor closes a fence. These are not the fences of a rule's prose, which ignore indentation (see Fences in Entries).
Headings. A heading is a line, outside every fenced code block
and other than a fence's opening and closing lines, that starts with
zero to three spaces, then one to six #, then either the end of the
line or whitespace. Its level is its number of #. Its text is
the rest of the line after the # and the whitespace that follows
them, with trailing whitespace removed, and then a closing run of #
removed, with the whitespace before it, when it is the whole text or
follows whitespace. Inline markup stays as written, so
## Money is *integer* minor units has the text
Money is *integer* minor units. The text can hold any character but a
line ending, U+2028 and U+2029 included.
Slugs. The slug of a string is found in three steps:
- Lower-case it with the Unicode default case mapping (
toLowercase, with its full mappings and not specific to any language). - Remove every character that is not a letter (general category L), a
mark (general category M), a number (general category N),
_,-or U+0020 SPACE. - Turn each remaining space into
-.
Runs are not collapsed, so two spaces become --. No Unicode
normalization is applied, so a letter written with a combining mark
differs from the same letter written as one precomposed character.
A heading matches a heading value when its text equals the value,
or when the value's slug is not empty and equals the slug of the
heading's text. When more than one heading matches, the first in the
file is used, and the audit reports ambiguous-heading.
Sections. A heading's section is the lines from the heading's
line up to, and not including, the next heading with as many # or
fewer, or to the end of the file. Its text is those lines joined with
LF.
Phrases. A phrase matches a text when, after each run of whitespace
and line endings in both is replaced by one U+0020 SPACE, the phrase is
a part of the text. A phrase can therefore match across lines. A phrase
with a heading is looked for in that heading's section, and one
without a heading in the whole file, where its first match is the one
used.
A source resolves when its file exists and, for each of heading
and phrase it has, the heading matches and the phrase matches. A
heading or phrase never resolves in a file that is not valid UTF-8.
Strings compare code point by code point throughout this section, so
matching is case-sensitive apart from the slug.
A heading can be given as its text or as its slug. The slug of
Money is *integer* minor units is money-is-integer-minor-units, so
both money-is-integer-minor-units and Money is integer minor units
match it. Letters and numbers of every script are kept, an upper-case
É included as é, and _ is kept. Display casing matches no
heading: it equals no heading's text, and its slug equals no heading's
slug. The heading Remise appliquée writes its é as e followed by
U+0301 COMBINING ACUTE ACCENT, which the slug keeps, so the first value
of discounts-before-tax, written the same way, matches, and the
second, which writes é as the one character U+00E9, does not. The
heading Totals and taxes holds a U+2028 LINE SEPARATOR between
Totals and and: it does not end the line, so the line is one
heading, and its slug drops the character. Nothing was reviewed, so
every source that resolves is never-reviewed:
Example 107 (audit)
<rule id="money-in-minor-units" category="functional_correctness">
<source>
- file: docs/checkout-review.md
heading: money-is-integer-minor-units
- file: docs/checkout-review.md
heading: Money is integer minor units
</source>
Amounts are integers in minor units (cents).
</rule>
<rule id="names-keep-case" category="functional_correctness">
<source>
- file: docs/checkout-review.md
heading: Display casing (names, addresses)
- file: docs/checkout-review.md
heading: Display casing
</source>
Names and addresses keep the case they were entered in.
</rule>
<rule id="subtotal-before-tax" category="functional_correctness">
<source>
file: docs/checkout-review.md
heading: étape-2-sous_total-ht
</source>
The subtotal is shown before tax.
</rule>
<rule id="discounts-before-tax" category="functional_correctness">
<source>
- file: docs/checkout-review.md
heading: remise-appliquée
- file: docs/checkout-review.md
heading: remise-appliquée
</source>
A discount is applied before tax.
</rule>
<rule id="totals-with-taxes" category="functional_correctness">
<source>
file: docs/checkout-review.md
heading: totalsand-taxes
</source>
A displayed total includes taxes.
</rule>
# Checkout review
## Money is *integer* minor units
Amounts are integers in minor units (cents).
## Display casing (names, addresses)
Names keep the case they were entered in.
## Étape 2: sous_total (HT)
Le sous-total est hors taxes.
## Remise appliquée
La remise est appliquée avant les taxes.
## Totals
and taxes
A total includes taxes.
2026-11-12
{
"findings": [
{
"name": "source-missing", "level": "error", "rule": "discounts-before-tax", "file": ".lore/checkout.lore",
"source": { "file": "docs/checkout-review.md", "heading": "remise-appliquée", "phrase": null }, "reason": "heading not found: \"remise-appliquée\""
},
{
"name": "never-reviewed", "level": "warn", "rule": "discounts-before-tax", "file": ".lore/checkout.lore",
"source": { "file": "docs/checkout-review.md", "heading": "remise-appliquée", "phrase": null }, "reason": null
},
{
"name": "never-reviewed", "level": "warn", "rule": "money-in-minor-units", "file": ".lore/checkout.lore",
"source": { "file": "docs/checkout-review.md", "heading": "money-is-integer-minor-units", "phrase": null }, "reason": null
},
{
"name": "never-reviewed", "level": "warn", "rule": "money-in-minor-units", "file": ".lore/checkout.lore",
"source": { "file": "docs/checkout-review.md", "heading": "Money is integer minor units", "phrase": null }, "reason": null
},
{
"name": "source-missing", "level": "error", "rule": "names-keep-case", "file": ".lore/checkout.lore",
"source": { "file": "docs/checkout-review.md", "heading": "Display casing", "phrase": null }, "reason": "heading not found: \"Display casing\""
},
{
"name": "never-reviewed", "level": "warn", "rule": "names-keep-case", "file": ".lore/checkout.lore",
"source": { "file": "docs/checkout-review.md", "heading": "Display casing (names, addresses)", "phrase": null }, "reason": null
},
{
"name": "never-reviewed", "level": "warn", "rule": "subtotal-before-tax", "file": ".lore/checkout.lore",
"source": { "file": "docs/checkout-review.md", "heading": "étape-2-sous_total-ht", "phrase": null }, "reason": null
},
{
"name": "never-reviewed", "level": "warn", "rule": "totals-with-taxes", "file": ".lore/checkout.lore",
"source": { "file": "docs/checkout-review.md", "heading": "totalsand-taxes", "phrase": null }, "reason": null
}
],
"summary": { "counts": { "source-missing": 2, "never-reviewed": 6 }, "rulesWithSource": 5, "rulesWithoutSource": 0 }
}
A heading inside a fenced code block is not a heading. The tilde fence
opens indented by two spaces and is not closed by the shorter ~~~, so
Money and Dates are inside it. The backticks indented by four spaces
open no fence, and neither does the line of four backticks, because a
backtick follows the run, so Rounding and Subtotal are headings.
The last fence never closes, so Totals is inside it:
Example 108 (audit)
<rule id="money-in-minor-units" category="functional_correctness">
<source>
- file: docs/checkout-review.md
heading: Money
- file: docs/checkout-review.md
heading: Dates
- file: docs/checkout-review.md
heading: Rounding
- file: docs/checkout-review.md
heading: Subtotal
- file: docs/checkout-review.md
heading: Totals
</source>
Amounts are integers in minor units (cents).
</rule>
# Checkout review
~~~~
## Money
~~~
## Dates
~~~~~
```
## Rounding
```` md`fences`
## Subtotal
```
## Totals
2026-11-12
{
"findings": [
{
"name": "source-missing", "level": "error", "rule": "money-in-minor-units", "file": ".lore/checkout.lore",
"source": { "file": "docs/checkout-review.md", "heading": "Money", "phrase": null }, "reason": "heading not found: \"Money\""
},
{
"name": "source-missing", "level": "error", "rule": "money-in-minor-units", "file": ".lore/checkout.lore",
"source": { "file": "docs/checkout-review.md", "heading": "Dates", "phrase": null }, "reason": "heading not found: \"Dates\""
},
{
"name": "source-missing", "level": "error", "rule": "money-in-minor-units", "file": ".lore/checkout.lore",
"source": { "file": "docs/checkout-review.md", "heading": "Totals", "phrase": null }, "reason": "heading not found: \"Totals\""
},
{
"name": "never-reviewed", "level": "warn", "rule": "money-in-minor-units", "file": ".lore/checkout.lore",
"source": { "file": "docs/checkout-review.md", "heading": "Rounding", "phrase": null }, "reason": null
},
{
"name": "never-reviewed", "level": "warn", "rule": "money-in-minor-units", "file": ".lore/checkout.lore",
"source": { "file": "docs/checkout-review.md", "heading": "Subtotal", "phrase": null }, "reason": null
}
],
"summary": { "counts": { "source-missing": 3, "never-reviewed": 2 }, "rulesWithSource": 1, "rulesWithoutSource": 0 }
}
A phrase matches across any run of spaces, tabs and line endings. In
money.ts, function and fromCents( are separated by a tab, and in
the review minor and units by a line ending. Matching is
case-sensitive, so Integers in minor units is not found, and U+00A0
NO-BREAK SPACE is not whitespace, so rounded half to even is not
found where the review writes half and to with one between them:
Example 109 (audit)
<rule id="money-in-minor-units" category="functional_correctness">
<source>
- file: apps/web/src/checkout/money.ts
phrase: 'export function fromCents('
- file: docs/checkout-review.md
phrase: integers in minor units
- file: docs/checkout-review.md
phrase: Integers in minor units
- file: docs/checkout-review.md
phrase: rounded half to even
</source>
Amounts are integers in minor units (cents).
</rule>
export function fromCents(cents: number): Money {
return { cents };
}
# Checkout review
## Money is integer minor units
Amounts are integers in minor
units (cents). Totals are rounded half to even.
2026-11-12
{
"findings": [
{
"name": "source-missing", "level": "error", "rule": "money-in-minor-units", "file": ".lore/checkout.lore",
"source": { "file": "docs/checkout-review.md", "heading": null, "phrase": "Integers in minor units" }, "reason": "phrase not found: \"Integers in minor units\""
},
{
"name": "source-missing", "level": "error", "rule": "money-in-minor-units", "file": ".lore/checkout.lore",
"source": { "file": "docs/checkout-review.md", "heading": null, "phrase": "rounded half to even" }, "reason": "phrase not found: \"rounded half to even\""
},
{
"name": "never-reviewed", "level": "warn", "rule": "money-in-minor-units", "file": ".lore/checkout.lore",
"source": { "file": "apps/web/src/checkout/money.ts", "heading": null, "phrase": "export function fromCents(" }, "reason": null
},
{
"name": "never-reviewed", "level": "warn", "rule": "money-in-minor-units", "file": ".lore/checkout.lore",
"source": { "file": "docs/checkout-review.md", "heading": null, "phrase": "integers in minor units" }, "reason": null
}
],
"summary": { "counts": { "source-missing": 2, "never-reviewed": 2 }, "rulesWithSource": 1, "rulesWithoutSource": 0 }
}
docs/checkout-review.md starts with a byte order mark, which a tool
ignores, so its first line is the heading Checkout review. Both
sources have the fingerprint the file has without the mark, the one the
records hold:
Example 110 (audit)
<rule id="money-in-minor-units" category="functional_correctness">
<source>
- file: docs/checkout-review.md
- file: docs/checkout-review.md
heading: Checkout review
</source>
Amounts are integers in minor units (cents).
</rule>
# Checkout review
## Money is integer minor units
Amounts are integers in minor units (cents).
## Dates
Dates are shown in the shop's locale.
{"lore-reviews":1}
{"rule":"money-in-minor-units","file":"docs/checkout-review.md","heading":null,"phrase":null,"reviewed":"2026-11-02","hash":"10ad6236c284"}
{"rule":"money-in-minor-units","file":"docs/checkout-review.md","heading":"Checkout review","phrase":null,"reviewed":"2026-11-02","hash":"10ad6236c284"}
2026-11-12
{
"findings": [],
"summary": { "counts": {}, "rulesWithSource": 1, "rulesWithoutSource": 0 }
}
Fingerprints
The fingerprint of a source that resolves is a short hash of its reviewed text:
| Source has | Reviewed text |
|---|---|
file only | The whole file. |
heading, with or without phrase | That heading's section. |
phrase only, Markdown file | The section of the last heading at or above the line where the first match begins, or the whole file when no heading is. |
phrase only, other file | The whole file. |
A match begins on the line of its first character that is neither whitespace nor a line ending, so a phrase that starts with a space begins where the text after the space does. A phrase of nothing but whitespace begins where the run it matched begins: on the line of the run's first space or tab, or on the line that the run's first line ending ends.
The reviewed text is normalized before it is hashed:
- It is split into lines at its line endings: CR LF, LF or CR.
- Trailing spaces and tabs are removed from each line, and nothing else. A line left empty is blank.
- Blank lines at the start, blank lines that follow another blank line, and blank lines at the end are removed.
- The lines are joined with LF, with no LF after the last.
The fingerprint is the first 12 characters of the lower-case hexadecimal SHA-256 digest of the normalized text, encoded as UTF-8. Two tools MUST compute the same fingerprint for the same reviewed text. For a file that is not valid UTF-8, it is the digest of the file's raw bytes, not normalized. This document is UTF-8 text, so the rules for such files have no conformance examples.
For example, the Money is integer minor units section of the first
example in Auditing sources normalizes to these
three lines, with no line feed after the last:
## Money is integer minor units
Amounts are integers in minor units (cents).
and its fingerprint is 9f413384c605.
Each record here holds the fingerprint of the reviewed text the table
gives, so nothing is reported. The first phrase sits above the first
heading, so its reviewed text is the whole file, and the second is under
Money is integer minor units, so its reviewed text is that section.
The third starts with a space, which matches the line endings at the
end of the Money is integer minor units section, but its match begins
on the ## Dates line, so its reviewed text is the Dates section.
docs/NOTES.MD is not Markdown, so its phrase's reviewed text is the
whole file and not the Rounding section. A tool that hashed any of
them differently would report source-changed:
Example 111 (audit)
<rule id="money-in-minor-units" category="functional_correctness">
<source>
- file: docs/checkout-review.md
- file: docs/checkout-review.md
heading: Dates
- file: docs/checkout-review.md
phrase: Owned by the checkout team.
- file: docs/checkout-review.md
phrase: integers in minor units
- file: docs/checkout-review.md
phrase: ' ## Dates'
- file: apps/web/src/checkout/money.ts
phrase: 'export function fromCents('
</source>
Amounts are integers in minor units (cents).
</rule>
<rule id="round-half-to-even" category="functional_correctness">
<source>
file: docs/NOTES.MD
phrase: Round half to even.
</source>
Amounts are rounded half to even.
</rule>
Owned by the checkout team.
# Checkout review
## Money is integer minor units
Amounts are integers in minor units (cents).
## Dates
Dates are shown in the shop's locale.
export function fromCents(cents: number): Money {
return { cents };
}
# Notes
## Rounding
Round half to even.
{"lore-reviews":1}
{"rule":"money-in-minor-units","file":"apps/web/src/checkout/money.ts","heading":null,"phrase":"export function fromCents(","reviewed":"2026-11-02","hash":"d1252d5ef378"}
{"rule":"money-in-minor-units","file":"docs/checkout-review.md","heading":null,"phrase":null,"reviewed":"2026-11-02","hash":"9ac9b504bba3"}
{"rule":"money-in-minor-units","file":"docs/checkout-review.md","heading":null,"phrase":" ## Dates","reviewed":"2026-11-02","hash":"d7fc8675e774"}
{"rule":"money-in-minor-units","file":"docs/checkout-review.md","heading":null,"phrase":"Owned by the checkout team.","reviewed":"2026-11-02","hash":"9ac9b504bba3"}
{"rule":"money-in-minor-units","file":"docs/checkout-review.md","heading":null,"phrase":"integers in minor units","reviewed":"2026-11-02","hash":"9f413384c605"}
{"rule":"money-in-minor-units","file":"docs/checkout-review.md","heading":"Dates","phrase":null,"reviewed":"2026-11-02","hash":"d7fc8675e774"}
{"rule":"round-half-to-even","file":"docs/NOTES.MD","heading":null,"phrase":"Round half to even.","reviewed":"2026-11-02","hash":"a9f76203dd8b"}
2026-11-12
{
"findings": [],
"summary": { "counts": {}, "rulesWithSource": 2, "rulesWithoutSource": 0 }
}
Normalization keeps a fingerprint through edits to whitespace alone.
Both sections were reviewed as the first example in
Auditing sources shows them. Since then the
Money is integer minor units heading has gained three trailing
spaces, and blank lines were added around its paragraph, which leaves
its fingerprint as it was. The Dates section was reviewed when it read
Dates are shown in UTC., so its text has changed:
Example 112 (audit)
<rule id="money-in-minor-units" category="functional_correctness" severity="blocking">
<source>
file: docs/checkout-review.md
heading: Money is integer minor units
</source>
Amounts are integers in minor units (cents).
</rule>
<rule id="dates-from-locale" category="functional_correctness">
<source>
file: docs/checkout-review.md
heading: Dates
</source>
Displayed dates are formatted with the shop's locale.
</rule>
# Checkout review
## Money is integer minor units
Amounts are integers in minor units (cents).
## Dates
Dates are shown in the shop's locale.
{"lore-reviews":1}
{"rule":"dates-from-locale","file":"docs/checkout-review.md","heading":"Dates","phrase":null,"reviewed":"2026-11-02","hash":"41954b11d131"}
{"rule":"money-in-minor-units","file":"docs/checkout-review.md","heading":"Money is integer minor units","phrase":null,"reviewed":"2026-11-02","hash":"9f413384c605"}
2026-11-12
{
"findings": [
{
"name": "source-changed", "level": "warn", "rule": "dates-from-locale", "file": ".lore/checkout.lore",
"source": { "file": "docs/checkout-review.md", "heading": "Dates", "phrase": null }, "reason": null
}
],
"summary": { "counts": { "source-changed": 1 }, "rulesWithSource": 2, "rulesWithoutSource": 0 }
}
The lock file
Review records are kept in lock files, each named
lore-reviews.lock. The lock file of a Lore file is in the nearest
directory, at or above the directory that holds the Lore file and no
higher than the root of its repository (for a loose folder, the loose
folder's top), whose .loreconfig has root: true or a repo key.
When there is none, it is in that root. So a directory marked with repo (see
External folders) starts a new lock file just as a
Lore root does (see Lore root), and everything else that
uses the Lore root, such as categories, disable, audit settings and
file-relative paths, still uses it. A .loreconfig with a problem is
ignored here too. A .loreconfig that is repo-inside-repo or
nested-repo (see Where repo may appear)
still counts: the Lore files below it, which no tool collects from
there, have the lock file in its directory or below it, never one above
it. A lock file covers each Lore file whose lock file it is, and
holds the records of their rules.
So adding a repo key to a directory moves the rules below it out of
the scope of the lock file above it, and their records there become
orphans. In the governed repo the key is repo-inside-repo, which is
how a shared rules repository looks from its own run, so those records
are reported as orphan-review, and a tool that removes orphan records
removes them: after adding such a key, read the audit before removing
any. A nested-repo key has no layout that a run collects, so it is
taken for a stray one, and while it stands the lock files above it
that would cover its rules without it are not judged (see
Findings).
A lock file's path has the prefix its Lore files have, so in the team
repository of External folders, where lore/ has
root: true and lore/shop/ is marked, the shop's lock file is
external:lore/shop/lore-reviews.lock, not
external:lore/lore-reviews.lock. That path does not say which
repository the file is in (see Document model), so
two given folders of different repositories can have lock files with
the same path. Each covers its own Lore files, and a tool MUST NOT read
one in place of the other: a lock file is named by its repository and
its path.
A repo key names one repository, and a tool collects a marked
directory only when a given folder holds it (see
External folders). So the Lore files a lock file
covers are all collected by the same runs: below a marked directory,
those of the repository it names; elsewhere, those of the repository
itself as the governed repo. A shared rules repository keeps the records
of each repository it serves in that repository's marked directories,
and its own in its Lore root:
team-repo/lore/
.loreconfig root: true
lore-reviews.lock the team repository's own rules, as in own/
own/.lore/team.lore
shop/
.loreconfig repo: github.com/acme/shop
lore-reviews.lock the shop's rules below shop/
web/
.loreconfig repo: github.com/acme/shop
lore-reviews.lock the shop's rules below web/
blog/
.loreconfig repo: github.com/acme/blog
lore-reviews.lock the blog's rules
A run for the shop reads and writes the lock files of shop/ and web/
only, a run for the blog that of blog/, and the team repository's own
run that of lore/. Ids are unique only among the
rules one run collects (see Trees), so the shop and the blog
can each have a rule with the same id. Their records are in different
lock files and never meet.
A lock file is not a Lore file. Only a tool that records reviews writes it; an audit only reads it.
A lock file is UTF-8 JSON Lines. Its first line is the JSON object
{"lore-reviews":1}. Each further line is one record, a JSON
object with exactly these members:
| Member | Value |
|---|---|
rule | The id of the rule that was reviewed. |
file | The source's file, resolved as the document model holds it. |
heading | The source's heading as written, or null. |
phrase | The source's phrase as written, or null. |
reviewed | The date of the review, YYYY-MM-DD, a real calendar date. |
hash | The source's fingerprint when it was reviewed. |
A tool that writes a lock file MUST write its canonical form, so that two tools write the same bytes for the same records:
- Each line is compact JSON, with no whitespace between tokens and the
members in the order of the table. The first line is exactly
{"lore-reviews":1}. - A string is written as standard JSON serialization writes it
(
JSON.stringifyin ECMAScript), with no other escapes. A quotation mark and a backslash are escaped with a backslash. U+0008, U+000C, U+000A, U+000D and U+0009 are written\b,\f,\n,\rand\t. Every other character below U+0020 is written\u00and two lower-case hexadecimal digits, and a lone surrogate as\uand four lower-case hexadecimal digits. Every other character is written as itself, U+007F, U+2028, U+2029 and every non-ASCII character included. - Each line ends with LF, the last included.
- The records are sorted by
rule, thenfile, thenheading, thenphrase, null before any string, comparing code points.
A record is one line, so two branches that review different rules usually merge cleanly. The records are sorted, so two branches that add neighboring lines can still conflict. The conflict is plain text: keeping both sides' lines resolves it, and so does taking one side's file and reviewing the other side's rules again.
A tool that reads a lock file accepts more than the canonical form. A
line ends with LF or with CR LF, and the last line may have no line
ending. Each line is read as any JSON text, so a record's members may
come in any order, and whitespace between tokens and any escape are
allowed. The first line is compared by its value: a JSON object with the
one member lore-reviews, whose value is the number 1. Whenever a tool
writes a lock file, it writes the canonical form.
A lock file is malformed when its first line is not that object,
when it has a blank line, when a further line is not a JSON object with
exactly the members of the table, each a string (heading and
phrase a string or null), when a reviewed is not a real date or a
hash is not 12 lower-case hexadecimal characters, or when two records
have the same rule, file, heading and phrase. A tool MUST NOT repair a malformed lock file
silently. How it reports one is tool behavior, and no example holds one.
A record belongs to a source when its rule is the rule's id, its
file is the source's resolved file, and its heading and phrase
equal the source's as written, null when absent. A rule's records are
looked up only in its Lore file's lock file. Changing a
source's file, heading or phrase makes it a different source,
which has no record until it is reviewed again.
Moving a rule between Lore folders that one lock file covers keeps its
record. money-in-minor-units moved from .lore/ to apps/web/.lore/
and names its file from the repository root, so its source is unchanged.
The external folder keeps its records in its marked directory's lock
file:
Example 113 (audit)
<rule id="money-in-minor-units" category="functional_correctness" severity="blocking">
<source>
file: /docs/checkout-review.md
heading: Money is integer minor units
</source>
Amounts are integers in minor units (cents).
</rule>
# Checkout review
## Money is integer minor units
Amounts are integers in minor units (cents).
{"lore-reviews":1}
{"rule":"money-in-minor-units","file":"docs/checkout-review.md","heading":"Money is integer minor units","phrase":null,"reviewed":"2026-11-02","hash":"9f413384c605"}
repo: github.com/acme/shop
# Review handbook
## Prices
A displayed price comes from the quote that produced it.
<rule id="web-prices-from-quote" category="functional_correctness">
<source>
file: ../../../handbook.md
heading: Prices
</source>
A price the web app displays comes from the quote that produced it.
</rule>
{"lore-reviews":1}
{"rule":"web-prices-from-quote","file":"external:lore/shop/handbook.md","heading":"Prices","phrase":null,"reviewed":"2026-11-02","hash":"ff3bab3472a6"}
2026-11-12
{
"findings": [],
"summary": { "counts": {}, "rulesWithSource": 2, "rulesWithoutSource": 0 }
}
The team repository serves the shop and the blog. lore/shop/ and
lore/web/ are marked for the shop and lore/blog/ for the blog, below
the Lore root lore/, and lore/own/ holds the team repository's own
rule. Each marked directory has its own lock file, and the team
repository's own rule has the Lore root's. Auditing the shop reads the
lock files of lore/shop/ and lore/web/ only. The record of
price-from-quote, which no rule of the shop has, is an orphan there;
the records of the blog and of the team repository are not read, so
post-titles-cased and release-notes-written are not reported. The
blog has a rule dates-from-locale too, with a different source, and
its record in the blog's lock file does not meet the shop's:
Example 114 (audit)
root: true
repo: github.com/acme/shop
<rule id="dates-from-locale" category="functional_correctness">
<source>
file: /docs/checkout-review.md
heading: Dates
</source>
Displayed dates are formatted with the shop's locale.
</rule>
repo: github.com/acme/shop
<rule id="web-prices-from-quote" category="functional_correctness">
<source>
file: /docs/checkout-review.md
</source>
A price the web app displays comes from the quote that produced it.
</rule>
repo: github.com/acme/blog
<rule id="dates-from-locale" category="functional_correctness">
<source>
file: /docs/checkout-review.md
heading: Money is integer minor units
</source>
Post dates are formatted with the blog's locale.
</rule>
<rule id="handbook-reviewed" category="functional_correctness">
<source>
file: /docs/checkout-review.md
</source>
The review handbook is read before each release.
</rule>
# Checkout review
## Money is integer minor units
Amounts are integers in minor units (cents).
## Dates
Dates are shown in the shop's locale.
{"lore-reviews":1}
{"rule":"dates-from-locale","file":"docs/checkout-review.md","heading":"Dates","phrase":null,"reviewed":"2026-11-02","hash":"d7fc8675e774"}
{"rule":"price-from-quote","file":"docs/checkout-review.md","heading":null,"phrase":null,"reviewed":"2026-11-02","hash":"10ad6236c284"}
{"lore-reviews":1}
{"rule":"web-prices-from-quote","file":"docs/checkout-review.md","heading":null,"phrase":null,"reviewed":"2026-11-02","hash":"10ad6236c284"}
{"lore-reviews":1}
{"rule":"dates-from-locale","file":"docs/checkout-review.md","heading":"Money is integer minor units","phrase":null,"reviewed":"2026-11-02","hash":"9f413384c605"}
{"rule":"post-titles-cased","file":"docs/checkout-review.md","heading":null,"phrase":null,"reviewed":"2026-11-02","hash":"10ad6236c284"}
{"lore-reviews":1}
{"rule":"handbook-reviewed","file":"docs/checkout-review.md","heading":null,"phrase":null,"reviewed":"2026-11-02","hash":"10ad6236c284"}
{"rule":"release-notes-written","file":"docs/checkout-review.md","heading":null,"phrase":null,"reviewed":"2026-11-02","hash":"10ad6236c284"}
2026-11-12
{
"findings": [
{
"name": "orphan-review", "level": "warn", "rule": "price-from-quote", "file": "external:lore/shop/lore-reviews.lock",
"source": { "file": "docs/checkout-review.md", "heading": null, "phrase": null }, "reason": null
}
],
"summary": { "counts": { "orphan-review": 1 }, "rulesWithSource": 2, "rulesWithoutSource": 0 }
}
Auditing the blog from the same files reads only lore/blog/'s lock
file. Its dates-from-locale is judged against its own record, and
post-titles-cased is the orphan:
Example 115 (audit)
https://github.com/acme/blog
root: true
repo: github.com/acme/shop
<rule id="dates-from-locale" category="functional_correctness">
<source>
file: /docs/checkout-review.md
heading: Dates
</source>
Displayed dates are formatted with the shop's locale.
</rule>
repo: github.com/acme/shop
<rule id="web-prices-from-quote" category="functional_correctness">
<source>
file: /docs/checkout-review.md
</source>
A price the web app displays comes from the quote that produced it.
</rule>
repo: github.com/acme/blog
<rule id="dates-from-locale" category="functional_correctness">
<source>
file: /docs/checkout-review.md
heading: Money is integer minor units
</source>
Post dates are formatted with the blog's locale.
</rule>
<rule id="handbook-reviewed" category="functional_correctness">
<source>
file: /docs/checkout-review.md
</source>
The review handbook is read before each release.
</rule>
# Checkout review
## Money is integer minor units
Amounts are integers in minor units (cents).
## Dates
Dates are shown in the shop's locale.
{"lore-reviews":1}
{"rule":"dates-from-locale","file":"docs/checkout-review.md","heading":"Dates","phrase":null,"reviewed":"2026-11-02","hash":"d7fc8675e774"}
{"rule":"price-from-quote","file":"docs/checkout-review.md","heading":null,"phrase":null,"reviewed":"2026-11-02","hash":"10ad6236c284"}
{"lore-reviews":1}
{"rule":"web-prices-from-quote","file":"docs/checkout-review.md","heading":null,"phrase":null,"reviewed":"2026-11-02","hash":"10ad6236c284"}
{"lore-reviews":1}
{"rule":"dates-from-locale","file":"docs/checkout-review.md","heading":"Money is integer minor units","phrase":null,"reviewed":"2026-11-02","hash":"9f413384c605"}
{"rule":"post-titles-cased","file":"docs/checkout-review.md","heading":null,"phrase":null,"reviewed":"2026-11-02","hash":"10ad6236c284"}
{"lore-reviews":1}
{"rule":"handbook-reviewed","file":"docs/checkout-review.md","heading":null,"phrase":null,"reviewed":"2026-11-02","hash":"10ad6236c284"}
{"rule":"release-notes-written","file":"docs/checkout-review.md","heading":null,"phrase":null,"reviewed":"2026-11-02","hash":"10ad6236c284"}
2026-11-12
{
"findings": [
{
"name": "orphan-review", "level": "warn", "rule": "post-titles-cased", "file": "external:lore/blog/lore-reviews.lock",
"source": { "file": "docs/checkout-review.md", "heading": null, "phrase": null }, "reason": null
}
],
"summary": { "counts": { "orphan-review": 1 }, "rulesWithSource": 1, "rulesWithoutSource": 0 }
}
A rule moved to a Lore folder with another lock file leaves its records
behind, such as from one marked directory to another, or to a directory
below a new root: true. In its new place it has no record and is
never-reviewed, and its old record is an orphan-review of the old
lock file once that lock file is judged (see Findings).
web-prices-from-quote moved from lore/web/ to lore/shop/, so it is
reviewed again there; web-dates-from-locale keeps lore/web/'s lock
file read:
Example 116 (audit)
root: true
repo: github.com/acme/shop
<rule id="web-prices-from-quote" category="functional_correctness">
<source>
file: /docs/checkout-review.md
</source>
A price the web app displays comes from the quote that produced it.
</rule>
repo: github.com/acme/shop
<rule id="web-dates-from-locale" category="functional_correctness">
<source>
file: /docs/checkout-review.md
heading: Dates
</source>
Dates the web app displays are formatted with the shop's locale.
</rule>
# Checkout review
## Money is integer minor units
Amounts are integers in minor units (cents).
## Dates
Dates are shown in the shop's locale.
{"lore-reviews":1}
{"rule":"web-dates-from-locale","file":"docs/checkout-review.md","heading":"Dates","phrase":null,"reviewed":"2026-11-02","hash":"d7fc8675e774"}
{"rule":"web-prices-from-quote","file":"docs/checkout-review.md","heading":null,"phrase":null,"reviewed":"2026-11-02","hash":"10ad6236c284"}
2026-11-12
{
"findings": [
{
"name": "never-reviewed", "level": "warn", "rule": "web-prices-from-quote", "file": "external:lore/shop/apps/web/.lore/web.lore",
"source": { "file": "docs/checkout-review.md", "heading": null, "phrase": null }, "reason": null
},
{
"name": "orphan-review", "level": "warn", "rule": "web-prices-from-quote", "file": "external:lore/web/lore-reviews.lock",
"source": { "file": "docs/checkout-review.md", "heading": null, "phrase": null }, "reason": null
}
],
"summary": { "counts": { "never-reviewed": 1, "orphan-review": 1 }, "rulesWithSource": 2, "rulesWithoutSource": 0 }
}
A record belongs to a source by its heading as written, not by the
heading it matches. Rewriting the pointer as the heading's slug makes
it a new source, never reviewed, and leaves the old record behind:
Example 117 (audit)
<rule id="money-in-minor-units" category="functional_correctness" severity="blocking">
<source>
file: docs/checkout-review.md
heading: money-is-integer-minor-units
</source>
Amounts are integers in minor units (cents).
</rule>
# Checkout review
## Money is integer minor units
Amounts are integers in minor units (cents).
{"lore-reviews":1}
{"rule":"money-in-minor-units","file":"docs/checkout-review.md","heading":"Money is integer minor units","phrase":null,"reviewed":"2026-11-02","hash":"9f413384c605"}
2026-11-12
{
"findings": [
{
"name": "never-reviewed", "level": "warn", "rule": "money-in-minor-units", "file": ".lore/checkout.lore",
"source": { "file": "docs/checkout-review.md", "heading": "money-is-integer-minor-units", "phrase": null }, "reason": null
},
{
"name": "orphan-review", "level": "warn", "rule": "money-in-minor-units", "file": "lore-reviews.lock",
"source": { "file": "docs/checkout-review.md", "heading": "Money is integer minor units", "phrase": null }, "reason": null
}
],
"summary": { "counts": { "never-reviewed": 1, "orphan-review": 1 }, "rulesWithSource": 1, "rulesWithoutSource": 0 }
}
Findings
An audit reports these findings:
| Finding | Meaning | Default level |
|---|---|---|
source-missing | The file is not a tracked file, or the heading or phrase is not found. | error |
source-unchecked | The files this source needs were not available to look at. | error |
ambiguous-heading | More than one heading matched. | warn |
source-changed | The fingerprint differs from the record. | warn |
never-reviewed | A source has no record. | warn |
review-overdue | The record is older than the age limit. Not reported when no limit is set. | warn |
orphan-review | The lock file has a record for a rule or source that no longer exists. | warn |
meta-source | A rule has a source key in <meta> and no <source> block. | off |
For each source of each audited rule, in the order written:
- When the tool could not look at the files the source needs, it
reports
source-unchecked, and nothing else for that source. - Otherwise, when the source does not resolve, it reports
source-missing, and nothing else for that source. - Otherwise it reports
ambiguous-headingwhen more than one heading matched. Then, when no record belongs to the source, it reportsnever-reviewed. When one does, it reportssource-changedwhen the record'shashis not the source's fingerprint, andreview-overduewhen an age limit is set and the number of days from the record'srevieweddate to the date of the audit is greater than the limit.
A rule with no <source> whose <meta> has a member named source
gets meta-source. The member's value does not matter, and no tool
gives it a meaning (see Children).
The records of a lock file are audited when it covers a collected Lore
file (see The lock file). A record that belongs to no
source of a collected rule covered by that lock file gets
orphan-review, with the lock file as its file, when the tool collected
every Lore file the lock file covers, and is not reported otherwise. A
record is never reported when an error excludes an entry with its rule
as id among the Lore files that lock file covers.
The Lore files a lock file covers are collected by the same runs, so a tool that collects one of them collects them all, unless one of these hides a rule without naming it. When any holds, the tool did not collect every Lore file the lock file covers:
- an error that excludes a Lore file the lock file covers, or an entry with no readable id in one;
- a Lore file the lock file would cover, or a
.loreconfigin a directory where such a Lore file could be, that the tool could not read, or that it can see but did not collect, such as an untracked file in the governed repo's working tree, whose rules a tool that records reviews may have recorded; - a
nested-repoerror below a marked directory, for that directory's lock file and for the lock file of any Lore root between them that would cover the Lore files below the error without itsrepokey. Such a key is taken for a stray one, and a record of a rule below it may be one from before the key was added.
Nothing else can leave a covered rule uncollected:
- A tool collects a marked directory only when a given folder holds it, so a run that collects any Lore file below it reads every directory below it.
- A directory marked for another repository, and one that
repo-inside-repoexcludes, has its own lock file, so the rules below it are never covered by a lock file above it. - A Lore file of a given folder's repository in no marked directory is covered by a lock file of that repository's own rules, which a run for another governed repo never reads.
- A
.loreconfigwith a problem is ignored by every run alike, so it changes no lock file's Lore files.
When the tool did not collect every Lore file a lock file covers, it does not judge that lock file: no record of it is reported. A real orphan there is reported again once the error is fixed, or the file read or tracked. How a tool shows that it did not judge a lock file, and how a tool that records reviews removes orphan records, are tool behavior; a tool that removes them MUST NOT remove any record of a lock file it did not judge.
A finding about a rule takes its level from the audit settings of the
directory that holds the rule's Lore file, and orphan-review from
those of the lock file's directory (see
Audit settings). A finding whose level is off is
not reported.
An audit result is an object with two members, findings and
summary, valid against
audit.schema.json. Each finding is an
object with these members:
| Member | Value |
|---|---|
name | The finding's name, from the table above. |
level | "error" or "warn". |
rule | The rule's id. For orphan-review, the record's rule, which can be any string: a lock file's rule is not checked against the id pattern. |
file | The rule's Lore file. For orphan-review, the lock file. |
source | The source as the document model holds it. For orphan-review, the record's file, heading and phrase. Null for meta-source. |
reason | For source-missing, which part was not found: file not found: <file>, heading not found: "<heading>" or phrase not found: "<phrase>", with the value as written. A heading is looked for before its phrase. Null for every other finding. |
Findings are ordered by file, then rule, then the order of the
findings table above, comparing code points. Findings that tie keep
the order of the rule's sources as written, or of the records in the
lock file. summary holds counts, the number of findings reported of
each name, leaving out the names with none; rulesWithSource, the
number of audited rules with a <source>; and rulesWithoutSource,
the number without one. Contexts are not counted.
source-unchecked depends on which files a tool could look at, which
an example cannot express: every file an example does not hold is
absent. It has no conformance example.
A source is source-missing when its file is absent, its heading is
not found, or its phrase is not found, in its heading's section when it
has one. A missing source gets no other finding, so these have none
although nothing was reviewed. The rule is disabled and still audited:
Example 118 (audit)
<rule id="money-in-minor-units" category="functional_correctness" disabled>
<source>
- file: docs/money-review.md
- file: docs/checkout-review.md
heading: Money
- file: docs/checkout-review.md
phrase: 'fromCents('
- file: docs/checkout-review.md
heading: Dates
phrase: integers in minor units
</source>
Amounts are integers in minor units (cents).
</rule>
# Checkout review
## Money is integer minor units
Amounts are integers in minor units (cents).
## Dates
Dates are shown in the shop's locale.
2026-11-12
{
"findings": [
{
"name": "source-missing", "level": "error", "rule": "money-in-minor-units", "file": ".lore/checkout.lore",
"source": { "file": "docs/money-review.md", "heading": null, "phrase": null }, "reason": "file not found: docs/money-review.md"
},
{
"name": "source-missing", "level": "error", "rule": "money-in-minor-units", "file": ".lore/checkout.lore",
"source": { "file": "docs/checkout-review.md", "heading": "Money", "phrase": null }, "reason": "heading not found: \"Money\""
},
{
"name": "source-missing", "level": "error", "rule": "money-in-minor-units", "file": ".lore/checkout.lore",
"source": { "file": "docs/checkout-review.md", "heading": null, "phrase": "fromCents(" }, "reason": "phrase not found: \"fromCents(\""
},
{
"name": "source-missing", "level": "error", "rule": "money-in-minor-units", "file": ".lore/checkout.lore",
"source": { "file": "docs/checkout-review.md", "heading": "Dates", "phrase": "integers in minor units" }, "reason": "phrase not found: \"integers in minor units\""
}
],
"summary": { "counts": { "source-missing": 4 }, "rulesWithSource": 1, "rulesWithoutSource": 0 }
}
Two headings match Refunds. The first is used, and the record holds
its section's fingerprint, so ambiguous-heading is the only finding:
Example 119 (audit)
<rule id="refunds-to-original-method" category="functional_correctness">
<source>
file: docs/checkout-review.md
heading: Refunds
</source>
A refund goes back to the payment method that paid.
</rule>
# Checkout review
## Cards
### Refunds
A card refund goes back to the card.
## Vouchers
### Refunds
A voucher refund becomes store credit.
{"lore-reviews":1}
{"rule":"refunds-to-original-method","file":"docs/checkout-review.md","heading":"Refunds","phrase":null,"reviewed":"2026-11-02","hash":"0c8764b902fc"}
2026-11-12
{
"findings": [
{
"name": "ambiguous-heading", "level": "warn", "rule": "refunds-to-original-method", "file": ".lore/checkout.lore",
"source": { "file": "docs/checkout-review.md", "heading": "Refunds", "phrase": null }, "reason": null
}
],
"summary": { "counts": { "ambiguous-heading": 1 }, "rulesWithSource": 1, "rulesWithoutSource": 0 }
}
The root sets an age limit of 30 days, and apps/web/ sets 400. On
2026-11-12 a review from 2026-10-13 is 30 days old, which is not older
than the limit, and one from 2026-10-12 is overdue. The rule under
apps/web/ takes the nearer limit:
Example 120 (audit)
audit:
maxAgeDays: 30
audit:
maxAgeDays: 400
<rule id="money-in-minor-units" category="functional_correctness">
<source>
file: docs/checkout-review.md
heading: Money is integer minor units
</source>
Amounts are integers in minor units (cents).
</rule>
<rule id="dates-from-locale" category="functional_correctness">
<source>
file: docs/checkout-review.md
heading: Dates
</source>
Displayed dates are formatted with the shop's locale.
</rule>
<rule id="web-prices-from-quote" category="functional_correctness">
<source>
file: /docs/checkout-review.md
</source>
A price the web app displays comes from the quote that produced it.
</rule>
# Checkout review
## Money is integer minor units
Amounts are integers in minor units (cents).
## Dates
Dates are shown in the shop's locale.
{"lore-reviews":1}
{"rule":"dates-from-locale","file":"docs/checkout-review.md","heading":"Dates","phrase":null,"reviewed":"2026-10-12","hash":"d7fc8675e774"}
{"rule":"money-in-minor-units","file":"docs/checkout-review.md","heading":"Money is integer minor units","phrase":null,"reviewed":"2026-10-13","hash":"9f413384c605"}
{"rule":"web-prices-from-quote","file":"docs/checkout-review.md","heading":null,"phrase":null,"reviewed":"2026-01-01","hash":"10ad6236c284"}
2026-11-12
{
"findings": [
{
"name": "review-overdue", "level": "warn", "rule": "dates-from-locale", "file": ".lore/checkout.lore",
"source": { "file": "docs/checkout-review.md", "heading": "Dates", "phrase": null }, "reason": null
}
],
"summary": { "counts": { "review-overdue": 1 }, "rulesWithSource": 3, "rulesWithoutSource": 0 }
}
The root lock file holds records for a source money-in-minor-units
no longer has, for a rule that no longer exists, and for
totals-from-quote, whose Lore root is apps/api/ and whose records
are in that root's lock file. Each is orphan-review at the level the
root's directory sets, though apps/web/ turns it off. The record of
dates-from-locale is kept, because an error excludes that rule:
Example 121 (audit)
audit:
levels:
orphan-review: error
audit:
levels:
orphan-review: off
<rule id="money-in-minor-units" category="functional_correctness">
<source>
file: /docs/checkout-review.md
heading: Money is integer minor units
</source>
Amounts are integers in minor units (cents).
</rule>
<rule id="dates-from-locale" category="functional_correctness" severity="fatal">
<source>
file: docs/checkout-review.md
heading: Dates
</source>
Displayed dates are formatted with the shop's locale.
</rule>
root: true
<rule id="totals-from-quote" category="functional_correctness">
<source>
file: /docs/checkout-review.md
</source>
Order totals come from the quote.
</rule>
{"lore-reviews":1}
{"rule":"totals-from-quote","file":"docs/checkout-review.md","heading":null,"phrase":null,"reviewed":"2026-11-02","hash":"10ad6236c284"}
# Checkout review
## Money is integer minor units
Amounts are integers in minor units (cents).
## Dates
Dates are shown in the shop's locale.
{"lore-reviews":1}
{"rule":"dates-from-locale","file":"docs/checkout-review.md","heading":"Dates","phrase":null,"reviewed":"2026-11-02","hash":"d7fc8675e774"}
{"rule":"money-in-minor-units","file":"docs/checkout-review.md","heading":"Dates","phrase":null,"reviewed":"2026-11-02","hash":"d7fc8675e774"}
{"rule":"money-in-minor-units","file":"docs/checkout-review.md","heading":"Money is integer minor units","phrase":null,"reviewed":"2026-11-02","hash":"9f413384c605"}
{"rule":"price-from-quote","file":"docs/checkout-review.md","heading":null,"phrase":"integers in minor units","reviewed":"2026-11-02","hash":"9f413384c605"}
{"rule":"totals-from-quote","file":"docs/checkout-review.md","heading":null,"phrase":null,"reviewed":"2026-11-02","hash":"10ad6236c284"}
2026-11-12
{
"findings": [
{
"name": "orphan-review", "level": "error", "rule": "money-in-minor-units", "file": "lore-reviews.lock",
"source": { "file": "docs/checkout-review.md", "heading": "Dates", "phrase": null }, "reason": null
},
{
"name": "orphan-review", "level": "error", "rule": "price-from-quote", "file": "lore-reviews.lock",
"source": { "file": "docs/checkout-review.md", "heading": null, "phrase": "integers in minor units" }, "reason": null
},
{
"name": "orphan-review", "level": "error", "rule": "totals-from-quote", "file": "lore-reviews.lock",
"source": { "file": "docs/checkout-review.md", "heading": null, "phrase": null }, "reason": null
}
],
"summary": { "counts": { "orphan-review": 3 }, "rulesWithSource": 2, "rulesWithoutSource": 0 }
}
An error that hides rules keeps every record of the lock file that
covers them. .lore/refunds.lore breaks off in its opening tag, so it
is excluded, and no record of the root lock file is reported: not that
of refunds-to-original-method, which may be the file's, and not even
that of price-from-quote. In the team repository,
lore/shop/apps/checkout/ is marked below the shop's marked directory,
so it is nested-repo. Its own lock file covers nothing collected, and
the tool does not read it. Without the key, lore/shop/'s lock file
would cover the rules below it, so that lock file is not judged either:
the record of checkout-refunds-logged there, from before the
directory was marked, is kept until the key is removed:
Example 122 (audit)
<rule id="money-in-minor-units" category="functional_correctness" severity="blocking">
<source>
file: docs/checkout-review.md
heading: Money is integer minor units
</source>
Amounts are integers in minor units (cents).
</rule>
<rule id="refunds-to-original-method" category="functional_correctness"
{"lore-reviews":1}
{"rule":"money-in-minor-units","file":"docs/checkout-review.md","heading":"Money is integer minor units","phrase":null,"reviewed":"2026-11-02","hash":"9f413384c605"}
{"rule":"price-from-quote","file":"docs/checkout-review.md","heading":null,"phrase":null,"reviewed":"2026-11-02","hash":"10ad6236c284"}
{"rule":"refunds-to-original-method","file":"docs/checkout-review.md","heading":null,"phrase":null,"reviewed":"2026-11-02","hash":"10ad6236c284"}
root: true
repo: github.com/acme/shop
<rule id="dates-from-locale" category="functional_correctness">
<source>
file: /docs/checkout-review.md
heading: Dates
</source>
Displayed dates are formatted with the shop's locale.
</rule>
repo: github.com/acme/checkout
<rule id="checkout-refunds-logged" category="observability">
<source>
file: /docs/checkout-review.md
</source>
Every refund is logged with the order it refunds.
</rule>
{"lore-reviews":1}
{"rule":"checkout-refunds-logged","file":"docs/checkout-review.md","heading":null,"phrase":null,"reviewed":"2026-11-02","hash":"10ad6236c284"}
{"lore-reviews":1}
{"rule":"checkout-refunds-logged","file":"docs/checkout-review.md","heading":null,"phrase":null,"reviewed":"2026-11-02","hash":"10ad6236c284"}
{"rule":"dates-from-locale","file":"docs/checkout-review.md","heading":"Dates","phrase":null,"reviewed":"2026-11-02","hash":"d7fc8675e774"}
# Checkout review
## Money is integer minor units
Amounts are integers in minor units (cents).
## Dates
Dates are shown in the shop's locale.
2026-11-12
{
"findings": [],
"summary": { "counts": {}, "rulesWithSource": 2, "rulesWithoutSource": 0 }
}
The team repository audits its own rules as the governed repo. Each
marked directory is repo-inside-repo there, and holds rules this run
does not collect, but those rules are covered by the marked
directories' own lock files. So the Lore root's lock file covers only
lore/own/, which the run collects whole, and the record of
release-notes-written, which no longer exists, is an orphan:
Example 123 (audit)
https://github.com/acme/team
root: true
repo: github.com/acme/shop
<rule id="dates-from-locale" category="functional_correctness">
<source>
file: /docs/checkout-review.md
heading: Dates
</source>
Displayed dates are formatted with the shop's locale.
</rule>
{"lore-reviews":1}
{"rule":"dates-from-locale","file":"docs/checkout-review.md","heading":"Dates","phrase":null,"reviewed":"2026-11-02","hash":"d7fc8675e774"}
<rule id="handbook-reviewed" category="functional_correctness">
<source>
file: /docs/checkout-review.md
</source>
The review handbook is read before each release.
</rule>
{"lore-reviews":1}
{"rule":"handbook-reviewed","file":"docs/checkout-review.md","heading":null,"phrase":null,"reviewed":"2026-11-02","hash":"10ad6236c284"}
{"rule":"release-notes-written","file":"docs/checkout-review.md","heading":null,"phrase":null,"reviewed":"2026-11-02","hash":"10ad6236c284"}
# Checkout review
## Money is integer minor units
Amounts are integers in minor units (cents).
## Dates
Dates are shown in the shop's locale.
2026-11-12
{
"findings": [
{
"name": "orphan-review", "level": "warn", "rule": "release-notes-written", "file": "lore/lore-reviews.lock",
"source": { "file": "docs/checkout-review.md", "heading": null, "phrase": null }, "reason": null
}
],
"summary": { "counts": { "orphan-review": 1 }, "rulesWithSource": 1, "rulesWithoutSource": 0 }
}
meta-source is off unless a .loreconfig turns it on. Here the root
turns it on and turns never-reviewed off. price-from-quote has a
<source>, so its source key in <meta> is not reported:
Example 124 (audit)
audit:
levels:
meta-source: warn
never-reviewed: off
<rule id="money-in-minor-units" category="functional_correctness">
<meta>
source: https://wiki.example.com/checkout/money
</meta>
Amounts are integers in minor units (cents).
</rule>
<rule id="price-from-quote" category="functional_correctness">
<meta>
source: docs/decisions/0042-quote-prices.md
</meta>
<source>
file: docs/decisions/0042-quote-prices.md
</source>
A displayed price must come from the quote that produced it.
</rule>
# 42. Prices come from quotes
2026-11-12
{
"findings": [
{
"name": "meta-source", "level": "warn", "rule": "money-in-minor-units", "file": ".lore/checkout.lore",
"source": null, "reason": null
}
],
"summary": { "counts": { "meta-source": 1 }, "rulesWithSource": 1, "rulesWithoutSource": 1 }
}