{% extends "base.html" %} {% block title %}Alberich: the Warlock{% endblock %} {% block body %}
{{ art|safe }}

The Warlock, keeper of the reckoning

{{ 'Thinking' if running else 'Speak' }}

{% if not ok %}Grant me leave to read your ledgers, and I shall advise and amend.{% elif running %}One moment. I am weighing your words against the ledgers.{% else %}Tell me what is unusual, what is changing, or what to tune.{% endif %}
{% if not llm.key_present %}
No Anthropic key is configured, so the warlock cannot be reached.
{% endif %} {% if not ok %}

Before we begin

Terms

With each message, the warlock reads your recent charges (the last 90 days: date, amount, description, merchant, category, your share, the account's name), your receipts' line items, your category averages, income, cuts, pouches and credit uses, and your notes. It never sees account numbers, statement files or receipt images, and long digit runs in descriptions are masked.

This is sent to Anthropic, who run the model, each time you speak. He may propose changing almost anything: categories, shares, transfers, spending cuts, pouches, credit uses. Nothing changes until you tick it, and every proposal is described in plain words first.

{% else %}
{% for m in msgs %} {% if m.role == 'me' %}
{{ m.text }}
{% elif m.status == 'running' %}
The Warlock

Weighing your words against the ledgers. A long ledger can take a minute.

{% elif m.status == 'failed' %}
The warlock could not answer. {{ m.error }}
{% else %}
The Warlock

{{ m.text }}

{% if m.actions %}
Proposed. Tick what to apply.
{% for a in m.actions %} {% endfor %} {% if m.applied|length < m.actions|length %}{% endif %}
{% endif %}
{% endif %} {% endfor %}

Tell the warlock

{% if msgs %}{% endif %}

Used this month: {{ '%.1f' % llm.spent_cents }}¢ of {{ llm.cap_cents }}¢.

{% if adjustments or notes %}

What the warlock remembers

{% for a in adjustments %}
{{ month_label(a.month) }}: {{ money(a.amount_cents) }} {{ 'extra income' if a.kind == 'extra_income' else 'one-off expense' }}{% if a.label %} ({{ a.label }}){% endif %}, {{ treat_words[a.treat] }}
{% endfor %} {% for n in notes %}
{{ n.text }}
{% endfor %}
{% endif %}
What the warlock sees

Exactly this goes to the model with each message, with your own words. It is long: that is the recent charges.

{{ ctx_json }}
{% endif %} {% endblock %}