# Development Workflow

### Git Hooks

This project uses Husky for Git hooks to maintain code quality. The hooks are automatically installed when you run `pnpm install`.

#### Pre-commit Hook

The pre-commit hook runs `pnpm lint-staged`, which:

* Formats and lints staged files with Biome
* Runs `agents-api` tests for affected changes

#### Pre-push Hook

The pre-push hook runs `pnpm check:prepush` (lint, typecheck, and tests) for all packages except docs and cookbook templates.

##### Bypassing Checks

While we recommend running all checks, there are legitimate cases where you might need to bypass hooks:

```bash
git commit --no-verify -m "emergency: hotfix for production"
```

> **Note:** Use these bypass mechanisms sparingly. They're intended for:
>
> * Work-in-progress commits that you'll fix before pushing
> * Emergency fixes where speed is critical
> * Commits that only touch non-code files (though hooks are smart enough to handle this)

### Local checks (CI parity)

* `pnpm check` runs lint, typecheck, and tests (the same set CI runs).
* CI also runs `pnpm format:check` and `pnpm knip`.
* For package-specific commands, see `AGENTS.md` below.