Skip to content

Commit 867e2f4

Browse files
web-flowclaude
andcommitted
ci: ContextPreloader / ConsiderateCoder に静的チェックを配線し版を上げる
診断を 0 にしても検査が無ければまた溜まる。配線して初めて「溜まらない」が 成立する(BlueberrySprite v0.43.0 で 133 ファイルが溜まった経路と同じもの)。 - .github/workflows/test.yml: 両プラグインに lint-* / type-check-* ジョブを リポの既存の型どおりに追加(ruff check・ruff format --check・mypy strict)。 ルールの正典は各 pyproject で、YAML には select も ignore も書かない - **陳腐化するコメントを実体へ追随**——test-* ジョブの「pyproject を持たない」は 本 commit で偽になる。pyproject は在るが [project] を持たないので editable install はできない、という現状に書き換えた - 版数は plugin.json / marketplace.json / CHANGELOG の三点同期: ContextPreloader 1.0.0 → 1.1.0(pathlib 移行と B904 修正を含むので minor) ConsiderateCoder 1.5.2 → 1.6.0(union-attr の修正を含むので minor) - .git-blame-ignore-revs に ContextPreloader の整形 commit を登録 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent c945654 commit 867e2f4

7 files changed

Lines changed: 172 additions & 6 deletions

File tree

.claude-plugin/marketplace.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
"name": "ContextPreloader",
7676
"source": "./ContextPreloader",
7777
"description": "Session context preloader - recreates claude.ai Project feature for Claude Code",
78-
"version": "1.0.0",
78+
"version": "1.1.0",
7979
"author": {
8080
"name": "Weave @ ContextPreloader"
8181
},
@@ -138,7 +138,7 @@
138138
"name": "ConsiderateCoder",
139139
"source": "./ConsiderateCoder",
140140
"description": "Development methodology plugin: Clean Architecture x TDD x three-tier delegation (communicator / orchestrator / worker) with /plan-sdd, /outsource and /dig commands",
141-
"version": "1.5.2",
141+
"version": "1.6.0",
142142
"author": {
143143
"name": "Weave @ ConsiderateCoder"
144144
},

.git-blame-ignore-revs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# `git blame` から除外するリビジョン。
2+
#
3+
# 整形だけの一括 commit は全行の blame を自分に書き換えてしまい、「この行を
4+
# 書いたのは誰で、なぜか」を辿る手段を潰す。ここに挙げた revision は blame が
5+
# 素通りし、その一つ前の実質的な変更を指すようになる。
6+
#
7+
# GitHub の blame ビューは本ファイルを自動で読む。手元では clone ごとに一度:
8+
# git config blame.ignoreRevsFile .git-blame-ignore-revs
9+
#
10+
# 挙げてよいのは「意味を変えていないことを実測で示した commit」だけ。
11+
# 挙動が 1 ビットでも変わる commit を隠すと、事故の出所が消える。
12+
13+
# style(contextpreloader): ruff format を適用する (25 files) — 2026-08-25
14+
# pytest 112 / mypy 36 files / ruff check が適用前後で完全一致
15+
35ed241925fc45aeb53f3c698474af168e6d7ba8

.github/workflows/test.yml

Lines changed: 88 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -607,6 +607,48 @@ jobs:
607607
# ContextPreloader Jobs
608608
# =============================================================================
609609

610+
lint-contextpreloader:
611+
runs-on: ubuntu-latest
612+
steps:
613+
- uses: actions/checkout@v7
614+
615+
- name: Set up Python
616+
uses: actions/setup-python@v7
617+
with:
618+
python-version: "3.10"
619+
620+
- name: Install ruff
621+
run: pip install ruff==0.16.0
622+
623+
# ルールの正典は ContextPreloader/pyproject.toml の [tool.ruff]。ここでは呼ぶだけ。
624+
- name: Run ruff linter
625+
working-directory: ContextPreloader
626+
run: ruff check .
627+
628+
# --check は書き換えず差分の有無だけを見る(CI が勝手にコードを直して
629+
# green にする経路は作らない)。
630+
- name: Run ruff formatter check
631+
working-directory: ContextPreloader
632+
run: ruff format --check .
633+
634+
type-check-contextpreloader:
635+
runs-on: ubuntu-latest
636+
steps:
637+
- uses: actions/checkout@v7
638+
639+
- name: Set up Python
640+
uses: actions/setup-python@v7
641+
with:
642+
python-version: "3.10"
643+
644+
- name: Install mypy
645+
run: pip install mypy==2.3.0
646+
647+
# strict は ContextPreloader/pyproject.toml の [tool.mypy] が SSoT。
648+
- name: Run mypy
649+
working-directory: ContextPreloader
650+
run: mypy scripts hooks
651+
610652
test-contextpreloader:
611653
runs-on: ubuntu-latest
612654
strategy:
@@ -621,7 +663,8 @@ jobs:
621663
with:
622664
python-version: ${{ matrix.python-version }}
623665

624-
# pyproject を持たない stdlib-only プラグイン(editable install する対象が無い)ため、
666+
# pyproject.toml は在るが [project] / [build-system] を持たない(ruff / mypy /
667+
# pytest が設定を読む場所としてのみ置いてある)ので editable install はできない。
625668
# 他プラグインの `pip install -e X[dev]` ではなく pytest 単体を入れる。
626669
- name: Install pytest
627670
run: |
@@ -638,6 +681,48 @@ jobs:
638681
# ConsiderateCoder Jobs
639682
# =============================================================================
640683

684+
lint-consideratecoder:
685+
runs-on: ubuntu-latest
686+
steps:
687+
- uses: actions/checkout@v7
688+
689+
- name: Set up Python
690+
uses: actions/setup-python@v7
691+
with:
692+
python-version: "3.10"
693+
694+
- name: Install ruff
695+
run: pip install ruff==0.16.0
696+
697+
# ルールの正典は ConsiderateCoder/pyproject.toml の [tool.ruff]。ここでは呼ぶだけ。
698+
- name: Run ruff linter
699+
working-directory: ConsiderateCoder
700+
run: ruff check .
701+
702+
# --check は書き換えず差分の有無だけを見る(CI が勝手にコードを直して
703+
# green にする経路は作らない)。
704+
- name: Run ruff formatter check
705+
working-directory: ConsiderateCoder
706+
run: ruff format --check .
707+
708+
type-check-consideratecoder:
709+
runs-on: ubuntu-latest
710+
steps:
711+
- uses: actions/checkout@v7
712+
713+
- name: Set up Python
714+
uses: actions/setup-python@v7
715+
with:
716+
python-version: "3.10"
717+
718+
- name: Install mypy
719+
run: pip install mypy==2.3.0
720+
721+
# strict は ConsiderateCoder/pyproject.toml の [tool.mypy] が SSoT。
722+
- name: Run mypy
723+
working-directory: ConsiderateCoder
724+
run: mypy tests
725+
641726
test-consideratecoder:
642727
runs-on: ubuntu-latest
643728
strategy:
@@ -652,7 +737,8 @@ jobs:
652737
with:
653738
python-version: ${{ matrix.python-version }}
654739

655-
# 規範・テンプレート群を検査する stdlib-only スイート(pyproject 無し)。
740+
# 規範・テンプレート群を検査する stdlib-only スイート。pyproject.toml は
741+
# 設定専用([project] 無し)なので editable install はできない。
656742
- name: Install pytest
657743
run: |
658744
python -m pip install --upgrade pip

ConsiderateCoder/.claude-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ConsiderateCoder",
3-
"version": "1.5.2",
3+
"version": "1.6.0",
44
"description": "Development methodology plugin: Clean Architecture x TDD x three-tier delegation (communicator / orchestrator / worker) with /plan-sdd, /outsource and /dig commands",
55
"author": {
66
"name": "Weave @ ConsiderateCoder"

ConsiderateCoder/CHANGELOG.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,31 @@
22

33
すべての主要な変更をこのファイルに記録する。形式は [Keep a Changelog](https://keepachangelog.com/ja/1.1.0/)、バージョニングは [Semantic Versioning](https://semver.org/lang/ja/) に準拠する。
44

5+
## [1.6.0] - 2026-08-25
6+
7+
### Added
8+
9+
- `pyproject.toml`(新設)— `[tool.ruff]` / `[tool.mypy]` / `[tool.pytest.ini_options]`**`[project]` /
10+
`[build-system]` は置かない**(本プラグインの実体は skills/ と commands/ の Markdown で、Python は
11+
tests/ の 4 本だけ。設定を読む場所としてのみ要る)。規約はワークスペースの**和集合**(同日確定)——
12+
ruff の select 10 集合 + mypy strict
13+
- CI に `lint-consideratecoder` / `type-check-consideratecoder` ジョブ。**方法論を配る側が自分の
14+
検証コードを検めていないのは筋が通らない**
15+
16+
### Fixed
17+
18+
- **`re.search(...).group(1)` が None 参照になりうる箇所を 1 件**`test_stage2_usecase.py`)。
19+
match を束ねて `assert` を挟み、「orchestrator の frontmatter に `tools:` 行が在ること」という
20+
テストの意図をコードに書いた。mypy strict の `union-attr` が検出
21+
22+
### Changed
23+
24+
- lint 2 件(`E741`: `l``line`)、mypy strict 57 → 0(35 件は `-> None` の付与、ヘルパー 4 本の
25+
型付けで `no-untyped-call` 17 件が連鎖で解消)、`ruff format` を適用(4 files)
26+
- テストは **35 passed で作業前後同一**
27+
28+
---
29+
530
## [1.5.2] - 2026-08-20
631

732
### Added

ContextPreloader/.claude-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ContextPreloader",
3-
"version": "1.0.0",
3+
"version": "1.1.0",
44
"description": "Session context preloader - recreates claude.ai Project feature for Claude Code",
55
"author": {
66
"name": "Weave @ ContextPreloader"

ContextPreloader/CHANGELOG.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,45 @@
11
# Changelog
22

3+
## [1.1.0] - 2026-08-25 — 静的チェックの配線と os.path → pathlib 移行
4+
5+
本プラグインは CI が pytest しか回しておらず、ruff も mypy も持たなかった。規約はワークスペースの
6+
**和集合**(同日確定)—— ruff の select を広く取り(書き方の危険を機械検出)、mypy は strict
7+
(型の不整合を機械検出)。両者は直交しており、片方だけではどちらかが素通りする。
8+
9+
### Added
10+
11+
- `pyproject.toml`(新設)— `[tool.ruff]` / `[tool.mypy]` / `[tool.pytest.ini_options]`**`[project]` /
12+
`[build-system]` は置かない**(配布物ではなく `python -m scripts` で起動されるフック実装で、
13+
設定を読む場所としてのみ要る)
14+
- CI に `lint-contextpreloader` / `type-check-contextpreloader` ジョブ(ruff check・
15+
ruff format --check・mypy strict)。ルールの正典は pyproject で、YAML には書かない
16+
17+
### Changed
18+
19+
- **lint 診断 124 → 0。** うち **73 件が `os.path``pathlib` 移行**`PTH108` 37 / `PTH123` 18 /
20+
`PTH118` 7 ほか)、`SIM115` 11 件を `with` 化(Windows では閉じ漏れハンドルが後続の open を
21+
実際に塞ぐ)、`SIM102` / `E741` ほか
22+
- **mypy strict 158 → 0。** 119 件は `-> None` の付与、ヘルパー 4 本の型付けで `no-untyped-call`
23+
13 件が連鎖で解消、裸の `dict` に型引数
24+
- `ruff format` を適用(25 files)
25+
26+
### Fixed
27+
28+
- **`B904` 6 件 — `except` 節で例外連鎖が切れていた**`config_repository` 2 / `file_reader` 4)。
29+
`raise ... from e` を置き、元の例外のトレースバックが失われる経路を塞いだ
30+
- ⚠️ **移行作業そのものが本番バグを 1 件生み、実測で捕まえた。** `os.path.join``Path(a) / b`
31+
戻り値を str から Path に変える。`hooks``_CANDIDATE_PATHS` はそのまま `sys.path.insert()`
32+
渡っており、**`sys.path` は Path を受け付けない**(実測: `ModuleNotFoundError`)。フックのパス解決は
33+
unit test が踏まないので pytest は素通りしていた。`str()` を戻し理由をコードに残した。
34+
同型の型ズレ 11 件は **strict mypy が検出**——lint と型が直交していることの実例
35+
36+
### Tests
37+
38+
- **112 passed — 作業前後で完全一致。** 加えてフックを実起動して exit 0 を確認(env 経由・既定パスの
39+
両方)、`python -m scripts list` も exit 0
40+
41+
---
42+
343
## [1.0.0] - 2026-03-24
444

545
### Added

0 commit comments

Comments
 (0)