Skip to content

実装: issue-refinement-loop がコメントフィードバックの AC/VC 修正案を Issue 本文に反映していることを確認するチェックを追加 #252

Closed

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: none
goal_ref: "issue-refinement-loop がコメント内 AC/VC 修正案を Issue 本文に反映したか確認するステップを追加し、contract 不整合を防止する"
change_kind: workflow

Parent Issue

なし(単独改善)

Parent Goal Ref

  • Goal: issue-refinement-loop 完了後の Issue 本文 AC/VC が、anchor_comment に記載された修正案と整合していることを保証する
  • Desired Destination: N/A(単独改善 Issue のため)

Current Validated Scope

  • .claude/skills/issue-refinement-loop/SKILL.md の Step 4 または Step 5 に、コメント内 AC/VC 修正案と Issue 本文 AC/VC の整合確認ステップを追記する

Remaining Parent Gaps

なし(単独改善 Issue のため)

Background

PR #240 の実装中、Issue #83 のコメント(squne121 による B4 セクション)に以下の AC 修正案が記述されていた:

  • 修正案: AC1 の exit 条件を「exit 77 → SKIP として報告」に変更する

しかし issue-refinement-loop 完了後の Issue #83 本文 AC1 は旧記述「exit 77 → FAIL または human_review_required」のままであった。この不整合が PR #240 の iteration 0 における BLOCKER-2「VC が SKIP exit 77 を要求しているのに AC1 は FAIL を要求」の根本原因となった。

根本原因: issue-refinement-loop の feedback_update_required 分類フローにおいて、issue-author SubAgent(Step 4)が anchor_comment_feedback の AC/VC 修正内容を Issue 本文に反映した後、その反映が実際に行われたかを確認するステップが存在しない。

修正方針: Step 4 完了後または Step 5 の終了処理において、feedback_update_required / reframe_in_place 分類時に「anchor_comment_feedback に含まれた AC/VC 修正案が Issue 本文に反映されているか」を決定論的に確認するチェックステップを追加する。このチェックは workaround(運用注意事項追加)ではなく、ループ内の決定論的確認として実装する。

Outcome

.claude/skills/issue-refinement-loop/SKILL.md に「Step 4 完了後の AC/VC 反映確認ステップ」が追記され、feedback_update_required / reframe_in_place 分類時に anchor_comment_feedback の AC/VC 修正案が Issue 本文に反映されたかを決定論的に確認できる状態になっている。

In Scope

  • .claude/skills/issue-refinement-loop/SKILL.md に AC/VC 反映確認ステップを追加する(Step 4 完了後または Step 5 の前処理として)
  • 確認ステップは feedback_update_required / reframe_in_place の final_classification 時のみ発火する条件にする
  • 確認が失敗した(未反映の AC/VC 修正案が残存した)場合は termination_reason: human_escalation とする
  • ## Verification Commands に対応する VC を追加する

Out of Scope

Acceptance Criteria

  • AC1: .claude/skills/issue-refinement-loop/SKILL.md に「Step 4 完了後の AC/VC 反映確認」セクションまたは手順が追記されている
  • AC2: 確認ステップが final_classification == feedback_update_required または reframe_in_place を条件として発火することが手順に明記されている
  • AC3: 確認が失敗した場合に termination_reason: human_escalation とすることが手順に明記されている
  • AC4: 追加した確認ステップに対応する VC コマンドが ## Verification Commands に記載されている

Verification Commands

# AC1: AC/VC 反映確認ステップが SKILL.md に存在すること
rg -n "AC.*VC.*反映確認|反映確認.*AC.*VC|anchor_comment_feedback.*反映.*確認|confirmation.*ac_vc" \
  .claude/skills/issue-refinement-loop/SKILL.md \
  && echo "PASS: AC1" || echo "FAIL: AC1"

# AC2: final_classification 条件付き発火の記述があること
rg -n "final_classification.*(feedback_update_required|reframe_in_place).*反映|feedback_update_required.*AC.*VC" \
  .claude/skills/issue-refinement-loop/SKILL.md \
  && echo "PASS: AC2" || echo "FAIL: AC2"

# AC3: 確認失敗時の human_escalation 記述があること
rg -nA 5 "AC.*VC.*反映確認|anchor_comment_feedback.*確認" \
  .claude/skills/issue-refinement-loop/SKILL.md \
  | rg "human_escalation" \
  && echo "PASS: AC3" || echo "FAIL: AC3"

# AC4: VC に対応する rg コマンドが追記されていること
rg -c "# AC[0-9]" .claude/skills/issue-refinement-loop/SKILL.md \
  && echo "PASS: AC4 (VC markers present)" || echo "FAIL: AC4"

# 全体品質チェック
pnpm typecheck && pnpm lint && pnpm test && pnpm build && echo "PASS: quality gate" || echo "FAIL: quality gate"

Allowed Paths

  • .claude/skills/issue-refinement-loop/SKILL.md

Stop Conditions

  • Allowed Paths 外の変更が必要と判明した場合
  • In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
  • 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
  • 後続 Phase / 別スコープへの波及が判明した場合
  • nested SubAgent delegation が必要になった場合
  • 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合

Required Skills

なし

Scope Delta

  • 追加: issue-refinement-loop SKILL.md に AC/VC 反映確認ステップと対応 VC を追記
  • 削除: なし
  • 変更: なし(新規セクション追加のみ)

Runtime Verification Applicability

  • decision: not_applicable
  • reason: 静的ファイル(SKILL.md)への手順追記のみ。pnpm test / build / typecheck / lint の静的検証と rg による存在確認で完結し、動作検証は不要

Delivery Rule

  • 1 Issue = 1 PR — 本 Issue のみを対象とした単一 PR で完結させる
  • Draft PR 既定(レビュー前に Draft → Ready に昇格)

Source

follow-up:squne121/loop-protocol:pr/240:refinement-loop-ac-vc-reflection-check

Activity

  1. added
    triage-required
    on May 23, 2026
  2. squne121 commented on May 27, 2026

    @squne121
    OwnerAuthor

    Decision: Absorbed

    Reasoning: Absorbed into ac-vc reflection reference.

    Evidence:

  3. squne121 commented on May 27, 2026

    @squne121
    OwnerAuthor

    CLOSE_DECISION_V1

    CLOSE_DECISION_V1:
      generated_at: "2026-05-28T00:00:00Z"
      generated_by: issue-395-sweep
      issue_number: 252
      decision: completed
      state_reason: completed
      evidence: "references/ac-vc-reflection.md に AC/VC reflection guard が SSOT 化済み。#393 PR で thin entrypoint に含まれる"
      absorbed_by:
        - pr: https://github.com/squne121/loop-protocol/pull/415
          issue: 393
      sweep_source: https://github.com/squne121/loop-protocol/issues/395
  4. squne121 commented on May 27, 2026

    @squne121
    OwnerAuthor

    CLOSE_DECISION_V1_CORRECTION

    CLOSE_DECISION_V1:
      generated_at: "2026-05-28T12:00:00Z"
      generated_by: issue-395-sweep-correction
      issue: "#252"
      decision: absorbed
      github_state: CLOSED
      github_state_reason: completed
      absorbed_by:
        - pr: "#415"
          issue: "#393"
      evidence:
        - type: ssot_migrated
          ref: "https://github.com/squne121/loop-protocol/pull/415"
      residual_gaps: []

    訂正理由: 前回コメントの decision: completed は #395 Outcome の語彙外。正しくは decision: absorbed(absorbed by #393)。AC/VC reflection guard は references/ac-vc-reflection.md に SSOT 化済み。

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

    triage-required

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions