99 lines
3.8 KiB
Markdown
99 lines
3.8 KiB
Markdown
# 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 approved backlog are implemented. The initial
|
||
Git baseline exists; a follow-up packaging change makes wheels self-contained. `.venv`,
|
||
caches, generated databases, bytecode, build output, 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.
|
||
PKG-001 moved migrations and branding resources into the installable package and
|
||
validated initialization/document generation from a wheel outside the checkout.
|
||
|
||
## 7. Current task
|
||
|
||
No active approved task. The final audit tasks, business-letter workflow, operator
|
||
guide, and self-contained wheel deployment task are complete.
|
||
|
||
## 8. Important code locations
|
||
|
||
- Models/migrations: `src/roborto_accounting/persistence/`,
|
||
`src/roborto_accounting/migrations/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 <temporary-config> upgrade head` — fresh SQLite through 0028
|
||
- `.venv/bin/accounts --help`
|
||
- `.venv/bin/accounts document-samples --output <directory>`
|
||
- `.venv/bin/pip wheel . --no-deps --no-build-isolation --wheel-dir <directory>`
|
||
- wheel installed to an isolated target outside the checkout: initialization through
|
||
0028 and five sample PDFs succeeded
|
||
- `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. The built wheel contains migrations and both brand SVGs and works outside
|
||
the checkout. 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.
|