شعار Citation Content Verify

Citation Content Verify

المجتمع
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).

نظرة عامة

الناشرfedec65
المستودعbettercallclaude
اسم المهارةcitation-content-verify
النجوم
46
التفريعات
10
الملفات المرفقة
تعليمات فقط
الترخيصAGPL-3.0
الروابط
  • تعليمات بصيغة Markdown

    ملف SKILL.md يُحمّله النموذج عند الحاجة، فلا يستهلك توكنات إلا عندما يَرِد طلب ذو صلة فعلًا.

  • تعمل مع أي نموذج لغوي كبير

    مهارات الذكاء الاصطناعي مكتوبة بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا تعمل مع GPT أو Claude أو Gemini أو Grok أو نموذج محلي.

  • مكتفية بذاتها

    كل ما يحتاجه النموذج موجود في التعليمات — لا ملفات إضافية لمزامنتها.

  • مفتوحة المصدر

    نشرها fedec65 على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي Citation Content Verify في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ SKILL.md.

1

التثبيت في TypingMind

يُثبّت TypingMind المهارة مباشرةً من مجلدها على GitHub — فيقرأ SKILL.md، ويجمع ملفات الموارد في حزمة، ويحفظ النتيجة محليًا.

  1. افتح التطبيق وانتقل إلى «الإضافات» ثم «المهارات».
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/fedec65/bettercallclaude/tree/main/bettercallclaude/skills/citation-content-verify
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات ← المهارات ← إضافة مهارة ← من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

التثبيت في وكيل ذكاء اصطناعي آخر

يمكن لأي وكيل ذكاء اصطناعي يقرأ تنسيق Agent Skills استخدام هذه المهارة — انسخ المجلد إلى مجلد المهارات الخاص بذلك الوكيل.

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
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

فعّل Citation Content Verify في أي محادثة على TypingMind وسيتولى النموذج الباقي. تتضمن مطالبة النظام اسمها ووصفها، وبمجرد ورود طلب ذي صلة، يُحمّل النموذج التعليمات الكاملة تلقائيًا — فلا تحتاج إلى استدعائها يدويًا، ولا تستهلك أي توكنات حتى تُستخدم فعليًا.

يُحمّل النموذج مهارة Citation Content Verify تلقائيًا بمجرد ورود طلب ذي صلة بها.

تعمل مع أي نموذج ذكاء اصطناعي

مهارات الذكاء الاصطناعي هي تعليمات بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا لا ترتبط Citation Content Verify بالنموذج الذي كُتبت له. ثبّتها مرة واحدة في TypingMind واستخدمها مع GPT-5 أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو نموذج محلي تشغّله بنفسك — كل ذلك باستخدام مفاتيح API الخاصة بك.

  • تُحمَّل عند الحاجة فقط

    تتضمن مطالبة النظام الاسم والوصف فقط. وتُجلب التعليمات عند أول طلب ذي صلة، لذا لا تستهلك تعليمات المهارة أي توكنات ما دامت المهارة غير مستخدمة.

  • بدّل النماذج أثناء المحادثة

    لأن المهارة تعليمات وليست شيفرة، فإن تغيير النموذج لا يعطّلها — فالنموذج التالي يقرأ ملف SKILL.md نفسه.

تعليمات المهارة

هذا هو محتوى SKILL.md الذي يُحمّله النموذج. اقرأه قبل التثبيت — فالمهارة عبارة عن تعليمات سيتبعها نموذجك.

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.

الأسئلة الشائعة

ماذا تفعل مهارة الذكاء الاصطناعي 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).

لماذا تستخدم Citation Content Verify على TypingMind؟

لأنك تثبّتها مرة واحدة وتستخدمها مع أي نموذج. مهارة Citation Content Verify عبارة عن نص Markdown وليست شيفرة خاصة بمزود بعينه، لذا تعمل المهارة نفسها مع GPT-5 أو Claude أو Gemini أو Grok أو نموذج محلي، ويمكنك تبديل النموذج أثناء المحادثة دون تعطّل المهارة. يعمل TypingMind بمفاتيح API الخاصة بك، فتدفع للمزودين مباشرةً بدلًا من اشتراك لكل مقعد، وتبقى مهاراتك ومحادثاتك في مساحة التخزين الخاصة بك.

كيف أثبّت Citation Content Verify في TypingMind؟

في TypingMind، افتح «الإضافات»، ثم «المهارات»، ثم اختر «التثبيت من GitHub» والصق https://github.com/fedec65/bettercallclaude/tree/main/bettercallclaude/skills/citation-content-verify. يقرأ TypingMind ملف SKILL.md الخاص بالمهارة ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Citation Content Verify؟

أي نموذج تربطه في TypingMind. مهارات الذكاء الاصطناعي عبارة عن تعليمات Markdown وليست شيفرة خاصة بمزود بعينه، لذا يمكن لكل من GPT وClaude وGemini وGrok والنماذج المحلية تحميل هذه المهارة عندما يتوافق الطلب معها.

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Citation Content Verify؟

أي عدد تريده. ما دام النموذج يدعم المهارات، يمكنك استخدام Citation Content Verify معه، سواء كان GPT أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو غيرها، وكل ذلك على TypingMind باستخدام مفاتيح API الخاصة بك.

هل مهارة الذكاء الاصطناعي Citation Content Verify مجانية؟

نعم. نشرها fedec65 على GitHub بموجب ترخيص AGPL-3.0. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا الإخبارية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇