SplitRoof AI assistant

An assistant inside a shared-household expense app that answers questions from the household's own data and never does the math itself.

Role
AI integration, documentation, schedule
Year
2026
Team
group project, COMP 231 Software Development Project 1, Fall 2026
Stack
React, Node.js, Express, Firebase, Anthropic API, Jest
Links

The problem

People who share a home keep asking the same questions: who paid for what, who owes whom, what did we spend on groceries this month. The app already has the answers in its data. Typing them into a chat should just work, without the model making up numbers.

What I built

A read-only assistant. The model, Claude Haiku 4.5 through the Anthropic API, gets a small set of typed tool functions (getBalance, getCategorySpend and getBudgetStatus) and can only call those. The functions run the queries and return exact figures. The model turns the result into a sentence. It cannot write to the database and it never adds anything up on its own.

How the assistant answersA question like 'who owes what this month?' goes to the model, Claude Haiku 4.5, which can only call three typed tool functions. The functions read the household's own data (in the spike, a sample household) and return exact figures, and the model turns them into a sentence. There is no write path, so the worst a bad answer can do is word something badly."who owes what this month"the modelClaude Haiku 4.5typed tool functionsgetBalancegetCategorySpendgetBudgetStatuscallexact figuresthe household'sown datano write patha sentenceHow the assistant answersA question like 'who owes what this month?' goes to the model, Claude Haiku 4.5, which can only call three typed tool functions. The functions read the household's own data (in the spike, a sample household) and return exact figures, and the model turns them into a sentence. There is no write path, so the worst a bad answer can do is word something badly."who owes what this month"the modelClaude Haiku 4.5callexact figurestyped tool functionsgetBalancegetCategorySpendgetBudgetStatusthe household'sown datano write patha sentence

Decisions

What went wrong or what I would change

Nothing has gone wrong yet, because what exists is the spike I built before the team started. I will write this section after the team's first iteration ships.

Outcome

In progress. Demo in December 2026.

Screenshots

A terminal in VS Code after npm test in splitroof-assistant-spike, with tools.test.js and assistant.test.js passing, 17 tests in total
The spike's test run: 12 tests on the three tools before the model was wired in, then 5 against the live model.
VS Code with src/assistant.js open on the system prompt, which tells the model that every number must come from a tool result
The system prompt: every number must come from a tool result, so the model words the answer but never does the math.

Credits

Group project, team of 8. I own the AI assistant end to end, and I also keep the project documentation and the schedule. The spike is all mine: I built it before the team started, because I like being ahead.