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ファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 1個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    hegemonartがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Quality Gate」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/hegemonart/get-design-done/tree/main/scripts/skill-templates/quality-gate
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

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で使用

TypingMindのチャットでQuality Gateを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にQuality Gateを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Quality Gateは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じ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.

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「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.

TypingMindでQuality Gateを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Quality Gateはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにQuality Gateをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/hegemonart/get-design-done/tree/main/scripts/skill-templates/quality-gateを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Quality Gateを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Quality Gateで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもQuality Gateを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Quality Gate」は無料ですか?

はい。hegemonartがMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇