Repository navigation
feat(close): year-end readiness checklist and depreciation entry - #6
Merged
Merged
Conversation
A `quints close` group: `close check --year` runs eleven items over one ledger load — VAT periods settled and paid, no `!` drafts, staging and inbox clear, documents linked, a bank balance assertion dated 1 January (where beancount actually evaluates it), FX revaluation and depreciation booked, year-end rates present, receivables aged — each pass/warn/fail with machine-readable specifics; it reports and exits 0, `--strict` gates on failures. `close depreciation --year` prints the write-down to paste from `depreciation*:` metadata on the fixed-asset open directives, direct or against a Wertberichtigung account, idempotent through a `depreciation_year:` marker, with the ESTV Merkblatt A/1995 Normalsätze shipped as the maximum-rate check. The scaffold opens a fixed-asset and a depreciation account carrying the vocabulary, and a "Close the year" guide documents the sequence. Claude-Session: https://claude.ai/code/session_01P5eEm1HRvxBc3KNz8vdR1R
borgoat
force-pushed
the
feat/close-year-end
branch
from
September 23, 2026 11:56
6597eea to
ae62c0e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What. A
quints closecommand group in the "Reports & year-end" panel:quints close check --year 2026— eleven pass/warn/fail items answering "can this year be closed?", each with counts, account names and dates attached, and the command that fixes it. Reports and exits 0;--strictexits 1 while anything fails.quints close depreciation --year 2026— prints the year's depreciation entry (Art. 960a OR) plus balance assertions to review and paste, likefx revalue. Never writes the ledger; re-running after booking prints a zero delta.Why. The first real fiscal-year close on this tool is due after 2026-12-31, and today the year-end procedure is
prices sync,fx revalue,report statements, with depreciation done by hand and nothing checking that the year is actually ready. The checklist is also the surface an agent can loop on:--jsonwith stable keys,--strictto gate.Depreciation reads metadata on the fixed-asset
opendirectives (depreciation:,depreciation_rate:/useful_life_years:,residual:,depreciation_category:,depreciation_contra:), supports direct and indirect (Wertberichtigung) booking, and warns when a rate exceeds the ESTV Merkblatt A/1995 Normalsatz for its category, shipped as reference data and verified against the ESTV PDF, along with the veb.ch KMU codes for the 15xx contra accounts (added toKMU_NAMES).How to try it:
cd packages/quints/examples uv run --project ../.. quints close check --year 2026 uv run --project ../.. quints close check --year 2026 --json uv run --project ../.. quints close depreciation --year 2026The example's 2026 is deliberately not closed (VAT unsettled, no year-end assertions), which is what the checklist is for.
docs/guides/year-end.mdwalks the whole sequence; every fenced command in it runs in CI.Verified.
make checkgreen: ruff, basedpyright 0 errors, import-linter 3 contracts kept, deptry, vulture, pytest 302 passed / 2 skipped in 2.4s.Known follow-ups.
docs/assets/quickstart.gifnow shows a stale directive count (32, was 30); VAT periods are assumed quarterly in thevatitem; thereceivablesitem will gain payables once that PR lands.🤖 Generated with Claude Code
https://claude.ai/code/session_01P5eEm1HRvxBc3KNz8vdR1R