Fork replaces legal-AI product with investment research workspace

N9ALV's fork is a deliberate domain swap: legal drafting and contract workflows are stripped out, replaced with investment research infrastructure - portfolio schema, thesis tracking, decision journaling, and an investing-oriented system prompt.

workflowchat-ui

Two commits make the pivot. 6a4ed686 adds an 896-line planning document (docs/investing-wealth-repurpose-plan.md) mapping the existing codebase primitives to investment research use cases. 693213ce lands the first working prototype across 17 files.

The prototype adds new schema tables: securities, portfolios, portfolio_holdings, portfolio_transactions, investment_theses (with separate bull/base/bear markdown fields and a 1-10 confidence_score), and decision_journal_entries. These appear in both 000_one_shot_schema.sql and a new 001_investing_domain.sql migration. A 382-line Express router handles CRUD for the new entities. Three Next.js pages (/investment, /journal, /theses) appear with sidebar entries.

The removal side is intentional. BUILTIN_WORKFLOWS in builtinWorkflows.ts and SYSTEM_PROMPT in chatTools.ts are both rewritten from scratch. Legal CP-checklist and contract drafting are gone; investment memo generation, thesis review, and 10-K risk extraction replace them.

A few things to flag. The new routes and tables have no visible RLS or auth hardening - this reads as a prototype pass with security deferred. shouldAnimate is hardcoded to true in AppSidebar.tsx, which looks like a debug leftover rather than intentional. And pulling this wholesale would remove the legal drafting functionality entirely.

So what Skip for direct merges - the legal affordances are deliberately deleted, so adopting this regresses contract and drafting flows. Worth tracking if you're curious about the domain-swap architecture pattern, or if you want to cherry-pick the new system prompt's fact/assumption separation discipline. The `investment_theses` schema with structured bull/base/bear fields is a clean reference if you ever need something similar.

View this fork on GitHub →

Spotted something wrong? Or know the PR text has fresher detail than the writeup above?

Commits in this thread

2 commits from N9ALV/mike, oldest first. Source extracted verbatim from the harvested git log.

SHA Subject Author Date
6a4ed686 Add investing and wealth repurpose plan ALV 2026-05-07 ↗ GitHub
693213ce Add investment research workspace prototype ALV 2026-05-07 ↗ GitHub

Capture this thread into my fork

Download a single Markdown prompt that tells Claude how to port every commit above into your working tree — adapting paths and structure to match your repo. Run it via claude -p < capture-thread-129.md from inside the repo you want the changes in.

⬇ Download capture-thread-129.md