{
  "uid": "cogitave.learn.commits-and-versioning.introduction",
  "kind": "moduleUnit",
  "href": "/modules/commits-and-versioning/introduction/",
  "title": "Introduction",
  "summary": "",
  "type": null,
  "products": [],
  "roles": [],
  "levels": [],
  "subjects": [],
  "headings": [
    "Why it is enforced, not suggested",
    "What you will get from this module"
  ],
  "source": "In most projects a commit message is a note to a human: a short line someone\nmight read later while hunting a regression. In Cogitave it is that **and** an\ninstruction to the machine. The type you put in front of your message decides\nwhether the next release is a patch, a minor, or a major version - and whether\nyour change even appears in the changelog. Write the message carelessly and you\nversion the code wrong.\n\nThe root [`AGENTS.md`](../../../../../AGENTS.md) makes this rule 2 of the\nnon-negotiable floor: every commit is **Conventional Commits 1.0.0**,\n`<type>[scope][!]: <desc>`. This module is where that one-line rule becomes a\nworking skill. The single source of truth is the\n[commits-versioning standard](../../../../standards/docs/standards/commits-versioning.md);\nthe branching and release flow that carries a commit to a release lives in the\n[branching-release standard](../../../../standards/docs/standards/branching-release.md).\nLearn the shape here, then follow those docs for the exact detail.\n\n> [!IMPORTANT]\n> The commit message is the input to versioning. `feat` bumps the MINOR version,\n> `fix` bumps PATCH, and a breaking change bumps MAJOR - automatically. You are\n> not describing the change after the fact; you are declaring its release impact.\n\n## Why it is enforced, not suggested\n\nBecause the message drives an automated release, it cannot be optional.\n**commitlint** checks every message against the Conventional Commits grammar in\ntwo places - the local `commit-msg` hook and again in CI - so a malformed message\nis rejected before it can mislead the release engine. A convention a machine\nreads has to hold every time, or the version it produces is wrong.\n\n## What you will get from this module\n\nNot a style guide - a working command of three things: how to write a commit\nwhose **type, scope, and breaking marker** are chosen deliberately; how those\ncommits **drive Semantic Versioning** and flow into a release-please Release-PR,\nchangelog, and tag; and where a commit sits in the **trunk-based, protected-main**\nmodel that gates every release. After this, you can write commits that version\nand release the code correctly.\n",
  "partOf": "cogitave.learn.commits-and-versioning",
  "durationInMinutes": 4,
  "quiz": null
}