The owner (2026-10-23): "We should probably just delete the stdio path altogether. THere's no point in that. And it sitting there unused will just lead to bitrot. Nuke it?" Books are served only by the books server (`wanderbooks server`), reached by agents through the bridge (`wanderbooks mcp --book ID`), which stays. Removed: `wanderbooks dev-stdio`, the `ledger-mcp` binary, and `ledger_mcp::run` (stdio and `--http` over a bare data dir), with all that only that mode had: - files the books make coming back inline: `HandedFile.content_base64` is gone, and `download` and `expires_at` are always there; - books with no access log or backups: `books.access_log`, `books.backup` and `books.back_up_now` are always offered, by scope; - the settings file read and reloaded (`legacy_files`), the vault key named by a file or `--vault-key-file`, and the books dir's key-inside-the-books and git checks (with `paths.rs`); - `wire.rs` (the bridge frames an agent's lines itself); - `books.settings`' file fields and `books.start`'s `settings_source`. `BooksServer` is built one way, from `Served` (a book as the books server serves it), in production and in the unit tests. An unknown tool is now a protocol error (mcp-tools.md). Inline file input is unchanged. Then the owner's three decisions (2026-10-23, the question tool): (a) `books.import_settings` is removed entirely (118 tools): old books come in whole by `wanderbooks books adopt`, which reads their settings file once; ledger-config keeps its settings-file parsing only as far as adoption uses it (`load` and the path-reading `effective_receipt_policy` are gone), and `books.chart_template` gives its settings as `books.set_setting` changes. (b) The viewer's loose-books-folder mode is removed (`--data-dir`, `--books-toml`, `--vault-key-file`, the settings file and config.json followed): it opens only books of the data root, reading settings from the journal and the vault from the book's own `vault/` and `keys/`. (c) `wanderbooks dev-stdio` has no stub: it is an unknown command like any other word. Also: an upload's expiry past the calendar is an error, never an empty string. Tests: every suite that drove the stdio server moved to crates/ledger-cli/tests/ and drives a real `wanderbooks server` on a data root of its own (tests/common), handed files by their download; mcp_stdio.rs is mcp_journeys.rs. Tests of what is gone are deleted and listed in docs/testing.md. Docs: plan D-44 (D-18 superseded), STATUS, testing, rules, mcp-interface, the handbook, README; justfile recipes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T3gXMVt7XJPi6ens1or9Dj
129 lines
4.5 KiB
TOML
129 lines
4.5 KiB
TOML
# Every revenue and expense account maps to a line of the return.
|
|
#
|
|
# wanderbooks: P3 defect 8 (an account made without a tax category went
|
|
# unnoticed); rules.md B-32; regression tests
|
|
# `add_account_warns_without_tax_category_defect_8` and
|
|
# `require_tax_category_refuses_defect_8` (ledger-cli
|
|
# tests/spec_tax_policy.rs), `prop_tax_policy_refuses_exactly` (ledger-store
|
|
# tests/store.rs), `needs_attention_flags_every_uncategorized_pl_account_defect_8`
|
|
# (ledger-gui tests/view_model.rs).
|
|
#
|
|
# Expected values (bookspec/README.md): `uncategorized_accounts` lists
|
|
# every account that needs a category and has none, by code; each command
|
|
# is tried on a copy of the books under the policy in force when it is
|
|
# asked: `warn` (the default) after entry 1, `refuse` from then on.
|
|
|
|
id = "tax-category-required"
|
|
title = "Every revenue and expense account maps to a line of the return"
|
|
rule = "A revenue or expense account that is not a header MUST have a tax category, its link to a line of the income tax return, and every such account without one MUST be listed for the human, with activity or not. By default an account created without one is created (and listed); a company MAY refuse to create such an account without one, or to clear one it has. The accounts the books create for a bill, an invoice or a payroll run MUST NOT be refused: they are listed instead."
|
|
status = "CHOICE"
|
|
sources = [
|
|
"IRS Publication 583 (Rev. December 2024): \"Your books must show your gross income, as well as your deductions and credits.\" (why it matters: AUTHORITY; docs/spec/sources/irs-records.md)",
|
|
"Rev. Proc. 98-25 §5.01: the relationship \"between the total of the amounts in the taxpayer's machine-sensible records by account and the taxpayer's return\" (AUTHORITY; docs/spec/sources/irs-records.md)",
|
|
"IRS Publication 583: \"Except in a few cases, the law does not require any specific kind of records.\" (so warn or refuse is the company's choice; docs/spec/sources/irs-records.md)",
|
|
"DECISION, the owner, 2026-10-20 (wanderbooks plan/served.md P3, \"Settled in design\"): warn by default, header accounts exempt (wanderbooks docs/spec/rules.md B-32)",
|
|
]
|
|
tags = ["tax", "chart", "policy"]
|
|
|
|
[setup]
|
|
currency = "USD"
|
|
fiscal_year_start = "01-01"
|
|
basis = "accrual"
|
|
rounding = "half-even"
|
|
|
|
[[setup.accounts]]
|
|
code = "1000"
|
|
name = "Cash"
|
|
type = "asset"
|
|
|
|
[[setup.accounts]]
|
|
code = "4000"
|
|
name = "Sales"
|
|
type = "revenue"
|
|
tax_category = "gross_receipts"
|
|
|
|
[[setup.accounts]]
|
|
code = "6000"
|
|
name = "Operating"
|
|
type = "expense"
|
|
header = true
|
|
|
|
[[setup.accounts]]
|
|
code = "6150"
|
|
name = "Software"
|
|
type = "expense"
|
|
parent = "6000"
|
|
|
|
[[setup.accounts]]
|
|
code = "6160"
|
|
name = "Hosting"
|
|
type = "expense"
|
|
parent = "6000"
|
|
|
|
# Entry 1: Hosting used in the year before; Software never.
|
|
[[events]]
|
|
date = "2025-06-01"
|
|
description = "Hosting"
|
|
lines = [
|
|
{ account = "6160", side = "debit", amount = "12.00" },
|
|
{ account = "1000", side = "credit", amount = "12.00" },
|
|
]
|
|
|
|
# Entry 2, under refuse: a bill, whose expense account (General Expenses,
|
|
# 6999) the books create without a category, never refused.
|
|
[[events]]
|
|
date = "2026-02-01"
|
|
description = "Hosting, billed"
|
|
bill = { vendor = "Example Hosting Co", amount = "42.00" }
|
|
|
|
# After entry 1 (and its expectations), the company turns to refuse.
|
|
[[changes]]
|
|
after = 1
|
|
require_tax_category = "refuse"
|
|
|
|
# Under warn: every account without a category listed, active or not
|
|
# (the header needs none); one created without one is created.
|
|
[[expect]]
|
|
query = "uncategorized_accounts"
|
|
after = 1
|
|
values = ["6150 Software", "6160 Hosting"]
|
|
|
|
[[expect]]
|
|
query = "add_account"
|
|
after = 1
|
|
account = { code = "6170", name = "Domains", type = "expense" }
|
|
accepted = true
|
|
|
|
# Under refuse: refused without one, created with one; a header needs
|
|
# none; a needed category can't be cleared, but can be set; the accounts
|
|
# made earlier stay as they are, and the bill's is listed.
|
|
[[expect]]
|
|
query = "add_account"
|
|
account = { code = "6180", name = "Postage", type = "expense" }
|
|
refused = "tax_category_required"
|
|
|
|
[[expect]]
|
|
query = "add_account"
|
|
account = { code = "6180", name = "Postage", type = "expense", tax_category = "office_expense" }
|
|
accepted = true
|
|
|
|
[[expect]]
|
|
query = "add_account"
|
|
account = { code = "6900", name = "Other", type = "expense", header = true }
|
|
accepted = true
|
|
|
|
[[expect]]
|
|
query = "set_tax_category"
|
|
code = "4000"
|
|
refused = "tax_category_required"
|
|
|
|
[[expect]]
|
|
query = "set_tax_category"
|
|
code = "6150"
|
|
category = "other_deductions"
|
|
accepted = true
|
|
|
|
[[expect]]
|
|
query = "uncategorized_accounts"
|
|
values = ["6150 Software", "6160 Hosting", "6999 General Expenses"]
|