# Semantic / conventional commits

This repo uses [Conventional Commits](https://www.conventionalcommits.org/).

```text
<type>(<scope>): <summary>

[optional body]

[optional footers]
```

## Types

| Type | Use |
|---|---|
| `feat` | New user-facing capability |
| `fix` | Bug fix |
| `docs` | Documentation only |
| `refactor` | Code change that is not a feat or fix |
| `test` | Tests only |
| `chore` | Tooling, deps, housekeeping |
| `ci` | CI config |
| `perf` | Performance |
| `build` | Build system |
| `revert` | Revert a prior commit |

## Scopes

Prefer one of: `api`, `portals`, `infra`, `auth`, `docs`, `tooling`, `demos`, `identity`, `linking`.

## Authorship

Author and committer are the human `user.name` / `user.email` only. Do not add
`Co-authored-by: Cursor`, `Co-authored-by: Claude`, or other agent trailers.
Cursor may inject one; the Husky `commit-msg` hook strips it before Commitlint.

## Enforcement

- Root `commitlint.config.cjs` + Husky `commit-msg` hook
- Install once from repo root: `npm install`
- Hook strips agent `Co-authored-by` trailers, then runs `commitlint`

## Examples

```text
feat(api): add hashed recovery codes and session scope

fix(api): resolve IAM before consuming a recovery code

docs(auth): document Nest-owned recovery codes

chore(tooling): add commitlint and husky
```
