diff --git a/plan/p14-bookspec.md b/plan/p14-bookspec.md index 2f00a894..8739f9fe 100644 --- a/plan/p14-bookspec.md +++ b/plan/p14-bookspec.md @@ -81,7 +81,7 @@ workers have been faster). | **X-K2** | Profiles (core, documents, partners, us-tax, formats) and an engine builder's guide; the hard-coded accounts become setup keys | S-A, X-H1 | bookspec `checker/src/{engine,schema}.rs`, `spec/00-model.md` | M | | **X-O** | hledger as a second oracle: a pinned container (official static 1.52.4, sha256 in the Dockerfile), a bookspec engine adapter, and wanderbooks' random-book differential beside GnuCash's (task C; `plan/kernel-sweep-audit.md` section 4) | S-K1 | bookspec `hledger/**`; wanderbooks `tests/oracle_hledger.rs`, `justfile` | M | | **K-U0** | Kernel and proofs into modules (`kernel/`, `proofs/`, `tests/kernel_bridge/`), `_kani` updated, `just prove` unchanged | none | `crates/ledger-core/src/{kernel,proofs}/**`, `tests/kernel_bridge/**`, `justfile` | S | -| **K-U1..U9** | The sweep (`plan/kernel-sweep-audit.md` section 3), in value order: U1 FX, U3 shares (six copies to one; legacy replay policies only named, never changed), U2 rounding, U5 schedules (D-72), U4 totals (the raw-operator panic class), U6 ratios, U7 payroll, U8 control and aging, U9 display rounding. Each: kernel functions, Kani, bridge, its law in bookspec's Lean, its rule cited by BS id | K-U0; Lean laws after L-F2 | its own `kernel/.rs`, `proofs/.rs`, bridge module, call sites | S-M each | +| **K-U1..U9** | The sweep (`plan/kernel-sweep-audit.md` section 3), in value order: U1 FX, U3 shares (six copies to one; legacy replay policies only named, never changed), U2 rounding, U5 schedules (D-72), U4 totals (the raw-operator panic class), U6 ratios, U7 payroll, U8 control and aging, U9 display rounding (and the viewer's f64 percentages: `ledger-gui` `fmt::pct_change` divides money amounts in f64 and prints the result, a money path by AGENTS.md's first non-negotiable; K-U6's review, 2026-11-09: U9 does not close until it is a `Decimal` computation, with `profit::pct`, the reports' change and share columns and `capital::percent` decided alongside). Each: kernel functions, Kani, bridge, its law in bookspec's Lean, its rule cited by BS id | K-U0; Lean laws after L-F2 | its own `kernel/.rs`, `proofs/.rs`, bridge module, call sites | S-M each | | **S-E2** | The 13 rule citations S-E kept in program output move to BS ids together: the eight B-43 evidence-source strings in `ledger.rs`, the two lines recording them in `ledger-store/tests/golden/draft_states_and_evidence_gate.json` (a string-only golden edit, verified by hand and explained in the commit), `ledger-package/src/package.rs` (CPA package text), `ledger-mcp/src/tools/settlements.rs` (a tool description), and the GUI `CONTRIBUTION_NOTE` (`rules.md B-37 item 7`). First establish whether any of these strings is stored in a journal or the store (then old books must still read: replay keeps the old text, new writes the new); then shrink `source_refs.rs`'s kept-string allow-list to zero (S-E review, 2026-11-08) | S-E merged | those six files, the golden, `tests/bookspec/source_refs.rs` | S | | **S-E3** | The sub-references S-E carried over move to bookspec's numbering: S-E rewrote `B-37 item 7` as `BS-statement-5 item 7`, but the old items were the rules.md text's and bookspec's records number their statements, invariants and scenarios their own way (S-E2 found `BS-statement-5 item 7` now means finished or abandoned projects; the document lines are item 6). 261 such references outside `plan/` (`BS-statement-3 rule n` 67+, `BS-statement-5 item n` 57, `BS-partner-3 item n` 44, `BS-arap-2 INVARIANT n` 17, and others). Build the map from the last rules.md that held the text (before S-D0) to each record's statements, rewrite each reference, and add a test that every `BS-- k` names one the pinned record has (S-E2, 2026-11-09) | S-E2 merged | the files that cite them, `tests/bookspec/source_refs.rs` | M | | **S-C8** | bookspec's records cite their own parts by position: BS-format-2's statements cite each other as "(item 22)", "(item 18)", "(item 24)" (the old word, though the number is the position), and BS-statement-3's and BS-partner-3's statements open with "Rule n" labels that no longer equal their positions (BS-statement-3 statement 16 is "Rule 11"). Rewrite the cross-references as "statement k", and drop the labels or keep them only where an outside text cites them (then say so); extend the checker so a record's internal "statement k" names a part it has (found by S-E3, 2026-11-09) | S-E3 merged | bookspec `rules/format/BS-format-2.toml`, `rules/statement/BS-statement-3.toml`, `rules/partner/BS-partner-3.toml`, the checker | S |