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:
1 parent
7a177a3cfc
commit
489360f598
221 files changed
+1706
-1580
No files matched your search
@@ -22,7 +22,7 @@
|
||||
//! must hold together ([`Settings::check_whole`]), or none is made.
|
||||
//! 3. Replay takes any value of the right shape ([`shape`]): a check a
|
||||
//! later version tightens never makes older books unreadable
|
||||
//! (rules.md B-28).
|
||||
//! (BS-entry-4).
|
||||
//! 4. A setting never holds a full TIN, except the company's own EIN
|
||||
//! (`company.ein`, decided 2026-10-16, D-5): nine digits standing
|
||||
//! alone, bare or printed the way an SSN or EIN is (3-2-4 or 2-7,
|
||||
@@ -142,7 +142,7 @@ pub enum Kind {
|
||||
/// A positive whole number (a day count, the first invoice number).
|
||||
Count,
|
||||
/// Payment terms, in their one canonical spelling ([`crate::Terms`],
|
||||
/// rules.md B-39).
|
||||
/// BS-arap-3).
|
||||
Terms,
|
||||
/// Payment methods (A-3): a list of `{kind, label, lines, link?, qr?}`.
|
||||
PaymentMethods,
|
||||
@@ -633,7 +633,7 @@ impl Company {
|
||||
}
|
||||
|
||||
/// `policy.require_tax_category`: whether a revenue or expense account
|
||||
/// must map to a line of the return (rules.md B-32; DECISION, owner,
|
||||
/// must map to a line of the return (BS-ledger-11; DECISION, owner,
|
||||
/// 2026-10-20: warn by default; a company may refuse).
|
||||
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)]
|
||||
pub enum TaxCategoryPolicy {
|
||||
@@ -723,7 +723,7 @@ pub fn holds_printed_tin(text: &str) -> bool {
|
||||
/// EIN (2-7) forms count as there, but a bare run of nine digits joined
|
||||
/// to a letter or to the URL punctuation `/ = ? & #` does not: it is an
|
||||
/// id in a path or query (an app store listing's `id284882215`), not a
|
||||
/// TIN someone wrote down (rules.md B-26).
|
||||
/// TIN someone wrote down (BS-partner-2).
|
||||
pub fn holds_printed_tin_in_link(text: &str) -> bool {
|
||||
printed_tin(text, true)
|
||||
}
|
||||
@@ -1936,7 +1936,7 @@ mod tests {
|
||||
assert_eq!(s.get("company.name").unwrap().seq, 7);
|
||||
}
|
||||
|
||||
/// policy.require_tax_category (rules.md B-32): warn or refuse, one
|
||||
/// policy.require_tax_category (BS-ledger-11): warn or refuse, one
|
||||
/// spelling each ("required" and "require" are refuse), nothing else
|
||||
/// ("off" is no value: the warning is the floor); unset is warn.
|
||||
#[test]
|
||||
|
||||
Reference in new issue
Block a user