跳到正文
cccskills
免费在 GitHub 公开

generating-quality-gate-workflows

Generates the CI workflow that enforces a quality contract: layered jobs from fast local hooks to release gates, per-practice steps for JS/TS toolchains, diff-scoped checks, sticky PR reporting, required-check wiring, and a severity policy deciding what fails the build. Use when quality practices are agreed but not enforced, when CI runs everything on every commit, when a gate reports green while the check it runs cannot fail, or when a per-change gate needs to post findings on the pull request.

中文简介正在准备中。当前显示原文说明。

jaktestowac/awesome-copilot-for-testers星标 118(GitHub 118 + cccskills 0)
集成工具GitHubGitLab

实测评分 未实测

查看安装方法

包含的文件(3)

  • SKILL.md9.7 KB
  • resources/github-actions-jobs.md8.9 KB
  • resources/gitlab-ci-jobs.md7.3 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Generating Quality Gate Workflows

Use this skill to turn an agreed set of quality practices into CI that actually enforces them.

Two failures are common and opposite. A workflow that runs everything on every commit, so it is slow, so people stop gating on it. And a workflow full of steps that cannot fail - || true, continue-on-error, thresholds at zero, jobs that are not required checks - so it reports green regardless. The second is worse, because it produces the feeling of a gate.

A gate that cannot fail is worse than no gate. Every rule here follows from that.

When to Use

  • a quality contract exists and nothing enforces it
  • CI takes long enough that people ask to skip it
  • a check runs but nobody can remember it ever failing
  • a per-change gate should post findings on the PR
  • a new practice needs introducing without blocking the whole team on day one
  • someone asks why the build is green when the code clearly is not

Operating Principles

  • Layer by feedback speed, not by topic. Fast and bypassable locally; slow and mandatory in CI. Fast feedback that blocks gets disabled; enforcement that is bypassable gets bypassed.
  • No swallowed failures. If a check is not ready to block, express that as a soft gate the provider renders as amber - never as a command that always exits zero.
  • Required, or delete it. A job outside branch protection is advice with a CPU bill.
  • Gate on the diff. Changed-line coverage, not a repo-wide floor. Changed paths, not the whole tree.
  • Trigger expensive jobs on what can affect them. E2E, performance, evals and DAST get paths: filters derived from the change-relevance recipes.
  • Warn before blocking. Report → warn → block on escalated paths → block everywhere. Straight to blocking on a legacy repo gets the gate reverted, and the reversal costs the credibility to try again.
  • One sticky comment per gate. A new comment per push trains people to collapse the thread.
  • Every suppression is registered. A continue-on-error or a lowered threshold carries a waiver id and an expiry in a comment.

Workflow

Phase 0: Take the inputs

  • The practices to enforce, with their levels. From .qa/quality-contract.md if it exists; otherwise the agreed list, and say it is un-contracted.
  • The provider: GitHub Actions or GitLab CI. They express soft gates differently, and that difference matters.
  • The repo layout: single package or monorepo, workspace tool, where tests and coverage land.
  • The severity policy: which practices block, which warn, and what the release path requires.

Phase 1: Assign each practice to a layer

LayerWhereWhat belongs hereBlocking
1 - Localpre-commit / pre-push hookformat, lint on staged files, typecheck, fast unit tests, secret scanbypassable by design
2 - CI, every PRdeterministic jobslint with --max-warnings 0, strict typecheck, tests with no skips, diff coverage, duplication, SAST, dependency audit, contract checksyes
3 - Reviewreview jobs and agentsassertion quality, standards review, security reviewadvisory or blocking, stated
4 - Releasepre-release pipelineproduction readiness, performance thresholds, DAST, release sign-offyes, on the release path

The allocation rule: anything a developer needs within seconds goes to layer 1 and must not block; anything the team relies on goes to layer 2 and must.

Phase 2: Write the jobs

./resources/github-actions-jobs.md and ./resources/gitlab-ci-jobs.md have working per-practice steps for JS/TS: lint, typecheck, unit, diff coverage, E2E with sharding, contract validation, SAST, secret scan, dependency audit, accessibility, evals, mutation, performance.

Per-job hygiene, every time:

  • pin action versions and images; a floating action is an unreviewed dependency inside the gate
  • explicit timeout-minutes; a hung job is an unresolvable required check
  • least-privilege permissions:, adding pull-requests: write only where a comment is posted
  • fetch-depth: 0 / GIT_DEPTH: 0 wherever a merge base is needed
  • cache dependencies, never test results
  • no retries to mask flake - measure it and quarantine with an owner and a date
  • concurrency groups so superseded runs cancel instead of queueing

Phase 3: Set the severity policy

Make it explicit and put it in the repo, not in people's heads:

Practice levelVerdictCI behaviour
MUST unmet on escalated surfaceBLOCKjob fails, required check red
MUST unmet elsewhereBLOCK or WARN per policyfails, or soft-fails visibly
SHOULD unmetWARNsoft gate, amber, visible
COULD unmetINFOreported, never fails
Advisory practices (comprehension)NUDGEreported, never fails, ever

Then write the escape hatch: a suppression is allowed, it needs a waiver id and an expiry in a comment, and an expired waiver fails its own check (governing-quality-waivers). A gate with no documented escape hatch gets an undocumented one.

Phase 4: Wire enforcement and reporting

  • Add layer-2 jobs to branch protection required checks. Until then, nothing is enforced.
  • Post one sticky comment per gate, keyed on a header so each run replaces its own.
  • Annotate at line level where supported - ::error file=…,line=…, GitLab coverage reports. Annotations get fixed; log lines get scrolled past.
  • Report what the gate did not cover: suites excluded, exclusions in scope, jobs skipped on forks.
  • Handle forks explicitly. Secret-dependent jobs must be skipped, not failed, on fork PRs, with the key-free subset running instead and the full job required on the default branch. A red required check on every external contribution gets the check removed.

Phase 5: Verify the gate can actually fail

The step everyone omits. For each new blocking job, prove it works:

  1. Break the thing it checks, on a scratch branch.
  2. Confirm the job goes red and the PR is blocked.
  3. Fix it, confirm green.

Specifically verify: the changed-line count is non-zero when the diff is non-empty (path matching is the usual silent failure), the threshold is above the current value rather than below it, and the job appears in required checks.

A gate nobody has watched fail is a gate nobody knows works. This is the same rule as "every guardrail needs a test that proves it fires".

Common Failure Modes

  • || true and friends. npm audit || true, tool || echo "non-blocking", set +e. Reports green whatever happens, and continue-on-error: false next to it reads as strictness.
  • Not a required check. The most common reason a correct workflow enforces nothing.
  • Shallow clone with a diff-based check. No merge base, empty diff, green check, nothing verified.
  • Repo-wide coverage floor on a legacy repo. Set below current so it can only detect catastrophe, or unreachable so it gets deleted.
  • Everything on every commit. Slow, expensive, and the reason someone eventually adds paths-ignore: ['**'].
  • Straight to blocking. A new gate that blocks the whole team on day one gets reverted.
  • A fresh comment per push. Signal buried under a collapsed thread.
  • Retries as flake control. Green suite, unfixed race, and the flake rate goes unmeasured.
  • Secrets in fork PRs. Either a permanently red check or, worse, a workflow that exposes secrets to untrusted code.

Resource Map

  • ./resources/github-actions-jobs.md - per-practice GitHub Actions jobs, soft gates, sticky comments, fork handling, monorepo and sharding patterns
  • ./resources/gitlab-ci-jobs.md - the GitLab equivalents: allow_failure, rules, MR notes, coverage reports, and merge-request pipelines

Related Skills

  • deriving-a-quality-contract - supplies the practices, levels and thresholds this workflow enforces
  • scoping-change-relevance - supplies the paths: filters for expensive jobs
  • verifying-change-coverage - the diff-coverage job in detail, including artifact merging
  • governing-quality-waivers - the suppression register and the expiry check this workflow runs
  • creating-hooks - layer 1: local hooks, which must stay fast and bypassable
  • testing-llm-features - the eval job, its trigger paths and its fork-safe form
  • assessing-release-readiness - layer 4, where the release gate reports into

Definition of Done

This skill is complete when:

  • every contracted practice is assigned to a layer, and the layer matches its feedback speed
  • no gate step can silently succeed; soft gates use continue-on-error / allow_failure rather than || true
  • diff-based checks fetch full history and fail when path matching produces an empty changed set
  • expensive jobs have paths: filters, timeouts, pinned versions and least-privilege permissions
  • the severity policy is written into the repo, with the waiver escape hatch and an expiry check
  • blocking jobs are in branch protection, and fork behaviour is explicit
  • each gate posts one sticky report stating what it did and did not cover
  • every new blocking job has been watched to fail and then pass

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Defines, computes, and interprets test and quality metrics: pass rate, flake rate, suite duration, defect escape rate, time to detect, and coverage with its caveats. Use when building a QA dashboard, reporting suite health to stakeholders, comparing releases over time, or when a coverage percentage or a bug count is being treated as a measure of quality.

中文简介正在准备中。当前显示原文说明。

jaktestowac/awesome-copilot-for-testers1182026年8月27日 更新

Analyzes diffs, changed files, hotfixes, and release candidates to identify where regression risk spreads and what must be retested first. Use when scoping retest after a change, reviewing QA impact for a pull request, or building a minimal confidence suite for release validation.

中文简介正在准备中。当前显示原文说明。

jaktestowac/awesome-copilot-for-testers1182026年8月27日 更新

Writes and reviews API automation tests with Playwright Test, covering setup/teardown, assertions, data management, and hybrid API+UI flows. Use when creating backend API tests, contract checks, data-driven API coverage, API+UI hybrid workflows, or reviewing existing Playwright API suites.

中文简介正在准备中。当前显示原文说明。

jaktestowac/awesome-copilot-for-testers1182026年8月27日 更新

Measures the risk that code shipped without anyone understanding it: a teach-back attestation on high-risk changes, a risk band from changed-code complexity, diff size and whether a human explanation accompanied it, and optional AI-authorship provenance. Findings stay advisory by design. Use when an AI-assisted codebase grows faster than the team reads it, when reviews are rubber-stamped, when nobody can explain a module that ships weekly, or when leadership asks how much of the code the team can actually maintain.

中文简介正在准备中。当前显示原文说明。

jaktestowac/awesome-copilot-for-testers1182026年8月27日 更新

Produces an evidence-backed go/no-go recommendation: exit criteria status, open-defect risk profile, coverage against risk, environment parity, rollback readiness, and the residual risk stated plainly. Use when preparing a release sign-off, when someone asks whether a build is ready to ship, or when a decision to release is being made on impressions rather than evidence.

中文简介正在准备中。当前显示原文说明。

jaktestowac/awesome-copilot-for-testers1182026年8月27日 更新

Records human verification - code review, exploratory sessions, UAT, accessibility passes, UX and observability reviews - as dated, attributed attestations in a register, so human-centric practices stay in the quality contract without pretending to be automated checks. Use when a strategy requires verification no tool can prove, when sign-off evidence is scattered across chats and tickets, when a gap matrix needs to distinguish "attested" from "passed", or when an audit asks who verified what and when.

中文简介正在准备中。当前显示原文说明。

jaktestowac/awesome-copilot-for-testers1182026年8月27日 更新

查看 jaktestowac 的全部技能

报告此技能的问题