Skip to content

実装: issue-refinement-loop が anchor_comment_url 未指定時に trusted author コメントを自動検出して Step 0a/0b を起動する #228

Closed as not planned

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: "none"
goal_ref: "issue-refinement-loop が anchor_comment_url 未指定時に trusted author コメントを自動検出して Step 0a/0b を起動する"
change_kind: workflow

Parent Issue

なし(単独改善)

Parent Goal Ref

  • Goal: issue-refinement-loop の anchor_comment 処理を、URL 明示なしでも trusted author コメントがある場合は自動起動する
  • Desired Destination: ユーザーが「コメントも参照して」と指示するだけで anchor_comment_url を省略できる

Current Validated Scope

  • .claude/skills/issue-refinement-loop/SKILL.md の Step 0 セクションに anchor_comment 自動検出ロジックを追加

Remaining Parent Gaps

なし(standalone improvement)

Outcome

anchor_comment_url 未指定時に Issue コメントを取得し、trusted author(OWNER/MEMBER/COLLABORATOR)の最新コメントを auto_anchor として LOOP_STATE に格納した上で Step 0a/0b が起動する状態。anchor_comment_url が明示された場合は従来通り動作し、自動検出は影響しない。

In Scope

  1. issue-refinement-loop/SKILL.md の Step 0 に「anchor_comment_url 未指定時の自動検出サブステップ」を追加
  2. 自動検出ロジック: gh api repos/.../issues/<N>/comments を取得し、author_association が OWNER/MEMBER/COLLABORATOR の最新コメントを候補とする
  3. 候補が 0 件の場合は通常通り Step 0b をスキップして Step 1 へ進む
  4. 候補が 1 件以上の場合は最新コメントを auto_anchor として LOOP_STATE.anchor_comment に格納し、auto_detected: true フラグを追加して Step 0b へ進む
  5. trusted_author_policy は従来ルール(OWNER/MEMBER/COLLABORATOR のみ信頼)を維持
  6. preliminary_classification の manual override は変更しない(Step 0b の logic はそのまま)
  7. human_escalation 条件も変更しない

Out of Scope

  • anchor_comment_url を明示した場合の動作変更
  • trusted author policy の変更(CONTRIBUTOR / NONE の扱い変更)
  • Step 0b/0c の分類ロジックの変更
  • 複数コメントを同時に anchor として扱うケース(最新 1 件のみ)
  • UI/フロントエンド変更

Acceptance Criteria

  • AC1: anchor_comment_url が未指定かつ trusted author コメントが存在しない場合、Step 0b をスキップして Step 1 へ進む(従来動作を維持)
  • AC2: anchor_comment_url が未指定かつ trusted author コメントが 1 件以上存在する場合、最新コメントが LOOP_STATE.anchor_comment に格納され auto_detected: true が設定される
  • AC3: anchor_comment_url が明示された場合、自動検出を行わず従来の Step 0a ロジックを使用する
  • AC4: 自動検出された anchor_comment の trusted_author_policy チェックは従来ルール(OWNER/MEMBER/COLLABORATOR のみ)を維持する
  • AC5: SKILL.md に auto_detected: true | false フィールドが LOOP_STATE.anchor_comment スキーマに追加されている

Verification Commands

  • rg -n 'auto_detected|自動検出|auto_anchor|anchor_comment_url.*未指定' .claude/skills/issue-refinement-loop/SKILL.md — AC1-AC3: 自動検出ロジックの記述確認
  • rg -n 'trusted_author_association|OWNER.*MEMBER.*COLLABORATOR' .claude/skills/issue-refinement-loop/SKILL.md — AC4: trusted_author_policy の維持確認
  • rg -n 'auto_detected:' .claude/skills/issue-refinement-loop/SKILL.md — AC5: LOOP_STATE スキーマへの auto_detected フィールド追加確認

Allowed Paths

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

Stop Conditions

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

Required Skills

  • Markdown / YAML 編集(skill ファイル構造)
  • GitHub Issues API(comments endpoint)

Runtime Verification Applicability

decision: not_applicable
reason: "SKILL.md のテキスト変更のみ。ランタイム動作確認コンポーネントなし"

Scope Delta

N/A

Delivery Rule

Background

Issue #211 の issue-refinement-loop 実施中に、ユーザーが anchor_comment_url を明示せず「コメントも参照して」と指示した際、main thread が手動でコメントを検索・評価する必要があった。trusted author コメントが存在する場合は自動検出できれば、このコストを削減できる。

Source

Activity

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

    @squne121
    OwnerAuthor

    Decision: Superseded

    Reasoning: Superseded by the thin entrypoint architectural shift, where orchestrator or CLI explicitly pass the anchor comment URL.

  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: 228
      decision: not_planned
      state_reason: not_planned
      evidence: "anchor_comment_url は orchestrator が明示的に渡す設計を維持。自動検出は SSOT 設計の観点から採用しない方針決定"
      absorbed_by: []
      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: "#228"
      decision: superseded
      github_state: CLOSED
      github_state_reason: not_planned
      absorbed_by: []
      evidence:
        - type: superseded_by_decision
          ref: "https://github.com/squne121/loop-protocol/issues/395"
      residual_gaps: []

    訂正理由: 前回コメントの decision: not_planned は #395 Outcome の語彙外。正しくは decision: superseded(design: no auto-detection — anchor_comment_url は orchestrator が明示的に渡す設計を維持)。github_state_reason: not_planned は GitHub の close reason として分離して保持する。

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

    enhancementtriage-required

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions