شعار Quality Gate

Quality Gate

المجتمع
hegemonart
quality-gate

Stage 4.5 of the pipeline. Detects, runs, and classifies project quality commands (lint / typecheck / test / visual-regression) between {{command_prefix}}design and {{command_prefix}}verify; writes the most recent run to STATE.md <quality_gate>. Non-blocking on timeout (warn + proceed); failures spawn design-fixer until the loop converges or max_iters is reached.

نظرة عامة

الناشرhegemonart
المستودعget-design-done
اسم المهارةquality-gate
النجوم
3
التفريعات
1
الملفات المرفقة
1
الترخيصMIT
الروابط
  • تعليمات بصيغة Markdown

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

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

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

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

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

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

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

التثبيت

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

1

التثبيت في TypingMind

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

  1. افتح التطبيق وانتقل إلى «الإضافات» ثم «المهارات».
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/hegemonart/get-design-done/tree/main/scripts/skill-templates/quality-gate
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات ← المهارات ← إضافة مهارة ← من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

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

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

Claude Code — .claude/skills
git clone --depth 1 https://github.com/hegemonart/get-design-done.git /tmp/get-design-done
mkdir -p .claude/skills
cp -r /tmp/get-design-done/scripts/skill-templates/quality-gate .claude/skills/quality-gate
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

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

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

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

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

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

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

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

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

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

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

@reference/shared-preamble.md

quality-gate

Role

You are the Stage 4.5 gate that runs between {{command_prefix}}design and {{command_prefix}}verify. You answer one question: does this project's own quality tooling pass against the current working tree? You are NOT a design checker, an a11y checker, or a verifier - you are a thin façade over the project's lint / typecheck / test / visual-regression scripts. Verify refuses entry when those scripts fail.

You write exactly two artifacts: the <quality_gate> block in .design/STATE.md, and lifecycle events to .design/events.jsonl. You never block on timeout. You never block on a "skipped" result. You only mark status="fail" when the fix loop reaches max_iters - even then YOU exit successfully (verify is the consumer that refuses entry).

Configuration

Read once at start from .design/config.json (all optional; defaults in parens):

KeyDefaultPurpose
quality_gate.commandsnullAuthoritative command list. When provided, skips auto-detection.
quality_gate.timeout_seconds600Total wall-clock budget for Step 2. On timeout: warn + proceed (D-07).
quality_gate.max_iters3Hard cap on Step 4 fix-loop iterations.

Step 1 - Detection chain (D-06 3-tier fallback)

Stop at the first tier that produces ≥ 1 command:

  1. Authoritative config. If .design/config.json has quality_gate.commands non-empty, use verbatim.
  2. Auto-detect from package.json#scripts - match against allowlist: lint, typecheck, tsc (only if typecheck absent), test, chromatic, test:visual, lint:design (Phase 41 - the gdd-detect deterministic anti-pattern gate), and the accessibility scripts axe, pa11y, lighthouse, eslint-plugin-jsx-a11y (or a script named jsx-a11y) which classify into the a11y bucket. Exclude by name: test:e2e, test:integration (if separate test), anything starting dev:, build:, start:. Run via npm run <name> unless quality_gate.package_manager overrides.
  3. Skip with notice. Emit quality_gate_skipped (Step 6) and write a <run/> with status="skipped". Verify treats skipped as non-blocking.

Step 2 - Parallel run

Emit quality_gate_started. Spawn each command in a separate Bash; collect {command, exit_code, stdout, stderr}. Wall-clock budget is timeout_seconds (default 600). On timeout: emit quality_gate_timeout, mark status="timeout", skip Steps 3–4, proceed to Step 5. Exit successfully - verify treats timeout as a warn.

Step 3 - Classification

Spawn quality-gate-runner agent via Task with payload {outputs: [{command, exit_code, stderr}, ...]}. Agent returns {status: "pass"|"fail", classified_failures: {lint, type, test, visual, a11y}}. The a11y bucket groups accessibility failures from axe / pa11y / lighthouse / jsx-a11y. pass → Step 5. fail → Step 4.

Step 4 - Fix loop (D-08)

If iteration >= max_iters: emit quality_gate_fail, mark status="fail", Step 5, exit successfully. Verify-entry refuses on fail; YOU do not throw.

Else: increment iteration, emit quality_gate_iteration, spawn design-fixer via Task with classified failures + original outputs. After fixer returns, restart from Step 2 (re-run all commands - fixes can introduce regressions).

Step 5 - STATE write

Mutate state.quality_gate.run to {started_at, completed_at, status, iteration, commands_run, extra_attrs:{}}. Persist via mcp__gdd_state__set_quality_gate or apply() mutator from sdk/state/mutator.ts - identical on-disk shape.

Step 6 - Event emission (D-09)

Use appendEvent from sdk/event-stream/index.ts - persist-first / broadcast-second; never throws on persist path. ts / cycle / stage are stamped by the writer. Six event types (one per lifecycle position):

EventWhenPayload
quality_gate_startedStep 2 entry, oncecommands, timeout_seconds, max_iters
quality_gate_iterationStep 4 retry (iter ≥ 2)iteration
quality_gate_passStep 3 returned pass - terminaliteration, commands_run
quality_gate_failStep 4 hit max_iters - terminaliteration, classified_failures
quality_gate_timeoutStep 2 budget elapsed - terminal warnunfinished_commands
quality_gate_skippedStep 1 tier 3 - terminal no-opreason

appendEvent swallows persist failures - events are observability, not correctness. STATE.md (Step 5) is the durable record.

Output

Emit one JSON object on stdout: {status, iteration, commands_run, started_at, completed_at}. Shell exit code 0 on every terminal status - fail included. Verify-entry is the sole consumer that acts on fail.

Constraints

  • Do not prune the command list across iterations - re-run everything in Step 2.
  • Do not spawn quality-gate-runner more than once per iteration.
  • Do not read/write any STATE block other than <quality_gate> (and <position>.last_checkpoint).
  • Do not invoke verify or design - Stage 4.5 sits strictly between.
  • Exit-code convention: 0 clean; non-zero classified as failure. Do not interpret stderr for pass/fail.

For verify-side severity classification (when this gate's status="fail" reaches the verify entry gate), see ./threat-modeling.md - STRIDE dispositions are the audit-side framework that informs whether a failed quality gate blocks ship.

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

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

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

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

Stage 4.5 of the pipeline. Detects, runs, and classifies project quality commands (lint / typecheck / test / visual-regression) between {{command_prefix}}design and {{command_prefix}}verify; writes the most recent run to STATE.md <quality_gate>. Non-blocking on timeout (warn + proceed); failures spawn design-fixer until the loop converges or max_iters is reached.

لماذا تستخدم Quality Gate على TypingMind؟

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

كيف أثبّت Quality Gate في TypingMind؟

في TypingMind، افتح «الإضافات»، ثم «المهارات»، ثم اختر «التثبيت من GitHub» والصق https://github.com/hegemonart/get-design-done/tree/main/scripts/skill-templates/quality-gate. يقرأ TypingMind ملف SKILL.md الخاص بالمهارة، ويجمع ملفاتها ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

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

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

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

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

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

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

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

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

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

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

عرض الكل

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

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