docs(plan): P14, bookspec the definitive spec, the kernel sweep, D-68 to D-72

The owner's decisions of 2026-11-08 and the plan built from the two
audits: bookspec becomes the specification (one structured record per
rule with a plain-English description, the laws proved once in its
Lean, wanderbooks keeping claims and WB-n product rules), every money
computation moves into the proved kernel, the Lean model is run against
the code, and hledger joins GnuCash as an oracle.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
swaitsandClaude Opus 5.5 committed 2026-11-08 10:03:07 -07:00
1 parent c433bc5062
commit c99a24893c
2 files changed
+97

No files matched your search

+6
View File
@@ -839,6 +839,7 @@ One row per unit of work. A unit is what one engineer takes into one git worktre
| P11c | The native Windows port: named pipes with the SID check, owner-only DACLs, file locking, the `%LOCALAPPDATA%` data root, the Windows CI job made gating (D-62) | landed 2026-10-31 (`05aece9f`, branch `P11c` at 36a7ad51): the `portable-windows` job is green and gating; Done-when 2 (the app walked on a Windows machine) is the owner's | U0e; P11a step 0 (the portable job) | P11b, P12 | none | 5-8 |
| P12 | Max testing, again | step 1 landed 2026-11-05 (`3aa1206a`: the two fuzz targets, the op-sequence ops, the four mutation recipes, one checklist per crate; no mutation shards in CI, D-59); step 2 (the run) is the owner's, overnight on his machine | everything else merged | | none | 2-3 (+ machine time) |
| P13 | bookspec: checker crate, `Engine` trait, rule ids, the spec text, the runner | steps 1-6 done: steps 1-5 landed (`579d0eed`, `d839e709`); step 6 landed 2026-10-29 (`d738c445`): the specification lives at `git.swaits.com/swaits/bookspec`, pinned by rev (D-65); ten stated rules still lack an example (the schema cannot show them yet), listed in the As-built block | none for steps 1-4; the engine stable for step 5 | everything | none | 15-20 |
| P14 | bookspec the definitive spec; the kernel sweep; the Lean model checked against the code; hledger | planned 2026-11-08 (`plan/p14-bookspec.md`, D-68 to D-72); wave 1 started | P13 | everything | D-72's schedule feature | 40-60 (audits' estimate) |
#### 8.0.2 Dependency graph and merge order
@@ -2189,6 +2190,11 @@ The owner decisions of 2026-10-16 (at the top of this document) replace the form
| D-65 | P13 step 6 (owner, 2026-10-29, the question tool: "Split it out now"; then, when this session's token could not create a GitHub repository: "Gitea only, skip GitHub") | **The bookspec specification lives in a public repository of its own, `https://git.swaits.com/swaits/bookspec`** (history preserved; CC BY 4.0 for the text and examples, MIT OR Apache-2.0 for the code), and wanderbooks depends on it pinned by commit, so `just check` still runs every example. No GitHub copy. The ten stated rules without examples and the reserved numbers are published as such. | P13 step 6; `crates/ledger-core/Cargo.toml` |
| D-66 | P12 step 2's shape (owner, 2026-11-06, the question tool: "Shorter fuzzing (1 hour each)") | **The run is one resumable nightly command, `just p12-night`, on the owner's machine: it resumes where the last night stopped and stops at 07:00, so the laptop is free by day. Every fuzz target runs 1 hour, all thirteen side by side (the owner's number, which 8.2 P12 step 2 allows in place of 4 hours).** Then `just prove-all`, `just oracle`, the property maxima, then mutation crate by crate over later nights. What a night finds is fixed by day. | P12 step 2 |
| D-67 | Tax summary rounding (owner, 2026-11-07, the question tool: "Round once per category") | **A category's deductible amount is the exact sum of its accounts' shares, rounded once to the cent; was per account then summed, up to a cent per account apart. Follows B-21's 'round off only the total'.** | `ledger_core::tax_summary`; rules.md B-32, B-21 |
| D-68 | bookspec is the definitive spec (owner, 2026-11-08, the question tool: "Move into bookspec"; and "bookspec can be very technical ... human readable aspects (descriptions, at minimum), but the rest can be structured, machine readable specs, theorems") | **Every accounting rule's statement, sources, status, invariants and scenarios moves into bookspec as one structured record per rule, each with a plain-English description; wanderbooks keeps only its claims keyed by BS ids and its own product rules. AGENTS.md and the code's SOURCE lines cite bookspec ids.** Plan: `plan/p14-bookspec.md` |
| D-69 | Where the Lean laws live (owner, 2026-11-08, the question tool: first "Keep both, check they match", then, after the audit showed the copies near-identical and a cross-package build in 15 s, "Switch to one copy in bookspec") | **The laws are proved once, in bookspec's Lean; wanderbooks' `verify/lean` requires bookspec's lake package at the same pinned rev and keeps only its model of its own commands.** |
| D-70 | Pushing bookspec (owner, 2026-11-08, the question tool: "Yes, same as wanderbooks") | **Reviewed bookspec changes go straight to bookspec main; wanderbooks' pin moves forward in the same batch.** |
| D-71 | Product rules and licence (owner, 2026-11-08, the question tool: "Generic in bookspec, rest WB-n"; "Yes, CC BY 4.0") | **bookspec keeps only the general principle of a product rule, inside an engine-independent rule; wholly product ids (`BS-format-1`, `BS-ledger-12`, `BS-ledger-13`) are retired, never reused; wanderbooks keeps its product rules as WB-n. Rule text moved from rules.md is CC BY 4.0 in bookspec.** |
| D-72 | Amortization rounding by currency (owner, 2026-11-08, the question tool: "Version the rule") | **New monthly-even schedules round to the currency's minor unit (was 2 places for every currency, wrong for JPY and KWD); schedules written before the format feature replay the cent rule, so nothing journaled moves.** |
### 10.2 Deferred