chore(prek): enable workspace hooks by stdrc · Pull Request #535 · MoonshotAI/kimi-cli

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR migrates the repository from pre-commit to prek for git hooks, enabling workspace-aware hook management. The migration splits hooks by workspace project so that only modified projects run their respective formatting and checking commands.

Key changes:

  • Added install-prek target to Makefile that installs prek and sets up git hooks
  • Created workspace-specific pre-commit configs for kosong and kaos packages with orphan mode
  • Updated root pre-commit config to use project-specific make targets (format-kimi-cli, check-kimi-cli)
  • Updated CONTRIBUTING.md documentation to reflect prek usage and workspace mode behavior

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
Makefile Added install-prek target and integrated it into prepare target to automatically install prek and hooks during setup
.pre-commit-config.yaml Updated hook IDs and names to use project-specific targets (format-kimi-cli, check-kimi-cli) for the root workspace
packages/kosong/.pre-commit-config.yaml Added orphan config for kosong package with hooks that run format-kosong and check-kosong from repo root
packages/kaos/.pre-commit-config.yaml Added orphan config for kaos package with hooks that run format-pykaos and check-pykaos from repo root
CONTRIBUTING.md Updated documentation from pre-commit to prek, explaining workspace mode and new installation process

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.