setup-quality-gates
Skill1 starsChanged 19 days agoMITView on GitHub
Use when a repository lets warnings pass, has no CI or has checks that are not deterministic. One building block of bootstrap. Makes warnings errors, sets up CI on every push and pull request, makes the checks deterministic and copies the dkstack format checks.
In this repository36 other files it gives its agents.
- AGENTS.mdAGENTS.md
- apply-architectureSkill
- assess-threatsSkill
- bootstrapSkill
- chart-routeSkill
- clarify-intentSkill
- code-reviewSkill
- domain-glossarySkill
- improve-agentsSkill
- investigate-bugSkill
- learnSkill
- make-diagramSkill
- migrate-dataSkill
- model-domainSkill
- plan-workSkill
- profile-performanceSkill
- recover-workSkill
- releaseSkill
- review-blast-radiusSkill
- review-specSkill
- review-standardsSkill
- setup-dkstackSkill
- setup-editorconfigSkill
- setup-labelsSkill
- setup-repo-protectionSkill
- setup-supply-chainSkill
- setup-versioningSkill
- start-issueSkill
- tdd-loopSkill
- triageSkill
- ui-designSkill
- ui-reviewSkill
- verify-claimSkill
- write-adrSkill
- write-prSkill
- writing-checkSkill
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 8 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 15
If the language has no such option, add a CI check that fails on any warning.
- Distinctive: line 37
Write the tag in a comment next to the checks in CI, so that a later update knows the source.
- Distinctive: line 38
Add the seven checks to CI.
- Very specific: line 43
Add the title steps. On a pull request, run node scripts/check-title.mjs --event.
- Very specific: line 44
Run node scripts/check-dashes.mjs and node scripts/check-writing.mjs in CI.
- Distinctive: line 47
Do not change the copied scripts.
- Distinctive: line 51
If it is not on, add a secret scanner to CI.
- Distinctive: line 55
Keep pull request titles, bodies and author logins out of step environments and logs.
- Distinctive: line 56
Read the event file inside each check.
- Distinctive: line 60
Do not start subagents for this skill.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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
Set up quality gates
A building block of bootstrap. Use it alone, or as a step of bootstrap. Do not weaken an existing quality gate. See coding/quality-gates.md.
Steps
- Configure the build so warnings are errors and the build produces zero warnings and zero hints.
- Set the compiler or build option that treats warnings as errors.
- If the language has no such option, add a CI check that fails on any warning.
- Set up CI that:
- Runs on every push to the default branch and on every pull request
- Installs dependencies
- Runs the full check (build, test, lint)
- Fails if any warning or error appears
- Ensure deterministic checks:
- Pin dependency versions where practical.
- Make test and build output stable.
- Fail the build on any non-zero warning count.
- Follow coding/naming.md.
Configure naming rules that native tools can check reliably, such as supported Roslyn,
ESLint or Ruff rules. Run those checks in CI as errors. An
.editorconfigfile alone does not enforce naming in every language. Leave unsupported or semantic rules to review. - Follow coding/types.md. Turn on the strict settings of the type checker and the lint rules that it names. Run the type check in CI as an error.
- Copy the dkstack format checks:
- Copy
check-maps.mjs,check-context.mjs,check-adrs.mjs,check-title.mjs,check-dashes.mjs,check-writing.mjsandcheck-links.mjsintoscripts/from a fixed dkstack release tag, for examplev1.6.0. The source URL ishttps://raw.githubusercontent.com/daniel-kindl/dkstack/<tag>/scripts/<name>. Do not copy them frommain, fromv1or from a URL at run time. Copymarkdown-files.mjstoo, becausecheck-dashes.mjsandcheck-writing.mjsimport it. Copypr-event.mjstoo, becausecheck-title.mjsimports it. See ADR 0001. - Write the tag in a comment next to the checks in CI, so that a later update knows the source.
- Add the seven checks to CI. The checks are required. A failed check blocks the merge.
- The scripts need Node.js and no package. Fetch the Git history for the ADR check.
- On a pull request, run
node scripts/check-adrs.mjs --base "$BASE_SHA". SetBASE_SHAin the step environment to the target commit. - On a push, set
BASE_SHAto the commit before the push. UseHEAD~1ifgit cat-file -e "$BASE_SHA^{commit}"cannot find it. Run the same ADR command. - A missing
docs/maps/folder or a missingCONTEXT.mdis a pass. The repository may not have them yet. - Add the title steps. On a pull request, run
node scripts/check-title.mjs --event. For each commit of a push, runnode scripts/check-title.mjs -- "<commit title>". - Run
node scripts/check-dashes.mjsandnode scripts/check-writing.mjsin CI. - Copy
check-consumer.mjsand the hash listdkstack-hashes.jsonfrom the same tag. Runnode scripts/check-consumer.mjsin CI. It checks the dkstack setup of the repository, and it checks each copied script against the hash list for the tag. It needs no network. - Run
node scripts/check-links.mjsin CI. It checks only the local links and skips each dkstack URL. To check the dkstack URLs and anchors too, clone the dkstack branchv1to a folder outside the repository and runnode scripts/check-links.mjs . --dkstack-root <clone>. The check maps each raw or blob URL to a file in the clone. The clone must be the same ref as the ref in the links, for examplev1. A link on a tag, such asv1.6.0, is checked against the same clone, so use one ref in all links. - Do not change the copied scripts. To update them, copy them again from a newer tag.
- Copy
- Secret scanning: follow coding/security.md.
- If the code host has push protection and it is on, add no secret scan to CI. The setting meets the rule. For a repository that has history from before the setting was on, run one scan of the full history with a pinned scanner. Push protection does not find a secret that is already in the history. setup-repo-protection turns it on.
- If it is not on, add a secret scanner to CI. Run it on the full history. Pin the scanner by version and SHA-256.
Check pull request text in CI
Keep pull request titles, bodies and author logins out of step environments and logs. Read the event file inside each check. See the event file example.
Subagents
Do not start subagents for this skill. Reason: this is one building block. bootstrap can check it in a subagent. See the subagent guide.
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.

