SD App — Lessons Learned
Section titled “SD App — Lessons Learned”AI marks
[→ CLAUDE.md]candidates for Talbot to approve and promote.
Architecture
Section titled “Architecture”-
TypeScript never does math — all financial calculations live in Python (sd-math). TypeScript/SvelteKit is a renderer only. This was corrected from an initial incorrect plan that proposed porting VB6 math to TypeScript.
[→ CLAUDE.md] -
Port ALL math as-is — do not selectively port only the strategies needed for Phase 1. VB6 and Python are nearly drop-in equivalents. A complete port eliminates conditional logic errors and makes TDD against LevPro outputs straightforward.
-
Phase 1 = SD Snapshot, not interactive calculator — Phase 1 is a static pre-calculated demo-teaser. The full interactive app (live API calls, user inputs) is Phase 2.
Planning
Section titled “Planning”-
Task → Project migration — SD App scope was initially underestimated as a Task. It is a multi-phase project requiring sd-math design, API design, and parallel implementation tracks. Caught and corrected before implementation began.
-
Separate design notes before implementation — sd-math structure and API definition must be agreed before writing any code. These are foundational decisions that affect both parallel tracks.
Testing
Section titled “Testing”-
Normalise fixtures to $100K — varying loan amounts add no testing value and make sanity checks harder. $100K is the canonical amount for all golden fixtures.
-
2 one-page summaries + 2 projections is sufficient — 10 bottom-line results + 2 annual schedules covers the full math. Intermediate values cannot be wrong while summary is correct.
- 3 significant digits for one-page summaries — dollar precision (e.g., 28,569) is noise at the overview level. The ”% Increase” column is the aha moment. Round balances to 3 significant digits (28,600) in one-page summary only. Projection detail tables retain dollar precision.