Repository navigation
Closed
Labels
agent/implementerAI implementer agentenhancementNew feature or requestphase/implementationImplementation phasetriage-requiredNeeds owner triage for priority decision
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: implementation
parent_issue: "none"
goal_ref: "Python invocation-policy checker (#1193) の regression follow-up: gitignore済みのruntime-local surface `.claude/skills/.system/**` を governed surface として誤走査する false positive を解消する"
change_kind: codeParent Issue
none
Parent Goal Ref
- Goal: なし(単独改善)
- Desired Destination: なし(単独改善)
Current Validated Scope
scripts/ci/check_python_invocation_policy.pyのshould_exclude()(または surface discovery ロジック)に、gitignore済みの.claude/skills/.system/を repository-governed surface のスキャン対象から除外する変更を追加するscripts/ci/tests/test_python_invocation_policy.pyに、deterministic な temp fixture を用いた negative control(.claude/skills/.system/**の bare python invocation は violation に入らない)と positive control(通常の.claude/skills/**/SKILL.mdは従来どおり検出される)のテストを追加する
Remaining Parent Gaps
なし
Outcome
scripts/ci/check_python_invocation_policy.py が gitignore済みの .claude/skills/.system/** をスキャン対象から除外するよう修正され、uv run --locked pytest scripts/ci/tests/test_python_invocation_policy.py -q が全件 PASS し、かつ uv run --locked pytest scripts/ci/tests/test_python_invocation_policy.py::test_repo_scan_clean_zero_violations -q が PASS している状態。通常の repository-owned .claude/skills/**/SKILL.md の invocation-policy enforcement は従来どおり維持される。
Runtime Verification Applicability
- decision: not_applicable
- reason: 本 Issue の AC は静的な unit test(deterministic fixture を用いた checker の走査対象の検証)で完結し、live CI run への疎通確認を要求しない
In Scope
scripts/ci/check_python_invocation_policy.pyの surface discovery /should_exclude()に.claude/skills/.system/の bounded exclusion を追加するscripts/ci/tests/test_python_invocation_policy.pyに negative control(.system配下は除外される)と positive control(通常の project skill は従来どおり検出される)の regression test を追加する
Out of Scope
.claude/skills/.system/imagegen/SKILL.md/.claude/skills/.system/plugin-creator/SKILL.mdの内容修正- system skill 10件を
python_invocation_policy_exceptions.jsonへ登録すること - direct-Python invocation policy 自体の緩和
.claude/skills/**/SKILL.md全体の scan 無効化test_repo_scan_clean_zero_violationsの削除・skip- Issue 実装: collect_e2e_performance_benchmark.py にmanifest+実artifactからcohort_fixture.jsonを決定論的にmaterializeするsubcommandを追加する #2672 専用の special case
- 汎用
.gitignoreparser の新規実装 - system skill の内容を repository ownership 下へ取り込む変更
scripts/ci/fixtures/python_invocation_policy/**の追加(必要性が実装時に実証されない限り)
Acceptance Criteria
- AC1:
.claude/skills/.system/**は invocation-policy checker の repository-governed surface として走査されない - AC2: 通常の repository-owned
.claude/skills/**/SKILL.md(.systemを除く)は従来どおり走査される - AC3:
.system内に barepython/python3command 例が存在しても repo全体の clean check(test_repo_scan_clean_zero_violations)を汚染しない - AC4: 通常の project skill の
SKILL.mdに同じ bare invocation を置けば従来どおりdirect_python_scriptとして検出される(positive control) - AC5: exclusion は
.claude/skills/.system/に bounded であり、.claude/skills/**全体へは拡張しない - AC6: 既存の exception registry(
python_invocation_policy_exceptions.json)のセマンティクスは変更しない - AC7: local に
.systemディレクトリが存在する環境・存在しない環境の両方で repository-owned surface の scan 結果が同一である - AC8: 追加した focused checker test(negative control / positive control)が PASS する
- AC9:
test_repo_scan_clean_zero_violationsが PASS する - AC10:
scripts/ci/tests/の regression が、この defect に関して clean になる(無関係な pre-existing failure が別途存在する場合はこの AC の対象外として扱う)
Verification Commands
# AC1
# AC5
$ rg -n "\.claude/skills/\.system/" scripts/ci/check_python_invocation_policy.py# AC2
# AC4
# AC7
# AC8
# baseline-expect: deferred
$ uv run --locked pytest scripts/ci/tests/test_python_invocation_policy.py -q# AC3
# AC9
# AC10
# baseline-expect: deferred
$ uv run --locked pytest scripts/ci/tests/test_python_invocation_policy.py::test_repo_scan_clean_zero_violations -q# AC6
$ uv run --locked pytest scripts/ci/tests/test_python_invocation_policy.py::test_exception_registry_real_file_loads_and_is_valid -qAllowed Paths
- scripts/ci/check_python_invocation_policy.py
- scripts/ci/tests/test_python_invocation_policy.py
Stop Conditions
- Allowed Paths 外の変更が必要と判明した場合
- In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
- 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
- 後続 Phase / 別スコープへの波及が判明した場合
- nested SubAgent delegation が必要になった場合
- 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
Required Skills
なし
Required Design References
- docs/dev/workflow.md
Scope Delta(任意)
N/A
Delivery Rule
1 Issue = 1 PR で完結させる。worktree を切って作業し、Draft PR をデフォルトとする。
Notes for Reviewer
- Issue 実装: governed Python invocation を uv run --locked policy へ拘束する #1193(closed)は本 checker の original policy 実装 Issue であり、AC1 で governed surface を
.github/workflows/**/.github/actions/**/docs/dev/**/.claude/skills/**/SKILL.md(repository-owned のもの)/package.jsonと定義している。.claude/skills/.system/**は.gitignore(54行目)で明示的に ignore された runtime-local surface であり、この定義に含まれない。本 Issue はその regression follow-up。 - 発見経路: Issue 実装: collect_e2e_performance_benchmark.py にmanifest+実artifactからcohort_fixture.jsonを決定論的にmaterializeするsubcommandを追加する #2672 の issue-refinement-loop 実行中の Step 2 review(
canonical_step2_route: step_5_operator_intervention_required)。ただし本 Issue は 実装: collect_e2e_performance_benchmark.py にmanifest+実artifactからcohort_fixture.jsonを決定論的にmaterializeするsubcommandを追加する #2672 固有の workaround ではなく、repo全体のregressionとして独立に扱う。 - 実装上の最小修正の第一候補(read-only investigation 済み):
should_exclude()に.claude/skills/.system/prefix の bounded exclusion を1行追加するアプローチ。ただし実装時の evidence が別設計を要求する場合は current code を authority とする。 - 禁止事項: local
.systemfiles の編集、system commands の例外 registry 大量登録、test skip、broad catch-all ignore、SKILL_MD_PATTERN自体の撤去、ordinary project skill enforcement の弱体化。
Metadata
Metadata
Assignees
Labels
agent/implementerAI implementer agentenhancementNew feature or requestphase/implementationImplementation phasetriage-requiredNeeds owner triage for priority decision
Activity
squne121 commentedon Sep 19, 2026
root-owned entry router audit
route: invoke_impl_review_loop
reason: fresh_review_go_live_equality
squne121 commentedon Sep 19, 2026
implement-issue: 実装完了 (2026-09-19T15:37:38Z)
.claude/worktrees/issue-2674-invocation-policy-system-excludeworktree-issue-2674-invocation-policy-system-excluderg -n "\.claude/skills/\.system/" scripts/ci/check_python_invocation_policy.py(AC1/AC5): PASSuv run --locked pytest scripts/ci/tests/test_python_invocation_policy.py -q(AC2/AC4/AC7/AC8): 79 passeduv run --locked pytest scripts/ci/tests/test_python_invocation_policy.py::test_repo_scan_clean_zero_violations -q(AC3/AC9/AC10): 1 passeduv run --locked pytest scripts/ci/tests/test_python_invocation_policy.py::test_exception_registry_real_file_loads_and_is_valid -q(AC6): 1 passeduv run --locked pytest scripts/ci/tests/ -q(AC10 regression確認): 617 passed, 2 skipped, 0 failedfix: invocation-policy checker が .claude/skills/.system を誤走査する regres…