Repository navigation
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: implementation
parent_issue: "none"
goal_ref: "#2084 comment #5249734344 で顕在化した、明示された human-context anchor に対して構造化 ANCHOR_SCOPE_REFRAME_V1 を要求し、かつ人間が指示した scope expansion 自体を Stop Condition として human_escalation する workflow defect を解消する"
change_kind: workflowParent Issue
なし(workflow-level の単独改善)。
Parent Goal Ref
- Goal: N/A(単独改善のため親 Issue なし)
- Desired Destination: N/A
Current Validated Scope
- 実装: issue-refinement-loop の approved 終了時に triage-required ラベル遷移を実行する #2084 comment #5251322440(OWNER review, NEEDS_REFRAME 判定)で指摘された、operator-selected human-context anchor の freeform directive を scope mutation authority として扱う workflow policy と production routing の完成
- 具体的には Issue 本文の
## Outcome/## In Scope/## Acceptance Criteriaに定義される範囲(preflight.run.with_human_contextの canonical authority 明文化、AC3 の agent-derived exact path 導出、#2053/PR #2068transport の再利用、skill_runtime_exec.pyの privileged dispatch gap 解消)に限定する
Remaining Parent Gaps
なし(単独改善のため親 Issue に紐づく残課題はない)
Background
Issue #2084 の refinement では、OWNER が freeform コメントで Issue の前提変更と scope expansion を明示したにもかかわらず、以下を理由に human_escalation で停止した。
- コメントに構造化
ANCHOR_SCOPE_REFRAME_V1payload がない - 必要な変更範囲が現 Issue の Allowed Paths / architecture layer を超える
- 新規 Issue 分割または scope reframe 内容を人間が再度決める必要がある
しかし current repository には既に以下の境界が存在する。
issue-refinement-loop/SKILL.mdは anchor origin を URL から推定せず、canonical command profile でpreflight.run.with_human_context/preflight.run.with_agent_report/ unlabeled を明示する。references/anchor-comment-handling.mdには、構造化ANCHOR_SCOPE_REFRAME_V1とは別に freeform human directive をscope_delta_authority_evidence_v1へ正規化する経路が存在する。- 実装: fix(issue-refinement-loop): bind freeform OWNER scope authority end-to-end and expose routing telemetry #2053 / Draft PR fix(issue-refinement-loop): bind freeform OWNER scope authority end-to-end and expose routing telemetry #2068 は freeform OWNER authority の producer → router → controlled consumer transport/receipt を実装中であり、freeform directive classification 自体を greenfield で再実装する Issue ではない。
- PR fix(issue-refinement-loop): bind freeform OWNER scope authority end-to-end and expose routing telemetry #2068 では
scripts/agent-guards/skill_runtime_exec.pyが authority transport command shape を実 subprocess dispatch できない P0-B も確認済みである。
したがって本 Issue は、freeform authority の schema/transport を再発明するのではなく、**「operator が human-context lane として明示した same-target anchor の semantic directive を scope mutation authority として扱い、必要な technical inventory を agent が導出して contract rewrite を継続する」**という workflow policy と production routing を完成させる。
起点:
- 実装: issue-refinement-loop の approved 終了時に triage-required ラベル遷移を実行する #2084 OWNER/request comment: 実装: issue-refinement-loop の approved 終了時に triage-required ラベル遷移を実行する #2084 (comment)
- 実装: issue-refinement-loop の approved 終了時に triage-required ラベル遷移を実行する #2084 refinement escalation: 実装: issue-refinement-loop の approved 終了時に triage-required ラベル遷移を実行する #2084 (comment)
- 実装: fix(issue-refinement-loop): bind freeform OWNER scope authority end-to-end and expose routing telemetry #2053: freeform OWNER authority transport follow-up
- PR fix(issue-refinement-loop): bind freeform OWNER scope authority end-to-end and expose routing telemetry #2068: 実装: fix(issue-refinement-loop): bind freeform OWNER scope authority end-to-end and expose routing telemetry #2053 implementation / privileged executor dispatch gap
- 導入: AIエージェント運用をminimal harnessへ縮退し、過剰なcontrol-planeを廃止する #1860: minimal harness 方針
Accepted Trust Model / Provenance Limitation
本 repository は個人趣味開発であり、同一 GitHub principal が人間のブラウザ操作と AI agent の GitHub mutation の双方に使われ得る。GitHub comment metadata だけから「この文字列を物理的に人間が入力したか、AI が生成・投稿したか」を完全に識別することは本 Issue では解決しない。
本 Issue では次を明示的に採用する。
preflight.run.with_human_context/contract_update.run.with_human_contextの origin は operator が runtime invocation で宣言する。- GitHub の
author_association: OWNER|MEMBER|COLLABORATORは principal trust の補助情報であり、verified_human=trueの証明には使わない。 - same-target の canonical issue-comment URL を operator が human-context lane に明示投入した場合、その anchor は
operator_asserted_human_contextとして扱う。 - telemetry / docs はこれを「verified human comment」と表現せず、operator assertion に基づく operational trust であることを明記する。
with_agent_report/ unlabeled anchor は同じ URL であっても scope mutation authority を得ない。
この trade-off は security guarantee ではなく、個人趣味開発で autonomous workflow を優先する明示的な運用方針である。
Outcome
operator-selected human-context anchor が same Issue の goal / scope / Allowed Paths / architecture layer の拡張を freeform prose で指示した場合、ANCHOR_SCOPE_REFRAME_V1 の手書き YAML を人間に要求せず、agent が read-only investigation から必要な exact technical inventory を導出し、controlled Issue contract rewrite へ進める。
scope expansion そのものは human escalation の理由にしない。contract rewrite 後は必ず live body readback、fresh preflight、fresh review、fresh readiness を再実行し、implementation authorization はその fresh gate が通るまで false を維持する。
実際に停止するのは、semantic ambiguity/conflict、cross-target direct mutation、secret/credential、destructive operation、external paid service、permission boundary escalation 等の安全上または意味上の理由に限定する。
In Scope
preflight.run.with_human_contextを operator-selected human-context の canonical authority lane として docs / skill / runtime policy で明文化する。- freeform human directive に scope expansion signal がある場合、構造化
ANCHOR_SCOPE_REFRAME_V1不在だけを理由にno_anchor_scope_reframe_v1_payload/human_judgment_requiredへ落とさない。 - human directive が「この Issue の問題を workflow 全体で直す」「関連 consumer も修正する」等の high-level semantic scope を指定し、exact path 一覧を列挙していない場合、codebase-investigator / current-main inventory から bounded exact paths を導出できるようにする。人間へ exact path YAML の再入力を要求しない。
- same-target human-context directive と整合する
Allowed Paths/ In Scope / Out of Scope / Required Design References の追加は contract update として許可し、「現在の Allowed Paths 外」「別 architecture layer」という事実だけで停止しない。 - exact section-bound patch が作れない場合は既存
issue_editor_required/ full rewrite controlled lane へ route し、human escalation を default fallback にしない。 - 実装: fix(issue-refinement-loop): bind freeform OWNER scope authority end-to-end and expose routing telemetry #2053 / PR fix(issue-refinement-loop): bind freeform OWNER scope authority end-to-end and expose routing telemetry #2068 の existing freeform authority transport / receipt / controlled consumer を再利用し、新規 provenance schema・ledger・sidecar を追加しない。
- PR fix(issue-refinement-loop): bind freeform OWNER scope authority end-to-end and expose routing telemetry #2068 で確認された
scripts/agent-guards/skill_runtime_exec.pyの privileged executor dispatch gap を解消し、authority transport / contract update の canonical command shape が実 subprocess から production consumer へ到達できるようにする。 - 実装: issue-refinement-loop の approved 終了時に triage-required ラベル遷移を実行する #2084 comment #5249734344 の failure profile を regression fixture として固定し、構造化 payload なし + architecture-level scope expansion のケースが autonomous contract rewrite route へ進むことを検証する。
- docs に、same GitHub principal 上の human/agent physical-origin 判別は保証しないことと、その代わり operator-selected lane を trust boundary とすることを明記する。
Out of Scope
- GitHub comment が人間入力か AI 投稿かを暗号学的・外部認証的に証明する仕組み。
- bot/service-account 分離、GitHub App identity redesign、OIDC/署名付き comment、外部 approval service の導入。
- cross-repository mutation authority の追加。
with_agent_report/ unlabeled anchor を human authority に昇格すること。- destructive operation、secret/credential exposure、paid external service、repository permission escalation の自動承認。
- 実装: fix(issue-refinement-loop): bind freeform OWNER scope authority end-to-end and expose routing telemetry #2053 / PR fix(issue-refinement-loop): bind freeform OWNER scope authority end-to-end and expose routing telemetry #2068 の transport schema を別名称で再実装すること。
- independent product goal を human directive の名目で同一 Issue に無制限に吸収すること。
Design Invariants
- Operator assertion ≠ verified human identity
- command profile が origin を宣言する。GitHub comment metadata から physical author を推測しない。
- Semantic authority ≠ exact-path authorship
- 人間は goal/scope change を自然言語で指示できる。exact file inventory は agent が current repo evidence から導出してよい。
- Scope expansion ≠ implementation authorization
- Issue contract の Allowed Paths を広げることと、その path を実装で変更してよいことを同一 gate にしない。rewrite 後の fresh review/readiness が implementation authorization を決める。
- Same-target only
- human-context authority は指定 Issue の contract mutationに限定する。cross-target direct mutation は従来どおり拒否する。
- Agent/unlabeled lane remains non-authoritative
- 同じ comment URL でも origin lane が agent/unlabeled なら scope mutation authority を得ない。
- Minimal harness
- 新しい provenance service / approval ledger / hand-written structured approval payload を要求せず、existing runtime profile + live GitHub readback + fresh review を authority とする。
Acceptance Criteria
- AC1: same-target canonical Issue comment を
preflight.run.with_human_contextで与え、freeform prose が scope expansion を明示している場合、ANCHOR_SCOPE_REFRAME_V1不在だけを理由にreason: no_anchor_scope_reframe_v1_payload/human_judgment_requiredにならない。 - AC2: operator-selected human-context origin は command invocation による assertion として扱われ、docs/telemetry が
verified_humanを主張しない。GitHub principal が同じでも human/AI physical-origin を判別しないことが明記される。 - AC3: freeform directive が exact path を列挙せず architecture/workflow-level scope expansion を要求する場合、read-only repo inventory から same-goal の exact path delta を導出し、
contract_update_requiredまたはissue_editor_requiredに route できる。人間に手書きANCHOR_SCOPE_REFRAME_V1を要求しない。 - AC4: trusted same-target human-context directive に整合する Allowed Paths / architecture layer の追加は、それ自体を Stop Condition にしない。controlled rewrite 後に fresh body readback → fresh preflight → fresh review → fresh readiness を必須とする。
- AC5: human directive が semantic ambiguity/conflict、cross-target direct mutation、destructive operation、secret/credential、paid external service、permission escalation を含む場合は従来どおり fail-closed / human escalation する。
- AC6: 同じ anchor URL を
preflight.run.with_agent_reportまたは unlabeled profile に渡した場合、scope mutation authority は付与されず、human-context lane への暗黙昇格も起きない。 - AC7: exact section patch を作れない approved scope expansion は
issue_editor_requiredfull-rewrite lane へ到達し、scope expansion だけを理由とする termination report を出さない。 - AC8: 実装: issue-refinement-loop の approved 終了時に triage-required ラベル遷移を実行する #2084 comment #5249734344 相当の regression fixture(freeform operator directive、structured payload なし、docs/impl-review-loop/build_intake_capsule/implement-issue 等への scope expansion)で autonomous contract rewrite route が選ばれる。
- AC9: 実装: fix(issue-refinement-loop): bind freeform OWNER scope authority end-to-end and expose routing telemetry #2053 / PR fix(issue-refinement-loop): bind freeform OWNER scope authority end-to-end and expose routing telemetry #2068 の existing
SCOPE_DELTA_AUTHORITY_*transport/receipt を再利用し、本 Issue のための新規 provenance schema / ledger / sidecar を追加しない。 - AC10:
scripts/agent-guards/skill_runtime_exec.pyが 実装: fix(issue-refinement-loop): bind freeform OWNER scope authority end-to-end and expose routing telemetry #2053/PR fix(issue-refinement-loop): bind freeform OWNER scope authority end-to-end and expose routing telemetry #2068 の canonical authority transport / contract update command shape を実 subprocess dispatch でき、registry/policy 宣言だけの false-green を残さない。 - AC11: contract rewrite が完了しても fresh preflight/review/readiness が完了する前は
implementation_allowed=falseを維持する。 - AC12: targeted Python tests と agent-guard tests が PASS し、既存 structured
ANCHOR_SCOPE_REFRAME_V1、agent-report、untrusted/cross-target fail-closed regression を壊さない。
Runtime Verification Applicability
decision: immediate
reason: "本 Issue の主要欠陥は privileged executor → preflight/router/controlled rewrite の production routing と scope-decision behavior であり、direct function fixture だけでは registry/policy/dispatcher の実到達性を証明できないため。"
applicable_acs: [AC1, AC3, AC4, AC6, AC7, AC8, AC10, AC11]
execution_environment:
- "uv run --locked pytest による local subprocess / fixture-backed GitHub payload"
- "scripts/agent-guards/skill_runtime_exec.py の registry-rendered argv 実 subprocess"
live_github_mutation: prohibited
network_required: false
skip_conditions:
- "uv / pytest / python3 が利用できない場合は exit 77 とし PASS に変換しない"
fallback_policy:
fallback_success_is_pass: false
notes: "direct function test や mock-only route だけで privileged executor の AC10 を PASS としない"
artifact_requirements:
- "registry-rendered argv と dispatcher reason/status"
- "operator-selected human-context fixture の scope decision と final route"
- "fresh post-rewrite gate が implementation_allowed=false→fresh go 後のみ true となる証跡"Verification Commands
# AC1
# AC3
# AC4
# AC7
# AC8
# AC11
$ uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_operator_selected_scope_reframe.py .claude/skills/issue-refinement-loop/tests/test_scope_signal_guard_lane_split.py .claude/skills/issue-refinement-loop/tests/test_decide_next_loop_action_contract_update.py -q# AC2
# AC6
# AC10
$ uv run --locked pytest scripts/agent-guards/tests/test_skill_runtime_exec_anchor.py scripts/agent-guards/tests/test_skill_runtime_policy_anchor.py .claude/skills/issue-refinement-loop/tests/test_anchor_scope_reframe_preflight.py -q# AC5
# AC9
# AC12
$ uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_scope_delta_authority.py .claude/skills/issue-refinement-loop/tests/test_issue_1952_trusted_directive_regression.py -qAllowed Paths
docs/dev/workflow.mddocs/dev/agent-skill-boundaries.mddocs/dev/workflows/issue-refinement-loop-design.md.claude/skills/issue-refinement-loop/SKILL.md.claude/skills/issue-refinement-loop/references/anchor-comment-handling.md.claude/skills/issue-refinement-loop/references/scope-signal-guard.md.claude/skills/issue-refinement-loop/references/termination-policy.md.claude/skills/issue-refinement-loop/scripts/run_refinement_preflight.py.claude/skills/issue-refinement-loop/scripts/scope_signal_delta.py.claude/skills/issue-refinement-loop/scripts/plan_refinement_loop.py.claude/skills/issue-refinement-loop/scripts/decide_next_loop_action.py.claude/skills/issue-refinement-loop/scripts/command_registry.py.claude/skills/issue-refinement-loop/tests/test_scope_delta_authority.py.claude/skills/issue-refinement-loop/tests/test_issue_1952_trusted_directive_regression.py.claude/skills/issue-refinement-loop/tests/test_anchor_scope_reframe_preflight.py.claude/skills/issue-refinement-loop/tests/test_decide_next_loop_action_contract_update.py.claude/skills/issue-refinement-loop/tests/test_scope_signal_guard_lane_split.py.claude/skills/issue-refinement-loop/tests/test_operator_selected_scope_reframe.pyscripts/agent-guards/skill_runtime_exec.pyscripts/agent-guards/skill_runtime_command_policy.pyscripts/agent-guards/tests/test_skill_runtime_exec_anchor.pyscripts/agent-guards/tests/test_skill_runtime_policy_anchor.py
Stop Conditions
以下は停止条件とする。
- Allowed Paths 外の変更が必要と判明した場合
- In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
- 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
- 後続 Phase / 別スコープへの波及が判明した場合
- nested SubAgent delegation が必要になった場合
- 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
- explicit human directive 自体が意味的に矛盾・曖昧で、same-goal の contract rewrite を一意に導出できない場合
- cross-repository / cross-target direct mutation が必要な場合
- destructive operation、secret/credential exposure、paid external service、repository permission escalation が必要な場合
- independent product goal を新たに追加する必要があり、現在の human directive から同一 Issue scope と合理的に結び付けられない場合
- current-main drift により 実装: fix(issue-refinement-loop): bind freeform OWNER scope authority end-to-end and expose routing telemetry #2053 / PR fix(issue-refinement-loop): bind freeform OWNER scope authority end-to-end and expose routing telemetry #2068 の transport contract と互換性がなく、reuse ではなく新規 schema migration が必要になった場合
次は停止条件にしない: human-context directive を満たすための same-repository technical inventory の追加、Allowed Paths の追加、別 architecture layer の追加、既存 consumer の追加。これらは explicit human semantic scope と整合する限り contract rewrite 対象として扱い、fresh review/readiness を再実行して継続する。
Required Skills
- Python(argparse / subprocess / pytest)
- GitHub Issue/PR ワークフロー設計(authority provenance / scope semantics)
Required Design References
- 実装: issue-refinement-loop の approved 終了時に triage-required ラベル遷移を実行する #2084 comment #5249734344
- 実装: issue-refinement-loop の approved 終了時に triage-required ラベル遷移を実行する #2084 comment #5249684194
- 実装: fix(issue-refinement-loop): bind freeform OWNER scope authority end-to-end and expose routing telemetry #2053 / Draft PR fix(issue-refinement-loop): bind freeform OWNER scope authority end-to-end and expose routing telemetry #2068
- 導入: AIエージェント運用をminimal harnessへ縮退し、過剰なcontrol-planeを廃止する #1860 minimal harness
.claude/skills/issue-refinement-loop/references/anchor-comment-handling.md.claude/skills/issue-refinement-loop/references/scope-signal-guard.mddocs/dev/agent-skill-boundaries.md
Delivery Rule
1 Issue = 1 PRを原則とする。- 実装: fix(issue-refinement-loop): bind freeform OWNER scope authority end-to-end and expose routing telemetry #2053 / PR fix(issue-refinement-loop): bind freeform OWNER scope authority end-to-end and expose routing telemetry #2068 が先に merge した場合は current main を正として再利用する。未 merge の場合は duplicate implementation を持ち込まず、merge-order/rebase condition を明示して実装する。
- 本 Issue の実装で新規 provenance/approval framework を作らない。既存 human-context runtime lane、live GitHub readback、fresh review/readiness を authority とする。
Notes for Reviewer
- 本 Issue は 実装: fix(issue-refinement-loop): bind freeform OWNER scope authority end-to-end and expose routing telemetry #2053 の duplicate ではない。実装: fix(issue-refinement-loop): bind freeform OWNER scope authority end-to-end and expose routing telemetry #2053 は freeform authority transport/receipt の完全性を主対象とし、本 Issue は operator-selected origin policy + semantic scope expansion policy + scope stop removal + privileged executor production reachability を主対象とする。
author_association: OWNERは principal trust の signal であり physical-human provenance の証明ではない。個人趣味開発ではこの limitation を受容し、operator が human-context profile を選んだ事実を authority boundary とする。- 実装: issue-refinement-loop の approved 終了時に triage-required ラベル遷移を実行する #2084 の failure は「人間の自然言語指示が不十分」なのではなく、「自然言語の semantic authority を exact structured payload / current Allowed Paths に過度に結合している」ことが原因である。
Activity
squne121 commentedon Aug 11, 2026
総合判定
NEEDS_REFRAME / implementation-blockedです。#2086 が狙っている問題自体は実在します。現行の human-context lane は caller が明示した origin を保持しており、unlabeled / agent-report と区別する設計になっています。一方、current classifier は high-level な Allowed Paths expansion を exact path directive がない限り自動承認しません。したがって「自然言語の OWNER/operator 指示なのに、構造化 payload や exact path の再入力を要求して停止する」という failure profile は妥当です。
ただし、現在の #2086 はその defect を直す過程で、#2053 が意図的に設けた authority boundary を曖昧にしています。 このまま実装すると「human が goal を承認した」ことを「agent が推測した任意の exact path まで human が承認した」ことへ昇格させる false authority が成立します。#2086 自身には現時点でコメントもなく、この矛盾を解消する補足 authority はありません。
P0 — #2053 AC4 と #2086 AC3 が authority semantics 上で衝突している
ここが最大の blocker です。
#2053 は明示的に、exact inventory が不足する場合を
inventory_candidateとし、candidate facts に Issue mutation authority を与えない契約にしています。一方 #2086 AC3 は、人間が exact path を書かなかった場合に agent が repo inventory から path delta を導出し、その結果でcontract_update_requiredまたはissue_editor_requiredまで自動継続することを要求しています。この2つは、そのままでは両立しません。
たとえば OWNER が「この問題を workflow 全体で直して」とだけ書いたとします。agent が
docs/dev/workflow.mdは必要、さらに.claude/skills/foo/SKILL.mdも必要、と推論した場合、後者の path は human directive ではなく agent-derived fact です。それを既存SCOPE_DELTA_AUTHORITY_*transport の human authority と一体化すると、provenance を偽装することになります。逆に agent-derived inventory を authority として扱わないなら、#2086 が要求する自動 contract mutation へ進むための「semantic authorization × derived technical facts」の合成規則が必要です。しかし #2086 は AC9 で新規 provenance schema / ledger / sidecar を禁止しており、#2053 の schema 群も Allowed Paths に入れていません。つまり 現在の AC3 は、AC9 を守ると実装契約が足りません。
推奨は、「high-level human directive →
inventory_candidate→ root control-plane が same-goal / bounded / safe を検証 → controlled full-body rewrite」の二段階にすることです。agent-derived paths は authorization ではなく transaction-local evidence と明記してください。contract_update_requiredを許可するのは、元の human directive 自身に exact path がある場合か、#2053 側で provenance-preserving composition が正式に実装された場合に限定するのが安全です。P0 — #2068 を「再利用する」と言いつつ、実装 base が成立していない
current
mainはee641da1a8ff3aa916cabc57e59dca0d0274bb85です。PR #2068 もこの SHA を base にしていますが、現在 open / Draft / unmerged です。さらに #2068 自身の fresh review では、
decide.run/authority_transport.produce/authority_transport.consumeが registry/policy に登録されても、skill_runtime_exec.pyの privileged dispatcher から実 subprocess 到達できない P0-B が未解消と明記されています。まさに #2086 AC10 が引き取ろうとしている欠陥です。問題は #2086 の Delivery Rule が「#2068 が未マージなら duplicate implementation を持ち込まず merge-order/rebase condition を明示」としか規定していないことです。これでは実装 worker にとって正本がありません。
#2086 は #2068 merge 後にのみ実装可能とするか、明示的な stacked PR とする必要があります。「未マージでも実装開始可、ただし duplicate は不可」は矛盾しています。
SHA 固定より capability precondition の方が適切です。たとえば実装開始条件を「
SCOPE_DELTA_AUTHORITY_TRANSPORT_V1/ router receipt / consumption receipt とauthority_transport.produce|consumecommand が current base に存在すること」と定義し、未充足ならdependency_not_materializedで停止させるべきです。P0 —
operator_asserted_human_contextを新しい route status にすると既存 consumer と互換性がない#2086 は
operator_asserted_human_contextという概念を導入していますが、これが provenance/origin のラベルなのか、scope decision status なのかが未定義です。既存 production consumer は approved scope reframe を
status == "approved_by_trusted_anchor"で認識します。既存 full-rewrite routing もこの前提に乗っています。したがって実装者が素直に新 status
operator_asserted_human_contextを追加すると、freeform lane の authority を構築したのに既存issue_editor_required判定へ到達しない可能性があります。しかもdecide_rewrite_route.pyは #2086 の Allowed Paths にありません。ここは明示的に、
operator_asserted_human_contextは provenance/origin classification であり、routing status の新 enum ではないと固定するのが最小変更です。routing 上は既存 canonical status を維持し、「trusted」の意味が physical-human verification ではないことを docs で限定する方が #1860 の minimal harness 方針にも整合します。#1860 自身も agent-local instruction/profile を security boundary としない方針です。
P1 — Trust Model は許容可能だが、「誰でも human lane を自己申告できる」ことまで明記すべき
GitHub 公式仕様の
CommentAuthorAssociationは、その author と repository の関係を表す値です。OWNERは repository owner、MEMBERは organization member、COLLABORATORは collaborator という意味であって、「ブラウザから物理的な人間が入力した」という証明ではありません。#2086 のこの認識は正しいです。([GitHub Docs]1)現行コードでも origin は URL metadata から推測せず、control-plane から渡された
human_context_comment_urls/agent_report_comment_urlsで決まります。同じ URL が両 lane にある場合や unlabeled の場合はgenerated_by_agentに倒しています。ただし #2086 はもう一歩明記すべきです。runtime profile を選択できる caller 自体を認証していない限り、
with_human_contextは caller assertion にすぎません。 これは #2086 が受容している hobby-project trade-off なら問題ありませんが、「operator-selected lane が security boundary」とだけ表現すると強すぎます。「operational routing boundary であり authentication / non-repudiation boundary ではない」と固定すると誤読がなくなります。
P1 — AC10 の「real subprocess」と
network_required: false / live mutation prohibitedを分離すべきPR #2068 は
authority_transport.consumeが最終的に real GitHub mutation lane に到達するため、network_effectをgithub_mutationに訂正しています。GitHub の Issue update 自体も write permission が必要な mutation endpoint です。([GitHub Docs]2)
ところが #2086 の Runtime Verification は
network_required: false、live_github_mutation: prohibitedとしながら、AC10 では privileged executor から production consumer への「実 subprocess dispatch」を要求し、mock-only では PASS にしないとしています。これは dispatch reachability の証明なら可能ですが、実 GitHub mutation/readback の証明ではありません。テストの claim を分離すべきです。offline test では
skill_runtime_exec.py → exact classifier → registry argv → run_refinement_preflight.py → mutation adapterまで real subprocess で通し、PATH 上に deterministic なghfixture executable を置いて実 argv を捕捉する。そのテストは「production mutation boundary へ到達した」ことだけを証明し、「GitHub への mutation が成功した」とは主張しない。この線引きなら network prohibited と矛盾しません。P1 — privileged executor の修正を generic registry passthrough にしてはいけない
現行 runtime policy は exact argv grammar をかなり強く意識しており、human-context lane も caller-selected command-id を argv に残しています。
AC10 を最短で直そうとして
skill_runtime_exec.pyに「registry にある任意 command_id を render して実行する」汎用分岐を追加すると、これまでの exact command boundary を大幅に弱めます。decide.run/authority_transport.produce/authority_transport.consumeごとに closed command shape を持たせ、required/optional flags、duplicate flag、--flag=value、path traversal、symlink、repo/issue/invocation/head binding を個別検証すべきです。Python のargparseはデフォルトでは long option abbreviation を許すため、境界用 CLI はallow_abbrev=Falseを明示するのが妥当です。subprocess(..., shell=False)も維持すべきですが、これは shell expansion を避ける性質であって authority validation の代替ではありません。([Python documentation]3)P1 — mutation 直前の anchor freshness が AC として弱い
#2086 AC4/AC11 は rewrite 後の live readback と fresh preflight/review/readiness を強く要求しています。これは必要です。しかし scope mutation authority の source comment が inventory 調査後〜mutation 前に編集された場合の扱いが AC に固定されていません。
既存 controlled transaction には anchor を再取得して source identity を比較する設計がすでにあります。また #2068 も stale structured anchor を fail-closed にする対応を追加しています。
freeform operator lane でも mutation 直前に comment ID、canonical URL、body hash、association、lane binding、base Issue body SHA を再検証し、1つでも drift したら write 0 件で fresh preflight に戻す、と AC に昇格させるべきです。
Issue #2086 に入れるべき修正
AC3 を二段階化する。 「high-level semantic directive →
inventory_candidate」までは 実装: fix(issue-refinement-loop): bind freeform OWNER scope authority end-to-end and expose routing telemetry #2053 を維持し、agent-derived exact paths は mutation authority を持たない transaction-local evidence とする。root が same-goal/bounded/safe を検証した後、provenance を偽らずに使える既存 consumer がなければissue_editor_requiredへ送る。contract_update_requiredは exact path が human authority に直接束縛できるケースに限定する。Dependency Contract を追加する。 fix(issue-refinement-loop): bind freeform OWNER scope authority end-to-end and expose routing telemetry #2068 が merge 済み、または stacked base に transport/receipt command と schema が存在することを実装 precondition にする。current main に capability がなければ 実装: operator-selected human context の scope reframe を自動継続し scope expansion stop を撤去する #2086 側へ duplicate transport 実装をコピーせず停止する。
operator_asserted_human_contextの型を固定する。 provenance/origin telemetry の値であり、scope_delta_decision.statusの新値ではない、と明文化する。status を変更したいならdecide_rewrite_route.pyと全 consumer を Allowed Paths に加えた明示的 schema migration が必要。AC10 を「offline dispatch reachability」と「live GitHub effect」に分離する。 本 Issue で必須なのは前者のみ。real subprocess + fake
ghexecutable で mutation adapter 到達を検証し、live mutation 成功を claim しない。pre-mutation freshness AC を追加する。 inventory 完了後に anchor が編集、削除、association 変更、wrong-target 化、human/agent dual-lane 化した場合は write 0 件で fail-closed。さらに decoy unrelated path、複数の同程度 candidate inventory、unsafe path/symlink、permission-boundary path、agent-report 同一 URL を negative regression に追加する。
この修正後なら #2086 の主題はかなり明確になります。特に **「human semantic authority と agent-derived technical inventory は別物」**を不変条件に置くことが重要です。そこを固定せず scope-expansion stop だけ除去すると、停止過多を直す代わりに authority laundering を導入する形になります。
squne121 commentedon Aug 11, 2026
issue-refinement-loop 終了報告(human_judgment_required)
anchor: https://github.com/squne121/loop-protocol/issues/2086#issuecomment-5251322440(OWNER review, NEEDS_REFRAME 判定)
Step 0f(preflight)
初回 preflight は
STATUS: blocked/BLOCKERS: missing_required_section(Parent Goal Ref/Current Validated Scope/Remaining Parent Gaps/Required Skillsの4セクション欠落、.github/ISSUE_TEMPLATE/implementation.yml準拠チェック)で停止した。override_policy.overridable_in_current_resultに含まれる reason code のため、フォーマットのみの構造的修復(意味内容は変更しない4セクション追加+ Verification Commands の AC marker 記法修正+ Stop Conditions 標準6項目追加)を issue-editor 経由で適用し、STATUS: pass/NEXT_ACTION: proceedを確認した(body sha256:2620025f...→ 現在の live body)。Step 1(investigation)/ Step 1b(web research)
investigation_policy.required: true/web_research_policy.required: trueのため両方実行。docs/impl-review-loop/build_intake_capsule/implement-issueとdocs/telemetryは現在の repo に存在しない(Issue 本文の AC2/AC8/AC10 が参照するパス)。preflight.run.with_human_context/contract_update.run.with_human_contextはskill_runtime_command_policy.pyに登録済みだが、decide.run/authority_transport.produce/authority_transport.consumeは未登録(実装: fix(issue-refinement-loop): bind freeform OWNER scope authority end-to-end and expose routing telemetry #2053 / PR fix(issue-refinement-loop): bind freeform OWNER scope authority end-to-end and expose routing telemetry #2068 側の未実装)。status: failed/failure_class: capability_unavailable(AGY grounded_research quota exhausted、reset まで約51時間)。GitHubauthor_associationの意味論、Pythonargparse allow_abbrev、subprocess shell=Falseの3件の critical external claim を検証不能のまま終了。references/web-research-routing.mdのルーティング規則(status: failedかつcritical_external_claimsあり → human escalation)に従い、本ループはここで停止する。判定
termination_cause: human_judgment_required停止理由は二重である。
operator_asserted_human_contextの型固定)は codebase-investigator の調査で現状も未解消であることが裏付けられた。これらは Issue 本文の Outcome / AC / Delivery Rule / Stop Conditions の実質的な書き換えを要する semantic 判断であり、freeform_rewrite_forbidden制約下の機械的 rewrite では解消できない。推奨アクション(人間判断待ち)
operator_asserted_human_context型固定 / AC10 の offline dispatch reachability と live effect の分離 / pre-mutation freshness AC 追加)を Issue 本文へ反映する方針を人間が確定させたうえで、issue-editor による本文改訂を進めることを推奨する。(Step 0f のフォーマット修復のみ適用済み。上記の意味論的な指摘は未反映。実装着手は不可のまま。)
squne121 commentedon Aug 11, 2026
Contract Review Result
squne121 commentedon Aug 11, 2026
issue-refinement-loop 終了報告(approved)
Issue #2086 は issue-refinement-loop の全ステップを完了した。Step 0f でフォーマットを修復し、Step1/1b で investigation と web research を実施、Step2 の初回 review は C11 blocker(runtime-verification tag 欠落)により needs-fix、Step4 の rewrite で runtime-verification tag を追加し、Step2 の再 review で
approveに到達した。続けてissue-contract-reviewskill の正規手順(run_contract_review_once.py --mode execute→scripts/agent-guards/controlled_skill_mutation_exec.py --command-id contract_snapshot.publish)で Final Gate を実行し、Contract Snapshot コメント(status: go)を controlled metadata executor 経由で投稿した。squne121 commentedon Aug 11, 2026
implement-issue: 実装完了 (2026-08-11T10:45:14Z)
.claude/worktrees/issue-2086-scope-reframe-continuationworktree-issue-2086-scope-reframe-continuationfix: #2086 OWNER REQUEST_CHANGES fix_delta (P0/P1) を解消する
fix: #2086 AC9/AC10 skill_runtime_exec.py の authority transport 実 sub…
fix: test_command_registry.py の pinned assertion を authority_transpor…
fix(issue-refinement-loop): close AC3/AC9/AC10 production-wiring gaps…
実装: operator-selected human context の scope reframe を自動継続し scope expa…
feat: contract_update.run.with_human_context の mutation phase に inves…