Phase 4: Domain swap (legal → finance) + Mike → Gordon rename#5
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Mike → Gordonbrand rename across types (MikeMessage/Workflow/Chat/…), components (MikeIcon), API client (mikeApi.ts), MIME types, localStorage key, R2 bucket default, README, and docs.Practice = stringflow + "Others" fallback.What changed
Visible copy
InitialViewdisclaimer now covers financial/investment/accounting/legal advice.System prompts
chatTools.tsSYSTEM_PROMPTrewritten with finance framing + citation-auditability emphasis.projectChat.tsproject-context block now describes finance deal/mandate workstreams.tabular.tsextraction & review prompts (legal document analyst→finance document analyst).generate_docxtool 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
mike-icon.tsx→gordon-icon.tsx;mikeApi.ts→gordonApi.ts.application/mike-*→application/gordon-*, localStorage key, R2 bucket default in.env.example.FORK.mdupstream URLs towillchen96/mikeintentionally preserved.Deferred per plan
LEGAL_NUMBERING_REFinshared/generateDocx.tsleft as-is (it refers to Word's built-inlegalnumbering style — forces arabic numerals at all levels — not legal documents).Full rationale in
decisions.md.Test plan
tsc --noEmitclean on backendtsc --noEmitclean on frontendmike.selectedModel→gordon.selectedModel) — users will re-select model on first loadOperational notes
.env.exampledefaultR2_BUCKET_NAMEchangedmike→gordon. Existing deployments setting this var explicitly are unaffected; deployments relying on the default need to set the var or create a new bucket.🤖 Generated with Claude Code