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

+3 -3
View File
@@ -8,7 +8,7 @@
//! books.cash_flow, books.export_cpa_package); ASC 230-10-20
//! (financing and investing activities).
//! INVARIANTS:
//! 1. A range's omitted dates are the one default (rules.md B-30,
//! 1. A range's omitted dates are the one default (BS-period-3,
//! `ledger_core::calendar::PeriodDefaults`): an omitted end is
//! `today`, an omitted start the first day of the fiscal year that
//! holds the end; a start after the end, given or derived, is
@@ -16,7 +16,7 @@
//! 2. The cash flow statement needs at least one cash account, and
//! every code it is given must be in the chart; account lists a call
//! leaves empty default to the settings' roles. It foots, or it is
//! refused (an engine error, never a figure: rules.md B-14 rule 9);
//! refused (an engine error, never a figure: BS-statement-3 rule 9);
//! roles that contradict each other or the chart are refused by the
//! engine, naming the setting, so the viewer and the server refuse
//! alike. Members are named on their contributions and
@@ -73,7 +73,7 @@ impl<'a> Settings<'a> {
/// Resolve a statement's date range (INVARIANT 1): the dates as given,
/// each omitted one the books' default for `company` on `today`
/// (rules.md B-30).
/// (BS-period-3).
pub fn statement_range(
company: &Company,
start: Option<&str>,