Skip to content

実装: scope rollup planner が、説明文中の識別子の一致だけで同時に実装すべき Issue を人間判断へ停止させる誤判定を是正する #2858

Open

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: "none"
goal_ref: "scope rollup planner が弱い lexical 一致だけで人間判断停止へ倒れる誤判定を是正する(単独改善)"
change_kind: code
dedupe_key: "issue-refinement-loop:scope-rollup-weak-lexical-anchor-not-hard-conflict:v1"
request_dedupe_key: "follow-up:squne121/loop-protocol:https://github.com/squne121/loop-protocol/issues/2850#issuecomment-5931647648:scope-rollup-weak-anchor"

Parent Issue

none

Parent Goal Ref

Current Validated Scope

  • .claude/skills/issue-refinement-loop/scripts/plan_issue_scope_rollup.py の anchor 判定(_extract_anchor_tokens / _build_scope_context)を、強い根拠と advisory 根拠に分けて扱うよう修正する。
  • .claude/skills/issue-refinement-loop/tests/test_plan_issue_scope_rollup.py に fixture ベースの回帰テストを追加する。
  • .claude/skills/issue-refinement-loop/references/scope-rollup-policy.md の same_anchor_conflicting_operation の定義を新しい evidence 階層へ更新する。

Remaining Parent Gaps

なし(親 Issue なし)。AST / tree-sitter / 意味類似度による判定は本 Issue では扱わず、必要になれば別 Issue とする。

Background

Outcome

plan_issue_scope_rollup.py が、識別子・file・path の弱い lexical 一致を same_anchor_conflicting_operation(escalation_required: true → human_review_required)の根拠にせず advisory evidence として出力に残し、両立不能な変更が機械可読に宣言された場合のみ hard conflict とする状態になり、追加した fixture テストを含む pytest が全件 PASS している。

Runtime Verification Applicability

  • decision: immediate
  • reason: .claude/skills/**/scripts/** の script 実行ロジック変更は docs/dev/extension-surface-runtime-policy.yaml の rule skill-invocation-procedure-or-contract-change(default_decision: immediate)に該当しうるため、推測で not_applicable としない。CLI を subprocess で実行する end-to-end 検証を 1 件含める。新しい live-Claude harness は要求しない。最終判定は review-issue / checker の結果に従う。

In Scope

Out of Scope

Acceptance Criteria

Verification Commands

# AC1
$ uv run pytest .claude/skills/issue-refinement-loop/tests/test_plan_issue_scope_rollup.py -k test_weak_lexical_anchor_not_hard_conflict
# AC2
$ uv run pytest .claude/skills/issue-refinement-loop/tests/test_plan_issue_scope_rollup.py -k test_unrelated_same_anchor_no_overmerge
# AC3
$ uv run pytest .claude/skills/issue-refinement-loop/tests/test_plan_issue_scope_rollup.py -k test_explicit_incompatible_operation_still_escalates
# AC4
$ uv run pytest .claude/skills/issue-refinement-loop/tests/test_plan_issue_scope_rollup.py -k test_weak_anchor_advisory_evidence_recorded
$ rg -c "advisory" .claude/skills/issue-refinement-loop/references/scope-rollup-policy.md
# AC5
$ uv run pytest .claude/skills/issue-refinement-loop/tests/test_plan_issue_scope_rollup.py .claude/skills/issue-refinement-loop/tests/test_verify_scope_rollup_result.py
# AC6
$ uv run pytest .claude/skills/issue-refinement-loop/tests/test_plan_issue_scope_rollup.py -k test_cli_end_to_end_weak_anchor_subprocess

Allowed Paths

  • .claude/skills/issue-refinement-loop/scripts/plan_issue_scope_rollup.py
  • .claude/skills/issue-refinement-loop/tests/test_plan_issue_scope_rollup.py
  • .claude/skills/issue-refinement-loop/references/scope-rollup-policy.md

Stop Conditions

  • Allowed Paths 外の変更が必要と判明した場合(例: verify_scope_rollup_result.py や他 consumer の変更が必要になった場合)
  • In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合(出力キーの削除・意味変更を含む)
  • 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
  • 後続 Phase / 別スコープへの波及が判明した場合
  • nested SubAgent delegation が必要になった場合
  • 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
  • 両立不能宣言の機械可読形式に新しい schema や framework が必要になった場合

Required Skills

なし

Required Design References

  • .claude/skills/issue-refinement-loop/references/scope-rollup-policy.md
  • docs/dev/runtime-verification-policy.md
  • docs/dev/extension-surface-runtime-policy.yaml

Scope Delta(任意)

N/A

Delivery Rule

Activity

  1. added
    phase/implementation
    agent/implementer
    enhancement
    triage-required
    on Oct 1, 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/implementationtriage-required

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions