docs: rules.md is an index; the rules are in bookspec
Pointers that said the rule text lives in docs/spec/rules.md now point at bookspec's rules and/or wanderbooks' claims in docs/spec/claims/: the dated-rule catalog doc, the kernel module header, a payout doc, the spec-derived and model and GnuCash tests (including its panic message), the MCP interface crate table and the spec README. Same treatment for the other stale mentions the grep found in attention, the P3 seams test and the store schema. AGENTS.md gains a Docs index row for docs/spec/claims/. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b63fbf8847
commit
b131bdded8
13 files changed
+25
-17
No files matched your search
@@ -8,8 +8,8 @@
|
||||
//! laws it implements hold for books of any size. See
|
||||
//! `docs/verification.md` for which proof covers which law.
|
||||
//!
|
||||
//! The laws, in the order they appear (each traced to its authority in
|
||||
//! `docs/spec/rules.md`):
|
||||
//! The laws, in the order they appear (each traced to its bookspec rule
|
||||
//! and to wanderbooks' claim in `docs/spec/claims/`):
|
||||
//!
|
||||
//! * a line's signed amount is `+amount` for a debit, `-amount` for a credit
|
||||
//! (BS-entry-2);
|
||||
|
||||
@@ -86,7 +86,7 @@ pub type PayoutPlanLine = (AccountId, Side, Decimal, Option<ClassId>);
|
||||
/// collected; fees debit expense accounts), and the payout reconciles to
|
||||
/// the cent.
|
||||
/// A zero deposit (fees and adjustments ate the sales exactly) has no
|
||||
/// deposit line: every planned line is positive (BS-entry-2, docs/spec/rules.md).
|
||||
/// deposit line: every planned line is positive (BS-entry-2).
|
||||
pub fn payout_plan(
|
||||
payout: &Payout,
|
||||
chart: &ChartOfAccounts,
|
||||
|
||||
@@ -30,7 +30,8 @@ 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. "BS-1099-1".
|
||||
/// Its bookspec rule id, e.g. "BS-1099-1" (indexed in docs/spec/rules.md;
|
||||
/// wanderbooks' claim is in docs/spec/claims/1099.md).
|
||||
pub catalog: &'static str,
|
||||
/// The vendored official text it comes from (a path in this repo,
|
||||
/// for the people who update the rule).
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
//! transcribed into the simplest Rust that has the same observable
|
||||
//! behavior: a list of accounts, a list of drafts, an append-only list of
|
||||
//! posted entries, a list of periods, and loops. It is written from the
|
||||
//! spec (rules.md, the Ledger doc comments), not from ledger.rs.
|
||||
//! spec (bookspec's rules and `docs/spec/claims/`, the Ledger doc
|
||||
//! comments), not from ledger.rs.
|
||||
//!
|
||||
//! Random command sequences, weighted toward commands that interact (post
|
||||
//! a draft, reverse a posted entry, close a period with drafts in it,
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
//! pinned container (bookspec's `gnucash/oracle/`, image
|
||||
//! `bookspec-gnucash-oracle`), and compares every account's
|
||||
//! balance at month ends and random dates, exactly. A difference is a
|
||||
//! finding to adjudicate from principles (rules.md), never a reason to
|
||||
//! finding to adjudicate from principles (bookspec's rules and
|
||||
//! `docs/spec/claims/`), never a reason to
|
||||
//! change wanderbooks to match.
|
||||
//!
|
||||
//! Needs Docker: `just oracle` builds the image and runs this.
|
||||
@@ -283,7 +284,7 @@ fn balances_match_gnucash_on_generated_books() {
|
||||
);
|
||||
assert!(
|
||||
diffs.is_empty(),
|
||||
"{} difference(s) with GnuCash; adjudicate each from rules.md:\n{}",
|
||||
"{} difference(s) with GnuCash; adjudicate each from bookspec's rules (docs/spec/claims/):\n{}",
|
||||
diffs.len(),
|
||||
diffs.join("\n")
|
||||
);
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
//! Spec-derived tests for the `Ledger` command surface.
|
||||
//!
|
||||
//! Written from the spec blocks (GOAL / SOURCE / INVARIANTS / SCENARIOS) in
|
||||
//! the public interface and from `docs/spec/rules.md`, never from the
|
||||
//! the public interface and from bookspec's rules (wanderbooks' claims
|
||||
//! in `docs/spec/claims/`), never from the
|
||||
//! implementation. Every expected value is a literal computed by hand from
|
||||
//! the spec, or a law (a model kept by the test itself). A test whose name
|
||||
//! does not already say its oracle says it in its doc comment.
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
//! Spec-derived tests for the reports (`reports.rs`).
|
||||
//!
|
||||
//! Written from the spec blocks (GOAL / SOURCE / INVARIANTS / SCENARIOS) and
|
||||
//! `docs/spec/rules.md` / `docs/requirements.md` only, never from the
|
||||
//! bookspec's rules and wanderbooks' claims in `docs/spec/claims/` /
|
||||
//! `docs/requirements.md` only, never from the
|
||||
//! implementation. Every expected value is either a literal computed by hand
|
||||
//! from the spec or a law (property) that pins the answer without calling the
|
||||
//! function under test to compute it. Where the random-book tests need a
|
||||
|
||||
@@ -510,8 +510,8 @@ pub fn find_with(
|
||||
});
|
||||
}
|
||||
|
||||
// Rules set by law that wanderbooks may no longer know (rules.md;
|
||||
// owner, 2026-10-13): the agent finds the figure from the authority
|
||||
// Rules set by law that wanderbooks may no longer know (bookspec's
|
||||
// rules and `docs/spec/claims/`; owner, 2026-10-13): the agent finds the figure from the authority
|
||||
// or asks, confirms it, and passes it explicitly (the handbook's
|
||||
// "Rules that change with the law"); the human reports it upstream.
|
||||
for rule in ledger_core::rules::stale_rules(today) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//! P3's seams: the same economic fact, computed by two pieces of the
|
||||
//! engine, agrees (or rules.md says exactly why not).
|
||||
//! engine, agrees (or bookspec's rules / `docs/spec/claims/` say exactly why not).
|
||||
//!
|
||||
//! One year of fictional books for a two-member LLC (Ana Example and Ben
|
||||
//! Example, 50/50), built through the real [`Store`]: cash and property
|
||||
|
||||
@@ -387,7 +387,7 @@ DROP TABLE asset_depreciation;
|
||||
ALTER TABLE asset_depreciation_v13 RENAME TO asset_depreciation;
|
||||
"#,
|
||||
r#"
|
||||
-- v15: a document keeps no figure of its own (plan P4b S1, D-45; rules.md
|
||||
-- v15: a document keeps no figure of its own (plan P4b S1, D-45;
|
||||
-- BS-arap-2): what an invoice or bill has been paid, and its status, are read
|
||||
-- from the ledger lines tagged with it, as of any date, and a reversed
|
||||
-- payment no longer counts. The columns that summed its payment events
|
||||
|
||||
Reference in new issue
Block a user