From 07a5c0b1365c27a10196528e960d8930db63c9d8 Mon Sep 17 00:00:00 2001 From: Nano Taboada Date: Tue, 24 Mar 2026 19:37:09 -0300 Subject: [PATCH 1/2] chore(claude): improve Claude Code integration - Add Claude Code section to CLAUDE.md pointing to /precommit - Update .claude/settings.json: move model to user-level, normalize uv run permission, remove redundant gh entries - Add .claude/commands/precommit.md with full pre-commit checklist - Replace github.copilot-chat with anthropic.claude-code in extensions.json Co-authored-by: Claude Sonnet 4.6 --- .claude/commands/precommit.md | 9 +++++++++ .claude/settings.json | 5 +---- .vscode/extensions.json | 2 +- CLAUDE.md | 4 ++++ 4 files changed, 15 insertions(+), 5 deletions(-) create mode 100644 .claude/commands/precommit.md diff --git a/.claude/commands/precommit.md b/.claude/commands/precommit.md new file mode 100644 index 0000000..ab34f38 --- /dev/null +++ b/.claude/commands/precommit.md @@ -0,0 +1,9 @@ +Run the pre-commit checklist for this project: + +1. Remind me to update `CHANGELOG.md` `[Unreleased]` section (Added / Changed / Fixed / Removed) — I must do this manually. +2. Run `uv run flake8 .` — must pass. +3. Run `uv run black --check .` — must pass (run `uv run black .` to auto-fix). +4. Run `uv run pytest` — all tests must pass. +5. Run `uv run pytest --cov=./ --cov-report=term` — coverage must be ≥80%. + +Run steps 2–5, report the results clearly, then propose a branch name and commit message for my approval using the format `type(scope): description (#issue)` (max 80 chars; types: `feat` `fix` `chore` `docs` `test` `refactor` `ci` `perf`). Do not create the branch or commit until I explicitly confirm. diff --git a/.claude/settings.json b/.claude/settings.json index 93a440a..852ff37 100644 --- a/.claude/settings.json +++ b/.claude/settings.json @@ -1,10 +1,7 @@ { - "model": "claude-sonnet-4-6", "permissions": { "allow": [ - "Bash(gh issue:*)", - "Bash(gh auth:*)", - "Bash(uv run:*)", + "Bash(uv run *)", "Bash(source .venv/bin/activate)", "WebFetch(domain:github.com)", "WebFetch(domain:api.github.com)" diff --git a/.vscode/extensions.json b/.vscode/extensions.json index dba7a80..57a65f1 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -4,7 +4,7 @@ "ms-python.python", // Python language support // AI Assistance - "github.copilot-chat", // GitHub Copilot Chat - AI-powered coding assistant + "anthropic.claude-code", // Claude Code - AI-powered coding assistant "coderabbit.coderabbit-vscode", // CodeRabbit - AI-powered code review // Code Quality diff --git a/CLAUDE.md b/CLAUDE.md index a7e292c..7d3153d 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,3 +1,7 @@ # CLAUDE.md @.github/copilot-instructions.md + +## Claude Code + +- Run `/precommit` to execute the full pre-commit checklist for this project. From 35049d3d418f7fa14cc19913824f442454255827 Mon Sep 17 00:00:00 2001 From: Nano Taboada Date: Tue, 24 Mar 2026 19:43:35 -0300 Subject: [PATCH 2/2] chore(claude): fix precommit command and stale comment - Remove redundant pytest step; coverage run executes tests - Update github.copilot unwanted comment to reflect current state Co-authored-by: Claude Sonnet 4.6 --- .claude/commands/precommit.md | 5 ++--- .vscode/extensions.json | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.claude/commands/precommit.md b/.claude/commands/precommit.md index ab34f38..88d5468 100644 --- a/.claude/commands/precommit.md +++ b/.claude/commands/precommit.md @@ -3,7 +3,6 @@ Run the pre-commit checklist for this project: 1. Remind me to update `CHANGELOG.md` `[Unreleased]` section (Added / Changed / Fixed / Removed) — I must do this manually. 2. Run `uv run flake8 .` — must pass. 3. Run `uv run black --check .` — must pass (run `uv run black .` to auto-fix). -4. Run `uv run pytest` — all tests must pass. -5. Run `uv run pytest --cov=./ --cov-report=term` — coverage must be ≥80%. +4. Run `uv run pytest --cov=./ --cov-report=term` — all tests must pass, coverage must be ≥80%. -Run steps 2–5, report the results clearly, then propose a branch name and commit message for my approval using the format `type(scope): description (#issue)` (max 80 chars; types: `feat` `fix` `chore` `docs` `test` `refactor` `ci` `perf`). Do not create the branch or commit until I explicitly confirm. +Run steps 2–4, report the results clearly, then propose a branch name and commit message for my approval using the format `type(scope): description (#issue)` (max 80 chars; types: `feat` `fix` `chore` `docs` `test` `refactor` `ci` `perf`). Do not create the branch or commit until I explicitly confirm. diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 57a65f1..2585acf 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -46,6 +46,6 @@ "unwantedRecommendations": [ "ms-azuretools.vscode-docker", // Docker (legacy) - Use vscode-containers instead "docker.docker", // Docker DX - Use ms-azuretools.vscode-containers - "github.copilot" // Copilot (base) - Unified into copilot-chat + "github.copilot" // GitHub Copilot - legacy base extension ] }