The overflow harness proves two concrete cases (and non-positive rate for
every symbolic rate), not every overflow; step <= 0 -> None rests on K-U2's
round_step_refuses_nonpositive_step and the bridge; the D-75 precondition,
the open 96-bit edge, the bridge's new properties, Fx.booked_pos now proved
at the tie, and the BS-ledger-14 link landed.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The K-U1 review: foreign 0.99999999999999999999999999 (26 places) x rate
0.005 into USD booked 0.01, though the exact product
0.00499999999999999999999999995 is under half a cent. Decimal::checked_mul
rounds a product finer than 28 places to 28 before fx_booked rounds it to
the cent: two roundings, one cent off. A ledger in one money books the
exact product rounded once (BS-ledger-1, BS-ledger-14).
Owner decision D-75 (2026-11-08): a new line's foreign amount and its rate
take at most MAX_LINE_SCALE (10) decimal places each, as a base amount does
(B-28), so their product has at most 20 places, under Decimal's 28.
Ledger::add_line_fx refuses past it with ValueOutOfRange ("foreign amount
..." / "FX rate ..."; the variant for an amount that is not a journal
line's), trailing zeros not counted, before computing, and never on replay
(is_replaying; replay_add_line_fx books a journal's older line verbatim).
Tests: 11-place foreign amount and rate refused; ten and ten accepted with
hand-checked books; the review's input refused, not mis-booked; trailing
zeros are not places; replay keeps a 26-place foreign line in core, and a
store journal holding one opens with its figures.
fx_booked's spec block states the precondition (scales within 10 each, and
the mantissas' product within Decimal's 96 bits) and that the result is
exact under it, and documents Decimal::checked_mul's behaviours outside it
(rounding past scale 28 and past 96 bits; 1e-28 x 1e-28 underflowing to
zero); invariant 1 now says None when T's checked_mul cannot hold the
product. The bridge covers every D-75 scale (0..=10 each, products to 20
places) against an independent exact reference, shows 26 places is where the
reference and Decimal part (and the engine refuses), and pins an open edge
this bridge found: ten places each still allow a 20-place product past
~7.9e8 that outgrows 96 bits (1050000010.0000000001 x 9.9999999999 books
10500000099.90, exact 10500000099.89). B-28 and B-3 claims record the
enforcement and checks.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
claims/ledger.md conflicted with the reduced B-9 section: the D-73 pick,
Enforced and Checked lines sit above its product rules; the check's
place corrected (after the schedule double-post check, not ahead of it)
and the citation completed (BS-ledger-16, the Lean model since L-G1).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Cargo.toml: both the dev-dependencies for decimal_exact and the bookspec
comment's new path kept.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
periods.rs conflicted with K-U2: the frozen replay rules delegate to
K-U4's checked twins, whose rounding now goes through K-U2's
round_places (so every rounding stays in the kernel); no figure changes.
The K-U4 note gains the review's list of bounded raw sums left, and the
caveat that the twin test checks delegation (the review's independent
20,000-case comparison found the twins identical).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Coverage is a tripwire, not a correctness oracle: the proofs, the
property tests, the GnuCash cross-check and mutation testing answer
whether the books are right; a line/branch report answers whether a test
still reaches the code it used to. This adds that measurement, pinned in
mise.toml like every other tool: cargo-llvm-cov 0.9.1, and the
llvm-tools component on the pinned nightly because branch coverage is
nightly-only (-Zcoverage-options=branch).
`just coverage` runs each crate's own suite instrumented (core and
store separately, so one crate's dev-dependency code does not enter the
other's totals), writes HTML, the JSON and the plain per-file table under
target/coverage/<crate>/, and excludes src/proofs.rs (Kani-only,
cfg(kani)) plus test and bench files: it measures the library.
`just coverage-check` reads docs/coverage-floor.md and fails when a
crate's total line coverage is more than 0.5 pp below its floor; regions
and branches are recorded for context but not gated, since branch
coverage is the noisier number across compiler versions.
First measurement from the full run: ledger-core 90.01% lines (88.86%
regions, 82.65% branches), ledger-store 91.71% lines (85.27%, 80.73%).
The store measured 91.98% on an earlier run the same day; properties pick
random cases, so a few tenths move between runs and the 0.5 pp tolerance
absorbs it (the floor records the lower run). The largest holes are
findings, not fixes here: ledger-store/reconcilable.rs is 0% (the server
and viewer are its readers; the store suite never calls it), and
ledger.rs is mostly the document/payroll replay steps the store's replay
tests exercise rather than the core's own.
It is not a push gate (the instrumented suites are slow: the store alone
runs about a hundred minutes of tests once built); the weekly scheduled
workflow runs it beside the proofs. The store's tests start and kill
helper processes that inherit LLVM_PROFILE_FILE, so a killed child can
leave a truncated profraw; the run passes --failure-mode all, which
merges the test binaries' profiles and ignores such a file (it holds no
test coverage).
Co-Authored-By: DeepSeek V4.1 Flash <noreply@opencode.ai>
A correction comes after what it corrects (Pacioli ch. 31; B-9). Until now
only document reversals and depreciation/schedule runs were held to it; a
plain posted entry could be reversed with an earlier date, leaving the
books carrying the opposite of an entry that doesn't exist yet at the
reversal's date. The owner's decision D-73 (2026-11-08) makes it one rule
for every kind of entry; bookspec BS-ledger-5 states it.
- Ledger::check_reversal refuses date < original.date() with one error,
ReversalBeforeOriginal (it replaces DocumentReversalBeforeOriginal,
which was the document-only wording). Same-day reversals are allowed.
- Not on replay (B-28): the check sits behind is_replaying(), so a journal
an earlier version wrote, holding a reversal dated before its original,
reopens with the same figures.
- The store's own date check for depreciation runs and schedule months
(InvalidSchedule / AssetEntryIrreversible wording) was the same rule
for a narrower case; it is removed so there is one variant for all.
Store::check_reverse_entry, books.reverse_entry (preview and post), and
the document voids all reach the refusal through check_reversal; the
only construction path for a reversal is reverse_entry_steps, which
calls it first.
Tests: store reversal_dates.rs (plain entry refused before it, nothing
journaled, same day and later taken; a journal with an earlier-dated
reversal written the old way opens with the same figures); ledger-cli
spec_mcp (preview, unconfirmed and confirmed post all refuse alike).
Existing tests changed: store assets.rs (three expectations move to the
new variant); core spec_asset_basis.rs (it backdated a reversal on
purpose to check the trial balance carries -100.00 between the dates; it
now replays one, as an old journal would); model.rs (the model oracle's
`reverse` requires the date, as the Lean/bookspec rule does); bookspec
common.rs (the pinned depreciation example words this refusal
"entry_irreversible"); spec_documents.rs (variant rename).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Add the seven older CHOICE records (with a B number) that carried no declared pick in the adapter, taking each option from its record's options and the claims file's existing Pick line for its B section:
- BS-arap-2 lines-that-stand, BS-arap-5 direct-write-off, BS-asset-3 tag-and-never-reuse, BS-ledger-6 reversible-once, BS-ledger-9 facts-in-the-books, BS-ledger-10 label-only, BS-statement-5 project-is-a-class
- PICKS in crates/ledger-core/tests/bookspec/engine.rs gains all seven; each claims file gains a '**Pick (BS-...):**' line beside its B section's Pick
- Widen rules_md.rs's pick check from b == 0 records to every non-retired CHOICE record wanderbooks claims, so no CHOICE can go undeclared again
Co-Authored-By: Muse Wonder 1.0
docs/proofs/k-u4.md: the six harnesses with bounds and times, the Lean
counterparts (Basic.net_append is total_append for the signed sum; no new
law), the bridge, the sites replaced with file:line, the sites left raw
because their signatures are infallible, the regression tests, and two
findings: Decimal's checked_add rounds dust within a unit of Decimal::MAX,
and the audit's reachability claims for section 2.1 were overstated.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Four Kani harnesses on i64 with fixed steps (a symbolic step is
intractable for CBMC's division, as K-U2 found; written down in
docs/proofs/k-u1.md): whole unit, within half a unit with tie covers,
positive for positive, and overflow/non-positive rate refused. The
bridge checks i64 against Decimal and Decimal against an independent
i128 exact-product reference at 0, 2 and 3 minor units (JPY, USD,
KWD), with Decimal::MAX, scale 28, and both-sign tie edges. The law
itself is proved in bookspec's Lean (Fx.booked_whole/near/pos, law
41) on the k-u1 branch there.
Co-Authored-By: Muse Wonder 1.0
docs/verification.md proves the accounting laws of a model of the
ledger (bookspec's Bookspec.Step, run by Bookspec.Exec.step); that the
model is the engine was checked by review. This makes it a machine check.
tests/bookspec/lean_model.rs generates random command sequences (entries
balanced or not, with zero, negative, finer-than-a-cent and unknown-account
lines; invoices; reversals of anything posted, twice, of a closing entry,
backdated; closes to retained earnings over nested, disjoint, partly
overlapping, inverted, empty and out-of-order periods), runs each through
the Rust Ledger, writes it as a bookspec example whose expected values are
the engine's own answers, and has `lake exe bookspec-check` (the pinned
bookspec, built in a copy under target/) check every refusal, the trial
balance after each event, and at the end the trial balance, balances, P&L
and each posted entry's lines. All cases of a run go to one directory and
one lake call; a failure is shrunk (rounds of single-event removal, one
lake call each) and printed with both answers. `just lean-model [cases]`
runs it with WANDERBOOKS_REQUIRE_LEAN=1; without lake it skips unless that
is set.
Refusal words the checker does not list are compared through a probe (the
model's own word is read from its mismatch), so every refusal is checked,
not skipped; the one word the model does not have (the control guard) is
an explicit allow-listed skip. The D-73 gap (a backdated plain reversal the
engine still accepts and the model refuses) is rolled back and counted.
Findings, all of word only (both sides refuse, the books agree): the order
of checks when a command fails two. Allow-listed in KNOWN_WORD_DIFFERENCES,
pinned by a test that fails when one side changes, and by #[ignore]d d_*
tests that assert agreement: reversing a closing entry or an already
reversed entry on a closed day, an unknown account beside another fault, a
zero line beside a negative one, a close inside a closed period (the
model's own word closed_period_contains_end), a finer amount on a closed
day (the example reader's order). Nothing in the engine or the model is
changed. docs/verification.md's "Be precise about the claims" says what is
now checked and what stays by review.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The two S-C7 halves declared their picks two ways; there is now one
shared PICKS list in the bookspec adapter's engine.rs, declared via
Claims::with_choice, and rules_md.rs keeps S-C7b's check (the
backticked option in the claims file must be one of the record's
options and the adapter must declare the same), skipping retired
rules. S-C7a's Pick lines are rewritten with backticks.
Picks are added, in the claims files and the adapter, for the 16
records of s-c7b-noexample (BS-partner-16..18, BS-asset-9,
BS-1099-5, BS-arap-7..14, BS-format-8..10), taken from each parent's
old status_note and the claims' existing Pick lines. BS-partner-9's
pick is gone with its record (folded into BS-partner-2), and
BS-ledger-17's pick now appears once, under B-20.
Co-Authored-By: Muse Wonder 1.0
BS-format-2 item 7: QuickBooks Desktop records at most one A/R or A/P
account in a transaction (Intuit's own warning, sources/intuit-iif.md
and rules/format/BS-format-2.toml), so an entry with lines on two
receivable accounts, two payable accounts, or one of each cannot be
written as one IIF transaction. journal_to_iif used to write it and
merely list it in Iif::receivable_payable.
Now the export collects every entry whose lines touch more than one
distinct A/R/A/P account and returns
IifError::SeveralReceivablePayableAccounts, naming the entries and
saying why and what to do (reverse and post as two entries through a
clearing account; splitting one would change what it says). It never
splits an entry itself. ledger_package::export_iif and build_package
pass the refusal through, so books.export and books.export_cpa_package
return it before a file is handed over.
The README test's entry on both controls moved to its own refusal test;
the valid books it covers (one A/R entry, one A/P entry) are unchanged,
as are every IIF golden and every test of the file's bytes.
Co-Authored-By: DeepSeek V4.1 Flash <noreply@opencode.ai>
Review found two holes in K-U2's evidence.
1. The spec block's invariants 3, 4 and 6 (toward zero: |r| <= |x| and
|r - x| < step; toward negative infinity: r <= x < r + step; no mode
flips the sign) had no proof: Kani checked those modes only at exact
ties. Three harnesses now assert them for every amount over the fixed
steps (round_step_toward_zero_bounds, round_step_toward_neg_inf_is_floor,
round_step_sign_preserved), each with covers for a non-tie and a negative
non-multiple; bookspec's Lean carries the same laws for any step. With
TowardZero mutated to round 7 at step 10 up to 10, the first harness
fails ("magnitude never grows"); reverted.
2. The bridge never ran checked_round_to_step's finer-step branch (step
with more places than the amount and a mantissa above one). Three
properties compare the kernel with a second, independent i128 reference
that takes any step (mantissa 1..1000 at scales 0..10, amounts at scales
0..28, small amounts, and constructed exact ties). Replacing
.checked_add(remainder / b) with .checked_add(0) in the digit loop fails
all three; reverted.
docs/proofs/k-u2.md also states the one exception to "no result changes":
a negative-zero input (round_dp keeps -0.00; round_places gives 0.00; no
call site can produce one).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Bookspect S-C7 split the CHOICEs embedded in these areas' AUTHORITY and CONVENTION rules into their own records, so an engine declares its pick by rule id. Each parent B-n section in docs/spec/claims/<area>.md now carries a **Pick (BS-<area>-<n>):** line naming wanderbooks' option with who decided it and when (the parents' **bookspec:** lines stand), and the bookspec adapter's claims() declares the same twenty picks with Claims::with_choice. The rules_md test now reads a born-after-B-n rule (b = 0 in the catalogue) by its **Pick (BS-...):** line instead of a B-n index row it cannot have.
No engine behaviour changes: every pick is the decision the claims already recorded in prose (for example check-when-line-added, D-73's on-or-after-the-original, D-67's round-once-on-the-total, D-72's minor-unit-for-new-schedules). Verified against the s-c7a bookspec branch with the documented patch override (not committed): cargo test -p ledger-core --test bookspec, 53 passed.
Co-Authored-By: Muse Wonder 1.0
bookspec split the CHOICEs embedded in BS-partner-1..4, BS-asset-1, BS-asset-4,
BS-1099-1 and BS-format-2 into records of their own (S-C7b). Wanderbooks'
decisions are unchanged; each is now recorded against the id an engine
declares it by:
- partner: BS-partner-5 largest-remainder-first-listed (owner, 2026-10-13),
-6 cumulative-from-first-close (D-10, 2026-10-16), -7 running-split (D-38,
2026-10-20), -8 outside-the-books and -9 tin-facts-then-w9 (2026-10-15),
-10..-13 money, entry flow, books' carrying amount, labelled basis
(2026-10-15, 2026-10-20), -14 tax-basis-beside-book (D-41), -15
running-cumulative (D-38's rule, 2026-10-22)
- asset: BS-asset-5 straight-line-by-days, -6 lesser-of-value-and-basis, -7
books-recorded-amounts, -8 register-carries-tax-figures
- 1099: BS-1099-2 refuse-an-unknown-year, -3 presumed-a-check-ach-or-transfer,
-4 dated-by-the-payments-date
- format: BS-format-3..7 (D-36, 2026-10-20)
Each is a `**Pick (BS-..):**` line in docs/spec/claims/<area>.md and a
`with_choice` in the adapter's claims(). The rules_md test no longer expects a
B-n row for a rule born without one (a split-out CHOICE has none): it requires
the pick line, that the pick is one of the record's options, and that the
adapter declares the same option.
The pin is not moved here: this needs bookspec's s-c7b to be merged and the
pin moved to it. Verified with ledger-core's bookspec test patched to the
s-c7b checker and runner (53 passed).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Kani checks the primitive on i64 over fixed steps: a whole multiple, the
half modes nearest, each mode's tie, idempotence, no negative zero, and a
non-positive step refused. A symbolic divisor did not finish in 30 minutes
(CBMC's bit-blasted division), so the steps are fixed constants; the
bridge's exact-reference property carries the laws to every Decimal step.
The bridge agrees i64 with Decimal, checks Decimal against an independent
i128 reference over amounts of up to ten places and steps down to 1e-4,
checks round_places against round_dp_with_strategy to the character, and
has the edge table (.5, -.5, 0.004, 1.005, -1.005, scale 28, Decimal::MAX).
docs/proofs/k-u2.md records the harnesses, bounds, times, bridge properties
and the bookspec Lean theorem names.
Co-Authored-By: DeepSeek V4.1 Flash <noreply@opencode.ai>
B-34 claims: the pick not to write a customer or vendor NAME is a CHOICE with
its open risk named; the ACCNTTYPE mapping is stated; the engine's gap on
a transaction with two A/R or A/P accounts is recorded.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Review of S-K1: the recipe looked for cargo's checkout by the full
40-character rev, but cargo names the directory by its short rev, so
just oracle could never succeed. cargo metadata gives the dependency's
own manifest path, whatever the directory is called and however many
checkouts there are; jq (now pinned in mise.toml, as every recipe's
tool is) reads it. The error now says what to do when the pin predates
the oracle's move. Three docs still named the deleted oracle/gnucash/.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The engine trusts Decimal for every money path, and docs/verification.md
said so without checking it: Kani cannot explore Decimal arithmetic, and
the bridge tests only tie the Decimal kernel to the i64 one. This adds a
property test that compares the operations the books use against
num-rational/num-bigint, an independent exact reference: checked_add and
checked_sub over signed line amounts (1e15 at up to ten places),
1,000-line sums, checked_mul while the true product fits 28 digits
(including the top of the line range and FX-style rates),
round_dp_with_strategy for every strategy the workspace uses at every
scale 0..=28, rescale's half-away rounding, normalize, comparison and
equality across scales (1.0 = 1.00), and from_str/to_string round trips
at every scale.
It also pins the one inexact edge: when a product's scale does not fit,
checked_mul rounds to 28 decimal places, ties to even, rather than
failing; None comes only when the integer part cannot fit. That case is
reachable through Ledger::add_line_fx, whose foreign amount and rate are
unbounded positive Decimals (the base amount is then rounded to the
currency's minor unit). No property failed: 256 cases by default,
PROPTEST_CASES=5000 passed, plus hand cases at 28-digit mantissas, scale
28 and negative ties.
The two dev-dependencies are test-only and already in the lockfile
(through proptest and the PDF stack); they are the exact reference the
whole check rests on.
Co-Authored-By: DeepSeek V4.1 Flash <noreply@opencode.ai>
B-27's journal format gate is wholly the product's: its full text is now
WB-format-1 to WB-format-4 (the gate and the frozen envelope; the journal
features and when a command asks for one; the format upgrade with the
owner's passphrase and a proven backup; one SQLite projection file per
schema), with the enforcement and tests split among them. Its id
BS-format-1 stays retired, and the one engine-independent sentence it
carried — a reader that does not know a record's format version refuses
it, never misreads it and never calls it corrupt — is now bookspec's
BS-ledger-4, statement 4.
B-34 keeps its pick (plain ASCII transliterated and reported, CR LF,
DOCNUM the entry's id, closes left out, every entry through the as-of
day, D-36), its enforcement and its tests; what is wanderbooks' only is
WB-format-5 to WB-format-7: the export tool's as_of and warnings, the
package README's words and the names of entries on A/R and A/P, the rest
of the package's text and fonts, and the pinned deunicode 1.6.0 table.
The accounting text itself (encoding, line structure, signs, accounts by
name, classes) lives in bookspec's BS-format-2.
Co-Authored-By: DeepSeek V4.1 Flash <noreply@opencode.ai>
B-43 keeps its heading, BS-entry-5 id, Pick (D-47, cross-referenced to
BS-ledger-7 and B-20's claims rather than restated), Enforced and Checked. The
draft/evidence/discard principle moved to bookspec's BS-entry-5 (branch s-c5).
WB-entry-5..9 keep what is wanderbooks' only: evidence::requirement as the one
function and its callers, the exempt-by-origin list with the policy.evidence.*
settings (threshold, required accounts, split groups), the building and
awaiting_evidence states and their journal event, what a discard drops and
journals, and the receipt_required refusal with confirm-against-preview.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
B-18 and B-38..B-42 keep their heading, their bookspec id, Claims, Pick,
Enforced and Checked; the accounting text moved to bookspec's records
BS-arap-1..6 (branch s-c5). What stays here as WB-arap-1..17 is only
wanderbooks': the replay derivation of document tags and the projection
that keeps no figure, the default account codes 1200/2000/6990/6995, the void
description, journal feature document_standing and documents_v2 and the
invoice.written_off event, the net-days range and settings fallback, the INV-
number format, the issued PDF filed as receipt.attached with its sha256, the
vendor reference's duplicate_reason, the write-off evidence filed in the same
call and its Needs-attention flag, the settlement's row order and event
fields, and the aging CSV exports. The picks stay: due today is Current and
the as-of reading (owner, 2026-10-13), lines-that-stand (D-45, 2026-10-23),
the direct write-off (A-5) with D-49's recovery, the gross discount (A-8) and
fee (A-4).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- B-25: the lesser-of pick for personal-use property is named as the MAY of
BS-asset-4, taken by analogy to Treas. Reg. 1.168(i)-4(b)(1) (a taxpayer's
own conversion); the choice stays wanderbooks', the CPA to confirm.
- WB-asset-1 points at BS-asset-1 rules 25-26, which now hold the engine-neutral
refusals (link after the in-service date or disposal, in-service date before
the linked entry, disposal before the acquired date); the replay carve-out
stays here.
- WB-1099-4: the worksheet's card accounts are the recorded business-card
methods only; the liabilities named "card" are the party-totals fallback,
and a charge to one counts for no one either way on the worksheet.
- WB-1099-5 (new): attorney gross proceeds ($600) and royalties ($10) are not
modelled, and the worksheet says so, as the original B-19 stated.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
B-19's accounting text (thresholds, payor, card and network exclusion, the
bucket table, decisions and dates, the status function, shares) now lives
in bookspec's `rules/1099/`; this file keeps the four embedded choices'
picks, the enforced and checked evidence, and the product rules.
The picks: an unknown year is refused, never guessed (the owner,
2026-10-13); a cash-account payment with no recorded method is presumed a
check, ACH or transfer (D-40, 2026-10-20); a shared entry counts only the
payee's share (2026-10-15); decisions are dated and a payment takes the
one in force on its reversal chain's first date (D-40).
Product rules: WB-1099-1 (the untagged-entry note), WB-1099-2 (the dated
registry of known threshold years and its staleness alarm), WB-1099-3 (the
recording of payment methods, entry tags, decisions and their sources),
WB-1099-4 (the card-account fallback and the card charge listed, not
dropped).
The Enforced and Checked lists carry over the engine's sites and the
buckets' 16-case check, unchanged.
Co-Authored-By: DeepSeek V4.1 Flash <noreply@opencode.ai>
The accounting text of B-15, B-22, B-24 and B-25 now lives in bookspec's
records (`rules/asset/`); this file keeps what is wanderbooks': the option
each CHOICE picks, the Enforced and Checked evidence, and the product
rules.
Picks: B-15's straight-line-by-days (the owner, 2026-10-13, the arithmetic
settled from ASC 360-10-35-4 on 2026-10-20); B-24's tag-and-never-reuse
(the owner, 2026-10-15); B-25's register-carries-tax-figures and the D-41
options (lesser-of for personal use, the traditional section 704(c)
method, the books' recorded contribution values).
Product rules: WB-asset-1 (a run's and a disposal's bounds are the
commands', replay accepts what earlier versions wrote), WB-asset-2 (the
store and the viewer read every run the books recorded), WB-asset-3 (the
tag and serial-number events and the label sheet), WB-asset-4 (a legacy
basis record reads its book cost; Needs attention asks for the value),
WB-asset-5 (the tools never assume a contributed property's value).
B-22 is procedural: the bookkeeper is bound, the engine is not, so it
claims no engine behaviour and has no product rule.
Co-Authored-By: DeepSeek V4.1 Flash <noreply@opencode.ai>
WB-partner-1 now carries what is engine history rather than law: the
true-up bound for closes made under the earlier journaled rules (under
one unit per break in a "cumulative" run and per "largest_remainder"
close; a last-absorbs close's half unit each, a unit with three members)
and the two-unit bound when replaying books written before whole minor
units were required (B-3, BS-ledger-1).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
B-14 (statement):
- The Pick records the kind order the record now restores: within a
section, the rest of its kinds, then interest received, then interest
paid (CONVENTION, as the engine splits it).
- Enforced restores `Ledger::reversal_chain`, rule 6's chains.
- WB-statement-8 is new: the statement's label strings and the
reconciliation's grouping are wanderbooks product, not accounting
("Reversal of #N — …", "Reinstatement of #A (reverses #B)", "Proceeds
from borrowing — …", "Contributions from members — …", "(Gain) loss and
other noncash changes in investing assets", "Depreciation", "Noncash:
through <account>", "Other noncash items", "Increase in"/"Decrease in").
B-37 (statement):
- WB-statement-6 says "a decision" again, not "a choice": a decision is a
record kind the books have.
- WB-statement-9 is new: a document's entry posts one line per project in
the order each is first named, the untagged sum as one line, a document
naming none posting exactly the one line documents always posted; its
journal events (`entry.line_class_set`, feature
`document_line_projects`) are recorded.
B-11 (period):
- Enforced says INVARIANT 5 (a close with nothing to close posts no entry
and still closes, D-73); Checked adds Lean `closingEntry_net` and
`a_close_with_nothing_to_close_posts_no_entry`, the rule the record now
states.
B-12 (period): Enforced restores `Ledger::create_period`
(`PeriodsOverlap`); Checked restores
`periods_nest_but_never_partially_overlap` and `periods_nest`.
B-30 (period): Enforced restores `InvalidDateRange` and
`StartAfterToday`, with what each refuses.
Co-Authored-By: DeepSeek V4.1 Flash <noreply@opencode.ai>
- B-20 (BS-ledger-7): claims Pick now names CHOICE D-47, a reversal's evidence is its original's (2026-10-26), matching the bookspec status_note
Co-Authored-By: Muse Wonder 1.0
Each B-13/B-26/B-35/B-36 section keeps its heading, bookspec id, Claims, Pick, Enforced and Checked; the accounting text moved to bookspec BS-partner-1..4. What stayed is numbered WB-partner-1..14: the members_cumulative journal feature and legacy-close replay, the close tool and members pages, the TIN vault, TIN masking and text scanning, project-text TIN rules, TIN-bearing downloads, the TIN-file registry and its two-candidate probe bound, money/creditor/member settings and journaled derived splits, labelled party/1099 tool presentation, and the CPA package's K-1 tax-basis file.
Co-Authored-By: Muse Wonder 1.0
B-3, B-4, B-5, B-8, B-9, B-10, B-20, B-23, B-29, B-31, B-32, B-44 and
B-45 keep their heading, the bookspec id, Claims, Pick, Enforced and
Checked; the accounting text lives in bookspec's BS-ledger-1..13 (branch
s-c1, 461a440). The owner's picks are recorded per rule (minor-unit
booking, a child's type, reversible once, role assignment journaled,
facts in the books, label-only rename, warn by default and D-67's one
rounding). Product rules WB-ledger-1..16: the hash-chained journal; the
role list, default codes and refusal wording; the journal events, TIN
guard, settings adoption, newer keys, posting-template slots and approval
rules of B-29; the account.renamed event and the by-name picks of B-31;
the tax-category policy, Needs attention and control-role categories of
B-32; and the full text of B-44 and B-45, whose bookspec ids are retired
(D-71). B-20 is claimed partly: the receipt policy lives in the tool
layer, not the engine.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
B-1, B-2, B-21 and B-28 keep their heading, the bookspec id, Claims,
Pick, Enforced and Checked; their accounting text now lives in bookspec's
BS-entry-1..4 (branch s-c1, a00e968). B-1's pick is the owner's
2026-10-13 choice to check a line's account when the line is added;
B-28's pick carries the 1,000-draft recurring bound and the P0 review
provenance. The wanderbooks-only parts of B-28 become WB-entry-1 (replay
accepts what an earlier version accepted, with the command/replay
function pairs), WB-entry-2 (the full-TIN detector's replay), WB-entry-3
(the earlier version's projection files stay untouched) and WB-entry-4
(derived figures refuse, the server stays up). B-43 is unit S-C5's and
is untouched.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
B-17's accounting text moved to bookspec (BS-revenue-1). What stays:
the Enforced/Checked evidence and WB-revenue-1, the
books.record_payout tool surface.
Co-Authored-By: Muse Wonder 1.0
B-16's accounting text moved to bookspec (BS-prepaid-1). What stays:
the daily pick (D-11/D-37), the equal-months-from-the-first pick
(D-37), the minor-unit rounding pick for new monthly-even schedules
(D-72), Enforced/Checked evidence, and WB-prepaid-1..2: the
books.schedule_convention setting and D-72's versioning (schedules
written before the change replay the cent rule; the engine change is
unit K-U5's).
Co-Authored-By: Muse Wonder 1.0
B-11, B-12 and B-30's accounting text moved to bookspec
(BS-period-1..3). What stays: the nesting pick (2026-10-13), the
fiscal-year-to-date default pick (2026-10-20), Enforced/Checked
evidence, and WB-period-1..4: refused commands never reach the journal,
the surfaces the one default binds, the package and viewer presets
that do not follow the default, and the surfaces with no default.
Co-Authored-By: Muse Wonder 1.0
The accounting text of B-6, B-7, B-14, B-33 and B-37 moved to bookspec
(BS-statement-1..5). What stays: B-14's picks (direct method, the
operating/investing/financing allocation order, constructive on-behalf
cash per D-42, the government split rounding, payroll's class), B-33's
pick (the 1099 worksheet stops at as_of, D-36) and B-37's picks
(project-is-a-class; document lines name one project or none, D-43),
each rule's Enforced/Checked evidence, and WB-statement-1..7: the
account designation settings and role refusal, the statement warnings
and printed layout, rule 11's bookkeeping limits, the CPA package, the
project facts, the link and notice behaviour, and the snapshot
presentation.
Co-Authored-By: Muse Wonder 1.0