Logo de Citation Content Verify

Citation Content Verify

Comunidade
fedec65
citation-content-verify

Substantive citation verifier — checks every citation in a draft against the live source for existence AND content support (entailment), before delivery. Status per citation: MATCH / PARTIAL / MISMATCH / UNVERIFIED. UNVERIFIED or MISMATCH blocks automatic delivery (remove, disclaim, or escalate). Trigger after any draft-bearing response is produced and before final delivery / legal-evaluator scoring. Do NOT trigger for: citation formatting/conversion (swiss-citation-formats) or research retrieval (swiss-legal-research).

Visão geral

Publicado porfedec65
Repositóriobettercallclaude
Nome da habilidadecitation-content-verify
Estrelas
46
Forks
10
Arquivos incluídos
Somente instruções
LicençaAGPL-3.0
Links
  • Instruções em Markdown

    Um arquivo SKILL.md que o modelo carrega sob demanda, consumindo tokens apenas quando uma solicitação é realmente relevante para a habilidade.

  • Funciona com qualquer LLM

    As habilidades de IA são escritas em Markdown simples, não em código específico de um provedor. Por isso, funcionam com GPT, Claude, Gemini, Grok ou um modelo local.

  • Sem arquivos extras

    Tudo de que o modelo precisa está nas instruções — sem arquivos extras para sincronizar.

  • Código aberto

    Publicada por fedec65 no GitHub. Leia os arquivos da habilidade antes de instalá-la.

Instalação

Instale a habilidade de IA Citation Content Verify no TypingMind para usá-la com qualquer LLM ou adicione-a a outro agente que leia SKILL.md.

1

Instalar no TypingMind

O TypingMind instala uma habilidade diretamente da pasta dela no GitHub — lê o arquivo SKILL.md, reúne os arquivos de recursos em um pacote e armazena o resultado localmente.

  1. Abra o app e vá para Plugins → Habilidades.
  2. Escolha "Instalar do GitHub".
  3. Cole a URL abaixo, que aponta para a pasta da habilidade, e confirme.
    https://github.com/fedec65/bettercallclaude/tree/main/bettercallclaude/skills/citation-content-verify
  4. Ative a habilidade em cada chat em que quiser disponibilizá-la.
Plugins → Habilidades → Adicionar habilidade → Via URL do GitHub. Depois, cole a URL da pasta e pressione Continuar.
2

Instalar em outro agente

Qualquer agente que leia o formato Agent Skills pode usar esta habilidade — copie a pasta para o diretório de habilidades desse agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/fedec65/bettercallclaude.git /tmp/bettercallclaude
mkdir -p .claude/skills
cp -r /tmp/bettercallclaude/bettercallclaude/skills/citation-content-verify .claude/skills/citation-content-verify
Reinicie Claude Code após copiar para que a nova habilidade seja reconhecida.

Use no TypingMind

Ative Citation Content Verify em qualquer chat do TypingMind e o modelo cuida do resto. O nome e a descrição da habilidade ficam no prompt do sistema e, assim que uma solicitação relevante aparece, o modelo carrega as instruções completas automaticamente — sem precisar de acionamento manual e sem consumir tokens até que ela seja realmente usada.

O modelo carrega Citation Content Verify automaticamente assim que uma solicitação é relevante para essa habilidade.

Funciona com qualquer modelo de IA

Habilidades de IA são instruções em Markdown simples, não código específico de um provedor. Por isso, Citation Content Verify não fica vinculada ao modelo para o qual foi criada. Instale-a uma vez no TypingMind e use-a com GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ou um modelo local executado por conta própria — tudo com suas próprias chaves de API.

  • Carregada apenas quando necessário

    O prompt do sistema contém apenas o nome e a descrição. As instruções são buscadas na primeira solicitação relevante, então uma habilidade sem uso não gera custo.

  • Troque de modelo durante a conversa

    Como a habilidade é composta de instruções, não de código, trocar de modelo não afeta seu funcionamento — o próximo modelo lê o mesmo arquivo SKILL.md.

Instruções da habilidade

Este é o conteúdo de SKILL.md que o modelo carrega. Leia antes de instalar — uma habilidade é um conjunto de instruções que seu modelo seguirá.

Citation Content Verify

You are the substantive citation verification stage of the BetterCallClaude pipeline. You run after a draft response or artifact is produced and before final delivery (and before the legal-evaluator PASS/FAIL scoring). You verify every citation on two axes:

  • (a) Existence — the cited source really exists in the live database.
  • (b) Content support — the source actually says what the draft claims it says (entailment).

Format correctness is NOT your job — that is swiss-citation-formats. A syntactically perfect citation can still be fabricated or misattached; your job is to catch exactly that.

Status Vocabulary

StatusMeaningDelivery impact
MATCHSource exists and supports the claimnone
PARTIALSource exists, supports the claim only in part or with caveatsdisclosed in report, does not block
MISMATCHSource exists but does NOT support the claim (unsupported, contradicted, or unrelated)blocks delivery
UNVERIFIEDSource not found, or could not be checked (after retry)blocks delivery
SKIPPEDOut of scope (informal doctrine without structured ID, spec §7)disclosed in report, does not block

Verification Procedure

Step 0: Privacy Pre-Check

Determine the active privacy mode from the playbook (bettercallclaude.local.md) or session state. Content-level checks send claim sentences to cloud MCP tools (check_claim_support, attest_response use a server-side LLM judge):

  • strict mode: privileged content MUST NOT cross to cloud content-checks. Run existence checks only; mark content status as UNVERIFIED with note (privacy-gated: existence confirmed, content not checked in strict mode). Optionally offer local-only review via the ollama server.
  • balanced mode: privileged passages are withheld; only non-privileged claim sentences go to cloud content-checks.
  • cloud mode: proceed normally.

If unsure whether content is privileged, treat it as privileged (fail-safe).

Step 1: EXTRACT

Run legal-citations__extract_citations on the draft. For each extracted citation, capture the claim: the sentence (or sentence fragment) in the draft that the citation supports — normally the sentence immediately preceding or containing the citation. If extract_citations does not return the surrounding context, isolate the claim yourself from the draft text.

Step 2: CLASSIFY & RESOLVE

Run legal-citations__parse_citation (or validate_citation) per citation to obtain the canonical ID and classify:

ClassExamplesRoute
statuteArt. 97 Abs. 1 OR, art. 2 CC, Art. 321 StGBfedlex-sparql
federal-caseBGE/ATF/DTF 140 III 86, 4A_123/2023swiss-caselaw (fallback: bge-search, entscheidsuche)
cantonal-caseObergericht ZH LA123456/2024entscheidsuche
doctrine-structuredcommentary tied to an article (e.g. onlinekommentar on Art. 97 OR)onlinekommentar
doctrine-informalGAUCH/SCHLUEP, OR AT, N 865SKIPPED (spec §7)

Step 3: ROUTE & VERIFY

For each citation, with exactly one retry on timeout/transient MCP error before declaring UNVERIFIED:

statute → fedlex-sparql__get_article (or lookup_statute).

  • Not found → UNVERIFIED.
  • Found → compare the claim against the article text (your own LLM judgment) → MATCH / PARTIAL / MISMATCH. matched_snippet = the verbatim article passage used.

federal-case → swiss-caselaw__cite(reference, pinpoint?).

  • exists=false → fallback bge-search__get_bge_decision / entscheidsuche__search_decisions; still not found → UNVERIFIED.
  • Exists → swiss-caselaw__check_claim_support(claim, decision_id, pinpoint?):
    • yes → MATCH; partial → PARTIAL; no / contradicts / unrelated → MISMATCH.
  • Pinpoint present (E./consid. X.Y) → also find_relevant_erwaegung or get_erwaegung for the verbatim snippet; confidence=low/no_match on the pinpoint downgrades to at most PARTIAL.

cantonal-case → entscheidsuche__get_decision_details / search_decisions.

  • Not found → UNVERIFIED. Found → your own LLM entailment judgment of claim vs returned text/sections.

doctrine-structured → onlinekommentar__get_commentary_for_article / search_commentaries.

  • Not found → UNVERIFIED. Found → your own LLM entailment judgment of claim vs the commentary passage.

Step 4: STRUCTURED OUTPUT

Produce one record per citation:

json
{
  "citation_id": "BGE 140 III 86 E. 2.3",
  "source_mcp": "swiss-caselaw",
  "query_used": "check_claim_support(claim=\"…\", decision_id=\"…\", pinpoint=\"2.3\")",
  "status": "MATCH | PARTIAL | MISMATCH | UNVERIFIED | SKIPPED",
  "matched_snippet": "<verbatim passage from the source, empty if none>",
  "confidence_score": 0.0
}

confidence_score is 0–1. Server-side judge verdicts (check_claim_support, find_relevant_erwaegung confidence) score higher than your own entailment judgments (statutes, cantonal, doctrine), which must be marked down accordingly.

Step 5: AUDIT TRAIL

Write the full report to bcc-output/<YYYY-MM-DD-slug>/citation-verify.json and append every consulted source to sources.md (per skills/shared output conventions). The chat output shows only a 3–5 line summary plus the report path.

Step 6: DELIVERY GATE

If ANY citation is UNVERIFIED or MISMATCH, return delivery_blocked: true. The draft MUST NOT be delivered as-is. Offer exactly these options:

  1. Fix — remove or replace the citation (and re-run this stage on the revised draft).
  2. Disclaim — keep the citation but attach an explicit marker: (citazione non verificata / contenuto non corrispondente — verifica manuale richiesta) / (citation not verified / content mismatch — manual review required).
  3. Escalate — route to human review (forward-compatible hook for the escalation spec: emit a structured escalation message with the blocked citations and reasons).

PARTIAL and SKIPPED do not block but MUST be disclosed in the summary.

Step 7: REDUCED MODE (MCP unavailable)

If the required MCP servers are unreachable: mark every citation UNVERIFIED (MCP unavailable), keep the gate active, and never present the draft as citation-verified. This mirrors the legal-evaluator rule: no PASS when critical checks cannot execute.

Summary Output Format

## Citation Content Verification

- Citations checked: [N]
- MATCH: [n] | PARTIAL: [n] | MISMATCH: [n] | UNVERIFIED: [n] | SKIPPED: [n]
- Delivery: [CLEAR | BLOCKED]
- Report: bcc-output/<date-slug>/citation-verify.json

[If BLOCKED: list each blocking citation with status and reason, then the three options (fix / disclaim / escalate)]

Hard Rules

  • Never mark MATCH without a real tool retrieval behind it — a MATCH from memory is itself the failure mode this stage exists to catch.
  • One retry per citation on transient errors; no infinite retry loops.
  • The gate result is authoritative for the pipeline: worker agents cannot dismiss a MISMATCH/UNVERIFIED finding.
  • Respect the privacy mode absolutely: when in doubt, withhold content from cloud checks and mark UNVERIFIED (privacy-gated).
  • Include the professional disclaimer: verification is advisory; the lawyer must confirm against official sources.

Integration

  • Invoked by legal-evaluator (pre-score gate), /legal-loop (verdict step), the orchestrator (pre-delivery quality gate), the citation-specialist agent (Step 2.5), and /validate (substantive mode).
  • Receives: the draft text (and optionally the active privacy mode).
  • Returns: the structured per-citation report + delivery_blocked flag.
  • Never modifies the draft itself — modifications happen via the gate options chosen by the user or the pipeline.

Perguntas frequentes

O que a habilidade de IA Citation Content Verify faz?

Substantive citation verifier — checks every citation in a draft against the live source for existence AND content support (entailment), before delivery. Status per citation: MATCH / PARTIAL / MISMATCH / UNVERIFIED. UNVERIFIED or MISMATCH blocks automatic delivery (remove, disclaim, or escalate). Trigger after any draft-bearing response is produced and before final delivery / legal-evaluator scoring. Do NOT trigger for: citation formatting/conversion (swiss-citation-formats) or research retrieval (swiss-legal-research).

Por que usar Citation Content Verify no TypingMind?

Porque basta instalar uma vez para usar com qualquer modelo. A habilidade Citation Content Verify é escrita em Markdown simples, e não em código específico de um provedor, então a mesma habilidade funciona com GPT-5, Claude, Gemini, Grok ou um modelo local — e é possível trocar de modelo no meio do chat sem que ela deixe de funcionar. No TypingMind, você usa suas próprias chaves de API e paga diretamente aos provedores, em vez de pagar uma assinatura por licença de usuário. Suas habilidades e chats permanecem no seu próprio armazenamento.

Como instalar Citation Content Verify no TypingMind?

Abra Plugins → Habilidades → Instalar do GitHub no TypingMind e cole https://github.com/fedec65/bettercallclaude/tree/main/bettercallclaude/skills/citation-content-verify. O TypingMind lê o arquivo SKILL.md e instala a habilidade para que possa ser ativada em cada chat.

Quais modelos de IA podem usar Citation Content Verify?

Qualquer modelo conectado no TypingMind. As habilidades de IA são instruções em Markdown simples, e não código específico de um provedor. Assim, GPT, Claude, Gemini, Grok e modelos locais podem carregar esta habilidade quando uma solicitação corresponder a ela.

Quantos modelos de IA posso usar com Citation Content Verify?

Quantos quiser. Desde que o modelo ofereça suporte a habilidades, é possível usar Citation Content Verify com ele — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e outros — tudo no TypingMind com suas próprias chaves de API.

A habilidade de IA Citation Content Verify é gratuita?

Sim. A habilidade é publicada no GitHub por fedec65 sob a licença AGPL-3.0. O pagamento é feito apenas ao seu provedor de IA pelos tokens usados.

O que são habilidades de IA?

Uma habilidade de IA é um conjunto reutilizável de instruções que ensina um modelo de IA a realizar uma tarefa específica. Ela segue o formato aberto Agent Skills: um arquivo SKILL.md com nome e descrição, além de scripts, templates ou arquivos de referência de que o modelo possa precisar. O modelo lê as instruções apenas quando sua solicitação corresponde à habilidade, então uma habilidade instalada não gera custos até ser usada.

Qual é a diferença entre habilidades de IA e plugins ou servidores MCP?

Um plugin ou servidor MCP oferece ao modelo novas ferramentas que ele pode acionar — código que é executado em algum lugar e retorna um resultado. Já uma habilidade de IA dá ao modelo o conhecimento e as orientações de que ele precisa: como abordar uma tarefa, quais etapas seguir e como deve ser um bom resultado. As habilidades são escritas em Markdown simples, por isso não precisam de servidor, chave de API nem ambiente de execução, e funcionam com qualquer modelo.

Ver lista completa

Crie seu próprio espaço de trabalho com IA agora

Inscreva-se na nossa newsletter para receber avisos sobre novos recursos e futuros sorteios 👇