Skip to content

Phase 4: Domain swap (legal → finance) + Mike → Gordon rename#5

Merged
Archibald312 merged 2 commits into
mainfrom
phase-4-finance-domain-swap
May 15, 2026
Merged

Phase 4: Domain swap (legal → finance) + Mike → Gordon rename#5
Archibald312 merged 2 commits into
mainfrom
phase-4-finance-domain-swap

Conversation

@Archibald312
Copy link
Copy Markdown
Owner

Summary

  • Repositions the fork from legal AI to a finance AI assistant: rewrites system prompts, disclaimers, practice areas, and column presets for M&A diligence, PE, private credit, lev fin, IB, and equity/credit research.
  • Completes the Mike → Gordon brand rename across types (MikeMessage/Workflow/Chat/…), components (MikeIcon), API client (mikeApi.ts), MIME types, localStorage key, R2 bucket default, README, and docs.
  • Keeps all 12 built-in workflows untouched — finance workflow library is Phase 11. Old workflow practice values still display through the Practice = string flow + "Others" fallback.

What changed

Visible copy

  • InitialView disclaimer now covers financial/investment/accounting/legal advice.
  • Layout metadata (title, OG, Twitter), login/signup/support pages rebranded.
  • Chat title generator prompt reframed for finance.

System prompts

  • chatTools.ts SYSTEM_PROMPT rewritten with finance framing + citation-auditability emphasis.
  • projectChat.ts project-context block now describes finance deal/mandate workstreams.
  • tabular.ts extraction & review prompts (legal document analystfinance document analyst).
  • generate_docx tool description updated for finance artifacts (memo, IC paper, term sheet, diligence report, contract).

Practice areas — wholesale replacement: 19 legal practices → 17 finance verticals.

Column presets — additive, not replacement. Kept neutral legal contract presets (apply to finance contracts too) and added 12 finance presets (Revenue, EBITDA, Net Income, FCF, Leverage Ratio, Interest Coverage, Reporting Period, Maturity, Coupon/Rate, Currency, Capex, Margin).

Rename mechanics

  • 9 type identifiers across 48 files.
  • File renames: mike-icon.tsxgordon-icon.tsx; mikeApi.tsgordonApi.ts.
  • MIME types application/mike-*application/gordon-*, localStorage key, R2 bucket default in .env.example.
  • FORK.md upstream URLs to willchen96/mike intentionally preserved.

Deferred per plan

  • All 12 built-in workflows kept (Phase 11 will build the finance workflow library).
  • LEGAL_NUMBERING_REF in shared/generateDocx.ts left as-is (it refers to Word's built-in legal numbering style — forces arabic numerals at all levels — not legal documents).

Full rationale in decisions.md.

Test plan

  • tsc --noEmit clean on backend
  • tsc --noEmit clean on frontend
  • Backend Vitest: 57/57 passing
  • Spot-check chat title generation produces finance-style titles
  • Spot-check tabular review on a finance doc uses the new finance column presets
  • Verify login/signup pages render with new Gordon branding
  • Verify localStorage key change (mike.selectedModelgordon.selectedModel) — users will re-select model on first load

Operational notes

  • .env.example default R2_BUCKET_NAME changed mikegordon. Existing deployments setting this var explicitly are unaffected; deployments relying on the default need to set the var or create a new bucket.
  • localStorage key rename will silently reset users' last-selected model on their next visit. Acceptable one-time friction.

🤖 Generated with Claude Code

Archibald312 and others added 2 commits May 15, 2026 14:56
Repositions the fork from a legal-AI assistant to a finance-AI assistant
for M&A diligence, PE, private credit, leveraged finance, IB, and equity
and credit research.

Visible copy
- InitialView disclaimer updated to cover financial/investment/accounting/legal advice.
- Layout metadata, login/signup/support pages, and demo-service notice rebranded.
- Chat title generator prompt reframed for the finance domain.

System prompts
- chatTools SYSTEM_PROMPT rewritten with finance framing and citation-auditability emphasis.
- projectChat project-context block updated for finance deal/mandate workstreams.
- tabular extraction/review prompts ("legal document analyst" → "finance document analyst").
- generate_docx tool description rewritten for finance artifacts.

Practice areas
- Replaced 19 legal practices with 17 finance verticals (M&A Diligence, PE, Private Credit,
  Lev Fin, Project Finance, IB, Equity/Credit Research, Restructuring, Public Markets, etc.).
- Old workflow practice values flow through unchanged via string typing.

Column presets
- Kept neutral legal contract presets (apply to finance contracts too).
- Added 12 finance presets (Revenue, EBITDA, Net Income, FCF, Leverage Ratio,
  Interest Coverage, Reporting Period, Maturity, Coupon/Rate, Currency, Capex, Margin).

Mike → Gordon rename
- 9 type identifiers (MikeMessage/Workflow/Chat/... → Gordon*).
- File renames: mike-icon.tsx → gordon-icon.tsx; mikeApi.ts → gordonApi.ts.
- MIME types (application/mike-* → application/gordon-*), localStorage key,
  R2 bucket default, README, docs.
- FORK.md upstream URLs to willchen96/mike intentionally preserved.

Deferred per plan
- All 12 built-in workflows kept untouched; finance workflow library is Phase 11.
- LEGAL_NUMBERING_REF in shared/generateDocx.ts left as-is (it refers to Word's
  built-in 'legal' numbering style, not legal documents).

Rationale recorded in decisions.md. Backend + frontend tsc --noEmit clean;
backend Vitest 57/57 passing.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
PR #3 ("allow free-tier LLM in dev mode") wired up the ALLOW_FREE_TIER_LLM
env opt-in but never added an actual dev-mode pathway: ALLOW_FREE_TIER_LLM=true
with an empty FREE_TIER_FIXTURE_ALLOWLIST still throws on every call, even
plain chat with no documents attached, because the empty-allowlist check ran
before the no-docs short-circuit. Users hit a hard error on first chat.

Add a dev-mode bypass: when NODE_ENV !== "production" AND no documents are
attached, allow the call through. Production still requires an explicit
allowlist so the operator has consciously enumerated which fixtures may be
processed. Documents attached in any environment still require allowlist
matching.

Tests: pin the existing empty-allowlist throw to NODE_ENV=production; add
two new tests covering the dev-mode no-doc bypass and the dev-mode-with-docs
strict path. 59/59 backend tests green.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@Archibald312 Archibald312 merged commit 8a33897 into main May 15, 2026
4 checks passed
@Archibald312 Archibald312 deleted the phase-4-finance-domain-swap branch May 15, 2026 20:10
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