← gestor home

gestor: how it works now

01One idea

gestor stores only facts. Each time, it recalculates all the returns from them. You file the returns.

INPUTFactsInvoices, expenses, profile and filed returns. You enter them in forms.
INSIDECalculationThe engine calculates the casillas each time a page opens. It does not store amounts that it has already calculated.
OUTPUTYou filegestor gives you the casillas, the rule with § and the file for the Sede. You sign on the Sede.

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.

    303 for the quarter
    IVA 0 %: the result does not change. Only casilla 59 grows.
    349 for the quarter
    It is an information return: there is nothing to pay.
    151 for 2026, to pay

    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.

    1. AGENTCalls declarations: the list of returns of the year with deadlines and status.
    2. MCPCalls declaration: casillas, notes with § and a file in ~/.gestor/sede/main/.
    3. CHROMEThe agent opens the Sede form in your browser, where you have already signed in.
    4. CHECKIt uploads the file or types the casillas. It clicks “Validar declaración”. It compares the screen with gestor.
    5. FORBIDDENdoes not click

    “Presentar declaración” or “Firmar y enviar”. This rule is written in INSTRUCTIONS. You sign.

    08What gestor does not do