The Build · how it's made
How BRIK is built.
BRIK is the OpenAI reasoning layer on top of STAKD's existing deterministic Keep Engine. STAKD does the math; the agents reason over it; BRIK turns it into something you'd actually act on. The rule that makes it trustworthy: the model never invents a number — every figure it speaks cites a value the engine computed.
Synthetic user content (persona: Maya), used solely to demonstrate the reasoning layer in isolation from production customer information. Account linking, automated transfers & subscription cancellation shown in the app demo are illustrative — not live in STAKD today.
01 · Architecture
The pipeline
Deterministic where money is involved; generative where language and judgment are. Six stages, one direction.
1 · ingest
Staks & Cuts
manual · logged in STAKD
→
2 · math
Keep Engine
deterministic
→
3 · structure
Money Context
typed JSON pack
→
4 · reason
The crew
1 live GPT Analyst · 3 deterministic roles · BRIK coach
→
5 · communicate
BRIK synthesis
→
Where OpenAI sits
Transactions ↓
buildInsightContext() ↓
buildBrikContext() ↓
Allowlisted Financial Context ↓
GPT-5.6 Sol Reasoning ↓
BRIK ↓
Reviewed Actions
The guarantee
OpenAI never calculates financial figures.
OpenAI receives only structured, allowlisted context.
STAKD remains the source of truth.
02 · The crew
Five-member crew: four specialists and one coach
Each crew member has one defined responsibility and one structured output contract. The Analyst is powered live by GPT-5.6 Sol. Oracle, Strategist, Guardian, and BRIK synthesis use deterministic structured logic in this Build Week demonstration.
BRIK
Coach · reconciler
Reconciles the crew, resolves conflicts, and delivers Maya's Monthly Keep Rate plan in warm, plain language.
ANALYST
Explain
Explains why Maya's Monthly Keep Rate changed, using only verified context.
ORACLE
Scenarios
Frames simple estimates from Maya's six-month history; it does not claim a production forecast.
STRATEGIST
Propose
Ranks practical moves and proposes setting aside 30% of the next variable Venture payout.
GUARDIAN
Risk gate
Checks every proposal against essentials, income volatility and cash-flow timing — and can cap or overrule the others.
One crew everywhere: Analyst · Oracle · Strategist · Guardian · BRIK. Guardian makes the visible call in the demo, reducing the Strategist's proposed 30% payout set-aside to 22% because Maya's income varies and obligations are upcoming.
03 · Keep Engine & data
The math, and the truth it hands over
The engine is code, not a model. It computes the one number, then hands the agents a structured pack where every figure is citable.
Monthly Keep Rate = (Built − Cuts) ÷ Built · displayed as a percentage · transfers excluded
Sample: Maya · this month
Built $5,400 Cuts $3,600 Kept $1,800
Monthly Keep Rate 33.3% · ▼ 16.7 pts vs 50.0% last month
Drivers: family +$470 · food +$420
Biggest Cut: August Rent Reserve · $1,550
Data model (sketch)
keep_snapshots — monthly built/cut/kept/rate
behavior_features — deltas + evidence (citable)
interventions — moves + est. effect + source
weekly_plans — tasks + semantic action
agent_runs — output + model + trace_id
04 · Reasoning flow
How a run happens
The live Analyst uses the OpenAI Responses API. The remaining specialist roles and BRIK synthesis are deterministic structured logic in this Build Week demonstration. Production Agents SDK orchestration — fan out, gate, reconcile — is roadmap.
1
Classify & feature-build · deterministic + fast model
Every transaction → earned / cut / transfer; the engine computes deltas and writes citable evidence strings.
2
Explain — Analyst · streamed
Why Monthly Keep Rate moved, in plain language. No figure the engine didn't compute.
3
Estimate — Oracle
Simple scenarios based on Maya's verified six-month history; not production Monte Carlo.
4
Propose — Strategist
Three moves mapped to real STAKD semantic actions (SetGoal, CreateStak, CreateCut).
5
Gate — GUARDIAN
Reviews every proposal for essentials, volatility, cash-flow timing; returns approve / modify / reject with a reason.
6
Reconcile & speak — BRIK · Realtime voice (planned)
Merges it all into the weekly plan and a short, warm brief. Writes weekly_plans; captures trace_id.
05 · Stack & honesty
What's live, what's illustrative
Stack
Public Analyst: GPT-5.6 Sol · OpenAI Responses API · streamed text
Native integration: Supabase Edge Function · Responses API · Structured Outputs
Current orchestration: deterministic specialist flow · review → reconcile
Roadmap: OpenAI Agents SDK · fan-out → gate → reconcile
Voice: Realtime API (planned)
App: STAKD · React Native / Expo (SDK 54)
Data: Supabase · Postgres + RLS
Live vs illustrative
Live today: native STAKD integration · GPT-5.6 Sol Analyst reasoning · OpenAI Responses API · Supabase Edge Functions · deterministic Keep Engine · semantic action routing · Guardian disagreement logic
Illustrative / roadmap: production multi-agent orchestration · Monte Carlo forecasting · autonomous financial actions · live banking integrations
Tooling · Built with Codex
Built with Codex
Codex accelerated the build end to end — so the week went into the reasoning layer, not boilerplate.
✓ Architecture iteration
✓ Synthetic Maya datasets
✓ Native screen implementation
✓ Navigation debugging
✓ Edge Function development
✓ Testing and QA
✓ Agent scaffolding
06 · Build plan
The week
| Day | Deliverable | State |
| 1 | Keep Engine computing Maya's 33.3% Monthly Keep Rate from the synthetic ledger | real |
| 1 | Demo shells — app (phone) + system (console) | done ✓ |
| 2 | Classifier + feature store with evidence strings | real |
| 2–3 | Analyst streaming + Oracle scenarios | real |
| 3 | Strategist proposals + Guardian gate (visible overrule) | real |
| 4 | BRIK deterministic reconciler → weekly plan + trace (Agents SDK · roadmap) | real |
| 4 | Realtime voice brief | stretch |
| 5 | Wire to endpoints behind a DEMO_MODE flag · rehearse · record | real |