{
  "uid": "cogitave.learn.open-your-first-pull-request.pass-the-gates-and-open-the-pr",
  "kind": "moduleUnit",
  "href": "/modules/open-your-first-pull-request/pass-the-gates-and-open-the-pr/",
  "title": "Pass the gates and open the PR",
  "summary": "",
  "type": null,
  "products": [],
  "roles": [],
  "levels": [],
  "subjects": [],
  "headings": [
    "Let the pre-commit hooks run",
    "Satisfy docs-as-code",
    "Open the pull request"
  ],
  "source": "You have a signed, well-formed commit. Now let the checks run, make the change\ndocs-complete, and open the pull request.\n\n## Let the pre-commit hooks run\n\nWhen you commit, **lefthook** runs the standard set of checks against your staged\nfiles. Lefthook is the single polyglot runner for the estate; the same commands\nrun in CI. The\n[hooks-precommit standard](../../../../standards/docs/standards/hooks-precommit.md)\ndefines the full set:\n\n| Stage | What runs |\n| --- | --- |\n| Formatters | rustfmt, gofumpt, biome (TS/JSON/CSS/MD) |\n| Linters | clippy (`-D warnings`), golangci-lint, biome lint |\n| Hygiene | trailing-whitespace, final newline, large-file block, merge-conflict and YAML/JSON validity |\n| Secret scan | gitleaks on staged files, offline |\n| commit-msg | commitlint (Conventional Commits) |\n\nFormatters that fix files re-stage them, so most style problems are corrected\nbefore you even see them.\n\n> [!IMPORTANT]\n> The hook is a **bypassable convenience** - the real gate is CI. A contributor\n> can skip the local hook, but the same checks run again on the pull request and\n> block the merge there. So a green hook is a head start, not a guarantee; a\n> passing PR is what counts. In CI the secret scan is also deeper (full history),\n> not just staged files.\n\n## Satisfy docs-as-code\n\nCogitave's rule is blunt: **if code changes, docs change.** The `docs-required`\nCI gate fails a pull request that touches code but does not touch `docs/`, a\n`*.md` file, or the `CHANGELOG`. This is the floor\n([AGENTS.md](../../../../../AGENTS.md), rule 4) and the\n[documentation standard](../../../../standards/docs/standards/documentation.md);\nthere is a `docs-exempt` label for the genuine exceptions, but reaching for it is\nthe exception, not the habit. Separately, schema validation and any broken\nxref, link, or bookmark are **blocking errors**, so the docs you write have to\nresolve, not just exist.\n\nPractically: before you open the PR, ask what a reader needs to know because of\nyour change, and write that down in the same branch.\n\n## Open the pull request\n\nPush your branch and open the PR. You are **proposing** a change - opening a\nGitHub PR and stopping for review is exactly the propose-only shape you learned in\nthe request lifecycle. The reviewer and the CODEOWNER hold the merge gate; agents\npropose and humans enact\n([AGENTS.md](../../../../../AGENTS.md), rules 6-7).\n\n> [!TIP]\n> Never push to a protected branch. Open a branch and a PR, let every gate go\n> green, and let a human merge. That is the finish line.\n",
  "partOf": "cogitave.learn.open-your-first-pull-request",
  "durationInMinutes": 6,
  "quiz": null
}