Skip to content

実装: research(agent-observation): capture capability matrix と hook coexistence を authoritative evidence で確定する #1221

Closed

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: "#1153"
goal_ref: "Claude Code / Codex CLI / Google Antigravity の capture capability、hook coexistence、negative control、unsupported / unverified verdict を synthetic evidence で確定し、Child C0/C1 が依存できる adoption matrix を作る"
change_kind: mixed
evidence_mode: synthetic_only
real_runtime_evidence: blocked_until_pilot_exception_approve_timeboxed_real_pilot

Parent Issue

#1153

Parent Goal Ref

  • Goal: Claude Code / Codex CLI / Google Antigravity の運用データを public-safe な agent_run_report/v1 / agent_retro_index/v1 に正規化し、ChatGPT が GitHub 経由で再現可能なレトロスペクティブを行える pilot 運用を確立する
  • Desired Destination: vendor docs だけに依存せず、各 agent surface の capture capability verdict と hook coexistence を synthetic evidence と negative control で固定した adoption matrix を残す

Current Validated Scope

  • docs/dev/agent-observation-capability.md に Claude / Codex / Antigravity の agent_observation_capability/v1 capability matrix(closed enum verdict と supported の成立述語、checked surface 列挙、admission contract)を追加する
  • docs/dev/session-recording-policy.md と docs/dev/agent-run-report.md に hook coexistence / canonical gate(post-run verifier)/ async hook を gate にしない境界の位置づけを追記する
  • .codex/hooks.json と validator の drift、[features].hooks canonical key と codex_hooks legacy alias、Antigravity の browser / artifacts を capture supported と同一視しない evidence contract を matrix へ projection する
  • runtime safety checker と fixture/test を拡張し、duplicate upload / duplicate finalization / async false-green / hook-exit-zero-without-artifact / codex validator drift の negative control と JSON postcondition assertion を追加する

Remaining Parent Gaps

  • Child C0 で observation source / provenance / safety verdict の schema admission を追加する
  • Child C1 で adapter を実装し public-safe report に接続する
  • Child D で GitHub marker 境界を実装する
  • Child E で Cloud pilot decision を記録する

Evidence Mode 分離(#1221 の前提)

本 Issue は parent #1153 の Child B(capture capability verdict の確定)であり、Child C0/C1 の入力契約を作る。成果物は文章の matrix ではなく closed enum + evidence mode + provenance + negative fixture + JSON postcondition assertion まで揃える。

  • synthetic evidence mode: synthetic fixture / read-only host inventory のみを根拠に capability verdict を確定する。本 Issue で許可されるのはこの mode のみ。
  • real runtime evidence mode: real prompt / real trace export / real Latitude upload を伴う評価。実装: decision(latitude): credential を保持した real pilot 例外を承認/却下し、time-boxed activation gate を定義する #1220 の LATITUDE_PILOT_EXCEPTION_V1 が approve_timeboxed_real_pilot かつ activation fields / distribution digest / remote cleanup / argv exposure が machine-verified になるまで実行しない。本 Issue では Stop Condition として扱う。
  • activation gate の正本は Stop hook ではなく check_session_recording_runtime_safety.py --json --execution-profile host の pre-session host verifier JSON である。現行既定は approve_synthetic_only / pilot_activation_state: blocked_until_activation であり、real capture 証跡は要求しない。

Outcome

docs/dev/agent-observation-capability.md に agent_observation_capability/v1 の machine-readable matrix が追加され、3 surface(Claude Code / Codex CLI / Antigravity)が supported | partial | unsupported | unverified の closed enum を 1 つだけ持ち、supported は runtime_event_observed == true かつ capture_artifact_observed == true かつ raw_values_emitted == false のときだけ成立する状態。負の制御として duplicate upload / duplicate finalization / async false-green / hook-exit-zero-without-artifact / codex validator drift の fixture が fail し、unsupported / unverified が Child C0/C1 の input availability として参照できる状態。

In Scope

  • Claude Code の user / project / local / managed policy / plugin / skill / agent frontmatter hook surface の棚卸し(checked surface を matrix に列挙する)
  • Latitude async Stop hook と既存 coordinator hook の共存検証。共存 PASS 条件は以下の closed contract を満たすこととする:
hook_coexistence_pass_requires:
  expected_handlers_fired_once: true
  duplicate_finalization_absent: true
  duplicate_upload_absent: true
  async_hook_not_used_as_gate: true
  post_run_verifier_observed_final_state: true
  runtime_event_and_capture_artifact_correlated: true
  hook_exit_zero_not_authoritative: true
  raw_values_emitted: false
  • Codex CLI の canonical feature key を [features].hooks とし、codex_hooks は legacy alias としてのみ扱う。.codex/hooks.json の現行 shape と scripts/session-recording/validate-codex-hooks.mjs の期待 shape の drift を fixture で検出し、drift がある間は Codex を supported にしない
  • Antigravity で MCP 接続 / IDE 起動 / Artifacts 生成 / browser recording を capture supported と同一視しない evidence contract(capture artifact と runtime event の両方が確認できない限り unverified 固定)
  • supported | partial | unsupported | unverified の closed verdict 定義と supported の成立述語
  • duplicate hook execution / duplicate report finalization / async false-green / hook-exit-zero-without-artifact / codex validator drift / unsupported misclassification の negative fixture
  • 全 evidence artifact に対する public-safe admission contract:
public_safety:
  raw_values_emitted: false
  forbidden_field_scan: pass
  prompt_excerpt_present: false
  tool_io_excerpt_present: false
  local_absolute_path_present: false
  credential_value_present: false
  digest_is_over_public_projection_only: true
  • pnpm run security:session-recording:fixture の JSON postcondition assertion(pilot_activation_state / pilot_exception.decision / components.latitude.verdict / components.latitude.raw_values_emitted / inspection_complete)を test で検証する

Out of Scope

  • real Latitude trace upload
  • real prompt / real trace export を伴う production Cloud pilot
  • adapter 実装(Child C1)
  • schema migration(Child C0)
  • self-host 構築
  • docs/dev/secret-policy.md の decision / digest 境界の変更(distribution evidence は matrix への projection のみ)
  • .codex/hooks.json / scripts/session-recording/validate-codex-hooks.mjs の shape 変更

Acceptance Criteria

  • AC1: docs/dev/agent-observation-capability.md に agent_observation_capability/v1 の machine-readable block と Claude / Codex / Antigravity の matrix が存在する
  • AC2: 各 surface に supported | partial | unsupported | unverified のいずれか 1 つだけが設定される
  • AC3: supported は runtime_event_observed == true かつ capture_artifact_observed == true かつ raw_values_emitted == false のときだけ成立する(fixture で述語が強制される)
  • AC4: Claude Code は user / project / local / managed policy / plugin / skill / agent frontmatter hook を checked surface に含め、async hook を gate にせず post-run verifier を canonical gate とする(hook_coexistence_pass_requires を満たす)
  • AC5: Codex CLI は [features].hooks を canonical feature key、codex_hooks を legacy alias として記録し、.codex/hooks.json と validator の drift がある間は supported にしない
  • AC6: Antigravity は capture artifact と runtime event の両方が確認できない限り supported にせず unverified 固定とする
  • AC7: unsupported と unverified は失敗ではなく、Child C0/C1 の input availability として扱う
  • AC8: duplicate upload / duplicate finalization / async false-green / hook-exit-zero-without-artifact / codex validator drift の negative fixture が fail する
  • AC9: 全 evidence artifact に対し public_safety admission(raw_values_emitted == false を含む)が成立し、security:session-recording:fixture の JSON postcondition が assert される

Verification Commands

VC は VC preflight allowlist(pnpm typecheck / pnpm lint / pnpm test / pnpm build / test -f 等)内のコマンドのみで構成する。security:session-recording:fixture の JSON postcondition / negative fixture / matrix 検証は Allowed Paths 内の tests/session_recording_runtime_safety.test.ts(vitest が .claude/scripts/check_session_recording_runtime_safety.py を子プロセス起動して assert する)に集約し、pnpm test で実行する。

# AC1
# baseline-expect: fail
$ test -f docs/dev/agent-observation-capability.md
# AC1
$ pnpm typecheck
# AC2
$ pnpm lint
# AC3
# AC4
# AC5
# AC6
# AC7
# AC8
# AC9
$ pnpm test
# AC1
$ pnpm build

Allowed Paths

  • docs/dev/agent-observation-capability.md
  • docs/dev/session-recording-policy.md
  • docs/dev/agent-run-report.md
  • .claude/scripts/check_session_recording_runtime_safety.py
  • .claude/scripts/lib/latitude_telemetry_safety.py
  • tests/session_recording_runtime_safety.test.ts
  • tests/fixtures/session-recording-runtime-safety/**
  • package.json

Stop Conditions

  • Allowed Paths 外の変更が必要と判明した場合(特に docs/dev/secret-policy.md / .codex/hooks.json / scripts/session-recording/validate-codex-hooks.mjs / tests/session_recording/codex/**)
  • In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
  • real runtime evidence mode が必要になった場合(実装: decision(latitude): credential を保持した real pilot 例外を承認/却下し、time-boxed activation gate を定義する #1220 の LATITUDE_PILOT_EXCEPTION_V1 が approve_timeboxed_real_pilot へ変わるまで実走しない)
  • Codex hook validator を pnpm test 常設 gate に組み込むために scripts/ / vitest 構成変更が必要になった場合(follow-up Issue を提案する)
  • 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
  • 後続 Phase / 別スコープへの波及が判明した場合
  • nested SubAgent delegation が必要になった場合
  • 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
  • raw transcript / tool I/O / full prompt / local absolute path / credential value を evidence に含める必要が出た場合

Required Skills

  • Claude Code hook configuration
  • Codex CLI hook semantics
  • evidence-driven test design
  • fail-closed capability classification

Scope Delta(任意)

N/A

Runtime Verification Applicability

decision: not_applicable
rationale: synthetic fixture / read-only host inventory の synthetic evidence で capability verdict を固定する。security:session-recording:host は secret 非出力で expected blocked/deny を返す pre-session diagnostic として記録し、CI failure として扱わない。real cloud telemetry の実走は要求しない

Delivery Rule

  • 1 Issue = 1 PR
  • Draft PR を既定とする
  • unsupported / unverified verdict を failure 扱いしない
  • 追加した negative fixture は、修正前に fail し、修正後も unsafe state を supported に昇格させないことを確認する

Activity

  1. added
    phase/implementation
    agent/implementer
    enhancement
    workflow
    process
    on Jun 28, 2026
  2. squne121 commented on Jun 28, 2026

    @squne121
    OwnerAuthor

    判定

    REQUEST_CHANGES。#1221 は方向性は正しいが、このまま実装すると false green を作る危険が高いです。
    特に危険なのは、capture capability matrix を docs-only 成果物として作ってしまい、実 runtime evidence、fixture negative control、public-safe artifact admission の境界が曖昧なまま Child C0/C1 の入力に昇格する点です。#1221 自体は「matrix 追加」「policy/report doc 更新」「duplicate upload / duplicate finalization / async false-green の negative control 追加」を掲げていますが、Issue コメントは空で、まだレビューによる補正が入っていません。

    良い点

    #1221 が supported | partial | unsupported | unverified を closed verdict とし、Antigravity の MCP 接続成功を capture supported と同一視しない方針にしている点は妥当です。Parent #1153 も、Latitude MCP と session telemetry capture は別 concern、Latitude 欠落は agent run 成功で隠さず availability: unavailable として残す、GitHub へ永続化するのは public-safe report/index で raw trace ではない、と明記しています。

    また、A0/A1 の前提整理は進んでいます。#1157 は Latitude credential / preload / export / local payload / active process / uninstall state を Secret Inventory / Kill Switch へ fail-closed 接続する Child A0 で、#1220 は real pilot 例外を reject_and_uninstall | approve_synthetic_only | approve_timeboxed_real_pilot | defer の decision enum に閉じる Child A1 です。

    Blocker 1: 現在の既定は synthetic-only であり、real capture 証跡を要求すると矛盾する

    PR #1226 は #1220 を実装済みですが、既定 decision は approve_synthetic_only、real pilot は blocked_until_activation のままです。activation gate の正本は Stop hook ではなく check_session_recording_runtime_safety.py --json --execution-profile host の pre-session host verifier です。

    docs/dev/session-recording-policy.md でも、approve_synthetic_only は synthetic fixture / policy validation のみ許可し、real prompt / real trace export / real Cloud pilot は禁止しています。さらに、Child B、つまり #1221 の real pilot 評価は A1 が approve_timeboxed_real_pilot のときだけ許可される、と明記されています。

    修正: #1221 の AC を synthetic evidence mode と real runtime evidence mode に分けてください。現時点で許可できるのは synthetic fixture / read-only host inventory までです。real trace arrival や real Latitude upload を実施するなら、#1220 の decision が approve_timeboxed_real_pilot へ変わり、activation fields / distribution digest / remote cleanup / argv exposure が全て machine-verified であることを前提にする必要があります。

    Blocker 2: Hook coexistence を「hook が動いた」で PASS にしてはいけない

    Claude Code 公式 docs は hook location として user、project、local、managed policy、plugin、skill / agent frontmatter を挙げています。async: true は background 実行であり、if filter は best-effort かつ fail-open です。したがって、Latitude の async Stop hook と repo の coordinator hook が両方起動しただけでは、coexistence の安全性は証明できません。([Claude]1) ([Claude]1)

    repo 側も同じ方針です。docs/dev/agent-run-report.md は hook を diagnostic/prevention layer とし、canonical gate は post-run verifier だと明記しています。docs/dev/session-recording-policy.md でも、activation gate の正本は Stop hook ではなく pre-session host verifier JSON です。

    修正: coexistence PASS 条件を最低限こうしてください。

    hook_coexistence_pass_requires:
      expected_handlers_fired_once: true
      duplicate_finalization_absent: true
      duplicate_upload_absent: true
      async_hook_not_used_as_gate: true
      post_run_verifier_observed_final_state: true
      runtime_event_and_capture_artifact_correlated: true
      hook_exit_zero_not_authoritative: true
      raw_values_emitted: false

    Blocker 3: Codex hook validator が現行 .codex/hooks.json とズレている

    現行 .codex/hooks.json の PreToolUse は Bash matcher に 5 hooks、patch/write matcher に 3 hooks を持っています。

    一方、scripts/session-recording/validate-codex-hooks.mjs は Bash matcher に exactly 3 hooks、patch/write matcher に exactly 2 hooks を期待しています。つまり、現行設定を validator に通すと失敗する可能性が高いです。

    さらに、その validator を実行する tests/session_recording/codex/test_hook_adapter.py は存在しますが、package.json の pnpm test は vitest run だけで、pytest は通常テストに含まれていません。

    修正: #1221 で Codex の capability / trust state を扱う前に、次のどちらかを必須化してください。

    uv run pytest tests/session_recording/codex/test_hook_adapter.py

    または、Codex hook validator を Vitest 側へ移して pnpm test に確実に入れる。現状のまま pnpm test を AC3 に置くと、Codex hook config drift を見逃します。

    Blocker 4: security:session-recording:fixture の exit 0 は real activation の証明ではない

    #1220 の deterministic fixture gate は verdict: safe でも pilot_activation_state: blocked_until_activation を期待しています。つまり、fixture gate の成功は「synthetic-only policy として安全」なだけで、real telemetry の許可や capture supported の証明ではありません。

    修正: #1221 の verification command は exit code だけでなく JSON postcondition を assert してください。最低限、pilot_activation_state, components.latitude.verdict, components.latitude.raw_values_emitted, pilot_exception.decision, inspection_complete を読む必要があります。pnpm security:session-recording:fixture を単に PASS と見るのは false-green です。

    Blocker 5: Latitude distribution evidence が Issue #1221 の Allowed Paths と衝突しやすい

    Latitude 公式 docs は npx -y @latitude-data/claude-code-telemetry install と unversioned command を案内し、manual configuration でも Stop hook に npx -y @latitude-data/claude-code-telemetry、async: true を設定する例を示しています。さらに受信内容は prompts、responses、tool input/output、system context を含む full-fidelity telemetry と説明されています。([Latitude Docs]2)

    repo 側の checker はこれを受けて、exact semver でない Latitude package spec を unpinned 扱いにし、latest、range、caret、tilde、x-range を reject します。

    問題: #1221 の Allowed Paths には docs/dev/secret-policy.md がありません。package exact version、npm integrity、tarball sha256、preload digest、hook command digest、activation decision 参照を正しく追記しようとすると、Allowed Paths 外変更になりやすいです。これは Stop Condition 直行です。

    修正: #1221 は distribution evidence を docs/dev/agent-observation-capability.md に projection として持つだけにし、secret-policy.md の decision / digest 境界を変更する必要が出たら別 Issue に分割してください。

    Blocker 6: Antigravity は初期値 unverified 固定でよい

    公開情報上、Antigravity は editor / terminal / browser へ agent が直接アクセスし、task list、plan、screenshot、browser recording などの Artifacts を生成する agent-first IDE として説明されています。ただし、これらは session telemetry capture contract そのものではありません。([The Verge]3)

    Antigravity は #1221 の AC6 通り、capture artifact と runtime event の両方が確認できない限り supported にしてはいけません。MCP 接続、IDE 起動、Artifacts 生成、スクリーンショット生成は capture supported の代替証拠ではありません。これは parent #1153 の「Antigravity で MCP 接続だけを根拠に capture supported と判定するな」という Stop Condition と一致します。

    Blocker 7: raw_values_emitted: false だけでは弱い

    repo policy は GitHub comment surface で raw transcript、local absolute path、secret value、full command output、full prompt を forbidden content としています。agent_run_report の Stop Condition も raw transcript、full command output、stdout、stderr、local_path 等の scan を要求しています。

    修正: evidence artifact の admission は raw_values_emitted: false だけでなく、以下を required にしてください。

    public_safety:
      raw_values_emitted: false
      forbidden_field_scan: pass
      prompt_excerpt_present: false
      tool_io_excerpt_present: false
      local_absolute_path_present: false
      credential_value_present: false
      digest_is_over_public_projection_only: true

    #1221 に追加すべき negative fixtures

    最低限、次を足してください。

    tests/fixtures/session-recording-runtime-safety/
      claude-duplicate-stop-user-project/
      claude-async-latitude-stop-finishes-after-finalizer/
      claude-hook-exit-zero-without-trace-artifact/
      codex-current-hooks-validator-drift/
      codex-legacy-codex_hooks-only/
      codex-untrusted-project-layer/
      antigravity-mcp-connected-no-capture-artifact/
      capability-supported-with-runtime-event-missing/
      capability-supported-with-capture-artifact-missing/
      evidence-raw-values-emitted-true/
      latitude-floating-npx-package/
      latitude-provenance-unknown/
    

    特に codex-current-hooks-validator-drift は優先度が高いです。現行 .codex/hooks.json と validator の期待がずれているため、この fixture が fail しない限り Codex 側の “authoritative evidence” は信用できません。

    修正後の Issue #1221 実装プロンプト

    https://github.com/squne121/loop-protocol/issues/1221 を実装してください。
    
    ただし、実装前に以下の敵対的レビューを前提条件として反映してください。
    
    1. 現在の #1220 / PR #1226 の既定は `approve_synthetic_only` であり、real telemetry / real Latitude pilot / real trace export は許可されていない。#1221 では synthetic fixture / read-only host inventory の範囲で capability matrix を作る。real runtime evidence が必要な場合は Stop Condition とし、#1220 の `LATITUDE_PILOT_EXCEPTION_V1` が `approve_timeboxed_real_pilot` へ変更されるまで実走しない。
    
    2. `docs/dev/agent-observation-capability.md` には `agent_observation_capability/v1` の machine-readable block を追加する。各 surface は `supported | partial | unsupported | unverified` の closed enum を 1 つだけ持つ。ただし `supported` は `runtime_event_observed === true` かつ `capture_artifact_observed === true` かつ `raw_values_emitted === false` のときだけ許可する。
    
    3. Claude Code hook coexistence は hook presence / exit 0 / async hook completion では PASS にしない。user / project / local / managed policy / plugin / skill / agent frontmatter を checked surface に含め、duplicate execution、duplicate finalization、async false-green、hook exit 0 without artifact を negative fixture で fail させる。
    
    4. Codex CLI は `[features].hooks` を canonical feature key とし、`codex_hooks` は legacy alias としてのみ扱う。`.codex/hooks.json` の現行構造と `scripts/session-recording/validate-codex-hooks.mjs` の期待 shape が drift していないか検証し、drift がある場合は本 Issue 内で supported にしない。pytest 側の `tests/session_recording/codex/test_hook_adapter.py` が通常 gate に入っていない問題を解消するか、Stop Condition として follow-up を起票する。
    
    5. Antigravity は MCP 接続、IDE 起動、Artifacts 生成、browser recording だけでは capture supported にしない。capture artifact と runtime event の両方を確認できない場合は `unverified` のままにする。
    
    6. `raw_values_emitted: false` は全 evidence artifact に必須。加えて raw transcript、full prompt、tool I/O、stdout/stderr、local absolute path、credential value が artifact に含まれないことを fixture / scanner で検証する。
    
    7. `pnpm security:session-recording:fixture` の exit 0 だけを PASS にしない。JSON の `pilot_activation_state`, `pilot_exception.decision`, `components.latitude.verdict`, `inspection_complete`, `raw_values_emitted` を assert する。
    
    8. Allowed Paths 外、特に `docs/dev/secret-policy.md`, `.codex/hooks.json`, `scripts/session-recording/validate-codex-hooks.mjs`, `tests/session_recording/codex/**` の変更が必要になった場合は Stop Condition とし、スコープ拡張または follow-up Issue を提案する。
    
    実装後は以下を確認してください。
    
    - pnpm typecheck
    - pnpm lint
    - pnpm test
    - pnpm run security:session-recording:fixture
    - pnpm run security:session-recording:host は secret 非出力で expected blocked/deny を返すことを確認する。host の失敗を CI failure として扱わず、pre-session diagnostic として記録する。
    - 追加した negative fixture が、修正前に fail し、修正後も unsafe state を supported に昇格しないことを確認する。

    最終コメント

    #1221 は「調査 Issue」ではなく、後続 Child C0/C1 の入力契約を作る Issue です。したがって、成果物は文章の matrix では足りません。closed enum + evidence mode + provenance + negative fixture + JSON postcondition assertion まで揃えて、unsupported / unverified を正常な入力 availability として固定するべきです。

  3. squne121 commented on Jun 28, 2026

    @squne121
    OwnerAuthor

    Contract Snapshot — issue-contract-review

    実装着手直前 preflight を run_contract_review_once.py --mode execute で実行した。全 checks pass。

    checks

    check result
    readiness go
    blockers pass
    product_spec pass
    vc_preflight pass

    VC preflight 集約

    AC command exit classification scope_class decision
    AC1 test -f docs/dev/agent-observation-capability.md 1 expected_fail (file_not_found_expected) baseline_fail_expected go
    AC1 pnpm typecheck 0 expected_pass regression_gate go
    AC2 pnpm lint 0 expected_pass regression_gate go
    AC3–AC9 pnpm test 0 expected_pass regression_gate go
    AC1 pnpm build 0 expected_pass regression_gate go
    • test -f は新規 Allowed Path ファイル(未作成)に対する # baseline-expect: fail 注釈付き baseline fail で go。
    • pnpm gates は regression_gate(実装後も緑維持)として go。負の制御・matrix 検証・JSON postcondition は Allowed Paths 内の tests/session_recording_runtime_safety.test.ts(vitest が .claude/scripts/check_session_recording_runtime_safety.py を子プロセス起動して assert)へ集約し pnpm test で実行する。

    contract_snapshot

    • Outcome / Acceptance Criteria / Verification Commands / Allowed Paths は Issue 本文(最新 body)を正本とする。
    • Worktree / Branch: 実装時に preflight で確定する(本 snapshot では未作成)。
    • body_sha256: sha256:41c4e57d639f481a0591c57adc7a00e586da33e6ab64b5801de3b840a26574ab
    CONTRACT_REVIEW_RESULT_V1:
      status: go
      generated_by: issue-contract-review
      issue_url: https://github.com/squne121/loop-protocol/issues/1221
      generated_at: 2026-06-28T07:26:45Z
      mode: execute
      source: all_checks_pass
      body_sha256: sha256:41c4e57d639f481a0591c57adc7a00e586da33e6ab64b5801de3b840a26574ab
      checks:
        template_compliance: pass
        state_label: pass
        allowed_paths_present: pass
        vc_present: pass
        stop_conditions_complete: pass
        vc_preflight: pass
        ac_verifiability: pass
        product_spec_check: pass
        worktree_branch_collision: pass
        next_action: handoff_to_implement_issue
        blocked_reasons: []
      vc_preflight:
        status: pass
        classifications:
          - ac: AC1
            command: test -f docs/dev/agent-observation-capability.md
            exit_code: 1
            classification: expected_fail
            category: file_not_found_expected
            scope_class: baseline_fail_expected
            decision: go
          - ac: AC1
            command: pnpm typecheck
            exit_code: 0
            classification: expected_pass
            scope_class: regression_gate
            decision: go
          - ac: AC2
            command: pnpm lint
            exit_code: 0
            classification: expected_pass
            scope_class: regression_gate
            decision: go
          - ac: AC3-AC9
            command: pnpm test
            exit_code: 0
            classification: expected_pass
            scope_class: regression_gate
            decision: go
          - ac: AC1
            command: pnpm build
            exit_code: 0
            classification: expected_pass
            scope_class: regression_gate
            decision: go
  4. squne121 commented on Jun 28, 2026

    @squne121
    OwnerAuthor

    Refinement Loop: Approved

    The issue has been approved and is ready for implementation.

    反映した anchor review(#issuecomment-4825185295)の補正

    Blocker 反映内容
    1: synthetic/real evidence mode evidence_mode: synthetic_only を contract に追加し、real runtime evidence は #1220 LATITUDE_PILOT_EXCEPTION_V1 が approve_timeboxed_real_pilot になるまで Stop Condition 化。activation gate 正本を host verifier JSON と明記
    2: hook coexistence hook_coexistence_pass_requires closed contract(async 非gate / post-run verifier canonical / duplicate 不在 / hook exit0 非authoritative)を In Scope と AC4 に明記
    3: Codex validator drift [features].hooks canonical / codex_hooks legacy alias。.codex/hooks.json(Bash5/patch3) と validator 期待(Bash3/patch2) の drift を fixture で検出し、drift 中は Codex を supported にしない(AC5)
    4: fixture exit0 ≠ activation JSON postcondition(pilot_activation_state / pilot_exception.decision / components.latitude.verdict / inspection_complete / raw_values_emitted)を AC9 で要求
    5: distribution evidence の境界 secret-policy.md / .codex/hooks.json / validator は Allowed Paths 外に保ち Stop Condition 化。distribution evidence は matrix への projection のみ
    6: Antigravity 既定 capture artifact と runtime event の両方が確認できない限り unverified 固定(AC6)
    7: public-safe admission public_safety 拡張契約(forbidden_field_scan / prompt・tool_io・local_path・credential 不在 / digest は public projection のみ)を In Scope と AC9 に明記

    VC 修正

    • 非allowlist コマンド(pnpm security:session-recording:* / pnpm entirecli:check / codex --version / entire version)を allowlist 内(test -f / pnpm typecheck / pnpm lint / pnpm test / pnpm build)へ置換。
    • grouped AC marker(LP016 違反)を bare # AC<N> marker へ修正。新規ファイル検査に # baseline-expect: fail 注釈を付与。

    収束

    • iteration 1: needs-fix(VC command allowlist 6件 + grouped marker)→ deterministic_fail_confirmed → rewrite
    • iteration 2: needs-fix(VCP_MISSING_BASELINE_EXP 1件)→ deterministic_fail_confirmed → rewrite
    • 最終 review: approve(C1–C11 pass / blocking 0 / non-blocking 0)
    • contract-review(execute mode): go(readiness go / vc_preflight pass)→ Contract Snapshot
    LOOP_HANDOFF_RESULT_V1:
      status: impl_ready
      routing_action: run_impl_review_loop
      contract_review:
        status: go
        gate_result: fresh_go
        latest_comment_url: https://github.com/squne121/loop-protocol/issues/1221#issuecomment-4825245759
        generated_at: 2026-06-28T07:26:45Z
        body_sha256: sha256:41c4e57d639f481a0591c57adc7a00e586da33e6ab64b5801de3b840a26574ab
      metadata:
        title_prefix_ready: true
        phase_label_ready: true
      auto_fixes:
        result: auto_fixed
        required: []
        skipped: []
      blockers: []
      permissions:
        unavailable: []
      generated_at: 2026-06-28T07:27:00Z
      checked_body_sha256: sha256:41c4e57d639f481a0591c57adc7a00e586da33e6ab64b5801de3b840a26574ab
      checker_exit_code: 0
      missing_sections: []
      missing_contract_keys: []
  5. added 3 commits that reference this issue on Jun 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/implementerenhancementphase/implementationprocessworkflow

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions