Repository navigation
Open
Labels
enhancementNew feature or requestphase/implementationImplementation phasestate/blockedblocked by another issuestate/queuedQueued for implementation
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: implementation
parent_issue: none
goal_ref: "CI guard の executable bit 監査対象をリポジトリ全域の *.sh / *.py に拡張し、.claude/skills 外のスクリプトの mode 消失も CI ブロッカーとして検知できる状態にする"
change_kind: codeParent Issue
なし(単独改善)
Parent Goal Ref
- Goal: なし(単独改善)
- Desired Destination: N/A
Current Validated Scope
scripts/check-executable-bits.sh(実装: .claude/skills 配下スクリプトの executable bit を監査し CI guard を追加する #205 で作成予定)の対象パターンを.claude/skills/**/*.shから**/*.sh/**/*.py(またはプロジェクト全域)に拡張する- 拡張後の guard スクリプトが
scripts/以外のディレクトリ(例:tmp/等の除外対象)を適切にスキップするよう修正する - CI ワークフロー(
.github/workflows/)の guard ジョブを更新し、拡張された対象範囲でチェックが実行されるようにする - 任意:
docs/dev/に executable bit 管理ポリシーを追記する
Remaining Parent Gaps
なし
Outcome
scripts/check-executable-bits.sh(#205 成果物)の監査対象パターンが **/*.sh / **/*.py に拡張されたコミットが main にマージされ、.claude/skills 外の .sh / .py ファイルの mode 消失も CI 失敗としてブロックされる状態になる。
In Scope
scripts/check-executable-bits.shの対象パターン拡張(.claude/skills/**→**/*.sh/**/*.pyまたはリポジトリ全域)- 除外対象ディレクトリ(
tmp/、node_modules/等)のスキップ処理追加 - CI ワークフロー(
.github/workflows/)の guard ジョブ更新 - 任意:
docs/dev/に executable bit 管理ポリシーのドキュメント追記
Out of Scope
- 実装: .claude/skills 配下スクリプトの executable bit を監査し CI guard を追加する #205 本体の実装変更(実装: .claude/skills 配下スクリプトの executable bit を監査し CI guard を追加する #205 で扱う)
.gitattributesの変更(Issue 実装: .gitattributes を追加し .claude/skills 配下スクリプトの CRLF 破損を防ぐ #97 の対象)- CRLF 改行コード問題(Issue 実装: .gitattributes を追加し .claude/skills 配下スクリプトの CRLF 破損を防ぐ #97 の対象)
git add --renormalizeの実行(Issue 調査: .gitattributes 追加後の git add --renormalize 適用範囲と実施タイミングを設計する #206 の対象)- Windows 環境での executable bit の扱い(Git が管理する filemode のみ対象)
Acceptance Criteria
-
scripts/check-executable-bits.shの対象パターンが拡張され、.claude/skills外の.sh/.pyファイルも監査対象になっている -
tmp/、node_modules/等の除外対象が guard スクリプト内でスキップされている - CI ワークフロー(
.github/workflows/)の guard ジョブが更新されており、拡張後の範囲でチェックが実行される -
.claude/skills外のディレクトリ(例:scripts/)に存在する.shファイルの mode を 644 に変更した場合、CI guard が exit 1 を返すことをローカル dry-run で確認できる - pnpm typecheck / pnpm lint / pnpm test / pnpm build が通る
Verification Commands
# AC1: guard スクリプトの対象パターンが .claude/skills 外を含むことを確認
grep -n '\.claude/skills' scripts/check-executable-bits.sh && echo "WARN: still limited to .claude/skills only" || echo "PASS: pattern is not limited to .claude/skills"
# AC2: 除外対象ディレクトリのスキップ処理が存在することを確認
grep -nE '(node_modules|tmp)' scripts/check-executable-bits.sh && echo "PASS: exclude patterns found" || echo "FAIL: exclude patterns not found"
# AC3: CI ワークフローに guard ジョブが存在し、拡張後の記述になっていることを確認
grep -rn "check-executable" .github/workflows/ && echo "PASS: CI guard job found" || echo "FAIL: CI guard job not found"
# AC4: guard スクリプトの dry-run(scripts/ 等のファイルを含めて mode チェック)
bash scripts/check-executable-bits.sh && echo "PASS: no mode violations" || echo "FAIL: mode violation detected"
# AC5: 品質ゲート
pnpm typecheck && pnpm lint && pnpm test && pnpm buildAllowed Paths
scripts/check-executable-bits.sh(対象パターン拡張).github/workflows/(CI ジョブ更新)docs/dev/(executable bit 管理ポリシー追記、任意)
Stop Conditions
- Allowed Paths 外の変更が必要と判明した場合
- In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
- 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
- 後続 Phase / 別スコープへの波及が判明した場合
- nested SubAgent delegation が必要になった場合
- 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
- 実装: .claude/skills 配下スクリプトの executable bit を監査し CI guard を追加する #205 の成果物(
scripts/check-executable-bits.sh)が予想と大きく異なり、パターン拡張の方法が変わる場合
Required Skills
- Bash / POSIX shell
- Git filemode(
git ls-tree/git ls-files) - GitHub Actions YAML
Scope Delta(任意)
N/A
Background
Issue #205 では .claude/skills 配下の .sh / .py スクリプトの executable bit を CI で監査する guard を実装する。しかし、リポジトリには scripts/ 等の他ディレクトリにも実行可能スクリプトが存在する可能性があり、#205 の guard が .claude/skills 限定だと他ディレクトリのスクリプトの mode 消失は検知されない。本 Issue は #205 の完了後に、CI guard の対象範囲をリポジトリ全域の *.sh / *.py に拡張する follow-up である。
Depends on #205
関連 Issue:
- 実装: .gitattributes を追加し .claude/skills 配下スクリプトの CRLF 破損を防ぐ #97:
.gitattributes追加(CRLF 問題) - 実装: .claude/skills 配下スクリプトの executable bit を監査し CI guard を追加する #205: executable bit audit CI guard 本体(Blocked by)
- 調査: .gitattributes 追加後の git add --renormalize 適用範囲と実施タイミングを設計する #206:
git add --renormalize
Source
- dedupe_key:
follow-up:squne121/loop-protocol:pr/212:exec-bit-audit-extension
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestphase/implementationImplementation phasestate/blockedblocked by another issuestate/queuedQueued for implementation
Activity