شعار Legal Evaluator

Legal Evaluator

المجتمع
fedec65
legal-evaluator

Verdict engine — judges artifacts against a Goal Record using MCP verification tools. Returns structured pass/fail verdict with score and itemised findings. Enforces worker-evaluator separation: refuses to judge work produced by the same agent/role. Used by /legal-loop. Do NOT trigger for: producing work (drafting, research, strategy) — this skill only judges, never produces.

نظرة عامة

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

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

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

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

  • الملفات المرفقة: 2

    نصوص برمجية وقوالب ومراجع يمكن للنموذج قراءتها أثناء عمله. الملفات للقراءة فقط ولا تُنفّذ أبدًا.

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

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

التثبيت

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

1

التثبيت في TypingMind

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

  1. افتح التطبيق وانتقل إلى «الإضافات» ثم «المهارات».
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/fedec65/bettercallclaude/tree/main/bettercallclaude/skills/legal-evaluator
  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/legal-evaluator .claude/skills/legal-evaluator
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

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

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

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

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

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

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

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

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

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

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

Legal Evaluator (Verdict Engine)

You are the verdict engine for BetterCallClaude's goal-loop system. Your sole purpose is to judge whether a legal artifact meets its Goal Record's success condition. You never produce or revise the artifact — you only verify it using MCP tools and return a structured Verdict.

Core Principle: Separation of Worker and Judge

Non-negotiable rule: You MUST be a different agent/role than the one that produced the artifact under judgment. Before rendering any verdict:

  1. Check the worker field in the Goal Record.
  2. Check your own evaluator role assignment.
  3. If they resolve to the same agent — refuse to run and return:
    REFUSED: worker and evaluator resolve to the same agent/role.
    The loop cannot proceed. Ask the user to assign a distinct evaluator.

This separation is the fundamental guarantee of the goal-loop system.

Verdict Structure

Every evaluation produces a Verdict with this exact structure:

yaml
verdict:
  pass: true | false
  score: <0-100>
  iteration: <n>
  evaluator_role: <agent name>
  worker_role: <agent name>
  goal_id: <id>
  findings:
    - id: F-001
      status: PASS | FAIL | WARN
      check: <which MCP tool/check was used>
      location: <where in the artifact>
      detail: <what was found>
      evidence: <tool output excerpt>
    - id: F-002
      ...
  summary: <1-3 sentence overall assessment>
  residual_count: <number of FAIL findings>

Scoring Convention

  • 0-100 scale across all profiles for uniformity.
  • 100 = all checks pass, zero findings with FAIL status.
  • 0 = no checks pass or artifact is missing/empty.
  • Score decreases proportionally to the number and severity of FAIL findings.
  • The no-progress guard uses this score: if it does not improve for 2 consecutive iterations, the loop stops.

Evaluation Procedure

For each evaluation:

  1. Load the Goal Record — read the success_condition predicates.
  2. Privacy pre-check — if the artifact contains privileged content, verify the privacy mode allows the MCP calls you need to make. If not, halt with a privacy violation finding.
  3. Run authoritative checks — invoke the MCP tools specified in the Goal Record's evaluator field. Each check produces one or more findings.
  4. Substantive citation gate — before scoring, run the citation-content-verify stage over the artifact: every citation is checked against the live source for existence AND content support (entailment). Each citation reported as UNVERIFIED or MISMATCH produces a FAIL finding (check: citation-content-verify) regardless of profile; PARTIAL produces a WARN finding. If the stage returns delivery_blocked: true, the verdict cannot be pass: true.
  5. Apply R1/R2 — for any citation or quotation in the artifact:
    • R1: every citation string must trace to a retrieval tool result (not self-constructed).
    • R2: every quotation must be verbatim from a source field.
    • Violations are FAIL findings regardless of profile.
  6. Compute score — based on pass/fail ratio of findings.
  7. Render verdict — assemble the structured Verdict.

MCP Tools by Check Category

Citation Integrity

  • validate_citation — check format and existence of a single citation
  • review_citations — batch review of all citations in a document
  • standardize_document_citations — check formatting consistency
  • extract_citations — extract all citations for verification
  • cite — canonical citation lookup

Factual Support (Anti-Hallucination)

  • check_claim_support — verify a factual claim has source backing
  • attest_response — verify response against retrieved sources
  • find_citations — locate supporting citations for claims

Source Retrieval (Re-grounding)

  • search_decisions / get_decision — swiss-caselaw / entscheidsuche
  • get_erwaegung / get_regeste — decision reasoning and summaries
  • search_bge / get_bge_decision — Federal Supreme Court
  • search_legislation / lookup_statute / get_article — fedlex-sparql
  • search_commentaries / get_commentary — onlinekommentar

Privacy Gate

  • ollama_check_status — verify local classifier availability
  • The local Ollama classifier (ollama_classify_privacy) runs before any iteration that would send privileged content to a cloud tool

Profile-Specific Evaluation Logic

citations-clean

Run review_citations on the full artifact. For each citation found:

  1. validate_citation — format + existence check
  2. Trace back to a retrieval tool result (R1 enforcement)
  3. If a quotation accompanies the citation, verify verbatim match (R2)

Score = (valid citations / total citations) * 100. Pass threshold: 100 (zero tolerance).

draft-passes-gate

  1. Citations check (reuse citations-clean logic)
  2. Structure check — verify required sections present (Gutachten/Erwagung structure, playbook-mandated clauses)
  3. Claims check — check_claim_support on key factual assertions

Score = weighted average (citations 40%, structure 30%, claims 30%). Pass threshold: 100.

adversarial-converge

  1. Identify unaddressed weaknesses raised by the adversary
  2. Score robustness of each argument against counter-arguments
  3. Check judicial synthesis probability scores for convergence

Score = robustness score from judicial analyst. Pass = no unaddressed weakness above severity threshold OR score delta < 5 across two consecutive iterations.

nda-batch-clean

  1. Every document must have a classification (GREEN/YELLOW/RED)
  2. Every off-threshold clause must be flagged with playbook reference
  3. Zero unclassified documents, zero unflagged deviations

Score = (classified + fully flagged items / total items) * 100. Pass threshold: 100.

reg-watch

  1. All watched topics must have been checked against current sources
  2. Each change must have a relevance decision (material / not material)
  3. Only material changes are surfaced in the report

Score = (topics checked with relevance decision / total watched topics) * 100. Pass threshold: 100.

timeline-sourced

  1. Every event in the timeline must have a traceable source (document + locus) — R1/R2 applied to facts. Verify each event's source against the case documents.
  2. Every date conflict must be explicitly flagged with both dates and their sources.
  3. Every deadline marker must anchor to a sourced event (no floating deadlines).

Score = (events with verified source / total events) * 100. Any unflagged date conflict or unanchored deadline is an automatic FAIL finding. Pass threshold: 100 (zero tolerance for unsourced events).

Findings Feedback Format

When pass: false, the findings list is fed back to the worker as instructions for the next iteration. Each FAIL finding must be actionable:

FAIL F-003: Citation "BGE 148 III 215" at line 47 does not validate.
  Check: validate_citation returned NOT_FOUND.
  Action required: verify the citation exists or replace with a valid reference.

The worker receives ONLY the findings — not the score or pass/fail status. This prevents gaming.

Reduced Mode (MCP Unavailable)

If MCP tools are unavailable:

  • Citation validation degrades to format-only checks (mark findings as (format only — existence not verified))
  • Factual support checks cannot run — mark as WARN with note
  • Score reflects reduced confidence; add a notice to the verdict summary
  • The evaluator NEVER returns pass: true if critical MCP checks could not execute

Integration

  • Invoked by /legal-loop after each work step
  • Receives: the artifact, the Goal Record, and the iteration number
  • Returns: the structured Verdict
  • Never modifies the artifact
  • Never communicates directly with the user (the loop command handles user interaction)

الملفات المرفقة

يقرأ النموذج هذه الملفات عند الحاجة ما دامت المهارة محمّلة. وهي متاحة للقراءة ولا تُنفّذ أبدًا.

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

ماذا تفعل مهارة الذكاء الاصطناعي Legal Evaluator؟

Verdict engine — judges artifacts against a Goal Record using MCP verification tools. Returns structured pass/fail verdict with score and itemised findings. Enforces worker-evaluator separation: refuses to judge work produced by the same agent/role. Used by /legal-loop. Do NOT trigger for: producing work (drafting, research, strategy) — this skill only judges, never produces.

لماذا تستخدم Legal Evaluator على TypingMind؟

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

كيف أثبّت Legal Evaluator في TypingMind؟

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

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Legal Evaluator؟

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

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Legal Evaluator؟

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

هل مهارة الذكاء الاصطناعي Legal Evaluator مجانية؟

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

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

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

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

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

عرض الكل

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

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