feat: global indexed-agent read-order system for Luca#166
Merged
Conversation
- new POST /api/v1/luca/agent-read: single-call truth resolver for all indexed agents — resolves name/slug/wallet, checks registry, runs books + treasury, returns indexed status + data_quality label in one call - luca-x-doctrine: replace vague figure-recall rule with full 6-step read-order protocol; Luca must call agent-read before any per-agent claim, clearly labels registry-backed vs observational, never collapses partial truth into no data - skills catalog: add agent-read as the required first call for agent queries Applies to all 143+ indexed agents, not just Aeon. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RjpGP3kYKnQuQAUoK6RZky
|
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
POST /api/v1/luca/agent-readendpoint — single-call truth resolver for all indexed agentsluca-x-doctrine.ts— full 6-step read-order protocol replacing the vague figure-recall ruleagent-readadded as the documented required first call for agent queriesProblem solved
Public Luca could understate, overstate, or drift depending on which path it hit. There was no single enforcement point that said: check if this agent is indexed, and if so use only registry truth. This applied to all 143 agents, not just Aeon.
How it works
POST /api/v1/luca/agent-read { "agent": "bankr" }{ indexed: false, read_source: "not_indexed" }— Luca labels response as observationaldata_qualitylabeldata_qualitylabel examples Luca surfaces verbatim:"Zetta registry (Verified — manifest-declared, books attributed)""Zetta registry (Wallets Declared — manifest-declared, books attributed, ownership unconfirmed)""Zetta registry (no declared wallets — financial data unavailable)""Zetta registry (financials under review — figures suppressed pending verification)""Not indexed in Zetta registry. Any response about this agent is observational, non-registry, and non-verified."Doctrine read-order (6 steps):
agent-readbefore any claimindexed: false→ state not indexed, label any other info observationalindexed: true→ use onlybooks+treasuryfrom the responsebooks.attributed: false→ state identity, no financial figuresagent-readfirstFiles changed
src/app/api/v1/luca/agent-read/route.tssrc/lib/luca-x-doctrine.tssrc/app/api/luca/skills/route.tsGenerated by Claude Code