شعار Phpunit Test Adversarial Reviewing

Phpunit Test Adversarial Reviewing

مؤسسة
shopwareLabs
phpunit-test-adversarial-reviewing

Internal sub-skill. Do not auto-activate. Use only when explicitly invoked by name by another skill or agent.

نظرة عامة

الناشرshopwareLabs
المستودعai-coding-tools
اسم المهارةphpunit-test-adversarial-reviewing
النجوم
45
التفريعات
7
الملفات المرفقة
3
الترخيصMIT
الروابط
  • تعليمات بصيغة Markdown

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

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

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

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

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

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

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

التثبيت

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

1

التثبيت في TypingMind

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

  1. افتح التطبيق وانتقل إلى «الإضافات» ثم «المهارات».
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/shopwareLabs/ai-coding-tools/tree/main/plugins/test-writing/skills/phpunit-test-adversarial-reviewing
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات ← المهارات ← إضافة مهارة ← من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

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

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

Claude Code — .claude/skills
git clone --depth 1 https://github.com/shopwareLabs/ai-coding-tools.git /tmp/ai-coding-tools
mkdir -p .claude/skills
cp -r /tmp/ai-coding-tools/plugins/test-writing/skills/phpunit-test-adversarial-reviewing .claude/skills/phpunit-test-adversarial-reviewing
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

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

يُحمّل النموذج مهارة Phpunit Test Adversarial Reviewing تلقائيًا بمجرد ورود طلب ذي صلة بها.

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

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

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

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

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

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

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

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

PHPUnit Adversarial Test Review

Stress-test reviewer consensus for any test type (unit, integration, or migration): form independent judgment before exposure to findings, then challenge weak consensus, resurrect premature withdrawals, and discover missed violations.

Input

  • {consensus} (required) — the consensus package: consensus_findings, withdrawn_findings, and the reconciliation record per file, provided in full in your prompt.
  • {impressions} (optional) — impressions pre-formed in an earlier wave. When set, Phase 1 is already done and is skipped.
  • {rules} (optional) — the pre-rendered rule catalog as text, provided in your prompt. When set, Phase 4 selects rules from it instead of calling get_rules.

Workflow

dot
digraph adversarial_review {
  "Adversarial review request" [shape=doublecircle];
  "impressions supplied?" [shape=diamond];
  "Phase 1: read each test file and its source class with no rules framework, apply every heuristic lens from references/intuitive-scan-guidance.md, record concerns with a severity estimate" [shape=box];
  "test file and source class readable?" [shape=diamond];
  "STOP: report the failure with the file path and the error; form no impressions, fabricate no files entry" [shape=octagon, style=filled, fillcolor=red];
  "Phase 2: parse the consensus package, validate it carries consensus_findings, withdrawn_findings and a reconciliation record per file" [shape=box];
  "Phase 3: contrast impressions against consensus per references/comparison-strategies.md - intuition-consensus gaps, weak consensus findings, premature withdrawals, unstated premises - into a prioritized candidate list" [shape=box];
  "rules set?" [shape=diamond];
  "Select the candidate's rules from the inline catalog by rule area; open no rule file" [shape=box];
  "Call get_rules for the file's test_type, adding test_category only for unit tests" [shape=box];
  "get_rules available?" [shape=diamond];
  "STOP: report that the test-rules MCP server is unavailable; no candidate can be promoted without evidence, so emit a files entry with endorsements only and no promoted items, noting the limitation to the caller" [shape=octagon, style=filled, fillcolor=red];
  "Phase 4: apply each detection algorithm against the actual code" [shape=box];
  "does a detection algorithm substantiate the candidate?" [shape=diamond];
  "Drop the candidate - intuition proposes, evidence disposes" [shape=box];
  "Promote to a formal challenge, resurrection or new finding; endorse each consensus finding that Phase 1 independently confirmed and a detection algorithm supports" [shape=box];
  "more than one file assigned?" [shape=diamond];
  "Phase 5: compare rule treatment and shared patterns across the assigned files; promote a cross-file inconsistency only through the same evidence gate" [shape=box];
  "Phase 6: group promoted items by file path, add endorsements and cross-file inconsistencies" [shape=box];
  "Emit the challenges report per references/output-format.md" [shape=doublecircle];

  "Adversarial review request" -> "impressions supplied?";
  "impressions supplied?" -> "Phase 2: parse the consensus package, validate it carries consensus_findings, withdrawn_findings and a reconciliation record per file" [label="yes - Phase 1 already done"];
  "impressions supplied?" -> "Phase 1: read each test file and its source class with no rules framework, apply every heuristic lens from references/intuitive-scan-guidance.md, record concerns with a severity estimate" [label="no"];
  "Phase 1: read each test file and its source class with no rules framework, apply every heuristic lens from references/intuitive-scan-guidance.md, record concerns with a severity estimate" -> "test file and source class readable?";
  "test file and source class readable?" -> "STOP: report the failure with the file path and the error; form no impressions, fabricate no files entry" [label="no"];
  "test file and source class readable?" -> "Phase 2: parse the consensus package, validate it carries consensus_findings, withdrawn_findings and a reconciliation record per file" [label="yes"];
  "Phase 2: parse the consensus package, validate it carries consensus_findings, withdrawn_findings and a reconciliation record per file" -> "Phase 3: contrast impressions against consensus per references/comparison-strategies.md - intuition-consensus gaps, weak consensus findings, premature withdrawals, unstated premises - into a prioritized candidate list";
  "Phase 3: contrast impressions against consensus per references/comparison-strategies.md - intuition-consensus gaps, weak consensus findings, premature withdrawals, unstated premises - into a prioritized candidate list" -> "rules set?";
  "rules set?" -> "Select the candidate's rules from the inline catalog by rule area; open no rule file" [label="yes"];
  "rules set?" -> "Call get_rules for the file's test_type, adding test_category only for unit tests" [label="no"];
  "Call get_rules for the file's test_type, adding test_category only for unit tests" -> "get_rules available?";
  "get_rules available?" -> "STOP: report that the test-rules MCP server is unavailable; no candidate can be promoted without evidence, so emit a files entry with endorsements only and no promoted items, noting the limitation to the caller" [label="no"];
  "get_rules available?" -> "Phase 4: apply each detection algorithm against the actual code" [label="yes"];
  "Select the candidate's rules from the inline catalog by rule area; open no rule file" -> "Phase 4: apply each detection algorithm against the actual code";
  "Phase 4: apply each detection algorithm against the actual code" -> "does a detection algorithm substantiate the candidate?";
  "does a detection algorithm substantiate the candidate?" -> "Drop the candidate - intuition proposes, evidence disposes" [label="no"];
  "does a detection algorithm substantiate the candidate?" -> "Promote to a formal challenge, resurrection or new finding; endorse each consensus finding that Phase 1 independently confirmed and a detection algorithm supports" [label="yes"];
  "Drop the candidate - intuition proposes, evidence disposes" -> "more than one file assigned?";
  "Promote to a formal challenge, resurrection or new finding; endorse each consensus finding that Phase 1 independently confirmed and a detection algorithm supports" -> "more than one file assigned?";
  "more than one file assigned?" -> "Phase 5: compare rule treatment and shared patterns across the assigned files; promote a cross-file inconsistency only through the same evidence gate" [label="yes"];
  "more than one file assigned?" -> "Phase 6: group promoted items by file path, add endorsements and cross-file inconsistencies" [label="no"];
  "Phase 5: compare rule treatment and shared patterns across the assigned files; promote a cross-file inconsistency only through the same evidence gate" -> "Phase 6: group promoted items by file path, add endorsements and cross-file inconsistencies";
  "Phase 6: group promoted items by file path, add endorsements and cross-file inconsistencies" -> "Emit the challenges report per references/output-format.md";
}

Phase 1: Independent Intuitive Scan

Read each assigned test file and its source class (from #[CoversClass]). Do NOT use MCP rule tools (get_rules) in this phase.

Load references/intuitive-scan-guidance.md for heuristic lenses, then for each file:

  1. Read the test file completely
  2. Read the source class under test (from #[CoversClass])
  3. Apply each heuristic lens from the guidance
  4. Record concerns as free-form observations with severity estimate

Output per file:

yaml
impressions:
  - file_path: tests/unit/Path/To/ClassTest.php
    concerns:
      - area: "brief description of concern"
        severity: high | medium | low

Phase 2: Receive Consensus Package

Validate the package carries consensus_findings, withdrawn_findings, and reconciliation_record per file. This is the first exposure to reviewer reasoning — note your initial reactions before proceeding.

Phase 3: Structured Comparison

Load references/comparison-strategies.md. Per file, contrast impressions against consensus:

  1. Intuition-consensus gaps — Phase 1 concerns that no reviewer raised. These are the highest-value candidates for new findings. For each unmatched concern, note which area of the code it targets.

  2. Weak consensus findings — for each consensus finding, apply the "would this survive harder pushback?" test:

    • MAJORITY findings with thin reasoning in the reconciliation record
    • Findings where the reconciliation record shows quick concession without evidence
    • Findings that don't match your Phase 1 impressions at all
  3. Premature withdrawals — for each withdrawn finding, check:

    • Does the concession reason cite a specific detection algorithm? If not, flag it.
    • Did your Phase 1 scan independently flag the same area? If yes, strong resurrection candidate.
    • Did only one reviewer push back while others followed? Bandwagon pattern.
  4. Assumption excavation — for each consensus finding, state the unstated premise:

    • What must be true for this finding to be valid?
    • What breaks if that premise is wrong?

Output: prioritized list of candidate challenges, resurrections, and new findings — not yet evidence-backed.

Phase 4: Evidence Gathering

Per candidate, highest priority first:

  1. Load applicable rules and detection algorithms: when {rules} is set, the inline text is the full rule catalog for this file's test type — select the rules relevant to the candidate finding and your lens axis. For unit tests, select those whose Categories include the detected A–E category; integration and migration rules carry Categories: all, so select by rule area, not category. The text holds every rule, so NEVER read, open, search, or locate a rule file by any means (no Read/Grep/Glob, no get_rules); reading the test/source code is unaffected. Otherwise call mcp__plugin_test-writing_test-rules__get_rules(test_type={the file's test type}), adding test_category={category} only for unit tests.
  2. Apply the detection algorithm against the actual code

Promotion gate: promote a candidate to a formal challenge ONLY if a detection algorithm substantiates it. Drop candidates where the evidence doesn't hold up. This is the filter against contrarianism — intuition proposes, evidence disposes.

Endorsement: consensus findings that Phase 1 intuition independently confirmed AND that have strong detection algorithm support get endorsed. Endorsements are part of the output — they strengthen findings in the final report.

Phase 5: Cross-File Inconsistency Scan

Compare patterns across all assigned files:

  1. For each rule_id that appears in any file's consensus, check if the same pattern exists in other files:

    • File A's consensus accepted a pattern that file B's consensus flagged -> high-value challenge
    • All files share the same weakness but none flagged it -> systemic finding
  2. Compare treatment of similar code patterns:

    • setUp() strategies across files
    • Mocking approaches (createMock vs createStub)
    • Assertion styles
    • Data provider usage

Cross-file inconsistencies use the same promotion gate as Phase 4 — cite the detection algorithm.

Phase 6: Generate Challenges Report

Load references/output-format.md. Assemble the structured output: promoted challenges grouped by file path, every endorsement, and the Phase 5 cross-file inconsistencies.

The report carries no top-level status or failure-reason field — NO_CHALLENGES is simply a files entry with no challenges_to_consensus, resurrections, or cross_file_inconsistencies (endorsements only, or none). Failure to form impressions in Phase 1 is handled per Troubleshooting below, not by a status field here.

Output Contract

yaml
adversary: reviewer-2
files:
  - path: tests/unit/Path/To/ClassTest.php
    challenges_to_consensus:
      - finding_id: "CONV-004|testFoo"
        rule_id: CONV-004
        consensus_was: UNANIMOUS | MAJORITY
        challenge: "Detection algorithm requires X but..."
        verdict_sought: overturn | weaken
    resurrections:
      - finding_id: "DESIGN-005|testBar"
        rule_id: DESIGN-005
        withdrawn_reason: "Conceded without evidence"
        resurrection_argument: "The concession was premature because..."
        code_evidence: "ClassTest.php:72 — ..."
    new_findings:
      - rule_id: ISOLATION-002
        enforce: must-fix
        location: ClassTest.php:88
        method: testBaz
        summary: "Description"
        current: |
          # code
        suggested: |
          # fix
        implies_src_change: false    # true ONLY when the fix cannot be made in the test alone
        deleted_methods: []          # bare names of test methods this fix deletes outright
        removed_assertions: []       # [{assertion, covered_by_test}] per assertion this fix drops
    endorsements:
      - rule_id: UNIT-003
        reason: "Strong finding, correctly applied"
    cross_file_inconsistencies:
      - rule_id: CONV-004
        this_file_status: accepted
        other_file: tests/unit/Other/ClassTest.php
        other_file_status: flagged
        inconsistency: "Same pattern, divergent treatment"

finding_id on a challenge or resurrection is quoted verbatim from the consensus/withdrawn finding under scrutiny — never invented or altered. new_findings carries no detection_algorithm_citation field; cite the detection algorithm in summary instead.

Every new_findings entry carries implies_src_change, deleted_methods and removed_assertions — always, including when nothing applies (false, [], []). Set implies_src_change: true when the fix cannot be made in the test alone and requires a change under src/. Emit these fields whether or not a consensus package instructed you to: omitting them under-counts the source-change escalation and hides deletions from the after-state guard.

Troubleshooting

No Impressions Formed in Phase 1

If the test file or source class cannot be read:

  • Stop and report the failure with the file path and error — do not proceed to comparison phases without impressions, and do not fabricate a files entry to fit the schema

MCP Tool Unavailability

If mcp__plugin_test-writing_test-rules__get_rules is unavailable:

  • Report error: "test-rules MCP server not available — ensure the test-writing plugin is installed and Claude Code was restarted"
  • Candidates from Phase 3 cannot be promoted without evidence — emit a files entry with no challenges, resurrections, or new_findings (endorsements only, if any), noting the limitation in the report handed back to the caller

All Candidates Fail Promotion Gate

If Phase 4 drops all candidates (none substantiated by detection algorithms):

  • This is a valid outcome — emit a files entry with no challenges, resurrections, or new_findings
  • Include endorsements for strong consensus findings
  • The adversary adds value by confirming the consensus is robust

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

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

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

ماذا تفعل مهارة الذكاء الاصطناعي Phpunit Test Adversarial Reviewing؟

Internal sub-skill. Do not auto-activate. Use only when explicitly invoked by name by another skill or agent.

لماذا تستخدم Phpunit Test Adversarial Reviewing على TypingMind؟

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

كيف أثبّت Phpunit Test Adversarial Reviewing في TypingMind؟

في TypingMind، افتح «الإضافات»، ثم «المهارات»، ثم اختر «التثبيت من GitHub» والصق https://github.com/shopwareLabs/ai-coding-tools/tree/main/plugins/test-writing/skills/phpunit-test-adversarial-reviewing. يقرأ TypingMind ملف SKILL.md الخاص بالمهارة، ويجمع ملفاتها ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Phpunit Test Adversarial Reviewing؟

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

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Phpunit Test Adversarial Reviewing؟

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

هل مهارة الذكاء الاصطناعي Phpunit Test Adversarial Reviewing مجانية؟

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

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

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

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

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

عرض الكل

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

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