| name | quarterly-close |
| description | Run the QuarterlyAssistant quarter-close pipeline and review the results. Use whenever the user wants to "close the quarter", "run the pipeline", "do the Modelo 130", "calculate the trimestre", asks "what do I owe this quarter", wants the libros/books generated, or asks to process the bank statements and receipts they've dropped in — also for re-runs after answering questions or adding late receipts. Requires the QuarterlyAssistant folder to be connected. |
Quarter close — QuarterlyAssistant
Run the deterministic pipeline (AGENTS.md §4, Stages 1–7) and walk the user through what came out. The pipeline is idempotent — re-running is always safe and is the normal way to incorporate answers and late documents.
Orientation
Repo = connected folder with AGENTS.md and tools/pipeline.py. Tenant = folder under tenants/ (ask if several). Deps once per session: pip install --break-system-packages pyyaml openpyxl weasyprint jinja2 (plus pdftotext from poppler, usually present).
Workflow
-
Determine the quarter (current one unless stated). If not scaffolded:
python3 tools/pipeline.py init-quarter <tenant> <YYYY-Qn>
-
Check inputs before running. Anything in accounts-incoming/ and receipts-incoming/? If the user expects statements/receipts to be processed but the folders are empty, say so — an empty run produces empty books, which looks like a bug to the user. Bank accounts in config.yaml need format: set (generic_csv + column mapping, n26_csv, sparkasse_csv); if a statement file fails to parse, inspect its header and either configure generic_csv columns or flag that a new parser is needed.