# Retire the runtime Finance Budget app (align with the no-execution-apps model)

**Owner of the fix:** Dave J (runtime / gateway)
**Raised by:** Dave W — 2026-06-26
**Priority:** High — product is currently inconsistent with its own positioning

## The problem

We decided BrainDrive does **not** build in-product execution apps (D257/D265 — heavier execution becomes external tool calling). The **starter-pack docs were cleaned** to match. But the **runtime was not** — `gateway/server.ts` still injects a full Finance **Budget app** into the chat context, and `projects.ts` still routes uploaded statements into a Budget app folder structure.

Result: a brand-new Finance interview produces a complete budgeting-app workflow — a `documents/finance/budget/` project with `budget.md`, a `statements/` folder of per-statement files, `reports/`, and "upload your statements each month" instructions. That's exactly the child-app/execution behavior the product says it no longer does.

This is **not** a starter-pack prompt issue (the pack is clean) and **not** model hallucination — the runtime explicitly tells the agent the Budget app exists and how to drive it. The specific numbers come from real uploaded statement files.

## Evidence (current code)

- `gateway/server.ts` ~L3410–3461 — `financeBudgetGuidance`: ~35 lines injected into every Finance chat telling the agent to read `documents/finance/budget/AGENT.md` / `budget.md` / `budget-rules.md`, use `statements/` as source evidence and `reports/` as output, maintain a received/missing statement checklist, run monthly comparisons with merchant audits, etc.
- `gateway/server.ts` ~L3461 — literal: *"Finance uses **Draft 3 app folders**…"*
- `gateway/server.ts` ~L2472 — uploads with `metadata.statementLike` for the Finance project are routed to `budget/statements`.
- `gateway/projects.ts` ~L232 — `upsertFinanceStatementsReadmeEntry` maintains the Budget app's statements README/index.
- Live/dev memory already carries the structure: `documents/finance/budget/budget.md` + `documents/finance/budget/statements/*`.

## Decision

**Retire it.** The no-execution-apps model (D257/D265) is the locked direction; the runtime Budget app is legacy that didn't get removed with the docs. (If anyone thinks the Budget app should *stay*, that's a separate positioning conversation — but it can't coexist with "no in-product execution apps" in the same release.)

## Cleanup checklist

- [ ] Remove or feature-flag (default-off) the `financeBudgetGuidance` block and the "Draft 3 app folders" line in `gateway/server.ts`.
- [ ] Stop auto-routing `statementLike` uploads to `documents/finance/budget/statements` (`server.ts` ~L2472, `projects.ts` ~L232).
- [ ] Decide where statement/source evidence belongs now — likely generic Finance attachments / source-evidence, **not** a Budget app folder. (Product decision.)
- [ ] Migrate or archive existing `documents/finance/budget/` data in dev/test memory so it stops reappearing in fresh runs.
- [ ] Update tests that still assert Budget app behavior.
- [ ] Add a regression check that active **runtime** prompts do not mention `documents/finance/budget`, "Draft 3 app folders," or Budget workflows unless an explicit legacy flag is set.

## Why our harness didn't catch it

The starter-pack content harness (`openrouter-eval.py`) loads the **pack files** but never runs the real gateway, so it never sees the `server.ts` injection. The live product = pack **+** runtime context. The regression check above belongs in the **app/E2E harness** (braindrive-test-harness), which exercises the actual gateway-assembled prompt — not the pack-only judge.
