Close the home-page split by moving account/onboarding and rectification glue out of page.tsx without relocating React state, keeping the route static and hook order intact.
Co-authored-by: Cursor <cursoragent@cursor.com>
Reviewed: tsc + consult 295 + rectification 747 + python suites green;
guard functions and window/general instructions verified unchanged.
Conflict: BUG entry renumbered 467→468 (467 taken by report-extraction).
Review fix: test_consultation_birth_accuracy.py added to CORE_PYTEST_TARGETS
(pytest-style file outside the rectification glob would never hit the auto gate).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0155nFCgCHtoA7jhSDGmZmMu
The report writer had no interpretation methodology at all: a local agent
calling the jyotish skill can read the reference library, the report model
could read nothing. It could only restate the bundle.
- frontend/src/lib/report-interpretation-packs/ holds one general pack and
one pack per report theme, distilled from the in-repo reference guides.
They constrain wording and reasoning discipline (term modernisation,
how to talk about relative strength and SAV scores, the reasoning errors
to avoid, the banned phrasings) and never assert a chart fact.
- The general pack rides INSIDE the cached system message so the cached
prefix stays byte-identical across sections; the chapter pack follows it
and summary calls get the general pack only.
- Skill jyotish-personal-report goes to 1.1.0 (1.0.0 deprecated): the
contract now names interpretiveFacts and themeNarrativeSeeds as a
bounded fact layer and states that the knowledge pack is not a fact
source and cannot raise certainty.
- Telemetry records interpretiveFactCount and knowledgePackCharacters as
numbers only; the counter never throws so telemetry cannot break a run.
Tests lock every theme resolving a pack, the 3,000 character budget, a
forbidden-substring scan (paths, module names, vendor names, artefact
names), the byte-stable cache prefix, and that no evidence id or date
appears in the static content.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016P5RoqzmUQEbeC2qjAkeGr
The consultation workflow already returns a functional benefic/malefic
table, a shadbala ranking, SAV scores, the current maha/antardasha,
detected yogas and guided-topic copy. The report extraction layer threw
all of it away, so claim cards could only say "the server closed the
minimum evidence group" and the writer had no conclusions to work from.
- ReportEvidenceBundleV2 gains interpretiveFacts (yogas, functionalRoles,
shadbalaRanking, savScores/savTotal, currentDasha, convergenceDomains)
and themeNarrativeSeeds. Both are required, allow empty, keep .strict(),
are covered by the canonical sort + bundleHash, and fail closed on
dangling refs, duplicate ranks/houses/themes and out-of-bound text.
- Extraction is allowlist-style: closed enums for yoga category and
functional role, safeCelestialName for planets, sign->whole-sign-house
projection for SAV, and a forbidden-token scrub that drops any seed line
naming an external provider or internal route.
- Claim card conclusions and supportingFacts are now deterministic
astrological statements built from those facts; risks become
counterFacts. assertionLevel derivation is unchanged, and a theme with
no seed keeps the old receipt wording with consensus capped down.
- filterReportEvidenceBundleForSection trims seeds and SAV houses to the
chapter's theme while letting the chart-wide interpretive receipts ride
along, so every section can cite them.
Contract snapshot taken from a real local /api/consultation_workflow call
with fictional smoke birth data; the new fixture test locks the shapes
that call actually returns, including the fields that are absent.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016P5RoqzmUQEbeC2qjAkeGr
Keep archive as a PATCH of archived_at rather than DELETE, pass entry_mode through onboarding, and let popstate to the default chat reuse selectSession. Then move send/stop/recovery and session management out of page.tsx so the home surface stays within the batch-two line budget.
Co-authored-by: Cursor <cursoragent@cursor.com>
Natal answers were opening on parameter tables, and rectification turns were one-sentence legal copy. Centralize user-facing strings, keep representative-minute and question-slot red lines, and stop duplicating the opening collect prompt as a second assistant message.
Co-authored-by: Cursor <cursoragent@cursor.com>
Hospital records and adopted rectification times were still fed to the model as not_auto_rectified because the chart request omitted declared_accuracy/time_source and mastra hardcoded the boundary. Map profile truth into the engine request, keep rectified for accepted/confirmed active times only, and leave window/general guards unchanged.
Co-authored-by: Cursor <cursoragent@cursor.com>
page.tsx still owns the chat main chain, but the first product surfaces now
live in their own modules so later splits can land without editing the 4k-line
Home. Source-lock tests follow the moved tokens; the orphan user-data contract
is aligned and added to the quick gate.
Co-authored-by: Cursor <cursoragent@cursor.com>
Local fallbacks were creating fake saves and resurrecting deleted rows.
Pin and archive now live on chat_sessions so they follow the account.
Co-authored-by: Cursor <cursoragent@cursor.com>
Refresh, back, and login return were dropping the open conversation because selection lived only in React state.
Co-authored-by: Cursor <cursoragent@cursor.com>
List GET no longer ships transcripts; consult appends questions after reserve and ignores client history so dual-tab last-write-wins cannot erase messages.
Co-authored-by: Cursor <cursoragent@cursor.com>
Window_scan assertions now match the public from_sign/to_sign contract, the
staging quick gate runs the rectification Python suite, and compare-candidates
rescores when stored policy lags the live engine identity.
Co-authored-by: Cursor <cursoragent@cursor.com>
Day-level events now score Vimshottari/Narayana transition closeness so
nearby candidate minutes can diverge, with gated quality probes and
answer-prior ranking so high-base-rate existence questions stay out.
Co-authored-by: Cursor <cursoragent@cursor.com>
deliveryCapability no longer ties adoption to minute separation or holdout;
those stay on the exact-minute confirmation gate so users can save a range.
Co-authored-by: Cursor <cursoragent@cursor.com>
Spoken collect no longer renders a second visual prompt; choice legends stay screen-reader only and live cards share the assistant inset. Exhaustion collect avoids colliding with the opening question id, and a successful billed turn no longer surfaces run_failed after the exit gate.
Co-authored-by: Cursor <cursoragent@cursor.com>
.personal-report-reader declared --report-paper, --report-rule and
--report-accent on itself. A custom property resolves from the nearest
element that declares it, so an element-local declaration beats :root
regardless of media queries or source order — the dark override added
with the theme was dead the moment it was written.
The inks did follow the theme, because they live on :root. So dark mode
put --color-ink (#f2f0ea) on paper that stayed #f8f5ee: 1.05:1 for
headings and 1.22:1 for body. The report was effectively invisible.
Printing had the same defect from the other side: the print block forces
white backgrounds but never reset the inks, so printing from a dark
screen produced a blank page. It now pins the palette back to light —
paper is always paper.
Every report ink now clears AA on report paper in both themes, and the
new contract test forbids re-declaring the report palette anywhere but
:root, which is the trap that caused this.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0155nFCgCHtoA7jhSDGmZmMu
When coverage still blocks adopt and no renderable discriminator remains, narrate the numeric range and persist a spoken collect instead of promising a time card that cannot be clicked. Recompute probe information gain on active candidates and drop zero-split probes explicitly.
Co-authored-by: Cursor <cursoragent@cursor.com>