setup-ci-quality-gates
Skill0 starsChanged 4 days agoMITView on GitHub
Set up CI quality gates and architecture checks on GitHub Actions, and reproduce those gates locally via a ci.sh mirror. Use when creating workflows, branch protection rulesets, auto-merge, AI review layers, or building scripts/ci.sh to mirror .github/workflows when GitHub Actions is quota-blocked.
In this repository75 other files it gives its agents.
- AGENTS.mdAGENTS.md
- skills/skill-authoring/tools/AGENTS.mdAGENTS.md
- aes-docsSkill
- aes-fixSkill
- aes-layerSkill
- aes-migrationSkill
- android-emulator-linux-gpsSkill
- computer-useSkill
- flatpak-chromium-automationSkill
- qwen-webSkill
- grok-buildSkill
- hermes-agentSkill
- omnirouteSkill
- orcaSkill
- account-managerSkill
- brave-setupSkill
- password-managerSkill
- codegraphSkill
- deep-cleanSkill
- dogfoodSkill
- reviewSkill
- systematic-debuggingSkill
- blender-arwakySkill
- comfyuiSkill
- llm-writingSkill
- vision-arwakySkill
- playwright-toolingSkill
- statuslineSkill
- systemd-headless-serviceSkill
- xdg-spec-complianceSkill
- figcraft-builderSkill
- figcraft-iconsSkill
- figcraft-motionSkill
- figcraft-prototyperSkill
- figcraft-reviewSkill
- figcraftSkill
- figcraft-svgSkill
- figcraft-typographySkill
- github-authSkill
- issue-makerSkill
- issue-workerSkill
- mergifySkill
- pr-babysitSkill
- releasingSkill
- repo-managerSkill
- ascii-artSkill
- ascii-videoSkill
- gif-searchSkill
- media-acquisitionSkill
- docxSkill
- emailSkill
- google-workspaceSkill
- notionSkill
- pdfSkill
- pptxSkill
- xlsxSkill
- competitor-news-monitorSkill
- product-price-monitorSkill
- weekly-review-planningSkill
- arxivSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 120
Create a ruleset "Protect main - quality gates" (Settings → Rules → Rulesets), target: branch, enforcement active:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CI Quality Gates System
Replicate the CI setup used by this repo: quality gates enforced by GitHub Actions + a branch-protection ruleset, architecture enforcement via the project's own linter (self-lint), and two AI review layers (cubic, Repowise). This is a copy-and-extend blueprint, not a one-off checklist — adapt names and paths to the target repo.
Language-agnostic. The pattern (quality gates → branch protection → AI review) applies to any language. The commands below are this repo's Rust flavor; substitute per language:
| Concern | Rust | Python | TypeScript/JS |
| Format | cargo fmt --check | ruff format --check | prettier --check |
| Lint | cargo clippy -D warnings | ruff check + mypy | eslint + tsc --noEmit |
| Tests | cargo nextest run | pytest | vitest / jest |
| Security deps | cargo audit | bandit + pip-audit | npm audit / eslint-plugin-security |
| Build | cargo build --release | python -m build | tsc / vite build |
The self-lint job is the one part that is inherently project-specific: it
runs this linter (lint-arwaky-cli) on the repo's own multi-language
workspace (crates/, modules/, packages/).
Architecture overview
PR opened / pushed
│
├─ CI workflow (.github/workflows/ci.yml)
│ ├─ Format (cargo fmt --check)
│ ├─ Clippy (cargo clippy -D warnings)
│ ├─ Build (cargo build --release)
│ ├─ Tests (cargo nextest run)
│ └─ Self-Lint (lint-arwaky-cli check . == 0 violations)
│
├─ cubic AI reviewer (www.cubic.dev) — ultrareview
└─ Repowise bot (.repowise/bot.yaml) — health gate advisory
│
└─ Ruleset "Protect main" (GitHub rulesets)
├─ required_status_checks: Format, Clippy, Build, Tests,
│ Self-Lint
├─ strict: true (must be up to date)
├─ non_fast_forward + deletion: blocked
└─ auto-merge workflow (squash) merges when all pass
```text
## 1. GitHub Actions workflow (.github/workflows/ci.yml)
Five jobs on `ubuntu-latest` (Rust flavor shown; see the table at the top
for Python/TypeScript equivalents). Cache with sccache + Swatinem/rust-cache.
| Job | Command | Notes |
|---|---|---|
| `fmt` | `cargo fmt --all -- --check` | rustfmt component only |
| `clippy` | `cargo clippy --all-targets -- -D warnings` | clippy component; install `mold` linker |
| `build` | `cargo build --release` | needs: build for downstream |
| `test` | `cargo nextest run --workspace --lib --tests -j 2` | needs: build; install nextest via curl |
| `self-lint` | `lint-arwaky-cli check .` == 0 violations | needs: build; also assert ≥24 AES codes on `workspaces-bad` |
Key env in `.github/workflows/ci.yml`: `RUSTC_WRAPPER=sccache`,
`CARGO_BUILD_JOBS=4`, `RUST_MIN_STACK=33554432`. (`CARGO_INCREMENTAL=0`
belongs in `scripts/ci.sh` for local runs, not in the workflow.)
### Self-lint job (architecture enforcement)
The differentiator: CI fails if the repo violates its own architecture
rules — the `self-lint` job asserts zero whole-repo violations plus the
AES rule engine still firing all 24 codes on the intentional-violation
fixture workspace (`workspaces-bad`), catching a linter that silently
stops detecting anything.
See `references/self-lint.md` for the job script (exit-code-authoritative
check, fixture assertion, and the `cargo build --release` prerequisite).
## 2. Branch protection: GitHub Ruleset
Create a ruleset "Protect main - quality gates" (Settings → Rules →
Rulesets), `target: branch`, enforcement `active`:
- **required_status_checks**: Format, Clippy, Build, Tests, Self-Lint —
with `strict: true` (requires up-to-date).
- **non_fast_forward**: blocked.
- **deletion**: blocked.
Effect: no direct push to `main`; every change must go through a PR that
passes all gates. (This is why all work here uses worktrees + PRs.)
## 3. Auto-merge (.github/workflows/auto-merge.yml)
See `references/auto-merge.yml.md` for the squash-merge workflow and
PR-metadata env-var rules.
## 4. AI review layers
See `references/ai-review-layers.md` for cubic and Repowise configuration.
## 5. Local quality gates (scripts/ci.sh)
Reproduce CI locally before pushing — the pre-push hook runs the same
gates (Rust flavor; swap commands per language from the table at the top):
```bash
bash scripts/ci.sh # fmt + clippy + self-lint + AES codes + tests
CARGO_INCREMENTAL=0 cargo clippy --workspace --all-targets -- -D warnings
cargo nextest run --workspace --lib --tests
lint-arwaky-cli check . # whole repo, must be 0 violationsscripts/ci.sh should also accept --container and run the identical gates
inside a Podman/Docker image where every dependency, browser, and the linter
are baked in. That removes the hosted-runner quota as a merge dependency.
See references/local-ci.md for the full local-mirror procedure (script
structure, container image design, runtime verification, and the version-drift
pitfall that makes local runs disagree with CI), merged from the former
local-ci skill.
6. Supporting workflows
| Workflow | Purpose |
release.yml | Build release binaries, smoke-test, attest-build-provenance |
release-tag.yml | Tag release PRs |
auto-release.yml | Release on workflow_run after merge |
cleanup-branches.yml | Delete merged branches |
labeler.yml | Auto-label PRs (uses actions/labeler) |
Checklist — replicate on a new repo
.github/workflows/ci.ymlwith fmt/clippy/build/test/self-lint jobs- Self-lint job runs the project's own linter, fails on violations
- Ruleset on
main: required status checks + strict + no fast-forward - Auto-merge workflow (squash) gated on the same checks
- cubic + Repowise apps installed on the repo
.repowise/bot.yaml+.repowiseIgnore+health-rules.jsonscripts/ci.shmirrors CI for local run + pre-push hook (seereferences/local-ci.md)- Release/labeler/cleanup workflows if the release train is needed
Routing
| Reference | Purpose |
references/branch-protection.md | GitHub Ruleset and required status checks |
references/ci-workflow.md | The five CI jobs (fmt, clippy, build, test, self-lint) |
references/container-image.md | Container image design for local CI mirroring |
references/self-lint.md | Self-lint job script and AES rule assertion |
references/auto-merge.yml.md | Squash-merge auto-merge workflow |
references/ai-review-layers.md | cubic and Repowise configuration |
references/local-ci.md | Local quality gates mirror via scripts/ci.sh |
references/verify-runtimes.md | Runtime version verification |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

