SplitRoof AI assistant

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

Role
AI integration, documentation, schedule
Year
2026
Team
group project, COMP 231 Software Development Project, 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.

Answers questions about a household's shared expenses by calling typed tools; never does the arithmetic itself."who owes what this month"the modelClaude Haiku 4.5typed tool functionsgetBalancegetCategorySpendgetBudgetStatuscallexact figuresthe household'sreal datano write patha sentenceAnswers questions about a household's shared expenses by calling typed tools; never does the arithmetic itself."who owes what this month"the modelClaude Haiku 4.5callexact figurestyped tool functionsgetBalancegetCategorySpendgetBudgetStatusthe household'sreal datano write patha sentence

Decisions

Outcome

In progress.

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
VS Code with src/assistant.js open on the system prompt, which tells the model that every number must come from a tool result

Credits

Group project. I own the AI integration, keep the project documentation, and keep us on schedule.