Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ on:
- 'rust/**'
- 'agents/**'
- 'tools/**'
- 'tests/**'
- 'scripts/**'
- 'tox.ini'
- 'pyproject.toml'
pull_request:
branches:
- main
Expand All @@ -21,7 +24,10 @@ on:
- 'rust/**'
- 'agents/**'
- 'tools/**'
- 'tests/**'
- 'scripts/**'
- 'tox.ini'
- 'pyproject.toml'
workflow_dispatch:

concurrency:
Expand Down Expand Up @@ -50,6 +56,50 @@ jobs:
- name: Check agent MD files
run: bash scripts/validate-agents.sh

# ── Job: Python tests (tox, version matrix) ──────────────────────────────────
python-tests:
name: Python tests (${{ matrix.python-version }})
runs-on: ubuntu-latest
defaults:
run:
working-directory: .
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

rg -n -C 3 'permissions:|actions/checkout|persist-credentials|pull_request:|push:' \
  .github/workflows/ci.yml

Repository: BcKmini/claude-code-use

Length of output: 1987


🏁 Script executed:

#!/bin/bash
set -euo pipefail

cat -n .github/workflows/ci.yml

Repository: BcKmini/claude-code-use

Length of output: 7137


🏁 Script executed:

#!/bin/bash
set -euo pipefail

python3 - <<'PY'
from pathlib import Path
import re

path = Path(".github/workflows/ci.yml")
lines = path.read_text().splitlines()

jobs = []
current_job = None
checkout_sites = []

for number, line in enumerate(lines, 1):
    job = re.match(r"^  ([A-Za-z0-9_-]+):\s*$", line)
    if job and number >= 46:
        current_job = job.group(1)
        jobs.append(current_job)

    if re.search(r"^\s+- uses:\s+actions/checkout@v4\s*$", line):
        checkout_sites.append((number, current_job))

print("checkout sites:")
for line, job in checkout_sites:
    print(f"  line {line}: job={job}")

print(f"total checkout sites: {len(checkout_sites)}")
print("jobs with checkout:", ", ".join(job for _, job in checkout_sites))
print("workflow permissions declaration:",
      any(re.match(r"^permissions:\s*$", line) for line in lines))
print("checkout sites with persist-credentials: false:")
for line, job in checkout_sites:
    following = lines[line:line+3]
    if any("persist-credentials: false" in item for item in following):
        print(f"  line {line}: job={job}")
PY

Repository: BcKmini/claude-code-use

Length of output: 626


🏁 Script executed:

#!/bin/bash
set -euo pipefail

python3 - <<'PY'
from pathlib import Path
import re

path = Path(".github/workflows/ci.yml")
lines = path.read_text().splitlines()

current_job = None
checkout_sites = []

for number, line in enumerate(lines, 1):
    job = re.match(r"^  ([A-Za-z0-9_-]+):\s*$", line)
    if job and number >= 46:
        current_job = job.group(1)

    if re.search(r"^\s+- uses:\s+actions/checkout@v4\s*$", line):
        checkout_sites.append((number, current_job))

print("checkout sites:")
for line, job in checkout_sites:
    print(f"  line {line}: job={job}")

print(f"total checkout sites: {len(checkout_sites)}")
print("workflow permissions declaration:",
      any(re.match(r"^permissions:\s*$", line) for line in lines))
print("checkout sites with persist-credentials: false:")
for line, job in checkout_sites:
    following = lines[line:line+3]
    if any("persist-credentials: false" in item for item in following):
        print(f"  line {line}: job={job}")
PY

Repository: BcKmini/claude-code-use

Length of output: 514


모든 actions/checkout 단계에서 토큰 지속 저장을 비활성화하세요.

9개 checkout 단계(54, 71, 91, 108, 126, 144, 160, 184, 214행)에 persist-credentials: false를 추가하세요. 각 작업은 checkout 후 저장소 제어 코드를 실행하므로, 지속된 토큰을 읽을 수 있습니다. 또한 최상위에 permissions: contents: read를 설정하세요.

🧰 Tools
🪛 zizmor (1.29.0)

[warning] 71-71: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)

📍 Affects 1 file
  • .github/workflows/ci.yml#L71-L71 (this comment)
  • .github/workflows/ci.yml#L91-L91
  • .github/workflows/ci.yml#L160-L160
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ci.yml at line 71, Update all nine actions/checkout steps
in .github/workflows/ci.yml at lines 54, 71, 91, 108, 126, 144, 160, 184, and
214 to disable persisted credentials with persist-credentials: false, and add
top-level permissions granting contents: read.

Source: Linters/SAST tools


- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install tox
run: pip install tox

- name: Run tests
run: tox -e py

# ── Job: Python lint/format (ruff via tox) ───────────────────────────────────
python-lint:
name: Python lint (ruff)
runs-on: ubuntu-latest
defaults:
run:
working-directory: .
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.13"

- name: Install tox
run: pip install tox

- name: Lint + format check
run: tox -e lint,fmt-check

# ── Job: rustfmt ─────────────────────────────────────────────────────────────
fmt:
name: cargo fmt
Expand Down Expand Up @@ -102,6 +152,26 @@ jobs:
- name: Run workspace tests
run: cargo test --workspace

# ── Job: MSRV verification ────────────────────────────────────────────────────
msrv:
name: MSRV verify
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: dtolnay/rust-toolchain@stable

- uses: Swatinem/rust-cache@v2
with:
workspaces: rust -> target

- name: Install cargo-msrv
run: cargo install cargo-msrv --locked

- name: Discover the real MSRV
working-directory: rust/claude-tools
run: cargo msrv find
Comment on lines +171 to +173

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🌐 Web query:

In cargo-msrv documentation, what is the behavioral difference between cargo msrv findandcargo msrv verify? Does cargo msrv findfail when the discovered MSRV differs frompackage.rust-version in Cargo.toml?

💡 Result:

In cargo-msrv, the primary behavioral difference between find and verify lies in their objective: - cargo msrv find is used to discover what the minimum supported Rust version (MSRV) of a project is [1][2][3]. It performs a search (binary or linear) across available Rust toolchains to identify the earliest toolchain that satisfies the project's requirements [3]. - cargo msrv verify is used to confirm whether a project is compatible with a pre-defined MSRV, typically one already specified in the project's Cargo.toml manifest (via package.rust-version or package.metadata.msrv) [1][2][4]. It does not perform a search; instead, it runs a single compatibility check against the specified version and returns success (exit code 0) or failure (non-zero exit code) [1][4]. Regarding your second question: No, cargo msrv find does not fail specifically because the discovered MSRV differs from the package.rust-version in Cargo.toml. The purpose of cargo msrv find is to independently determine the MSRV based on the project's actual compatibility [3]. If you run cargo msrv find and the resulting MSRV does not match the version currently written in your Cargo.toml, the tool simply reports the newly discovered version (and can optionally update the manifest if the --write-msrv flag is used) [5][3]. The tool treats the discovery process as an independent assessment of compatibility [3]. If you want to check for discrepancies, you would typically use cargo msrv verify, which evaluates whether the currently defined MSRV is still valid [4].

Citations:


🏁 Script executed:

#!/bin/bash
set -eu
printf '%s\n' '--- workflow context ---'
sed -n '145,185p' .github/workflows/ci.yml
printf '%s\n' '--- MSRV declarations and cargo-msrv setup ---'
rg -n -C 3 'cargo-msrv|msrv|rust-version' .github/workflows/ci.yml rust/claude-tools/Cargo.toml

Repository: BcKmini/claude-code-use

Length of output: 2750


선언된 MSRV를 검증하세요.

cargo msrv find는 최소 버전을 탐색할 뿐, rust-version = "1.78"의 호환성을 검증하지 않습니다. cargo msrv verify를 사용하거나 Rust 1.78 toolchain에서 cargo check --locked를 실행하세요.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ci.yml around lines 171 - 173, Update the “Discover the
real MSRV” workflow step to validate the declared Rust 1.78 MSRV instead of
discovering a version: replace the cargo msrv find operation with cargo msrv
verify, or run cargo check --locked using the Rust 1.78 toolchain.


# ── Job: Windows smoke build ─────────────────────────────────────────────────
windows-smoke:
name: Windows build smoke
Expand Down
10 changes: 8 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,11 @@ install-rust: build ## Build Rust binary and install to ~/.local/bin/
@echo "Installed claude-tools → $(BIN_TARGET)/claude-tools"

# ─── test ──────────────────────────────────────────────────────────────────
.PHONY: test test-rust test-python test-agents
test: test-rust test-python ## Run all tests
.PHONY: test test-rust test-python test-agents tox
test: test-rust test-python ## Run all tests (fast, zero-dependency smoke checks)

tox: ## Full Python test matrix + lint (requires: pip install tox ruff)
tox
Comment on lines +76 to +80

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

msrv.PHONY에 추가하세요.

msrv 파일 또는 디렉터리가 존재하면 make msrv가 Line 120의 검증 명령을 실행하지 않습니다. 문서가 이 타겟을 검증 절차로 안내하므로 항상 실행되게 해야 합니다.

수정 예시
-.PHONY: test test-rust test-python test-agents tox
+.PHONY: test test-rust test-python test-agents tox msrv
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
.PHONY: test test-rust test-python test-agents tox
test: test-rust test-python ## Run all tests (fast, zero-dependency smoke checks)
tox: ## Full Python test matrix + lint (requires: pip install tox ruff)
tox
.PHONY: test test-rust test-python test-agents tox msrv
test: test-rust test-python ## Run all tests (fast, zero-dependency smoke checks)
tox: ## Full Python test matrix + lint (requires: pip install tox ruff)
tox
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Makefile` around lines 76 - 80, Add msrv to the .PHONY declaration alongside
the existing test and tox targets, ensuring the msrv validation target always
runs even when an msrv file or directory exists.


test-rust: ## Cargo check + clippy
cd $(RUST_DIR) && $(CARGO) check
Expand Down Expand Up @@ -113,6 +116,9 @@ test-agents: ## Verify agent files exist and are non-empty
lint: ## Clippy lint (Rust)
cd $(RUST_DIR) && $(CARGO) clippy -- -D warnings

msrv: ## Verify the crate builds on its declared MSRV (requires: cargo install cargo-msrv)
cd $(RUST_DIR)/claude-tools && cargo msrv verify

fmt: ## Format all code (Rust + Python)
bash scripts/fmt.sh

Expand Down
16 changes: 12 additions & 4 deletions README.ko.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square)](LICENSE)
[![Python 3.8+](https://img.shields.io/badge/Python-3.8%2B-blue?style=flat-square&logo=python&logoColor=white)](https://www.python.org)
[![Rust](https://img.shields.io/badge/Rust-1.75%2B-orange?style=flat-square&logo=rust)](https://www.rust-lang.org)
[![Rust](https://img.shields.io/badge/Rust-1.78%2B-orange?style=flat-square&logo=rust)](https://www.rust-lang.org)
[![Platform](https://img.shields.io/badge/Platform-Windows%20%7C%20macOS%20%7C%20Linux-lightgrey?style=flat-square)](https://github.com/BcKmini/Claudecode-Agent)
[![Claude Code](https://img.shields.io/badge/Claude_Code-Compatible-blueviolet?style=flat-square&logo=anthropic)](https://claude.ai/code)
[![Agents](https://img.shields.io/badge/Agents-11-green?style=flat-square)](#에이전트-구성)
Expand Down Expand Up @@ -431,9 +431,11 @@ make help # 전체 타겟 목록
make install # 에이전트 + 슬래시 커맨드 + Python 도구
make install-rust # Rust 바이너리 빌드 및 설치
make build # cargo build --release
make test # 전체 테스트
make lint # clippy + ruff
make fmt # rustfmt + ruff format
make test # 빠른 스모크 테스트 (추가 의존성 없음)
make tox # 전체 Python 테스트 매트릭스(py38-py313) + lint + fmt-check
make msrv # Rust 크레이트가 명시된 MSRV에서 빌드되는지 검증
make lint # clippy (Rust)
make fmt # rustfmt + ruff format (범위 한정 — CONTRIBUTING.ko.md 참고)
make status # git log + 도구 설치 상태 확인
make env # Claude 환경 헬스체크
make clean # 빌드 아티팩트 제거
Expand All @@ -446,6 +448,8 @@ make clean # 빌드 아티팩트 제거
```
claude-code-use/
├── Makefile ← 빌드 / 설치 / 테스트 / 정리
├── tox.ini ← Python 테스트 매트릭스 + lint + fmt-check
├── pyproject.toml ← ruff 설정 (이 저장소 스타일에 맞게 범위 한정)
├── install.sh ← 원라인 설치 스크립트
├── setup-agents.ps1 ← Windows 빠른 설치
├── setup-agents.sh ← macOS / Linux 빠른 설치
Expand Down Expand Up @@ -473,6 +477,10 @@ claude-code-use/
│ ├── claude-lessons.py ← 신규 실패/교훈 기록
│ ├── install-tools.ps1 · install-tools.sh
├── tests/ ← tools/*.py용 pytest 스위트
│ ├── conftest.py ← run_tool / home / git_repo 픽스처
│ └── test_*.py ← 도구당 파일 하나
├── rust/claude-tools/src/
│ ├── main.rs · snippet.rs · handoff.rs · cost.rs
│ ├── watch.rs · env.rs · colors.rs
Expand Down
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square)](LICENSE)
[![Python 3.8+](https://img.shields.io/badge/Python-3.8%2B-blue?style=flat-square&logo=python&logoColor=white)](https://www.python.org)
[![Rust](https://img.shields.io/badge/Rust-1.75%2B-orange?style=flat-square&logo=rust)](https://www.rust-lang.org)
[![Rust](https://img.shields.io/badge/Rust-1.78%2B-orange?style=flat-square&logo=rust)](https://www.rust-lang.org)
[![Platform](https://img.shields.io/badge/Platform-Windows%20%7C%20macOS%20%7C%20Linux-lightgrey?style=flat-square)](https://github.com/BcKmini/Claudecode-Agent)
[![Claude Code](https://img.shields.io/badge/Claude_Code-Compatible-blueviolet?style=flat-square&logo=anthropic)](https://claude.ai/code)
[![Agents](https://img.shields.io/badge/Agents-11-green?style=flat-square)](#agent-roster)
Expand Down Expand Up @@ -433,9 +433,11 @@ make help # list all targets
make install # agents + slash commands + Python tools
make install-rust # build and install Rust binary
make build # cargo build --release
make test # all tests
make lint # clippy + ruff
make fmt # rustfmt + ruff format
make test # fast smoke tests (no extra deps)
make tox # full Python test matrix (py38-py313) + lint + fmt-check
make msrv # verify the Rust crate builds on its declared MSRV
make lint # clippy (Rust)
make fmt # rustfmt + ruff format (scoped — see CONTRIBUTING.md)
make status # git log + tool install check
make env # Claude environment health check
make clean # remove build artifacts
Expand All @@ -448,6 +450,8 @@ make clean # remove build artifacts
```
Claudecode-Agent/
├── Makefile ← build / install / test / clean
├── tox.ini ← Python test matrix + lint + fmt-check
├── pyproject.toml ← ruff config (scoped to this repo's style)
├── setup-agents.ps1 ← Windows quick installer
├── setup-agents.sh ← macOS / Linux quick installer
Expand Down Expand Up @@ -489,6 +493,10 @@ Claudecode-Agent/
│ ├── install-tools.ps1 ← Windows tool installer
│ └── install-tools.sh ← macOS/Linux tool installer
├── tests/ ← pytest suite for tools/*.py
│ ├── conftest.py ← run_tool / home / git_repo fixtures
│ └── test_*.py ← one file per tool
├── rust/claude-tools/src/
│ ├── main.rs
│ ├── snippet.rs
Expand Down
25 changes: 20 additions & 5 deletions docs/CONTRIBUTING.ko.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,26 @@ python --version # 3.8+ 필요
make status # 설치 상태 확인
```

`snippet.py`, `claude-handoff.py`, `claude-cost.py`, `claude-review-diff.py`, `claude-remind.py` 모두 Python 표준 라이브러리만 사용합니다 — `pip install` 불필요.
`snippet.py`, `claude-handoff.py`, `claude-cost.py`, `claude-review-diff.py`, `claude-remind.py`, `claude-harness.py`, `claude-pipeline.py`, `claude-lessons.py` 모두 Python 표준 라이브러리만 사용합니다 — *실행*에는 `pip install` 불필요. 테스트에는 dev 의존성이 필요합니다:

```bash
pip install tox
tox # 전체 매트릭스: py38-py313(설치 안 된 버전은 건너뜀) + lint + fmt-check
tox -e py # 현재 인터프리터로 tests/만 실행
tox -e lint # ruff check tools/ tests/
```

ruff 설정은 `pyproject.toml`에 있습니다 — 전체 기본 룰셋이 아니라 `E`/`F`/`I`/`UP`(실질적 버그, 미사용 import, import 순서, 문법 현대화)로 범위를 좁혔고, `E402`는 무시합니다 — 모든 도구가 docstring 바로 뒤, import보다 먼저 `VERSION` 상수를 두는 게 의도된 스타일이기 때문입니다. `fmt-check`는 `tools/claude-lessons.py`와 `tests/`만 검사합니다 — 기존 도구들은 `ruff format`이 없애버릴 의도적인 정렬 스타일을 쓰고 있어서, 저장소 전체에는 강제하지 않습니다.

Rust 바이너리:

```bash
cd rust
cargo check # 빌드 확인
cargo build --release

cargo install cargo-msrv --locked
cd claude-tools && cargo msrv verify # 명시된 rust-version에서 여전히 빌드되는지 확인
```

---
Expand Down Expand Up @@ -82,9 +94,10 @@ python tools/snippet.py run my-snippet --dry-run
- `NO_COLOR` 환경변수 준수
2. `.claude/commands/<name>.md` 슬래시 커맨드 문서 추가
3. `Makefile` → `install-tools` 타겟과 `status` 타겟에 추가
4. Rust 구현 추가 시: `rust/claude-tools/src/<name>.rs` 작성 후 `main.rs`에 연결
5. `README.md`와 `README.ko.md`의 도구 섹션, 슬래시 커맨드 테이블, 저장소 구조 업데이트
6. `docs/AGENT-CHEATSHEET.md`와 `docs/AGENT-CHEATSHEET.ko.md` 업데이트
4. `tests/test_<name>.py` 추가 (`tests/conftest.py`의 `run_tool`/`home`/`git_repo` 픽스처 사용, subprocess 기반) 후 `tox -e py,lint` 통과 확인
5. Rust 구현 추가 시: `rust/claude-tools/src/<name>.rs` 작성 후 `main.rs`에 연결
6. `README.md`와 `README.ko.md`의 도구 섹션, 슬래시 커맨드 테이블, 저장소 구조 업데이트
7. `docs/AGENT-CHEATSHEET.md`와 `docs/AGENT-CHEATSHEET.ko.md` 업데이트

---

Expand Down Expand Up @@ -116,11 +129,13 @@ python tools/snippet.py run my-snippet --dry-run
- [ ] `snippet import snippets/defaults.json` 정상 작동
- [ ] `cargo check` 통과 (Rust 변경 시)
- [ ] `make test` 통과
- [ ] `tox` 통과 — 최소 `tox -e py,lint` (Python 변경 시)
- [ ] `cargo msrv verify` 통과 (Rust 변경 시 — 명시된 `rust-version`에서 여전히 빌드되는지 확인)
- [ ] 새 스니펫·에이전트·도구 추가 시 README 테이블 업데이트됨
- [ ] **EN/KO 문서 쌍 모두 업데이트됨** (README, CHEATSHEET, SETUP, INTEGRATION 해당 항목)
- [ ] 새 도구 추가 시 슬래시 커맨드 `.md` 파일 추가됨
- [ ] 새 도구 추가 시 `Makefile` 업데이트됨
- [ ] 외부 의존성 새로 추가하지 않음
- [ ] `tools/`에는 외부 의존성 새로 추가하지 않음 (`examples/` 스크립트는 예외 — Code Style 참고)

---

Expand Down
25 changes: 20 additions & 5 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,26 @@ python --version # 3.8+ required
make status # check what's installed
```

`snippet.py`, `claude-handoff.py`, `claude-cost.py`, `claude-review-diff.py`, `claude-remind.py` all use only the Python standard library — no `pip install` needed.
`snippet.py`, `claude-handoff.py`, `claude-cost.py`, `claude-review-diff.py`, `claude-remind.py`, `claude-harness.py`, `claude-pipeline.py`, `claude-lessons.py` all use only the Python standard library — no `pip install` needed to *run* them. Testing them does need dev dependencies:

```bash
pip install tox
tox # full matrix: py38-py313 (skips interpreters you don't have) + lint + fmt-check
tox -e py # just run tests/ on your current interpreter
tox -e lint # ruff check tools/ tests/
```

Ruff's config lives in `pyproject.toml` — it's scoped to `E`/`F`/`I`/`UP` (real bugs, unused imports, import order, modernization), not the full default ruleset, and `E402` is ignored because every tool deliberately puts its `VERSION` constant right after the docstring, before imports. `fmt-check` only covers `tools/claude-lessons.py` and `tests/` — the older tools use a deliberate hand-aligned style that `ruff format` would flatten, so it isn't enforced repo-wide.

For the Rust binary:

```bash
cd rust
cargo check # verify build
cargo build --release

cargo install cargo-msrv --locked
cd claude-tools && cargo msrv verify # confirm it still builds on the declared rust-version
```

---
Expand Down Expand Up @@ -82,9 +94,10 @@ python tools/snippet.py run my-snippet --dry-run
- Respect `NO_COLOR` environment variable
2. Add `.claude/commands/<name>.md` slash command doc
3. Add the tool to `Makefile` → `install-tools` target and `status` target
4. If adding a Rust implementation, add `rust/claude-tools/src/<name>.rs` and wire it into `main.rs`
5. Update `README.md` and `README.ko.md` tool sections, slash command table, and repo layout
6. Update `docs/AGENT-CHEATSHEET.md` and `docs/AGENT-CHEATSHEET.ko.md`
4. Add `tests/test_<name>.py` (subprocess-based, using the `run_tool`/`home`/`git_repo` fixtures in `tests/conftest.py`) and confirm `tox -e py,lint` passes
5. If adding a Rust implementation, add `rust/claude-tools/src/<name>.rs` and wire it into `main.rs`
6. Update `README.md` and `README.ko.md` tool sections, slash command table, and repo layout
7. Update `docs/AGENT-CHEATSHEET.md` and `docs/AGENT-CHEATSHEET.ko.md`

---

Expand Down Expand Up @@ -116,11 +129,13 @@ examples (e.g. an MCP server) that legitimately need a third-party package. Keep
- [ ] `snippet import snippets/defaults.json` still works
- [ ] `cargo check` passes (Rust changes)
- [ ] `make test` passes
- [ ] `tox` passes — at minimum `tox -e py,lint` (Python changes)
- [ ] `cargo msrv verify` passes (Rust changes — confirms the declared `rust-version` still builds)
- [ ] README tables updated if new snippets / agents / tools added
- [ ] **Both EN and KO docs updated** (README, CHEATSHEET, SETUP, INTEGRATION as applicable)
- [ ] Slash command `.md` added if new tool introduced
- [ ] `Makefile` updated if new tool added
- [ ] No new external dependencies introduced
- [ ] No new external dependencies introduced in `tools/` (an `examples/` script may declare one — see Code Style)

---

Expand Down
9 changes: 9 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[tool.ruff]
line-length = 100
target-version = "py38"

[tool.ruff.lint]
# E402 ignored: every tool in tools/ deliberately puts a VERSION constant
# right after the module docstring, before imports, for easy `grep`.
select = ["E", "F", "I", "UP"]
ignore = ["E501", "E402"]
1 change: 1 addition & 0 deletions rust/claude-tools/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "claude-tools"
version = "1.0.0"
edition = "2021"
rust-version = "1.78"
description = "Claude Code productivity CLI: snippet manager, session handoff, cost estimator"
authors = ["BcKmini"]
license = "MIT"
Expand Down
8 changes: 6 additions & 2 deletions scripts/fmt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,20 @@ else
fi

# ── Python ─────────────────────────────────────────────────────────────────
# Scoped to claude-lessons.py + tests/, not all of tools/: most existing
# tools/*.py use a deliberate hand-aligned style (aligned `=`, aligned dict
# values) that `ruff format` would flatten. See tox.ini's fmt-check comment.
PY_FMT_TARGETS=("$REPO_ROOT/tools/claude-lessons.py" "$REPO_ROOT/tests/")
if command -v ruff &>/dev/null; then
if [ "$CHECK" -eq 1 ]; then
if ruff format --check "$REPO_ROOT/tools/" 2>/dev/null; then
if ruff format --check "${PY_FMT_TARGETS[@]}" 2>/dev/null; then
ok "Python: ruff format check passed"
else
fail "Python: ruff format check failed — run: bash scripts/fmt.sh"
FAILURES=$((FAILURES+1))
fi
else
ruff format "$REPO_ROOT/tools/" 2>/dev/null && ok "Python: ruff format applied"
ruff format "${PY_FMT_TARGETS[@]}" 2>/dev/null && ok "Python: ruff format applied"
fi
else
printf ' skipping Python (ruff not found)\n'
Expand Down
Loading
Loading