Skip to content

実装: issue-refinement-loop の Scope 変更シグナル検出に anchor-comment 由来 reframe の除外規定を追加する #220

Closed

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: none
goal_ref: "issue-refinement-loop SKILL.md の Scope 変更シグナル検出が anchor-comment 由来の正当な reframe を human_escalation で誤停止しないよう除外規定を追加する"
change_kind: docs

Parent Issue

なし(単独改善)

Parent Goal Ref

  • Goal: anchor-comment 由来の reframe_in_place / feedback_update_required reframe が human_escalation で誤停止せず自律完走できる
  • Desired Destination: N/A

Current Validated Scope

  • .claude/skills/issue-refinement-loop/SKILL.md の ## Scope 変更シグナル検出 セクションに、anchor-comment 由来 reframe の除外規定を追記する

Remaining Parent Gaps

なし

Background

issue-refinement-loop の ## Scope 変更シグナル検出(ループ内停止条件) は「iteration 中に ## In Scope へ新規の機能領域が追加された/## Allowed Paths へ新規ディレクトリが追加された場合は次イテレーションに進まず即 human_escalation」と規定している。

一方、final_classification が reframe_in_place / feedback_update_required の場合、Step 4 は anchor comment(trusted 投稿者の人間 Decision)に基づき In Scope / Allowed Paths / AC を正当に変更する。reframe_in_place / feedback_update_required の定義自体が In Scope 変更を含意する。

このため、Step 4 で anchor-comment 由来の reframe を適用した直後に Scope 変更シグナル検出が発火すると、人間が明示指示した正当な reframe が human_escalation で誤停止し、ループが自律完走できない。Scope 変更シグナル検出は本来「issue-author による意図しない scope creep」を捕捉する guard だが、現行 SKILL.md は anchor-comment 由来の reframe を除外する記述を持たない。

2026-05-22 の #204 reframe(「SKILL.md 文言追記」→「Claude Code セッション途中停止の根本原因調査」への in-place 全面 reframe。In Scope に transcript 調査・hooks 棚卸しを追加)でこの矛盾が顕在化した。

Outcome

SKILL.md の ## Scope 変更シグナル検出 セクションに、final_classification が reframe_in_place または feedback_update_required の場合は anchor comment が明示的に指示した範囲の In Scope / Allowed Paths / AC 変更を本 guard の停止対象から除外する旨が明記され、anchor-comment 由来の正当な reframe が human_escalation で誤停止しない。同時に、anchor comment の指示範囲を超える scope 拡大は引き続き停止対象である旨も明記され、guard 本来の scope creep 捕捉能力は維持される。

In Scope

  • .claude/skills/issue-refinement-loop/SKILL.md の ## Scope 変更シグナル検出 セクションへの除外規定追記

Out of Scope

  • SKILL.md 以外の変更
  • Scope 変更シグナル検出ロジック自体の再設計
  • reframe_in_place / feedback_update_required 以外の分類の挙動変更
  • Scope 変更シグナル検出の判定を自動化するスクリプト追加

Acceptance Criteria

  • AC0: SKILL.md の ## Scope 変更シグナル検出 に、final_classification が reframe_in_place または feedback_update_required のとき anchor comment が明示指示した範囲の In Scope / Allowed Paths / AC 変更は本 guard の停止対象外である旨が明記されている
  • AC1: 同セクションに、anchor comment の指示範囲を超える scope 拡大は引き続き human_escalation 対象である旨が明記されている

Verification Commands

# AC0: anchor-comment 由来 reframe の除外規定が追記されている
rg -A12 "## Scope 変更シグナル検出" .claude/skills/issue-refinement-loop/SKILL.md | rg "reframe_in_place|feedback_update_required" && echo "PASS: AC0" || echo "FAIL: AC0"

# AC1: 指示範囲を超える scope 拡大は引き続き停止対象である旨が明記されている
rg -A20 "## Scope 変更シグナル検出" .claude/skills/issue-refinement-loop/SKILL.md | rg "超え|範囲外|指示範囲" && echo "PASS: AC1" || echo "FAIL: AC1"

Allowed Paths

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

Stop Conditions

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

Required Skills

なし(docs のみ)

Delivery Rule

Runtime Verification Applicability

decision: not_applicable
rationale: >
  docs-only 変更(SKILL.md への除外規定文言追記)。rg による記述確認のみで検証完結する。

Source

dedupe_key: issue-refinement-loop-scope-signal-guard-reframe-exemption
source_issue: 204
source_note: "2026-05-22 #204 の issue-refinement-loop 実行中に観測。anchor-comment 由来の reframe_in_place で In Scope を拡大した際、Scope 変更シグナル検出が human_escalation を誤発火しうる構造的矛盾。派生改善候補として自動起票。"

Activity

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

    @squne121
    OwnerAuthor

    Decision: Absorbed

    Reasoning: Absorbed into scope signal guard reference via thin entrypoint implementation.

    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: 220
      decision: completed
      state_reason: completed
      evidence: "references/scope-signal-guard.md に anchor-comment reframe 除外規定が記載され SSOT 化済み(#393 PR で実装)"
      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: "#220"
      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)。scope signal reframe exemption は references/scope-signal-guard.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

    agent/implementerenhancementphase/implementationstate/queued

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions