Skip to content
This repository was archived by the owner on Jul 13, 2026. It is now read-only.

feat: add pre-commit hooks, linting, and Claude Code setup - #70

Merged
evaline-ju merged 2 commits into
mainfrom
orchestrate/precommit
Mar 16, 2026
Merged

evaline-ju merged 2 commits into
mainfrom
orchestrate/precommit

Conversation

@pdettori

Copy link
Copy Markdown
Member

Summary

Phase 2 of repo orchestration — establishes the code quality baseline.

  • .pre-commit-config.yaml: extends existing hooks with a local commit-msg hook that enforces DCO sign-off and blocks Co-Authored-By AI attribution (requires Assisted-By instead)
  • Makefile: adds make fmt target using ruff format
  • CLAUDE.md: repo overview with structure, key commands, code style, and DCO guidance for Claude Code sessions
  • .claude/settings.json: allowed Bash permissions for Claude Code auto-approval
  • scripts/hooks/commit-msg: hook script enforcing DCO and AI attribution convention

Install hooks

pre-commit install --hook-type pre-commit --hook-type commit-msg

Test plan

  • `make lint` passes on existing code
  • `make fmt` runs without error
  • `git commit` without `-s` is rejected by commit-msg hook
  • `git commit -s` succeeds

- Extend .pre-commit-config.yaml with local DCO commit-msg hook
- Add `make fmt` target (ruff format)
- Create CLAUDE.md with repo overview, commands, and conventions
- Add .claude/settings.json with allowed Bash permissions
- Add scripts/hooks/commit-msg to enforce DCO sign-off and block
  Co-Authored-By AI attribution (use Assisted-By instead)

Pre-commit install: `pre-commit install --hook-type pre-commit --hook-type commit-msg`

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
Comment thread Makefile Resolved
make lint runs pre-commit --all-files which includes ruff-format (via
the ruff-pre-commit hook). A separate make fmt target is redundant.

Addresses review comment from evaline-ju on PR #70.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
@pdettori

Copy link
Copy Markdown
Member Author

Addressed @evaline-ju's comment: removed the fmt target — make lint already runs pre-commit --all-files which includes ruff-format, so the separate target was redundant. Also updated CLAUDE.md to reflect this (combined into Lint + Format | make lint).

Comment thread .claude/settings.json
"Bash(ls:*)",
"Bash(find:*)",
"Bash(make lint:*)",
"Bash(make fmt:*)",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: this one doesn't exist anymore

@evaline-ju evaline-ju left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

/lgtm with nit

@evaline-ju

Copy link
Copy Markdown
Contributor

will just merge and fix nits later

@evaline-ju
evaline-ju merged commit 2bd5f68 into main Mar 16, 2026
12 checks passed
@evaline-ju
evaline-ju deleted the orchestrate/precommit branch March 16, 2026 16:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants