Skip to content

feat(money-mirror): issue-009 — AI Personal Finance Coach (full pipeline)#14

Merged
shadowdevcode merged 8 commits intomainfrom
feat/linear-workflow-sync
Apr 4, 2026
Merged

feat(money-mirror): issue-009 — AI Personal Finance Coach (full pipeline)#14
shadowdevcode merged 8 commits intomainfrom
feat/linear-workflow-sync

Conversation

@shadowdevcode
Copy link
Copy Markdown
Owner

@shadowdevcode shadowdevcode commented Apr 2, 2026

Summary

This PR completes the full issue-009 pipeline for MoneyMirror Phase 1 — an AI personal finance coach that parses bank/credit card statements and delivers a Money Health Score + advisory nudges.

Changes in this PR

  • Vercel runtime fix — Remove Edge middleware blocked by @neondatabase/auth/next/server incompatibility; replace with Node proxy convention. Add Sentry instrumentation (server, edge, client) and vercel.json for production deployment.

  • Phase 1 feature complete — PDF parsing via Gemini structured outputs (bank account + credit card modes), Money Health Score calculation, Mirror Moment advisory feed, weekly recap cron fan-out, dashboard rehydration with full statement history.

  • Test suite — Parse API, onboarding completion flow, weekly recap cron, categorizer logic, advisory engine nudge selection.

  • Schema evolutionmonthly_income_paisa on profiles; institution_name, statement_type, due_date, payment_due_paisa, minimum_due_paisa, credit_limit_paisa on statements for credit card mode.

  • Agent prompt improvements — 7 engineering rules from issue-009 postmortem shifted left into execute-plan and architecture validation: auth caller verification, write atomicity checks, Gate 0 smoke test, empty ENV detection, Sentry provisioning checklist, file size budgets.

  • Knowledge base + docs — CHANGELOG, engineering-lessons.md, CODEBASE-CONTEXT.md, postmortem-009.md capturing all Phase 1 learnings.

Test plan

  • npm run build passes in apps/money-mirror/
  • Upload a bank statement PDF → verify Money Health Score + advisory feed renders
  • Upload a credit card statement PDF → verify credit card mode parses correctly
  • Complete onboarding with monthly income → verify stored in profiles.monthly_income_paisa
  • Trigger /api/cron/weekly-recap manually → verify fan-out fires per user
  • Check Sentry dashboard → verify errors are captured in production
  • Run npm test → all tests pass

🤖 Generated with Claude Code

MoneyMirror AI finance coach — full 12-step pipeline through deploy-check.
PDF statement parsing via Gemini Flash, Money Health Score, Mirror Moment
perception gap, advisory feed, weekly recap cron fan-out, Supabase RLS,
PostHog server-side telemetry, Sentry, 34 passing tests.
Dashboard refactored into UploadPanel/ParsingPanel/ResultsPanel components.
Parse route persistence extracted to persist-statement helper.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 2, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ai-product-os-493e Ready Ready Preview, Comment Apr 4, 2026 3:02am

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 2, 2026

PR Risk Assessment

Risk level: High

Reason: PR introduces a new full-stack app with Supabase Auth + RLS schema migrations, cron fan-out async pipeline, PostHog/Sentry telemetry wiring, and modifies system-level prompt instruction files (CLAUDE.md, command-protocol.md, commands/review.md, agents/code-review-agent.md) across 74 files.

Action taken: No action — no reviewers to assign (sole contributor on this repo). External review recommended before merge given auth, schema, and async pipeline changes.

shadowdevcode and others added 7 commits April 4, 2026 08:30
Remove Edge runtime middleware that blocked Vercel deploy due to
@neondatabase/auth/next/server incompatibility; replace with Node
proxy convention. Add Sentry instrumentation (server, edge, client)
and update next.config.ts + vercel.json for production deployment.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Implement complete Phase 1 features: bank account + credit card PDF
parsing via Gemini structured outputs, Money Health Score calculation,
Mirror Moment advisory feed, weekly recap cron fan-out, and dashboard
rehydration with full statement history. Includes persist-statement
helper for atomic write sequence and statements.ts mode validation.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…categorizer)

Add comprehensive test coverage for Phase 1: parse API happy path and
error cases, onboarding completion flow, weekly recap cron fan-out,
categorizer logic, and advisory engine nudge selection.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add monthly_income_paisa to profiles for savings rate calculation.
Add institution_name, statement_type (CHECK constraint), due_date,
payment_due_paisa, minimum_due_paisa, credit_limit_paisa to statements
to support credit card mode alongside bank account mode.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Shift-left 7 rules from issue-009 postmortem into agent and command
files: auth caller cross-verification, parent/child write sequence
check, Gate 0 smoke test before deploy-check, empty ENV var detection,
Sentry provisioning checklist in execute-plan, file size budget at
generation time, and env var grep step post-implementation.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Extract issue-009 pipeline learnings into knowledge base (7 new
engineering rules). Add CODEBASE-CONTEXT.md for future agent sessions.
Add postmortem-009.md with root cause analysis. Update project-state.md
to reflect Phase 1 completion and current blockers.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Update hooks to match Write|Edit|MultiEdit events with restructured
command format. Add Cursor IDE settings (.cursor/) and MCP server
configuration (.mcp.json) for local development environment.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CRITICAL finding: .mcp.json commits a live Neon API key (napi_mnnlxkt8gvd...) to version control. This credential must be revoked immediately and the file must either be removed or replaced with a reference to an env var before this PR can be merged.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 4, 2026

PR Risk Assessment

Risk level: High

Reason: 90+ files across a new production app (apps/money-mirror), auth/session logic, DB schema, API routes with cron fan-out, and agent/command prompt instruction files. CRITICAL: .mcp.json commits a live Neon API key (napi_mnnlxkt8gvd...) in plaintext — this must be revoked and removed before merge.

Action taken: Changes requested — CRITICAL credential exposure blocks approval. No additional reviewers assigned (single-author repo, no CODEOWNERS).

@shadowdevcode shadowdevcode merged commit 4d476de into main Apr 4, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant