docs: sub-references name bookspec's statements, invariants and scenarios

Unit S-E rewrote each `B-n` citation to its bookspec id but kept the
sub-reference after it ("item 7", "rule 11", "INVARIANT 2"). Those
numbers counted parts of the retired rules.md text, so `BS-statement-5
item 7` pointed at finished and abandoned projects, not at the snapshot
it meant. Bookspec numbers a record's parts from 1 as `statement`,
`invariant` and `scenario`; every sub-reference now says so.

The map was built by content, not by position: each old item,
INVARIANT or SCENARIO was read in `git show ca8d676d5^:docs/spec/rules.md`
(the last full rule text), found in the pinned records
(bookspec bc92cf3) and in docs/spec/claims/, and each reference was
read in its context before it was mapped. Where the old numbering still
survives as the "Rule n" labels inside bookspec's statements (the cash
flow, party totals) the new number is that statement's position; where
a record carries the whole rule differently (the asset depreciation, the
IIF file, the arap invariants) the reference follows the content. Where
bookspec keeps no counterpart, the product rule that states it is cited
instead: WB-statement-5 (a project's facts and names), -7 (the snapshot),
WB-arap-4 (the document_standing feature), -8 (the issued PDF), -15 (a
payment event names its line), WB-ledger-15 (BS-ledger-12 is retired).
A reference that had pointed at the wrong part is corrected, for example
the discount-reason references that said BS-arap-6 INVARIANT 2 (a
bound) now say invariant 6 (the discount cap and date).

Only the reference tokens and their sentence change; no paragraph is
reflowed. A reference wrapped across a comment prefix keeps its wrap.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
swaitsandClaude Sonnet 5.5 committed 2026-11-09 03:30:06 -07:00
1 parent 609e4e6b26
commit e41cc3a161
78 files changed
+298 -302

No files matched your search

+9 -9
View File
@@ -127,8 +127,8 @@ fn pnl_depreciation(l: &Ledger, end: NaiveDate) -> Decimal {
pnl_expense(l, "6500", end)
}
/// The members' figures agree on every date as BS-partner-1, BS-partner-3 items 4 and 8
/// and BS-statement-3 rule 11 say: the statement of members' equity and the K-1
/// The members' figures agree on every date as BS-partner-1, BS-partner-3 statements 6 and 10
/// and BS-statement-3 statement 16 say: the statement of members' equity and the K-1
/// worksheet are one roll-forward; party totals on basis all are the
/// statement's contributions, on basis cash the K-1's cash
/// contributions; the cash flow statement's contributions are the K-1's
@@ -178,7 +178,7 @@ fn the_members_figures_agree_on_every_date() {
m.contributions,
k.contributions_cash + k.contributions_property
);
// Party totals (BS-partner-3 item 4).
// Party totals (BS-partner-3 statement 6).
let a = activity(&b, party, end);
assert!(a.unresolved.is_empty(), "{name} {end}: {:?}", a.unresolved);
assert_eq!(a.totals(Basis::All).1, m.contributions, "{name} {end}");
@@ -188,7 +188,7 @@ fn the_members_figures_agree_on_every_date() {
"{name} {end}"
);
assert_eq!(a.received_in_kind, k.contributions_property, "{name} {end}");
// The cash flow (BS-statement-3 rule 11, BS-partner-3 item 8).
// The cash flow (BS-statement-3 statement 16, BS-partner-3 statement 10).
assert_eq!(
kind(
&cf,
@@ -208,7 +208,7 @@ fn the_members_figures_agree_on_every_date() {
// A distribution declared to Distributions Payable is a
// distribution on the statement of members' equity when declared
// and on the cash flow statement and in party totals when paid
// (BS-statement-3 rule 2, BS-partner-3 item 4).
// (BS-statement-3 statement 3, BS-partner-3 statement 6).
distributions_paid -= kind(
&cf,
CashFlowSection::Financing,
@@ -281,7 +281,7 @@ fn the_members_figures_agree_on_every_date() {
dec("2400.00")
);
// Mid-year, the declaration is unpaid: the statement counts it, party
// totals and the cash flow don't yet (BS-partner-3 item 4's second condition).
// totals and the cash flow don't yet (BS-partner-3 statement 6's second condition).
let mid = d("2026-06-30");
assert_eq!(
activity(&b, b.ana, mid).totals(Basis::Cash).0,
@@ -296,7 +296,7 @@ fn the_members_figures_agree_on_every_date() {
);
}
/// BS-statement-3 rule 2, from the seam review: a distribution declared to a
/// BS-statement-3 statement 3, from the seam review: a distribution declared to a
/// liability and paid later is a financing outflow when paid (ASC
/// 230-10-45-15(a)), its declaration a noncash financing activity; before
/// the fix it was "Cash paid to suppliers and employees".
@@ -349,7 +349,7 @@ fn a_distribution_declared_then_paid_is_financing_when_paid() {
);
}
/// BS-partner-3 item 9 and BS-1099-1: for a payee every entry of which names it alone,
/// BS-partner-3 statement 11 and BS-1099-1: for a payee every entry of which names it alone,
/// party totals' paid less received (basis cash) is the 1099 worksheet's
/// paid + excluded card + undetermined + not reportable, less what the
/// worksheet lists as received for something else; and the worksheet
@@ -445,7 +445,7 @@ fn iif_dates(iif: &str) -> Vec<NaiveDate> {
.collect()
}
/// Depreciation is one figure everywhere (BS-asset-1 rule 8, BS-statement-3 rule 8,
/// Depreciation is one figure everywhere (BS-asset-1 statement 28, BS-statement-3 statement 13,
/// BS-partner-4): the P&L's expense, the cash flow reconciliation's add-back, the
/// tax-basis K-1's open item, the IIF's, and the runs plus what the
/// disposal posted; the balance sheet's accumulated depreciation is the
+5 -5
View File
@@ -1717,7 +1717,7 @@ fn one_list_of_cash_accounts_per_package() {
assert_eq!(text(&plain, "1099-worksheet-2026.csv"), tool(&cash));
}
/// BS-format-2 rule 8 (P3 cutover review, open point 1): the
/// BS-format-2 statements 27-30 (P3 cutover review, open point 1): the
/// package's QuickBooks file declares every project as a class and
/// carries each line's project in CLASS; a project name written
/// differently is listed in the warnings and the README, whose IIF line
@@ -1776,7 +1776,7 @@ fn the_package_iif_carries_each_lines_project() {
);
}
/// BS-format-2 rule 8 with BS-statement-5 item 8: an invoice's or a bill's
/// BS-format-2 statement 27 with BS-statement-5 statement 6: an invoice's or a bill's
/// lines carry their projects into CLASS through the entry they post,
/// the revenue or expense line of each project tagged, an untagged
/// part and the receivable or payable line left without a class.
@@ -1921,7 +1921,7 @@ fn the_readme_lists_what_the_iif_writes_differently() {
assert!(!text(&p, "README.txt").contains("Written differently"));
}
/// BS-format-2 rule 7 (P3 review round 2): the file names no customer or vendor
/// BS-format-2 statement 26 (P3 review round 2): the file names no customer or vendor
/// (Intuit states no such need for an IIF journal; QuickBooks Desktop asks
/// for one on a journal entry to accounts receivable or payable, and takes
/// one such account a transaction: sources/intuit-iif.md), so the README
@@ -2022,7 +2022,7 @@ fn the_readme_names_the_entries_on_receivables_and_payables() {
assert!(!text(&p, "README.txt").contains("customer or vendor"));
}
/// BS-format-2 item 7: an entry with lines on both the receivables and
/// BS-format-2 statement 7: an entry with lines on both the receivables and
/// payables control accounts is refused, naming its id, and the package is
/// not built: QuickBooks Desktop records at most one A/R or A/P account a
/// transaction, and splitting the entry would change what it says.
@@ -2481,7 +2481,7 @@ fn the_k1_worksheet_reports_tax_basis_capital() {
/// The CPA package's aging CSVs are the agings, one row per open document
/// and a tie-out line that equals the control account (plan P4b S6,
/// 8.3.10; BS-ledger-8, BS-arap-2 INVARIANT 1).
/// 8.3.10; BS-ledger-8, BS-arap-2 invariant 1).
#[test]
fn the_aging_csvs_tie_to_the_control_check() {
let dir = tempfile::Builder::new()