Commit Graph
748 Commits
Author SHA1 Message Date
swaits 38b843cfe9 Merge branch 'main' into t3/kernel-fx-booked-conversion 2026-11-08 17:06:45 -07:00
swaitsandClaude Opus 5.5 ed9adaeec5 docs(plan): D-75, foreign amounts and rates take at most 10 places
check / check (push) Canceled after 0s
portable-macos / portable (macos-latest) (push) Canceled after 0s
portable-windows / portable (windows-latest) (push) Canceled after 0s
two-user / two-user (push) Canceled after 0s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 17:06:14 -07:00
swaitsandClaude Opus 5.5 72de6efec0 build: pin bookspec at 218b5c8, every CHOICE its own record
bookspec splits every CHOICE embedded in another rule into its own
record (S-C7), so an engine declares its pick for each by id; wanderbooks
declares its 65 picks (one list in the adapter, checked against each
record's options and the claims files). Lean builds and audits; adapter
and package tests pass on the new rev.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 17:06:14 -07:00
swaitsandClaude Opus 5.5 ee3ac6e6fc merge: wanderbooks declares its pick for every CHOICE it claims (S-C7; branch t3/s-c7-split-embedded-choices, de57598d; reviewed, fixes applied)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 16:00:45 -07:00
swaitsandMuse Wonder 1.0 de57598df8 docs(spec): every CHOICE wanderbooks claims has a declared pick
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
2026-11-08 15:59:44 -07:00
swaitsandClaude Opus 5.5 b24062e8fa docs(plan): K-U10, the Decimal sum exact at the edge (found by K-U4)
check / check (push) Canceled after 0s
portable-macos / portable (macos-latest) (push) Canceled after 0s
portable-windows / portable (windows-latest) (push) Canceled after 0s
two-user / two-user (push) Canceled after 0s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 15:50:14 -07:00
swaitsandClaude Opus 5.5 27e47a2b51 docs(plan): D-74, any rule a command breaks is a conformant refusal
check / check (push) Canceled after 0s
portable-macos / portable (macos-latest) (push) Canceled after 0s
portable-windows / portable (windows-latest) (push) Canceled after 0s
two-user / two-user (push) Canceled after 0s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 15:48:58 -07:00
swaitsandMuse Wonder 1.0 abad8d892b test(core): Kani and bridge for fx_booked
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
2026-11-08 15:12:51 -07:00
swaitsandMuse Wonder 1.0 f9affd0e1f refactor(core): foreign currency conversion, fx_booked, in the kernel
The one FX conversion that books money (add_line_fx: foreign x rate,
rounded once to the base currency's minor unit, half away from zero,
B-3 / BS-ledger-1 and its CHOICE BS-ledger-14) was inline in ledger.rs.
It now lives in kernel/fx.rs as fx_booked<T: Amount> (exact checked
product, one round_step; None on a non-positive rate or overflow) with
fx_booked_minor as its Decimal/currency spelling, which also keeps the
pre-kernel scale and books the exact product for a currency with no
minor unit. add_line_fx keeps its own error variants and refusals, so
behaviour is identical for every input; every test and golden passes
unchanged. Grep found no other FX conversion site: set/get_fx_rate
only record a rate, the store delegates to the core, and replay books
a recorded amount verbatim.

Co-Authored-By: Muse Wonder 1.0
2026-11-08 15:11:36 -07:00
swaitsandMuse Wonder 1.0 03f667585d docs(spec): partner picks follow the renumbering
Co-Authored-By: Muse Wonder 1.0
2026-11-08 14:53:25 -07:00
swaitsandClaude Opus 5.5 9d58502a09 docs(plan): X-I checks ids-issued only grows against the base commit
check / check (push) Canceled after 0s
portable-macos / portable (macos-latest) (push) Canceled after 0s
portable-windows / portable (windows-latest) (push) Canceled after 0s
two-user / two-user (push) Canceled after 0s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 14:45:02 -07:00
swaitsandMuse Wonder 1.0 3877a49a81 docs(spec): one picks list; picks for every CHOICE record
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
2026-11-08 14:40:14 -07:00
swaits 75758b250c Merge branch 't3/split-embedded-choices-s-c7b' into t3/s-c7-split-embedded-choices 2026-11-08 14:39:55 -07:00
swaitsandClaude Opus 5.5 8874b603b4 merge: the IIF export refuses an entry on two A/R or A/P accounts (branch t3/iif-refuse-multiple-ar-ap, 45ea1032; reviewed)
check / check (push) Canceled after 0s
portable-macos / portable (macos-latest) (push) Canceled after 0s
portable-windows / portable (windows-latest) (push) Canceled after 0s
two-user / two-user (push) Canceled after 0s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 14:34:12 -07:00
swaitsandClaude Opus 5.5 c7c7ffd248 build: pin bookspec at c467093, the rounding law for every mode
check / check (push) Canceled after 0s
portable-macos / portable (macos-latest) (push) Canceled after 0s
portable-windows / portable (windows-latest) (push) Canceled after 0s
two-user / two-user (push) Canceled after 0s
bookspec's Lean now proves round_step's law (law 40) for every mode at
any step: multiple, near, ties, the directed modes' bounds, sign,
idempotent, odd, scale (K-U2). With the K-U2 kernel merge above: 1,155
ledger-core and package tests pass, and just prove (Kani 59+ fast
harnesses, Lean 151 audited) is green.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 14:34:09 -07:00
swaitsandDeepSeek V4.1 Flash 45ea103283 fix(import): the IIF export refuses an entry on two A/R or A/P accounts
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>
2026-11-08 14:32:23 -07:00
swaits df9f3164ab Merge branch 't3/s-c7a-resolve-embedded-choices' into t3/s-c7-split-embedded-choices 2026-11-08 14:21:14 -07:00
swaitsandClaude Opus 5.5 f77eaa515a merge: one rounding primitive, round_step, in the kernel, proved for every mode (K-U2; branch t3/kernel-round-step-primitive, f0a5d107; reviewed, fixes applied)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 14:04:40 -07:00
swaitsandClaude Sonnet 5.5 f0a5d10708 test(core): round_step's directed modes and finer steps are proved and tested
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>
2026-11-08 14:03:50 -07:00
swaitsandClaude Opus 5.5 512352ecec docs(plan): every CHOICE is a record now; the ones no example shows go on the allow-list
check / check (push) Canceled after 0s
portable-macos / portable (macos-latest) (push) Canceled after 0s
portable-windows / portable (windows-latest) (push) Canceled after 0s
two-user / two-user (push) Canceled after 0s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 13:50:32 -07:00
swaitsandMuse Wonder 1.0 cb55787852 docs(spec): wanderbooks declares its picks for the new CHOICE records (entry, ledger, period, statement, prepaid)
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
2026-11-08 13:49:15 -07:00
swaitsandClaude Opus 5.5 cbcb7f07a6 docs(plan): X-H1 carries the 16 CHOICEs no example can show yet
check / check (push) Canceled after 0s
portable-macos / portable (macos-latest) (push) Canceled after 0s
portable-windows / portable (windows-latest) (push) Canceled after 0s
two-user / two-user (push) Canceled after 0s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 13:48:46 -07:00
swaitsandClaude Sonnet 5.5 422a956ffc docs(spec): wanderbooks declares its picks for the new CHOICE records (partner, asset, 1099, format)
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>
2026-11-08 13:46:41 -07:00
swaitsandDeepSeek V4.1 Flash f16525fd35 test(core): Kani and bridge for round_step
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>
2026-11-08 13:46:24 -07:00
swaitsandDeepSeek V4.1 Flash 74943fb699 refactor(core): one rounding primitive, round_step, in the kernel
Every money round_dp*/rescale in ledger-core now goes through
kernel::round_step: amount to a whole multiple of a step, in a named mode
(half away, half even, toward zero, toward negative infinity), exact
integer arithmetic on Decimal mantissas and scales, None instead of a
panic, no negative zero. The call sites use round_places, which reproduces
Decimal::round_dp_with_strategy exactly (value, scale and its early
return), and add_line_fx uses round_minor for the base currency's smallest
unit. This is a refactor: every site produces exactly what it produced
before, so no golden changes.

The schedules' monthly-even plan keeps its two-place cent rule: moving it
to the currency's minor unit is K-U5's decision (D-72), not this
behaviour-preserving unit. The remaining rescales (money.rs's display
padding, the contribution margin's one place) are formatting, not
rounding, and stay.

Co-Authored-By: DeepSeek V4.1 Flash <noreply@opencode.ai>
2026-11-08 13:37:48 -07:00
swaitsandClaude Opus 5.5 4b295ee224 build: pin bookspec at d877bcf, every area's rules complete there
check / check (push) Canceled after 0s
portable-macos / portable (macos-latest) (push) Canceled after 0s
portable-windows / portable (windows-latest) (push) Canceled after 0s
two-user / two-user (push) Canceled after 0s
bookspec now states the format rules too (S-C6), so every accounting
rule is complete as a record, and the Lean model runs its examples
(L-G3: 8 whole, agreeing with the Rust derivation on all 25 figures both
answer). Lean builds and audits 151; adapter and package tests pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 13:34:55 -07:00
swaitsandClaude Opus 5.5 8ecf177cb2 merge: format claims reduced; the journal format gate's product rules (S-C6; branch t3/format-iif-export-rules, 5e69743d; reviewed, fixes applied)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 13:25:35 -07:00
swaitsandClaude Opus 5.5 63b6001edd build: pin bookspec at 90d005a, A/R and A/P rules and the oracle there
check / check (push) Canceled after 0s
portable-macos / portable (macos-latest) (push) Canceled after 0s
portable-windows / portable (windows-latest) (push) Canceled after 0s
two-user / two-user (push) Canceled after 0s
bookspec now states the A/R and A/P rules and the draft rule completely
(S-C5) and is self-contained (S-K1): the GnuCash oracle's container
lives there and just oracle builds it from this pin. Lean builds and
audits 151; adapter 53, package 29 and the GnuCash oracle pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 13:25:33 -07:00
swaitsandClaude Sonnet 5.5 5e69743d89 fix(spec): the IIF record states the header rows, cites what Intuit says, review fixes
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>
2026-11-08 13:19:48 -07:00
swaitsandClaude Opus 5.5 4090d70a49 merge: the GnuCash oracle comes from the pinned bookspec (S-K1; branch t3/bookspec-self-contained-oracle, 6b275601; reviewed, fixes applied)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 13:13:28 -07:00
swaitsandClaude Opus 5.5 6b27560115 fix(just): oracle finds the pinned bookspec through cargo metadata
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>
2026-11-08 13:13:04 -07:00
swaitsandMuse Wonder 1.0 10e6ccf899 feat(oracle): build the GnuCash image from bookspec, delete the copy
bookspec now owns the oracle (gnucash/oracle/, image
bookspec-gnucash-oracle; unit S-K1). just oracle resolves the pinned
bookspec rev from ledger-core's Cargo.toml, fetches it, and builds
bookspec's image from that checkout: one source of truth, no copy here.
Until the batch pin bump lands a rev that contains gnucash/oracle, the
recipe fails loudly saying so. oracle_gnucash.rs uses the new image name.

Co-Authored-By: Muse Wonder 1.0
2026-11-08 13:01:39 -07:00
swaitsandClaude Opus 5.5 435cb9aa9b merge: A/R and A/P claims and the draft rule reduced (S-C5; branch t3/arap-rules-draft-discard, b4d0c07a; reviewed, fixes applied)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 12:55:00 -07:00
swaitsandClaude Opus 5.5 f7c245ac64 build: pin bookspec at 09b81b9, four areas of rules complete there
check / check (push) Canceled after 0s
portable-macos / portable (macos-latest) (push) Canceled after 0s
portable-windows / portable (windows-latest) (push) Canceled after 0s
two-user / two-user (push) Canceled after 0s
bookspec now states the entry, ledger, statement, period, prepaid,
revenue, partner, asset and 1099 rules completely as records (P14 units
S-C1 to S-C4, each reviewed by a second model and fixed), with the
executable Lean model (L-G1) and the owner's D-73 reversal-date rule;
the matching wanderbooks claims files are reduced to wanderbooks' picks,
enforcement sites and WB product rules (merged above). All four pins
move together; Lean builds and audits 151, the adapter (53) and the
package (29) pass on the new rev.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 12:54:41 -07:00
swaitsandDeepSeek V4.1 Flash 280d3a1b6d docs(spec): format claims reduced to wanderbooks' picks and product rules
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>
2026-11-08 12:49:50 -07:00
swaitsandClaude Sonnet 5.5 b4d0c07a59 docs(spec): entry claims, B-43 reduced to wanderbooks' picks and product rules
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>
2026-11-08 12:45:38 -07:00
swaitsandClaude Sonnet 5.5 c81a21faf5 docs(spec): arap claims reduced to wanderbooks' picks and product rules
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>
2026-11-08 12:45:38 -07:00
swaitsandClaude Opus 5.5 0aeb913756 merge: asset and 1099 claims reduced (S-C4; branch t3/s-c4-asset-1099-spec, d5b589c3; reviewed, fixes applied)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 12:31:07 -07:00
swaitsandClaude Sonnet 5.5 d5b589c324 docs(spec): asset and 1099 claims, review fixes
- 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>
2026-11-08 12:30:05 -07:00
swaitsandClaude Opus 5.5 8bae4e41a0 merge: partner claims reduced (S-C3; branch t3/partner-area-s-c3, cba264d7; reviewed, fixes applied)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 12:21:21 -07:00
swaitsandClaude Opus 5.5 7a6cc9cbd6 merge: statement, period, prepaid and revenue claims reduced (S-C2; branch t3/s-c2-statement-period-revenue, 1349bb47; reviewed, fixes applied)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 12:21:21 -07:00
swaitsandDeepSeek V4.1 Flash ce02a44bb0 docs(spec): 1099 claims reduced to wanderbooks' picks and product rules
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>
2026-11-08 12:17:48 -07:00
swaitsandDeepSeek V4.1 Flash 6f19d4018c docs(spec): asset claims reduced to wanderbooks' picks and product rules
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>
2026-11-08 12:17:48 -07:00
swaitsandClaude Sonnet 5.5 cba264d717 docs(spec): partner claims, review fixes
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>
2026-11-08 12:17:44 -07:00
swaitsandDeepSeek V4.1 Flash 1349bb478b docs(spec): claims restore enforcement sites and product rules (review)
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>
2026-11-08 12:17:01 -07:00
swaitsandClaude Opus 5.5 7e855f16cc merge: entry and ledger claims reduced to wanderbooks' picks and product rules (S-C1; branch t3/s-c1-entry-ledger-rules, 738995a0; reviewed, fixes applied)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 12:10:06 -07:00
swaitsandClaude Opus 5.5 c5fc16cad6 docs(plan): D-73, every reversal is dated on or after its original
check / check (push) Canceled after 0s
portable-macos / portable (macos-latest) (push) Canceled after 0s
portable-windows / portable (windows-latest) (push) Canceled after 0s
two-user / two-user (push) Canceled after 0s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 12:07:04 -07:00
swaitsandMuse Wonder 1.0 738995a0bc fix(spec): entry and ledger records, review fixes
- 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
2026-11-08 12:06:55 -07:00
swaitsandMuse Wonder 1.0 40e433104c docs(spec): partner claims reduced to wanderbooks' picks and product rules
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
2026-11-08 12:06:52 -07:00
swaitsandClaude Sonnet 5.5 1a61472f7b docs(spec): ledger claims reduced to wanderbooks' picks and product rules
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>
2026-11-08 11:53:41 -07:00