Repository navigation
Description
調査: worktree-agent-runtime-smoke の runtime evidence を issue-creator/issue-editor persona 分割後の実体で再検証する
Machine-Readable Contract
contract_schema_version: v1
issue_kind: research
parent_issue: "#1887"
goal_ref: "worktree-agent-runtime-smoke skill が issue-creator/issue-editor persona に対して実 runtime evidence を取得できる状態にする(#1887 の Outcome を継続)"
change_kind: research-onlyParent Issue
Background
- 実装: run_worktree_agent_runtime_smoke.py の Claude capability 判定を --help 非掲載フラグでなく実 runtime 挙動に基づく判定へ修正する #1960(実装: run_worktree_agent_runtime_smoke.py の Claude capability 判定を
--help非掲載フラグでなく実 runtime 挙動に基づく判定へ修正する)は PR fix(agent-ops): capability 判定を claude --help ではなく実 runtime 挙動で行う #1976(merge commitb958cdc2b4b013657b3581d298741837c3354fb2)として実装・マージ済み。 - Issue 実装: issue-author を issue-creator/issue-editor に分割し実行時に真である Skill 権限境界を実装する #1734 は PR feat(agents): issue-author を issue-creator/issue-editor に分割する #1974(MERGED)として実装され、単一の
issue-authorpersona をissue-creator/issue-editorの 2 persona へ分割した(.claude/agents/issue-creator.md/.claude/agents/issue-editor.mdが現存)。 scripts/agent-ops/run_worktree_agent_runtime_smoke.pyは--claude-agent-nameフラグを持ち、claudesubprocess invocation に--agent <name>を挿入して指定 persona を起動する。- 現在 current main に対する関連実装の状態:
- PR 実装: worktree 内の Claude Code/Codex CLI runtime smoke を herdr で観測する共有 Skill を追加する #1921: shared runtime smoke runner の structured/interactive lane、worktree identity、bounded evidence を導入。
- PR feat(agents): issue-author を issue-creator/issue-editor に分割する #1974: Claude 側 issue-creator/issue-editor persona 分割と
--claude-agent-nameを導入。 - PR fix(agent-ops): capability 判定を claude --help ではなく実 runtime 挙動で行う #1976:
claude --help依存の false SKIP を解消し、実 subprocess invocation とresolved_executableを検証。ただし 実装: issue-author を issue-creator/issue-editor に分割し実行時に真である Skill 権限境界を実装する #1734 consumer の実 persona 再検証は未実施と明記。 - PR 実装: Claude Code 非同期起動 SubAgent の identity evidence を hook channel からも抽出する (#2021) #2025(実装: Claude Code 非同期起動 SubAgent の identity evidence を hook channel からも抽出する #2021): spawned child-agent の identity evidence を改善。main-session agent identity の証明ではない。
- PR feat: Codex issue creator と editor を分離 #2027(実装: Codex issue-creator / issue-editor を分離し controlled mutation route を検証する #1952): Codex 側 creator/editor topology と controlled mutation provenance を実装。Claude main-session の穴は埋めない。
- 実装: minimal harness の permission/runtime safety boundary を復旧する #1881(OPEN、対応 PR なし): production settings の safe Read/mutation deny boundary の owner。
- current main の恒久 runtime test は
issue-editorのみを対象とし、過去の 実装: issue-author を issue-creator/issue-editor に分割し実行時に真である Skill 権限境界を実装する #1734 worktree/marker に依存している。
- Owner adversarial review(調査: worktree-agent-runtime-smoke の runtime evidence を issue-creator/issue-editor persona 分割後の実体で再検証する #1978 (comment) )は、当時の AC では次を証明できないとして
REQUEST_CHANGESを出した:issue-creator/issue-editorが実効 main-session agent だったこと- candidate HEAD 上の
.claude/agents/*.mdが実際に選択されたこと - canonical Skill が preload されたこと
- Skill 本体と参照ファイルが実際に
Readされたこと - GitHub を含む mutation が一切試行されなかったこと
- その後の approved コメント(調査: worktree-agent-runtime-smoke の runtime evidence を issue-creator/issue-editor persona 分割後の実体で再検証する #1978 (comment) )は AC 番号・Verification Command・baseline 注釈などの構造検証に留まり、Owner review が要求した scope reframe(Machine-Readable Contract/Outcome/In Scope/Out of Scope の意味論的更新)は反映されていない。
Outcome
issue-creator / issue-editor の両 persona について、(1) main-session agent identity の証明方法(requested/observed 一致)、(2) candidate Agent definition binding の証明方法、(3) Skill declaration/preload/read の claim 分離、(4) mutation 非試行の証明方法(prompt 自己申告ではなく tool availability/event/postcondition)、(5) hermetic harness lane と production-settings lane の境界、(6) #1881 との所有範囲分担、について調査結果を記録し、これらを実装する implementation Issue を特定または新規起票して本 Issue から link した状態にする。
In Scope
- current main・関連 Issue/PR(実装: issue-author を issue-creator/issue-editor に分割し実行時に真である Skill 権限境界を実装する #1734, 実装: minimal harness の permission/runtime safety boundary を復旧する #1881, 実装: worktree 内の Claude Code/Codex CLI runtime smoke を herdr で観測する共有 Skill を追加する #1887, 実装: worktree 内の Claude Code/Codex CLI runtime smoke を herdr で観測する共有 Skill を追加する #1921, 実装: Codex issue-creator / issue-editor を分離し controlled mutation route を検証する #1952, 実装: run_worktree_agent_runtime_smoke.py の Claude capability 判定を --help 非掲載フラグでなく実 runtime 挙動に基づく判定へ修正する #1960, feat(agents): issue-author を issue-creator/issue-editor に分割する #1974, fix(agent-ops): capability 判定を claude --help ではなく実 runtime 挙動で行う #1976, 実装: Claude Code 非同期起動 SubAgent の identity evidence を hook channel からも抽出する #2021, 実装: Claude Code 非同期起動 SubAgent の identity evidence を hook channel からも抽出する (#2021) #2025, feat: Codex issue creator と editor を分離 #2027)・既存実装・open PR の dedupe inventory を作成する
issue-creator/issue-editorを対象に、現行run_worktree_agent_runtime_smoke.pyrunner が証明できる evidence と証明できない evidence(main-session identity、definition binding、Read receipt、mutation boundary)を切り分けて記録する- 上記 gap を解消する実装単位(対象ファイル・Allowed Paths・AC)を implementation Issue として特定または新規起票し、本 Issue から link する
- 実装: minimal harness の permission/runtime safety boundary を復旧する #1881 と新 implementation Issue の所有境界を明記する
Out of Scope
run_worktree_agent_runtime_smoke.py本体・既存テストファイルへの実コード変更(本 Issue は調査のみ。実装は起票される follow-up implementation Issue で行う).claude/agents/issue-creator.md/issue-editor.mdの persona 定義自体の変更- 実装: minimal harness の permission/runtime safety boundary を復旧する #1881 の production settings 実装そのもの(本 Issue は所有境界の明記のみ)
Acceptance Criteria
- AC1: current main、関連 Issue/PR、既存実装、open PR の dedupe inventory が Issue comment に記録されている
- AC2: issue-creator と issue-editor の双方について、current runner が証明できること/できないことが、実行結果または current-code evidence として Issue comment に記録されている
- AC3: main-session identity、candidate definition binding、Read receipts、mutation boundary、settings provenance を実装する Issue が特定または新規起票され、本 Issue から link されている
- AC4: 実装: minimal harness の permission/runtime safety boundary を復旧する #1881 との所有境界が Issue comment に明記されている(production permission/read semantics は 実装: minimal harness の permission/runtime safety boundary を復旧する #1881、main-session identity と hermetic runtime evidence は新 implementation Issue が原則所有する旨)
- AC5: research conclusion と close 可否が Issue comment に明記されている
Verification Commands
# AC1
# baseline-expect: pass
$ gh issue view 1978 --repo squne121/loop-protocol --json comments# AC2
# baseline-expect: pass
$ gh issue view 1978 --repo squne121/loop-protocol --json comments --jq '.comments'# AC3
# baseline-expect: pass
$ gh issue view 1978 --repo squne121/loop-protocol --json comments --jq '.comments'# AC4
# baseline-expect: pass
$ gh issue view 1978 --repo squne121/loop-protocol --json comments --jq '.comments'# AC5
# baseline-expect: pass
$ gh issue view 1978 --repo squne121/loop-protocol --json state,comments --jq '{state: .state, comments: .comments}'AC1〜AC5 は、いずれも本 Issue のコメント本文に記録された内容として成立する。起票前の placeholder Issue 番号は参照しない。上記コマンドで全コメントおよび state を取得し、各 AC が求める内容(dedupe inventory/runner 証明可否/link された implementation Issue 番号/#1881 との所有境界/close 可否)がそれぞれ記載されているかを人間または後続 agent が確認する。
Allowed Paths
- 読み取り専用。tracked file への書き込みは禁止(既定)。
- worktree-local の untracked research artifact(secret/raw transcript/HOME を含む絶対パスを含まないもの)のみ許可する。
scripts/agent-ops/run_worktree_agent_runtime_smoke.pyscripts/agent-ops/tests/test_run_worktree_agent_runtime_smoke.pyscripts/agent-ops/tests/test_run_worktree_agent_runtime_smoke_runtime_evidence.py.claude/agents/issue-creator.md.claude/agents/issue-editor.md
Runtime Verification Applicability
decision: immediate
reason: 本 Issue の AC2 は current runner に対する実際の runtime smoke 実行結果(real Claude runtime evidence または明示的な SKIP 77)を要求する。real Claude runtime が unavailable の場合は exit 77 / SKIP を記録し、SKIP を PASS に昇格しない。deterministic code/fixture 分析と implementation Issue 作成は runtime unavailable でも継続する。
applicable_acs: AC2
execution_environment: worktree-agent-runtime-smoke skill 経由の run_worktree_agent_runtime_smoke.py --claude-agent-name issue-creator|issue-editor を、real Claude Code CLI が利用可能な local/CI runtime 上で実行する
skip_conditions: real Claude runtime(claude executable)が unavailable、認証未済、または capability unavailable の場合は exit 77 / SKIP として記録する
fallback_policy: SKIP は PASS に昇格しない。SKIP のまま AC2 の evidence として current-code evidence(現行 runner が構造的に証明できる/できない範囲)のみを記録し、実 runtime evidence が必要な項目は unavailable と明記する
artifact_requirements: allowlist-only summary(exit code・capability_decision・resolved_executable 等)のみを Issue comment に記録し、raw prompt/raw transcript/reasoning/credential は保存しない
Stop Conditions
- Outcome / Scope / AC が検索可能な形で記載されていない場合は即停止
- Allowed Paths 外への書き込みを試みた場合は即停止
- 権限不足(permission denied)により操作が完了できない場合は即停止
- 成果物の書き込みに失敗した場合(I/O エラー等)は即停止
- force push、
git reset --hard、git clean、未マージ変更を含む branch/worktree の削除、history rewrite、branch protection/hook/sandbox/permission guard の迂回、--no-verify/--admin/dangerously-bypass 系オプション、復元不能なデータ削除、対象外リソースへの一括 mutation を試みた場合は即停止 - secret/credential/private key/cookie/認証済み session data の読取りが必要な場合、または secret を検出した場合は即停止
Handoff Contract
Current Objective:issue-creator/issue-editorpersona に対する main-session identity・definition binding・Read receipt・mutation boundary evidence の gap を特定し、implementation Issue として起票可能な状態にするBounded Current Context: Owner adversarial review(issuecomment-5229695162)/approved 構造検証(issuecomment-5229786515)/PR 実装: worktree 内の Claude Code/Codex CLI runtime smoke を herdr で観測する共有 Skill を追加する #1921, feat(agents): issue-author を issue-creator/issue-editor に分割する #1974, fix(agent-ops): capability 判定を claude --help ではなく実 runtime 挙動で行う #1976, 実装: Claude Code 非同期起動 SubAgent の identity evidence を hook channel からも抽出する (#2021) #2025, feat: Codex issue creator と editor を分離 #2027/実装: minimal harness の permission/runtime safety boundary を復旧する #1881(本 Issue の Background セクション参照)Open Questions: main-session identity の requested/observed 一致をどう証明するか。candidate Agent definition binding を hermetic lane でどう決定論的に生成するか。Skill declaration/preload/read の claim をどう分離するか。実装: minimal harness の permission/runtime safety boundary を復旧する #1881 と新 implementation Issue の所有範囲の正確な境界Next Action: 上記調査結果をもとに implementation Issue を特定または新規起票し、## Allowed Pathsに対象テストファイルを明記して本 Issue から link するArtifact Refs: 実装: issue-author を issue-creator/issue-editor に分割し実行時に真である Skill 権限境界を実装する #1734, 実装: minimal harness の permission/runtime safety boundary を復旧する #1881, 実装: worktree 内の Claude Code/Codex CLI runtime smoke を herdr で観測する共有 Skill を追加する #1887, 実装: worktree 内の Claude Code/Codex CLI runtime smoke を herdr で観測する共有 Skill を追加する #1921, 実装: Codex issue-creator / issue-editor を分離し controlled mutation route を検証する #1952, 実装: run_worktree_agent_runtime_smoke.py の Claude capability 判定を --help 非掲載フラグでなく実 runtime 挙動に基づく判定へ修正する #1960, feat(agents): issue-author を issue-creator/issue-editor に分割する #1974, fix(agent-ops): capability 判定を claude --help ではなく実 runtime 挙動で行う #1976, 実装: Claude Code 非同期起動 SubAgent の identity evidence を hook channel からも抽出する #2021, 実装: Claude Code 非同期起動 SubAgent の identity evidence を hook channel からも抽出する (#2021) #2025, feat: Codex issue creator と editor を分離 #2027
Source
dedupe_key: follow-up:squne121/loop-protocol:pr/1976:ac10-1734-runtime-smoke
Activity
squne121 commentedon Aug 9, 2026
判定
REQUEST_CHANGES。Issue #1978 は、現契約のまま実行・完了判定してはいけません。
最大の問題は、現在の Acceptance Criteria が証明できるのは「Claude Code の実プロセスが起動したこと」までであり、以下を証明できない点です。
issue-creator/issue-editorが実効 main-session agent だったことcandidate HEAD 上の
.claude/agents/*.mdが実際に選択されたことcanonical Skill が preload されたこと
Skill 本体と参照ファイルが実際に
ReadされたことGitHub を含む mutation が一切試行されなかったこと
さらに #1978 は 2026年8月2日以降コメントも更新もなく、その後 8月8日に #1952/PR #2027 と #2021 が完了し、runtime evidence の provenance、creator/editor topology、hook channel の実装前提が大きく変わっています。現本文は current main に対して stale です。
致命的な懸念
P0-1 —
real invocationを persona の実効同一性へ誤昇格できる#1978 の AC が要求している証跡は、両 persona の
exit code、capability_decision、resolved_executableです。これらは実 binary の起動証明にはなりますが、その binary が candidate HEAD のissue-creator/issue-editor定義を使った証明にはなりません。現行 runner は
--claude-agent-nameをclaude --agent <name>として argv に挿入します。一方、summary 側のrequested_agent_typeは別オプションの--agent-typeに由来し、effective_agent_typeは主に spawned child の native identity evidence 用です。loaded_skillsも runtime 観測ではなくstatic_frontmatter読み取りです。つまり、現在の summary schema には main-session agent の要求値と実観測値を比較する独立した証跡がありません。Claude Code 公式仕様では、
--agentは current session の agent を指定し、その実効名は hook input のagent_typeに現れます。特にSessionStart.agent_typeはclaude --agent <name>で開始した agent 名です。したがって、main-session identity の正規 evidence source はrequested_agent_typeや prompt 内の自己申告ではなく、runtime が出したSessionStart.agent_typeです。 (Claude)ただし agent 名だけでも candidate HEAD のファイルまでは束縛できません。公式仕様上、managed agent、CLI
--agents、project agent、user agent、plugin agentには優先順位があり、managed definition は同名の project definition より優先されます。また、同じ.claude/agents/tree 内に同名定義が複数ある場合、選択は filesystem read order で決まり得ます。agent_type: issue-editorの観測だけでは、どの定義をロードしたかは未確定です。 (Claude)必須修正
summary に少なくとも次を追加し、required field が欠落・不一致なら exit 77 または exit 1 にしてください。
candidate file との厳密な束縛が必要なら、repo agent definition から session-local
--agentsJSON を決定論的に生成し、SHA を含む一意名で起動する hermetic lane と、通常の project discovery lane を分離すべきです。単にローカルファイルを hash し、同名 agent が起動したから同じ内容が使われたと推定してはいけません。P0-2 — 現在の runtime test は「Readした」というモデル自己申告を受理できる
既存の
.claude/agents/tests/test_issue_editor_runtime_smoke.pyは、モデルへ Skill と参照ファイルを Read した後に marker を返すよう指示しています。しかし test 自体が確認するのは、runner の終了コード、marker 経由の成功、summary.mdが存在して空でないことだけです。実際のReadtool event の path や成功 result は検証していません。モデルがファイルを読まずに marker を返しても、現在の構造では false positive になり得ます。Claude Code hook は
PreToolUseにtool_name、tool_input、tool_use_idを提供し、Readのtool_input.file_pathは正規化済み絶対パスとして渡されます。したがって、marker ではなく、runtime のReadtool event と対応する成功結果を証跡化できます。 (Claude)また、公式仕様上
skills:は Skill 全文を起動時 context に注入しますが、InstructionsLoadedhook はCLAUDE.mdと.claude/rules/.mdの観測用であり、Skill preload の汎用イベントではありません。現行 runner 自身も native event stream から Skill preload の直接 signal は取得できないと明記しています。したがって、Skill preload と後続の明示的 Read は別の主張として扱う必要があります。 (Claude)必須修正
以下を別々の evidence field にしてください。
preload.status: observedは、直接観測可能な upstream field が追加されるまで禁止すべきです。P0-3 — current project settings では、既存の Skill Read smoke が原理的に拒否される
current main の
.claude/settings.jsonはRead(/.claude/)を deny しています。一方、既存 test は Read tool で.claude/skills/edit-issue/SKILL.mdとその参照ファイルを読むことを成功条件にしています。Claude Code の permission rule は
deny → ask → allowの順で評価され、deny はより具体的な allow やacceptEditsより優先されます。Readdeny は built-in Read/Grep/Glob と、認識可能な Bash file read にも適用されます。したがって、認証済み runtime が利用可能になった場合、この test は current production settings 下では成功できない可能性が高いです。 (Claude)この競合の正規 owner は既に OPEN Issue #1881 です。#1881 は blanket
.claude/**Read deny の除去、safe reference read の positive control、mutation deny の fresh-session 検証を明示的に所有しています。#1978 側で暗黙に settings を迂回すると、production persona の検証ではなく別設定下の harness 検証になります。必須修正
#1978 は次のどちらを検証するか明示する必要があります。
Production-settings lane
実装: minimal harness の permission/runtime safety boundary を復旧する #1881 を dependency とし、current project settings 下で canonical Read が成功することを検証する。
Hermetic harness lane
--setting-sourcesと session-local--settingsfixture を使って mechanics だけを検証する。ただし、この結果を production permission behavior へ昇格しない。公式 CLI は setting source の限定と session-local settings file を提供していますが、設定を切り替えた場合は、使用した source 集合と settings digest を evidence に残す必要があります。 (Claude)
推奨は、process/identity harness は hermetic、production permission/read semantics は #1881 完了後という二層化です。
P0-4 — real smoke が GitHub remote mutation を起こさない技術的保証がない
issue-creator/issue-editorはいずれもBashとReadを持っています。agent 本文は controlled executor を正規手順としていますが、rawghmutation を Bash tool レベルで技術的に拒否するとは主張していません。さらに project settings は
gh issue create、gh issue edit、gh issue close、gh issue comment等を allow しています。prompt に「mutation しない」と書くだけでは permission boundary になりません。Claude Code 公式も、prompt や CLAUDE.md はモデルの試行を誘導するだけで、permission rule を変更しないと明記しています。 (Claude)--require-clean-postconditionは local filesystem/Git の変化を検出できますが、GitHub server-side mutation を元に戻したり、不実行だったと証明したりはできません。必須修正
canonical Read smoke では、Claude CLI の実効 tool surface を Read のみに制限してください。
Claude Code は
--toolsで built-in tool を限定し、bare tool 名を--disallowedToolsに渡すとその tool を context から除去できます。 (Claude)証跡には次を含めるべきです。
controlled executor の拒否経路を検証する場合は、#1952/PR #2027 と同様に transaction parser へ不正入力を渡して pre-executor refusal を観測し、実 GitHub mutation を起動してはいけません。
設計上の穴
P1-1 — current main に対する dedupe がない
#1978 は「恒久回帰テストを設計して implementation Issue を起票する」ことを無条件 AC にしています。しかし current main には既に
test_issue_editor_runtime_smoke.pyがあり、PR #2027 では creator/editor evidence のdeclared/observed/unavailable分離と、pre-executor refusal が導入されています。新 Issue を先に作るのではなく、現存 test の修復・置換で足りるかを dedupe すべきです。修正:
follow_up_issue_creation: requiredを、次へ変更してください。P1-2 — fake binary と real binary は二者択一ではない
恒久テストは次の二層が必要です。
CI必須・決定論的 lane
fake Claude binary
両 persona を parameterize
exact argv に
--agent <name>が一度だけ含まれるrequested main agent が summary に記録される
identity unavailable を requested 値で補完しない
parser error / timeout / auth unavailable の分類
settings/tool restriction flagsの転送
side effect なし
既存の fake-binary runtime evidence test は、実 subprocess invocation と
resolved_executableを検証する良い基礎ですが、persona identity や Skill Read は対象外です。runtime-only・実 Claude lane
issue-creatorとissue-editorの両方SessionStart.agent_typeexact
Readtool path と success resultcandidate HEAD、agent definition digest、Skill digest
tool surface restriction
unavailable は exit 77
static/fake resultをruntime PASSへ昇格しない
片方だけでは不十分です。creator/editor は agent definition、preloaded Skill、mutation authority が異なるため、同値クラスではありません。
P1-3 — 既存 test は hard-coded worktree に依存し、恒久 regression になっていない
既存 test は
.claude/worktrees/issue-1734-issue-creator-editor-splitがなければ即pytest.skipします。Python test plan は.claude/agents/tests/を収集対象にしていますが、test が skip された場合、CI 成功は実 runtime 実行を意味しません。また summary の内容も検証せず、非空であることしか確認していません。修正:
candidate HEAD の current linked worktree を入力で受ける
historical issue 名を path に固定しない
CI lane は fake fixture で必ず実行
real lane は
github_live等の runtime-only marker で明示SKIP理由を summary と PR evidence に残す
summary.mdの必須 field を値まで assertするP1-4 — evidence hygiene allowlist が新しい主張を保存できない
現在の evidence policy は
summary.mdのみを永続化し、raw native event dump や transcript を保存しません。この方針自体は妥当ですが、現行 allowlist には main-session agent identity、agent definition digest、canonical Read path、tool-use provenance が含まれていません。raw transcript を復活させず、次の bounded fieldsだけを許可してください。
値ごとに
observed/declared/derived_from_observed/unavailableを付け、PR #2027 で問題になった静的値の runtime PASS 昇格を防ぐ必要があります。P1-5 — Skill 配布物のドキュメントが実装と不整合
worktree-agent-runtime-smoke/SKILL.mdの Input には--claude-agent-nameと--agent-typeが記載されておらず、structured command example にも--agentがありません。またreferences/claude-code.mdは前半で help-based capability 判定を否定しながら、後半に「runner はclaude --helpを preflight する」という旧説明を残しています。Claude Code 公式仕様では
claude --helpが全 flag を列挙しないこと、--agent、--include-hook-events、--no-session-persistence、--max-turnsが正式な CLI surface であることが明記されています。 (Claude)follow-up Allowed Paths には、runner/testだけでなく次も含めるべきです。
P1-6 — Runtime Verification Applicability が欠落している
repository policy は全 Issue に
not_applicable | immediate | deferredの適用判定を要求し、immediateでは runtime AC tag、exit 77、fallback FAIL、証跡要件を要求しています。#1978 にはこの節がありません。追加すべき契約は次です。
execution_environment:
cli_tools: [claude]
authenticated_runtime: required
network: required_for_authenticated_runtime
repository_worktree: required
mutation: prohibited
skip_conditions:
"#1881未完了によりproduction settings下のcanonical Readが拒否される"
fallback_policy:
static_or_fake_result_is_not_runtime_pass: true
artifact_requirements:
raw_transcript: prohibited
summary_allowlist_only: true
P1-7 — 「読み取り専用」と artifact/Issue mutation の境界が曖昧
#1978 は Allowed Paths を「読み取り専用、リポジトリ変更なし」としながら、Outcome では
summary.mdの生成と follow-up Issue の起票を要求しています。tracked repository change、untracked runtime artifact、GitHub Issue mutation が同じ「write」に混在しています。次のように分けるべきです。
artifacts/runtime-smoke/issue-1978-*/
github_mutation:
issue_comment: controlled_only
follow_up_issue_create: dedupe_then_controlled_issue_creator
採用すべき証拠モデル
Claim | 判定 | 正規 source
-- | -- | --
Claude executable が実行された | observed | resolved executable+process invocation
--agent issue-editor が要求された | declared | runner argv
main-session agent が issue-editor | observed | SessionStart.agent_type
candidate agent file の内容 | declared | candidate HEAD file+SHA
candidate fileが実際に選択された | observed または unavailable | source-bound runtime receipt。名前一致だけでは不可
skills: [edit-issue] 宣言 | declared | frontmatter
Skill preload | derived_from_observed または unavailable | upstream contract+definition binding
Skill本体をReadした | observed | Read tool event+成功 result
mutationを試行しなかった | observed | restricted tool surface+mutation event count
remote GitHub state不変 | 原則主張しない | local clean statusだけから推定禁止
推奨する follow-up implementation Issue 草案
secret、権限拡大、外部課金、破壊的操作が必要
Issue #1978 へのコメント草案
結論として、#1978 の本来の gap は残っています。ただし現在の gap は「real binary に到達するか」ではなく、Claude main-session agent の実効 identity、candidate definition binding、canonical Skill Read、permission/mutation boundaryを、自己申告や静的値へ依存せず観測できるかです。
# 判定REQUEST_CHANGES。Issue #1978 は、現契約のまま実行・完了判定してはいけません。
最大の問題は、現在の Acceptance Criteria が証明できるのは「Claude Code の実プロセスが起動したこと」までであり、以下を証明できない点です。
issue-creator/issue-editorが実効 main-session agent だったこと.claude/agents/*.mdが実際に選択されたことReadされたことさらに #1978 は 2026年8月2日以降コメントも更新もなく、その後 8月8日に #1952/PR #2027 と #2021 が完了し、runtime evidence の provenance、creator/editor topology、hook channel の実装前提が大きく変わっています。現本文は current main に対して stale です。
致命的な懸念
P0-1 —
real invocationを persona の実効同一性へ誤昇格できる#1978 の AC が要求している証跡は、両 persona の
exit code、capability_decision、resolved_executableです。これらは実 binary の起動証明にはなりますが、その binary が candidate HEAD のissue-creator/issue-editor定義を使った証明にはなりません。現行 runner は
--claude-agent-nameをclaude --agent <name>として argv に挿入します。一方、summary 側のrequested_agent_typeは別オプションの--agent-typeに由来し、effective_agent_typeは主に spawned child の native identity evidence 用です。loaded_skillsも runtime 観測ではなくstatic_frontmatter読み取りです。つまり、現在の summary schema には main-session agent の要求値と実観測値を比較する独立した証跡がありません。Claude Code 公式仕様では、
--agentは current session の agent を指定し、その実効名は hook input のagent_typeに現れます。特にSessionStart.agent_typeはclaude --agent <name>で開始した agent 名です。したがって、main-session identity の正規 evidence source はrequested_agent_typeや prompt 内の自己申告ではなく、runtime が出したSessionStart.agent_typeです。 ([Claude]1)ただし agent 名だけでも candidate HEAD のファイルまでは束縛できません。公式仕様上、managed agent、CLI
--agents、project agent、user agent、plugin agentには優先順位があり、managed definition は同名の project definition より優先されます。また、同じ.claude/agents/tree 内に同名定義が複数ある場合、選択は filesystem read order で決まり得ます。agent_type: issue-editorの観測だけでは、どの定義をロードしたかは未確定です。 ([Claude]2)必須修正
summary に少なくとも次を追加し、required field が欠落・不一致なら exit 77 または exit 1 にしてください。
candidate file との厳密な束縛が必要なら、repo agent definition から session-local
--agentsJSON を決定論的に生成し、SHA を含む一意名で起動する hermetic lane と、通常の project discovery lane を分離すべきです。単にローカルファイルを hash し、同名 agent が起動したから同じ内容が使われたと推定してはいけません。P0-2 — 現在の runtime test は「Readした」というモデル自己申告を受理できる
既存の
.claude/agents/tests/test_issue_editor_runtime_smoke.pyは、モデルへ Skill と参照ファイルを Read した後に marker を返すよう指示しています。しかし test 自体が確認するのは、runner の終了コード、marker 経由の成功、summary.mdが存在して空でないことだけです。実際のReadtool event の path や成功 result は検証していません。モデルがファイルを読まずに marker を返しても、現在の構造では false positive になり得ます。Claude Code hook は
PreToolUseにtool_name、tool_input、tool_use_idを提供し、Readのtool_input.file_pathは正規化済み絶対パスとして渡されます。したがって、marker ではなく、runtime のReadtool event と対応する成功結果を証跡化できます。 ([Claude]3)また、公式仕様上
skills:は Skill 全文を起動時 context に注入しますが、InstructionsLoadedhook はCLAUDE.mdと.claude/rules/*.mdの観測用であり、Skill preload の汎用イベントではありません。現行 runner 自身も native event stream から Skill preload の直接 signal は取得できないと明記しています。したがって、Skill preload と後続の明示的 Read は別の主張として扱う必要があります。 ([Claude]3)必須修正
以下を別々の evidence field にしてください。
preload.status: observedは、直接観測可能な upstream field が追加されるまで禁止すべきです。P0-3 — current project settings では、既存の Skill Read smoke が原理的に拒否される
current main の
.claude/settings.jsonはRead(**/.claude/**)を deny しています。一方、既存 test は Read tool で.claude/skills/edit-issue/SKILL.mdとその参照ファイルを読むことを成功条件にしています。Claude Code の permission rule は
deny → ask → allowの順で評価され、deny はより具体的な allow やacceptEditsより優先されます。Readdeny は built-in Read/Grep/Glob と、認識可能な Bash file read にも適用されます。したがって、認証済み runtime が利用可能になった場合、この test は current production settings 下では成功できない可能性が高いです。 ([Claude]4)この競合の正規 owner は既に OPEN Issue #1881 です。#1881 は blanket
.claude/**Read deny の除去、safe reference read の positive control、mutation deny の fresh-session 検証を明示的に所有しています。#1978 側で暗黙に settings を迂回すると、production persona の検証ではなく別設定下の harness 検証になります。必須修正
#1978 は次のどちらを検証するか明示する必要があります。
Production-settings lane
実装: minimal harness の permission/runtime safety boundary を復旧する #1881 を dependency とし、current project settings 下で canonical Read が成功することを検証する。
Hermetic harness lane
--setting-sourcesと session-local--settingsfixture を使って mechanics だけを検証する。ただし、この結果を production permission behavior へ昇格しない。公式 CLI は setting source の限定と session-local settings file を提供していますが、設定を切り替えた場合は、使用した source 集合と settings digest を evidence に残す必要があります。 ([Claude]1)
推奨は、process/identity harness は hermetic、production permission/read semantics は #1881 完了後という二層化です。
P0-4 — real smoke が GitHub remote mutation を起こさない技術的保証がない
issue-creator/issue-editorはいずれもBashとReadを持っています。agent 本文は controlled executor を正規手順としていますが、rawghmutation を Bash tool レベルで技術的に拒否するとは主張していません。さらに project settings は
gh issue create、gh issue edit、gh issue close、gh issue comment等を allow しています。prompt に「mutation しない」と書くだけでは permission boundary になりません。Claude Code 公式も、prompt や CLAUDE.md はモデルの試行を誘導するだけで、permission rule を変更しないと明記しています。 ([Claude]4)--require-clean-postconditionは local filesystem/Git の変化を検出できますが、GitHub server-side mutation を元に戻したり、不実行だったと証明したりはできません。必須修正
canonical Read smoke では、Claude CLI の実効 tool surface を Read のみに制限してください。
Claude Code は
--toolsで built-in tool を限定し、bare tool 名を--disallowedToolsに渡すとその tool を context から除去できます。 ([Claude]1)証跡には次を含めるべきです。
controlled executor の拒否経路を検証する場合は、#1952/PR #2027 と同様に transaction parser へ不正入力を渡して pre-executor refusal を観測し、実 GitHub mutation を起動してはいけません。
設計上の穴
P1-1 — current main に対する dedupe がない
#1978 は「恒久回帰テストを設計して implementation Issue を起票する」ことを無条件 AC にしています。しかし current main には既に
test_issue_editor_runtime_smoke.pyがあり、PR #2027 では creator/editor evidence のdeclared/observed/unavailable分離と、pre-executor refusal が導入されています。新 Issue を先に作るのではなく、現存 test の修復・置換で足りるかを dedupe すべきです。修正:
follow_up_issue_creation: requiredを、次へ変更してください。P1-2 — fake binary と real binary は二者択一ではない
恒久テストは次の二層が必要です。
CI必須・決定論的 lane
--agent <name>が一度だけ含まれる既存の fake-binary runtime evidence test は、実 subprocess invocation と
resolved_executableを検証する良い基礎ですが、persona identity や Skill Read は対象外です。runtime-only・実 Claude lane
issue-creatorとissue-editorの両方SessionStart.agent_typeReadtool path と success result片方だけでは不十分です。creator/editor は agent definition、preloaded Skill、mutation authority が異なるため、同値クラスではありません。
P1-3 — 既存 test は hard-coded worktree に依存し、恒久 regression になっていない
既存 test は
.claude/worktrees/issue-1734-issue-creator-editor-splitがなければ即pytest.skipします。Python test plan は.claude/agents/tests/を収集対象にしていますが、test が skip された場合、CI 成功は実 runtime 実行を意味しません。また summary の内容も検証せず、非空であることしか確認していません。修正:
github_live等の runtime-only marker で明示summary.mdの必須 field を値まで assertするP1-4 — evidence hygiene allowlist が新しい主張を保存できない
現在の evidence policy は
summary.mdのみを永続化し、raw native event dump や transcript を保存しません。この方針自体は妥当ですが、現行 allowlist には main-session agent identity、agent definition digest、canonical Read path、tool-use provenance が含まれていません。raw transcript を復活させず、次の bounded fieldsだけを許可してください。
値ごとに
observed/declared/derived_from_observed/unavailableを付け、PR #2027 で問題になった静的値の runtime PASS 昇格を防ぐ必要があります。P1-5 — Skill 配布物のドキュメントが実装と不整合
worktree-agent-runtime-smoke/SKILL.mdの Input には--claude-agent-nameと--agent-typeが記載されておらず、structured command example にも--agentがありません。またreferences/claude-code.mdは前半で help-based capability 判定を否定しながら、後半に「runner はclaude --helpを preflight する」という旧説明を残しています。Claude Code 公式仕様では
claude --helpが全 flag を列挙しないこと、--agent、--include-hook-events、--no-session-persistence、--max-turnsが正式な CLI surface であることが明記されています。 (Claude)follow-up Allowed Paths には、runner/testだけでなく次も含めるべきです。
P1-6 — Runtime Verification Applicability が欠落している
repository policy は全 Issue に
not_applicable | immediate | deferredの適用判定を要求し、immediateでは runtime AC tag、exit 77、fallback FAIL、証跡要件を要求しています。#1978 にはこの節がありません。追加すべき契約は次です。
P1-7 — 「読み取り専用」と artifact/Issue mutation の境界が曖昧
#1978 は Allowed Paths を「読み取り専用、リポジトリ変更なし」としながら、Outcome では
summary.mdの生成と follow-up Issue の起票を要求しています。tracked repository change、untracked runtime artifact、GitHub Issue mutation が同じ「write」に混在しています。次のように分けるべきです。
採用すべき証拠モデル
observed--agent issue-editorが要求されたdeclaredissue-editorobservedSessionStart.agent_typedeclaredobservedまたはunavailableskills: [edit-issue]宣言declaredderived_from_observedまたはunavailableobservedobserved推奨する follow-up implementation Issue 草案
Issue #1978 へのコメント草案
結論として、#1978 の本来の gap は残っています。ただし現在の gap は「real binary に到達するか」ではなく、Claude main-session agent の実効 identity、candidate definition binding、canonical Skill Read、permission/mutation boundaryを、自己申告や静的値へ依存せず観測できるかです。
squne121 commentedon Aug 9, 2026
issue-refinement-loop 完了報告
結果: approved(3 iteration で収束)
anchor comment(https://github.com/squne121/loop-protocol/issues/1978#issuecomment-5229695162)を起点に、review-issue による自動レビューと issue-editor による本文修正を3 iteration 実施しました。
iteration 履歴
## Acceptance CriteriaにAC[N]:番号ラベルが欠如## Verification CommandsにプレースホルダーNEW_IMPLEMENTATION_ISSUE_NUMBERを含むコマンドが存在## Allowed Pathsと一致せず broad path 判定gh issue view 1978ベースの決定論的コマンドへ置換、Allowed Paths に read-only 対象ファイル5点を明記、## Runtime Verification Applicability(not_applicable)を追加VCP_UNEXPECTED_PASS)# baseline-expect: pass注釈が欠如# baseline-expect: pass注釈を追加contract ready)最終状態
sha256:c4ffb7295b251802b8c13c849f399107a0a2ce309c9e543785972fee78c480e2本 Issue は research issue(parent #1887)であり、
issue_kind: implementationではないためLOOP_HANDOFF_RESULT_V1marker は出力していません。squne121 commentedon Aug 9, 2026
結論
変更が必要です。現行の Issue #1978 をそのまま実行し、AC 達成として閉じるべきではありません。
Issue #1978 は現在も OPEN の research Issue で、直接対応する PR は存在しません。本文の Outcome は
exit code、capability_decision、resolved_executableを中心とした「実バイナリ起動」の確認に留まっています。調査時点のmainは11ed12ecae60f143bc14913030f550390017cbbeです。Owner の敵対的レビューは、現在の AC では以下を証明できないとして
REQUEST_CHANGESを出しています。issue-creator/issue-editorが実効 main-session agent だったことその後の
approvedコメントは、AC 番号、Verification Command、baseline 注釈などの構造検証を通したものです。Owner review が要求した scope reframe は反映されず、Machine-Readable Contract、Outcome、In Scope、Out of Scope は変更されていません。したがって、これは意味論上の P0 解消ではありません。関連実装は次の状態です。
issue-creator/issue-editor分割と--claude-agent-nameを導入済みです。claude --helpに依存した false SKIP を解消し、実 subprocess invocation とresolved_executableを検証済みですが、実装: issue-author を issue-creator/issue-editor に分割し実行時に真である Skill 権限境界を実装する #1734 consumer の実 persona 再検証が未実施であることを明記しています。current main の恒久テストは
issue-editorのみを対象とし、過去の #1734 worktree を固定参照しています。判定も runner の終了コード、marker、非空のsummary.mdが中心で、Read tool receipt を検証していません。さらに project settings は
Read(**/.claude/**)を deny する一方、Git commit/push や GitHub Issue/PR mutation を広く allow しています。したがって、現状の production settings 下で canonical Skill Read を成功条件にすることと、mutation 不試行を prompt だけで保証することは両立していません。Claude Code の公式仕様上、
claude --agentで起動した main-session agent 名はSessionStart.agent_typeで観測できます。一方、同名 Agent の実定義は managed、CLI--agents、project、user、plugin の優先順位に左右されるため、agent 名の一致だけでは candidate HEAD のファイル内容まで束縛できません。厳密な検証には、candidate の Agent 定義から session-local--agentsを生成する hermetic lane と、通常の project discovery lane の分離が必要です。 ([Claude]1) ([Claude]2)current main の push workflow は取得時に4件あり、確認できた run は成功しており、取得結果内に failure conclusion は検出されませんでした。ただし、これらは #1978 固有の runtime identity/Read receipt を検証するものではありません。リポジトリは squash merge のみ許可し、merge commit、rebase merge、auto-merge は無効です。
実行主体は Codex CLI を推奨します。Claude Code 自体を fresh subprocess として検証するため、orchestrator と被検証 runtime を分離できます。以下は Claude Code でも Codex CLI でも使用できます。
実行プロンプト
squne121 commentedon Aug 9, 2026
AC1: dedupe inventory (current main SHA:
11ed12ecae60f143bc14913030f550390017cbbe)issue-creator/issue-editorpersona 分割と--claude-agent-name。claude --help依存 false SKIP を解消し実 subprocess invocation を検証。実装: issue-author を issue-creator/issue-editor に分割し実行時に真である Skill 権限境界を実装する #1734 consumer 再検証は未実施と明記。.claude/agents/pr-reviewer.md/pr-review-judgeの permission/runtime safety boundary が対象。blocked_by 実装: worktree 内の Claude Code/Codex CLI runtime smoke を herdr で観測する共有 Skill を追加する #1887 は CLOSED 済みで解消。対応 PR なし)。scope は pr-reviewer 側であり issue-creator/issue-editor の main-session identity gap とは別軸。main_agent_identity/SessionStart agent_type/requested_main_agent/observed_main_agent/canonical_read/read_receipt/agent_definition_sha256,in:title,body, state:open): 一致する既存 OPEN Issue/PR なし。AC2: current runner の証明可否 (real invocation evidence)
scripts/agent-ops/run_worktree_agent_runtime_smoke.py --claude-agent-name issue-creator|issue-editorを fresh worktree(.claude/worktrees/issue-1978-research-current, tested_head11ed12ecae60f143bc14913030f550390017cbbe)に対して実行した結果:issue-creator
issue-editor
現行 runner が証明できること: real
claudebinary の起動(resolved_executable / runtime_version)、terminal event 到達、--agent <name>を argv に挿入した real subprocess invocation(parser-level SKIP ではない)、bounded exit code。現行 runner が証明できないこと(Owner review 指摘と一致):
agent_type_identity_verified: False/effective_agent_type: None— SessionStart.agent_type による main-session identity の requested/observed 一致は未観測。loaded_skills: None— Skill preload/read の直接観測なし。candidate HEAD 上の.claude/agents/*.mdが実際に選択された証明(binding mode)なし。mutation_attempted: None— mutation-capable tool event の有無を明示的に記録するフィールドが summary schema に存在しない。以上により、Owner adversarial review が指摘した5項目のうち、real binary invocation 以外(main-session identity 一致、candidate definition binding、Skill preload、canonical Read receipt、mutation 非試行の明示的観測)は現行 runner では証明不能であることを確認した。
squne121 commentedon Aug 9, 2026
AC3 / AC4: implementation issue の起票と所有境界
squne121 commentedon Aug 9, 2026
research 結論(AC5)
説明
2fe791560ae9a27c2e64d4e2a8c936a983b4a64c)。claude --agentsはファイルパスでなく inline JSON を要求する仕様であり、修正前は hermetic lane が常に失敗していた。hook_namesuffix(SessionStart:startup)は起動理由であり agent persona 名ではないことが判明し、これを main-session identity のobservedとして誤採用していた(Owner adversarial review が最も懸念していた「偽陽性の observed」の実例)。修正後は該当シグナルが存在しない場合に正しくunavailableへ fail-closed する。squne121 commentedon Aug 9, 2026
AC1-AC5 達成を確認し close する。詳細は直前のresearch結論コメント(ISSUE_1978_RESEARCH_RESULT_FINAL_V1)を参照。