Quality Gate logo

Quality Gate

Community
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.

Overview

Publisherhegemonart
Repositoryget-design-done
Skill namequality-gate
Stars
3
Forks
1
Bundled files
1
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by hegemonart on GitHub. Read the source before you install it.

Installation

Install the Quality Gate AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/hegemonart/get-design-done/tree/main/scripts/skill-templates/quality-gate
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

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
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Quality Gate in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Quality Gate on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Quality Gate is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

@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.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Quality Gate AI skill do?

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.

Why use Quality Gate on TypingMind?

Because you install it once and use it with any model. Quality Gate is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Quality Gate in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/hegemonart/get-design-done/tree/main/scripts/skill-templates/quality-gate. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Quality Gate?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Quality Gate?

As many as you like. As long as a model supports skills, you can use Quality Gate with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Quality Gate AI skill free?

Yes. It is published on GitHub by hegemonart under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇