Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: implementation
parent_issue: none
goal_ref: >
worktree-agent-runtime-smoke の persisted evidence で `resolved_executable` field を、
値の絶対パス prefix(HOME/tmp/opt/mnt 等)に関わらず常に `<redacted>` にし、
resolved_executable_sha256 による executable identity を維持する。
change_kind: codeParent Issue
なし(単独改善)
Parent Goal Ref
- Goal:
worktree-agent-runtime-smokeが allowlist-only evidence にresolved_executableの raw absolute path を、prefix に関わらず一切保存しない契約を守る。 - Desired Destination: runner の persisted evidence serializer(
_redact_evidence_value())と focused regression tests。
Current Validated Scope
scripts/agent-ops/run_worktree_agent_runtime_smoke.pyの_redact_evidence_value()に、resolved_executablefield-path 専用の narrow special case を追加し、resolution 成功時(文字列値)は prefix に関わらず常に<redacted>にする。HOME 判定 regex(_SECRET_LIKE_RE)の拡張ではなく field semantics ベースの special case とする。- unresolved / SKIP 等で既存値が
Noneの場合の semantics は変更しない(resolved_executable: Noneを維持)。 resolved_executable_sha256は既存の_PUBLIC_EVIDENCE_SHA_LENGTHS登録のまま保持し、preflight・version capture・実際の invocation が同じ解決済み executable を使う既存の runtime behavior を維持する。summary.mdと任意の--evidence-jsonは同一の_redact_evidence_value()を経由するため、両出力に同じ contract を適用する。- 既存の raw-realpath-equality assertion(
test_run_worktree_agent_runtime_smoke_claude_bin.pyとtest_run_worktree_agent_runtime_smoke_runtime_evidence.py)を、fake executable version marker + invocation marker + fixture-local expectedresolved_executable_sha256による identity 証明へ更新する。
Remaining Parent Gaps
なし。本 Issue は evidence hygiene defect のみを扱う。
Background
#2403 / PR #2407 の actual structured Claude-GPT smoke により、summary.md の resolved_executable が HOME 配下の absolute path を保存することが判明した。これは allowlist-only evidence が absolute path を保存しない既存契約に反する。
その後 PR #2454(54e37bff)が _redact_evidence_value() / _SECRET_LIKE_RE を導入し、/home, /root, /Users 配下の absolute path は redaction されるようになった(test_given_home_paths_in_nested_schema_fields_when_evidence_written_then_redacted で確認済み、current main で PASS)。
しかし current main (da4e00593f76d5e22a5746ac39d44501530d5e02) で baseline 再確認したところ、_SECRET_LIKE_RE は /(?:home|root|Users)/... のみを対象とし、/tmp, /opt, /mnt 等の non-HOME absolute path は対象外であることを確認した。実際、test_run_worktree_agent_runtime_smoke_claude_bin.py と test_run_worktree_agent_runtime_smoke_runtime_evidence.py には、tmp_path 配下(非HOME)の resolved_executable が raw realpath のまま summary.md に一致することを assert する既存テストが複数あり、いずれも現在 PASS している(つまり non-HOME absolute path は現在も raw のまま persist されている)。
したがって「HOME absolute path を除去する」部分は PR #2454 が既に解消済みだが、「resolved_executable の絶対パスを prefix に関わらず一切公開しない」という field-level contract は current main では未達である。本 Issue はこの field-level contract のみを対象とし、omit ではなく key-retained + <redacted> の narrow special case で実装する。新しい generic redaction framework は導入しない。
Outcome
run_worktree_agent_runtime_smoke.py の resolved_executable field が、resolution 成功時は absolute path の prefix に関わらず常に <redacted> として summary.md と --evidence-json の双方に記録され、resolved_executable_sha256 は保持され、version capture と invocation が同じ resolved executable を使う既存 runtime behavior は変わらない状態を、hermetic な focused regression(test_run_worktree_agent_runtime_smoke_claude_bin.py、test_run_worktree_agent_runtime_smoke_runtime_evidence.py、test_run_worktree_agent_runtime_smoke_claude_gpt_hermetic_matrix.py)が確認して完了する。
Runtime Verification Applicability
decision: immediate
reason: >
persisted evidence は structured subprocess smoke の実行結果であり、serializer の
redaction ロジックと実際の runner invocation を通した確認が必要なため。
applicable_acs:
- AC1
- AC2
- AC3
- AC4
- AC5
execution_environment:
cli_tools:
- python3
- uv
auth_required: false
network_required: false
fixture: "test-owned temporary HOME、fake executable、fixture-only structured Claude-GPT adapter"
skip_conditions: []
fallback_policy:
fallback_success_is_pass: false
notes: "raw absolute path がいずれかの persisted evidence に残る、または SHA-256 identity が欠落する結果は FAIL"
artifact_requirements:
- "test artifact は temporary directory のみ"
- "credential、HOME absolute path、raw executable path、network、live GitHub mutation を commit または evidence に保存しない"In Scope
_redact_evidence_value()(または_is_public_evidence_sha()と対になる field-path check)に、resolved_executablefield-path 専用の narrow special case を追加し、値が文字列(resolution 成功)の場合は absolute path の prefix に関わらず常に<redacted>にする。既存の key set・Nonesemantics(unresolved / SKIP 時)は変更しない。test_run_worktree_agent_runtime_smoke_claude_bin.py内の raw realpath equality assertion(test_claude_bin_absolute_path_bypasses_path_resolution、test_claude_bin_unspecified_default_behavior_is_unchanged等)を、<redacted>+resolved_executable_sha256一致による identity 証明へ更新する。test_run_worktree_agent_runtime_smoke_runtime_evidence.pyのtest_resolved_executable_is_single_path_shared_by_version_capture_and_invocationを、rawsummary.mdpath equality ではなく、fake executable の version marker + invocation marker + fixture-local expectedresolved_executable_sha256の一致によって「version capture と invocation が同じ resolved executable を使った」ことを証明する形へ更新する。test_run_worktree_agent_runtime_smoke_claude_gpt_hermetic_matrix.py(--claude-binの PATH native / absolute native / claude-gpt 等の combination matrix、HOME path 固有の fixture は持たない)を既存 VC のまま維持し、本 Issue の変更が--claude-binmatrix の既存 pass/reject 挙動を退行させないことを確認する(secret-free、credential/network 不使用)。
Out of Scope
- 実装: preflight.run の GH_CONFIG_DIR を command-scoped に伝播する #2403 / PR fix: preserve GH_CONFIG_DIR for bare preflight.run #2407 の
GH_CONFIG_DIRpropagation 実装、launcher authentication、GitHub CLI、または runtime smoke の実行成否の変更。 scripts/claude-gpt/launch.sh、runtime adapter の設計、新しい evidence schema / digest / receipt / persistent state、汎用 path sanitization framework の追加。- Issue 実装: run_worktree_agent_runtime_smoke.py の Claude capability 判定を --help 非掲載フラグでなく実 runtime 挙動に基づく判定へ修正する #1960 Design Decision 5 のプロセス内 invariant(executable を一度だけ resolve し、version capture と invocation に同じ resolved executable を使うこと)自体の変更。本 Issue はこの invariant の persisted representation のみを変更する。
- HOME 以外を含む artifact inventory の sweep、live credential、network、または live GitHub mutation。executable FD pinning、署名・attestation。
Acceptance Criteria
- AC1: test-owned HOME 配下の executable を使う既存の unit-level regression(
test_given_home_paths_in_nested_schema_fields_when_evidence_written_then_redacted)で、resolution 成功時のresolved_executableの値が<redacted>になることを維持する(field-level special case 追加後も、この既存 HOME 判定 regex 由来の redaction が regression しないことを確認する)。 - AC2: test-owned tmp_path 配下(HOME 以外の absolute path)の executable を使う smoke でも、同じく
resolved_executableの値が<redacted>になる(HOME 判定 regex 拡張ではなく field-level special case であることを証明する)。 - AC3: 同じ smoke で
resolved_executable_sha256は保存され、resolved executable による version capture と invocation の既存 behavior は維持される(Issue 実装: run_worktree_agent_runtime_smoke.py の Claude capability 判定を --help 非掲載フラグでなく実 runtime 挙動に基づく判定へ修正する #1960 Design Decision 5 の invariant を維持)。unresolved / SKIP 時は既存通りresolved_executable: Noneを維持する。 - AC4:
test_run_worktree_agent_runtime_smoke_runtime_evidence.pyのtest_resolved_executable_is_single_path_shared_by_version_capture_and_invocationが、rawsummary.mdpath equality ではなく fake executable version marker + invocation marker +resolved_executable_sha256一致によって同一 executable 使用を証明する形へ更新され、hermetic に PASS する。 - AC5: focused regression は credential、network、live GitHub mutation を使わず PASS し、SKIP/exit 77 を返さない。
Verification Commands
# AC1
$ uv run --locked pytest scripts/agent-ops/tests/test_run_worktree_agent_runtime_smoke.py -k test_given_home_paths_in_nested_schema_fields_when_evidence_written_then_redacted# AC2
$ uv run --locked pytest scripts/agent-ops/tests/test_run_worktree_agent_runtime_smoke_claude_bin.py# AC3
$ uv run --locked pytest scripts/agent-ops/tests/test_run_worktree_agent_runtime_smoke_claude_bin.py# AC4
$ uv run --locked pytest scripts/agent-ops/tests/test_run_worktree_agent_runtime_smoke_runtime_evidence.py# AC5
$ uv run --locked pytest scripts/agent-ops/tests/test_run_worktree_agent_runtime_smoke_claude_gpt_hermetic_matrix.pyAllowed Paths
scripts/agent-ops/run_worktree_agent_runtime_smoke.pyscripts/agent-ops/tests/test_run_worktree_agent_runtime_smoke_claude_bin.pyscripts/agent-ops/tests/test_run_worktree_agent_runtime_smoke_claude_gpt_hermetic_matrix.pyscripts/agent-ops/tests/test_run_worktree_agent_runtime_smoke_runtime_evidence.py
Stop Conditions
- Allowed Paths 外の変更が必要と判明した場合
- In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
- 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
- 後続 Phase / 別スコープへの波及が判明した場合
- nested SubAgent delegation が必要になった場合
- 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
resolved_executableの redaction を実現するために runtime invocation、launcher authentication、または 実装: preflight.run の GH_CONFIG_DIR を command-scoped に伝播する #2403 / PR fix: preserve GH_CONFIG_DIR for bare preflight.run #2407 の変更が必要と判明した場合- SHA-256 identity を保持できない、または Issue 実装: run_worktree_agent_runtime_smoke.py の Claude capability 判定を --help 非掲載フラグでなく実 runtime 挙動に基づく判定へ修正する #1960 Design Decision 5 のプロセス内 invariant(同一 resolved executable の使用)自体を変更する必要が生じた場合
resolved_executableの key omission が既存 consumer の schema migration を必要とする場合- credential、HOME absolute path、raw executable path、network、または live GitHub mutation を test/evidence に必要とする場合
Required Skills
- Python
- pytest subprocess fixtures
Required Design References
docs/dev/agent-skill-boundaries.mddocs/dev/secret-policy.md.claude/skills/worktree-agent-runtime-smoke/SKILL.md
Scope Delta(任意)
N/A
Delivery Rule
1 Issue = 1 PR。#2403 / PR #2407 へ混在させず、別 branch と linked worktree で実装する。#2416 が runner の interactive-lane documentation を扱う間、本 Issue は evidence serialization と focused tests のみを編集する。
Scope Overlap Note
- Scope Collision (C1): 実装: SubAgent 定義変更時の candidate-head bootstrap review を worktree-agent-runtime-smoke で自動回復する #2416 は同じ runner の interactive-lane documentation を扱うが、本 Issue の edit intent は persisted evidence serialization であり別セクションである。依存関係はないが、同時実装時は line-level conflict を確認する。
- 実装: playtest-log の JSON Schema / validator の追加 #420 と 実装: .claude/skills 配下スクリプトの executable bit を監査し CI guard を追加する #205 は
scriptsを広く宣言するが、それぞれ JSON validator と executable-bit audit が目的であり、本 Issue の evidence serializer / focused tests と semantic overlap はない。
Notes for Reviewer
- Follow-up source: 実装: preflight.run の GH_CONFIG_DIR を command-scoped に伝播する #2403 / PR fix: preserve GH_CONFIG_DIR for bare preflight.run #2407 の actual structured Claude-GPT smoke。親子関係・依存関係は作らない。
- raw path は Issue 本文、test failure output、committed artifact にも記録しない。identity assertion は SHA-256 と fixture-local expected value で行う。
- Supersession boundary: 実装: runtime-smoke evidence の resolved_executable を field-level で常に redact する #2421 supersedes 実装: run_worktree_agent_runtime_smoke.py の Claude capability 判定を --help 非掲載フラグでなく実 runtime 挙動に基づく判定へ修正する #1960 only with respect to the persisted representation of
resolved_executable. The invariant that version capture and runtime invocation use the same once-resolved executable remains unchanged (Issue 実装: run_worktree_agent_runtime_smoke.py の Claude capability 判定を --help 非掲載フラグでなく実 runtime 挙動に基づく判定へ修正する #1960 Design Decision 5 のプロセス内 invariant は維持する)。 - Baseline confirmed (2026-09-03, main@da4e00593f76d5e22a5746ac39d44501530d5e02): PR feat: isolate runtime smoke Claude peer messaging #2454 は HOME (
/home,/root,/Users) 配下の absolute path のみを redact する(_SECRET_LIKE_RE)。resolved_executable_sha256は_PUBLIC_EVIDENCE_SHA_LENGTHSに既に登録済みで保持される。一方test_run_worktree_agent_runtime_smoke_claude_bin.pyとtest_run_worktree_agent_runtime_smoke_runtime_evidence.pyには、tmp_path 配下(非HOME)のresolved_executableが raw realpath のまま summary.md に一致することを assert する既存テストが複数あり、いずれも現在 PASS している。したがって all-path field-level redaction は現在未達であり、本 Issue はそのギャップのみを対象とする(already-fixed disposition は不成立)。 - OWNER anchor comment(issuecomment-5526016066)の推奨に従い、
omitではなくresolved_executablefield を常に<redacted>にする redact-only 契約に確定した。
Activity
squne121 commentedon Sep 3, 2026
総合判定:REQUEST_CHANGES / 先に Issue を再 refinement
Issue #2421 の設計意図自体――実行時には絶対パスを使い続けるが、persisted evidence ではローカル絶対パスを出さず、
resolved_executable_sha256を identity とする――には賛成です。ただし、current
main(da4e00593f76d5e22a5746ac39d44501530d5e02) に対して Issue 本文が stale になっています。そのままimpl-review-loopに渡すのは推奨しません。敵対的レビュー結果
Severity | Finding | 判定 -- | -- | -- P0 | #2421 作成後の PR #2454 が、summary.md と --evidence-json の双方を _redact_evidence_value(schema_summary) 経由に変更済み | baseline 再確認必須 P0 | Issue が「HOME path の除去」を求めているのか「resolved_executable のあらゆる絶対パスを除去」なのか不一致 | contract ambiguity P0 | 後者なら、Allowed Paths 外の既存 regression test が raw path 永続化を明示的に要求しており、現在の Allowed Paths では正しく直せない | 実装不能な contract P1 | omit または redact と「キー集合/型変更なら Stop」が競合 | redact に固定すべき P1 | #1960 の historical contract は resolved executable の evidence 保存を要求している | supersession 明記が必要 P2 | Claude-GPT 特化 fixture だけで serializer の一般契約を証明しようとしている | 少し過剰・焦点がずれるP0-1:PR #2454 によって #2421 の前提が変わっている
#2421 は 8月30日作成ですが、9月2日に merge された PR #2454 が generic persisted-evidence redaction を変更しています。同 PR は「公開 SHA/digest だけを trusted field path として保持する」実装を導入しています。
current runner は
summary.mdを書く前に schema 全体を_redact_evidence_value()へ通しています。 同じく--evidence-jsonも同じ redactor を経由します。さらに current test には既に、
resolved_executable = "/home/someone/.local/bin/claude"を渡して HOME path が
<redacted>になる regression が存在します。したがって、#2421 の真の要求が「HOME absolute path を残さない」だけなら、実装部分は既に PR #2454 が incidentally 解消している可能性が非常に高いです。
これはまず baseline を取り直すべきケースです。追加コードを書くところから始めるべきではありません。
P0-2:一方で「全 absolute path を消す」なら current main は未修正
#2421 の title、
goal_ref、In Scope はかなり強く、と読めます。一方 Parent Goal / AC1 は HOME 配下に限定されています。
current generic redactor の absolute-path pattern は実質、
/(home|root|Users)/...だけです。
つまり例えば
/tmp/.../claude、/opt/.../claude、/mnt/.../launch.shはresolved_executableに入っても field の意味だけでは redact されません。これは単なる edge case ではありません。既存
--claude-binregression はまさにtmp_path / "claude-gpt-launcher" / "launch.sh"を作り、その raw realpath が summary に保存されることを要求しています。したがって contract は次のどちらかに確定させる必要があります。
推奨は後者です:
resolved_executableという field 自体を persisted evidence では常に redact する。 HOME 判定 regex を増強する話にしない方が明快です。P0-3:Allowed Paths に漏れている regression test が blocker
さらに深刻なのが
scripts/agent-ops/tests/test_run_worktree_agent_runtime_smoke_runtime_evidence.pyです。
この historical test は現在も、
という assertion を持っています。
しかし #2421 の Allowed Paths にはこのファイルがありません。Allowed Paths は runner、
claude_bin.py、claude_gpt_hermetic_matrix.pyの3つだけです。全 absolute path を field-level redact すると、この test は必ず stale になります。
しかもこれは理論上の懸念ではありません。同じリポジトリの PR #2407 で、新 contract と衝突する古い assertion が Allowed Paths 外に残り、required CI が失敗して REQUEST_CHANGES になった事例が直近にあります。
#2421 で同じ事故を再発させる理由はありません。
P1:
omitはやめて<redacted>に固定した方がよいIssue は「omit または redact」を許可しながら、
とも指定しています。
これは曖昧です。
resolved_executableを omit すると key set が変わります。最小互換実装は明確です。
つまり successful resolution では
unresolved / SKIP の既存
Noneはそのままにする。
PR #2454 が既に field-path-aware serializer を導入しているため、新しい generic framework も不要です。
resolved_executableだけの narrow special case で十分です。resolved_executable_sha256は既に public evidence SHA allowlist に明示登録されています。P1:#1960 を明示的に supersede すべき
#1960 は Design Decision 5 で
shutil.which()により解決した同一絶対パスを version capture と invocation に使うことを要求し、Evidence セクションではresolved executable自体の保存も要求しています。#2421 が変えたいのはこのうち persistence representation だけ です。
Issue に次の意味の一文を入れるべきです。
これがないと implementer/reviewer が「#1960 と #2421 のどちらが authority か」で不要な探索をします。
Python の現行
shutil.which()も「その command を呼び出した場合に実行される executable path を返す」APIなので、一度 resolve した path を process 内部で version capture / invocation に使う現在の構造は維持してよいです。persisted evidence にその文字列を残す必要はありません。(Python documentation)SHA-256 identity への寄せ方は妥当
ここは #2421 の良い部分です。
既存 #2219 でも launcher の path/content SHA-256 binding が evidence 強化として導入されています。
外部の provenance 設計を見ても、現行 SLSA v1.2 の
ResourceDescriptorは resource identity にdigestを持ち、sha256等で内容を識別するモデルです。ローカル machine-specific absolute path を identity として必須にする設計ではありません。(SLSA)SLSA 準拠にする必要はありませんが、**「runtime-local locator は process 内、persisted identity は content digest」**という分離自体は良い設計です。
なお executable を hash した後にファイルを置換される TOCTOU まで閉じようとして、FD pinning・署名・attestation を追加する必要はありません。個人趣味開発のこの Issue では明らかに過剰です。
推奨アクション
まず current main で baseline を取り直す。 特に PR feat: isolate runtime smoke Claude peer messaging #2454 が追加した HOME-path serializer regression と 実装: runtime-smoke evidence の resolved_executable を field-level で常に redact する #2421 の focused VC を実行する。HOME-only contract が既に全 PASS なら、実装: runtime-smoke evidence の resolved_executable を field-level で常に redact する #2421 は redundant implementation として close / already-fixed 扱いが第一候補です。
本当に欲しい仕様が「HOMEだけでなく
resolved_executableの raw absolute path を一切 persist しない」なら Issue を reframe する。resolved_executableを path-prefix 非依存で常に<redacted>にする、と明記します。その場合、Allowed Paths に
scripts/agent-ops/tests/test_run_worktree_agent_runtime_smoke_runtime_evidence.pyを追加します。既存 test は raw summary path ではなく、fake binary の version marker + invocation marker + expected SHA-256 で「同一 executable」を証明させるのが適切です。omit or redactを廃止して key retained +<redacted>に固定し、Noneの既存 semantics は維持します。実装: run_worktree_agent_runtime_smoke.py の Claude capability 判定を --help 非掲載フラグでなく実 runtime 挙動に基づく判定へ修正する #1960 の persistence requirement のみ supersede することも明記します。検証は hermetic pytest で十分です。credential、network、live Claude、live GitHub mutation、新 schema、汎用 path-redaction framework、追加 daemon/registry/harness は不要です。
私なら #2421 をこのまま実装には回しません。最有力は「PR #2454 後の baseline を確認 → HOME-only なら already fixed で close」。全-path-redaction が本来の目的なら、上記 P0 を直した contract に更新してから実装、です。現状はこの2つが Issue 本文内で混ざっています。
## 総合判定:**REQUEST_CHANGES / 先に Issue を再 refinement**Issue #2421 の設計意図自体――実行時には絶対パスを使い続けるが、persisted evidence ではローカル絶対パスを出さず、
resolved_executable_sha256を identity とする――には賛成です。ただし、current
main(da4e00593f76d5e22a5746ac39d44501530d5e02) に対して Issue 本文が stale になっています。そのままimpl-review-loopに渡すのは推奨しません。敵対的レビュー結果
summary.mdと--evidence-jsonの双方を_redact_evidence_value(schema_summary)経由に変更済みresolved_executableのあらゆる絶対パスを除去」なのか不一致omit または redactと「キー集合/型変更なら Stop」が競合resolved executableの evidence 保存を要求しているP0-1:PR #2454 によって #2421 の前提が変わっている
#2421 は 8月30日作成ですが、9月2日に merge された PR #2454 が generic persisted-evidence redaction を変更しています。同 PR は「公開 SHA/digest だけを trusted field path として保持する」実装を導入しています。
current runner は
summary.mdを書く前に schema 全体を_redact_evidence_value()へ通しています。 同じく--evidence-jsonも同じ redactor を経由します。さらに current test には既に、
resolved_executable = "/home/someone/.local/bin/claude"を渡して HOME path が
<redacted>になる regression が存在します。したがって、#2421 の真の要求が「HOME absolute path を残さない」だけなら、実装部分は既に PR #2454 が incidentally 解消している可能性が非常に高いです。
これはまず baseline を取り直すべきケースです。追加コードを書くところから始めるべきではありません。
P0-2:一方で「全 absolute path を消す」なら current main は未修正
#2421 の title、
goal_ref、In Scope はかなり強く、と読めます。一方 Parent Goal / AC1 は HOME 配下に限定されています。
current generic redactor の absolute-path pattern は実質、
/(home|root|Users)/...だけです。
つまり例えば
/tmp/.../claude、/opt/.../claude、/mnt/.../launch.shはresolved_executableに入っても field の意味だけでは redact されません。これは単なる edge case ではありません。既存
--claude-binregression はまさにtmp_path / "claude-gpt-launcher" / "launch.sh"を作り、その raw realpath が summary に保存されることを要求しています。したがって contract は次のどちらかに確定させる必要があります。
推奨は後者です:
resolved_executableという field 自体を persisted evidence では常に redact する。 HOME 判定 regex を増強する話にしない方が明快です。P0-3:Allowed Paths に漏れている regression test が blocker
さらに深刻なのが
scripts/agent-ops/tests/test_run_worktree_agent_runtime_smoke_runtime_evidence.pyです。
この historical test は現在も、
という assertion を持っています。
しかし #2421 の Allowed Paths にはこのファイルがありません。Allowed Paths は runner、
claude_bin.py、claude_gpt_hermetic_matrix.pyの3つだけです。全 absolute path を field-level redact すると、この test は必ず stale になります。
しかもこれは理論上の懸念ではありません。同じリポジトリの PR #2407 で、新 contract と衝突する古い assertion が Allowed Paths 外に残り、required CI が失敗して REQUEST_CHANGES になった事例が直近にあります。
#2421 で同じ事故を再発させる理由はありません。
P1:
omitはやめて<redacted>に固定した方がよいIssue は「omit または redact」を許可しながら、
とも指定しています。
これは曖昧です。
resolved_executableを omit すると key set が変わります。最小互換実装は明確です。
つまり successful resolution では
unresolved / SKIP の既存
Noneはそのままにする。
PR #2454 が既に field-path-aware serializer を導入しているため、新しい generic framework も不要です。
resolved_executableだけの narrow special case で十分です。resolved_executable_sha256は既に public evidence SHA allowlist に明示登録されています。P1:#1960 を明示的に supersede すべき
#1960 は Design Decision 5 で
shutil.which()により解決した同一絶対パスを version capture と invocation に使うことを要求し、Evidence セクションではresolved executable自体の保存も要求しています。#2421 が変えたいのはこのうち persistence representation だけ です。
Issue に次の意味の一文を入れるべきです。
これがないと implementer/reviewer が「#1960 と #2421 のどちらが authority か」で不要な探索をします。
Python の現行
shutil.which()も「その command を呼び出した場合に実行される executable path を返す」APIなので、一度 resolve した path を process 内部で version capture / invocation に使う現在の構造は維持してよいです。persisted evidence にその文字列を残す必要はありません。([Python documentation]1)SHA-256 identity への寄せ方は妥当
ここは #2421 の良い部分です。
既存 #2219 でも launcher の path/content SHA-256 binding が evidence 強化として導入されています。
外部の provenance 設計を見ても、現行 SLSA v1.2 の
ResourceDescriptorは resource identity にdigestを持ち、sha256等で内容を識別するモデルです。ローカル machine-specific absolute path を identity として必須にする設計ではありません。([SLSA]2)SLSA 準拠にする必要はありませんが、**「runtime-local locator は process 内、persisted identity は content digest」**という分離自体は良い設計です。
なお executable を hash した後にファイルを置換される TOCTOU まで閉じようとして、FD pinning・署名・attestation を追加する必要はありません。個人趣味開発のこの Issue では明らかに過剰です。
推奨アクション
resolved_executableの raw absolute path を一切 persist しない」なら Issue を reframe する。resolved_executableを path-prefix 非依存で常に<redacted>にする、と明記します。scripts/agent-ops/tests/test_run_worktree_agent_runtime_smoke_runtime_evidence.pyを追加します。既存 test は raw summary path ではなく、fake binary の version marker + invocation marker + expected SHA-256 で「同一 executable」を証明させるのが適切です。omit or redactを廃止して key retained +<redacted>に固定し、Noneの既存 semantics は維持します。実装: run_worktree_agent_runtime_smoke.py の Claude capability 判定を --help 非掲載フラグでなく実 runtime 挙動に基づく判定へ修正する #1960 の persistence requirement のみ supersede することも明記します。私なら #2421 をこのまま実装には回しません。最有力は「PR #2454 後の baseline を確認 → HOME-only なら already fixed で close」。全-path-redaction が本来の目的なら、上記 P0 を直した contract に更新してから実装、です。現状はこの2つが Issue 本文内で混ざっています。
squne121 commentedon Sep 3, 2026
推奨アクション
#2421 は
impl-review-loopへ送らず、先にissue-refinement-loopで再 refinement が妥当です。アンカーが指摘している通り、PR #2454 後は HOME 配下の path は generic redaction で既に処理される一方、runner の redactor は/home|/root|/Users系を対象としており、/tmpや/opt等までresolved_executableの意味に基づいて隠す仕様ではありません。今回はアンカー中の 「推奨は後者:
resolved_executablefield 自体を常に redact」 を human direction として採用するのがよいです。そうすれば HOME-only / all-path の曖昧性を人間へ再質問せず解消できます。一方、#1960 由来の regression は現在も raw realpath の persistence を明示的に要求しているため、全-path 契約にするならtest_run_worktree_agent_runtime_smoke_runtime_evidence.pyを Allowed Paths に加える必要があります。issue-refinement-loop自体は iteration ごとの承認を既定で要求せず、direct human context 用のpreflight.run.with_human_contextと、その結果に基づくcontract_update.run.with_human_contextを備えています。したがって refinement の各 iteration や deterministic Issue 更新ごとに確認を求めない 指示で問題ありません。ただし Claude Code 自体の permission mode を弱める指示とは分離します。以下を Claude Code の新規セッションへ渡すのを推奨します。
Issue #2421 に対して
issue-refinement-loopを実行してください。対象:
squne121/loop-protocol#2421https://github.com/squne121/loop-protocol/issues/2421#issuecomment-5526016066目的は 実装開始ではなく、Issue #2421 を current
mainと現行 repository authority model に整合させ、implementation-ready または already-fixed disposition まで refinement を完了すること です。最重要方針
最初に
.claude/skills/issue-refinement-loop/SKILL.mdをロードしてください。その Skill、
plan_refinement_loop.pyが生成するREFINEMENT_LOOP_PLAN_V1、canonical command registry、必要に応じてロードされるreferences/を正本として従ってください。独自に workflow、routing、review policy、approval gate、mutation procedure を再実装しないでください。
今回の comment URL は、この依頼を行っている人間 operator が明示的に指定した direct human context / OWNER anchor として扱ってください。GitHub comment metadata から human origin を推定するのではなく、canonical
with_human_contextlane を使用してください。anchor_comment_url:https://github.com/squne121/loop-protocol/issues/2421#issuecomment-5526016066人間承認について
issue-refinement-loopの repository loop iteration approval gate は不要です。needs-fix→ rewrite → review の iteration は、canonical policy が許す限りmax_iterationsまで自動継続してください。次のような追加確認を私へ求めないでください。
canonical planner / Skill / command registry が許可する Issue refinement 上の read、deterministic repair、contract update、review、readback、label hygiene は、そのまま続行してください。
ただし、この「承認不要」は Claude Code 自体の permission model を弱める意味ではありません。
--dangerously-skip-permissions等を新たに導入したり、permission mode を勝手に変更したりしないでください。repository の canonical executor / hooks / Auto mode で許可される経路を使用してください。canonical Skill が明示的に
human_judgment_required、environment failure、またはその他の hard stop を返した場合だけ、その契約に従って停止してください。独自の human gate を追加しないでください。canonical entry
canonical main root / default branch から開始し、実行開始時点の current
mainHEAD を取得してください。アンカーに記載された historical/current SHA を盲目的に固定せず、実行時の current
mainを authority として再確認してください。human-context preflight は canonical executor profile を使用してください。概念的には次の lane です。
uv run --locked python3 scripts/agent-guards/skill_runtime_exec.py \ --command-id preflight.run.with_human_context \ --issue-number 2421 \ --repo squne121/loop-protocol \ --anchor-comment-url 'https://github.com/squne121/loop-protocol/issues/2421#issuecomment-5526016066'ただし、実際の argv / execution class / required branch / allowed mutation は current repository の
ISSUE_REFINEMENT_COMMAND_REGISTRY_V1を正本とし、古い手書き command を優先しないでください。trusted contract patch plan が生成され、canonical routing が Issue update を要求する場合は
contract_update.run.with_human_context経路を使用してください。SubAgent の使用を必須とする
Step 1 Investigation では、利用可能な native SubAgent 機構を使い、少なくとも
codebase-investigator相当の read-only SubAgent を起動してください。SubAgent には少なくとも次を current
main基準で調査させてください。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_claude_bin.pyscripts/agent-ops/tests/test_run_worktree_agent_runtime_smoke_runtime_evidence.pyscripts/agent-ops/tests/test_run_worktree_agent_runtime_smoke_claude_gpt_hermetic_matrix.pysummary.mdと--evidence-jsonをどう生成・redact しているかresolved_executable_sha256の current trusted/public evidence handlingresolved_executableを persistence している既存 assertion / consumer外部仕様に関する claim が refinement の disposition に実際に必要で、canonical planner が web research を要求する場合は
web-researcher相当の SubAgent も使用してください。SubAgent completion barrier
起動した SubAgent を放置して先へ進まないでください。
各 required SubAgent について native wait mechanism を使用し、terminal completion を確認してください。
SubAgent がまだ running の間は、Step 2 review、Issue mutation、最終 disposition へ進まないでください。
全 required SubAgent の最終結果を回収し、その evidence を root orchestrator が consume してから次へ進んでください。
SubAgent 起動だけを成功扱いにしないでください。
SubAgent failure / timeout / invalid result は canonical Skill の failure handling に従って処理し、結果が得られなかったのに得られたことにしないでください。
child SubAgent 自身には、canonical Skill が明示的に要求しない限り nested delegation をさせないでください。
GitHub Issue の mutation は SubAgent に直接行わせず、root control-plane の canonical mutation phase に集約してください。
#2421 に対する今回の human direction
anchor comment の adversarial review を単なる advisory text として捨てないでください。
特に anchor 内の次の推奨を、今回の human-context refinement の方向性として扱ってください。
resolved_executableは HOME 判定 regex を拡張するのではなく、persisted evidence 上では field semantics に基づいて raw absolute path を一切公開しない。つまり、baseline / repository evidence がこれを否定するより強い current authority を示さない限り、Issue #2421 の曖昧性は次の方向へ解消してください。
Desired refined contract
successful executable resolution の persisted representation は:
とします。
resolved_executableの実値が、/home/.../root/.../Users/.../tmp/.../opt/.../mnt/...のどれであるかに依存してはいけません。
field が
resolved_executableであり、successful resolution の string value なら persisted output では<redacted>とする、という narrow field-level contract を優先してください。一方 unresolved / unavailable 等で既存値が
Noneの場合は、既存 semantics を不要に変更せずNoneを維持してください。resolved_executablekey を omit する方式は採用しない方向で refinement してください。key set を維持し、value を<redacted>にすることで既存 schema / consumer との compatibility を最大化してください。新しい generic redaction framework は作らない契約にしてください。
runtime identity invariant は維持する
persisted path を redact することと、runtime 内部で executable absolute path を使用することを混同しないでください。
次の invariant は維持してください。
resolved_executable_sha256を中心にするIssue #1960 に対しては、必要なら次の意味を current #2421 contract に明記してください。
つまり #1960 全体を supersede しないでください。
baseline-first
コード変更を前提に refinement しないでください。
まず current
mainの baseline を再確認してください。特に、PR #2454 merge 後に:
resolved_executable_sha256が保持されること/tmp等の non-HOME absolute path が current serializer で残り得るかsummary.mdと--evidence-jsonが同じ redaction contract を共有しているかを repository evidence / focused baseline verification で確定してください。
canonical planner が verification command を生成または許可する場合、その command を正確に実行してください。
勝手に「PR #2454 で全部直った」と推測して Issue を close しないでください。
disposition
baseline の結果で分岐してください。
A. stronger all-path contract まで current main が既に満たしている場合
追加実装を捏造しないでください。
canonical
issue-refinement-loopの already-fixed / superseded / close-not-planned 等の current termination policy が、この human anchor と repository evidence から no-code disposition を認める場合は、その canonical route を使用してください。認めない場合は独自に close せず、canonical result に従ってください。
B. HOME-only は満たすが、all-path field-level redaction は未達の場合
これを今回の主な想定ケースとして扱ってください。
Issue #2421 を implementation-ready な all-path field-level redaction contract へ更新してください。
少なくとも次を整合させてください。
goal_ref特に Allowed Paths には、current historical contract と衝突する:
scripts/agent-ops/tests/test_run_worktree_agent_runtime_smoke_runtime_evidence.pyを追加する必要性を検討し、repository evidence が anchor の finding を確認するなら追加してください。
その regression は raw
summary.mdpath equality で executable identity を証明するのではなく、たとえば:resolved_executable_sha256によって、「version capture と invocation が同じ executable を使った」ことを証明する contract へ更新する方向で refinement してください。
summary.mdと指定時の--evidence-jsonの双方を AC に含めてください。test / verification boundary
この Issue の verification は hermetic / fixture-owned を原則としてください。
credential、network、live Claude API、live GitHub mutation を runtime verification の成功条件に追加しないでください。
test-owned temporary executable / HOME / output directory だけで再現可能な focused regression を優先してください。
不要なもの:
個人趣味開発として、今回の evidence representation defect を最小かつ有用な変更で解決する contract にしてください。
refinement loop
investigation が完了したら canonical root review pipeline を実行してください。
needs-fixの場合は、max iteration 内で自動的に rewrite → fresh review を継続してください。deterministic safe repair を planner が示す場合は、人間確認を追加せず canonical repair path を使用してください。
各 rewrite 後は fresh Issue body / current repository state に対して再 review してください。
古い review output を再利用して approve にしないでください。
default
max_iterationsは Skill の current canonical valueに従ってください。mutation boundary
このセッションでは Issue refinement の完了まで を行ってください。
許可対象:
この段階で行わないこと:
impl-review-loop開始Issue が implementation-ready になった時点で停止し、次 action として
impl-review-loopを明示してください。already-fixed disposition になった場合は、その根拠を明示して終了してください。
最終報告
終了時には少なくとも次を報告してください。
mainHEADimpl-review-loopなのか、already-fixed close なのか途中経過の確認を私へ求めず、canonical Skill が要求する terminal state まで一連で進めてください。
この形なら、アンカーの「二択」をそのまま人間へ差し戻さず、all-path field-level redaction を OWNER direction として refinement しつつ、current main が既に満たしていれば無駄な実装を作らない動きになります。PR #2454 の HOME-path regression 自体は既に repository に存在することも確認できます。
[-]実装: runtime-smoke evidence から実行ファイル絶対パスを除去する[/-][+]実装: runtime-smoke evidence の resolved_executable を field-level で常に redact する[/+]squne121 commentedon Sep 3, 2026
issue-refinement-loop 終了報告(disposition: approved / implementation-ready)
実行時 current
mainHEAD:da4e00593f76d5e22a5746ac39d44501530d5e02anchor:
https://github.com/squne121/loop-protocol/issues/2421#issuecomment-5526016066(with_human_contextlane、preflight.run.with_human_context経由で snapshot 固定・検証済み)baseline(PR #2454 merge 後の current main で確認済み事実)
_SECRET_LIKE_RE(run_worktree_agent_runtime_smoke.py:95-98)は/(?:home|root|Users)/...のみを対象とし、/tmp,/opt,/mnt等の non-HOME absolute path は対象外。resolved_executable_sha256は_PUBLIC_EVIDENCE_SHA_LENGTHSに既に登録済みで保持される。test_given_home_paths_in_nested_schema_fields_when_evidence_written_then_redacted(HOME-only redaction、unit-level)は current main で PASS(HOME-only 部分は既に解消済み)。test_run_worktree_agent_runtime_smoke_claude_bin.pyとtest_run_worktree_agent_runtime_smoke_runtime_evidence.pyの raw-realpath-equality assertion(tmp_path 配下、非HOME)は現在も PASS(= non-HOME absolute path は raw のまま persist されている)。summary.mdと--evidence-jsonは同一の_redact_evidence_value()を経由する(redaction contract 共有)。→ disposition B(HOME-onlyは満たすが、all-path field-level redaction は未達)を repository evidence で確定。already-fixed close は不成立。
Issue #2421 契約delta(主要点)
resolved_executablefield を、absolute path の prefix に関わらず(HOME 判定 regex 拡張ではなく)常に<redacted>にする field-level special case へ contract を確定(OWNER anchor 推奨採用)。omitは不採用、key set 維持。resolved_executable_sha256保持と 実装: run_worktree_agent_runtime_smoke.py の Claude capability 判定を --help 非掲載フラグでなく実 runtime 挙動に基づく判定へ修正する #1960 Design Decision 5 invariant 維持、AC4 でtest_run_worktree_agent_runtime_smoke_runtime_evidence.pyの raw-path-equality assertion を fake executable version marker + invocation marker +resolved_executable_sha256による識別へ更新することを要求。scripts/agent-ops/tests/test_run_worktree_agent_runtime_smoke_runtime_evidence.pyを追加(旧 Allowed Paths 外の historical raw-path 要求 test との衝突を解消)。resolved_executable. The invariant that version capture and runtime invocation use the same once-resolved executable remains unchanged.」applicable_acs/execution_environment/skip_conditions/fallback_policy/artifact_requirementsの decision:immediate 必須フィールドを充足(決定論的 checker の RVA001/EXTSURF001 blocker 解消)。AC に<!-- runtime-verification: true -->タグを付与(C11 decision_tag_consistency blocker 解消)。SubAgent 実行
codebase-investigator(investigation): 起動・completion 確認済み。実装: run_worktree_agent_runtime_smoke.py の Claude capability 判定を --help 非掲載フラグでなく実 runtime 挙動に基づく判定へ修正する #1960 Design Decision 5、実装: worktree-agent-runtime-smoke で claude-gpt の同一 Herdr session multi-turn / 複数 SubAgent lifecycle を fail-closed に証明する #2219/PR fix: preserve GH_CONFIG_DIR for bare preflight.run #2407 provenance、--evidence-jsonの redaction 経路共有、resolved_executableの repo 全体使用箇所、Issue 実装: runtime-smoke evidence の resolved_executable を field-level で常に redact する #2421 本文とOWNERコメント2件を調査・報告。issue-editor(rewrite、計2回): 起動・completion 確認済み。両回ともSTATUS: ok/BODY_HASHreadback一致を確認。issue-design-reviewer(Step 2.5 semantic review、計2回): 起動・completion 確認済み。route_high_open_to_rewritepolicy 上 rewrite 対象外のためこの iteration では未反映(下記 unresolved 参照)。最終 review verdict
VERDICT: approve(body_sha256:sha256:a1e26e57815eede85d3ee34afabd898d2c1873592ab55cf83e1aa56377532a73)effective_verdict: approve(low severity finding 1件、warning記録のみ)canonical_step2_route: step_2_5→ Step 2.5approve→ Step 4.5 へunresolved(blocker ではない)
test_run_worktree_agent_runtime_smoke.pyを明示していない)はroute_high_open_to_rewritepolicy 上 rewrite 対象外のため、この Issue には未反映。implementation 着手時に軽微な文言 nit として認識しておくこと(AC としての検証可能性には影響しない)。disposition
implementation-ready。次 action:
impl-review-loop(本セッションでは明示的なユーザー指示によりここでは起動しない)。Allowed Paths 最終状態:
scripts/agent-ops/run_worktree_agent_runtime_smoke.pyscripts/agent-ops/tests/test_run_worktree_agent_runtime_smoke_claude_bin.pyscripts/agent-ops/tests/test_run_worktree_agent_runtime_smoke_claude_gpt_hermetic_matrix.pyscripts/agent-ops/tests/test_run_worktree_agent_runtime_smoke_runtime_evidence.pysqune121 commentedon Sep 3, 2026
推奨は #2421 をそのまま
impl-review-loopに投入です。再 refinement は不要です。直近のissue-refinement-loopはapproved / implementation-readyで終了しており、all-path field-level redaction、4つの Allowed Paths、AC1〜AC5、#1960 との supersession boundary まで確定済みです。また、refinement 時点の
main@da4e005...から現在はmain@488dae6...に進んでいるため、古い SHA を固定せず、impl-review-loopの Root-Owned Synchronous Entry Transition で live main / live Issue を再取得してから開始させる形が適切です。impl-review-loop自体が Implementation → Verification → PR Review → Judgment を SubAgent に委譲し、REQUEST_CHANGESなら自動的に Step 1 に戻る設計です。終了条件も「reviewer APPROVE」だけではなく、live mergeability と blocker-free を確認してdraft_pr_readyになった時点であり、merge は実行しません。特に今回の要望に合わせ、SubAgent の完了待ちは repository の Common Completion Protocol を明示的に強制するのがよいです。
wait_agentの timeout や途中報告を完了扱いせず、final result を取得したあとlist_agentsで terminalcompletedまで確認してから次 Step に進ませます。以下を新規 Claude Code セッションにそのまま渡す想定です。
Issue #2421 に対して
impl-review-loopを実行してください。対象:
squne121/loop-protocol#2421https://github.com/squne121/loop-protocol/issues/2421この Issue は
issue-refinement-loop済みで、最新の refinement 終了報告ではapproved / implementation-readyです。関連 context:
https://github.com/squne121/loop-protocol/issues/2421#issuecomment-5526016066https://github.com/squne121/loop-protocol/issues/2421#issuecomment-5526473922目的は、Issue #2421 の実装・検証・PR review・REQUEST_CHANGES 修正ループを、人間の途中承認を挟まず canonical
impl-review-loopに従って自律実行し、マージ直前のdraft_pr_readyterminal state まで到達させることです。PR の merge 自体は実行しないでください。
auto-merge も有効化しないでください。
最終的な merge 判断だけを人間に残してください。
1. Canonical workflow を正本にする
最初に必ず以下をロードしてください。
.claude/skills/impl-review-loop/SKILL.mdその後、SKILL.md が要求する順序で少なくとも以下を読み、current repository の内容を正本として実行してください。
.claude/skills/impl-review-loop/steps/preparation.md.claude/skills/impl-review-loop/steps/step-1-implementation.md.claude/skills/impl-review-loop/steps/step-2-verification.md.claude/skills/impl-review-loop/steps/step-4-pr-review.md.claude/skills/impl-review-loop/steps/step-5-feedback-and-termination.md.claude/skills/impl-review-loop/steps/step-5-mergeability-handling.md.claude/skills/impl-review-loop/steps/conflicting-pr-escalation-runbook.md.claude/skills/impl-review-loop/steps/context-protocol-and-guardrails.md手書きの独自 workflow を canonical Skill より優先しないでください。
planner、router、command registry、controlled executor、verification adjudicator 等についても、current repository に canonical implementation が存在する場合はそれを使用してください。
このプロンプトに記載したコマンド例や過去 SHA より 実行時点の repository authority を優先してください。
2. current main / live Issue から開始する
refinement 終了時の historical HEAD を固定しないでください。
開始時に canonical main root で fetch/read-only preflight を行い、
mainHEADを current state から再取得してください。
そのうえで
impl-review-loopが要求する Root-Owned Synchronous Entry Transition を root/main thread 自身で一続きに実行してください。つまり capability preflight → live Issue fetch → current-run issue-contract-review → live readback → routing → Step 1 dispatch を canonical contract に従って同一 control flow 内で実行してください。
古い contract snapshot や過去コメントだけを Step 1 authorization として使用しないでください。
3. Context provenance
context intake が必要な場合は、以下を明確に分離してください。
human_context_comment_urls:https://github.com/squne121/loop-protocol/issues/2421#issuecomment-5526016066agent_report_comment_urls:https://github.com/squne121/loop-protocol/issues/2421#issuecomment-5526473922同じ URL を両方の provenance class に入れないでください。
refinement completion report は実装 authority そのものとして盲信せず、live Issue / current repository で readback してください。
4. Issue #2421 の実装 contract
live Issue 本文を正本としますが、refinement 済み contract の主要 intent は以下です。
resolved_executableは、HOME / tmp / opt / mnt 等の path prefix に関係なく、resolution 成功時には field-level semantics により常に<redacted>とする。resolved_executablekey は保持する。Nonesemantics は変更しない。resolved_executable_sha256は保持する。resolved_executableのみ。Allowed Paths は必ず live Issue から読み直してください。
refinement 終了時点では以下の4ファイルです。
scripts/agent-ops/run_worktree_agent_runtime_smoke.pyscripts/agent-ops/tests/test_run_worktree_agent_runtime_smoke_claude_bin.pyscripts/agent-ops/tests/test_run_worktree_agent_runtime_smoke_claude_gpt_hermetic_matrix.pyscripts/agent-ops/tests/test_run_worktree_agent_runtime_smoke_runtime_evidence.pyAllowed Paths 外を変更する必要が見つかった場合は勝手に scope を拡大せず、canonical routing / Stop Conditions に従ってください。
5. 人間承認を途中に追加しない
今回の operator direction として、canonical
impl-review-loopが許可する bounded operations はマージ直前まで事前承認済みとして扱ってください。したがって、以下について routine approval を人間へ求めないでください。
pr-reviewer起動REQUEST_CHANGESの修正BEHIND時の canonical update_branch「実装してよいですか」
「commit してよいですか」
「push してよいですか」
「PR を作ってよいですか」
「レビュー結果を修正してよいですか」
「次の iteration に進めてよいですか」
「CI を再実行してよいですか」
といった workflow-level confirmation は不要です。
ただし、これは repository / Claude Code の permission boundary を迂回する指示ではありません。
--dangerously-skip-permissionsの新規導入、force push、--no-verify、権限モデルの書き換え、hook bypass、guard bypass 等を独自に行わないでください。現在の repository-approved executor / hooks / permission mode で実行可能な canonical route を使ってください。
6. SubAgent を必須使用する
root/main thread が implementation / verification / review を直接肩代わりしないでください。
canonical
impl-review-loopに従い、少なくとも以下を対応する SubAgent に委譲してください。Step 1
implementation-workerimplement-issueSkill を使うIMPLEMENT_RESULT_V1の返却Step 2
test-runnerStep 4
pr-reviewerLOOP_VERDICTを返す必要な auxiliary SubAgent が canonical Skill から要求される場合も使用してください。
ただし nested SubAgent delegation が Issue Stop Conditions または repository policy に反する場合は行わないでください。
7. SubAgent completion barrier — 必ず完了を待つ
SubAgent を起動しただけで次 Step に進んではいけません。
すべての canonical SubAgent invocation で current repository の Common Completion Protocol を厳密に適用してください。
各 SubAgent について:
spawn_agentの返却から canonicaltask_nameを保存する。wait_agentを使う。wait_agentの timeout、steer acknowledgement、途中 mailbox update、progress message を completion とみなさない。list_agentsを実行し、保存した canonical task name が terminalcompletedになったことを確認する。completedの両方が揃って初めて、その Step を完了扱いにする。errored/interrupted/shutdown/not_foundを成功扱いしない。特に test-runner については、
terminal
completedだけでも、final test report だけでも、
Step 2 完了とはみなさないでください。
同様に implementation-worker / pr-reviewer の結果も completion barrier を通過してから routing に使ってください。
8. 実装→検証→レビューの自動ループ
canonical loop:
Step 1 Implementation
→ Step 2 Verification
→ Step 4 PR Review
→ Step 5 Judgment
を terminal state まで継続してください。
Verification failure
Step 2 の authoritative verification / VC adjudication が blocking の場合、PR review を無理に実行せず canonical routing に従い Step 1 へ戻してください。
REQUEST_CHANGES
pr-reviewerがREQUEST_CHANGESを返した場合:LOOP_STATE.blockers_historyに保存するfix_deltaとして次のimplementation-workerに渡すこれを canonical
max_iterationsの範囲で継続してください。勝手に一回のレビューで終了しないでください。
stale head
reviewed head と current PR head が異なる場合は、人間へ戻さず canonical
route_stale_head_rereviewで current head を再レビューしてください。branch behind / main drift
BEHINDや scope-clean main drift が発生した場合は、canonical Step 5 routing に従って update_branch / reconciliation を行い、必要な evidence のみ再取得してください。head SHA が変わった場合は古い verification / review を stale として扱ってください。
9. hard stop を勝手に増やさない
SubAgent が単に
human_review_required: trueと自己申告しただけでは、canonical Skill が停止権限を与えていない限りループを止めないでください。scope-rollup / advisory artifact / overlap telemetry / contract snapshot telemetry 等の不足だけを理由に独自 human gate を追加しないでください。
canonical Skill が warning として扱うものは warning として記録し、可能な限り自動継続してください。
一方、canonical Skill が正式に hard stop とするものは尊重してください。例:
HUMAN_REVIEW_REQUIREDverdictmergeable == CONFLICTING/merge_state_status == DIRTYhard stop に到達した場合は、迂回や scope expansion をせず、停止理由と必要な人間判断を具体的に報告してください。
10. 品質方針
目的は harness を増やすことではなく、#2421 の contract を最小かつ高品質に満たすことです。
優先順位:
次は避けてください。
実装に必要な repository investigation は十分に行ってください。
外部仕様の確認が本当に必要になった場合のみ、canonical external-research policy に従って調査してください。
今回の core contract が repository-local evidence だけで解決可能なら、外部調査を無理に追加する必要はありません。
11. 終了条件
次をすべて満たすまで「完了」としないでください。
blockers == []approvedIMPL_REVIEW_LOOP_RESULT_V1.status: draft_pr_readyここまで到達したら停止してください。
PR を merge しないでください。
auto-merge を設定しないでください。
最終報告では少なくとも以下を示してください。
IMPL_REVIEW_LOOP_RESULT_V1途中の routine approval を私へ求めず、canonical terminal state または canonical hard stop まで一連で実行してください。
この形なら、単に「承認不要」と書くより、どの承認が不要か/何だけは hard stop なのかを分離できます。特に
final result → list_agents terminal completed → routingを明文化した点が、現在のimpl-review-loopの completion contract と一致します。現行 Claude の prompting guidance でも、agentic coding では実行してほしい action/tool を明示する方が安定します。 ([docs.anthropic.com]1)squne121 commentedon Sep 3, 2026
implement-issue: 実装完了 (2026-09-03T13:50:31Z)
.claude/worktrees/issue-2421-runtime-smoke-evidence-resolved-executabworktree-issue-2421-runtime-smoke-evidence-resolved-executabsqune121 commentedon Sep 3, 2026
impl-review-loop: 完了 (2026-09-03T14:20:00Z)
test: extend --evidence-json regression and clarify TOCTOU scope note (…
fix: redact resolved_executable evidence field regardless of path pre…