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
@@ -30,7 +30,7 @@ use chrono::NaiveDate;
pub struct DatedRule {
/// Plain name, e.g. "1099 reporting threshold".
pub name: &'static str,
/// Its entry in docs/spec/rules.md, e.g. "B-19".
/// Its entry in docs/spec/rules.md, e.g. "BS-1099-1".
pub catalog: &'static str,
/// The vendored official text it comes from (a path in this repo,
/// for the people who update the rule).
@@ -61,11 +61,11 @@ impl DatedRule {
}
}
/// The 1099-NEC / 1099-MISC reporting threshold (rules.md B-19): $600 for
/// The 1099-NEC / 1099-MISC reporting threshold (BS-1099-1): $600 for
/// payments through 2025, $2,000 in 2026, then indexed for inflation.
pub const THRESHOLD_1099: DatedRule = DatedRule {
name: "1099 reporting threshold",
catalog: "B-19",
catalog: "BS-1099-1",
source: "docs/spec/sources/irs-1099-thresholds.md",
authority: "26 U.S.C. §6041(a) and (h) and the IRS's yearly figure in the Instructions for Forms 1099-MISC and 1099-NEC (https://www.irs.gov/instructions/i1099mec)",
known_through: 2026,