feat(entry-check): pre-entry check page with saved trade plans and editable scoring rules - #13
Merged
Merged
Conversation
…itable scoring rules New /entry-check page that forces a deliberate pre-entry decision: - computePreEntryContext reuses the enrichment section calculators as-of any timestamp (empty = live "now" check, past = retrospective practice incl. a "what happened after" 5/10/20d forward outcome with stop/target first-hit) - transparent rule-based score: user-editable scoring_rules (AND of typed predicates over a curated fact catalog, no black box), 7 seeded defaults, fired/skipped breakdown always shown; unified Entry confirmation question (confirmation vs anticipation/FOMO) shared with the journal - trade_plans table (migration 010): full check saved with frozen score breakdown, status planned/entered/skipped/expired, editable in place via full-form loading (each plan is a single row, PATCH recomputes the score) - copy-paste AI coach prompt built from the full context/checklist/score/ outcome, with clipboard fallback modal; lazy return-since-plan chip - shared journal form controls + Hebrew hover-help extracted for reuse Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ver help - trade journal form now uses the extracted form-controls/journal-presets; "Entry reason" unified with entry-check into the Entry confirmation question (discipline dimension only — setups stay in Technical setup, incl. new MA Support Bounce / Fibonacci Retracement / Bouncing on MA150); sections renamed to match entry-check (Setup & Plan, Chart Details) - Hebrew hover explanations on every question, option chip and section, on the Trade Context card metrics and on the dashboard/analytics KPI cards - notes and custom-value inputs auto-detect Hebrew (dir="auto") Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Parses scripts/migrations/*.sql and fails when code and schema drift: columns read/written must exist, migrated-but-untouched columns are flagged as redundant unless whitelisted, upsert conflict keys need a matching UNIQUE constraint, the scoring_rules seed must parse, pass validateRule and stay identical to DEFAULT_RULES, and migration numbering must be gapless. CLAUDE.md documents the repo-root-mounted test command and requires running the suite for any DB-touching change. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Verified with knip + manual grep: - delete the orphaned /api/v1/metrics/performance endpoint and lib/domain/performance.ts (no client callers — FastAPI-port leftover), their types (PerformanceReport, HoldingTimeStats), the unused kpi-row component, the unused autoInterval helper and the unused SSR supabase client; drop unused @radix-ui/react-separator and react-tooltip deps - unexport symbols only used inside their own module Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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
New Entry Check page (
/entry-check) — a deliberate pre-entry gate against anticipation/FOMO entries that get stopped out fast:lib/domain/pre-entry.ts): reuses the enrichment section calculators — stock MAs/distances/returns/relative volume/ATR, SPY+QQQ bias, VIX regime. No invented data; gaps land in dataQuality.lib/domain/scoring.ts+scoring_rulestable): each rule is an AND of typed predicates over a curated fact catalog, edited in the UI; the score always shows which rules fired and which were skipped. 7 seeded defaults incl. Entered without confirmation (−2).trade_plans, migration 010): full snapshot with frozen score breakdown; status planned/entered/skipped/expired; clicking a plan loads every parameter into the form and Save updates the same row (plans are single entities, no duplicates); lazy return-since-plan chip fetches the current price on click.dir="auto") notes.lib/db-contract.test.ts): migrations ↔ query layer can no longer drift silently (columns, redundancy, UNIQUE-vs-onConflict, seed ≡DEFAULT_RULES)./api/v1/metrics/performanceendpoint +lib/domain/performance.ts, unused kpi-row, unused deps, internal-only exports.Stacked on #12 (
feat/trade-context-enrichment) — retarget tomainafter #12 merges.Test plan
tsc --noEmitclean🤖 Generated with Claude Code