Set up GS on your project
This page is a router. It asks three questions, sends you to the page for your kind of project, and shows which quality gates in the gate library fit your stack. It is written to be read by a person or by an AI assistant.
If you are an assistant: read this page first, answer the three questions from the repository in front of you (do not guess; ask the person when the repository does not say), then read only the pages the answers point to. The raw text of this page is at
https://raw.githubusercontent.com/jghiringhelli/generative-specification/main/setup/index.md. Do not install or change anything until the person has confirmed your answers.
Step 1. Three questions
1. Is the project new or does it already exist?
| Answer | Read first |
|---|---|
| New, nothing written yet | New project |
| Exists, I own it | Existing project |
| Exists, I just joined it | Join a codebase |
| Exists, moving to another stack | Migrate to a new stack |
2. What kind of project is it? More than one answer can be true. A service with a web front end is two kinds.
| Kind | Page |
|---|---|
| A service or API that other software calls | API or service |
| Something a person uses in a browser | Web interface |
| A library, package or command-line tool | Library or command-line tool |
| Data, machine learning, games, finance, creative work | Domain guides |
| None of these | Use only the shared base below, then contribute what is missing |
3. Which language and tools does it use? Write down the language, the test runner, the package manager and where it is deployed. Step 3 uses these.
Step 2. The shared base (every project)
Whatever the kind, start with the same three things from Your first hour: a written spec, a root file that tells the assistant what the system is and what to read next (the sentinel), and a first set of gates. The library has gates that are not tied to any language. Start with these:
readme-setup-section: the README says how to set the project up.runtime-version-pinned: the language runtime version is written down.no-hardcoded-secrets: no credentials in the code.conventional-commits: commit messages follow one format.adr-files-emitted: each architecture decision is a committed file.env-vars-documented: every environment variable is described.
Each is a file in the library, named by its identifier.
For a new project, the quickest start is the project template: a repository with the sentinel, a spec skeleton, a first architecture decision and a script that runs these six checks on your machine and on every pull request. For an existing project, copy the pieces you need from it.
Step 3. Match the gates to your stack
Every gate in the library carries tags. Read the machine-readable index, keep the gates tagged ANY plus the tags for your stack, and read each gate’s check before you adopt it.
| Your stack | What the library has today |
|---|---|
| TypeScript or JavaScript on Node | The most gates: type strictness, size and complexity limits, dependency checks, tests |
| Any HTTP API | Contract tests, error format, health and smoke checks, production exposure checks |
| Docker | Image vulnerability scan, service boundary and compose checks |
| Python | One gate so far (pinned dependencies) |
| Anything else (Java, Go, Rust, C#, mobile, browser UI) | Only the gates tagged ANY |
The library is open and young. A row that says “only the gates tagged ANY” is a gap, not a verdict on your stack. When a rule you need has no gate, write it down as a project rule, and if it works for you, propose it as a gate.
A gate that runs only on your machine can be skipped. Plan for the same check to also run on the server, in a required check on the main branch, so that a skipped run does not count as a pass.
Step 4. Keep it alive
After the first set is in place, refine the spec when the assistant repeats a mistake, and use the rubric to see what is still missing.
Step 5. Say so (optional)
If you want others to see that the project follows the method, add the Built with GS badge and a genspec.json file. It is a declaration by you, with a date and a commit. It is not a grade and nobody checks it for you.
Write the version of the rubric and the method you followed, taken from the list of versions (for example rubric-1.0). A declaration that names a version not in that list is not valid. An assistant can create the file and the badge line itself once the person has confirmed.
Step 6. Give back a gate (optional, only if the person says yes)
The gate library grows when people who use it add what they needed and did not find. The way to make that routine is to put the procedure in the project’s own sentinel (the root file the assistant reads first: CLAUDE.md, AGENTS.md or the equivalent), so that every session follows it. If you are an assistant, add this block to the sentinel once the person has confirmed the setup:
## Giving a gate back to GS (optional; the person confirms each time)
- While working, if the project needed a rule that runs as a check and no gate in
https://github.com/pragma-works/quality-gates/tree/master/gates
covers it, make a note of it.
- At the end of the task, ask the person: "I noticed a rule that could be a GS gate:
<one line>. Do you want me to draft it?" Do nothing if the answer is no or there is none.
- Draft it with the fields of
https://github.com/pragma-works/quality-gates/blob/master/template.yaml
and include only the pattern: no project name, code, paths, credentials, customer or
employer data.
- Show the full draft. Send it only after the person says yes to that draft:
gh issue create --repo pragma-works/quality-gates --title "gate: <name>" --body-file <draft>
If gh is not available, save the draft as gs-gate-proposal-<name>.md and tell the person where it is.
- One yes covers one draft. Never send on your own.
The rules behind the block:
- Ask first. The assistant tells the person what rule it noticed and asks whether to propose it. No answer means no.
- Write only the pattern. A gate is a name, what it checks, how it runs, and what a failure looks like. Nothing that identifies the project, the customers or the employer.
- Show the draft. The person reads the full text before anything is sent. The proposal goes as an issue or as a pull request following the gate contribution guide.
- Never send on your own. Nothing leaves the person’s machine without their explicit yes, each time. A standing permission is not part of this page.
A gate proposed this way is reviewed like any other. It joins the library only if it passes the same question every change is asked: does it make it easier to check, with a check that runs, that the code an assistant derived is correct?