Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Pre-commit configuration for agentic-starter-kits
# Install: pre-commit install --install-hooks
# Run manually: pre-commit run --all-files

default_install_hook_types:
- pre-commit
- commit-msg

repos:
# Enforce Conventional Commits in commit messages
- repo: https://github.com/espressif/conventional-precommit-linter
rev: v1.11.0
hooks:
- id: conventional-precommit-linter
Comment thread
mpk-droid marked this conversation as resolved.
stages: [commit-msg]
# more args can be added here to customize the linter behavior
# more args can be found here: https://github.com/espressif/conventional-precommit-linter
args:
- --types=feat,fix,docs,chore,test,perf,refactor,ci,build,style,revert
- --subject-min-length=10
- --subject-max-length=72
- --allow-breaking
59 changes: 48 additions & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,17 @@ Thank you for your interest in contributing. This document gives a short overvie

Before submitting, please read our [Code of Conduct](CODE_OF_CONDUCT.md). By participating, you agree to uphold it.

## Development setup

This repository uses [pre-commit](https://pre-commit.com/) hooks to enforce code quality checks before each commit. Set it up once after cloning:

```bash
uv tool install pre-commit
pre-commit install --install-hooks
```

After this, every `git commit` will automatically validate your commit message format (see below).

## Linting and formatting

This project uses [ruff](https://docs.astral.sh/ruff/) for Python linting and formatting. CI runs ruff as a blocking check on all pull requests.
Expand All @@ -31,18 +42,35 @@ Configuration is in [`ruff.toml`](ruff.toml) at the repo root.

## Commit message conventions

We encourage [Conventional Commits](https://www.conventionalcommits.org/) so that history and release notes stay clear.
This repository enforces the [Conventional Commits](https://www.conventionalcommits.org/) specification via a pre-commit hook. Commits that don't follow this format will be blocked locally by the pre-commit hook.

> **Tip:** To bypass the hook in rare cases (e.g., merge commits, emergency hotfixes): `git commit --no-verify`

### Format

Use one of these prefixes at the start of your commit message:
```
<type>(optional scope): <description>

[optional body]

[optional footer(s)]
```

| Prefix | Meaning |
| --------- | -------- |
| **feat:** | A new feature |
| **fix:** | A bug fix |
| **perf:** | A change that improves performance |
| **chore:**| Maintenance (deps, tooling, config) |
| **docs:** | Documentation only |
| **test:** | Adding or updating tests |
### Allowed types

| Prefix | Meaning |
| ------------- | -------- |
| **feat:** | A new feature |
| **fix:** | A bug fix |
| **docs:** | Documentation only |
| **chore:** | Maintenance (deps, tooling, config) |
| **test:** | Adding or updating tests |
| **perf:** | A change that improves performance |
| **refactor:** | Code change that neither fixes a bug nor adds a feature |
| **ci:** | CI/CD changes |
| **build:** | Build system or external dependency changes |
| **style:** | Code style (formatting, whitespace — no logic changes) |
| **revert:** | Reverts a previous commit |

You can optionally add a scope (e.g. the agent or module name) in parentheses after the type.

Expand All @@ -54,9 +82,18 @@ fix: correct env var name in deployment in langgraph_react_agent
docs: update README with OpenShift deploy steps
test: add tests for tool registration
chore: bump python-dotenv in requirements
refactor(langgraph): extract tool registration into helper
ci: add ruff linting workflow
feat!: change /chat response format
```

This is optional but appreciated; maintainers may ask you to reword commits when preparing a release.
For breaking changes, add `!` after the type/scope (e.g. `feat!:`) or include a `BREAKING CHANGE:` footer:

```
feat: change /chat response format

BREAKING CHANGE: response field "text" renamed to "content"
```

## Automated PR labels

Expand Down
Loading