Build stock-deep-evaluation v1: single-stock equity evaluation app

Next.js 15 + TypeScript app implementing the fully-specced first change.
Pipeline: resolve -> market data -> pure evaluation engine -> budget guard
-> analysis agent -> report.

- market-data: DataProvider interface, offline FixtureProvider (DE/SPY seeded
  from the reference example), FmpProvider (FMP free tier), TTL cache + retry.
- technicals: pure MA/volatility/swing/52-week math.
- evaluation: instrument-aware pure engine; equity branch built, ETF gated to
  "not yet supported". Reproduces the DE example (P/E 34.5, fwd 29.3, $167.6B).
- agent: AnalysisAgent interface; default Claude Code CLI transport (headless,
  subscription-backed, web-grounded), Anthropic API alternate via config.
- cost-controls: price table, spend store, monthly budget guard.
- UI: ticker search + deep-dive toggle, report view, price chart with marked
  entry/exit/stop levels, cost/budget display, ETF/not-found states.

31 vitest tests, typecheck, production build, and lint all pass. Verified
end-to-end via the API for DE, SPY, and an unknown ticker. Live Claude CLI
agent test is the documented pick-up point (see README).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-08-21 17:03:04 -04:00
co-authored by Claude Opus 4.8
parent 73e93e7cb4
commit 902758ce67
44 changed files with 12425 additions and 91 deletions
@@ -187,3 +187,24 @@ SHALL be represented explicitly rather than fabricated.
#### Scenario: Missing data is not fabricated
- **WHEN** a required input for a section is unavailable
- **THEN** that section marks the value unavailable rather than inventing one
### Requirement: Instrument-type-aware evaluation
The evaluation SHALL carry the resolved instrument type (`equity` or `etf`) as a
discriminant, and the fundamentals-driven sections (earnings recap,
quality-of-earnings, financial/segment breakdown, valuation, over/undervalued
reasoning) SHALL be modeled as the **equity** branch so an ETF branch (holdings,
expense ratio, NAV premium/discount, weighted fundamentals) can be added later
without changing the shared, instrument-agnostic sections (current standing,
technicals, timing, entry/exit, stop-loss, macro). v1 SHALL implement the equity
branch; requesting an evaluation for a non-equity type SHALL return an
unsupported-type result rather than running the equity branch.
#### Scenario: Equity evaluated on the equity branch
- **WHEN** an evaluation runs for an `equity` instrument
- **THEN** the equity fundamentals/valuation sections are produced
#### Scenario: Non-equity type not forced through the equity branch
- **WHEN** an evaluation is requested for an `etf` (or other non-equity) instrument
- **THEN** the system returns an unsupported-type result
- **AND** does not populate equity-only sections with fabricated values