Skip to content

実装: docs/dev/runtime-verification-policy.md を新規作成し動作検証 AC の運用 SSOT として CLAUDE.md / project-constitution.md / body-authoring.md から参照する #84

Closed

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: none
goal_ref: "PR #81 (Issue #26 ACP transport) で AC7 動作検証が SKIP exit 0 / fallback PASS で骨抜きになった問題を受け、動作検証 AC の設計・実装・検証・PR レビュー時に参照される SSOT ポリシー文書を新規作成する"
change_kind: docs

Parent Issue

なし(単独改善)

Parent Goal Ref

Current Validated Scope

  • docs/dev/runtime-verification-policy.md を新規作成し、SKIP 規約 / 証跡フォーマット / テストシナリオ最小セット / Stop Condition 連動 / PR 証跡引用テンプレ / 責務マッピング表を含む policy 文書として整備する
  • CLAUDE.md の「詳細ルールの置き場」セクションから policy.md への参照リンクを追加する
  • .claude/rules/project-constitution.md の「## 必須検証」配下に runtime verification 規約への参照を追加する
  • .claude/skills/create-issue/references/body-authoring.md の VC 設計セクションから参照リンクを追加する

Remaining Parent Gaps

Outcome

docs/dev/runtime-verification-policy.md が新規作成され、動作検証 AC を含む Issue の設計・実装・検証・PR レビュー時に参照される SSOT として CLAUDE.md / .claude/rules/project-constitution.md / .claude/skills/create-issue/references/body-authoring.md から明示的に参照されているコミットが main ブランチに存在する状態。policy には SKIP exit code 規約 (77) / _fallback: true 判定 / 証跡保存フォーマット / テストシナリオ最小セット(正常 ≥1 + 異常 ≥1)/ Stop Condition 連動が記載されている。

In Scope

  • docs/dev/runtime-verification-policy.md 新規作成。以下のセクションを必須とする:
      1. 目的とスコープ
      1. 「動作検証 AC」の定義(静的検証との区別、メタタグ runtime-verification: true の使い方)
      1. SKIP 規約(exit code 77 / stdout 先頭 SKIP: プレフィックス / _*_fallback: true JSON フィールド)
      1. 証跡保存フォーマット(worktree/artifacts/runtime-verification-<AC>-<timestamp>.log、タイムスタンプ / 入力 / 出力 / 判定)
      1. テストシナリオ最小セット(正常系 ≥1 + 異常系 ≥1、ACP の例なら permission deny / timeout / fallback 発火)
      1. Stop Condition との連動(実行環境不可検知時のエスカレーション手順)
      1. PR 本文への証跡引用テンプレ
      1. 既存 skill / SubAgent との責務マッピング表(test-runner / pr-review-judge / implementation-worker / issue-contract-review を含む)
  • CLAUDE.md の「詳細ルールの置き場」または「最低限の確認コマンド」配下に docs/dev/runtime-verification-policy.md への参照リンク追加
  • .claude/rules/project-constitution.md の「## 必須検証」配下に runtime verification 規約への参照リンク追加
  • .claude/skills/create-issue/references/body-authoring.md の VC 設計セクションから policy.md への参照リンク追加

Out of Scope

Acceptance Criteria

  • AC1: docs/dev/runtime-verification-policy.md が存在する
  • AC2: policy.md に SKIP 規約 / 証跡フォーマット / シナリオ最小セット / Stop Condition 連動 の必須 4 トピックが含まれる
  • AC3: CLAUDE.md から docs/dev/runtime-verification-policy.md への参照リンクが存在する
  • AC4: .claude/rules/project-constitution.md から docs/dev/runtime-verification-policy.md への参照リンクが存在する
  • AC5: .claude/skills/create-issue/references/body-authoring.md から docs/dev/runtime-verification-policy.md への参照リンクが存在する
  • AC6: policy.md に「責務マッピング表」セクションが存在し test-runner / pr-review-judge / implementation-worker / issue-contract-review のいずれにも言及する

Verification Commands

# AC1: policy.md が存在する
test -f docs/dev/runtime-verification-policy.md && echo "PASS: AC1" || echo "FAIL: AC1"

# AC2: SKIP規約 / 証跡フォーマット / シナリオ最小セット / Stop Condition 連動 の 4 トピック含有
rg -in "SKIP|exit 77|証跡|artifact|シナリオ|scenario|Stop Condition" docs/dev/runtime-verification-policy.md | head -20 && echo "PASS: AC2 (hits found)" || echo "FAIL: AC2"

# AC3: CLAUDE.md から policy.md 参照リンクあり
rg -n "runtime-verification-policy" CLAUDE.md && echo "PASS: AC3" || echo "FAIL: AC3"

# AC4: project-constitution.md から policy.md 参照リンクあり
rg -n "runtime-verification-policy" .claude/rules/project-constitution.md && echo "PASS: AC4" || echo "FAIL: AC4"

# AC5: body-authoring.md から policy.md 参照リンクあり
rg -n "runtime-verification-policy" .claude/skills/create-issue/references/body-authoring.md && echo "PASS: AC5" || echo "FAIL: AC5"

# AC6: 責務マッピング表に 4 SubAgent/skill が言及されている
rg -n "test-runner|pr-review-judge|implementation-worker|issue-contract-review" docs/dev/runtime-verification-policy.md && echo "PASS: AC6" || echo "FAIL: AC6"

Allowed Paths

  • docs/dev/runtime-verification-policy.md
  • CLAUDE.md
  • .claude/rules/project-constitution.md
  • .claude/skills/create-issue/references/body-authoring.md

Stop Conditions

  • Allowed Paths 外の変更が必要と判明した場合
  • In Scope の固定契約(必須セクション構成・参照リンク先)の破壊的変更が必要になった場合
  • 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
  • 後続 Phase / 別スコープへの波及が判明した場合
  • nested SubAgent delegation が必要になった場合
  • 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合

Required Skills

  • Markdown
  • LOOP_PROTOCOL workflow / SSOT 階層理解

Scope Delta(任意)

N/A

Background

PR #81(Issue #26 ACP transport 実装)にて、AC7「動作検証」が SKIP exit 0 および fallback PASS で骨抜きになっている点を人間レビュアーが指摘した(https://github.com/squne121/loop-protocol/pull/81#issuecomment-4492932662)。

このような問題を再発させないために、動作検証 AC を含む Issue の設計・実装・PR レビュー時に参照される SSOT として docs/dev/runtime-verification-policy.md を整備する。

policy.md は #77(実動作検証 AC 必須化横断改善)および #83(SubAgent SKIP 検知責務実装)が参照する上流 SSOT として先行整備される。

Delivery Rule

  • 1 Issue = 1 PR
  • Draft PR 既定
  • worktree: 任意

Notes for Reviewer

Activity

  1. added
    enhancement
    phase/implementation
    state/queued
    agent/implementer
    on May 19, 2026
  2. squne121 commented on May 19, 2026

    @squne121
    OwnerAuthor

    Contract Snapshot (2026-05-19T23:34:18Z)

    • Status: go (CONTRACT_REVIEW_RESULT_V1)
    • Outcome: docs/dev/runtime-verification-policy.md 新規作成 + CLAUDE.md / project-constitution.md / body-authoring.md からの参照リンク追加
    • Acceptance Criteria: AC1〜AC6(policy.md 存在 / 必須トピック / 3 文書からの参照 / 責務マッピング表)
    • Allowed Paths:
      • docs/dev/runtime-verification-policy.md
      • CLAUDE.md
      • .claude/rules/project-constitution.md
      • .claude/skills/create-issue/references/body-authoring.md
    • Worktree: .claude/worktrees/issue-84-runtime-verification-policy
    • Branch: worktree-issue-84-runtime-verification-policy
    • VC preflight: baseline fail = 6, 想定外 pass = 0, 実行不可 = 0

    Checks

    項目 結果
    template_compliance (13 sections) pass
    state_label (state/queued) pass
    allowed_paths_present pass
    vc_present pass
    stop_conditions_complete (6 items) pass
    vc_preflight (baseline 全 fail) pass
    ac_verifiability (AC1〜AC6 ⇔ VC1〜VC6 一致) pass
    worktree_branch_collision clear

    次アクション

    impl-review-loop 起動可能。

  3. squne121 commented on May 19, 2026

    @squne121
    OwnerAuthor

    implement-issue: 実装完了 (2026-05-19T23:40:02Z)

    • PR: docs: add runtime-verification-policy.md as SSOT for runtime AC ops (#84) #90
    • Worktree: .claude/worktrees/issue-84-runtime-verification-policy
    • Branch: worktree-issue-84-runtime-verification-policy
    • Verification: typecheck PASS / test 25/25 PASS / build PASS / pytest 21/21 PASS / lint 環境依存(worktree 複数存在時の tsconfigRootDir 競合。CI では pass 確認済み)
    • 後続: PR レビュー(pr-review-judge)→ マージ → post-merge-cleanup
  4. squne121 commented on May 19, 2026

    @squne121
    OwnerAuthor

    impl-review-loop: 完了

    • iteration: 1
    • LOOP_VERDICT: APPROVE
    • termination_reason: approved

    Pipeline Result

    Step SubAgent 結果
    0 contract-review issue-contract-review go (baseline 6 AC fail / state/queued / clear)
    1 implementation implementation-worker ok — Draft PR #90 起票、4 ファイル変更、Allowed Paths compliant
    2 verification test-runner PASS — AC1〜AC6 全 pass / baseline 5 種全 pass / MERGEABLE+CLEAN
    4 pr-review pr-reviewer APPROVE — self-authored につき --comment で verdict 記録

    PR

    次アクション(人間判断)

  5. added 2 commits that reference this issue on May 20, 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/implementationstate/queued

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions