Generate a monthly categorized transaction JSON by running /fetch, then orchestrating /recognize, /categorize, and /forecast for partial months. Use when the user asks to generate, create, or analyze a monthly budget, expenses, or income.
Orchestrates the full monthly budget pipeline: fetch/read -> recognize income -> categorize expenses -> forecast (if partial) -> generate output.
The {household} is a short lowercase name (for example household-1) that scopes all data. All paths below use resources/{household}/ as root.
| File | Purpose |
|---|---|
resources/{household}/expenses_memory.md | Merchant mappings, manual overrides, category hierarchy, bucket definitions, RDB thresholds |
resources/{household}/income_memory.md | Salary definitions, amount ranges, date windows, and known income sources |
Run /fetch for the target month. It downloads BANK + CREDIT transactions and saves them as three separate raw files:
resources/{household}/{YYYY-MM}/expenses/cc_open_bill.json — CC pending (open bill)resources/{household}/{YYYY-MM}/expenses/cc_closed_bill.json — CC posted (closed bill)resources/{household}/{YYYY-MM}/expenses/savings.json — savings/checking accountCombine all three files into a single transaction list for the pipeline steps below.
Use income_memory.md to identify:
For partial months, provision expected salary when the rules indicate it.
Apply expenses_memory.md to all non-income, non-skipped transactions:
After classification, update resources/{household}/expenses_memory.md with any new merchant mappings.
If partial: true, run /forecast to add provisional income and recurring expenses. Skip this step for complete months.
Write to resources/{household}/{YYYY-MM}/expenses/result/:
budget_{month}_{year}.jsonPresent uncategorized transactions for user review. After review, update the output and expenses_memory.md.
After the JSON is generated, run /advise to produce the formatted budget message. /advise already calls /notify internally — do NOT call /notify again from compile.
YYYY-MM-DD.intentional_rdb_investments, but they are not expense totals.partial: true and include data_through.summary, budget_buckets, root buckets, net, or liberdade_financeira_pct.Return a top-level JSON array. Do not wrap it in an object with transactions, month, notes, or any other top-level keys.
Transaction requirements:
idtype as income, expense, skipped, or unclassifieddate — mandatory for real transactions, optional for provisioned ones (provisional: true)descriptionamountholderbankaccount_numbersourcebucket, category, and subcategorybucket, category, and subcategory as nullprovisional: true directly on the rowtotalInstallments and installmentNumber in the compiled output. In the raw Pluggy payload these live inside metadata.totalInstallments and metadata.installmentNumber. Extract them to top-level fields in the budget row. Only include when the transaction is an installment (i.e. totalInstallments >= 2).Minimal example:
[
{
"id": "pluggy:123",
"type": "expense",
"date": "2026-04-05",
"description": "Conta Vivo",
"amount": 296,
"holder": "holder1",
"bank": "Nubank",
"account_number": "6072",
"source": "Credit Card",
"bucket": "custos_fixos",
"category": "Housing",
"subcategory": "Internet/Phone",
"provisional": false
},
{
"id": "manual:unclassified:1",
"type": "unclassified",
"date": "2026-04-05",
"description": "Compra desconhecida",
"amount": 42.9,
"holder": "holder1",
"bank": "Nubank",
"account_number": "6072",
"source": "Credit Card",
"bucket": null,
"category": null,
"subcategory": null,
"provisional": false
}
]