Skip to content

実装: migrate agent/runtime parity contracts(Phase 2, Child 2 of #2154) #2160

Closed

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: "2154"
goal_ref: >
  .claude/agents/*.md を claude-native / claude-gpt 共通の Claude Code 実行宣言として確定し、
  Codex CLI agent parity contract を Phase 3(#2161)までの legacy compatibility projection へ縮退する
change_kind: refactor

Parent Issue

#2154

Parent Goal Ref

Parent #2154 の Architecture Decision D(Shared SubAgent 定義: .claude/agents/*.md を provider-neutral SSOT とする、という親 #2154 本文の当初表現。本 Issue はこれを、再定義レビュー P0-2 に基づき「.claude/agents/*.md を claude-native / claude-gpt 共通の Claude Code 実行 authority とし、Codex CLI agent config を legacy compatibility projection へ縮退する」という表現へ修正して継承する。semantic model alias + effort frontmatter で役割を表す点は変更しない)と Phase Handoff Contract 節の Current Objective(#2160 の agent contract migration を進めつつ main 追随と coordination を判定する)を正本参照とする。

Current Validated Scope

depends_on:
  - pull_request: 2162
    required_state: merged
    actual_state: merged
  - pull_request: 2176
    required_state: merged
    actual_state: merged
  - pull_request: 2220
    required_state: merged
    actual_state: merged
authority: "この depends_on ブロックが #2160 の唯一の gate authority である。親 #2154 本文の記述(stale な可能性あり)より、この節の internal state を優先する。"
  • 親 導入: Codex CLI 実行系を廃止し Claude Code dual-subscription runtime へ移行する #2154 本文の Current Validated Scope / Remaining Parent Gaps / Child Issues 節が stale な場合の更新は、本 Issue のスコープ外(親 Issue 自身の refinement で扱う)。
  • .claude/agents/issue-reviewer.md を含む既存 agent 定義ファイルには model: semantic alias はあるが effort frontmatter は存在しない(2026-08-24 時点で未確認)。
  • scripts/check_claude_codex_agent_parity.py の CLAUDE_PERMISSION_LEVEL_MAP(dontAsk→readonly / acceptEdits→issue-mutation / default→repo-write)は、Claude Code の permissionMode の意味論(promptの自動処理方針であり、tool allowlist や呼び出す skill の mutation boundary とは独立)と一致しない誤った直接変換である(再定義レビュー P0-3)。
  • scripts/check_claude_codex_agent_parity.py の PARITY_AGENTS(issue-reviewer / issue-creator / issue-editor / scope-rollup-runner の4件のみ)は、tests/fixtures/codex-agent-config/expected-runtime-contract.json に存在する他の agent(implementation-worker / review-issue / test-runner / PR reviewer群 / post-merge worker / web-researcher / Codex-only Spark agent 等)を扱っておらず、全 agent の分類が inventory 化されていない(再定義レビュー P1-2)。
  • scripts/check_claude_codex_agent_parity.py の frontmatter parser は key: value / インデント - item のみを扱う独自 subset であり、quoted scalar・inline list・nested object・folded scalar 等の YAML 構文を正しく扱わず、未知の構文を silent skip する(再定義レビュー P1-3)。
  • reviewer_transport.py の backend は claude / codex / deterministic / fixture の4値 enum であり、再開時の CLI argv grammar を選ぶ transport adapter である。claude-native / claude-gpt は同一の Claude Code CLI・同一の Claude resume grammar を使うため、backend 直下の別 enum 値ではなく、runtime_profile / launcher_adapter という別次元で表現する(この位置づけ自体は変更しない。reviewer_transport.py のコード変更は本 Issue の Out of Scope)。

Remaining Parent Gaps

親 #2154 の Remaining Parent Gaps 節のうち、本 Issue が担当する項目は次の1つである。

Outcome

.claude/agents/*.md を claude-native / claude-gpt 両 runtime profile の Claude Code 実行 authority として確定し、.codex/agents/*.toml を Phase 3(#2161)までの legacy compatibility(read-only)projection として明記する。既存の Claude/Codex parity チェッカー(scripts/check_claude_codex_agent_parity.py)を、provider-specific model ID の完全一致検証ではなく role / permission / tool / output schema / semantic model class / effort requirement を検証する契約へ in-place で置換し、canonical checker を1つだけに保つ。.claude/agents/** と .codex/agents/** の全 asset を shared_claude_runtime / claude_only / legacy_codex_projection / legacy_codex_only / experimental のいずれかへ一意分類する。新規の汎用 runtime observation schema・launch ledger 一般化・全 agent live matrix は追加しない(再定義レビュー P1-5、#1860 の minimal harness 方針)。

Authority の分割

次元 Authority
Claude Code が読む実行宣言 .claude/agents/*.md
repository 固有の分類・mutation/delegation/output policy 縮小した既存 fixture(tests/fixtures/codex-agent-config/expected-runtime-contract.json)
alias から runtime model への mapping claude-gpt launcher(scripts/claude-gpt/**、変更禁止)とその tests
実際に起動された runtime/model/SubAgent 既存 runtime-smoke evidence(PR #2176 / #2220)
Codex CLI 互換 .codex/agents/*.toml、legacy read-only
人間向け説明 docs/dev/agent-skill-boundaries.md

Runtime Verification Applicability

  • decision: immediate
  • reason: AC8(代表 agent の live runtime smoke)は既存 worktree-agent-runtime-smoke harness(PR 実装: worktree-agent-runtime-smoke に claude-gpt launcher 選択入力を追加する (#2174) #2176 / feat: worktree-agent-runtime-smoke に hook ID ベースの SubAgent causal evidence 判定を追加する #2220 merged 実装)を使い、issue-reviewer agent を claude-native と claude-gpt の両 runtime profile で PR readiness 時に一度実行し、SubAgent causal evidence・expected marker・cleanup を確認する。全 agent × 全 profile の live matrix ではなく代表 1 agent × 2 profile に限定する(再定義レビュー P1-1)。SKIP を PASS へ昇格しない。docs/dev/runtime-verification-policy.md の SKIP 規約・証跡保存に従う。
    applicable_acs: AC8
    execution_environment: 実装 worktree から scripts/agent-ops/run_worktree_agent_runtime_smoke.py --runtime claude --mode structured --claude-adapter native と --claude-adapter claude-gpt をそれぞれ1回ずつ実行する(既存 harness、新規環境追加なし)
    skip_conditions: claude-gpt proxy が起動不能な environment_failure のときのみ SKIP を許可し、SKIP は PASS として扱わず PR コメントに reason_code と再試行手順を明記する
    fallback_policy: 一方の runtime profile が SKIP になった場合でも他方の実行結果と既存回帰テスト(causal evidence/claude-gpt hermetic matrix)は必須のまま維持し、両方 SKIP の場合は PR を merge_ready にしない
    artifact_requirements: 各実行の run_worktree_agent_runtime_smoke.py 出力(launcher path、repository HEAD、script hash、proxy observed model、cleanup 結果)を PR コメントまたは checked-in artifact として証跡保存する

In Scope

  • .claude/agents/*.md への effort frontmatter 追加を含む agent definition schema migration(既定値・未指定時の意味・変更禁止項目を固定し、全 agent の normalized diff で permission-affecting field(tools: / disallowedTools: 相当)が非変更であることを機械検証する)
  • .claude/agents/** と .codex/agents/** の全 asset を shared_claude_runtime / claude_only / legacy_codex_projection / legacy_codex_only / experimental のいずれかへ一意分類し、unclassified reference を 0 にする checked-in inventory
  • docs/dev/agent-skill-boundaries.md への Authority 分離の明記(.claude/agents/*.md を claude-native / claude-gpt 共通の実行 authority、.codex/agents/*.toml を legacy compatibility projection とする)
  • scripts/check_claude_codex_agent_parity.py(既存 canonical checker、in-place 変更)の permission semantics 修正: permissionMode 単独から mutation_class を自動導出しない。permission_mode / declared_tools / disallowed_tools / mutation_class を明示的に分離し、mutation_class は agent definition・tool 集合・呼び出す skill・mutation boundary の明示契約から導出する repository 固有 behavioral contract(security boundary ではない)と明記する。反例 negative test(dontAsk + Bash != read_only 等、最低3件)を追加する
  • 同チェッカーの model / effort semantics 修正: agent contract は Claude 側 model_alias / effort_policy を扱い、GPT 側の具体的 model ID を agent ごとに fixture へ複製しない(mapping は claude-gpt launcher 側に一本化する)。static な declaration(model_alias/effort_policy/tools/permission_mode)と observation(selected_runtime_profile/launcher_adapter/agent_invocation_correlated/proxy_observed_model/cleanup_ok、既存 runtime-smoke evidence を再利用)の層分離を明記し、静的 PASS を runtime proof と呼ばない
  • 同チェッカーの検証対象を role / permission / tool / output schema / semantic model class / effort requirement へ置換する(model ID 完全一致検証は撤去)。PARITY_AGENTS の4件限定を撤廃し、全 agent 定義を上記 asset inventory の分類に基づいて検証する
  • 同チェッカーの frontmatter parser の strict 化: unsupported syntax を silent skip せず fail する。Task / Agent tool alias を tool 比較前に正規化する。duplicate agent name・unknown classification を検出してエラーにする
  • 代表 agent(issue-reviewer)を claude-native と claude-gpt の両 runtime profile で既存 worktree-agent-runtime-smoke harness(--runtime claude --claude-adapter native|claude-gpt)から起動し、SubAgent causal evidence(PR feat: worktree-agent-runtime-smoke に hook ID ベースの SubAgent causal evidence 判定を追加する #2220 実装)・cleanup 結果を確認する回帰検証の追加(新規 harness・新規 hook は追加しない)
  • #2161(Phase 3, Codex asset 削除)へ引き渡す removal-target / consumer / compatibility-shim inventory の checked-in artifact 化。phase_2_compatibility(codex_assets_authoritative: false、legacy_validator_mode: compatibility_only、codex_asset_deletion: forbidden)を docs に明記し、既存 Codex 専用チェッカー(check_codex_agent_config.py、check-codex-agents.mjs)は変更せず compatibility モードで green を維持する

Phase / Gate

Summary

Parent #2154 のアーキテクチャ決定 D(Shared SubAgent 定義)に基づき、.claude/agents/*.md を claude-native / claude-gpt 共通の Claude Code 実行宣言として確定し、既存の Claude/Codex CLI parity チェッカー(scripts/check_claude_codex_agent_parity.py)を、provider-specific model ID の完全一致検証ではなく role / permission / tool / output schema / semantic model class / effort requirement を検証する契約へ in-place 置換する。.codex/agents/*.toml は Phase 3(#2161)まで legacy compatibility projection として維持し、この Issue では削除しない。

2026-08-15 時点の旧レビューが指摘した transport/schema migration/provider 概念混同自体は妥当だが、その改善案にあった新規 runtime observation schema・launch ledger の一般化・全 agent live matrix は、PR #2176 / #2220 で live 検証基盤が既に実装済みであることと #1860 の minimal harness 方針を踏まえ過剰と判断し、本 Issue のスコープから除外した(2026-08-24 再定義レビューの recommended_disposition: reframe_in_place を採用)。

Out of Scope

Acceptance Criteria

  • AC1: .claude/agents/*.md の少なくとも1ファイル(issue-reviewer.md)に effort frontmatter が追加され、全 agent 定義ファイルの frontmatter 変更前後の normalized diff で tools: / disallowedTools: 相当の permission-affecting field が変化していないことを機械検証するスクリプト・テストが存在する。
  • AC2: .claude/agents/** と .codex/agents/** の全定義が shared_claude_runtime / claude_only / legacy_codex_projection / legacy_codex_only / experimental のいずれかに一意分類され、unclassified reference が 0 であることをテストで検証できる。
  • AC3: docs/dev/agent-skill-boundaries.md に、.claude/agents/*.md を claude-native / claude-gpt 共通の実行 authority とし、.codex/agents/*.toml を legacy compatibility(read-only)projection と明記する Authority 分離が記載されている。
  • AC4: scripts/check_claude_codex_agent_parity.py の mutation_class が permissionMode 単独から自動導出されなくなり、dontAsk + Bash != read_only 等の反例 negative test が最低3件存在し pass する。
  • AC5: 同チェッカーの fixture(tests/fixtures/codex-agent-config/expected-runtime-contract.json)が Claude 側 model_alias を扱い、GPT 側の具体的 model ID を agent ごとに複製しない構造へ変更されている。
  • AC6: scripts/check_claude_codex_agent_parity.py が role / permission / tool / output schema / semantic model class / effort requirement を検証する契約へ置換され、PARITY_AGENTS の4件限定が撤廃され、tests/test_agent_parity.py / tests/test_codex_agent_bridge_contract.py が green のまま維持される。新規 canonical checker ファイルは追加せず、既存ファイルへの in-place 変更で完結する。
  • AC7: 同チェッカーの frontmatter parser が unsupported syntax を silent skip せず fail し、Task / Agent tool alias が正規化され、duplicate agent name・unknown classification がエラーとして検出されることをテストで確認できる。
  • AC8: 代表 agent issue-reviewer を claude-native と claude-gpt の両 runtime profile で既存 worktree-agent-runtime-smoke harness(--claude-adapter native|claude-gpt)から起動し、SubAgent causal evidence・cleanup 結果を確認できる(PR readiness 時の live 実行を含む。SKIP は PASS へ昇格しない)。既存回帰テスト(causal evidence/claude-gpt hermetic matrix)は green のまま維持される。
  • AC9: #2161 が削除対象・consumer・compatibility shim を読み取れる inventory が checked-in artifact として生成され、phase_2_compatibility ブロック(codex_assets_authoritative: false 等)が docs に明記され、本 Issue では .codex/** を削除しない。

Verification Commands

# AC1
# baseline-expect: fail
$ rg -n "effort" .claude/agents/issue-reviewer.md
# baseline-expect: pass
$ uv run --locked pytest tests/test_agent_parity.py -v

# AC2
# baseline-expect: fail
$ uv run --locked pytest tests/test_agent_portability_contract.py::test_all_agent_assets_classified_no_unclassified -v

# AC3
# baseline-expect: pass
$ rg -n -e SSOT -e 正本 docs/dev/agent-skill-boundaries.md
# baseline-expect: fail
$ rg -n "claude-native / claude-gpt 共通の実行 authority" docs/dev/agent-skill-boundaries.md

# AC4
# baseline-expect: fail
$ uv run --locked pytest tests/test_agent_portability_contract.py::test_mutation_class_not_derived_from_permission_mode_alone -v

# AC5
# baseline-expect: fail
$ rg -n "model_alias" tests/fixtures/codex-agent-config/expected-runtime-contract.json

# AC6
# baseline-expect: pass
$ test -f scripts/check_claude_codex_agent_parity.py
# baseline-expect: pass
$ uv run --locked pytest tests/test_agent_parity.py -v
# baseline-expect: pass
$ uv run --locked pytest tests/test_codex_agent_bridge_contract.py -v
# baseline-expect: fail
$ rg -n "semantic_model_class" scripts/check_claude_codex_agent_parity.py

# AC7
# baseline-expect: fail
$ uv run --locked pytest tests/test_agent_portability_contract.py::test_frontmatter_parser_rejects_unsupported_syntax -v

# AC8
# baseline-expect: pass
$ uv run --locked pytest scripts/agent-ops/tests/test_run_worktree_agent_runtime_smoke_causal_evidence.py -v
# baseline-expect: pass
$ uv run --locked pytest scripts/agent-ops/tests/test_run_worktree_agent_runtime_smoke_claude_gpt_hermetic_matrix.py -v

# AC9
# baseline-expect: fail
$ rg -n "removal_owner.*2161" docs/dev/agent-skill-boundaries.md
# baseline-expect: pass
$ test -f scripts/check_codex_agent_config.py
# baseline-expect: pass
$ test -f scripts/check-codex-agents.mjs

# 必須検証(project-constitution.md)
$ pnpm typecheck
$ pnpm lint
$ pnpm test
$ pnpm build
$ uv run --locked pytest .claude/skills/gemini-cli-headless-delegation/tests/test_model_routing.py

Allowed Paths

  • .claude/agents/**
  • .claude/agents/issue-reviewer.md
  • scripts/check_claude_codex_agent_parity.py
  • tests/test_agent_parity.py
  • tests/test_agent_portability_contract.py(新規、AC2/AC4/AC7 の negative test を追加する)
  • tests/test_codex_agent_bridge_contract.py
  • tests/fixtures/codex-agent-config/**
  • tests/fixtures/codex-agent-config/expected-runtime-contract.json
  • docs/dev/agent-skill-boundaries.md
  • .github/ci/python-test-plan.json(Scope Delta: tests/test_agent_portability_contract.py を CI test-selection plan へ登録するため必要)
  • scripts/check_post_merge_cleanup_boundary.py(Scope Delta: AC6 で PARITY_AGENTS dict を削除したことに伴う既存 boundary-check の regex-match 対象追従。保護的アサーション自体は不変)

明示的に変更禁止とする path(再定義レビュー最終結論):

  • .claude/skills/issue-refinement-loop/scripts/reviewer_transport.py
  • scripts/check_subagent_launch_ledger.py
  • scripts/agent-guards/skill_runtime_exec.py
  • scripts/claude-gpt/**
  • scripts/agent-ops/run_worktree_agent_runtime_smoke.py
  • .claude/settings*
  • schemas/**(新規 schema 追加を行わないため対象外)
  • .codex/** の削除(read のみ許可、削除・書き換えは禁止)

具体的なファイルパスは実装着手時(issue-contract-review 等)に repo 実態で再確認する。上記は 2026-08-24 時点の repo grep 結果に基づく候補一覧である。

Required Design References

Stop Conditions

Required Skills

なし

Delivery Rule

1 Issue = 1 PR で repository implementation を完結させる。Acceptance Criteria / Verification Commands / Allowed Paths は本 Issue 本文で確定済み。実装着手前の issue-contract-review で具体的ファイルパスと VC の baseline fail 挙動を再確認する。

Activity

  1. squne121 commented on Aug 15, 2026

    @squne121
    OwnerAuthor

    判定

    REQUEST_CHANGES — Issue #2160 は現状のままでは実装着手不可です。

    方向性自体、すなわち「.claude/agents/*.md を provider-neutral な宣言元とし、Codex CLI 固有の parity contract を Claude Code の claude-native / claude-gpt portability contract へ移行する」は妥当です。

    ただし現在の Issue は、次の重要事項を未解決のまま一つの実装PRへ押し込んでいます。

    • dependency authority の矛盾
    • agent definition schema の変更許可
    • transport・runtime・provider の概念分離
    • 複数の closed schema のversioned migration
    • 静的宣言と実runtime観測の証拠分離
    • Phase 2からPhase 3への互換期間
    • downstream consumerとのfield contract

    現在の事実関係

    #2160 は現在も、#2158 / PR #2162 のPhase 1 runtime verificationが不十分であり「着手条件は未充足」と記載しています。Acceptance Criteria、Verification Commands、Allowed Pathsはなく、実装直前に確定するとされています。Issue固有コメントもありません。

    一方、後から更新された親 #2154 は、#2158をCLOSED、PR #2162をmergedとして受容し、現在のObjectiveを「#2160を進めつつ、#2174 / PR #2176とのcoordinationを判定する」としています。#2174はclosure childではなくnon_closure_coordinationです。

    ところが #2174 本文には、古い「#2160の着手条件には直接影響しない」という記述と、後から追加された「PR #2176 merge+#2174 closeまで#2160 cutover禁止」という記述が同居しています。PR #2176自体も、現在はmergeableではあるもののOPEN・Draft・未mergeです。

    この時点で依存関係のauthorityが一意ではありません。


    敵対的レビュー

    P0-1: Phase gate がsplit-brainになっている

    #2160は「Phase 1未検証」を前提に停止していますが、最新の親contractはPhase 1を受容済みとして#2160をcurrent objectiveにしています。その一方で、#2174はIssue内で#2160に対する非依存・hard dependencyの両方を主張しています。

    このままでは、実装Agentによって次のどちらにも解釈できます。

    • 古いgateを尊重し、永久にBLOCKEDになる
    • 最新parentだけを読んで、PR #2176未mergeのままruntime proof側まで変更する

    必須修正

    Issue本文にmachine-readableな依存関係を一つだけ置く必要があります。

    推奨は、Phase 2をさらに分離することです。

    phase_2a_static_contract_migration:
      depends_on:
        - issue: 2158
          required_state: closed
      coordinates_with:
        - issue: 2174
    
    phase_2b_live_runtime_observation:
      depends_on:
        - issue: 2174
          required_state: closed
        - pull_request: 2176
          required_state: merged
    

    親 #2154 の最新記述を優先して #2174をcoordination-onlyにするのか、#2174側のhard blockを残すのかは、Issue本文でOWNER authorityを明示して決着させるべきです。暗黙の時刻順解決に依存してはいけません。


    P0-2: リポジトリ自身のcontract preflightを通過できず、Stop Conditionも自己発火する

    リポジトリ内のissue-contract-reviewは、implementation IssueについてAllowed PathsまたはVerification Commandsが空ならBLOCKEDとし、ACとVCの対応も要求します。#2160はそのすべてを欠いています。

    さらに親 #2154 は、.claude/agents/*.md にsemantic model aliasとeffort frontmatterを持たせる方針です。しかし少なくとも現行の.claude/agents/issue-reviewer.mdにはmodel: haikuはあるものの、effortはありません。

    一方、#2160のStop Conditionsは、provider-neutral化によってagent定義のschemaまたはpermissionが変わる場合に停止するとしています。つまり、親contractを実現するためにeffortを追加すると、#2160自身の停止条件に該当する可能性が高い構造です。

    必須修正

    • effort追加を含むagent definition migrationを明示的にIn Scopeへ入れる
    • 既存agentごとの既定値、未指定時の意味、変更禁止項目を固定する
    • schema変更適用性を記載する
    • AC、VC、Allowed Pathsを実装前ではなく、Issue refinement時点で確定する
    • permission変更がないことをfixtureではなく、全agentのnormalized diffで検証する

    P0-3: reviewer_transport.backendをruntime/provider名へ置換するのはカテゴリ誤り

    現在のreviewer_transport.pyにおけるbackendは、主として再開時のCLI argv grammarを選択するtransport adapterです。

    • Claude Code: --resume <id>
    • Codex CLI: resume <id>
    • deterministic / fixture: テスト・checker pipeline用

    したがってclaude-nativeとclaude-gptは別backendではありません。両方ともClaude Code CLIを使用し、同じClaude resume grammarを通ります。GPT側はlauncherとproxyが異なるだけです。

    ここを単純に次のように改名すると危険です。

    claude -> claude-native | claude-gpt
    

    これでは、transport protocol、launcher profile、認証・課金provider、観測されたupstream providerが一つのenumに混入します。また、deterministic / fixtureのretry・failure taxonomyも巻き込みます。直近のPR #2177では、そのretry budgetと構造化timeout伝播が大幅に変更済みです。#2160はこの変更以前のIssueであり、最新実装をbaselineとして再取得する必要があります。

    必須修正

    最低でも次の4軸へ分離してください。

    transport_backend:
      enum: [claude, codex, deterministic, fixture]
    
    runtime_profile:
      enum: [claude-native, claude-gpt]
    
    launcher_adapter:
      enum: [native, claude-code-proxy]
    
    upstream_provider_observed:
      enum: [anthropic, codex, unknown]
    

    transport_backend=claudeの意味はPhase 2で変えず、Codex transportの削除はPhase 3へ残すべきです。


    P0-4: providerフィールド追加はadditive changeではなく、breaking schema migration

    SUBAGENT_LAUNCH_LEDGER_V1は、現在次のようなCodex専用・closed schemaです。

    • generated_by: codex_hook_pipeline
    • top-level key集合が固定
    • launch entryのkey集合が固定
    • Codex model、effort、permissionをexact match
    • unknown fieldを受理しない

    したがってproviderを単純追加すると、現在のvalidatorが不正artifactとして拒否します。

    同様に、agent_provider_route_smoke/v1、Python parity checker、Node checker、Codex config checker、runtime fixture、bridge testsなどにもClaude/Codexの二者前提が分散しています。

    #2160の「check_claude_codex_agent_parity.py相当のチェッカーを含む」という記述では、producer / consumer inventoryを固定できません。

    必須修正

    V1をin-place変更せず、新schemaを導入するべきです。

    migration:
      legacy_read:
        - SUBAGENT_LAUNCH_LEDGER_V1
      current_write:
        - AGENT_RUNTIME_OBSERVATION_V1
      dual_read_required: true
      legacy_artifact_policy: preserve_read_only
      removal_owner: issue-2161
    

    さらに、PRへ次をchecked-in artifactとして含める必要があります。

    • producer一覧
    • consumer一覧
    • fixture一覧
    • documentation consumer一覧
    • migration後もV1を読むconsumer
    • Phase 3で削除するconsumer
    • unknown / unclassified referenceが0であることの機械検証

    P0-5: 静的parityとruntime portability proofが混同されている

    Claude Codeのsubagent modelは、frontmatterだけで決まりません。現行公式仕様では、次の順に解決されます。

    1. CLAUDE_CODE_SUBAGENT_MODEL
    2. invocationごとのmodel
    3. agent frontmatter
    4. main conversation model

    さらにallowlistやprovider側の代替規則によって、宣言したfamily aliasとは異なるmodelへ解決される場合があります。([Claude]1)

    effortもfrontmatterが最優先ではありません。CLAUDE_CODE_EFFORT_LEVEL環境変数はfrontmatterより優先されます。(Claude)

    tool集合も静的ではありません。background実行やdelegation depthによって削減され、同じagent definitionでもforeground/backgroundで実効tool集合が変わります。([Claude]1)

    加えて、Taskは現在Agentへ改名されていますが旧名はaliasとして残っています。checkerが文字列の完全一致を使うと、意味的に同一の契約を不一致と判定する可能性があります。([Claude]3)

    hook evidenceにも限界があります。SubagentStart / SubagentStopはagent_idとagent_typeを相関できますが、model fieldを受け取れるのはSessionStartだけであり、そのfieldも常に存在するとは限りません。([Claude]4)

    失敗モード

    静的checkerがPASSしても、実runtimeでは次が起こり得ます。

    • 別modelへoverrideまたはsubstitutionされる
    • effortが環境変数で上書きされる
    • background実行で必要toolが消える
    • Agent / Task alias差だけでfalse negativeになる
    • SubAgent起動は観測できても、actual modelを証明できない

    必須修正

    証拠を次の層に分けてください。

    model_evidence:
      declared: haiku
      requested: haiku
      resolved: unknown
      observed: gpt-5.6-luna
      observation_source: proxy_structured_log
    
    effort_evidence:
      declared: low
      requested: low
      observed: not_observable
      environment_override_present: false
    
    tool_evidence:
      declared_tools: [...]
      normalized_tools: [...]
      execution_mode: foreground
      effective_tool_assertions: [...]
    

    not_observableを正規の値として許可し、model自身の自己申告をruntime proofに使わないことも必要です。


    P1-1: Phase 2完了時の互換状態が定義されていない

    #2160では.codex/**の削除はOut of Scopeです。#2161は#2160のmerge後にproducer/consumer inventoryとzero-reference確認を行って段階削除する契約です。

    しかし現在の次の資産は、.codex/**やCodex固有fixtureを前提にしています。

    • scripts/check_claude_codex_agent_parity.py

    • scripts/check_codex_agent_config.py

    • scripts/check-codex-agents.mjs

    • tests/fixtures/codex-agent-config/expected-runtime-contract.json

    • parity / bridge / permission / ledger tests

    • agent runtime operations文書

    • session recording policy

    必須修正

    Phase 2 merge時点の互換状態を明記してください。

    phase_2_compatibility:
      claude_contract_authoritative: true
      codex_assets_present: true
      codex_assets_authoritative: false
      legacy_validator_mode: compatibility_only
      legacy_references_must_be_classified: true
      codex_asset_deletion: forbidden
    

    Phase 2で旧checkerを直ちに削除するのではなく、portability checkerへのdelegating shimまたはlegacy compatibility modeへ落とし、Phase 3のzero-reference確認までmainをgreenに保つ必要があります。


    P1-2: SSOTが複数存在する

    親 #2154は.claude/agents/*.mdをprovider-neutral SSOTとしています。一方、docs/dev/agent-skill-boundaries.mdは、自身をSubAgentの責務・permission matrixの「正本」と明記しています。

    これは、どちらかを削除すべきという意味ではありません。authorityの次元を分ける必要があるという意味です。

    推奨する責務分割は次です。

    • .claude/agents/*.md

      • Claude Codeが読む実行宣言
    • portability manifest

      • provider-neutralなnormalized contract
    • docs/dev/agent-skill-boundaries.md

      • 人間向けのrole・運用責務説明
    • runtime observation artifact

      • 実際に選択・起動されたruntimeの証拠

    「すべてのSSOT」という表現を複数箇所で使うと、drift時の勝者が定義できません。


    P1-3: 配布物versionとruntime証拠のbindingが不足している

    claude-code-proxyは完全なAnthropic protocol equivalenceではなく、Claude Codeが実際に使用する範囲の互換性を対象としています。provider mappingがないAnthropic固有fieldがdropされる場合があり、local model登録だけではaccount accessも保証されません。provider/model切替はcontinuation前提にも影響します。

    また、最新releaseはv0.1.34ですが、その後のupstream mainにはv0.1.34で再現された問題の修正が入っています。したがって、mainのdocumentationやsource contractを、インストール済みbinaryの挙動証拠として代用できません。

    幸い、現行のclaude-gpt launcher / smokeは、launcher path、repository HEAD、dirty state、script hash、proxy absolute path/version、observed model/provider、cleanup結果をすでに収集しています。#2160ではこの証拠を再利用し、独自の弱いschemaへ作り直さない方がよいです。

    最低限、runtime observationには次をbindingしてください。

    sut:
      repository_head: ...
      repository_dirty: false
      agent_definition_sha256: ...
      portability_manifest_sha256: ...
      launcher_sha256: ...
      claude_code_version: ...
      proxy_absolute_path: ...
      proxy_version: ...
      proxy_sha256: ...
    
    observation:
      runtime_profile: claude-gpt
      requested_model_class: haiku
      observed_model_id: ...
      observed_provider: ...
      fallback_observed: false
      cleanup_ok: true
    

    P1-4: downstream contractと後発scopeがRequired Referencesに入っていない

    #2153は、#2160 merge後のprovider-neutral runtime namingとproof fieldsを前提に、native session continuation canaryを実装する契約です。したがって、#2160がfield名・型・意味を曖昧なままmergeすると、#2153側で再設計が発生します。

    また、Spark対応は現在、専用child #2186へ分離されています。#2186自身も#2160のprovider-neutral parityをOut of Scopeとしています。#2160側にもSpark model、Spark profile、Spark entitlement proofを明示的なOut of Scopeとして追加し、通常Sol/Terra/Luna portabilityへ混入させない方が安全です。

    Required Design Referencesには最低限、次を追加すべきです。


    P1-5: 1 Issue = 1 PRには変更軸が多すぎる

    現状の#2160は、少なくとも次の独立したmigrationを一PRで行おうとしています。

    1. agent frontmatter / semantic declaration
    2. parity checkerとfixture
    3. reviewer transport naming
    4. launch ledger schema
    5. runtime proof schema
    6. nested delegation contract
    7. permission/runtime normalization
    8. Phase 3 compatibility handoff

    この規模で一PRを維持する場合、atomic migration、dual-read、rollback、consumer inventoryが必須です。より安全なのは次の分割です。

    #2160-A: static agent portability contract
      - official frontmatter fields
      - normalized manifest
      - parser/checker
      - legacy parity compatibility
    
    #2160-B: runtime observation schema migration
      - ledger V2
      - transport/runtime/provider field split
      - producer/consumer dual-read
    
    #2160-C: native/GPT live portability proof
      - #2174 infrastructure reuse
      - profile-specific evidence
      - negative/fallback/cleanup tests
    

    推奨するcontractモデル

    Claude Codeが直接読むagent fileには、公式に定義されたfrontmatterだけを置くべきです。role class、output schema、delegation semanticsなどのプロジェクト固有metadataは、別のnormalized manifestに置く方が安全です。

    schema: AGENT_PORTABILITY_CONTRACT_V1
    
    agent:
      name: issue-reviewer
      source_path: .claude/agents/issue-reviewer.md
      source_sha256: "<sha256>"
    
    declaration:
      model_class: haiku
      effort_requirement:
        requested: low
        portability_policy: exact_or_fail
      permission_mode: dontAsk
      declared_tools:
        - Bash
        - Read
        - Grep
        - Glob
      disallowed_tools:
        - Agent
        - Edit
        - Write
        - MultiEdit
        - Skill
      output_contract_ref: ISSUE_REVIEW_RESULT_COMPACT_V2
      delegation_policy: forbidden
    
    runtime_profiles:
      claude-native:
        transport_backend: claude
        launcher_adapter: native
        expected_provider: anthropic
      claude-gpt:
        transport_backend: claude
        launcher_adapter: claude-code-proxy
        expected_provider: codex
    
    normalization:
      tool_aliases:
        Task: Agent
      unknown_frontmatter: reject
      duplicate_yaml_keys: reject
      permission_weakening: reject
    

    runtime observationは別schemaにします。

    schema: AGENT_RUNTIME_OBSERVATION_V1
    
    identity:
      runtime_profile: claude-gpt
      agent_name: issue-reviewer
      agent_id: "<hook-correlated-id>"
      agent_type: issue-reviewer
    
    resolution:
      declared_model_class: haiku
      requested_model_class: haiku
      resolved_model_class: unknown
      observed_model_id: gpt-5.6-luna
      observation_source: proxy_structured_log
    
    effort:
      declared: low
      environment_override_present: false
      observed: not_observable
    
    execution:
      subagent_start_observed: true
      subagent_stop_observed: true
      terminal_success_observed: true
      fallback_observed: false
      cleanup_ok: true
    
    provenance:
      repository_head: "<sha>"
      agent_source_sha256: "<sha256>"
      portability_manifest_sha256: "<sha256>"
      claude_code_version: "<version>"
      proxy_version: "<version>"
    

    最低限必要なAcceptance Criteria

    1. Gateの一意化
      実装: claude-gpt launcher を bootstrap し native canary で runtime を検証する #2158、実装: worktree-agent-runtime-smoke に claude-gpt launcher 選択入力を追加し Lane A/B 実機検証する #2174、PR #2176について、depends_onとcoordinates_withを矛盾なく確定する。

    2. 完全なconsumer inventory
      parity checker、Codex config checker、Node checker、fixtures、ledger、runtime smoke、transport、docs、testsを列挙し、unclassified referenceが0である。

    3. agent schema migrationの明示許可
      effort追加、未指定時の意味、全agentの既定値、permission不変条件を固定する。

    4. versioned migration
      V1をin-place拡張せず、new schemaを導入し、Phase 2ではdual-read、Phase 3でlegacy removalとする。

    5. 概念軸の分離
      transport_backend、runtime_profile、launcher_adapter、observed_providerを別fieldにし、deterministic/fixture挙動を維持する。

    6. 静的mutation tests
      model class、effort、permission、tools、disallowed tools、output schema、delegation policyの各mutationでcheckerが確実にFAILする。Task / Agent aliasはsemantic normalizationする。

    7. live runtime matrix
      claude-native / claude-gptの両profileで、代表的なread-only、write、delegation-forbidden agentを起動し、profile、agent lifecycle、actual provider/model、terminal result、fallback absence、cleanupを相関する。

    8. 証拠のfail-closed化
      SKIP、fallback、model self-report、catalog-only observation、hook-only model inferenceをPASSへ昇格しない。

    9. Phase 3 handoff artifact
      #2161に渡すremaining .codex/** reference一覧と、各referenceの削除順序を生成する。

    10. 実装contractの完成
      上記ACに対応するVerification Commands、Allowed Paths、Runtime Verification Applicability、Stop ConditionsをIssue本文へ記載する。


    最終verdict

    verdict: REQUEST_CHANGES
    implementation_readiness: blocked
    safe_to_start: false
    
    primary_blockers:
      - stale_and_conflicting_phase_gate
      - missing_acceptance_criteria
      - missing_verification_commands
      - missing_allowed_paths
      - self_triggering_agent_schema_stop_condition
      - transport_runtime_provider_conflation
      - unversioned_closed_schema_migration
      - incomplete_producer_consumer_inventory
      - static_declaration_misrepresented_as_runtime_proof
      - undefined_phase2_to_phase3_compatibility
    
    owner_decision_required:
      - whether_issue_2174_is_hard_dependency_or_coordination_only
    
    required_next_state:
      - rewrite_issue_contract
      - run_issue_refinement_review
      - pass_issue_contract_review
      - only_then_start_implementation
    

    現状の#2160を直接実装へ渡すべきではありません。まずdependency authority、schema versioning、証拠モデル、Phase 3との互換境界をIssue本文へ固定する必要があります。

  2. squne121 commented on Aug 15, 2026

    @squne121
    OwnerAuthor

    Issue refinement loop: human escalation

    fail-closed 方針に従い、調査・レビュー・本文書換えは実行していません。上記 contract section を確定後、refinement loop を再実行してください。

  3. squne121 commented on Aug 15, 2026

    @squne121
    OwnerAuthor

    運用上の問題記録

    Issue #2160 の refinement preflight 実行時、skill の実行条件を満たすためにリポジトリルートで main へ一時的に切り替えました。これはルート checkout を他作業と競合させ得る不適切な操作でした。

    • 影響: 追跡対象ファイルおよび既存の未追跡ファイルは変更していません。終了後、元の pr-2185-test へ復帰済みです。
    • 再発防止: リポジトリルートでの branch checkout・切替は行いません。control-plane を含む作業は専用 worktree でのみ実行します。
    • skill が root/main を必須とする場合: ルート操作で回避せず、worktree 対応の安全な公式経路を使うか、経路がなければ fail-closed で停止します。
  4. squne121 commented on Aug 15, 2026

    @squne121
    OwnerAuthor

    #2160 (comment)
    「不足している必須セクション」あるのなら追加してくださいとしか人間は反応しません。当然の作業に対して人間にエスカレーションすることは、AI駆動開発としてワークフローに問題があるのではないかと、手順を見直してください。

    必要に応じて改善イシューを起標してほしいです。

    #2160 (comment)
    「再発防止: リポジトリルートでの branch checkout・切替は行いません。control-plane を含む作業は専用 worktree でのみ実行します。」やるべきことをしますという宣言は再発防止策ではありません。

    ClaudeCodeやAIの使用を理解した上で、どのように再発を防止できるかを検討してください。

    あるいは、作業環境での実現方法として改善する方法もいいと思います。

    しかし、この開発プロジェクトは個人趣味開発で行っているため、ClaudeCodeに過剰な制約を行って、作業効率が落ちるような方向性は求めません。hooksでworktree作業や日本語出力の制約を行おうとしましたが、動作検証があまく作業ができない状態に陥る、hookの開発でトークンを大量に消費する、実装がいまいちなどの問題があったため、その方向性では、現時点では実装を行わない判断をしています。実装がいまいちなどの問題があったため、その方向性では、現時点では実装を行わない判断をしています。

  5. squne121 commented on Aug 15, 2026

    @squne121
    OwnerAuthor

    Post-merge downstream handoff

    2026-08-16 session recommendation: #2160 の provider-neutral naming/proof contract が merge した後、fresh-session semantics remediation を専用 implementation Issue として起票する。この prerequisite は #2160 に依存し、fresh retryでresume directiveを省略しsynthetic parent-generated IDをbackend identityとしてresumeしないことを修正・テストする。#2160には押し込まない。prerequisiteをmerge後、#2153のnative dependencyに登録する。#2153は #2160・#2174・prerequisite が全てmergeしfresh contract reviewがgoになるまで開始しない。backend-issued observed ID/native canaryは #2153 の範囲。

  6. squne121 commented on Aug 15, 2026

    @squne121
    OwnerAuthor

    調査すると、今回の2件は同じ「注意不足」ではなく、workflow の構造上の問題です。

    missing_required_section の件では、実際に「9つの必須セクションが不足 → human_judgment_required → 調査・書換えを何もせず停止」となっています。 さらに現行 issue-refinement-loop 自体が、auto_apply_safe な deterministic repair を検出しても consumer がないため「human 判断待ち」にする、と明記しています。

    ここは新規 Issue を重複起票する前に #995 を再利用・現行化するのが第一候補です。#995 は現在も open で、まさに template-derived required sections を初回 rewrite で全件補完し、同じ missing_required_section を反復させないことを目的にしています。 また #2039 は auto_apply_safe の controlled mutation consumer を既に対象としていますが、repair classification/policy 自体は明示的に Out of Scope です。

    branch 切替事故も同様です。現行手順は parent orchestrator に canonical_main_root / default_branch で preflight を実行させる設計なので、「ルートで main に戻す」行為を誘発します。単なる「今後しません」ではこの構造は変わりません。 Claude Code は現在、--worktree / EnterWorktree と SubAgent の isolation: worktree をネイティブ提供しており、デフォルトの worktree.baseRef=fresh は remote default branch を基点にします。custom hook を増やさず、この能力を使う方が今回の条件に合います。([Claude]1) リポジトリ側の #1860 も、個人趣味開発向けに enforcing hook や独自 control-plane を増やさない方針を明示しています。

    以下のプロンプトでは、最低3つの調査 SubAgent を完走させてから統合判断し、最後に敵対的 reviewer も完走させるよう明示しています。新規 Issue は無条件には作らず、#995/#2039 等を live dedupe したうえで必要な gap だけ起票させます。

    目的

    Issue #2160 で発生した以下2つの運用失敗について、単なる注意喚起や再発防止宣言ではなく、Claude Code / AI駆動開発としての workflow・実行環境・責務分離を見直してください。

    対象:

    • https://github.com/squne121/loop-protocol/issues/2160#issuecomment-5302848320
    • https://github.com/squne121/loop-protocol/issues/2160#issuecomment-5302892921
    • https://github.com/squne121/loop-protocol/issues/2160#issuecomment-5302913633
    • Issue 実装: migrate agent/runtime parity contracts(Phase 2, Child 2 of #2154) #2160 本文、全コメント、関連 Issue / PR / repository assets

    今回の成果物は 調査・root cause 確定・既存改善 Issue の再利用/改訂・必要な場合だけ新規改善 Issue 起票・#2160 への traceability 記録 です。

    改善実装そのものは、この作業では開始しないでください。まず実装可能な Issue contract として問題を正しく切り出してください。


    OWNER 意図

    以下を固定要件として扱ってください。

    1. 「不足している必須セクション」は原則 human escalation ではない

    たとえば:

    • Outcome
    • Parent Goal Ref
    • Current Validated Scope
    • Remaining Parent Gaps
    • In Scope
    • Allowed Paths
    • Acceptance Criteria
    • Verification Commands
    • Required Skills
    • Runtime Verification Applicability

    等の template / contract 由来の不足が検出された場合、

    「不足しているので人間が確定してください」

    で止まることを正常な AI workflow と扱わないでください。

    既存 Issue、parent Issue、anchor comment、repository state、template、design reference から機械的または evidence-bounded に補えるなら、AI が補完して validation / review を再実行することを基本としてください。

    format/structure の不足と、OWNER にしか決められない意味論的判断を区別してください。

    2. human escalation は本当に人間判断が必要な場合へ限定する

    少なくとも次を別分類として監査してください。

    • deterministic / template-derived repair
    • evidence に基づく通常の Issue rewrite
    • stale evidence / 再取得可能な evidence
    • environment / transport failure
    • integrity / provenance failure
    • scope / authority conflict
    • irreversible / destructive operation
    • secret / credential / privilege 問題
    • OWNER の product / policy / scope decision

    missing_required_section や通常の contract hygiene を、最後の OWNER decision と同じ human_judgment_required bucket に押し込まない設計を検討してください。

    3. branch 切替事故の再発防止を「宣言」にしない

    以下は再発防止策として不十分です。

    「今後リポジトリルートでは branch checkout しません」

    これは「やるべきことをやります」という behavioral promise にすぎません。

    今回確認したい safety property は:

    Claude Code が session 開始時に使用していた checkout の branch / HEAD を、control-plane の都合で変更する必要自体がなくなること

    です。

    ただし、このために巨大な security framework や新しい enforcing hook を作らないでください。


    重要な設計制約

    この repository は個人趣味開発です。

    以下は禁止方向とします。

    • 新しい global enforcing hook を主解決策にする
    • worktree 強制用 hook を新設する
    • 日本語出力 guard のような別 concern を今回へ抱き合わせる
    • permission / hook / policy layer を何層も追加する
    • 新しい ledger / graph / packet / digest control-plane を作る
    • Claude Code の通常作業効率を大きく落とす
    • 「安全だから」と大量の wrapper / schema / checker を追加する
    • agent instruction を security boundary と誇張する

    .claude/settings* や既存 hooks は調査して構いませんが、今回の改善案として hook 強化を既定採用しないでください。

    Issue #1860 の minimal harness 方針との整合を必ず確認してください。

    原則:

    既存の Claude Code native capability + 小さい repository-side adjustment + regression test

    で解けるならそれを優先すること。


    最重要: SubAgent を必ず使用すること

    この調査を main thread 単独で済ませてはいけません。

    最低でも以下3つの SubAgent を起動してください。独立性があるものは並列実行して構いません。

    SubAgent A — refinement workflow investigator

    read-only で以下を追跡する。

    • 実装: migrate agent/runtime parity contracts(Phase 2, Child 2 of #2154) #2160 comment 5302848320 がどの判定経路で
      PLANNER_FAIL_CLOSED
      / missing_required_section
      / human_judgment_required
      になったか
    • run_refinement_preflight.py
    • plan_refinement_loop.py
    • repair_issue_contract.py
    • repair candidate / repair action producer
    • issue-refinement-loop/SKILL.md
    • issue-editor
    • edit-issue
    • contract_update
    • repair_action.apply
    • 関連 tests

    以下を区別して報告すること。

    1. checker が missing section を検出する地点
    2. repair candidate を生成できる地点
    3. planner が fail_closed に落とす地点
    4. orchestrator が human escalation に変換する地点
    5. controlled mutation consumer の有無
    6. fresh validation / retry loop の有無
    7. 「現在の仕様通りに動いた結果」なのか「実装 bug」なのか

    SubAgent B — control-plane / worktree investigator

    read-only で以下を追跡する。

    特に、

    「primary checkout を main に切り替えなくても、fresh default-branch code で control-plane command を実行できるか」

    を検討してください。

    branch 名そのものを authority にする必要があるのか、それとも、

    • repository identity
    • expected/fresh default ref
    • HEAD/tree identity
    • dedicated worktree role

    で十分なのかを確認してください。


    SubAgent C — issue/history dedupe investigator

    GitHub 上の Issue / PR / comment を検索し、今回の改善をすでに追跡しているものを洗い出してください。

    最低限確認:

    次を分類する。

    • exact duplicate
    • partially overlaps
    • stale but reusable
    • superseded
    • genuinely missing follow-up

    既存 OPEN Issue で十分なら新規 Issue を作らないこと。


    Claude Code 自体についての調査

    現在の Claude Code 公式ドキュメントも確認してください。

    一次資料を優先し、最低限以下を現在の仕様として確認すること。

    • claude --worktree / -w
    • EnterWorktree
    • SubAgent の isolation: worktree
    • worktree.baseRef
    • worktree cleanup semantics

    これらを利用すれば custom hook を追加せずに目的を満たせないか検討してください。

    Web の二次記事より Anthropic / Claude Code 公式 docs を優先してください。


    SubAgent の合流は必須

    main thread は A / B / C のすべてが完了するまで、Issue の編集・新規 Issue 起票・最終結論を行ってはいけません。

    並列実行した場合も、必ず全 SubAgent の terminal result を取得してください。

    「十分そうなので残りを待たずに進む」は禁止します。

    各結果を合流させ、

    • observed fact
    • inference
    • proposed change

    を明確に分離してください。


    調査後に必ず行う adversarial review

    A / B / C の結果を統合して remediation plan を作った後、別の reviewer SubAgent を1つ起動してください。

    reviewer には以下を敵対的に確認させること。

    1. missing_required_section を自動修復対象に広げすぎて semantic decision まで勝手に捏造しないか
    2. human escalation を減らすために fail-open 化していないか
    3. worktree 対策が単なる「注意書き」の言い換えになっていないか
    4. primary checkout branch invariance を実際に保証できる構造か
    5. hook / wrapper / schema / guard を過剰に増やしていないか
    6. 導入: AIエージェント運用をminimal harnessへ縮退し、過剰なcontrol-planeを廃止する #1860 minimal harness 方針に反していないか
    7. 既存 Issue を無視した重複起票になっていないか
    8. Claude Code native capability で済むものを独自実装していないか
    9. 個人趣味開発として maintenance/token cost に見合うか

    この reviewer SubAgent も完了するまで待ってください。

    blocker があれば remediation plan を修正し、必要なら reviewer をもう1回だけ再実行してください。


    現時点の仮説 — 必ず live state で検証してから採否を決めること

    以下は結論ではなく調査仮説です。

    仮説 A: missing section は既存 #995 をまず現行化すべき

    #995 がまだ有効なら、新規 duplicate を起票するより、

    へ契約を更新する方を優先してください。

    特に #995 に古い issue-author 前提が残っていないか確認すること。

    必要なら #995 を controlled Issue edit で現行化してください。

    ただし #995 が実質 superseded なら、その根拠を示して別 Issue にしてください。

    仮説 B: #2039 は consumer を担当するが、それだけでは今回を直せない可能性がある

    #2039 が repair_action.apply consumer を担当していても、

    missing_required_section
    → planner fail_closed
    → human_judgment_required

    の時点で repair lane に到達していなければ、consumer 実装だけでは今回の再発を防げません。

    producer / classification / routing と consumer を混同しないでください。

    #995 と #2039 の責務分界を確認し、不足部分だけ補ってください。

    仮説 C: worktree 問題は dedicated control-plane worktree が最小解になり得る

    理想形の一例:

    operator-owned checkout
        |
        | branch/HEAD を変更しない
        |
        +--> Claude Code native EnterWorktree / --worktree
                  |
                  +--> fresh origin/default ベース
                  |
                  +--> control-plane command
                  |
                  +--> dispose / reuse
    

    この案をまず評価してください。

    repository policy が「branch name == main」「cwd == primary root」を要求しているため native worktree が拒否されるなら、

    primary root を要求する

    のではなく、

    trusted repository の fresh default-ref content を持つ dedicated control-plane worktree である

    という identity に変更できないか検討してください。

    ただしこの変更のために大規模 framework を作らないこと。


    branch safety の acceptance property

    新しい改善 Issue を作る場合、単なる prose:

    root では checkout しないこと

    を AC にしてはいけません。

    少なくとも次の observable property を候補にしてください。

    Given:
      session 開始 checkout が branch X / HEAD A / working state S
    
    When:
      issue-refinement-loop の control-plane preflight/review/update phase を実行する
    
    Then:
      session 開始 checkout は branch X / HEAD A / working state S のまま
      control-plane は別 worktree で必要な default-ref state を取得・実行する
    

    テストは巨大な E2E harness ではなく、可能なら小さい subprocess / integration regression にしてください。

    「git switch を禁止する hook」が PASS 条件ではありません。


    human escalation taxonomy の目標

    今回の見直しでは、以下のような責務分離を目標仮説として評価してください。

    AI が自律継続すべきもの

    • template-derived required section の追加
    • repository evidence から一意に埋められる contract field
    • deterministic repair
    • ordinary Issue rewrite
    • stale evidence の再取得
    • safe bounded retry
    • fresh validation
    • ordinary test failure の修正
    • worktree provision
    • output formatting 修正

    environment / infrastructure として分離すべきもの

    • transport failure
    • CLI missing / incompatible
    • credential unavailable
    • network unavailable
    • artifact path unreadable
    • worktree provision failure

    自動修復可能なら bounded に修復してよい。

    直せなければ environment_failure として停止してよいが、

    OWNER の仕様判断が必要

    と偽装しないこと。

    本当に human judgment に残す候補

    • trusted OWNER directives の意味論的競合
    • product / UX / policy choice
    • scope を大きく変える複数の妥当案
    • destructive / irreversible operation
    • secret disclosure / credential rotation 等の owner action
    • privilege escalation
    • evidence を十分集めても決着しない authority conflict

    security / integrity hard-stop と human product judgment も可能なら別理由コードにしてください。


    Issue 起票・改訂ルール

    SubAgent 全件完了 + adversarial review 完了後にのみ行ってください。

    既存 Issue があれば

    duplicate を作らず、

    を controlled Issue editing route で行ってください。

    新規 Issue が必要なら

    必要最小数だけ起票してください。

    現時点では以下の2 concern を混ぜない方がよい可能性があります。

    Concern 1

    missing_required_section / deterministic repair / human escalation routing

    ただし #995 / #2039 で既に十分なら新規起票しない。

    Concern 2

    primary checkout を変更せず control-plane を dedicated worktree で実行する

    既存 exact tracker がなければ新規 Issue 候補。

    タイトル例は参考に留め、live dedupe 後に決定:

    改善: issue-refinement-loop の control-plane 実行を dedicated worktree 化し primary checkout の branch/HEAD を不変にする

    Issue body には必ず:

    • reproduction
    • root cause
    • desired destination
    • explicit In Scope / Out of Scope
    • Acceptance Criteria
    • Verification Commands
    • Runtime Verification Applicability
    • Allowed Paths
    • Required Skills
    • Required Design References
    • Stop Conditions

    を含める。

    そして重要:

    Issue を起票する途中で必須 section が不足していると判明したら、人間へ質問せず、その場で補完・再検証してください。今回の問題を新 Issue 作成中に再現しないこと。


    #2160 への traceability

    必要な Issue 更新/新規起票が完了したら、#2160 に1件だけ簡潔な follow-up comment を投稿してください。

    内容は「今後気をつけます」ではなく、

    • root cause
    • 既存 Issue を再利用したならその番号
    • 新規 Issue を起票したならその番号
    • 何が機械的に変われば再発しないのか
    • hook 強化を採用しなかった理由
    • implementation は各改善 Issue に委譲したこと

    を記録してください。

    「再発防止: branch checkout をしません」のような behavioral pledge は書かないでください。


    作業環境そのものを今回壊さないこと

    今回の調査中に、問題を再現してはいけません。

    session 開始時点で現在 checkout の以下を記録してください。

    • working tree path
    • branch / detached state
    • HEAD
    • status

    その checkout の branch / HEAD を control-plane の都合で変更しないでください。

    default branch 上でしか実行できない command が必要になった場合は、まず Claude Code native worktree または既存の安全な worktree 経路を使用してください。

    native worktree が現行 repository policy と衝突すること自体が今回の調査対象です。

    その衝突を回避するために primary checkout を main へ switch してはいけません。

    終了時に session 開始 checkout の branch / HEAD / status が意図せず変化していないことを確認してください。

    これは永久的な enforcing hook を追加する指示ではありません。今回の作業自身を安全に行うための isolation 条件です。


    停止条件

    人間へ停止・確認してよいのは原則として以下のみです。

    • destructive / irreversible operation が必要
    • secret / credential の開示・変更が必要
    • privilege escalation が必要
    • OWNER の product / scope / policy decision が本当に一意に決められない
    • trusted authority 同士が意味論的に衝突し、repository evidence でも解消不能

    以下は停止条件にしないでください。

    • 必須 section が足りない
    • Issue contract を rewrite する必要がある
    • deterministic repair がある
      -既存 Issue を更新すべき
    • worktree を作る必要がある
    • SubAgent の追加調査が必要
    • ordinary test / lint failure
    • stale evidence の再取得
    • GitHub comment の traceability 更新

    最終報告

    すべての SubAgent が完了し、必要な GitHub mutation が完了したあと、次の形式で報告してください。

    1. Root causes

      • missing-section escalation
      • root branch switch
    2. SubAgent results

      • A
      • B
      • C
      • adversarial reviewer
    3. Existing issues reused

    4. Existing issues updated

    5. New issues created

    6. Why no duplicate issue was created

    7. Chosen prevention mechanism

    8. Why this is stronger than a behavioral pledge

    9. Why hooks were not chosen

    10. Efficiency / maintenance cost

    11. 実装: migrate agent/runtime parity contracts(Phase 2, Child 2 of #2154) #2160 traceability comment

    12. Session-start checkout invariant

    • before branch/HEAD/status
    • after branch/HEAD/status
    1. Remaining true human decisions
    2. Links to all updated/created Issues

    重要なのは、human escalation の「回数を減らす」こと自体ではありません。

    AI が自力で解決できる作業と OWNER にしか決められない判断を正しく分離し、前者で人間をブロックしない workflow にすることを目的にしてください。

    このプロンプトでは、worktree 側は 「git switch を禁止する」ではなく「その checkout を switch する必要がない実行経路を作る」 ことを評価軸にしています。#2119 にも issue-refinement-loop の canonical-main-root 前提と issue-specific worktree 前提の non-composability が既に記録され、別 follow-up 候補とされています。 したがって Claude Code が live dedupe しても専用 tracker が見つからなければ、worktree 側は新規 Issue 化する可能性が高いです。

  7. squne121 commented on Aug 15, 2026

    @squne121
    OwnerAuthor

    Traceability: root cause is now split into implementation-ready trackers without starting remediation. #995 was currentized as the evidence-bounded classifier/producer for template-derived structural repairs; semantic authority, product/policy, scope, and ambiguous-content cases remain human escalation. #2039 remains the generic opaque controlled consumer, including stale-hash, one-shot apply, GitHub readback, and fresh validation. #2190 tracks the minimal dedicated linked-worktree control-plane lane that preserves the primary checkout’s path, branch, HEAD, and working state; it does not adopt global hooks or broad worktree enforcement. This follows #1860’s minimal-harness boundary. No remediation implementation or runtime verification was performed during this investigation.

  8. squne121 commented on Aug 24, 2026

    @squne121
    OwnerAuthor

    判定

    verdict: REQUEST_CHANGES
    implementation_start: blocked
    recommended_disposition: reframe_in_place
    new_issue_split: not_required_by_default
    security_posture: minimal_nonblocking

    方向性は妥当です。ただし、現在の Issue #2160 は実装契約として失効しており、この本文のまま着手すべきではありません。

    既存の敵対的レビューは、gate、schema migration、transport/runtime/provider の概念混同を正しく指摘しています。一方、その改善案に含まれる新規 runtime observation schema、launch ledger の一般化、複数agentの大規模live matrixは、後からマージされた基盤と #1860 の minimal harness 方針を考えると過剰です。既存レビューをそのまま実装せず、静的agent contract移行+Codex legacy compatibilityだけへ縮小するのが適切です。


    敵対的レビュー

    P0-1: Phase gate が現在の live state と一致していない

    #2160 本文は、PR #2162 の runtime verification が不十分で Phase 1 gate は未充足と記載したままです。Issue は現在も OPEN で、本文の最終更新も 2026年8月15日のままです。

    しかし現在は、以下がすべてマージ済みです。

    修正要求

    本文の gate を現在の事実へ更新してください。

    depends_on:
      - pull_request: 2162
        required_state: merged
      - pull_request: 2176
        required_state: merged
      - pull_request: 2220
        required_state: merged

    以前提案された「Phase 2a static / Phase 2b live」への分割は、現在は不要です。live検証基盤が既に存在するため、静的移行を実装し、PR readiness時に既存harnessで代表agentを一度確認すれば足ります。


    P0-2: 「provider-neutral agent definition」という抽象化が正確ではない

    .claude/agents/*.md は、抽象的なprovider-neutral manifestではありません。Claude Code固有の実行可能なSubAgent定義です。

    今回の target architecture は、

    claude-native ─┐
                   ├─ Claude Code ─ .claude/agents/*.md
    claude-gpt ────┘

    であり、二つのruntime profileが同じClaude Code harnessを使う構造です。

    Claude Code公式仕様では、.claude/agents/ はYAML frontmatterを持つClaude Codeのproject subagent定義であり、model、tools、permissionMode、effort、isolationなどをClaude Code自身が解釈します。対してCodex側は、config.tomlのagents設定、roleごとのconfig_file、default_subagent_model、default_subagent_reasoning_effortなどから構成される別のruntime-native config layerです。両者は同型のmanifestではありません。(Claude)

    したがって、目標を次のように修正すべきです。

    .claude/agents/*.md を claude-native / claude-gpt 共通のClaude Code実行宣言として確定し、Codex CLI agent configとのparityをPhase 3までのlegacy compatibility projectionへ縮退する。

    「ClaudeとCodexの共通仕様を設計する」のではなく、Claude Codeへauthorityを移し、Codex側を一時的な互換projectionに落とすIssueです。


    P0-3: 現行permission parityは意味論的に誤っている

    現在のcheckerは、次の直接変換を行っています。

    CLAUDE_PERMISSION_LEVEL_MAP = {
        "dontAsk": "readonly",
        "acceptEdits": "issue-mutation",
        "default": "repo-write",
    }

    これは成立しません。

    Claude CodeのpermissionModeは、permission promptをどう処理するかを表します。

    • dontAsk: promptを自動拒否するが、明示的に許可済みのtoolは動作する

    • acceptEdits: file editや一般的なfilesystem commandを自動承認する

    • default: 通常のprompt処理

    • 親sessionがacceptEdits、bypassPermissions、autoの場合は、親側がSubAgent設定より優先され得る

    (Claude)

    したがって、

    • dontAsk + Bash は必ずしもread-onlyではない

    • acceptEdits は「GitHub Issue mutation capability」を意味しない

    • default でもtool allowlistがRead/Grep/Globだけならrepo-writeではない

    という反例が成立します。

    修正要求

    少なくとも次の次元を分離してください。

    permission_mode: dontAsk       # Claude Codeのprompt挙動
    declared_tools: [Read, Grep]   # 宣言上のtool集合
    disallowed_tools: [Write, Edit]
    mutation_class: read_only      # repository固有のbehavioral policy

    mutation_classは、permissionModeから単独推論してはいけません。agent definition、tool集合、呼び出すskill、mutation boundaryの明示契約を総合したrepository policyとし、security boundaryではなくbehavioral contractと明記すべきです。#1860 もagent-local permission/instructionをsecurity boundaryとして扱わない方針を明示しています。

    必要なnegative testは最低限以下です。

    dontAsk + Bash                    != automatically read_only
    acceptEdits + no mutation skill   != automatically issue_mutation
    default + Read/Grep/Glob only     != automatically repo_write

    P0-4: 一つのIssueに異なる契約所有者を詰め込みすぎている

    #2160 は現在、次を一つのPRで扱おうとしています。

    1. .claude / .codex agent definition parity

    2. reviewer transport backend naming

    3. runtime proof schema

    4. launch ledger provider field

    5. nested delegation

    6. permission/runtime宣言

    これらは同一scopeではありません。

    reviewer transport

    reviewer_transport.backendは、runtime providerというより、Claude/Codexのresume argv grammar、deterministic backend、fixture backend、retry taxonomyを扱うtransport adapterです。claude-nativeとclaude-gptはどちらもClaude Code CLIを使うため、ここを別backendにする必要はありません。PR #2176でもbinary pathとlauncher semanticsを分けるため、--claude-adapter native|claude-gptが独立入力として導入されています。

    したがって、#2160では次を維持すべきです。

    transport_backend: claude
    runtime_profile: claude-native | claude-gpt
    launcher_adapter: native | claude-gpt

    reviewer_transport.pyのbackend enum変更はOut of Scopeです。

    runtime continuation proof

    #2153 は、Claude native/GPT両runtimeのsession continuation canary、backend-issued session ID、sanitized evidenceを明示的に所有しています。一方で現在の #2153 は、#2160が「provider-neutral namingとproof schema」を提供する前提になっています。

    これは次のように責務修正すべきです。

    #2160で汎用runtime proof schemaを新設するのではなく、#2153の依存目的を更新してください。

    Codex asset削除

    Codex CLI assetのinventoryとzero-reference削除は、既に #2161 の明示責務です。

    Issue refinement運用問題

    #2160コメントで発生した「必須section不足を人間へ投げる」「primary checkoutを切り替える」という運用問題は重要ですが、agent parity implementationへ混ぜるべきではありません。OWNERも単なる注意喚起では不十分である一方、過剰なhook制約は望まないと明示しています。

    現在は、

    として責務が具体化されています。

    したがって、これらは #2160 のBackground/coordinationとして参照するだけで、Allowed Pathsへ入れてはいけません。


    P0-5: SUBAGENT_LAUNCH_LEDGER_V1へprovider fieldを追加してはいけない

    現在のledger checkerは、

    • ledger_schema == SUBAGENT_LAUNCH_LEDGER_V1

    • generated_by == codex_hook_pipeline

    • top-level key、launch keyをexact集合で検証

    • model、reasoning effort、default permissionをCodex fixtureとexact比較

    • audit modeでは正常なartifactでも常にevidence_usable: false

    というCodex専用・closed・advisory schemaです。

    したがってprovider fieldの追加は、

    1. V1 validatorを壊すbreaking change

    2. advisory telemetryをruntime proofへ誤昇格させる

    3. Phase 3で削除予定のCodex資産へ新しい依存を増やす

    という三重の逆行になります。

    修正要求

    SUBAGENT_LAUNCH_LEDGER_V1:
      disposition: legacy_codex_only
      writable: false
      evidence_authority: false
      removal_owner: issue-2161

    #2160ではV2を作らず、V1をlegacy inventoryへ分類するだけにしてください。


    P1-1: 静的宣言と実runtime観測を分離すべき

    Claude Codeのmodelは、現在次の順で解決されます。

    1. CLAUDE_CODE_SUBAGENT_MODEL

    2. invocationごとのmodel指定

    3. agent frontmatter

    4. main conversation model

    allowlistによるfamily substitutionや、継承modelへのfallbackもあり得ます。またeffective tool集合はforeground/background等でも変化します。(Claude)

    effortも静的な完全一致対象にはできません。

    • CLAUDE_CODE_EFFORT_LEVELはfrontmatterより優先

    • 同じlow / medium / highでも、modelごとにcalibrationが異なる

    • proxy側ではCCP_CODEX_MODELとCCP_CODEX_EFFORTにより、全Codex requestのmodel/effortを強制できる

    (Claude)

    したがってcheckerが証明できるのは、次までです。

    declaration:
      model_alias: haiku
      effort_policy: inherit
      tools: [Read, Grep, Glob]
      permission_mode: dontAsk

    次はruntime evidenceの責務です。

    observation:
      selected_runtime_profile: claude-gpt
      launcher_adapter: claude-gpt
      agent_invocation_correlated: true
      proxy_observed_model: gpt-...
      cleanup_ok: true

    ただし、そのために新しい AGENT_RUNTIME_OBSERVATION_V1 を作る必要はありません。PR #2176/#2220の既存summary・causal evidenceを再利用してください。

    推奨するlive matrixは、代表的な非mutation agent一体です。

    issue-reviewer × claude-native
    issue-reviewer × claude-gpt

    PR readiness時に一度実行すれば十分です。全agent×全profileを毎回live実行するのは、個人開発に対して費用対効果が悪く、failure surfaceも増やします。


    P1-2: 現行checkerは全agent contractを扱っていない

    現行checkerのstrict parity対象は、

    PARITY_AGENTS = {
        "issue-reviewer",
        "issue-creator",
        "issue-editor",
        "scope-rollup-runner",
    }

    だけです。一方、期待値fixtureにはimplementation-worker、review-issue、test-runner、PR reviewer群、post-merge worker、web researcher、Codex-only Spark agentなど多数の定義と例外が存在します。

    つまり現在の状態は「全agentのparity contract」ではなく、

    • 一部agentだけstrict parity

    • その他はconfig validation

    • SparkはCodex-only例外

    • scope-rollup-runnerは期限付きpermission exception

    が一つのfixtureに混在しています。

    修正要求

    すべてのassetを以下のいずれかへ分類し、unclassifiedを0にしてください。

    shared_claude_runtime
    claude_only
    legacy_codex_projection
    legacy_codex_only
    experimental

    特に、現在fixtureへ各agentごとに繰り返し記載されている具体的なGPT model IDは削減すべきです。

    {
      "claude_model": "haiku",
      "model": "gpt-5.6-luna"
    }

    という対応をagentごとに複製するのではなく、

    • agent contract: model_alias: haiku

    • launcher contract: haiku → GPT側の現在のmapping

    • runtime smoke: 実際のproxy-observed model

    へ責務を分離してください。


    P1-3: current parserはYAMLではなく、壊れやすい独自subsetである

    現行checkerのfrontmatter parserは、文字列分割による独自実装です。

    • key: value

    • インデントされた- item

    • その他の行はskip

    という限定的な処理で、quoted scalar、inline list、nested object、folded scalar等のYAML構文を正しく扱いません。output contractもMarkdown proseへの正規表現依存です。

    修正要求

    • repository内に既存YAML parserがあるなら再利用する

    • 依存追加を避けるなら、対応grammarを明示してunsupported syntaxをエラーにする

    • 知らない構文をsilent skipしない

    • output schema候補が0件または複数件ならfailする

    • Task / Agentは現行Claude Code上でaliasなので、tool比較前に正規化する

    Claude Codeは現在、旧Task表記をAgentのaliasとして扱います。(Claude)


    P1-4: nested delegationは既に「Codex-only capability」ではない

    現行Claude Codeは、SubAgentのtoolsにAgentを含めると、設定されたdepth limit内でnested SubAgentを起動できます。したがって「Codex-only nested delegation premiseを除去する」というscope自体が陳腐化しています。(Claude)

    ここで比較すべきなのはprovider capabilityではなく、repository policyです。

    #1860の既存方針に合わせ、次のような静的policyで十分です。

    delegation_policy:
      none
      bounded_read_only
      root_owned_only

    write-capable agentからwrite-capable agentへのnested delegationを禁止する既存方針を維持しつつ、新しいhookやruntime ledgerは追加しないでください。


    P1-5: 既存レビューの改善案も現在は過剰

    既存REQUEST_CHANGESが指摘した以下は正しいです。

    • transport/provider/runtimeの概念分離

    • legacy compatibility期間

    • static/runtime evidence分離

    • schema変更時のconsumer inventory

    一方、現在はPR #2176と#2220により、launcher selectionとSubAgent causal evidenceが実装済みです。さらに #1860 は、独自ledger、packet schema、graph policy、追加checker、enforcing hookを増やさない方針です。

    したがって、既存レビューで提案された次の方向は採用しない方がよいです。

    新規 portability schema
    + 新規 runtime observation schema
    + launch ledger V2
    + 全agent live matrix
    + 新しいruntime proof control-plane

    代わりに、

    既存checkerの置換
    + 既存fixtureの縮小
    + 既存runtime-smokeの再利用
    + Phase 3向けinventory

    で完結させるべきです。


    推奨する Issue の再定義

    推奨タイトル

    実装: Claude Code agent definitionsをdual-runtime SSOTとし、Codex parity checkerをlegacy compatibility modeへ移行する(Phase 2)

    推奨Machine-Readable Contract

    contract_schema_version: v1
    issue_kind: implementation
    parent_issue: "2154"
    change_kind: refactor
    goal_ref: >
      .claude/agents/*.md を claude-native / claude-gpt 共通の
      Claude Code実行宣言として確定し、Codex CLI agent parity contractを
      Phase 3までのlegacy compatibility projectionへ縮退する
    

    depends_on:

    • pull_request: 2162
      required_state: merged
    • pull_request: 2176
      required_state: merged
    • pull_request: 2220
      required_state: merged

    runtime_verification_applicability: immediate

    Authorityの分割

    次元 Authority
    Claude Codeが読む実行宣言 .claude/agents/*.md
    repository固有の分類・mutation/delegation/output policy 縮小した既存fixture
    aliasからruntime modelへのmapping claude-gpt launcherとそのtests
    実際に起動されたruntime/model/SubAgent 既存runtime-smoke evidence
    Codex CLI互換 .codex/agents/*.toml、legacy read-only
    人間向け説明 docs/dev/agent-skill-boundaries.md

    fixtureには、agent fileから直接読める値を重複保存しない方がよいです。保存するのはproject固有の意味だけに絞ります。

    issue-reviewer:
      scope: shared_claude_runtime
      mutation_class: read_only
      delegation_policy: none
      output_contract: ISSUE_REVIEW_RESULT_COMPACT_V2
      legacy_codex_projection: .codex/agents/issue-reviewer.toml

    最小Acceptance Criteria

    1. Current-state更新
      PR feat: claude-gpt launcher を bootstrap し native canary で runtime を検証する #2162/実装: worktree-agent-runtime-smoke に claude-gpt launcher 選択入力を追加する (#2174) #2176/#2220がmerged baselineであることを本文へ反映し、旧gateを削除する。

    2. 全asset inventory
      .claude/agents/**と.codex/agents/**の全定義が一意に分類され、unclassifiedが0になる。

    3. Authority分離
      .claude/agentsを両Claude Code runtime profileの実行authorityとし、.codexをlegacy compatibilityと明記する。

    4. Permission semantics修正
      permissionMode単独からmutation_classを導出しない。反例negative testsを追加する。

    5. Model / effort semantics修正
      agent contractはClaude aliasとeffort policyを扱い、具体的なGPT model mappingをagentごとに複製しない。静的PASSをruntime proofと呼ばない。

    6. Checker cutover
      canonical checkerは一つだけとする。旧check_claude_codex_agent_parity.pyを残す場合はthin compatibility shimとし、Phase 3での削除ownerを 実装: retire Codex CLI assets and documentation(Phase 3, Child 3 of #2154) #2161 に固定する。

    7. Strict parsing / normalization
      unsupported frontmatterをsilent skipせず、Task / Agent alias、tool list、duplicate agent name、unknown classificationを検証する。

    8. Representative runtime smoke
      非mutation agent一体をclaude-nativeとclaude-gptで既存harnessから起動し、SubAgent causal evidence、期待marker、cleanupを確認する。SKIPをPASSへ昇格しない。

    9. Phase 3 handoff
      #2161が削除対象、consumer、compatibility shimを読み取れるinventoryを生成する。#2160では.codex/**を削除しない。

    10. Minimal harness
      新規global hook、ledger、runtime observation schema、sandbox、dedicated user、worktree強制guardを追加しない。


    推奨Verification Commands

    静的検証はfocused testへ絞ります。

    uv run --locked pytest -q \
      tests/test_agent_parity.py \
      tests/test_agent_portability_contract.py

    既存runtime-smokeの回帰:

    uv run --locked pytest -q \
      scripts/agent-ops/tests/test_run_worktree_agent_runtime_smoke_causal_evidence.py \
      scripts/agent-ops/tests/test_run_worktree_agent_runtime_smoke_claude_gpt_hermetic_matrix.py

    repository gates:

    pnpm typecheck
    pnpm lint
    pnpm test
    pnpm build

    さらに、Issue本文には既存worktree-agent-runtime-smokeの現在のCLI契約から、次の二つの実runtime VCを固定してください。

    issue-reviewer × claude-native
    issue-reviewer × claude-gpt

    grepだけをVCにせず、PR readiness時の一回だけlive実行する構成が妥当です。


    推奨Allowed Paths

    scripts/check_agent_portability.py
    scripts/check_claude_codex_agent_parity.py
    tests/test_agent_parity.py
    tests/test_agent_portability_contract.py
    tests/fixtures/codex-agent-config/expected-runtime-contract.json
    .claude/agents/**
    docs/dev/agent-skill-boundaries.md

    旧pathを互換shimとして残さずin-place変更するなら、scripts/check_agent_portability.pyの新設は不要です。重要なのはcanonical checkerが一つだけであることです。

    明示的に変更禁止とするべきpath:

    .claude/skills/issue-refinement-loop/scripts/reviewer_transport.py
    scripts/check_subagent_launch_ledger.py
    scripts/claude-gpt/**
    scripts/agent-ops/run_worktree_agent_runtime_smoke.py
    .claude/settings*
    .codex/** の削除

    既存runtime harness自体に不足が見つかった場合は、#2160へ抱き合わせず停止し、既存ownerへ戻すべきです。


    セキュリティ/ハーネス判断

    このIssueで維持すべきなのは、既に存在する軽量な境界だけです。

    • proxyのloopback bind

    • credential/tokenをevidenceへ保存しない

    • process/socket cleanup

    • silent fallbackをPASS扱いしない

    • modelの自己申告をruntime proofにしない

    • runtime-smoke時のみ既存worktree isolationを使う

    一方、PR #2162ではdedicated user、root/sudo、nested sandbox、environment scrubを撤去し、特にsandboxがBash実行を破壊したことが確認されています。これらを #2160 で復活させる合理性はありません。

    Claude Codeには現在、isolation: worktreeと既存のworktree実行保護があります。必要な実機検証はそれとPR #2176のrunnerを利用し、新しいworktree強制hookを追加しないのが妥当です。(Claude)


    最終結論

    現状の #2160 は NO-GO です。

    ただし、新しいIssueへの分割は原則不要です。本文を次の範囲へreframeすれば、1 Issue / 1 PRで十分実装可能です。

    Claude agent static contract
    + 全asset classification
    + Codex legacy compatibility bridge
    + 代表agentの既存runtime smoke
    + Phase 3 inventory handoff

    実装対象から外すべきものは次です。

    reviewer transport semantics
    汎用runtime proof schema
    launch ledger migration
    proxy / launcher変更
    新しいhook / sandbox / worktree guard
    全agent live matrix

    併せて、#2153の依存目的を「#2160が汎用proof schemaを提供する」から「#2160がruntime profile語彙を確定し、continuation evidenceは#2153自身が所有する」へ修正し、#2161にはcompatibility shimとlegacy asset inventoryだけを引き渡すのが最も一貫しています。

    ## 判定
    verdict: REQUEST_CHANGES
    implementation_start: blocked
    recommended_disposition: reframe_in_place
    new_issue_split: not_required_by_default
    security_posture: minimal_nonblocking
    

    方向性は妥当です。ただし、現在の Issue #2160 は実装契約として失効しており、この本文のまま着手すべきではありません。

    既存の敵対的レビューは、gate、schema migration、transport/runtime/provider の概念混同を正しく指摘しています。一方、その改善案に含まれる新規 runtime observation schema、launch ledger の一般化、複数agentの大規模live matrixは、後からマージされた基盤と #1860 の minimal harness 方針を考えると過剰です。既存レビューをそのまま実装せず、静的agent contract移行+Codex legacy compatibilityだけへ縮小するのが適切です。


    敵対的レビュー

    P0-1: Phase gate が現在の live state と一致していない

    #2160 本文は、PR #2162 の runtime verification が不十分で Phase 1 gate は未充足と記載したままです。Issue は現在も OPEN で、本文の最終更新も 2026年8月15日のままです。

    しかし現在は、以下がすべてマージ済みです。

    修正要求

    本文の gate を現在の事実へ更新してください。

    depends_on:
      - pull_request: 2162
        required_state: merged
      - pull_request: 2176
        required_state: merged
      - pull_request: 2220
        required_state: merged
    

    以前提案された「Phase 2a static / Phase 2b live」への分割は、現在は不要です。live検証基盤が既に存在するため、静的移行を実装し、PR readiness時に既存harnessで代表agentを一度確認すれば足ります。


    P0-2: 「provider-neutral agent definition」という抽象化が正確ではない

    .claude/agents/*.md は、抽象的なprovider-neutral manifestではありません。Claude Code固有の実行可能なSubAgent定義です。

    今回の target architecture は、

    claude-native ─┐
                   ├─ Claude Code ─ .claude/agents/*.md
    claude-gpt ────┘
    

    であり、二つのruntime profileが同じClaude Code harnessを使う構造です。

    Claude Code公式仕様では、.claude/agents/ はYAML frontmatterを持つClaude Codeのproject subagent定義であり、model、tools、permissionMode、effort、isolationなどをClaude Code自身が解釈します。対してCodex側は、config.tomlのagents設定、roleごとのconfig_file、default_subagent_model、default_subagent_reasoning_effortなどから構成される別のruntime-native config layerです。両者は同型のmanifestではありません。(Claude)

    したがって、目標を次のように修正すべきです。

    .claude/agents/*.md を claude-native / claude-gpt 共通のClaude Code実行宣言として確定し、Codex CLI agent configとのparityをPhase 3までのlegacy compatibility projectionへ縮退する。

    「ClaudeとCodexの共通仕様を設計する」のではなく、Claude Codeへauthorityを移し、Codex側を一時的な互換projectionに落とすIssueです。


    P0-3: 現行permission parityは意味論的に誤っている

    現在のcheckerは、次の直接変換を行っています。

    CLAUDE_PERMISSION_LEVEL_MAP = {
        "dontAsk": "readonly",
        "acceptEdits": "issue-mutation",
        "default": "repo-write",
    }
    

    これは成立しません。

    Claude CodeのpermissionModeは、permission promptをどう処理するかを表します。

    • dontAsk: promptを自動拒否するが、明示的に許可済みのtoolは動作する
    • acceptEdits: file editや一般的なfilesystem commandを自動承認する
    • default: 通常のprompt処理
    • 親sessionがacceptEdits、bypassPermissions、autoの場合は、親側がSubAgent設定より優先され得る

    (Claude)

    したがって、

    • dontAsk + Bash は必ずしもread-onlyではない
    • acceptEdits は「GitHub Issue mutation capability」を意味しない
    • default でもtool allowlistがRead/Grep/Globだけならrepo-writeではない

    という反例が成立します。

    修正要求

    少なくとも次の次元を分離してください。

    permission_mode: dontAsk       # Claude Codeのprompt挙動
    declared_tools: [Read, Grep]   # 宣言上のtool集合
    disallowed_tools: [Write, Edit]
    mutation_class: read_only      # repository固有のbehavioral policy
    

    mutation_classは、permissionModeから単独推論してはいけません。agent definition、tool集合、呼び出すskill、mutation boundaryの明示契約を総合したrepository policyとし、security boundaryではなくbehavioral contractと明記すべきです。#1860 もagent-local permission/instructionをsecurity boundaryとして扱わない方針を明示しています。

    必要なnegative testは最低限以下です。

    dontAsk + Bash                    != automatically read_only
    acceptEdits + no mutation skill   != automatically issue_mutation
    default + Read/Grep/Glob only     != automatically repo_write
    

    P0-4: 一つのIssueに異なる契約所有者を詰め込みすぎている

    #2160 は現在、次を一つのPRで扱おうとしています。

    1. .claude / .codex agent definition parity
    2. reviewer transport backend naming
    3. runtime proof schema
    4. launch ledger provider field
    5. nested delegation
    6. permission/runtime宣言

    これらは同一scopeではありません。

    reviewer transport

    reviewer_transport.backendは、runtime providerというより、Claude/Codexのresume argv grammar、deterministic backend、fixture backend、retry taxonomyを扱うtransport adapterです。claude-nativeとclaude-gptはどちらもClaude Code CLIを使うため、ここを別backendにする必要はありません。PR #2176でもbinary pathとlauncher semanticsを分けるため、--claude-adapter native|claude-gptが独立入力として導入されています。

    したがって、#2160では次を維持すべきです。

    transport_backend: claude
    runtime_profile: claude-native | claude-gpt
    launcher_adapter: native | claude-gpt
    

    reviewer_transport.pyのbackend enum変更はOut of Scopeです。

    runtime continuation proof

    #2153 は、Claude native/GPT両runtimeのsession continuation canary、backend-issued session ID、sanitized evidenceを明示的に所有しています。一方で現在の #2153 は、#2160が「provider-neutral namingとproof schema」を提供する前提になっています。

    これは次のように責務修正すべきです。

    #2160で汎用runtime proof schemaを新設するのではなく、#2153の依存目的を更新してください。

    Codex asset削除

    Codex CLI assetのinventoryとzero-reference削除は、既に #2161 の明示責務です。

    Issue refinement運用問題

    #2160コメントで発生した「必須section不足を人間へ投げる」「primary checkoutを切り替える」という運用問題は重要ですが、agent parity implementationへ混ぜるべきではありません。OWNERも単なる注意喚起では不十分である一方、過剰なhook制約は望まないと明示しています。

    現在は、

    として責務が具体化されています。

    したがって、これらは #2160 のBackground/coordinationとして参照するだけで、Allowed Pathsへ入れてはいけません。


    P0-5: SUBAGENT_LAUNCH_LEDGER_V1へprovider fieldを追加してはいけない

    現在のledger checkerは、

    • ledger_schema == SUBAGENT_LAUNCH_LEDGER_V1
    • generated_by == codex_hook_pipeline
    • top-level key、launch keyをexact集合で検証
    • model、reasoning effort、default permissionをCodex fixtureとexact比較
    • audit modeでは正常なartifactでも常にevidence_usable: false

    というCodex専用・closed・advisory schemaです。

    したがってprovider fieldの追加は、

    1. V1 validatorを壊すbreaking change
    2. advisory telemetryをruntime proofへ誤昇格させる
    3. Phase 3で削除予定のCodex資産へ新しい依存を増やす

    という三重の逆行になります。

    修正要求

    SUBAGENT_LAUNCH_LEDGER_V1:
      disposition: legacy_codex_only
      writable: false
      evidence_authority: false
      removal_owner: issue-2161
    

    #2160ではV2を作らず、V1をlegacy inventoryへ分類するだけにしてください。


    P1-1: 静的宣言と実runtime観測を分離すべき

    Claude Codeのmodelは、現在次の順で解決されます。

    1. CLAUDE_CODE_SUBAGENT_MODEL
    2. invocationごとのmodel指定
    3. agent frontmatter
    4. main conversation model

    allowlistによるfamily substitutionや、継承modelへのfallbackもあり得ます。またeffective tool集合はforeground/background等でも変化します。([Claude]1)

    effortも静的な完全一致対象にはできません。

    • CLAUDE_CODE_EFFORT_LEVELはfrontmatterより優先
    • 同じlow / medium / highでも、modelごとにcalibrationが異なる
    • proxy側ではCCP_CODEX_MODELとCCP_CODEX_EFFORTにより、全Codex requestのmodel/effortを強制できる

    (Claude)

    したがってcheckerが証明できるのは、次までです。

    declaration:
      model_alias: haiku
      effort_policy: inherit
      tools: [Read, Grep, Glob]
      permission_mode: dontAsk
    

    次はruntime evidenceの責務です。

    observation:
      selected_runtime_profile: claude-gpt
      launcher_adapter: claude-gpt
      agent_invocation_correlated: true
      proxy_observed_model: gpt-...
      cleanup_ok: true
    

    ただし、そのために新しい AGENT_RUNTIME_OBSERVATION_V1 を作る必要はありません。PR #2176/#2220の既存summary・causal evidenceを再利用してください。

    推奨するlive matrixは、代表的な非mutation agent一体です。

    issue-reviewer × claude-native
    issue-reviewer × claude-gpt
    

    PR readiness時に一度実行すれば十分です。全agent×全profileを毎回live実行するのは、個人開発に対して費用対効果が悪く、failure surfaceも増やします。


    P1-2: 現行checkerは全agent contractを扱っていない

    現行checkerのstrict parity対象は、

    PARITY_AGENTS = {
        "issue-reviewer",
        "issue-creator",
        "issue-editor",
        "scope-rollup-runner",
    }
    

    だけです。一方、期待値fixtureにはimplementation-worker、review-issue、test-runner、PR reviewer群、post-merge worker、web researcher、Codex-only Spark agentなど多数の定義と例外が存在します。

    つまり現在の状態は「全agentのparity contract」ではなく、

    • 一部agentだけstrict parity
    • その他はconfig validation
    • SparkはCodex-only例外
    • scope-rollup-runnerは期限付きpermission exception

    が一つのfixtureに混在しています。

    修正要求

    すべてのassetを以下のいずれかへ分類し、unclassifiedを0にしてください。

    shared_claude_runtime
    claude_only
    legacy_codex_projection
    legacy_codex_only
    experimental
    

    特に、現在fixtureへ各agentごとに繰り返し記載されている具体的なGPT model IDは削減すべきです。

    {
      "claude_model": "haiku",
      "model": "gpt-5.6-luna"
    }
    

    という対応をagentごとに複製するのではなく、

    • agent contract: model_alias: haiku
    • launcher contract: haiku → GPT側の現在のmapping
    • runtime smoke: 実際のproxy-observed model

    へ責務を分離してください。


    P1-3: current parserはYAMLではなく、壊れやすい独自subsetである

    現行checkerのfrontmatter parserは、文字列分割による独自実装です。

    • key: value
    • インデントされた- item
    • その他の行はskip

    という限定的な処理で、quoted scalar、inline list、nested object、folded scalar等のYAML構文を正しく扱いません。output contractもMarkdown proseへの正規表現依存です。

    修正要求

    • repository内に既存YAML parserがあるなら再利用する
    • 依存追加を避けるなら、対応grammarを明示してunsupported syntaxをエラーにする
    • 知らない構文をsilent skipしない
    • output schema候補が0件または複数件ならfailする
    • Task / Agentは現行Claude Code上でaliasなので、tool比較前に正規化する

    Claude Codeは現在、旧Task表記をAgentのaliasとして扱います。(Claude)


    P1-4: nested delegationは既に「Codex-only capability」ではない

    現行Claude Codeは、SubAgentのtoolsにAgentを含めると、設定されたdepth limit内でnested SubAgentを起動できます。したがって「Codex-only nested delegation premiseを除去する」というscope自体が陳腐化しています。([Claude]1)

    ここで比較すべきなのはprovider capabilityではなく、repository policyです。

    #1860の既存方針に合わせ、次のような静的policyで十分です。

    delegation_policy:
      none
      bounded_read_only
      root_owned_only
    

    write-capable agentからwrite-capable agentへのnested delegationを禁止する既存方針を維持しつつ、新しいhookやruntime ledgerは追加しないでください。


    P1-5: 既存レビューの改善案も現在は過剰

    既存REQUEST_CHANGESが指摘した以下は正しいです。

    • transport/provider/runtimeの概念分離
    • legacy compatibility期間
    • static/runtime evidence分離
    • schema変更時のconsumer inventory

    一方、現在はPR #2176と#2220により、launcher selectionとSubAgent causal evidenceが実装済みです。さらに #1860 は、独自ledger、packet schema、graph policy、追加checker、enforcing hookを増やさない方針です。

    したがって、既存レビューで提案された次の方向は採用しない方がよいです。

    新規 portability schema
    + 新規 runtime observation schema
    + launch ledger V2
    + 全agent live matrix
    + 新しいruntime proof control-plane
    

    代わりに、

    既存checkerの置換
    + 既存fixtureの縮小
    + 既存runtime-smokeの再利用
    + Phase 3向けinventory
    

    で完結させるべきです。


    推奨する Issue の再定義

    推奨タイトル

    実装: Claude Code agent definitionsをdual-runtime SSOTとし、Codex parity checkerをlegacy compatibility modeへ移行する(Phase 2)

    推奨Machine-Readable Contract

    contract_schema_version: v1
    issue_kind: implementation
    parent_issue: "2154"
    change_kind: refactor
    goal_ref: >
      .claude/agents/*.md を claude-native / claude-gpt 共通の
      Claude Code実行宣言として確定し、Codex CLI agent parity contractを
      Phase 3までのlegacy compatibility projectionへ縮退する
    
    depends_on:
      - pull_request: 2162
        required_state: merged
      - pull_request: 2176
        required_state: merged
      - pull_request: 2220
        required_state: merged
    
    runtime_verification_applicability: immediate
    

    Authorityの分割

    次元 Authority
    Claude Codeが読む実行宣言 .claude/agents/*.md
    repository固有の分類・mutation/delegation/output policy 縮小した既存fixture
    aliasからruntime modelへのmapping claude-gpt launcherとそのtests
    実際に起動されたruntime/model/SubAgent 既存runtime-smoke evidence
    Codex CLI互換 .codex/agents/*.toml、legacy read-only
    人間向け説明 docs/dev/agent-skill-boundaries.md

    fixtureには、agent fileから直接読める値を重複保存しない方がよいです。保存するのはproject固有の意味だけに絞ります。

    issue-reviewer:
      scope: shared_claude_runtime
      mutation_class: read_only
      delegation_policy: none
      output_contract: ISSUE_REVIEW_RESULT_COMPACT_V2
      legacy_codex_projection: .codex/agents/issue-reviewer.toml
    

    最小Acceptance Criteria

    1. Current-state更新
      PR feat: claude-gpt launcher を bootstrap し native canary で runtime を検証する #2162/実装: worktree-agent-runtime-smoke に claude-gpt launcher 選択入力を追加する (#2174) #2176/#2220がmerged baselineであることを本文へ反映し、旧gateを削除する。

    2. 全asset inventory
      .claude/agents/**と.codex/agents/**の全定義が一意に分類され、unclassifiedが0になる。

    3. Authority分離
      .claude/agentsを両Claude Code runtime profileの実行authorityとし、.codexをlegacy compatibilityと明記する。

    4. Permission semantics修正
      permissionMode単独からmutation_classを導出しない。反例negative testsを追加する。

    5. Model / effort semantics修正
      agent contractはClaude aliasとeffort policyを扱い、具体的なGPT model mappingをagentごとに複製しない。静的PASSをruntime proofと呼ばない。

    6. Checker cutover
      canonical checkerは一つだけとする。旧check_claude_codex_agent_parity.pyを残す場合はthin compatibility shimとし、Phase 3での削除ownerを 実装: retire Codex CLI assets and documentation(Phase 3, Child 3 of #2154) #2161 に固定する。

    7. Strict parsing / normalization
      unsupported frontmatterをsilent skipせず、Task / Agent alias、tool list、duplicate agent name、unknown classificationを検証する。

    8. Representative runtime smoke
      非mutation agent一体をclaude-nativeとclaude-gptで既存harnessから起動し、SubAgent causal evidence、期待marker、cleanupを確認する。SKIPをPASSへ昇格しない。

    9. Phase 3 handoff
      #2161が削除対象、consumer、compatibility shimを読み取れるinventoryを生成する。#2160では.codex/**を削除しない。

    10. Minimal harness
      新規global hook、ledger、runtime observation schema、sandbox、dedicated user、worktree強制guardを追加しない。


    推奨Verification Commands

    静的検証はfocused testへ絞ります。

    uv run --locked pytest -q \
      tests/test_agent_parity.py \
      tests/test_agent_portability_contract.py
    

    既存runtime-smokeの回帰:

    uv run --locked pytest -q \
      scripts/agent-ops/tests/test_run_worktree_agent_runtime_smoke_causal_evidence.py \
      scripts/agent-ops/tests/test_run_worktree_agent_runtime_smoke_claude_gpt_hermetic_matrix.py
    

    repository gates:

    pnpm typecheck
    pnpm lint
    pnpm test
    pnpm build
    

    さらに、Issue本文には既存worktree-agent-runtime-smokeの現在のCLI契約から、次の二つの実runtime VCを固定してください。

    issue-reviewer × claude-native
    issue-reviewer × claude-gpt
    

    grepだけをVCにせず、PR readiness時の一回だけlive実行する構成が妥当です。


    推奨Allowed Paths

    scripts/check_agent_portability.py
    scripts/check_claude_codex_agent_parity.py
    tests/test_agent_parity.py
    tests/test_agent_portability_contract.py
    tests/fixtures/codex-agent-config/expected-runtime-contract.json
    .claude/agents/**
    docs/dev/agent-skill-boundaries.md
    

    旧pathを互換shimとして残さずin-place変更するなら、scripts/check_agent_portability.pyの新設は不要です。重要なのはcanonical checkerが一つだけであることです。

    明示的に変更禁止とするべきpath:

    .claude/skills/issue-refinement-loop/scripts/reviewer_transport.py
    scripts/check_subagent_launch_ledger.py
    scripts/claude-gpt/**
    scripts/agent-ops/run_worktree_agent_runtime_smoke.py
    .claude/settings*
    .codex/** の削除
    

    既存runtime harness自体に不足が見つかった場合は、#2160へ抱き合わせず停止し、既存ownerへ戻すべきです。


    セキュリティ/ハーネス判断

    このIssueで維持すべきなのは、既に存在する軽量な境界だけです。

    • proxyのloopback bind
    • credential/tokenをevidenceへ保存しない
    • process/socket cleanup
    • silent fallbackをPASS扱いしない
    • modelの自己申告をruntime proofにしない
    • runtime-smoke時のみ既存worktree isolationを使う

    一方、PR #2162ではdedicated user、root/sudo、nested sandbox、environment scrubを撤去し、特にsandboxがBash実行を破壊したことが確認されています。これらを #2160 で復活させる合理性はありません。

    Claude Codeには現在、isolation: worktreeと既存のworktree実行保護があります。必要な実機検証はそれとPR #2176のrunnerを利用し、新しいworktree強制hookを追加しないのが妥当です。(Claude)


    最終結論

    現状の #2160 は NO-GO です。

    ただし、新しいIssueへの分割は原則不要です。本文を次の範囲へreframeすれば、1 Issue / 1 PRで十分実装可能です。

    Claude agent static contract
    + 全asset classification
    + Codex legacy compatibility bridge
    + 代表agentの既存runtime smoke
    + Phase 3 inventory handoff
    

    実装対象から外すべきものは次です。

    reviewer transport semantics
    汎用runtime proof schema
    launch ledger migration
    proxy / launcher変更
    新しいhook / sandbox / worktree guard
    全agent live matrix
    

    併せて、#2153の依存目的を「#2160が汎用proof schemaを提供する」から「#2160がruntime profile語彙を確定し、continuation evidenceは#2153自身が所有する」へ修正し、#2161にはcompatibility shimとlegacy asset inventoryだけを引き渡すのが最も一貫しています。

  9. squne121 commented on Aug 24, 2026

    @squne121
    OwnerAuthor

    issue-refinement-loop 終了報告(2026-08-24)

    2026-08-24 OWNER 敵対的レビュー(reframe_in_place, https://github.com/squne121/loop-protocol/issues/2160#issuecomment-5395431927)を反映し、本 Issue 本文を全面改訂しました(body_sha256: sha256:4775e30e326f23d1eb77ba6a91b4e06c3f999064039bf3cd1ae1ca32de688b61)。

    反映した方向性

    review-issue 決定論的チェック結果

    check_issue_contract の全 deterministic checks(C1〜C13)は pass、findings は 0 件です。VC 品質面では、当初検出された以下の content-level 問題を修正済みです。

    • rg の検索対象が Allowed Paths glob エントリに厳密一致せず broad-path 誤検知 → 厳密一致する具体パスを Allowed Paths に追加して解消
    • pytest ... -k "keyword"(exit 5 hard-block)を、未作成の新規テストファイル tests/test_agent_portability_contract.py::test_name 参照(exit 4 = 正しい baseline-expect: fail パターン)へ書き換え
    • rg -n "output_schema" ... が既存コードの final_output_schema に部分マッチし baseline で unexpectedly pass → より一意な文字列 semantic_model_class へ変更

    未解消の blocker(環境起因、content-independent と判断)

    run_root_review_pipeline.py produce の baseline VC preflight は、本文改訂前後を通じて一貫して「必須検証」節の pnpm typecheck / pnpm lint / pnpm test / pnpm build の4コマンドを Regression gate command failed として報告しています。この4件は、本セッション開始時点(改訂前の本文)でも同一件数・同一メッセージで発生しており、body 内容の変更前後で不変です。本 control-plane 実行環境では pnpm バイナリが直接 PATH 解決できず(corepack pnpm --version は動作するが pnpm 単体コマンドは command not found)、これは本 Issue の本文品質とは独立したサンドボックス側の制約と判断しました。VERDICT は機械的には needs-fix のままですが、deterministic_checks は全 pass、findings は 0 件であり、内容面の reframe は完了しています。

    non-blocking advisory として scope_cvs_in_scope_mismatch(Current Validated Scope と In Scope のトークン重複度が低い旨の警告、jaccard 0.18)が出ていますが、両セクションの対象範囲が異なる(前者は経緯・依存関係、後者は実装対象)ため意図的な差であり、blocking ではありません。

    次アクション

    • 実装着手前の issue-contract-review / pnpm が実際に利用可能な環境(CI・通常の開発 worktree 等)で、上記4件の regression gate が実際に green であることを再確認してください。
    • 実装 PR の readiness 時に、AC8 の live runtime smoke(issue-reviewer × claude-native / claude-gpt)を証跡付きで一度実行してください。
    • それ以外の追加の人間判断は不要です。
  10. squne121 commented on Aug 24, 2026

    @squne121
    OwnerAuthor

    訂正・最終状態(同日追記)

    直前のコメントで「pnpm regression gate 4件が環境起因で未解消」と報告しましたが、本 control-plane 実行環境の pnpm PATH 解決を修正(corepack enable)した上で再実行したところ、この4件はすべて解消しました。加えて、issue-design-reviewer による semantic レビュー(read-only)で唯一指摘された non-blocking な用語不統一(Parent Goal Ref / Remaining Parent Gaps 節に残っていた "provider-neutral" という、2026-08-24 OWNER 再定義レビューが明示的に否定した表現)も修正しました。

    最終状態:

    • run_root_review_pipeline.py produce の deterministic review: VERDICT: approve(BLOCKERS: 0、deterministic_checks 全 pass、findings 0件)
    • reviewed_body_sha256: sha256:c1d74fbd5c8fdfb14f5906e058be1ae3faeff51043eb24bd9eff252322ed3cbf
    • issue-design-reviewer による semantic レビュー(P0-1〜P0-5、P1-1〜P1-5 の個別突き合わせ): approve(新規 runtime observation schema・launch ledger 一般化・全 agent live matrix の排除が Out of Scope/Allowed Paths 変更禁止リスト/Stop Conditions の3層で一貫していることを確認済み)
    • 非 blocking advisory: Current Validated Scope と In Scope のトークン重複度が低い旨の警告(jaccard 0.18)のみ。両セクションは対象範囲が異なる(経緯/依存 vs 実装対象)ための意図的な差であり、対応不要。

    refinement loop はこれで完了とします。次アクションは実装着手(issue-contract-review → 実装)であり、追加の人間判断は不要です。

  11. squne121 commented on Aug 24, 2026

    @squne121
    OwnerAuthor

    implement-issue: 実装完了 (2026-08-25)

    • PR: feat: agent/runtime parity contracts を claude-native/claude-gpt 共通 authority へ移行する #2334
    • Worktree: .claude/worktrees/issue-2160-agent-runtime-parity
    • Branch: worktree-issue-2160-agent-runtime-parity
    • Verification: 4/4 PASS(pnpm typecheck/lint/test/build)+ gemini model_routing 24 passed
    • AC1-AC7, AC9: 静的検証 PASS(詳細は PR 本文の検証コマンド結果を参照)
    • AC8(動作検証): 両 runtime profile(native / claude-gpt)で issue-reviewer SubAgent の実 spawn(SubagentStart/Stop・tool_invocation_id_correlated)は確認できたが、harness の厳格な transcript-file 検証ゲートは本 control-plane 実行環境(nested/sandboxed session)では通過せず、causal_evidence_source: no_evidence で FAIL となった。SKIP へは昇格させていない。詳細・reason_code・retry 手順は PR 本文の「AC8(動作検証)」節を参照。human escalation を推奨する。
    • 後続: PR レビュー(pr-review-judge)→ AC8 の human escalation 判断 → マージ → post-merge-cleanup
  12. self-assigned this
    on Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions