skills/copilotkit-contribute/references/pr-guidelines.md
Reach out to the maintainers before starting any significant work on new or existing features. File an issue or ask on Discord. This prevents wasted effort on work that doesn't align with the project direction or is already in progress.
Before opening a PR, verify all of these pass locally:
pnpm run testpnpm buildpnpm run check-prettierpnpm run lintpnpm run check:packages (runs publint + attw)<type>(<scope>): <subject> formatEvery push and pull request triggers the CI workflow which:
package.json)pnpm installpnpm run build (builds all packages respecting Nx dependency graph)Preview packages are published from both packages/v1/* and packages/v2/*, allowing reviewers and users to test your changes before merge.
CopilotKit uses lefthook to run pre-commit and commit-msg hooks automatically:
| Hook | What it does |
|---|---|
check-binaries | Rejects binary files, build artifacts, dSYM dirs, and files >1MB |
sync-lockfile | Runs pnpm i --lockfile-only when package.json changes, auto-stages |
lint-fix | Runs pnpm run lint --fix && pnpm run format, auto-stages fixes |
test-and-check-packages | Runs pnpm run test && pnpm run check:packages |
| Hook | What it does |
|---|---|
commitlint | Validates commit message against conventional commit format |
If hooks fail, fix the issue and try again. Do not use --no-verify to bypass hooks.
Enforced by commitlint with @commitlint/config-conventional:
<type>(<scope>): <subject>
feat, fix, docs, style, refactor, perf, test, chore
Use the package directory name: runtime, core, react, angular, react-core, react-ui, shared, agent, etc.
feat(react): add useInterrupt hook for agent interrupts
fix(runtime): handle missing agent ID in request middleware
test(core): cover tool registry edge cases
docs(shared): update type documentation for EventType
chore(deps): bump vitest to 3.x
Include in your PR:
Fixes #1234)packages/v2/. Only add V1 wrappers if backward compatibility is needed.