# Operations Guide

This guide provides detailed information for Git operations and release management in IntentKit.

## Git Commit

### Pre-commit Steps

1. Run `ruff format && ruff check --fix` before commit.
2. Make sure all tests pass before commit.

### Commit Message Format

When you generate git commit message, always start with one of `feat/fix/chore/docs/test/refactor/improve`. 

**Format**: `<type>: <subject>`

- Subject should start with lowercase
- Only one-line needed, do not generate commit message body

**Examples**:
- `feat: add new twitter skill`
- `fix: resolve circular dependency in models`
- `chore: update dependencies`

## Github Release

### Version Number Rules

Follow Semantic Versioning

### Release Steps

1. Make a `git pull --rebase` first. If the local branch is main,  `git push` it.
2. Find the last version number in release.
3. Leave the version number in `pyproject.toml` there, it will be changed in CI.
4. Diff `origin/main` with it, summarize release notes to business language, not a technical one. List new features. For bug fixes and improvements, provide vague descriptions, such as "fixed bugs in the xxx module". Then save it to `release_notes.md` for later use. Add a diff link to release note too, the from and to should be the version number.
5. If the release is **not pre-release**, also insert the release note to the beginning of `CHANGELOG.md` (This file contains all history release notes, don't use it in gh command). Commit and push `release_notes.md` and `CHANGELOG.md`.
6. Construct `gh release create` command, use `release_notes.md` as notes file in gh command.
7. Git Pull back the new tags.
