# Handoff ## 1. Project overview roborto accounting is a local, single-user Python/SQLite double-entry application for a pre-trading sole-trader software business. SQLite is authoritative. ## 2. Repository state The accounting/service layers and full backlog are implemented and captured in the initial Git baseline. `.venv`, caches, generated databases, bytecode, and package metadata are ignored. ## 3. Current application state Foundation, accounting/core workflows, sales/payables, controls, operational CLI, reports/exports, managed documents, and branded PDFs are implemented. Approved daily workflows have command coverage, including the approved narrow business-letter flow. ## 4. Architecture/data flow SQLite → persistence → domain/services → CLI and reports/documents. Filesystem documents use SQLite attachment metadata. PDF templates present service/core values and do not own accounting calculations. ## 5. Important accepted decisions See `docs/DECISIONS.md`. Highlights: Decimal integer micro-units, balanced posted journals, non-destructive history, `CN-YYYY-NNN`, explicit reconciliation/recurring approval, XDG runtime locations, and ReportLab/svglib shared A4 rendering. ## 6. Recent work Completed the full backlog, including migrations 0014–0028, all controls and reports, CLI/runtime paths, PDF renderers, managed generated-document metadata, and deterministic visual samples. Corrected migration 0017 to use SQLite batch mode. ## 7. Current task No active approved task. The final audit tasks and `DOC-FUTURE-001` business-letter draft/finalize/archive workflow are complete. `DOC-006` added the root operator guide. ## 8. Important code locations - Models/migrations: `src/roborto_accounting/persistence/`, `alembic/versions/` - Services: `src/roborto_accounting/services/` - Reports/documents: `src/roborto_accounting/reporting/` - CLI/runtime paths: `src/roborto_accounting/cli/`, `src/roborto_accounting/config.py` - Tests/backlog/design: `tests/`, `docs/TASKS.md`, `docs/design/` - Operator guide: `README.md` ## 9. Verified commands - `.venv/bin/pytest -q` — 60 passed - `.venv/bin/alembic -c upgrade head` — fresh SQLite through 0028 - `.venv/bin/accounts --help` - `.venv/bin/accounts document-samples --output ` - `git diff --check` ## 10. Environment variables by NAME ONLY `HOME`, `XDG_CONFIG_HOME`, `XDG_DATA_HOME`, `XDG_STATE_HOME`. ## 11. Testing/quality status 60 isolated tests pass. Fresh migration through 0028 has no SQLite foreign-key violations. Representative A4 invoice, quotation, Cash Flow, and P&L PDFs were visually inspected; multi-page headers, wrapping, totals, footers, and page numbering were checked. ## 12. Known risks/issues Reference-image content is fictional and sample PDFs use visibly labelled non-production data. The command interface is broad and tested, but usability feedback from real bookkeeping use may justify separately approved command refinements. ## 13. Open questions None currently. ## 14. Recommended next task No next approved task. ## 15. Instructions for the next conversation Read `AGENTS.md` and all maintained context, inspect Git status/current source, and confirm a newly approved task before changing behaviour. Preserve the XDG storage policy and accounting safety invariants; run isolated tests and fresh migrations for persistence changes.