From 6f19d4018cb93ef77277a57f4575cd75042a0242 Mon Sep 17 00:00:00 2001 From: Stephen Waits Date: Sun, 8 Nov 2026 12:17:48 -0700 Subject: [PATCH 1/3] docs(spec): asset claims reduced to wanderbooks' picks and product rules The accounting text of B-15, B-22, B-24 and B-25 now lives in bookspec's records (`rules/asset/`); this file keeps what is wanderbooks': the option each CHOICE picks, the Enforced and Checked evidence, and the product rules. Picks: B-15's straight-line-by-days (the owner, 2026-10-13, the arithmetic settled from ASC 360-10-35-4 on 2026-10-20); B-24's tag-and-never-reuse (the owner, 2026-10-15); B-25's register-carries-tax-figures and the D-41 options (lesser-of for personal use, the traditional section 704(c) method, the books' recorded contribution values). Product rules: WB-asset-1 (a run's and a disposal's bounds are the commands', replay accepts what earlier versions wrote), WB-asset-2 (the store and the viewer read every run the books recorded), WB-asset-3 (the tag and serial-number events and the label sheet), WB-asset-4 (a legacy basis record reads its book cost; Needs attention asks for the value), WB-asset-5 (the tools never assume a contributed property's value). B-22 is procedural: the bookkeeper is bound, the engine is not, so it claims no engine behaviour and has no product rule. Co-Authored-By: DeepSeek V4.1 Flash --- docs/spec/claims/asset.md | 285 +++++++++++--------------------------- 1 file changed, 79 insertions(+), 206 deletions(-) diff --git a/docs/spec/claims/asset.md b/docs/spec/claims/asset.md index a604b884..4ed6ee67 100644 --- a/docs/spec/claims/asset.md +++ b/docs/spec/claims/asset.md @@ -1,6 +1,6 @@ # Claims: asset -Wanderbooks' claims for bookspec area **asset**: what each rule requires, where the engine enforces it, and which tests check it. Being reduced to the engine's pick and its evidence as P14 unit S-D lands; the accounting text moves to bookspec's `spec/asset.md`. +Wanderbooks' claims for bookspec area **asset**: what each rule requires, where the engine enforces it, and which tests check it. The accounting text lives in bookspec's records (`rules/asset/`); here stay the option wanderbooks picks, its enforcement and tests, and the product rules that are only wanderbooks' (`WB-asset-`). Rules: B-15, B-22, B-24, B-25. @@ -10,131 +10,9 @@ Rules: B-15, B-22, B-24, B-25. **bookspec:** `BS-asset-1` -**Status:** CONVENTION (book method); AUTHORITY for tax conventions, which -wanderbooks does not apply +**Claims:** yes -OpenStax §11.3 (cited): "Straight-line depreciation is a method of -depreciation that evenly splits the depreciable amount across the useful -life of the asset," with "(Cost – salvage value)/Useful life"; partial -periods: "A common method is to allocate depreciation expense based on the -number of months the asset is owned in a year." wanderbooks prorates -partial months by days, including a schedule through a mid-month date -(CHOICE, the owner 2026-10-13). ASC 360-10-35-4 (read 2026-10-14, -`sources/fasb-asc.md`) prescribes no method: cost less salvage is spread -over the useful life "in a systematic and rational manner," as equitably -as possible to the periods served; straight line by days is one such -allocation. -Tax conventions (half-year, mid-month, mid-quarter): IRS Pub. 946 -(`sources/irs-depreciation.md`), for the CPA. - -The rule, exactly (P3, defect 22; the engineer settled it from ASC -360-10-35-4, 2026-10-20): - -1. The life is `[in-service date, in-service date + life months)` (chrono - clamps a day past a month's end: Jan 31 plus one month is Feb 28), cut - into the calendar months it touches. -2. Through day `k` of a month but the life's last, the depreciation is - (cost − salvage) / life × (the months before, each as days held over - days in the month, + `k` / days in this month): the monthly rate by - days. -3. The life's last month takes what the months before it leave, evenly - over its days: through its last day the depreciation is exactly cost - − salvage, and through an earlier day of it, prorated by days, never - plugged to the whole. (Without clamping its daily rate is the first - month's: the remainder is that month's missing days.) Before P3 any - schedule through a day of the final month, and every disposed asset's, - plugged to the whole: a disposal in the final month posted too much - depreciation and too large a gain. -4. Each cumulative figure is rounded half away from zero to the - currency's minor unit (cents; whole yen; a thousandth of a dinar; - ISO 4217, `sources/iso-4217.md`), in exact integer arithmetic - (`kernel::prorated_through`); a month's amount is the difference of - consecutive ones. Through every month end this is the per-month - running total books posted before P3, except where the exact figure is - a half-cent tie, which the old 28-digit Decimal quotients could round - either way; P3 rounds it up, exactly, moving that cent to the month - before. -5. A disposed asset depreciates through its disposal day, held - (inclusive): its schedule, accumulated depreciation and book value - stop there, and equal what the disposal took. The disposal's book - value is cost less the schedule through that day whatever the runs - posted: depreciation still due posts as the final depreciation; - depreciation the disposal month's run (dated its end) posted past the - day is credited back to depreciation expense in the disposal entry - (`excess_depreciation`); and the disposal clears what the runs carry, - so the asset leaves the accumulated depreciation account at zero. A - disposal is refused unless every run carries at the end of the - disposal's month what it carries now (the disposal clears what they - carry now): while a run of a later month stands (reverse it first: - credited back at the disposal day, it would leave the disposal month's - accumulated depreciation a debit and its expense short), or while a - reversal (or re-instatement) of an earlier run dated after the month - isn't undone (the disposal would charge that run again, and the - reversal take it away only later; undone on any open day, so a closed - month never blocks a disposal for ever). A change a run carries only - at later month ends (a later month's run reversed after its month) is - that run's error and its correction, dated when made, and the disposal - leaves it as it is. -6. A month's run posts what the schedule says is due through the - month's end, less what the books carry then, but never so much that - the books would carry more than the schedule at a later month end - (`kernel::catch_up`). What the books carry is read entry by entry, each - in its own month (`assets::depreciation_effects`): a run adds its - amount in its month, a reversal of it takes it away in the reversal's - month. So a month skipped, or a run reversed, is caught up in the month - the run is made (plan/served.md P3, settled in design, 2026-10-20: an - immaterial miss; a material one is restated under ASC 250, a - correction for a human and the CPA), and a month whose run was - reversed after it ended is never run twice (it carried the month at - its end; the run of the reversal's month catches it up). A month a - later run caught up, or that rounds to nothing, posts nothing (an entry - carries no zero line); a run after the life posts what is still due. - A reversed run is un-posted (its month due again, when reversed within - it); re-instating one (reversing its reversal) is refused when it would - carry the books past the schedule (a later run caught its month up: - `assets::catch_up_room`); a disposal, or a run its disposal took as - final, can't be reversed; and a run, or a reversal of one, can't be - reversed on a day before its own (a correction comes after what it - corrects, B-9: a run of March reversed on Jan 31 would leave January - and February with negative depreciation; commands only, journals - replay as written). The viewer and the store read every run the books - recorded (`Ledger::depreciation_runs`: each `asset.depreciation_posted`, - as replay records it), not a month's latest (a run re-instated after its - month was run again and that run reversed is the month's run). -7. Two dates (P3, defect 13). Depreciation starts on the day the asset is - placed in service, never the day it was bought: ASC 360-10-35-4 - spreads cost over the periods the asset serves, and an asset serves no - period before it is in service. (For tax, Pub. 946's "ready and - available for a specific use", `sources/irs-partnership-basis.md`, is - the CPA's.) The register holds an asset from the day the company - acquired it: the date of the entry it is linked to (its purchase or - contribution), never later than the in-service date, or the in-service - date when no entry is linked (settled in design, 2026-10-20: "an - asset's acquired date comes from the entry it is linked to"; one - source of truth, so the register and the general ledger can't - disagree, B-24). A new link to an entry dated after the in-service date - or the disposal is refused, as is a new in-service date before the - linked entry's date; a disposal can't come before the acquired date (a - command's bound; replay accepts what earlier versions did, B-28), and - one before the in-service date takes no depreciation. -8. Posted and scheduled. What the schedule says is due through a date - (`assets::accumulated_scheduled_through`, the tools' - `accumulated_scheduled_through`) and what the books carry - (`Ledger::accumulated_posted`: the runs read entry by entry as rule 6 - reads them, each on its own day: a run adds its amount, a reversal of - it takes it away, a reversal of that reversal adds it back, B-8, B-9; - zero once the asset is disposed, its disposal entry having cleared it) - are two figures, never one: book value is cost less the posted figure - (`assets::scheduled_book_value` is the schedule's own, for the - schedule only). An asset's depreciation expense over a span is its - runs' (`Ledger::depreciation_posted_between`) plus its disposal entry's - lines on its expense account (rule 5): the P&L's, the cash flow - reconciliation's "Depreciation" (B-14 rule 8), the tax-basis K-1's - open item (B-36) and the IIF's all show that one figure - (`depreciation_is_one_figure_everywhere`). `books.list_assets` as of a - day says "disposed" only for a disposal dated by then, as `held` and - the figures do (B-33; before the seam review a later disposal showed - on an earlier day). +**Pick:** `straight-line-by-days`: CHOICE (the owner, 2026-10-13; the engineer settled the arithmetic from ASC 360-10-35-4, 2026-10-20): straight line, partial months prorated by days, including a schedule through a mid-month date, with each cumulative figure rounded half away from zero to the currency's minor unit. The tax conventions (half-year, mid-month, mid-quarter) are not applied: they are the CPA's, per IRS Publication 946. **Enforced:** `assets::depreciation_schedule`, `assets::run_amount`, `assets::catch_up_room`, `assets::depreciation_effects`, @@ -186,7 +64,8 @@ The rule, exactly (P3, defect 22; the engineer settled it from ASC Lean `Prorate.kernel_parts_total`, `Prorate.kernel_parts_nonneg`, `Prorate.part_near`, `Prorate.cum_near`, `Prorate.chargeMid_eq_cum`, `Prorate.chargeLast_eq_cum`, `Prorate.chargeLast_start`, -`Prorate.chargeLast_mono`, `Prorate.cum_mono` (`docs/verification.md`); +`Prorate.chargeLast_mono`, `Prorate.cum_mono`, `Prorate.cum_le`, +`Prorate.cum_full`, `Prorate.cum_dvd` (bookspec's Lean, D-69); `ledger-core` `tests/spec_asset_basis.rs` (the in-service and acquired dates, `accumulated_posted` and its edges, `a_reinstated_run_counts_and_is_live`); `ledger-store` @@ -195,106 +74,78 @@ dates, `accumulated_posted` and its edges, `ledger-cli` `tests/spec_assets.rs` (`a_reversed_run_is_not_posted`, `list_assets_book_value_is_what_the_books_carry`). +### Product rules + +**WB-asset-1** A run's and a disposal's bounds are the commands', never +replay's (B-28): a new link to an entry dated after the in-service date or +after the disposal is refused, a new in-service date before the linked +entry's date is refused, and a disposal cannot be dated before the acquired +date; a journal an earlier version wrote replays as written. (The +accounting part, that depreciation starts on the in-service date and that +the register holds the asset from the acquired date, is `BS-asset-1` +rules 23-24.) +*Enforced:* `set_asset_acquisition` / `replay_set_asset_acquisition`, +`Ledger::asset_acquired_date`, `dispose_asset`, `Asset::set_entry`. +*Checked:* `ledger-core` `tests/spec_asset_basis.rs` (each bound and its +replay pair); `ledger-store` `tests/bounds.rs`. + +**WB-asset-2** The store and the viewer read every run the books recorded +(`Ledger::depreciation_runs`: each `asset.depreciation_posted`, as replay +records it), never a month's latest: a run re-instated after its month was +run again and that run reversed is the month's run. +*Enforced:* `Ledger::depreciation_runs`, `live_depreciation_run`. +*Checked:* `the_viewer_counts_a_run_reinstated_after_its_rerun_was_reversed`, +`prop_the_viewer_reads_an_asset_as_the_store_does`. + ## B-22 Expense or capitalize (book policy, mirrors tax) **bookspec:** `BS-asset-2` -**Status:** AUTHORITY (`sources/irs-capitalization.md`) +**Claims:** partly (the books' own AGENTS.md follows it; the engine enforces nothing) -Treas. Reg. §1.263(a)-1(f)(1)(ii)(D) sets $500 per invoice or item for a -taxpayer without an applicable financial statement "or other amount as -identified in published guidance"; Notice 2015-82 raised it to $2,500 for -taxable years beginning on or after January 1, 2016. The 12-month rule: -§1.263(a)-4(f)(1). The election is made yearly on the return. +**Pick:** none (AUTHORITY; procedural). The books' own AGENTS.md sets the policy; the de minimis and 12-month elections are made on the return. **Enforced:** bookkeeper policy (books' AGENTS.md), not the engine. +### Product rules + +None. + ## B-24 Asset tags: one label per asset, never reused **bookspec:** `BS-asset-3` -**Status:** CHOICE (the owner, 2026-10-15) +**Claims:** yes -Each fixed asset may carry a tag, the label stuck on the thing itself -(generated `PREFIX-0001` or the human's own: 1–32 ASCII letters, digits, -`- _ . /`), and the manufacturer's serial number. Tags are unique ignoring -case and are never reused by another asset, even after a retag or a -disposal, so an old label can never point at the wrong thing. Both are -journaled. The fixed asset register lists every asset acquired by a date -(B-15) and reconciles to the general ledger's cost and accumulated -depreciation accounts: cost per register and per books -(`unregistered_cost`), accumulated depreciation by schedule and per -books (`unposted_depreciation`: run depreciation for it), and from the -assets' runs and per books (`unattributed_accumulated`: an entry made by -hand). Book value on the register is cost less the depreciation posted, -the books' figure, never the schedule's (P3, defect 13). +**Pick:** `tag-and-never-reuse`: CHOICE (the owner, 2026-10-15): each asset may carry one tag, generated `PREFIX-0001` or the human's own, unique ignoring case and never reused, and the register reconciles to the cost and accumulated depreciation accounts. -**Enforced:** `Ledger::set_asset_tag` / `check_asset_tag_for`, -`assets::check_asset_tag`, `assets::check_serial`. **Checked:** -`ledger-core` `tests/spec_asset_tags.rs`; `ledger-store` -`tests/asset_tags.rs`; `ledger-cli` `tests/spec_assets.rs`. +**Enforced:** `Ledger::set_asset_tag` / `check_asset_tag_for` / +`check_asset_tag` (`tag_in_use`, the retag keeping the old tag reserved), +`Ledger::set_asset_serial` / `check_asset_serial`, `assets::check_asset_tag`, +`assets::check_serial`, `reports::fixed_asset_register`. +**Checked:** `ledger-core` `tests/spec_asset_tags.rs`; `ledger-store` +`tests/asset_tags.rs` (`a_tag_is_unique_ignoring_case`, +`a_retagged_assets_old_tag_is_never_reused`); +`ledger-cli` `tests/spec_assets.rs`. + +### Product rules + +**WB-asset-3** A tag and a serial number are journaled (`asset.tagged`, +which keeps the tag the asset had before; `asset.serial_set`), and the +printer makes an Avery 5160 label sheet from the register's tags. +*Enforced:* `Store::set_asset_tag`, `Store::set_asset_serial`; +`books.label_asset`. +*Checked:* `ledger-store` `tests/asset_tags.rs` +(`runs_replay_reload_and_verify_catches_a_tampered_run`); +`ledger-cli` `tests/spec_assets.rs`. ## B-25 Tax figures beside book value: the §723 basis, the depreciable basis, the §704(c) built-in gain **bookspec:** `BS-asset-4` -**Status:** AUTHORITY (`sources/irs-partnership-basis.md`); CHOICE -(the owner, 2026-10-15: the register carries tax basis); CHOICE D-41 -(the owner, 2026-10-20: the depreciable basis of property a member -contributed from personal use is the lesser of its fair market value and -the member's adjusted basis, the CPA to confirm at year end; the -§704(c) method is traditional, recorded as a choice the CPA confirms; -the contributed property's values on the contribution date are the -books' recorded amounts) +**Claims:** yes -Book value and tax figures are different numbers for the same asset. The -book value of a member's contribution is its fair market value (Treas. -Reg. §1.704-1(b)(2)(iv)(d)(1), cited; Treas. Reg. §1.704-3(a)(3)(i): -"book value is equal to fair market value at the time of contribution"). -Three tax figures, each named for what it is, follow from the rule and -the facts recorded (`asset.basis_set`: the rule, the contributing -member's adjusted basis, the fair market value at contribution, the -§704(c) method if chosen, and who gave them, B-29): - -- **Purchase** (`purchase`): "The basis of property shall be the cost of - such property" (IRC §1012(a)); depreciable basis is the cost. Not - §704(c) property: no §723 basis and no built-in gain. -- **§723 basis** of contributed property: "the adjusted basis of such - property to the contributing partner at the time of the contribution" - (IRC §723; Pub. 541: "the partnership's basis for determining - depreciation, depletion, gain, or loss"). Adjusted basis is cost plus - improvements, less depreciation allowed but not less than allowable - (IRC §1016(a)(1)-(2)). wanderbooks does not model §721(b) gain (an - investment-company partnership only), so the §723 basis is the - member's adjusted basis. -- **Depreciable basis:** for business property contributed - (`carryover_723`), the §723 basis; for property a member contributed - from personal use (`personal_use_conversion`), "the lesser of its fair - market value or its adjusted depreciable basis" (Treas. Reg. - §1.168(i)-4(b)(1); Pub. 946, "Property changed from personal use"; - D-41). -- **§704(c) built-in gain or loss at contribution:** fair market value - less the §723 basis ("the excess of the property's book value over the - contributing partner's adjusted tax basis upon contribution", Treas. - Reg. §1.704-3(a)(3)(ii)); fixed at contribution, so correcting the book - cost later never moves it. A built-in loss counts only for the - contributing member (IRC §704(c)(1)(C)). The §704(c) method - (traditional, traditional with curative allocations, remedial: Treas. - Reg. §1.704-3(b)-(d)) is chosen property by property (§1.704-3(a)(2)). - -The figures are at contribution (or purchase): tax depreciation reduces -the basis afterwards (§1016(a)(2)) and the built-in gain or loss "is -thereafter reduced" (§1.704-3(a)(3)(ii)); both are the CPA's (MACRS, -conventions, elections: `sources/irs-depreciation.md`). The facts are -kept, never the figures: the figures are derived when read, under the -rule in force, so a later change to a rule changes the reports without -refusing a line an earlier version wrote (B-28). A record made before -P3 (`asset.tax_basis_set`, with the old names `cost` and `carryover`) -has no fair market value recorded: it reads as the book cost, which -reproduces that version's figures exactly, and Needs attention asks for -the value. wanderbooks' book depreciation is GAAP straight line, not -§704(b) book depreciation, which must keep the tax depreciation's ratio -(Treas. Reg. §1.704-1(b)(2)(iv)(g)(3), cited): neither is the other. +**Pick:** `register-carries-tax-figures` and the D-41 options: the register carries the tax figures beside book value (CHOICE, the owner, 2026-10-15); for property a member contributed from personal use, the depreciable basis is the lesser of its fair market value and the member's adjusted basis, the CPA to confirm at year end; the §704(c) method is `traditional`, recorded as a choice the CPA confirms; the contributed property's values on the contribution date are the books' recorded amounts (CHOICE D-41, the owner, 2026-10-20). **Enforced:** `kernel::basis_figures` (Kani `basis_figures_laws`), `AssetBasis::check` (a purchase takes no contribution facts; a @@ -313,3 +164,25 @@ never assumed). **Checked:** `ledger-core` `tests/spec_asset_basis.rs`, (`prop_basis_figures_laws`); `ledger-store` `tests/asset_tags.rs`; `ledger-cli` `tests/spec_assets.rs`. +### Product rules + +**WB-asset-4** A record made before P3 (`asset.tax_basis_set`, with the +old names `cost` and `carryover`) has no fair market value recorded: it +reads as the book cost, which reproduces that version's figures exactly, +and Needs attention asks for the value. +*Enforced:* `replay_set_asset_tax_basis`, `AssetBasis::check_legacy_journaled`; +`ledger-gui` Needs attention. +*Checked:* `ledger-core` `tests/spec_asset_basis.rs` +(`a_legacy_basis_record_reads_its_book_cost`); `ledger-store` +`tests/asset_tags.rs`. + +**WB-asset-5** The tool surface never assumes a contributed property's +fair market value and never accepts a tax figure without the facts behind +it: `books.register_asset` requires the contribution's fair market value, +and `books.set_asset_tax_basis` records the rule, the member's adjusted +basis, the fair market value at contribution, the §704(c) method if chosen, +and who supplied them. +*Enforced:* `ledger-mcp` `books.register_asset`, `books.set_asset_tax_basis`; +`AssetBasis::check`. +*Checked:* `ledger-cli` `tests/spec_assets.rs`; `ledger-core` +`tests/spec_asset_basis.rs`. From ce02a44bb08c9ac7534c3fecf009bba9127efadb Mon Sep 17 00:00:00 2001 From: Stephen Waits Date: Sun, 8 Nov 2026 12:17:48 -0700 Subject: [PATCH 2/3] docs(spec): 1099 claims reduced to wanderbooks' picks and product rules B-19's accounting text (thresholds, payor, card and network exclusion, the bucket table, decisions and dates, the status function, shares) now lives in bookspec's `rules/1099/`; this file keeps the four embedded choices' picks, the enforced and checked evidence, and the product rules. The picks: an unknown year is refused, never guessed (the owner, 2026-10-13); a cash-account payment with no recorded method is presumed a check, ACH or transfer (D-40, 2026-10-20); a shared entry counts only the payee's share (2026-10-15); decisions are dated and a payment takes the one in force on its reversal chain's first date (D-40). Product rules: WB-1099-1 (the untagged-entry note), WB-1099-2 (the dated registry of known threshold years and its staleness alarm), WB-1099-3 (the recording of payment methods, entry tags, decisions and their sources), WB-1099-4 (the card-account fallback and the card charge listed, not dropped). The Enforced and Checked lists carry over the engine's sites and the buckets' 16-case check, unchanged. Co-Authored-By: DeepSeek V4.1 Flash --- docs/spec/claims/1099.md | 244 ++++++++++----------------------------- 1 file changed, 62 insertions(+), 182 deletions(-) diff --git a/docs/spec/claims/1099.md b/docs/spec/claims/1099.md index 47874f5d..595bbe0f 100644 --- a/docs/spec/claims/1099.md +++ b/docs/spec/claims/1099.md @@ -1,6 +1,6 @@ # Claims: 1099 -Wanderbooks' claims for bookspec area **1099**: what each rule requires, where the engine enforces it, and which tests check it. Being reduced to the engine's pick and its evidence as P14 unit S-D lands; the accounting text moves to bookspec's `spec/1099.md`. +Wanderbooks' claims for bookspec area **1099**: what each rule requires, where the engine enforces it, and which tests check it. The accounting text lives in bookspec's records (`rules/1099/`); here stay the option wanderbooks picks, its enforcement and tests, and the product rules that are only wanderbooks' (`WB-1099-`). Rules: B-19. @@ -10,188 +10,17 @@ Rules: B-19. **bookspec:** `BS-1099-1` -**Status:** AUTHORITY (`sources/irs-1099-thresholds.md`, -`sources/irs-1099-payment-method.md`), with the CHOICEs named below. +**Claims:** yes -$600 through 2025; $2,000 for payments made after Dec. 31, 2025 (26 U.S.C. -§6041(a), §6041A(a)(2), as amended by Pub. L. 119-21 §70433; §70433(f): -"shall apply with respect to payments made after December 31, 2025"); for -calendar years after 2026, indexed to inflation and rounded to the nearest -$100 (§6041(h)). §70433 sets the one amount for Form 1099-NEC -(§6041A(a)(2), §70433(c)) and the §6041(a) payments on 1099-MISC alike. -Gross proceeds paid to an attorney (a payment in connection with legal -services that §6041 doesn't cover, a settlement paid to a claimant's -attorney, say: attorneys' fees for the company's own legal work are -§6041's, on Form 1099-NEC) stay at $600 (Treas. Reg. §1.6045-5(a)(1), -(c)(4)), and royalties report at $10 (§6050N(a)); neither is modeled, and -the worksheet says so. +**Pick:** `refuse-an-unknown-year` and the D-40 options: a threshold the engine does not know is refused, never guessed (CHOICE, the owner, 2026-10-13); a payment from a cash account with no recorded method is presumed a check, ACH or transfer and counts (CHOICE D-40, the owner, 2026-10-20); a shared entry counts only the payee's share (CHOICE, the owner, 2026-10-15); decisions are dated, and each payment takes the decision in force on its reversal chain's first entry's date (CHOICE D-40, the owner, 2026-10-20: "legally this has to be 2 dated statuses"). -**Who pays.** The payor is the person engaged in a trade or business who -makes the payment in its course (Treas. Reg. §1.6041-1(a)(1)(i)). A person -paying on behalf of another is the payor only if it performs management -or oversight functions in connection with the payment or has a -significant economic interest in it; "mere administrative or ministerial -functions such as writing checks at another's direction" are neither -(§1.6041-1(e)(1)). A member who pays a company bill from their own funds -at the company's direction, the company bearing the cost through Due to -Members, does only that: the company stays the payor, so a member's own -cash, check or transfer through a financing account counts. - -**What is paid by card or network.** A transaction reportable under both -§6041 and §6050W "[is] reported under section 6050W and not section -6041", and for that test the third-party-network de minimis is -disregarded (§1.6041-1(a)(1)(iv); the 1099-MISC/NEC instructions, "Form -1099-K"). A payment card is "any card, including any stored-value card" -(§1.6050W-1(b)(3)); the IRS names credit, debit and stored-value cards -("Understanding your Form 1099-K"). The exclusion follows the instrument, -whoever's card it was: a member's personal card is excluded too. A payment -card transaction is one in which the card "is accepted as payment" -(§1.6050W-1(b)(1)) by the payee: a card that only funded a transfer the -payee didn't take as a card payment is not one (a member's -friends-and-family transfer is their cash). Automated clearing houses -"do not qualify as TPSOs" (Instructions for Form 1099-K): ACH, bill-pay -and Zelle are bank payments, not network payments. - -**The rule (`form1099::vendor_1099_report`, `kernel::payment_bucket`).** -Payment methods are recorded once (`instrument.added`: bank, -business_card, member_card, member_cash_or_check, platform, each with the -account it pays through) and entries tagged with the one they were paid -with (`entry.instrument_set`, the reversal chain together). Each line of -a vendor-tagged posted entry has a role from its account: cash -(`books.cash_accounts`), financing (`books.financing_accounts`, and the -account of a member_card, member_cash_or_check or platform method: only -the entry's method says how a payment through it was made), a company -card's account (a business_card method's), or other. First match wins: - -| The line | Bucket | -|---|---| -| the entry's method pays through this line's account, card or network | card (excluded) | -| the entry's method pays through this line's account, bank or a member's own cash or check | counts | -| a cash account (no method, or one naming another account) | counts: presumed check, ACH or transfer (CHOICE D-40, owner, 2026-10-20); tag a debit-card payment with the card | -| a financing account, or a member's or platform method's account (no method, or one naming another account) | undetermined until the method is recorded | -| a company card's account (a business_card method's) | card (excluded) | -| anything else (an expense, payables, prepaid) | no payment line | - -Each entry's buckets are netted (`kernel::net_buckets`, P3 review R1): -money moved between the company's own sources pays no one, so the card -bill (Dr card / Cr bank), a member reimbursed (Dr Due to Members / Cr -bank) and a loan's principal net to zero; when the signs differ, the net -goes to the one bucket with its sign, else to undetermined. A bill is not -paid until it is; a prepayment counts when made (payments made in the -calendar year, §6041(a)); a worksheet as of a day (the CPA package's, -B-33) counts the year's payments from January 1 through that day; a -refund and a reversal net. Money received from a vendor for something else (the entry nets money -in and credits, beside its payment lines, anything a refund of what was -paid doesn't: revenue, receivables, a registered asset's cost account, -equity, or a liability other than payables; a sale, a customer's payment, -a disposal, a loan) is left out and listed, with its reversals (P3 review -R6); a refund credits only an expense, payables, or an asset no money is -paid out of and no one owes (prepaid, a deposit). -Books with no cash accounts named are refused (never "every asset", P3 -review R5), as are books in another currency without a threshold given. -With cash accounts named and no methods or financing accounts, what counts -is exactly the old figure (credits minus debits to cash), but for money -received for something else. - -**The decision.** Each vendor's 1099 decision is nec, misc, -not_reportable with a reason kind and the facts in words, or undetermined; -"not reportable" is never "undetermined" (plan defects 18, 23). No return -is required for payments of bills for merchandise, telephone, freight, -storage and similar (§1.6041-3(c)), or to a corporation (§1.6041-3(p)(1), -except attorneys' fees and medical and health care; a payor may treat a -payee as a corporation by its name "Incorporated, Inc., Corporation, -Corp., P.C., (but not Company or Co.)", a W-9 or a corporate resolution: -§1.6049-4(c)(1)(ii)(A)), a tax-exempt organization ((p)(2)), the United -States ((p)(3)), a State or its political subdivision ((p)(4)), a foreign -government ((p)(5)) or a documented foreign payee (§1.6041-4(a)(1)); an -employee's wages go on Form W-2 (§1.6041-2(a)(1)). Paid by card is never a -vendor's reason: it is a property of each payment. Every new decision -names who made it and when (`settings::Source`). - -**Dated decisions** (CHOICE D-40, owner, 2026-10-20: "legally this has -to be 2 dated statuses"). Each decision takes effect on a date (a W-9's, -or a tax election's: Form 8832's effective date, §301.7701-3(c)(1)(iii)), -or from the beginning; each payment takes the decision in force on its -reversal chain's first entry's date. An LLC electing corporate taxation -keeps its EIN and its vendor record and changes on the election's date; a -payee that incorporates is a new legal person, a new vendor with its own -W-9. A decision written before decisions were kept (no date, no source) -is in force from the beginning, and an old null reads undetermined (plan -5.5). A dated decision with nothing decided before it is refused (it would -leave every earlier payment undetermined); one the same as the decision -before its date takes out any decision recorded for that date. A change -reaching payments in a closed period, or in a year whose 1099s were due -(January 31 of the next year), warns in `books.set_vendor_1099` and -`books.set_entry_instrument`. - -**Status** (per vendor and year; T the threshold, F the payments made -while decided for a 1099, U those while undetermined, lo/hi each with -every reversal chain's unknown settled low or high, P3 review R3): -nothing in F or U is not_reportable when something was paid while not -reportable or the year-end decision is, else under_threshold; anything in -U is undetermined when hi(F) + max(hi(U), 0) ≥ T (a decision is needed), -else under_threshold; otherwise reportable when lo(F) ≥ T, under_threshold -when hi(F) < T, else undetermined. `reportable` is `status = reportable`. -A W-9 is on file by the vendor's flag or its party's W-9 facts. - -An entry naming several parties (a payment shared between a contractor -and a member; `ledger_core::shares`) counts only the vendor's share -toward its 1099: what was paid to the payee (§6041(a)), not what the -entry moved for others. The share is resolved (`shares::resolve`) -against the entry's target (B-35: its money, or, when it moved none, its -parties' own-account movement; a reversal's is its original's negated), -the same target the MCP server checks shares against, then scaled to the -1099 payment (a ratio, so B-35's signs change no 1099 figure: a reversal -negates both the payment and the target): the share unchanged when the -payment equals the target (the usual case, an expense paid from cash or -by a member), else payment × share ÷ target, rounded to the nearest cent, -half away from zero (so a part on a card no method names scales out). The -vendor's part is split across the entry's netted buckets in proportion, -each rounded down to the cent and the cents short handed out by largest -remainder (`kernel::apportion`, P3 review R12), so they sum to it -exactly. A percent split's leftover cent goes to the party named first -(shares INVARIANT 8). A reversal carries the shares and subtracts the -same part, and re-apportioning either one re-apportions the other -(`Ledger::set_entry_parties` INVARIANT 5), so the pair nets to zero. The -vendor tag follows the parties: on an entry naming several, -`set_entry_vendor` never replaces their shares (refused unless the -vendor's party is named), and a vendor record never links to a party -named beside another vendor (`add_vendor`), checked by -`tagging_the_vendor_keeps_a_shared_entrys_parties`, -`clearing_the_vendor_on_a_shared_entry_is_refused`, -`re_apportioning_a_reversed_entry_re_apportions_its_reversal`, -`a_named_party_gaining_a_vendor_record_keeps_one_vendor_per_entry`. -Shares that don't resolve count the whole payment toward the vendor (the -conservative answer) and the entry is listed (`Vendor1099Report:: -unresolved`; a `books.vendor_1099` note). CHOICE (the owner, -2026-10-15: shares). - -**The quieter note.** Untagged posted entries are named only when they -paid money out (netted counts plus undetermined above zero) for something -(a debit to an expense, to payables, or to an asset no money is paid out -of and no one owes), leaving out payroll runs, entries marked as having -no counterparty, entries naming only parties with no 1099 role, and -entries reversed in the year (P3 review R7): one count, the entries when -ten or fewer, and the tool to tag them. - -**Cards and party totals.** The worksheet's card accounts are the -business-card methods' accounts only. Party money's cards are the same -once one is recorded (B-35 item 5: `parties::card_accounts`), and, while -none is, the liabilities named "card"; a charge to such a card leaves no -cash or financing account, so the worksheet counts it for no one either -way, and lists it as a card's only once the card is recorded. The -worksheet is never a party's totals: B-35 item 9 says how the two relate -(a member paying a payee through the members' financing is paid to the -payee in party totals, and the company's payment here), and they never -contradict. - -**Enforced:** `form1099::default_threshold`, a dated rule -(`ledger_core::rules::THRESHOLD_1099`, known through 2026, review from -2026-11-01). For a later year the engine refuses with `RuleNotKnown` -rather than guess; the MCP digest and the viewer's "Needs attention" list -flag the rule once it is due (CHOICE, the owner, 2026-10-13). The -bucket table is `kernel::payment_bucket` (Kani `payment_bucket_is_the_table`, -`payment_split_is_exact`, `net_buckets_keeps_the_total`). **Checked:** +**Enforced:** the bucket table is `kernel::payment_bucket` and +`kernel::net_buckets`; `kernel::apportion` splits a payee's part across +the buckets; `form1099::vendor_1099_report` applies the threshold and the +status function; `shares::resolve` resolves a shared entry's target; +`Ledger::set_entry_parties`, `Ledger::set_entry_vendor`, `add_vendor`. +Kani `payment_bucket_is_the_table`, `payment_split_is_exact`, +`net_buckets_keeps_the_total`. **Checked:** `an_unknown_year_threshold_is_never_guessed`, `dated_rules_go_stale_on_their_review_date`, `the_report_needs_the_cash_accounts_and_dollars`, @@ -219,8 +48,59 @@ bucket table is `kernel::payment_bucket` (Kani `payment_bucket_is_the_table`, `buckets_partition_each_payment`, `a_reversal_nets_every_bucket_to_zero`, `the_worksheet_ties_to_the_ledger`, `party_totals_are_the_1099s_buckets` (ledger-core `tests/form1099.rs`); +`tagging_the_vendor_keeps_a_shared_entrys_parties`, +`clearing_the_vendor_on_a_shared_entry_is_refused`, +`re_apportioning_a_reversed_entry_re_apportions_its_reversal`, +`a_named_party_gaining_a_vendor_record_keeps_one_vendor_per_entry`; `the_untagged_note_counts_only_money_out`, `the_other_receipts_note_says_what_each_entry_did` (ledger-package); the MCP tests through a real books server (ledger-cli); bookspec -`bookspec/examples/1099-*.toml`. +`examples/1099-*.toml`. +### Product rules + +**WB-1099-1** The worksheet names untagged posted entries only when they +paid money out (netted counts plus undetermined above zero) for something +(a debit to an expense, to payables, or to an asset no money is paid out of +and no one owes), leaving out payroll runs, entries marked as having no +counterparty, entries naming only parties with no 1099 role, and entries +reversed in the year: one count, the entries when ten or fewer, and the +tool to tag them. +*Enforced:* `form1099::Vendor1099Report::untagged`, `books.vendor_1099`, +`books.set_entry_vendor`; the digest and Needs attention. +*Checked:* `the_untagged_note_counts_only_money_out`, +`the_other_receipts_note_says_what_each_entry_did` (ledger-package). + +**WB-1099-2** The years whose threshold the engine knows are a dated +registry (`ledger_core::rules::THRESHOLD_1099`, known through 2026, review +from 2026-11-01). For a later year the engine refuses with `RuleNotKnown` +rather than guess, and the digest and the viewer's "Needs attention" list +flag the rule once its review date passes. +*Enforced:* `form1099::default_threshold`, `ledger_core::rules`; +`books.digest`; `ledger-gui` Needs attention. +*Checked:* `an_unknown_year_threshold_is_never_guessed`, +`dated_rules_go_stale_on_their_review_date`. + +**WB-1099-3** Payment methods are recorded once (`instrument.added`: bank, +business_card, member_card, member_cash_or_check, platform, each with the +account it pays through) and entries are tagged with the one they were paid +with (`entry.instrument_set`, the reversal chain together). A vendor's +1099 decision and an entry's instrument are set through the tools +(`books.set_vendor_1099`, `books.set_entry_instrument`), and every decision +names who made it and when (`settings::Source`). +*Enforced:* `Store::add_instrument`, `Store::set_entry_instrument`, +`Store::set_vendor_1099`; `ledger-mcp` `books.set_vendor_1099`, +`books.set_entry_instrument`; `settings::Source`. +*Checked:* `a_dated_decision_records_a_change`, +`a_decision_change_names_the_payments_it_reaches`, +`an_undated_old_decision_is_in_force_from_the_beginning`; the ledger-cli +MCP tests. + +**WB-1099-4** The worksheet's card accounts are the business-card methods' +accounts; while the books record none, they are the liabilities named +"card" (but not "gift") (`parties::card_accounts`). A charge to such a card +leaves no cash or financing account, so the worksheet counts it for no one +either way, and lists it as a card's only once the card is recorded. +*Enforced:* `parties::card_accounts`; `form1099::vendor_1099_report`. +*Checked:* `card_account_payments_are_listed_not_dropped`; +`ledger-core` `tests/spec_party_totals.rs`. From d5b589c3247a73e3b2c5713a64a1e29ccc8ce9e1 Mon Sep 17 00:00:00 2001 From: Stephen Waits Date: Sun, 8 Nov 2026 12:30:05 -0700 Subject: [PATCH 3/3] docs(spec): asset and 1099 claims, review fixes - B-25: the lesser-of pick for personal-use property is named as the MAY of BS-asset-4, taken by analogy to Treas. Reg. 1.168(i)-4(b)(1) (a taxpayer's own conversion); the choice stays wanderbooks', the CPA to confirm. - WB-asset-1 points at BS-asset-1 rules 25-26, which now hold the engine-neutral refusals (link after the in-service date or disposal, in-service date before the linked entry, disposal before the acquired date); the replay carve-out stays here. - WB-1099-4: the worksheet's card accounts are the recorded business-card methods only; the liabilities named "card" are the party-totals fallback, and a charge to one counts for no one either way on the worksheet. - WB-1099-5 (new): attorney gross proceeds ($600) and royalties ($10) are not modelled, and the worksheet says so, as the original B-19 stated. Co-Authored-By: Claude Sonnet 5.5 --- docs/spec/claims/1099.md | 20 ++++++++++++++++---- docs/spec/claims/asset.md | 16 ++++++++-------- 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/docs/spec/claims/1099.md b/docs/spec/claims/1099.md index 595bbe0f..2442d792 100644 --- a/docs/spec/claims/1099.md +++ b/docs/spec/claims/1099.md @@ -96,11 +96,23 @@ names who made it and when (`settings::Source`). `an_undated_old_decision_is_in_force_from_the_beginning`; the ledger-cli MCP tests. -**WB-1099-4** The worksheet's card accounts are the business-card methods' -accounts; while the books record none, they are the liabilities named -"card" (but not "gift") (`parties::card_accounts`). A charge to such a card +**WB-1099-4** The worksheet's card accounts are the recorded +business-card methods' accounts only. Party totals use the same accounts +once a card is recorded and, while none is, the liabilities named "card" +(but not "gift") (`parties::card_accounts`, B-35). A charge to such a card leaves no cash or financing account, so the worksheet counts it for no one -either way, and lists it as a card's only once the card is recorded. +either way (not as a payment, not as excluded), and lists it as a card's +only once the card is recorded. *Enforced:* `parties::card_accounts`; `form1099::vendor_1099_report`. *Checked:* `card_account_payments_are_listed_not_dropped`; `ledger-core` `tests/spec_party_totals.rs`. + +**WB-1099-5** Gross proceeds paid to an attorney ($600, Treas. Reg. +§1.6045-5(a)(1)) and royalties ($10, §6050N(a)) have their own thresholds +and forms (`BS-1099-1`, applicability); wanderbooks models neither, and the +worksheet says so: its status notes that royalties at $10 and attorneys' +gross proceeds at $600 are not modelled, to be confirmed with the CPA. +*Enforced:* `form1099::default_threshold`, `form1099::Status1099` +(`UnderThreshold`, the note). +*Checked:* none beyond the doc comments; the worksheet's one amount is +the tested one (`an_unknown_year_threshold_is_never_guessed`). diff --git a/docs/spec/claims/asset.md b/docs/spec/claims/asset.md index 4ed6ee67..e7f242c8 100644 --- a/docs/spec/claims/asset.md +++ b/docs/spec/claims/asset.md @@ -76,13 +76,13 @@ dates, `accumulated_posted` and its edges, ### Product rules -**WB-asset-1** A run's and a disposal's bounds are the commands', never -replay's (B-28): a new link to an entry dated after the in-service date or -after the disposal is refused, a new in-service date before the linked -entry's date is refused, and a disposal cannot be dated before the acquired -date; a journal an earlier version wrote replays as written. (The -accounting part, that depreciation starts on the in-service date and that -the register holds the asset from the acquired date, is `BS-asset-1` +**WB-asset-1** The bounds `BS-asset-1` states (rules 25-26: a new link to +an entry dated after the in-service date or the disposal is refused, as is +a new in-service date before the linked entry's date, and a disposal dated +before the acquired date is refused) are the commands', never replay's +(B-28): a journal an earlier version wrote replays as written, whatever +those dates say. (That depreciation starts on the in-service date and that +the register holds the asset from the acquired date are `BS-asset-1` rules 23-24.) *Enforced:* `set_asset_acquisition` / `replay_set_asset_acquisition`, `Ledger::asset_acquired_date`, `dispose_asset`, `Asset::set_entry`. @@ -145,7 +145,7 @@ printer makes an Avery 5160 label sheet from the register's tags. **Claims:** yes -**Pick:** `register-carries-tax-figures` and the D-41 options: the register carries the tax figures beside book value (CHOICE, the owner, 2026-10-15); for property a member contributed from personal use, the depreciable basis is the lesser of its fair market value and the member's adjusted basis, the CPA to confirm at year end; the §704(c) method is `traditional`, recorded as a choice the CPA confirms; the contributed property's values on the contribution date are the books' recorded amounts (CHOICE D-41, the owner, 2026-10-20). +**Pick:** `register-carries-tax-figures` and the D-41 options: the register carries the tax figures beside book value (CHOICE, the owner, 2026-10-15); for property a member contributed from personal use, the depreciable basis is the lesser of its fair market value and the member's adjusted basis (the MAY of `BS-asset-4`, taken by analogy to Treas. Reg. §1.168(i)-4(b)(1), which governs a taxpayer converting its own property; the choice is wanderbooks', the CPA to confirm at year end); the §704(c) method is `traditional`, recorded as a choice the CPA confirms; the contributed property's values on the contribution date are the books' recorded amounts (CHOICE D-41, the owner, 2026-10-20). **Enforced:** `kernel::basis_figures` (Kani `basis_figures_laws`), `AssetBasis::check` (a purchase takes no contribution facts; a