Luca skill endpoints: compare, leaderboard, revenue-quality, unresolved, anomalies - #215
Merged
Conversation
…n-accusatory framing)
…only, proof coverage per row)
…rade breakdown from posted journals)
…eds evidence, no private payloads)
|
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.
What this is
The 5 read-only backend endpoints Luca's skills call (spec'd in PR #214). With these merged, every Luca skill is live — he stops being prompt-only and starts reading real Zetta data.
Endpoints
Public (no auth; published data only):
GET /api/v1/financial-intelligence/{slug}/compare?from=&to=compare_periodsGET /api/v1/financial-intelligence/leaderboard?metric=&period_end=&limit=get_leaderboardInternal/operator-only (behind existing
internalAuth):GET /api/admin/financial-intelligence/revenue-quality?agent_slug=&period_start=&period_end=get_revenue_qualityGET /api/admin/financial-intelligence/unresolved?agent_slug=&limit=get_unresolved_itemsGET /api/admin/financial-intelligence/anomalies?agent_slug=&status=get_anomaliesDesign notes
financial_snapshots,financial_journals,financial_journal_lines,economic_actions,financial_anomalies).status = 'published'— preliminary snapshots never leak.comparedoes the arithmetic so Luca's numbers are always traceable to a response.internalAuth(ZETTA_INTERNAL_SECRET / session token); no new auth surface.Depends on
20260724000001_financial_intelligence_engine.sql) — merge/apply that first.After merge
SUPABASE_URL,SUPABASE_SERVICE_ROLE_KEY,ZETTA_INTERNAL_SECRET).ZETTA_BASE_URLat production, register the 6 skills, attach the verifier hook, runluca/evals/run-evals.tsagainst staging.