Repository navigation
Description
Parent Issue
なし(単独改善)
Machine-Readable Contract
contract_schema_version: v1
issue_kind: implementation
parent_issue: "none"
goal_ref: "#2192"
change_kind: docs
Parent Goal Ref
なし(親 Issue なし)。関連する調査は #2192(Claude-GPT運用ログレトロスペクティブ)。
Current Validated Scope
以下4ファイル中、hook(local_main_branch_guard.sh/.py、worktree_scope_guard.sh)を現在形の active enforcement 根拠として引用している箇所。いずれも .claude/settings.json の hooks.PreToolUse に当該2 hookが登録されていない現状と矛盾する記述である。
.claude/agents/pr-reviewer.md(該当行付近: 「完了時の返却」節、local_main_branch_guard.shが生gh pr reviewをgh_mutation_deniedとして拒否する、という記述).claude/skills/pr-review-judge/SKILL.md(該当行付近: 生gh pr reviewを直接呼び出してはならない、local_main_branch_guard.shが拒否する、という記述。実装: Agent/Skill の重複を削減し progressive disclosure へ移行する #1732 の Agent/Skill ownership 方針では permission・prohibition の詳細は Skill 側が owner であり、本ファイルが実質的な訂正対象の正本).claude/agents/scope-rollup-runner.md(該当行付近: 「scope_rollup.run exact executor 実行」節、local_main_branch_guard.pyに登録された exact command class としてのみ許可される、という記述).claude/skills/impl-review-loop/steps/preparation.md(該当行付近:local_main_branch_guard.pyがこの exact invocation のみを canonical root context で allow する、という記述)
Remaining Parent Gaps
なし。本 Issue 単体で完結する。
Outcome
上記4ファイルのコミットが更新され、以下の意味論に整合した状態になる。
- pr-reviewer consumer surface(
pr-reviewer.md+pr-review-judge/SKILL.md): raw formalgh pr reviewを使用しないことは、reviewer と呼び出し元(orchestrator)間の behavioral workflow contract として説明される。local_main_branch_guard.shが現在技術的にこれを拒否している、という active enforcement claim は含まれない。local_main_branch_guard.sh/.pyは現在.claude/settings.jsonのhooks.PreToolUseに登録されていない(commitf971a95d, PR chore: local_main_branch_guard / worktree_scope_guard の2 hook を緊急停止する #1691)ことを踏まえた記述にする。 - scope_rollup consumer surface(
scope-rollup-runner.md+impl-review-loop/steps/preparation.md):scope_rollup.runの exact command class がskill_runtime_command_policy.py(ScopeRollupRunCommand/parse_scope_rollup_run_command/is_scope_rollup_run_command)に classifier/policy として現に存在すること と、それが Claude project PreToolUse に wiring されていること を区別する。現在 wiring されていないため、raw 形状からの逸脱を Claude Code hook レベルで technically block しているとは記述しない。canonical invocation 形状(run_scope_rollup_preflight.pyへの直接 exact-match dispatch。現時点でskill_runtime_exec.pyには統合されていない独立レーン)への準拠は、Skill/executor 側の自己規律(workflow/producer-consumer 契約)として維持される、という記述にする。 - branch protection / CI / repository permission は merge/repository safety の重要な境界だが、「raw
gh pr reviewを禁止する仕組み」「scope_rollup.runを allow する仕組み」の直接的代替としては説明しない。
いずれも .claude/rules/project-constitution.md の「hook は fail-closed ローカルガードレールでありセキュリティ境界ではない」という既定方針、および #1860(minimal-harness Owner Decision)・#1732(Agent/Skill ownership、hook non-authority方針)と整合する。
In Scope
.claude/agents/pr-reviewer.mdの該当記述を、hook による技術的強制ではなく behavioral workflow contract として訂正する。.claude/skills/pr-review-judge/SKILL.mdの該当記述(local_main_branch_guard.shが拒否する、という現在形 claim)を同様に訂正する。.claude/agents/scope-rollup-runner.mdの該当記述を、classifier/policy existence と project-hook wiring を区別する記述へ訂正する。.claude/skills/impl-review-loop/steps/preparation.mdの該当記述を同様に訂正する。- 訂正後も4ファイルの他の記述(mutation policy、実行手順、command_id/argv 定義等)には影響を与えない。
- 必要に応じて
local_main_branch_guard/worktree_scope_guardへの言及自体は残してよいが、その場合は「現在 project PreToolUse に wiring されていない」旨、または「歴史的経緯(PR chore: local_main_branch_guard / worktree_scope_guard の2 hook を緊急停止する #1691)」であることが文脈上明確であること。
Out of Scope
.claude/hooks/local_main_branch_guard.sh/worktree_scope_guard.shを.claude/settings.jsonへ再登録すること(別の設計判断であり本 Issue のスコープ外)。- hook script(
local_main_branch_guard.py/.sh、worktree_scope_guard.sh)自体の実装修正。 .claude/settings.jsonの変更。docs/dev/hook-boundaries.mdの変更(本 Issue の repo change scope には含めない。当該文書は current.claude/settings.jsonと topology drift があり、known-stale / non-normative for active wiringとして扱うが、本 Issue ではこの文書自体を修正しない)。scope_rollup.runをskill_runtime_exec.pyの sibling exact profile へ統合する実装(#1601の scope。本 Issue はドキュメント/instruction 文言の実態整合のみを扱い、#1601の実装着手を待たない)。- hooks 全体の再設計。
Acceptance Criteria
- AC1:
.claude/agents/pr-reviewer.mdと.claude/skills/pr-review-judge/SKILL.mdにおいて、local_main_branch_guardが raw formal review を現在技術的に拒否するという active-enforcement claim が0件であること。guard 名を歴史的経緯・classifier existence の説明として残す場合は、「現在 repo-controlled project PreToolUse に wiring されていない」または「この behavioral contract の authority ではない」旨が明確であること。 - AC2:
.claude/agents/scope-rollup-runner.mdと.claude/skills/impl-review-loop/steps/preparation.mdにおいて、(a) classifier/policy implementation の存在、(b) current project-hook wiring の有無、(c) supported/canonical execution contract、の3概念が混同されていないこと。local_main_branch_guard.pyが repo に存在することだけを Claude project runtime enforcement の証拠として記述しないこと。 - AC3: 現在の
.claude/settings.jsonにlocal_main_branch_guard/worktree_scope_guardが project PreToolUse handler として wiring されていないことを確認する。本 AC から effective runtime 全体(user/local/managed policy/plugin/Skill・Agent frontmatter を含む)での不在を推論・主張しない。 - AC4:
#1732の ownership boundary(command/routing 詳細は Skill 側が owner)と矛盾せず、Agent 側ファイルだけを修正して Skill 側に同じ stale claim を残さないこと。 - AC5: branch protection / CI / repository permission と、behavioral workflow contract / deterministic executor policy の責務が分離して説明されていること(前者を後者の技術的代替として記述しない)。
- AC6: 本 Issue 本文において、
#1601が semantic collision として記録され、precedence: #2193 before #1601および#1601 は実装着手前に fresh refinement(current main / #1690 / #1860 / #1732 基準の再評価)を要することが明文化されていること(本 AC は Issue 本文自体の完全性を指し、コード変更の検証対象ではない)。
Verification Commands
単純な zero-match 判定ではなく、以下各コマンドの match 行を reviewer が active_enforcement_claim / classifier_or_policy_existence / historical_note / explicit_non_wired_note のいずれかに分類する。分類基準: 「拒否する」「blockする」「防ぐ」等の能動的enforcement動詞を伴い、かつ「現在wiringされていない」旨のdisclaimerを伴わない行は active_enforcement_claim。
# AC1
# baseline-expect: pass
$ rg -n 'local_main_branch_guard' .claude/agents/pr-reviewer.md .claude/skills/pr-review-judge/SKILL.md
PASS 基準: match 行のうち active_enforcement_claim に分類される行が0件。
# AC2
# baseline-expect: pass
$ rg -n -e 'local_main_branch_guard' -e 'worktree_scope_guard' .claude/agents/scope-rollup-runner.md .claude/skills/impl-review-loop/steps/preparation.md
PASS 基準: match 行のうち active_enforcement_claim に分類される行が0件。かつ classifier/policy existence の記述と project-hook wiring の記述が明確に区別されていること(reviewer 目視)。
# AC3
# baseline-expect: fail
$ rg -n -e 'local_main_branch_guard' -e 'worktree_scope_guard' .claude/settings.json
PASS 基準: exit code 1(無match)。このコマンドの成功は「repo-controlled project PreToolUse への未wiring」のみを証明し、effective runtime全体での不在は主張しない。
# AC4
# baseline-expect: pass
$ rg -n -e 'local_main_branch_guard' -e 'worktree_scope_guard' .claude/agents/pr-reviewer.md .claude/agents/scope-rollup-runner.md .claude/skills/pr-review-judge/SKILL.md .claude/skills/impl-review-loop/steps/preparation.md
PASS 基準: Agent側ファイル(pr-reviewer.md/scope-rollup-runner.md)と Skill側ファイル(pr-review-judge/SKILL.md/impl-review-loop/steps/preparation.md)の両方で同じ stale claim パターンが解消されていること(Agent側だけが直り Skill側に残る不整合が0件)。
# AC5
# baseline-expect: pass
$ rg -n -e 'gh pr review' -e 'scope_rollup\.run' -e 'run_scope_rollup_preflight' -e 'skill_runtime_exec' .claude/agents/pr-reviewer.md .claude/skills/pr-review-judge/SKILL.md .claude/agents/scope-rollup-runner.md .claude/skills/impl-review-loop/steps/preparation.md
PASS 基準: 各 match が、branch protection/CI/repository permission ではなく behavioral workflow contract / deterministic executor policy の文脈で使われていることを reviewer が目視確認する。
# AC6
# baseline-expect: pass
$ gh issue view 2193 --repo squne121/loop-protocol --json body
PASS 基準: 出力 body に #2193 before #1601 の precedence 記述と #1601 の fresh refinement 要求記述が含まれていることを reviewer が目視確認する(本 AC はコード diff ではなく Issue 本文自体の完全性を検証する)。
# 構文健全性
# baseline-expect: pass
$ git diff --check -- .claude/agents/pr-reviewer.md .claude/skills/pr-review-judge/SKILL.md .claude/agents/scope-rollup-runner.md .claude/skills/impl-review-loop/steps/preparation.md
Allowed Paths
.claude/agents/pr-reviewer.md.claude/skills/pr-review-judge/SKILL.md.claude/agents/scope-rollup-runner.md.claude/skills/impl-review-loop/steps/preparation.md.claude/settings.json(read-only、AC3 の Verification Command が参照するために追加。本 Issue の Out of Scope により書き込み変更は行わない)
これ以外の新しい repository path が必要になった場合のみ、新規の scope change stop condition とする。上記2 Skill path および .claude/settings.json(read-only参照)の追加自体は 2026-08-19 の OWNER decision(issuecomment 経由、「少なくとも以下4ファイルへ拡張する」という指示範囲内の付随的な検証専用参照)で承認済みであり、再度の human escalation 理由にしない。
Required Design References
#1690(hook削除の completed disposition)- PR
#1691(local_main_branch_guard.sh/.py・worktree_scope_guard.shを.claude/settings.jsonのhooks.PreToolUseから削除した merge済みPR、commitf971a95d) #1860(minimal-harness Owner Decision。hook を security/admission authority として扱わない方針)#1732(Agent/Skill ownership 方針。command/routing/permission/prohibition の詳細は Skill 側が owner。hook を authority・security boundary・dependency・AC にしない方針).claude/rules/project-constitution.md(「hook は fail-closed ローカルガードレールでありセキュリティ境界ではない。セキュリティ上の保護は branch protection / GitHub Actions CI / repository permission で行う」)- 現在の
.claude/settings.json(hooks.PreToolUse現行登録一覧。local_main_branch_guard/worktree_scope_guardは不在) docs/dev/hook-boundaries.mdは current.claude/settings.jsonと topology drift があるため、known-stale / non-normative reference for active wiring として扱う(本 Issue では修正しない。参照する場合も active topology の正本として無条件に使用しない)。#1691単独を policy authority にしない。
#1601 との Semantic Collision
- collision_type: semantic
- related_issue:
#1601 - precedence:
#2193 before #1601 - rationale:
#2193は current main に存在する stale enforcement claim を現在の事実へ訂正する即時 remediation であり、#1601(scope_rollup.runをskill_runtime_exec.pyの sibling exact profile へ統合する設計)の実装完了を待つ必要はない。#1601の中核 intent(integrate_sibling_profile)自体は現在の architecture でも保持すべき candidate として残るが、hook の Claude project 再wiring や hook を authorization/security authority とする旧契約は既定事項として引き継がない。 #1601implementation prerequisite:#1601は実装着手前に current main /#1690/#1860/#1732を基準とした fresh な issue-refinement-loop 再実行を要し、古い hook-authority / settings-cutover 前提を再評価すること。#2193の完了を#1601の実装完了待ちにしない。
Required Skills
なし
Delivery Rule
1 Issue = 1 PR。作業は dedicated worktree で行い、Draft PR を既定とする。
Runtime Verification Applicability
- decision: not_applicable
- reason: repository instruction/documentation の訂正のみであり、claim を repo-controlled project configuration(
.claude/settings.json)の記述に限定するため。user/local/managed policy/plugin/Skill・Agent frontmatter を含む effective runtime 全体の hook 不在は本 Issue では主張しない。もし refinement/実装中に「effective runtime 全体で hook が存在しない」という強い claim が必要になった場合は、その時点で本 decision を見直し、/hooks等による effective configuration inventory の証跡を要求する。
Stop Conditions
- Allowed Paths 外の変更が必要と判明した場合(Allowed Paths は上記4ファイル)。
- In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合。
- 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)。
- 後続 Phase / 別スコープへの波及が判明した場合。
- nested SubAgent delegation が必要になった場合。
- 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合。
- hooks 再設計(
local_main_branch_guard.sh/worktree_scope_guard.shの settings.json 再登録、hook script 自体の実装修正、docs/dev/hook-boundaries.mdの修正)が必要と判明した場合は follow-up issue へ分離する。 scope_rollup.runのskill_runtime_exec.py統合実装(#1601の scope)が必要と判明した場合は本 Issue に含めず#1601側で扱う。- 2026-08-19 の OWNER decision(Allowed Paths 4ファイル拡張・
#1601precedence・#2193 before #1601)でカバーされていない新規の architecture/scope change が発生した場合のみ human escalation する。「Skill 2ファイルが当初 Allowed Paths に無かった」「#1601の precedence が未決定だった」という、今回既に解決済みの理由では再度 human escalation しない。
Notes for Reviewer
Scope Collision (C1): related_issue=#1909, #1661, #1601; overlapping_paths=.claude/agents/pr-reviewer.md, .claude/agents/scope-rollup-runner.md。#1909(bounded local context bundle生成)・#1661(scope-rollup-runner capture timestamp修正)は本Issueの「hook根拠記述の実態整合」という単一意図とは非重複。#1601 は semantic collision として上記セクションで precedence を明示済み(#2193 before #1601)。実装着手前に #1909/#1661 該当PRのマージ状況を確認し、必要ならrebaseする。
本 Issue は 2026-08-19 に OWNER decision(human escalation 後の reframe 承認)を経て、Allowed Paths を2ファイルから4ファイルへ拡張し、#1601 との precedence を確定した。SubAgent調査(instruction ownership auditor / #1601 scope-rollup contract auditor / verification scope auditor)の結果を反映済み。
Related
#2192(本Issueの根拠となったretrospective research issue)、#1691(hooks縮小の経緯)、#1601(semantic collision、precedence: #2193 before #1601)、#1690・#1860・#1732(Required Design References)
Activity
squne121 commentedon Aug 18, 2026
結論
REQUEST_CHANGES /
reframe_in_placeを推奨します。#2193 の問題認識――「#1691 後も Agent 定義が、現在は project hook として接続されていない guard を技術的 enforcement 根拠として説明している」――自体は正しいです。問題は、現契約のまま2ファイルだけ直すと、同じ stale claim を production instruction 側に残したまま「修正完了」にできることです。さらに、置換先として指定している「branch protection / CI / repository permission が実際の安全境界」という説明も、
pr-reviewerとscope_rollup.runの両方にはそのまま適用できません。[P0] Allowed Paths が実際の instruction ownership を取りこぼしています。
pr-reviewer.mdはpr-review-judgeSkill を preload する構成ですが、そのpr-review-judge/SKILL.md自身が現在も「rawgh pr reviewはlocal_main_branch_guard.shがgh_mutation_deniedで拒否する」と説明しています。同様に、scope-rollup-runner.mdを呼び出すimpl-review-loop/steps/preparation.mdも、local_main_branch_guard.pyが exact invocation だけを canonical root で allow すると現在形で説明しています。つまり 実装: pr-reviewer.md/scope-rollup-runner.md のhook根拠記述を#1691後の実態に合わせて修正する #2193 の2ファイルだけを修正しても、実行時に参照される Skill/Step には同じ誤根拠が残ります。しかも 実装: Agent/Skill の重複を削減し progressive disclosure へ移行する #1732 の現行設計では command/routing 詳細を Skill 側の owner とする方針なので、Agent だけ直すのはその所有境界とも逆行します。[P0] 実装:scope_rollup.runをskill_runtime_execのsiblingexactprofileへ統合する #1601 は「同一ファイルへの編集競合」ではなく、契約上の意味衝突です。 実装: pr-reviewer.md/scope-rollup-runner.md のhook根拠記述を#1691後の実態に合わせて修正する #2193 は「hook 再登録は Out of Scope、実態に合わせて enforcement claim を撤去する」としています。一方 OPEN の 実装:scope_rollup.runをskill_runtime_execのsiblingexactprofileへ統合する #1601 は
scope-rollup-runner.md、settings.json、local_main_branch_guard.py、hook-boundaries.md等を変更し、Claude/Codex guard を canonical allow / legacy deny に揃えることを現在も要求しています。実装: pr-reviewer.md/scope-rollup-runner.md のhook根拠記述を#1691後の実態に合わせて修正する #2193 の Notes にある「PR 状況を確認して必要なら rebase」では解消できません。実装:scope_rollup.runをskill_runtime_execのsiblingexactprofileへ統合する #1601 を 導入: AIエージェント運用をminimal harnessへ縮退し、過剰なcontrol-planeを廃止する #1860 の executor/minimal-harness 方針へ reframe するか、実装: pr-reviewer.md/scope-rollup-runner.md のhook根拠記述を#1691後の実態に合わせて修正する #2193 と明示的な precedence/dependency を設定する必要があります。 実装:scope_rollup.runをskill_runtime_execのsiblingexactprofileへ統合する #1601 には現在コメントによる後続 disposition もありません。[P1] Required Design Reference が既に stale です。
docs/dev/hook-boundaries.mdは「.claude/settings.jsonに設定されている hooks の SSOT」を名乗りながら、local_main_branch_guard/worktree_scope_guardを blocker・fail-closed hook として現在も manifest に保持しています。一方、実際の.claude/settings.jsonの PreToolUse にはその2つはありません。chore: local_main_branch_guard / worktree_scope_guard の2 hook を緊急停止する #1691 自体は当初「緊急停止・調査: PreToolUse hook chain(local_main_branch_guard/worktree_scope_guard)の繰り返し誤ブロックを踏まえ無効化・縮小・現状維持の方針を決定する #1690 の判断待ち」という性格でしたが、その後 調査: PreToolUse hook chain(local_main_branch_guard/worktree_scope_guard)の繰り返し誤ブロックを踏まえ無効化・縮小・現状維持の方針を決定する #1690 が removal を completed として確定しています。したがって 実装: pr-reviewer.md/scope-rollup-runner.md のhook根拠記述を#1691後の実態に合わせて修正する #2193 は chore: local_main_branch_guard / worktree_scope_guard の2 hook を緊急停止する #1691 単独ではなく 調査: PreToolUse hook chain(local_main_branch_guard/worktree_scope_guard)の繰り返し誤ブロックを踏まえ無効化・縮小・現状維持の方針を決定する #1690 + 導入: AIエージェント運用をminimal harnessへ縮退し、過剰なcontrol-planeを廃止する #1860 + 実装: Agent/Skill の重複を削減し progressive disclosure へ移行する #1732 を policy authority にすべきで、hook-boundaries.mdは少なくとも「known-stale topology reference」と明記しない限り normative reference にできません。[P1] AC3 は検証になっておらず、「未登録」の意味も広すぎます。
grep -c "hooks.PreToolUse" .claude/settings.jsonは PreToolUse キーの存在しか見ておらず、問題の2 handler が登録されているかを検証していません。さらに現行 Claude Code では hooks は project.claude/settings.jsonだけでなく、user settings、local settings、managed policy、plugin、Skill/Agent frontmatter からも導入されます。したがって.claude/settings.jsonだけを見て証明できるのは **「repo-controlled project hook として未登録」**までです。「現在の runtime で hook が存在しない」とまで書くなら/hooks等による effective configuration の runtime inventory が必要で、Runtime Verification Applicability: not_applicableとは両立しません。 ([Claude]1)[P1] 「hook → branch protection/CI/repository permission」への単純置換は、別の誤記になります。 導入: AIエージェント運用をminimal harnessへ縮退し、過剰なcontrol-planeを廃止する #1860/実装: Agent/Skill の重複を削減し progressive disclosure へ移行する #1732 の現在の方針は、safety を live Issue/PR、deterministic executor、repository binding、postcondition readback、実 diff/test、current-head CI、独立 review、人間 stop で構成し、hook を authority にしない、というものです。
scope_rollup.runについては現在もskill_runtime_command_policy.pyに exact command class が存在し、local_main_branch_guard.pyにその classifier/allow branch 自体も残っています。問題なのはclassifier が存在しないことではなく、Claude project hook としてその classifier が現在 wiring されていないことです。ここを「branch protection が代わりに enforcement する」と書くのは不正確です。[P1]
pr-reviewerも「禁止理由」と「merge safety」を分離すべきです。 GitHub CLI のgh pr review自体は approve/comment/request-changes を生成できる正規コマンドであり、GitHub は PR author 自身の approve を拒否します。一方 branch protection は protected branch への merge、required review/status check 等を制御する機構であって、「reviewer が rawgh pr reviewを呼べない」ことを保証する機構ではありません。よってここは「raw formal review を使わず、reviewer は verdict を caller に返し、orchestrator が通常コメントとして publish する」という behavioral workflow contract を根拠にすべきです。現在の project settings は旧2 hook を持たず、gh pr review系 Bash 自体は permission surface に存在するため、なおさら「技術的に拒否される」とは書けません。([GitHub CLI]2)推奨する reframe
#2193 は廃棄ではなく in-place 改訂が適切です。Allowed Paths を少なくとも
pr-reviewer.md+pr-review-judge/SKILL.mdのペアまで広げ、scope-rollup 側はscope-rollup-runner.md+impl-review-loop/steps/preparation.mdを同一 consumer surface として扱うのが妥当です。ただし後者は #1601 の disposition を先に確定させるべきです。#1909/#1661 は主にファイル単位の競合ですが、#1601 だけは semantic collision として hard dependency 扱いが必要です。訂正文の意味は、
pr-reviewer側では「旧 hook は repo の project PreToolUse に現在接続されておらず、raw formal review を使用しないことは reviewer/orchestrator の behavioral contract である」とするのが正確です。scope-rollup側では「exact classifier/policy の実装は存在するが、local_main_branch_guardは現在 Claude project PreToolUse に wiring されていない。canonical invocation は supported execution contract と deterministic policy/executor に基づく」と分離すべきです。#1860 の minimal-harness 方針とも整合します。Verification も
grep -c hooks.PreToolUseでは不足です。少なくとも以下のような consumer-wide inventory にし、zero-match を機械的成功条件にするのではなく、残る言及が「classifier existence」「historical note」「active enforcement」のどれかを reviewer が区別する契約にした方がよいです。なお、現在の Claude Code 公式仕様では同一 event に一致する hooks は並列実行され、完了順も保証されません。リポジトリ自身も #1735 でこの仕様を認識済みなので、古い hook-chain の直列実行前提まで
hook-boundaries.mdから引き継がない方が安全です。([Claude]1)したがって現状の #2193 は実装着手不可です。 主要修正は「2 Agent ファイルだけの文言訂正」から「実際の Agent/Skill/caller instruction surface の根拠整合」に変えること、#1601 の precedence を確定すること、そして「project hook 未登録」と「runtime 全体で enforcement 不在」を混同しないことです。これらを直せば、小さな docs-only remediation としてかなり明確になります。
PR化後に current head で同じ観点を再監査する運用も設定できます。
squne121 commentedon Aug 18, 2026
issue-refinement-loop 終了報告(human_judgment_required)
対象コメント: #2193 (comment)
Step 0f preflight (
run_refinement_preflight.py) がSTATUS: blocked/NEXT_ACTION: human_judgment_requiredを返したため、Step 1 以降には進まず終了します。Blocker:
structural_repair_action:structural_human_review_required_items_present詳細:
Machine-Readable Contractセクションのparent_issueフィールドが、テンプレート照合(.github/ISSUE_TEMPLATE/implementation.yml)上observed_cardinality: 0(必須値が確認できない)と判定されました。parent_issue: nullおよび## Parent Issueに「なし(単独改善)」の記載がありますが、structural repair checker はmissing_required_field_without_exact_source(自動導出できる明示ソースがない欠落)としてdisposition: human_review_requiredに分類しています。human_review_requiredのため自動適用対象外です。Must Read:
.claude/agents/pr-reviewer.md.claude/agents/scope-rollup-runner.md.claude/rules/project-constitution.md.claude/settings.json人間判断:
parent_issue: nullの記法がテンプレート契約上有効かどうか(checker 側の false positive の可能性を含む)を確認し、必要であれば Machine-Readable Contract の記法を修正のうえ refinement loop を再実行してください。squne121 commentedon Aug 18, 2026
issue-refinement-loop 終了報告(human_escalation・scope change stop condition)
対象コメント: #2193 (comment)
実施済みの機械的修正
Step 0f preflight が検出した
structural_repair_actionblocker(Machine-Readable Contractのparent_issue: nullがテンプレート契約.github/ISSUE_TEMPLATE/implementation.ymlの期待値"#<parent-issue-number>|none"と型不一致)をparent_issue: "none"へ修正し、controlledissue_content.updatetransaction で適用済みです(readback 一致確認済み)。修正後、preflight はSTATUS: warn/NEXT_ACTION: proceed_with_notesまで解消しました。停止理由(スコープ変更停止条件に該当)
対象 anchor comment は
REQUEST_CHANGES/reframe_in_placeを推奨する実質的レビューであり、以下を要求しています:.claude/agents/pr-reviewer.md/.claude/agents/scope-rollup-runner.mdに加え、.claude/skills/pr-review-judge/SKILL.mdと.claude/skills/impl-review-loop/steps/preparation.mdまで訂正対象を広げる必要がある(現在の instruction ownership 構造では、Agent ファイルだけの訂正では実行時に参照される Skill 側に同じ stale claim が残るため)。scope-rollup-runner.md/settings.json/local_main_branch_guard.py/hook-boundaries.mdの変更を要求)との precedence/dependency を明示的に確定する必要がある。これは同一ファイル競合ではなく契約上の意味衝突。grep -c "hooks.PreToolUse"ベースの AC3 検証を、classifier existence / historical note / active enforcement を区別する consumer-wide inventory 方式へ置き換える必要がある。docs/dev/hook-boundaries.mdが実態と乖離しており、policy authority を#1691単独ではなく#1690 + #1860 + #1732に変更する必要がある。これらは本 skill の「スコープ変更時の停止条件」(
## Allowed Paths に新規ディレクトリや別アーキテクチャ層が追加された等)に該当するため、loop_iteration_approval_gate(承認不要設定)の対象外として停止します。Step 0f preflight のruntime_evidence.route.action: human_escalation/implementation_allowed: falseも同じ判定を示しています。人間判断が必要な事項
squne121 commentedon Aug 19, 2026
推奨は、#2193 を
reframe_in_placeで続行し、#1601 は「#2193 の後続・実装前再レビュー必須」と明示する方針です。別 Issue への分離は勧めません。#1690 は既に
local_main_branch_guard/worktree_scope_guardの project hook 削除を恒久方針として completed になっており、PR #1691 もその状態で merged です。 さらに #1860 は agent-local instruction/permission を security boundary にせず、live Issue/PR・実 diff/test・current-head CI・独立 review を authority とする方針を固定しています。 #1732 もこの判断を取り込み、現在の project settings に該当2 hook がないことを明示しています。一方、#1601 は close/not_planned にするべきではありません。親 #1580 の「
scope_rollup.runをskill_runtime_execsibling profile に統合する」という中核設計にはまだ独立した価値があり、current registry も現在はscope_rollup.runを direct worker に結び付けた旧経路のままです。 ただし #1601 の古い「Claude/Codex guard を canonical allow / legacy deny に揃える」「settings cutover」部分は #1690/#1860 後の authority model と衝突するため、実装前に current main から再 refinement するのが妥当です。#1601 は現在も OPEN かつ disposition comment がありません。また、#2193 の主張は「runtime 全体で hook が存在しない」ではなく、**「repo-controlled
.claude/settings.jsonの project PreToolUse には接続されていない」**までに限定するべきです。Claude Code は user/local/managed/plugin、および Skill/Agent frontmatter からも hooks を導入できるためです。([Claude]1) これならRuntime Verification Applicability: not_applicableを維持できます。Issue #2193 の issue-refinement-loop を human escalation 後から再開する
対象 repository:
squne121/loop-protocol対象:
53346935025334750663今回の人間判断
human escalation に対する OWNER decision は以下で確定とする。
実装: pr-reviewer.md/scope-rollup-runner.md のhook根拠記述を#1691後の実態に合わせて修正する #2193 は別 Issue に分離せず
reframe_in_placeする。Allowed Paths を実際の instruction ownership に合わせ、少なくとも以下4ファイルへ拡張する。
.claude/agents/pr-reviewer.md.claude/skills/pr-review-judge/SKILL.md.claude/agents/scope-rollup-runner.md.claude/skills/impl-review-loop/steps/preparation.md実装: pr-reviewer.md/scope-rollup-runner.md のhook根拠記述を#1691後の実態に合わせて修正する #2193 を 実装:scope_rollup.runをskill_runtime_execのsiblingexactprofileへ統合する #1601 より先に処理する。
実装:scope_rollup.runをskill_runtime_execのsiblingexactprofileへ統合する #1601 の
integrate_sibling_profileという中核 intent は、この作業では not_planned と断定しない。scope_rollup.runをskill_runtime_execの sibling exact profile に統合する設計自体は fresh review の対象として保持する。実装: pr-reviewer.md/scope-rollup-runner.md のhook根拠記述を#1691後の実態に合わせて修正する #2193 では hooks の再登録・hook script の実装修正・
settings.jsonの変更を行わない。docs/dev/hook-boundaries.mdは current.claude/settings.jsonと topology drift があるため、active topology の normative authority として無条件に使用しない。known-stale topology reference / non-normative referenceと明記する。「hook が存在しない」という無限定な runtime claim は禁止する。
.claude/settings.jsonの project PreToolUse に当該 handler が wiring されていない」まで。Runtime Verification Applicability: not_applicableを維持してよい。最初に SubAgent 調査を行うこと
root/main session から、少なくとも以下3系統の read-only SubAgent を並列起動すること。
SubAgent A: instruction ownership auditor
調査対象:
.claude/agents/pr-reviewer.md.claude/skills/pr-review-judge/SKILL.md.claude/agents/scope-rollup-runner.md.claude/skills/impl-review-loop/steps/preparation.md.claude/settings.json目的:
pr-reviewerとscope_rollupの訂正文に必要な意味境界を提案する。SubAgent B: #1601 / scope-rollup contract auditor
調査対象:
調査: scope_rollup.run exact executor を registry SSOT 経路(skill_runtime_exec 相当)へ統合すべきか検討する #1580
実装:scope_rollup.runをskill_runtime_execのsiblingexactprofileへ統合する #1601
調査: PreToolUse hook chain(local_main_branch_guard/worktree_scope_guard)の繰り返し誤ブロックを踏まえ無効化・縮小・現状維持の方針を決定する #1690 / PR chore: local_main_branch_guard / worktree_scope_guard の2 hook を緊急停止する #1691
導入: AIエージェント運用をminimal harnessへ縮退し、過剰なcontrol-planeを廃止する #1860
実装: Agent/Skill の重複を削減し progressive disclosure へ移行する #1732
current main の
command_registry.pyskill_runtime_command_policy.pyskill_runtime_exec.pylocal_main_branch_guard.pyrun_scope_rollup_preflight.py目的:
SubAgent C: verification / configuration-scope auditor
調査対象:
目的:
.claude/settings.jsonの absence と effective runtime absence を区別する。Runtime Verification Applicability: not_applicableを維持可能か確認する。SubAgent 運用条件
#2193 の reframe 方針
SubAgent 完了後、
issue-refinement-loopの controlled mutation 経路を使って #2193 を更新する。raw な場当たり的
gh issue editで契約を書き換えず、repository が定義する controlled issue update transaction を利用すること。Outcome
Outcome は「旧 hook 名を消すこと」ではなく、以下の意味にする。
pr-reviewerconsumer surface:raw formal
gh pr reviewを使用しないことは reviewer/orchestrator 間の behavioral workflow contract である。local_main_branch_guard.shが現在技術的に拒否していることを根拠にしない。scope_rollupconsumer surface:exact classifier / policy implementation が repository に存在することと、
Claude project PreToolUse に wiring されていることを区別する。
現在 project hook として wiring されていない classifier を active enforcement 根拠として扱わない。
branch protection / CI / repository permission は merge/repository safety の重要な境界ではあるが、
「raw
gh pr reviewを禁止する仕組み」や「scope_rollup exact command を allow する仕組み」
の直接的代替として説明しない。
Allowed Paths
以下4ファイルに限定する。
.claude/agents/pr-reviewer.md.claude/skills/pr-review-judge/SKILL.md.claude/agents/scope-rollup-runner.md.claude/skills/impl-review-loop/steps/preparation.mdこれ以外の新しい repository path が必要になった場合のみ、新しい scope change stop condition とする。
今回、人間が明示承認した上記2 Skill path の追加を再び human escalation 理由にしてはならない。
Required Design References
normative authority の優先順位を current architecture に合わせる。
最低限:
.claude/settings.jsondocs/dev/hook-boundaries.mdは topology drift が解消されるまでknown-stale / non-normative for active wiringとして扱う。
#1691 単独を policy authority にしない。
#1601 collision / precedence
#2193 本文に明示する。
#2193 before #1601実装: pr-reviewer.md/scope-rollup-runner.md のhook根拠記述を#1691後の実態に合わせて修正する #2193 は current-state documentation/instruction correctness remediation。
実装:scope_rollup.runをskill_runtime_execのsiblingexactprofileへ統合する #1601 は将来の executor integration candidate。
current main から fresh refinement を実施し、
調査: PreToolUse hook chain(local_main_branch_guard/worktree_scope_guard)の繰り返し誤ブロックを踏まえ無効化・縮小・現状維持の方針を決定する #1690/導入: AIエージェント運用をminimal harnessへ縮退し、過剰なcontrol-planeを廃止する #1860/実装: Agent/Skill の重複を削減し progressive disclosure へ移行する #1732 と整合しない hook-wiring/security-authority clauses を再評価する。
必要なら #1601 に OWNER disposition comment を controlled GitHub mutation で記録してよい。
その場合、趣旨は以下とする。
ただし #1601 本文全体をこのセッションで機械的に再設計しない。
#1601 自身の fresh issue-refinement-loop は別の implementation-start prerequisite として残す。
Acceptance Criteria を再設計する
少なくとも次を満たすようにする。
AC1: pr-reviewer consumer surface
以下2ファイルにおいて、
local_main_branch_guardが raw formal review を現在技術的に拒否するという active-enforcement claim が0件。.claude/agents/pr-reviewer.md.claude/skills/pr-review-judge/SKILL.mdguard 名を歴史説明等で残す場合は、
historical/not wired as repo-controlled project PreToolUse/not the authority for this behavioral contractの意味が明確であること。
AC2: scope-rollup consumer surface
以下2ファイルで、
の3概念が混同されていないこと。
.claude/agents/scope-rollup-runner.md.claude/skills/impl-review-loop/steps/preparation.mdlocal_main_branch_guard.pyが存在することだけを、Claude project runtime enforcement の証拠にしてはならない。
AC3: project hook wiring claim
current
.claude/settings.jsonにlocal_main_branch_guard/worktree_scope_guardが project PreToolUse handler として wiring されていないことを確認する。
この AC から effective runtime 全体での不在を推論しない。
AC4: ownership consistency
#1732 の ownership boundary と矛盾せず、
command / routing details の owner が Skill 側である箇所について Agent だけを修正して stale duplicate を残さない。
AC5: safety wording
branch protection / CI / repository permission と、
behavioral workflow contract / deterministic executor policy の責務を分離して説明していること。
AC6: #1601 precedence
#1601 が semantic collision として記録され、
#2193 before #1601および#1601 requires fresh refinement before implementationが明文化されていること。
Verification Commands
旧
grep -c "hooks.PreToolUse"単独検証を廃止する。少なくとも以下の consumer-wide inventory を使う。
結果は単純 zero-match 判定にしない。
各 match を reviewer が以下へ分類すること。
active_enforcement_claimclassifier_or_policy_existencehistorical_noteexplicit_non_wired_notePASS 条件:
active_enforcement_claim= 0classifier_or_policy_existenceは runtime wiring と明確に分離.claude/settings.jsonに対象2 handler の project PreToolUse wiring がないRuntime Verification Applicability
以下で固定してよい。
not_applicablerepository instruction/documentation の訂正のみであり、
claim を repo-controlled project configuration に限定するため。
user/local/managed/plugin/component hooks を含む effective runtime 全体の不存在は本 Issue では主張しない。
もし refinement 中に
「effective runtime 全体で hook が存在しない」
という強い claim が必要になった場合のみ stop し、
Runtime Verification Applicability の変更と
/hooks等の effective inventory evidence を要求すること。issue-refinement-loop を再開する
#2193 body の controlled rewrite 後:
5334693502を human-context / review input として保持する。issue-refinement-loopの review → rewrite → review を継続する。終了条件
このセッションでは repository implementation には着手しない。
以下のいずれかまで進めて終了する。
成功
approve成功時は最後に以下を報告する。
impl-review-loopへ渡せるか停止
今回の OWNER decision では解けない新規 scope/architecture change、
または実在する権限・external-service・contract incompatibility が発生した場合のみ停止する。
単に
「元の #2193 には Skill 2ファイルが Allowed Paths に無かった」
「#1601 の precedence が未決定だった」
という今回すでに解決済みの理由で再度 human escalation してはならない。
この順序なら、まず誤った operational guidance を小さい #2193 で直し、その後 #1601 の executor 統合を current architecture に合わせて再設計する形になります。#1601 を先に完遂するまで #2193 を止め続ける必要はありません。
squne121 commentedon Aug 19, 2026
issue-refinement-loop 終了報告(approved)
対象 anchor comment: #2193 (comment)
human escalation 終了報告: #2193 (comment)
OWNER Decision 反映
2026-08-19 の OWNER decision(
reframe_in_place、Allowed Paths を4ファイルへ拡張、#2193 before #1601precedence)を Issue 本文に反映し、read-only SubAgent 3系統(instruction ownership auditor / #1601 scope-rollup contract auditor / verification scope auditor)の調査結果を踏まえて Outcome / In Scope / AC / Verification Commands / Allowed Paths / Required Design References /#1601semantic collision セクションを reframe した。#1601へはOWNER_DECISION_V1コメントを投稿済み(https://github.com/squne121/loop-protocol/issues/1601)。Iteration 数
Step 4(rewrite)3 iteration(VC baseline-expect annotation 不足 → 修正、rg broad-search-path violation →
.claude/settings.jsonを read-only Allowed Path として追加 → 修正)。最終 iteration で reviewer VERDICT: approve(BLOCKERS: 0)。Final Allowed Paths
.claude/agents/pr-reviewer.md.claude/skills/pr-review-judge/SKILL.md.claude/agents/scope-rollup-runner.md.claude/skills/impl-review-loop/steps/preparation.md.claude/settings.json(read-only、AC3 検証専用)#1601 disposition / precedence
precedence:
#2193 before #1601。#1601の中核 intent(integrate_sibling_profile)は retained candidate として保持、hook を security/admission authority とする旧契約は superseded。#1601側にOWNER_DECISION_V1(status: re_review_required_before_implementation)を記録済み。Runtime Verification Applicability
not_applicable(repo-controlled project configuration の記述に限定、effective runtime 全体の不在は主張しない)。Remaining Blockers
なし。
impl-review-loop への handoff
可(
contract_review.status: go、readiness_status: go、vc_preflight_status: pass、body_sha256: sha256:f7df2b558d32f86db2fa35a646869dd243d0f467741c8535e9a1eeec93000a4b)。squne121 commentedon Aug 19, 2026
implement-issue: 実装完了 (2026-08-19)
.claude/worktrees/issue-2193-hook-active-enforcement-claim-fixworktree-issue-2193-hook-active-enforcement-claim-fixgit diff --check全 PASS(Verification Commands をそのまま実行).claude/settings.jsonは read-only・無変更)squne121 commentedon Aug 19, 2026
impl-review-loop: 完了 (2026-08-19T10:50:00Z)
docs: hook active-enforcement claim を behavioral workflow contract に訂正 (
fix: repository-wide の stale hook wiring claim(PreToolUse/.codex/hook…