feat(memoria): perfil curado de memória v1 (injeção fail-closed + escada de confiança + curador), gated off#150
Merged
Merged
Conversation
… + curadoria) Evolucao da memoria do Zinom inspirada no Hermes Agent e Open Second Brain, reaproveitando infra dormente do engine. Owner-only, tudo gated off, curador so na tabela nova (nunca brain_chunks -> off eval gate). Passou por revisao adversarial de 5 lentes; 4 must-fix incorporados (leak cross-account no wiring, AC4 fronteira real, account_id em todo statement, eval gate na dedup de chunks). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…r/portal) 10 tarefas bite-sized, cada uma testavel e revisavel isoladamente. Fase 2 (LLM) e dedup de brain_chunks antigos ficam para planos proprios (eval-gated). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…scor) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…cteres Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…sed) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…sifier Co-Authored-By: Claude Opus 4.8 (1M context) <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 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.
O quê
Evolução do subsistema de memória do Zinom inspirada no Hermes Agent e no Open Second Brain, reaproveitando infra dormente do engine. Adiciona uma camada de perfil curado por conta, pequena e injetada em toda sessão MCP, com escada de confiança determinística (sinal → evidência → confirmado) e um curador que a mantém.
Docs de desenho:
docs/superpowers/specs/2026-06-18-memoria-perfil-curado-design.md(passou por revisão adversarial de 5 lentes) edocs/superpowers/plans/2026-06-18-memoria-perfil-curado.md.Backend v1 (este PR)
user_profile_facts+memory_audit(aditiva/idempotente; o slot 0018 já é rubrix_flows).computeConfidence(puro, utility.ts): razão suavizada × decaimento de frescor, bandas 0.40/0.75.renderProfile(puro): elegível = pinned OR (confirmed AND value≥0.75); orçamento de chars, nunca corta fato pela metade.composeInstructions(puro): concat que nunca retorna '' e não muta as consts.profile-storageaccount-scoped (load/upsert/audit),account_idem todo statement (não repete o tenant-leak do brain_facts).rememberpor hash determinístico de conteúdo + guarda de segredo (looksLikeSecret/stripSecrets).index.ts(resolveInstructions), gated porPROFILE_INJECT_ENABLED: o perfil só é carregado para o owner (gate no booleanoowner, nunca em getAccountId() que faz fallback pra 'bruno'). Friend nunca toca os fatos do owner.runMemoryCuration) + tick no brain-classifier gated porMEMORY_CURATION_ENABLED. Opera só em user_profile_facts; nunca toca brain_chunks.Segurança / risco
PROFILE_INJECT_ENABLED,MEMORY_CURATION_ENABLED): deploy = zero mudança de comportamento.search.tsnembrain_chunks.tsclimpo.Follow-ups (fora deste PR)
MEMORY_CURATION_LLM): extração/fusão Haiku + guarda de segredo + budget/circuit-breaker.npm run evalna VPS (esperado zero delta).🤖 Generated with Claude Code