Repository navigation
Closed
Labels
agent/implementerAI implementer agentenhancementNew feature or requestphase/implementationImplementation phasetriage-requiredNeeds owner triage for priority decision
Description
Parent Issue
なし(単独改善)
Machine-Readable Contract
contract_schema_version: v1
issue_kind: implementation
parent_issue: "none"
goal_ref: "live GitHub-bound ISSUE_SCOPE_SNAPSHOT_V1 を sanctioned materializer で生成し、controlled git executor が手書き artifact なしで消費できるようにする"
change_kind: workflowParent Goal Ref
- Goal: agent 駆動の stage/commit 境界で、Issue contract と GitHub live state に束縛された scope snapshot だけを認可入力にする。
- Desired Destination: 親なし。実装: launcher command 共有 parser(argv boundary 保持・cwd/project_root 対応)を抽出し全 consumer の invocation contract を移行する #1595 の launcher command parser 移行とは独立した、既存 controlled executor の producer 欠落を解消する。
Current Validated Scope
ISSUE_SCOPE_SNAPSHOT_V1の既存 schema とbuild_issue_scope_snapshot()を利用し、live GitHub readback・contract snapshot comment・worktree/base/branch binding を検証して JSON artifact を出力する sanctioned materializer CLI を追加する。- controlled executor が materializer provenance を検証し、任意に手書きされた snapshot JSON を認可入力として受理しない consumer 契約へ移行する。
- materializer の exact command id を controlled skill mutation policy/executor に登録し、余分な argv・repo/Issue/worktree binding 不一致・live readback 不全を fail-closed にする。
Remaining Parent Gaps
- なし。実装: launcher command 共有 parser(argv boundary 保持・cwd/project_root 対応)を抽出し全 consumer の invocation contract を移行する #1595 の 7 ファイルの shared launcher parser 抽出・consumer 移行・その PR は本 Issue に含めない。
ensure_contract_snapshot.pyのCONTRACT_REVIEW_RESULT_V1生成契約の変更、GitHub Issue 本文の変更、remote push lane の変更は別スコープとする。
Outcome
live GitHub-bound ISSUE_SCOPE_SNAPSHOT_V1 を生成する sanctioned materializer とその controlled command id が追加され、controlled git executor が手書き JSON ではなく検証済み provenance 付き artifact だけを消費できるテスト済みの状態。
In Scope
scripts/agent-guards/materialize_issue_scope_snapshot.pyを追加し、Issue body・comments・指定されたCONTRACT_REVIEW_RESULT_V1 status: gosource・default branch SHA・worktree/branch を live readback してISSUE_SCOPE_SNAPSHOT_V1artifact を生成する。- materializer は artifact path の canonical realpath、symlink/hardlink/size、repo・Issue・contract source・Allowed Paths hash・base SHA・branch/worktree binding を検証し、取得失敗、source drift、invalid schema、binding 不一致では出力を残さず fail-closed にする。
controlled_git_change_exec.pyを、materializer provenance が成立した artifact だけを受理する consumer 契約へ更新し、任意に作られた--snapshot-json入力を成功経路に使わせない。controlled_skill_mutation_policy.pyとcontrolled_skill_mutation_exec.pyに materializer 用の exact command id を追加し、artifact write root と argv/repo/Issue/worktree の bind を検証する。- materializer・policy/executor・consumer の unit test と運用文書を更新する。
Out of Scope
- 実装: launcher command 共有 parser(argv boundary 保持・cwd/project_root 対応)を抽出し全 consumer の invocation contract を移行する #1595 の shared launcher command parser、全 consumer invocation contract、tests、docs の変更。
ensure_contract_snapshot.pyの既存 go snapshot schema・投稿経路・trusted publisher 契約の変更。- raw git add/commit policy、remote push、branch protection、Codex native permission profile の再設計。
- GitHub Issue 本文または comment の手動更新を workaround として許可すること。
Acceptance Criteria
- AC1: sanctioned materializer CLI が live GitHub Issue/comment readback、指定 contract snapshot source、Allowed Paths、base SHA、branch、worktree を bind した
ISSUE_SCOPE_SNAPSHOT_V1artifact を生成する。 - AC2: materializer CLI が GitHub readback 不全、contract source drift、invalid source schema、repo/Issue/worktree binding 不一致、unsafe artifact path を fail-closed に拒否し、成功 artifact を残さない。
- AC3: controlled git executor が materializer provenance を検証した artifact だけを消費し、同一 schema の手書き JSON または provenance 不足 JSON を拒否する。
- AC4: controlled command id が exact argv と artifact write root を強制し、余分な argv、repo/Issue/worktree binding 不一致を deny する。
- AC5: materializer、controlled command policy/executor、controlled git executor の対象 regression test が PASS する。
Verification Commands
# AC1
$ uv run --locked pytest scripts/agent-guards/tests/test_materialize_issue_scope_snapshot.py::test_materializer_binds_live_github_contract_and_worktree
# AC2
$ uv run --locked pytest scripts/agent-guards/tests/test_materialize_issue_scope_snapshot.py::test_materializer_rejects_readback_drift_binding_and_unsafe_output
# AC3
$ uv run --locked pytest scripts/agent-guards/tests/test_materialize_issue_scope_snapshot.py
# AC4
$ uv run --locked pytest scripts/agent-guards/tests/test_materialize_issue_scope_snapshot.py::test_controlled_materializer_command_rejects_argv_and_binding_mismatch
# AC5
# baseline-expect: pass
$ uv run --locked pytest scripts/agent-guards/tests/test_controlled_git_change_exec.py scripts/agent-guards/tests/test_controlled_skill_mutation_policy.py scripts/agent-guards/tests/test_controlled_skill_mutation_exec.pyRuntime Verification Applicability
- decision: not_applicable
- reason: GitHub readback と local artifact validation の unit test で決定論的に検証でき、対話 UI または外部 runtime の動作検証を含まない。
Allowed Paths
- scripts/agent-guards/materialize_issue_scope_snapshot.py
- scripts/agent-guards/tests/test_materialize_issue_scope_snapshot.py
- scripts/agent-guards/controlled_git_change_exec.py
- scripts/agent-guards/tests/test_controlled_git_change_exec.py
- scripts/agent-guards/controlled_skill_mutation_policy.py
- scripts/agent-guards/controlled_skill_mutation_exec.py
- scripts/agent-guards/tests/test_controlled_skill_mutation_policy.py
- scripts/agent-guards/tests/test_controlled_skill_mutation_exec.py
- docs/dev/agent-runtime-ops.md
- docs/dev/hook-boundaries.md
Stop Conditions
- Allowed Paths 外の変更が必要と判明した場合
- In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
- 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
- 後続 Phase / 別スコープへの波及が判明した場合
- nested SubAgent delegation が必要になった場合
- 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
- materializer provenance を consumer が検証できず、手書き artifact を許可しなければ進めない場合
Required Skills
- Python 3(argparse、JSON schema、subprocess、path safety)
Required Design References
- docs/dev/agent-runtime-ops.md#Controlled Stage/Commit Executor
- docs/dev/hook-boundaries.md#hook_boundaries_manifest_v1
- docs/dev/workflow.md#Issue contract を作業計画の正本として扱う条件
- docs/dev/agent-skill-boundaries.md
Scope Delta(任意)
- source: 実装: launcher command 共有 parser(argv boundary 保持・cwd/project_root 対応)を抽出し全 consumer の invocation contract を移行する #1595 implementation handoff が detected した producer CLI 不在。
- validated_scope_delta:
build_issue_scope_snapshot()は 実装: Issue scope snapshot と controlled executor で共通 staging/commit 境界を構築する #1611 で実装済みだが、live GitHub-bound artifact を生成する sanctioned CLI と consumer provenance 契約がない。 - deterministic_fix: hand書き JSON と raw Python/heredoc に依存せず、exact command id が生成した artifact のみを controlled executor が消費する。
- rejected_alternative: 実装: launcher command 共有 parser(argv boundary 保持・cwd/project_root 対応)を抽出し全 consumer の invocation contract を移行する #1595 の Allowed Paths を広げる、または人間が snapshot JSON を手書きして raw git commit を行う。
Scope Collision Preflight
- decision:
overlap_requires_comment(C1) - related_issue: 調査: skill runtime exec 経由の worktree mutation command-id 実行が block される根本原因を特定する #1608, 実装: worktree bootstrap の origin/default-branch base ref を保持する #1604, 実装: linked issue worktree の origin/main fast-forward 同期を trusted RTK transaction に追加する #1603, 実装:scope_rollup.runをskill_runtime_execのsiblingexactprofileへ統合する #1601, 実装: launcher command 共有 parser(argv boundary 保持・cwd/project_root 対応)を抽出し全 consumer の invocation contract を移行する #1595, 実装: scope_rollup.run の GitHub inventory を完全 pagination で取得する #1593, 実装: worktree bootstrap を direct Python/no-project-mutation launcher に統一する #1588, 実装: docs/dev/agent-runtime-ops.md の standalone 実行時ワークアラウンド記述を permission profile 方式と整合させる #1499, 実装: session_manifest_coordinator.sh 経由の legacy-state diagnostic e2e 可観測性を検証する #1432, 実装: update_branch.py を canonical branch-update executor に統一し、入力・race・postcondition を自己検証する #1429, 実装: schema-governance.md の Initial Known Schemas を catalog から生成するスクリプト(#131 FU-5) #521, 実装: playtest-log の JSON Schema / validator の追加 #420, 改善: VC 設計ガイドラインに否定パターン誤マッチ防止チェックを追加 #237, 実装: rate limit / API error 由来の停止を StopFailure hook でログ保存し resume playbook を整備する #225, 改善: executable bit audit CI guard の適用範囲を .claude/skills 外のスクリプトへ拡張する #213, 実装: .claude/skills 配下スクリプトの executable bit を監査し CI guard を追加する #205
- overlapping_paths:
scripts/agent-guards/controlled_skill_mutation_policy.py,scripts/agent-guards/controlled_skill_mutation_exec.py,scripts/agent-guards/controlled_git_change_exec.py, 対応する test、docs/dev/agent-runtime-ops.md,docs/dev/hook-boundaries.md - edit_intent: 実装: Issue scope snapshot と controlled executor で共通 staging/commit 境界を構築する #1611 の既存 snapshot consumer に対し、live GitHub-bound producer/provenance を追加する。既存の runtime command-id 調査、worktree bootstrap、scope-rollup、launcher parser、または各 Issue 固有の hook policy predicate は変更しない。
- non_conflict_reason: 調査: skill runtime exec 経由の worktree mutation command-id 実行が block される根本原因を特定する #1608 は research-only で runtime exec 経路の根本原因を調査する。実装: launcher command 共有 parser(argv boundary 保持・cwd/project_root 対応)を抽出し全 consumer の invocation contract を移行する #1595 は launcher command parser を所有する。その他の候補は docs の別段落または広い legacy path による一致のみであり、本 Issue は materializer command id と snapshot provenance に限定する。
- dependency_ordering: 既存の OPEN 候補へ dependency を追加しない。実装前の live overlap preflight で同一 command id、同一 executor dispatch、または同一 document heading の所有が C2/C3 へ変化した場合は停止する。
Delivery Rule
- 1 Issue = 1 PR とし、dedicated linked worktree で実装する。
- Draft PR を既定とする。
- 実装前に fresh
CONTRACT_REVIEW_RESULT_V1 status: goを取得する。 - normal commit/push のみを使用し、force push、guard bypass、hook disable、raw git commit を行わない。
Metadata
Metadata
Assignees
Labels
agent/implementerAI implementer agentenhancementNew feature or requestphase/implementationImplementation phasetriage-requiredNeeds owner triage for priority decision
Activity
squne121 commentedon Jul 19, 2026
Contract Review Result
squne121 commentedon Jul 19, 2026
squne121 commentedon Jul 19, 2026
squne121 commentedon Jul 19, 2026
squne121 commentedon Jul 19, 2026
fix: satisfy materializer CI checks (#1629)
squne121 commentedon Jul 19, 2026
impl-review-loop: 完了(2026-07-19T05:27:34Z)
squne121 commentedon Jul 19, 2026
impl-review-loop: 人間判断要請(2026-07-19T07:45:00Z)
PR #1630 の最新 REQUEST_CHANGES(reviewed HEAD:
2702ae7fd7b0d15863cc414ba54a92d379ce7646)を受け、Step 1 / iteration 1 の修正を開始しました。しかし、割当済み worktree の HEAD は1e2a5e9193641d2919024d11a51786cd4ab041deのままであり、current-head contract を満たす fast-forward 同期が repository guard により拒否されました。rtk git pull --ff-only:local_main_branch_guardのrtk_unknown_innerにより拒否。verified_ff_merge_exec.py: 必須LOOP_ISSUE_NUMBER=1629が leading environment assignment として同 guard に拒否。human_review_required。人間代行で current HEAD へ fast-forward した後、impl-review-loop Step 1 を再開してください。
squne121 commentedon Jul 19, 2026
impl-review-loop: 人間判断要請(scope contract)
#1629 の fresh contract review は、既存ファイルを AC3 の canonical baseline-fail node として使えないため reject しました。
scripts/agent-guards/tests/test_controlled_git_change_exec_live_snapshot_authority.pyを新規作成し、手書き snapshot/sidecar 拒否、torn/stale live binding の commit 前拒否、/を含む branch binding を検証する。Allowed Pathsに含まれず、Stop Conditions の「Allowed Paths 外の変更が必要」に該当する。未commit実装は dedicated worktree に保存済みです。Allowed Paths を上記 file へ拡張し fresh
CONTRACT_REVIEW_RESULT_V1 status: goを取得する人間承認後にのみ、実装・controlled commit・push・PR 更新を再開します。commit / push / merge は実行していません。squne121 commentedon Jul 19, 2026
Contract Review Result
fix: #1629 materializer snapshot を live 認可へ、file-trust を廃止
squne121 commentedon Jul 19, 2026
impl-review-loop: 人間判断要請(runtime binding)
PR #1630 の再開は runtime Allowed Paths binding で停止しています。
allowed_paths_runtime_binding_unavailable:rtk git addはCODEX_ALLOWED_PATHS未注入で拒否され、同変数を command prefix で渡すと hook が拒否します。base_sha_at_snapshotが current default branch SHA と不一致のため、commit/push 再開前に freshCONTRACT_REVIEW_RESULT_V1 status: gosnapshot が必要です。Issue 本文、stage、commit、push、merge は変更していません。