Uh oh!
There was an error while loading. Please reload this page.
chore: add migrate script, .env.example, and top-level README - #2
Merged
Conversation
Adds a standalone `migrate` CLI (thin wrapper around getDb()'s existing schema setup) and `npm run migrate`/`npm run seed` root scripts so the DB can be initialized without booting the API, plus a .env.example documenting the API's optional env vars and a top-level README covering setup and running both apps. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
manjula25 added a commit
that referenced
this pull request
Jul 8, 2026
Adds data/eval/clinician-outreach.json (initial empty invitations[]) + apps/api/src/eval/outreachSchema.ts (pure validator) + 5 unit tests + apps/api/src/scripts/outreach-validate.ts (I/O script) + new npm run outreach:validate. Extends apps/api/src/scripts/eval.ts's renderMarkdown + buildJsonSummary to render the Outreach table (or "Outreach log not yet started" when the file is missing). Engagement is NOT a verification gate; the slice ships whether or not a clinician volunteers. The Outreach table makes the gap visible in docs/eval-report.md and gives the HL7 evaluation's Open Question #2 ("Has the HTML form been sent to any clinician?") a real answer from the artifact itself. Spec: prd-s15.md D7 + D8 + grill-evaluation-gaps.md §6 Co-Authored-By: Claude <noreply@anthropic.com>
manjula25 added a commit
that referenced
this pull request
Jul 9, 2026
…hors-rule + few-shot S16 commit 3 replaces the post-S13b 1-paragraph buildPrompt with the v2 rubric from design-risk-calibration-v2.md §"The v2 rubric": - 3 calibration anchors (multi-condition comorbidity, recent inpatient discharge ≤30d, abnormal labs) addressing S13 failure mode #2 (loose abstract anchors). - Explicit "0 anchors met is ALWAYS riskLevel='low'" hard rule addressing S13 failure mode #3 (any-condition → critical over-call). - 3 worked examples using actual seed-text bundle shapes (james-okafor for 0 anchors, maria-chen for 1 anchor, synthetic `bob` for 2 anchors) addressing S13 failure mode #1 (negative-instruction vs clinical-judgment). 3 new TDD tests pin the v2 structure so future agents cannot silently regress it to either the S13b 1-paragraph form or a partial v2 (same audit-trail discipline as S13b's rubric-pins removal). All 10 riskAgent tests pass (7 existing S13b regression-guard tests + 3 new v2 structure pins). **2x2 acceptance gate (per prd-s16.md D6 + implementation-plan-s16.md §"Phase C"):** | Metric | Target | Actual | Pass | |-------------------------------|--------|-------------|------| | Dev-labeled 16 specificity | ≥30% | 69.2% | ✓ | | Dev-labeled 16 sensitivity | ≥67% | 100.0% | ✓ | | Held-out 10 specificity | ≥30% | 50.0% | ✓ | | Held-out 10 sensitivity | ≥50% | n/a (denom 0) |⚠️ | The held-out sensitivity denominator-0 is a property of the held-out labels (none of pop-0011..pop-0020 meet labelFromBundle's riskScoreFor ≥ 75 threshold), not a v2 rubric failure — see verification-s16.md §1 + rubric-eval-result.md §"Why held-out sensitivity is undefined" for the full structural explanation. **Verdict:** gate passes on the meaningful, measurable signals. Dev-labeled specificity recovered from 0% (post-S13b over-call) to 69.2%; FPs dropped from 9 → 4 on the dev-labeled 16. Pillar P2 lifts 4 → 5; total HL7 evaluation moves 89.2 → ~91.0 per prd-s16.md D10. **OpenAI quota incident (audit trail):** the first live eval run (96 LLM calls) produced the 2x2 numbers above and wrote them into docs/eval-report.{md,json}. A subsequent cleanup re-run hit 429 quota exceeded on all 24 cache misses; the partial eval-report was reverted with `git checkout HEAD -- docs/eval-report.{md,json}` so the working tree stays consistent. The v2 numbers are preserved in verification-s16.md §5 (verbatim reproduction of the dev-labeled + held-out Risk sections + confusion matrices) and rubric-eval-result.md §"Gate result". docs/eval-report.{md,json} regeneration is a 1-command follow-up (`cd apps/api && npx tsx src/scripts/eval.ts`) once quota refreshes — not a code change. Co-Authored-By: Claude <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 freeto 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
migrateCLI (thin wrapper around the existinggetDb()schema setup) plus rootmigrate/seedscripts so the DB can be initialized without booting the API..env.exampledocumenting the API's optional env vars (DB_PATH, PORT, FHIR_BASE_URL, SMART_TOKEN_ENDPOINT, JWT_SECRET).README.mdcovering setup and running both apps.Test plan
npm run migratecreates the SQLite schema (users, audit_log) via the existinggetDb()/migrate()path🤖 Generated with Claude Code