docs(spec): every rule traced to an authority; public-domain sources vendored
The owner asked that specs come from recognized documents, not from anyone's memory. There is no single US bookkeeping bible; authority is layered, and this records it: - docs/spec/sources/: verbatim excerpts (whitespace normalized), each with URL, retrieval date, and the SHA-256 of the fetched file, of public-domain texts: Pacioli's 1494 treatise in Geijsbeek's 1914 translation (double entry, the trial balance, one money, write only forward, correct by opposite entry, close into capital); IRS Pub. 583, 538, 946, 15; the 1099-MISC/NEC instructions (2025 and 2026); 26 U.S.C. §6041, §6041A, §704; Treas. Reg. §1.263(a)-1(f) and -4(f); Notice 2015-82; Rev. Proc. 98-25; Form 1065 instructions; 17 U.S.C. §105. The excerpts were extracted by matching each passage against the fetched file, so none can contain text the source doesn't. - docs/spec/rules.md: the rule catalog, B-1 to B-22. Each rule says AUTHORITY, CONVENTION, or DECISION; cites its sources (FASB's Codification and Concepts Statement 8 and OpenStax quoted briefly, never copied: copyright and CC BY-NC-SA); and names the code that enforces it and the tests and proofs that check it. - Spec blocks in the code now carry SOURCE: lines into the catalog; AGENTS.md makes sourcing rule 0 of the formal-methods bar. Corrections the sources turned up: the de minimis limit is $500 in the regulation and $2,500 by Notice 2015-82 (both now cited); 1099 thresholds after 2026 are inflation-indexed, so the engine's flat $2,000 for 2027+ is an open question (B-19). Unverified ASC paragraphs (360-10-35-4, 340-10, 230-10-45-10, 606-10-55-37B, 210) are listed in docs/spec/README.md until someone with a FASB basic-view login reads them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GWVo7x3UHw5kwCUaWxiejX
This commit is contained in:
1 parent
e0b6d6988f
commit
855d51e297
15 files changed
+849
-9
No files matched your search
@@ -93,6 +93,16 @@ property tests, mutation testing, and 11.5M fuzz executions:
|
||||
|
||||
So the bar, for every agent, every change:
|
||||
|
||||
0. **Specs come from authorities, not memory.** Every rule the engine
|
||||
enforces is in `docs/spec/rules.md` with its source: Pacioli for the
|
||||
mechanics of double entry, the IRS (vendored verbatim, public domain)
|
||||
for records, periods, 1099s, capitalization, partnerships, and payroll,
|
||||
FASB's Codification (cited, never copied) for GAAP. A rule no authority
|
||||
states is marked CONVENTION or DECISION, with who decided and when.
|
||||
Spec blocks in the code (```text GOAL/SOURCE/INVARIANTS/SCENARIOS)
|
||||
carry a `SOURCE:` line. Never write a spec from what the code happens
|
||||
to do, or from what you remember; find the document, or ask.
|
||||
|
||||
1. **Money arithmetic goes in `kernel.rs`, generic over `Amount`.** If
|
||||
you write a sum, a sign flip, a split, or a rounding plug anywhere
|
||||
else, move it into the kernel. The engine calls the kernel. It never
|
||||
@@ -166,6 +176,7 @@ clone, with status. Rules:
|
||||
| `docs/requirements.md` | What the engine must do (R-1…), what is future work |
|
||||
| `docs/architecture.md` | Crate layout, command pattern, dependency rules |
|
||||
| `docs/oracle.md` | How we check correctness: golden files, property tests, fuzzing, cross-checks against other implementations (and who is right) |
|
||||
| `docs/spec/` | The authorities every rule comes from (`rules.md`), with public-domain sources vendored verbatim |
|
||||
| `docs/verification.md` | The formal proofs: every accounting law, its Kani harness and Lean theorem, what they found |
|
||||
| `docs/parity.md` | Feature catalog and the non-regression floor |
|
||||
| `docs/capability-parity.md` | Parity vs the GSheet+GDrive system + the cutover rule |
|
||||
|
||||
Reference in new issue
Block a user