gestor: how it works now
01One idea
gestor stores only facts. Each time, it recalculates all the returns from them. You file the returns.
02What it is made of
Click a block to see what it does. The buttons below show which path each action takes.
03The path of an invoice
04Q3 2026: where 303 = comes from
On the left: the facts from the database. On the right: the casillas that the engine calculated from them. Hover over a casilla: the facts that it comes from are highlighted.
Q3 invoices, type eu_b2b, IVA 0 %
Q3 expenses with IVA
303, 3T: casillas
349, 3T
05What happens if you issue another invoice
An invoice to the same client in Cyprus, year 2026. The engine applies the rules of the régimen Beckham. Move the slider.
06The regime decides what you file
A single setting, beckham_first_year, changes the whole set of returns. The engine (tax.duties()) generated both tables below from the 2026 example data.
07How the agent helps with the Sede
Claude Code or Codex works through mcp.py. It reads the calculation and, after your “yes”, writes to the database. It does not file or pay anything.
declarations: the list of returns of the year with deadlines and status.declaration: casillas, notes with § and a file in ~/.gestor/sede/main/.“Presentar declaración” or “Firmar y enviar”. This rule is written in
INSTRUCTIONS. You sign.08What gestor does not do
- It does not file returns and does not pay.
- It does not read the bank. You or the agent enter the statement.
- It does not calculate the surcharges for late returns.
- Casilla 72 of modelo 303 appears only in a note.
- It only knows national public holidays. If a deadline falls on a weekend or a national holiday (Good Friday too), gestor moves it to the next working day. It does not take regional or local holidays into account, although they also extend the deadline.
- The files for “Importar” have not yet been tested on the real Sede. In the 151 file, the fields for sex, date of birth and IAE matched the reference file of another program byte for byte.