refactor: rule references cite bookspec ids

Every B-n citation in crates/, docs/, deploy/, scripts/ and .github/ now names its bookspec id BS-<area>-<n> (D-68), via scripts/rewrite-rule-refs.py: the map is parsed from docs/spec/rules.md's index, rules.md-prefixed and bare forms are rewritten, sub-references (rule 11, item 7, INVARIANT 2) survive, and plan/, docs/spec/rules.md and docs/spec/claims/ are untouched. Program-output string literals that cited a rule were reverted by hand so user-visible output and its goldens are unchanged; DatedRule.catalog, metadata no output prints, now holds BS-1099-1. One SOURCE line that cited only 'R-?' now also cites BS-statement-5.

Co-Authored-By: Muse Wonder 1.0
This commit is contained in:
swaitsandMuse Wonder 1.0 committed 2026-11-08 19:40:22 -07:00
1 parent 7a177a3cfc
commit 489360f598
221 files changed
+1706 -1580

No files matched your search

+6 -6
View File
@@ -71,7 +71,7 @@
//! amortization: no counterparty by nature) (one item: Info under
//! suggest, Todo under require; its prompt names
//! books.set_entry_party); each warning of the fiscal year's
//! statement of cash flows (rules.md B-14 rule 12: equipment sold for
//! statement of cash flows (BS-statement-3 rule 12: equipment sold for
//! an IOU, Todo; bought on an operating payable, Info; one per
//! entry, its detail the warning's fix); a filed PDF whose text
//! extraction failed (Todo, one per file: a human must read its
@@ -87,7 +87,7 @@
//! 3. Nothing else: books with none of those yield no items, except
//! that a figure behind an item that can't be computed (an
//! amortization plan past chrono's last day, an aging past exact
//! arithmetic: books an earlier version wrote, rules.md B-28) is one
//! arithmetic: books an earlier version wrote, BS-entry-4) is one
//! Problem item saying so, never a panic or a guess.
//! 4. Every item's prompt starts "In wanderbooks," or names
//! wanderbooks, and its amounts are the books' exact amounts.
@@ -477,7 +477,7 @@ pub fn find_with(
}
// Every revenue and expense account (not a header) without a tax
// category, with activity or not (rules.md B-32): the one list the
// category, with activity or not (BS-ledger-11): the one list the
// digest gives the agent too.
let uncategorized: Vec<String> = ledger_core::tax::uncategorized_accounts(ledger)
.into_iter()
@@ -1341,8 +1341,8 @@ pub fn find_with(
});
}
// The statement of cash flows' warnings this fiscal year (rules.md
// B-14 rule 12, D-35): equipment sold for an IOU, flagged with its fix
// The statement of cash flows' warnings this fiscal year (
// BS-statement-3 rule 12, D-35): equipment sold for an IOU, flagged with its fix
// (Todo); equipment bought on an operating payable, following how the
// payable is classified (Info). A statement the settings can't give
// (no cash accounts yet) has none.
@@ -1867,7 +1867,7 @@ fn paid_this_year(
a.paid - a.received
}
/// A figure the books can't compute (rules.md B-28: books an earlier
/// A figure the books can't compute (BS-entry-4: books an earlier
/// version wrote may hold dates past chrono's calendar or amounts past
/// exact arithmetic): a Problem saying so and why, never a guess.
fn cant_compute(what: String, why: &LedgerError, target: Target) -> Attention {