Commit Graph
8 Commits
Author SHA1 Message Date
swaitsandDeepSeek V4.1 Flash ad55ede8e4 docs(claims): refused dates, amounts, periods, roles, exports, 1099 years and returns
Each rule's Checked line names the bookspec example that now shows it, the
enforcement site it goes through, and the test that runs it:

- B-28 (BS-entry-4, BS-entry-7): the date past 9999 and the line past the
  cap, through `try_create_entry` and `add_line`;
- B-12 (BS-period-4): the partly overlapping quarter, through
  `create_period`'s PeriodsOverlap;
- B-23 (BS-ledger-19): the role on a header, through `Store::assign_role`
  and `check_assign_role`;
- BS-format-10: the export refused through `IifError`;
- B-19 (BS-1099-2): the 2027 worksheet refused through `RuleNotKnown`;
- B-26 (BS-partner-8): the return taking 123-45-6789 from the vault.

Co-Authored-By: DeepSeek V4.1 Flash <noreply@opencode.ai>
2026-11-09 07:40:31 -07:00
swaitsandDeepSeek V4.1 Flash 6b20946ae7 docs(claims): name the real items the stricter gate caught
The traceability gate now resolves a name exactly, so five citations that
were only approximately right are corrected to the code they mean:

- `form1099::Vendor1099Report::untagged_payments` is the free
  `form1099::untagged_payments`, not a method.
- `JournalFormat::declared` is the free `format::declared`, not an
  associated function.
- the Deductible and Apportion Lean theorems were cited bare; they live in
  those namespaces (`Deductible.tie_away_pos`, `Apportion.allocW_sum`, ...).
- `control_agrees` is `Documents.control_agrees`.
- `Step.discard` is a Step constructor, not an audited theorem; the claim
  keeps the two audited theorems that prove it.

Co-Authored-By: DeepSeek V4.1 Flash <noreply@opencode.ai>
2026-11-08 21:53:53 -07:00
swaitsandDeepSeek V4.1 Flash 2ef945ae3f docs(claims): name only live records and real items
The traceability gate follows every backticked name a claimed rule's
Enforced and Checked paragraphs carry, so the claims now name what exists:

- B-22 claimed `partly` while stating the engine enforces nothing; it is
  `no` now, with the reason (the policy is the books' own AGENTS.md).
- WB-prepaid-2 is `partly`: replay of old schedules is implemented and
  tested, while moving new monthly-even schedules to the currency's minor
  unit is K-U5 and not landed.
- The stale names: Vendor1099Report::untagged is untagged_payments,
  Asset::set_entry is Ledger::set_asset_acquisition, shares::share_target
  is shares::target, tag_in_use is check_asset_tag's refusal,
  Step.extends and Step.record are the audited Steps.extends and
  Step.record_changes_no_figure, and two asset tests are named as they
  exist (a_journaled_tag_taken_by_another_asset_is_refused_on_open,
  legacy_tax_basis_set_lines_replay_to_todays_figures).
- BS-format-1, BS-ledger-12 and BS-ledger-13 are retired; they are marked
  `retired bookspec:` so a live `bookspec:` id means a live record.
- B-44 and B-45 are wholly product rules: their enforcement and checks are
  the WB rules they point at.
- WB-ledger-3, -4 and -6 had one `Enforced and checked` marker; each now
  carries `Enforced` and `Checked` separately.

Co-Authored-By: DeepSeek V4.1 Flash <noreply@opencode.ai>
2026-11-08 21:20:45 -07:00
swaitsandMuse Wonder 1.0 3877a49a81 docs(spec): one picks list; picks for every CHOICE record
The two S-C7 halves declared their picks two ways; there is now one
shared PICKS list in the bookspec adapter's engine.rs, declared via
Claims::with_choice, and rules_md.rs keeps S-C7b's check (the
backticked option in the claims file must be one of the record's
options and the adapter must declare the same), skipping retired
rules. S-C7a's Pick lines are rewritten with backticks.

Picks are added, in the claims files and the adapter, for the 16
records of s-c7b-noexample (BS-partner-16..18, BS-asset-9,
BS-1099-5, BS-arap-7..14, BS-format-8..10), taken from each parent's
old status_note and the claims' existing Pick lines. BS-partner-9's
pick is gone with its record (folded into BS-partner-2), and
BS-ledger-17's pick now appears once, under B-20.

Co-Authored-By: Muse Wonder 1.0
2026-11-08 14:40:14 -07:00
swaitsandClaude Sonnet 5.5 422a956ffc docs(spec): wanderbooks declares its picks for the new CHOICE records (partner, asset, 1099, format)
bookspec split the CHOICEs embedded in BS-partner-1..4, BS-asset-1, BS-asset-4,
BS-1099-1 and BS-format-2 into records of their own (S-C7b). Wanderbooks'
decisions are unchanged; each is now recorded against the id an engine
declares it by:

- partner: BS-partner-5 largest-remainder-first-listed (owner, 2026-10-13),
  -6 cumulative-from-first-close (D-10, 2026-10-16), -7 running-split (D-38,
  2026-10-20), -8 outside-the-books and -9 tin-facts-then-w9 (2026-10-15),
  -10..-13 money, entry flow, books' carrying amount, labelled basis
  (2026-10-15, 2026-10-20), -14 tax-basis-beside-book (D-41), -15
  running-cumulative (D-38's rule, 2026-10-22)
- asset: BS-asset-5 straight-line-by-days, -6 lesser-of-value-and-basis, -7
  books-recorded-amounts, -8 register-carries-tax-figures
- 1099: BS-1099-2 refuse-an-unknown-year, -3 presumed-a-check-ach-or-transfer,
  -4 dated-by-the-payments-date
- format: BS-format-3..7 (D-36, 2026-10-20)

Each is a `**Pick (BS-..):**` line in docs/spec/claims/<area>.md and a
`with_choice` in the adapter's claims(). The rules_md test no longer expects a
B-n row for a rule born without one (a split-out CHOICE has none): it requires
the pick line, that the pick is one of the record's options, and that the
adapter declares the same option.

The pin is not moved here: this needs bookspec's s-c7b to be merged and the
pin moved to it. Verified with ledger-core's bookspec test patched to the
s-c7b checker and runner (53 passed).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 13:46:41 -07:00
swaitsandClaude Sonnet 5.5 d5b589c324 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 <noreply@anthropic.com>
2026-11-08 12:30:05 -07:00
swaitsandDeepSeek V4.1 Flash ce02a44bb0 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 <noreply@opencode.ai>
2026-11-08 12:17:48 -07:00
swaitsandDeepSeek V4.1 Flash ca8d676d53 docs(spec): rules.md splits into one claims file per bookspec area
P14 unit S-D0 (plan/bookspec-audit.md D0) is a mechanical split, no
content change. bookspec is becoming the definitive spec, and later
units move each rule's accounting text there and reduce wanderbooks'
copy to the engine's claim (the pick, where it is enforced, which
tests check it) plus product rules. Several workers reduce different
areas in parallel; one 3,696-line file blocks them, so the file is
split first by bookspec area (the B -> area map is bookspec's
spec/rules-index.md).

Every `## B-n` section moves verbatim, in B order, into
docs/spec/claims/<area>.md: entry 5, ledger 13, statement 5, period 3,
partner 4, asset 4, prepaid 1, arap 6, revenue 1, 1099 1, format 2.
docs/spec/rules.md keeps its preamble and becomes the index (B,
bookspec id, area, link to the claims heading), so the existing
"rules.md B-n" references still resolve until S-E rewrites them. The
bookspec test now reads every claims file and the index, so every
stated rule's id is still verified where it is carried.

The split is proved lossless: the preamble plus the 45 claims sections
concatenated in B order is byte-identical to the old rules.md. No WB-n
product rules exist in rules.md, so no docs/spec/product.md is created
(D0's other half) until product rules are written.

Co-Authored-By: DeepSeek V4.1 Flash <noreply@opencode.ai>
2026-11-08 11:10:16 -07:00