Files
BortStack-Accounting/docs/TASKS.md
T

31 KiB

Approved v1 Implementation Backlog

Statuses: NOT STARTED, IN PROGRESS, BLOCKED, COMPLETE. Normally only one major task is IN PROGRESS.

P0 Foundation

FND-001 — Python package and test tooling skeleton

  • Priority: P0; Status: COMPLETE
  • Objective: Create an installable src package and isolated test entry point.
  • Scope: package metadata, src/roborto_accounting/, tests/, smoke test only.
  • Acceptance criteria: package imports; test command passes; layout leaves clear domain/persistence/services/CLI/report boundaries.
  • Relevant code: pyproject.toml, src/roborto_accounting/, tests/.
  • Validation: .venv/bin/python -m pytest -q passes.
  • Dependencies/blockers: none.
  • Non-goals: schema, migrations, CLI commands, accounting logic, web code.
  • Open questions: packaging details may be refined without changing boundaries.

FND-002 — SQLAlchemy/SQLite persistence foundation

  • Priority: P0; Status: COMPLETE
  • Objective: Configure engine/session and persistence boundary.
  • Scope: SQLite URL/config, session lifecycle, repository conventions, temp DB support.
  • Acceptance criteria: service-facing persistence API opens SQLite without CLI imports.
  • Relevant code: persistence/, tests.
  • Validation: temporary SQLite integration/error tests.
  • Dependencies: FND-001. Non-goals: schema, reports, web server. Open questions: none.

FND-003 — Alembic and exact monetary representation

  • Priority: P0; Status: COMPLETE
  • Objective: Establish migrations and exact Decimal storage policy.
  • Scope: Alembic environment, initial migration workflow, SQLite encoding/scale/rounding.
  • Acceptance criteria: upgrade/downgrade works; monetary round-trip proves no floats.
  • Relevant code: src/roborto_accounting/migrations/, persistence money type, tests.
  • Validation: migration and arithmetic tests.
  • Dependencies: FND-002. Non-goals: business tables. Open questions: exact encoding is proposed.

FND-004 — Domain/application-service boundaries

  • Priority: P0; Status: COMPLETE
  • Objective: Define dependency direction and reusable service contracts.
  • Scope: modules, errors/results, transaction boundary, no CLI dependency.
  • Acceptance criteria: service can be called without CLI imports and boundary tests pass.
  • Relevant code: domain/, services/, persistence/.
  • Validation: import/service contract tests.
  • Dependencies: FND-001, FND-002. Non-goals: workflows. Open questions: none.

FND-005 — Business settings and chart of accounts

  • Priority: P0; Status: COMPLETE
  • Objective: Persist required settings and a safe customisable sole-trader chart.
  • Scope: nullable commencement, EUR, defaults, VAT toggle/prefixes/paths, account classes, add/rename/disable and protected posted accounts.
  • Acceptance criteria: required asset/liability/equity/income/expense coverage is seeded; settings defaults and account lifecycle constraints pass.
  • Relevant code: settings/accounts domain and persistence.
  • Validation: defaults and account lifecycle tests.
  • Dependencies: FND-003, FND-004. Non-goals: tax conclusions, settings UI. Open questions: none.

ACC-001 — Balanced journal/posting engine

  • Priority: P0; Status: COMPLETE
  • Objective: Provide balanced journal primitives and explicit audited manual journals.
  • Scope: headers/lines, posting, account validation, Decimal totals, reason requirement.
  • Acceptance criteria: every posted journal balances; invalid manual journals reject.
  • Relevant code: accounting domain/persistence/services.
  • Validation: balancing, invalid-post, exact arithmetic tests.
  • Dependencies: FND-003, FND-005. Non-goals: higher workflows. Open questions: none.

ACC-002 — Audit and accounting invariants

  • Priority: P0; Status: COMPLETE
  • Objective: Record meaningful changes and enforce non-destructive correction hooks.
  • Scope: audit type/id/action/time/old/new/reason/source and invariant helpers.
  • Acceptance criteria: audit metadata is persisted; posted history is not silently deleted.
  • Relevant code: audit/journal services.
  • Validation: audit/correction tests.
  • Dependencies: ACC-001. Non-goals: identity system/period lock. Open questions: none.

P1 Core records and workflows

CORE-001 — Clients and issue-time snapshots

  • Priority: P1; Status: COMPLETE
  • Objective: Manage client contacts, VAT ID, terms, notes, and immutable snapshots.
  • Scope: reusable client record and snapshot value/storage.
  • Acceptance criteria: edits never alter issued document snapshots.
  • Relevant code: client domain/persistence/services.
  • Validation: validation and snapshot tests.
  • Dependencies: FND-005, ACC-001. Non-goals: rendering. Open questions: none.

CORE-002 — Suppliers and financial accounts

  • Priority: P1; Status: COMPLETE
  • Objective: Add supplier records and extensible owned payment accounts.
  • Scope: supplier info, bank/cash/PayPal/card/personal funds, notes/tags.
  • Acceptance criteria: later bills/expenses can link; transfers avoid income/expense.
  • Relevant code: supplier/account domain.
  • Validation: constraints/type tests.
  • Dependencies: FND-005, ACC-001. Non-goals: online banking. Open questions: none.

CORE-003 — Projects and billing-rate hierarchy

  • Priority: P1; Status: COMPLETE
  • Objective: Link lightweight client jobs and resolve business→client→project→entry rates.
  • Scope: project links and captured rate overrides.
  • Acceptance criteria: precedence works; historical captured rates are stable.
  • Relevant code: project/rate services.
  • Validation: precedence/history tests.
  • Dependencies: CORE-001, FND-005. Non-goals: project management. Open questions: none.

CORE-004 — Expenses, funding, transfers, and mixed use

  • Priority: P1; Status: COMPLETE
  • Objective: Record expenses, capital, drawings, transfers, personal funding, and proportions.
  • Scope: immediate-paid expenses, non-wage drawings, business-use percentage/basis/notes.
  • Acceptance criteria: transfers are not income/expense; full actual and business portion preserved; supplied percentages only.
  • Relevant code: expense/funding services and journal mappings.
  • Validation: balanced workflow and mixed-use tests.
  • Dependencies: ACC-001, CORE-002, FND-005. Non-goals: supplier bills/tax advice. Open questions: none.

CORE-005 — Pre-trading expenditure

  • Priority: P1; Status: COMPLETE
  • Objective: Distinguish pre-commencement transactions without changing actual dates.
  • Scope: comparison, flags/queries, review classification.
  • Acceptance criteria: unset/date boundaries work; no deductibility claim.
  • Relevant code: transaction/report queries.
  • Validation: boundary/report tests.
  • Dependencies: FND-005, CORE-004. Non-goals: tax engine. Open questions: none.

CORE-006 — Managed document archive and attachments

  • Priority: P1; Status: COMPLETE
  • Objective: Copy files to managed collision-safe storage with SQLite references.
  • Scope: categories, original filename, links, configured paths.
  • Acceptance criteria: copies survive source path changes; collisions safe; missing files detectable.
  • Relevant code: documents/, persistence/services.
  • Validation: temp filesystem/collision/metadata tests.
  • Dependencies: FND-002, FND-005. Non-goals: large SQLite blobs/OCR. Open questions: none.

CORE-007 — Notes, tags, and audit integration

  • Priority: P2; Status: COMPLETE
  • Objective: Add organisation metadata that cannot affect calculations.
  • Scope: notes/tags and shared audit hooks.
  • Acceptance criteria: tags are calculation-neutral and relevant changes auditable.
  • Relevant code: shared domain/persistence.
  • Validation: isolation/audit tests.
  • Dependencies: ACC-002, CORE-001, CORE-002. Non-goals: search platform. Open questions: none.

P1 Sales and purchasing

SALE-001 — Quotations, lines, numbering, lifecycle

  • Priority: P1; Status: COMPLETE
  • Objective: Structured Q-YYYY-NNN quotations with no number reuse.
  • Scope: draft/issued/accepted, lines, VAT, totals, client snapshot.
  • Acceptance criteria: annual counters restart; numbers never reuse; exact totals.
  • Relevant code: sales domain/services.
  • Validation: numbering/totals/snapshot/state tests.
  • Dependencies: CORE-001, FND-003, ACC-001. Non-goals: estimates. Open questions: none.

SALE-002 — Invoices, lines, terms, numbering, snapshots

  • Priority: P1; Status: COMPLETE
  • Objective: Structured INV-YYYY-NNN invoices with stable issue history.
  • Scope: lifecycle, terms hierarchy, due/overdue derivation, VAT/totals, snapshots.
  • Acceptance criteria: annual non-reused numbering; issued content cannot silently rewrite.
  • Relevant code: sales domain/services.
  • Validation: totals/terms/lifecycle/number/snapshot tests.
  • Dependencies: CORE-001, CORE-003, SALE-001, ACC-001. Non-goals: email. Open questions: none.

ACC-003 — Invoice issue accounting postings

  • Priority: P0; Status: COMPLETE
  • Objective: Post receivables, revenue, and VAT consequences when an invoice is issued.
  • Scope: durable revenue-account mapping, invoice issue journal linkage, net/VAT/gross postings, quotation conversion carry-over, credits, and issued-history stability.
  • Acceptance criteria: issue creates one balanced journal (AR debit; income and VAT credits as applicable); payments settle the resulting receivable; reports reflect invoiced revenue; mappings remain stable after issue.
  • Relevant code: invoice/quotation line models, sales services, migrations, reports.
  • Validation: multi-line revenue classification, VAT/no-VAT, conversion, payment, credit, snapshot, and migration tests.
  • Dependencies: ACC-001, SALE-001, SALE-002. Non-goals: automated tax advice.
  • Open questions: none; per-line mapping with an optional configured draft default was approved.

ACC-004 — Audited manual journal workflow

  • Priority: P0; Status: COMPLETE
  • Objective: Expose the explicitly invoked advanced manual-journal workflow.
  • Scope: separate service/CLI command, balanced Decimal lines, description and reason, period locking, audit source and metadata.
  • Acceptance criteria: balanced entries post; missing reason/unbalanced entries reject; ordinary workflows remain distinct.
  • Relevant code: journal/audit services and CLI.
  • Validation: service and migrated-database CLI tests.
  • Dependencies: ACC-001, ACC-002, CLI-003. Non-goals: casual ledger editing.
  • Open questions: none.

SALE-003 — Quotation-to-invoice conversion

  • Priority: P1; Status: COMPLETE
  • Objective: Convert accepted quotations while preserving independent invoice history.
  • Scope: conversion/linkage/carry-over.
  • Acceptance criteria: only accepted quotes convert; invoice is stable.
  • Relevant code: sales services.
  • Validation: conversion/duplicate tests.
  • Dependencies: SALE-001, SALE-002. Non-goals: automatic issue. Open questions: none.

SALE-004 — Invoice payments and receivables

  • Priority: P1; Status: COMPLETE
  • Objective: Support full/partial/multiple payment events and balances.
  • Scope: allocations, lifecycle, actual payment dates.
  • Acceptance criteria: exact balances; cash flow uses payment date.
  • Relevant code: payments/sales services.
  • Validation: payment consistency tests.
  • Dependencies: SALE-002, CORE-002, ACC-001. Non-goals: matching. Open questions: none.

SALE-005 — Credit notes and bad debts

  • Priority: P1; Status: COMPLETE
  • Objective: Reduce/write off receivables without editing issued invoices.
  • Scope: annual credit-note numbering/prefix, allocations, explicit write-off journal/reason.
  • Acceptance criteria: original remains; no automatic write-off; balances/audit correct.
  • Relevant code: sales/accounting services.
  • Validation: credit/write-off/balance/audit tests.
  • Dependencies: SALE-002, SALE-004, ACC-002. Non-goals: collections. Open questions: none.

SALE-006 — Supplier bills, payments, refunds, immediate purchases

  • Priority: P1; Status: COMPLETE
  • Objective: Support payables and convenient immediately-paid expenses.
  • Scope: outstanding/partial/full bills, linked refunds, immediate path.
  • Acceptance criteria: refunds do not rewrite original expense; journals balance.
  • Relevant code: purchasing/payables services.
  • Validation: bill/payment/refund tests.
  • Dependencies: CORE-002, CORE-004, ACC-001. Non-goals: purchase orders. Open questions: none.

SALE-007 — Billable time and invoice selection

  • Priority: P1; Status: COMPLETE
  • Objective: Record and select eligible uninvoiced billable time.
  • Scope: client/project/date/hours/description/rate/billable/invoiced.
  • Acceptance criteria: only eligible entries selected; captured rates stable.
  • Relevant code: time/billing services.
  • Validation: eligibility/state/rate tests.
  • Dependencies: CORE-001, CORE-003, SALE-002. Non-goals: monitoring. Open questions: none.

SALE-008 — Rechargeable expenses

  • Priority: P1; Status: COMPLETE
  • Objective: Discover linked uninvoiced rechargeable expenses during invoice creation.
  • Scope: client/project links, flags, invoiced state.
  • Acceptance criteria: eligible items discoverable and never double-invoiced.
  • Relevant code: expense/sales services.
  • Validation: selection/state tests.
  • Dependencies: CORE-004, SALE-002. Non-goals: automatic charging. Open questions: none.

SALE-009 — Recurring invoice definitions

  • Priority: P2; Status: COMPLETE
  • Objective: Identify due definitions and prepare drafts only.
  • Scope: recurrence, due detection, draft preparation, explicit approval.
  • Acceptance criteria: no automatic issuance/posting.
  • Relevant code: sales services.
  • Validation: due/draft/no-issue tests.
  • Dependencies: SALE-002. Non-goals: email. Open questions: none.

SALE-010 — Recurring expense definitions

  • Priority: P2; Status: COMPLETE
  • Objective: Identify expected expenses without creating transactions.
  • Scope: supplier/frequency/category/amount/reconciliation hints.
  • Acceptance criteria: advisory detection never posts.
  • Relevant code: purchasing/services.
  • Validation: detection/no-create tests.
  • Dependencies: CORE-002, CORE-004. Non-goals: auto-generation. Open questions: none.

P1/P0 Controls

CTRL-001 — Bank CSV import boundary

  • Priority: P1; Status: COMPLETE
  • Objective: Import bank rows through extensible parsers without posting silently.
  • Scope: adapters, provenance, duplicate detection.
  • Acceptance criteria: imported rows remain pending accounting action.
  • Relevant code: reconciliation/, import services.
  • Validation: parser/error/duplicate tests.
  • Dependencies: FND-004, CORE-002. Non-goals: online banking. Open questions: bank mappings.

CTRL-002 — Assisted matching and manual reconciliation

  • Priority: P1; Status: COMPLETE
  • Objective: Propose matches, require approval for ambiguity, separate reconciliation state.
  • Scope: candidates, approval, rejection, manual workflow.
  • Acceptance criteria: ambiguous matches never silently reconcile.
  • Relevant code: reconciliation services/persistence.
  • Validation: matching/approval/state tests.
  • Dependencies: CTRL-001, ACC-001, SALE-004, SALE-006. Non-goals: direct bank links. Open questions: none.

CTRL-003 — Multi-currency support

  • Priority: P1; Status: COMPLETE
  • Objective: Preserve original currency, applied rate, and EUR value.
  • Scope: supported transaction fields/reports.
  • Acceptance criteria: historical values never use current rates.
  • Relevant code: money/currency domain.
  • Validation: conversion/history tests.
  • Dependencies: FND-003, ACC-001. Non-goals: live rate provider. Open questions: none.

CTRL-004 — VAT-ready amounts and tax classification

  • Priority: P1; Status: COMPLETE
  • Objective: Store net/rate/VAT/gross/treatment and separate preparation classifications.
  • Scope: enablement, treatment, ALLOWABLE/NON_ALLOWABLE/PARTIALLY_ALLOWABLE/CAPITAL/ PRE_TRADING/REVIEW.
  • Acceptance criteria: disabled VAT works; uncertain treatment is REVIEW, never guessed.
  • Relevant code: tax/money domain.
  • Validation: VAT/classification tests.
  • Dependencies: FND-003, FND-005, ACC-001, CORE-005. Non-goals: filing/advice. Open questions: none.

CTRL-005 — Asset register

  • Priority: P1; Status: COMPLETE
  • Objective: Preserve asset and disposal data for later preparation.
  • Scope: purchase/supplier/cost/currency/EUR/use/document/disposal/notes/treatment.
  • Acceptance criteria: lifecycle/history complete; no automatic Irish capital allowances.
  • Relevant code: asset domain/persistence.
  • Validation: lifecycle/currency/document tests.
  • Dependencies: CORE-002, CORE-006, CTRL-003. Non-goals: allowance engine. Open questions: none.

CTRL-006 — Period close/reopen and safe backups

  • Priority: P0; Status: COMPLETE
  • Objective: Lock periods and provide SQLite-safe local timestamped backups.
  • Scope: close/reopen audit, backup service/command, close-before-backup.
  • Acceptance criteria: closed edits reject; reopen explicit/audited; backup collision-safe.
  • Relevant code: periods/backup services and CLI.
  • Validation: lock/reopen/backup/restore-read tests.
  • Dependencies: FND-002, ACC-002. Non-goals: cloud backup. Open questions: none.

CTRL-007 — Integrity checking

  • Priority: P0; Status: COMPLETE
  • Objective: Report SQLite/accounting/document invariants without mutation.
  • Scope: balances, totals, payments, transfers, attachments, orphans, closed periods.
  • Acceptance criteria: check reports seeded failures and never silently repairs.
  • Relevant code: integrity services/CLI.
  • Validation: valid/invalid fixture tests.
  • Dependencies: ACC-001, ACC-002, CORE-006, SALE-004, CTRL-006. Non-goals: repair. Open questions: none.

CLI and reporting

CLI-001 — Shared interactive/non-interactive CLI foundation

  • Priority: P1; Status: COMPLETE
  • Objective: Dispatch commands through services with clear non-interactive failures.
  • Scope: parsing, configuration paths, service wiring, mode handling.
  • Acceptance criteria: both modes call shared services; missing values never unexpectedly prompt.
  • Relevant code: cli/, package entry point.
  • Validation: parsing/mode/error tests.
  • Dependencies: FND-004, FND-005. Non-goals: all commands. Open questions: framework.

CLI-002 — Database initialization and administration commands

  • Priority: P0; Status: COMPLETE
  • Objective: Make a new location-independent installation safely operable.
  • Scope: migration-based initialization/upgrade, settings inspection/update, chart inspection/maintenance, backup, and integrity entry points using XDG defaults.
  • Acceptance criteria: a clean database can be initialized outside the checkout; commands use services/migrations; non-interactive omissions fail clearly; secrets are not written to project files.
  • Relevant code: cli/, runtime configuration, packaged migrations.
  • Validation: temporary XDG home command tests and installed-entry-point smoke tests.
  • Dependencies: CLI-001, FND-005, CTRL-006, CTRL-007. Non-goals: transaction entry.
  • Open questions: none.

CLI-003 — Core bookkeeping command surface

  • Priority: P0; Status: COMPLETE
  • Objective: Expose approved daily bookkeeping workflows through shared services.
  • Scope: clients, suppliers, projects, financial accounts, expenses, transfers, capital, drawings, personally paid and mixed-use expenses, attachments, tags.
  • Acceptance criteria: interactive and non-interactive paths call the same services; required missing non-interactive values fail; no destructive history commands.
  • Relevant code: cli/, core services.
  • Validation: command integration tests against temporary migrated databases.
  • Dependencies: CLI-002, CORE-001 through CORE-007. Non-goals: sales/payables commands.
  • Open questions: none.

CLI-004 — Sales and purchasing command surface

  • Priority: P0; Status: COMPLETE
  • Objective: Expose approved quotation, invoice, receipt, credit, bill, time, recharge, and recurring-definition workflows.
  • Scope: lifecycle commands and document generation without email delivery.
  • Acceptance criteria: issued history/numbers remain stable; approval boundaries are explicit; partial payments and outstanding balances are visible.
  • Relevant code: cli/, sales/payables/document services.
  • Validation: end-to-end CLI workflow tests on temporary databases.
  • Dependencies: CLI-003, SALE-001 through SALE-010, DOC-003. Non-goals: email.
  • Open questions: none.

CLI-005 — Controls, reporting, and export command surface

  • Priority: P1; Status: COMPLETE
  • Objective: Expose bank import/reconciliation, periods, assets, reports, and exports.
  • Scope: explicit match approval, close/reopen, reports by range, CSV/ODS/PDF outputs.
  • Acceptance criteria: controls preserve approval/non-mutation invariants; report values come from reporting services; non-interactive operation is reliable.
  • Relevant code: cli/, control/report/export services.
  • Validation: command integration and representative output tests.
  • Dependencies: CLI-004, CTRL-001 through CTRL-007, RPT-001 through RPT-004, DOC-004.
  • Non-goals: online banking, tax filing, dashboard UI. Open questions: none.

CLI-006 — Complete typed business-setting administration

  • Priority: P1; Status: COMPLETE
  • Objective: Make every approved non-secret business setting safely configurable.
  • Scope: dates, Decimal rates, integer terms, booleans, prefixes/paths/contact/payment fields and account defaults with validation.
  • Acceptance criteria: typed values round-trip; invalid values fail; secrets remain outside SQLite settings and repository files.
  • Relevant code: settings service and CLI.
  • Validation: migrated-database command tests.
  • Dependencies: CLI-002, FND-005, DOC-001. Non-goals: secret management UI.
  • Open questions: none.

SALE-011 — Invoice void and reversal workflow

  • Priority: P0; Status: COMPLETE
  • Objective: Void an eligible issued invoice without deleting or rewriting history.
  • Scope: explicit reason/date, reversal journal, audit, lifecycle restrictions and immutable issued lines.
  • Acceptance criteria: original issue journal remains; balanced reversal is linked; paid/credited/written-off invoices cannot be casually voided; status becomes VOID.
  • Relevant code: invoice models/services/migration/CLI.
  • Validation: reversal, audit, lifecycle, period-lock and CLI tests.
  • Dependencies: ACC-003, ACC-002, CTRL-006. Non-goals: deleting invoices.
  • Open questions: none.

CTRL-008 — Complete integrity invariant coverage

  • Priority: P0; Status: COMPLETE
  • Objective: Cover all explicitly required read-only integrity checks.
  • Scope: quotation totals, invoice issue linkage, payment applications, transfers, attachments, orphan/FK state, accounting periods and reversal consistency.
  • Acceptance criteria: seeded corrupt fixtures are reported with stable codes and no accounting data is mutated.
  • Relevant code: integrity service/CLI tests.
  • Validation: one valid and targeted invalid fixture per invariant family.
  • Dependencies: CTRL-007, ACC-003, SALE-011. Non-goals: automatic repair.
  • Open questions: none.

RPT-001 — Ledgers and trial balance

  • Priority: P1; Status: COMPLETE
  • Objective: Report transaction/general ledgers and trial balance for arbitrary ranges.
  • Scope: account/date filters, calendar-year support, authoritative values.
  • Acceptance criteria: trial balance debit equals credit.
  • Relevant code: reporting queries/services.
  • Validation: fixture/date tests.
  • Dependencies: ACC-001, CLI-001. Non-goals: PDF styling. Open questions: none.

RPT-002 — P&L, Cash Flow, receivables, payables

  • Priority: P1; Status: COMPLETE
  • Objective: Provide operational reports with cash/accrual distinctions.
  • Scope: P&L, payment-date Cash Flow, outstanding invoices/bills.
  • Acceptance criteria: cash uses actual payment dates; incurred dates remain available.
  • Relevant code: reporting services.
  • Validation: cash/accrual/outstanding fixtures.
  • Dependencies: SALE-004, SALE-006, RPT-001. Non-goals: filing. Open questions: none.

RPT-003 — Asset, profitability, tax-preparation/review reports

  • Priority: P2; Status: COMPLETE
  • Objective: Produce structured preparation information and review queues.
  • Scope: assets, client/project profitability, classifications, pre-trading, REVIEW.
  • Acceptance criteria: uncertain treatment is not presented as advice.
  • Relevant code: reporting services.
  • Validation: classification/profitability fixtures.
  • Dependencies: CORE-003, CORE-005, CTRL-004, CTRL-005. Non-goals: tax engine. Open questions: none.

RPT-004 — CSV and ODS exports

  • Priority: P2; Status: COMPLETE
  • Objective: Export reports while SQLite remains authoritative.
  • Scope: writers, field mappings, output paths.
  • Acceptance criteria: exports reproduce report values and are not persistence inputs.
  • Relevant code: reporting/exports/.
  • Validation: fixture/content tests.
  • Dependencies: RPT-001, RPT-002. Non-goals: ODS migration. Open questions: none.

DOC-001 — Document contact and payment configuration

  • Priority: P1; Status: COMPLETE
  • Objective: Make all business identity, correspondence, and payment details used by generated documents configuration/data-driven.
  • Scope: display/trading name, descriptor, website, general email, accounts email (default accounts@roborto.net), phone, postal address/location, applicable tax/VAT identifiers, and bank/payment instructions.
  • Acceptance criteria: templates require structured configuration and contain no fictional reference-image data; invoices use the accounts address while quotations use the general address unless explicitly configured otherwise.
  • Relevant code: business settings model/migration/services and tests.
  • Validation: defaults, override, missing-data, and no-hard-coded-sample tests.
  • Dependencies: FND-005. Non-goals: secrets, email sending, document rendering. Open questions: optional-detail omission policy.

DOC-002 — Shared A4 print/PDF theme and rendering foundation

  • Priority: P2; Status: COMPLETE
  • Objective: Implement the approved reusable light-mode Roborto document identity.
  • Scope: rendering-library selection, deterministic A4 output, margins, typography, logo-light.svg, colour tokens, headings, tables, totals, footer/page numbering, wrapping and page breaks.
  • Acceptance criteria: one UI-independent theme serves every renderer; output is print-safe, greyscale-legible, deterministic, and contains no accounting logic.
  • Relevant code: reporting/documents/, packaged branding assets, docs/design/.
  • Validation: unit/layout tests plus generated representative multi-page PDF inspection.
  • Dependencies: DOC-001. Non-goals: per-document themes, dashboards, gradients, shadows, proprietary fonts, Flask/React. Open questions: rendering library.

DOC-003 — Branded invoice and quotation documents

  • Priority: P2; Status: COMPLETE
  • Objective: Render issued invoices and quotations using the canonical document family.
  • Scope: numbers/dates/terms, snapshots, project/reference, lines, totals/VAT, notes, configured correspondence/payment details, and stored output metadata.
  • Acceptance criteria: invoice-reference hierarchy is followed; quotation is a family adaptation; values come only from persisted snapshots/core calculations; no email.
  • Relevant code: sales document renderers and managed-document metadata.
  • Validation: content/snapshot, long-line and multi-page tests; generated PDF visual inspection.
  • Dependencies: SALE-001, SALE-002, DOC-002. Non-goals: email, fictional data, template calculations. Open questions: none.

DOC-004 — Branded accounting-report documents

  • Priority: P2; Status: COMPLETE
  • Objective: Apply the theme to Cash Flow, P&L, ledgers, trial balance, and approved professional reports.
  • Scope: report headings/period metadata, restrained tables, repeated headers, totals, page numbers, configured header/footer.
  • Acceptance criteria: report services supply values; Cash Flow/P&L use the approved family without dashboard UI; long reports paginate safely.
  • Relevant code: reporting document renderers.
  • Validation: value-regression tests and representative single/multi-page PDF inspection.
  • Dependencies: DOC-002, RPT-001, RPT-002. Non-goals: charts/dashboards or calculations in templates. Open questions: none.

DOC-005 — Visual-regression and sample-generation workflow

  • Priority: P2; Status: COMPLETE
  • Objective: Make representative document rendering repeatable and reviewable.
  • Scope: deterministic fixtures/commands, PDF generation, comparison artifacts, clipping/overflow/footer/table checks.
  • Acceptance criteria: documented commands generate invoice, quotation, Cash Flow, and P&L samples; output is inspected before parity is claimed.
  • Relevant code: document test fixtures/scripts.
  • Validation: commands succeed and representative pages are visually reviewed.
  • Dependencies: DOC-003, DOC-004. Non-goals: production sample data or email. Open questions: visual-diff tolerance.

DOC-FUTURE-001 — Apply theme to letters after workflow approval

  • Priority: P2; Status: COMPLETE
  • Objective: Reuse the shared theme for a future approved business-letter renderer.
  • Scope: persisted draft with recipient snapshot, date, optional reference, subject and body; explicit finalization to branded PDF and managed archive metadata.
  • Acceptance criteria: finalized content is stable, uses configured general contact details and shared theme, works outside the checkout, and never sends email.
  • Relevant code: letter persistence/service/renderer/CLI.
  • Validation: lifecycle, archive, deterministic multi-page PDF and visual inspection.
  • Dependencies: DOC-001, DOC-002, CORE-006. Non-goals: email, mail merge, campaigns, delivery tracking or correspondence automation. Open questions: none.

DOC-006 — Operator setup and CLI guide

  • Priority: P1; Status: COMPLETE
  • Objective: Document installation, location-independent runtime storage, initialization, safe command usage, line formats, reports/exports, backups, and recovery boundaries.
  • Scope: concise root README and verified examples using implemented commands only.
  • Acceptance criteria: a new operator can install, initialize, locate data, configure the business, perform representative workflows, run checks/backups, and discover help.
  • Relevant code: README.md, CLI parser, runtime configuration.
  • Validation: commands/help and documented paths checked against source/tests.
  • Dependencies: CLI-006, DOC-FUTURE-001. Non-goals: deployment automation or invented workflows. Open questions: none.

PKG-001 — Self-contained wheel deployment

  • Priority: P0; Status: COMPLETE
  • Objective: Make a normal wheel installation independent of the source checkout.
  • Scope: package Alembic migrations and brand SVG resources, resolve them from the installed package, and retain the repository Alembic developer workflow.
  • Acceptance criteria: a built wheel contains every migration and branding asset; code installed from that wheel can initialize a new database and generate branded document samples while running outside the repository.
  • Relevant code: pyproject.toml, packaged migrations/assets, runtime configuration, CLI initialization, deployment tests.
  • Validation: full tests, clean wheel inspection, external-location database initialization and PDF sample generation.
  • Dependencies: FND-002, DOC-005. Non-goals: system-wide installation automation, cloud deployment, or changing the XDG runtime-storage policy. Open questions: none.

Backlog review

The approved specification is represented by tasks, acceptance criteria, decisions, or permanent constraints above. Excluded features are explicit non-goals, not active work.