Inspiration

Your creditor calculated exactly how much you can pay. That is why it offers you the terms it offers. You have never seen that number.

The structural claim: revolving interest is the creditor's margin. No bank will offer you, unprompted, the restructuring that suits you best — doing so would cannibalise its own revenue. That is an economic barrier, not an engineering one, and time and money cannot route around it.

Cartola Clara computes your capacity to pay from your own bank statement and issues a restructuring counter-offer that a collections desk can actually evaluate. CLP 2,990, about USD 3.15.

What it does

Upload your bank statement or card statement — photo or PDF — or simply type what you earn and what you owe. Gemini reads it and returns:

  • The real leaks, each with a monthly amount
  • The most expensive debt, prioritised, with the reason
  • A 14-day plan of concrete actions ordered by return
  • A restructuring counter-offer, with your capacity to pay computed from your own movements

The output is not written for the person who owes. It is written for the desk that collects. That is the design decision the project rests on: a debtor arriving with a documented capacity-to-pay figure is negotiating from the same evidence base the creditor uses.

How we built it

Next.js 14 on Vercel. Gemini API for every LLM call. GitHub's API as an append-only operations log. Ten separable pipelines: multimodal statement reader, leak diagnosis, debt prioritisation, 14-day planner, artifact generator, QA rubric agent, model fallback chain, completeness guard, time-budget governor, server-side entitlement gate, and the evidence log.

The QA agent is a separate Gemini call with a rubric written for money specifically: the artifact must be actionable (every step says what to do, never "spend less"), grounded (it may not assert amounts the user did not provide), safe (it may not recommend specific financial products or give investment advice), and clear.

Challenges we ran into

An invented figure is worse than no answer. This artifact is carried into a bank. A fabricated amount does not merely mislead — it destroys the negotiating position the document was written to create. So the safety criterion is scored on every artifact, and a run that cannot compute capacity from the statement is refused rather than filled in.

Measured across 12 production runs and 40 reviewed criteria, every delivered artifact was rated riesgo bajo. Two runs failed outright and were never delivered — the completeness guard and the error path stopped them rather than shipping a partial restructuring offer.

The paid content had to be genuinely withheld. It began as a CSS blur over data the browser had already received — anyone who opened the network tab had the counter-offer for free. Gating moved server-side: a visitor receives 8 of 14 plan steps and one of two artifacts, the second stripped of its recommendation. What was not paid for never leaves the server.

Model output truncates. The artifacts are what the price buys, so they are serialised before the long plan. What truncation costs is the tail of the plan, never the document you came for.

The model fallback chain ended in a model our API key could not call. A real statement upload returned a 403 in English on the user's screen. The chain now ends in a verified model, treats 403 as a reason to advance rather than abort, and every error family maps to an actionable Spanish message.

Accomplishments that we're proud of

The system refuses, and the refusals are recorded in a public branch anyone can read: github.com/phazon2/cartola-clara/tree/logs/logs

12 verdict runs across 2 days, 40 QA criteria reviewed, every delivered artifact rated low risk, and 2 runs stopped before delivery rather than shipped incomplete. Every run records the model used, artifact completeness, QA verdicts, the delivery type and end-to-end latency.

A judge can verify the whole pipeline without any access to our accounts:

curl -s "https://cartola-clara.vercel.app/api/health?full=1"

What we learned

In financial guidance the value is in the refusal, not the generation. Anyone can produce a plausible budget. Knowing when you cannot compute a number — and saying so instead of inventing it — is the entire product.

Also: a tolerant JSON parser is a silent-failure machine unless it reports what it repaired, and any interface that renders less than it receives will hide backend defects indefinitely.

What's next for Cartola Clara

Users. Revenue is zero and there are no customers. The product was deployed on 12 August, five days before the deadline, and no outreach was carried out. That is the honest position, and the next step is not a feature.

Prove the outcome. We can measure that counter-offers are produced and that unsafe ones are blocked. We cannot yet measure whether a creditor accepted one. That requires users who actually negotiate, and there are none.

Automated delivery, and a real domain — fulfilment is manual today, which works for the first customers and breaks at thirty.

Built With

Share this project:

Updates