Skip to content

実装: create-issue / issue-refinement-loop に Allowed Paths 全件の実在プリフライトを追加する #32

Open

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: none
goal_ref: "create-issue / issue-refinement-loop の Allowed Paths に存在しないパスが混入することを起票前に検出し、後工程(issue-contract-review / implement-issue)での無駄な調査を防ぐ"
change_kind: workflow

Parent Issue

なし(単独改善)

Parent Goal Ref

  • Goal: N/A(単独改善のため親 Issue なし)
  • Desired Destination: N/A

Current Validated Scope

  • .claude/skills/create-issue/SKILL.md の ステップ 3.6 直後(または ステップ 4 直前)に「Allowed Paths 実在プリフライト」ガードセクションを追加する
  • .claude/skills/issue-refinement-loop/SKILL.md の Step 0(前提確認)に Allowed Paths 実在チェックを追加する

Remaining Parent Gaps

なし

Outcome

.claude/skills/create-issue/SKILL.md および .claude/skills/issue-refinement-loop/SKILL.md に「Allowed Paths 全件の実在プリフライト」ガードが追記され、pnpm typecheck && pnpm lint && pnpm test && pnpm build が全 PASS した状態のコミットが作成されている。

In Scope

  • create-issue/SKILL.md のステップ 3.6(scope 重複チェック)直後に新規ガードセクション「3.7. Allowed Paths 実在プリフライト(fail-closed)」を追加する
    • ## Allowed Paths に列挙された全パスについて test -e <path> または ls <path> で実在を確認するコマンド例を記載する
    • 1 件でも実在しないパスがあれば [Allowed Paths Preflight] Not found: <path> を出力して起票を中断する
    • 新規作成予定パスを意図的に含める場合は ## Scope Delta または ## Notes for Reviewer に new_file: true と明記することを条件に通過させる例外規定を追記する
  • issue-refinement-loop/SKILL.md の Step 0(前提確認)に同等のプリフライト手順を追加する
    • Issue 本文の ## Allowed Paths を gh issue view で取得してパス一覧を抽出し、各パスを test -e で確認する
    • 実在しないパスが 1 件でもあれば termination_reason: human_escalation で即停止し、Issue コメントに不在パス一覧を記載する

Out of Scope

  • review-issue / issue-contract-review / implement-issue 等の他 skill への同等ガード追加(follow-up Issue として切り出す)
  • 新規ファイル作成 Issue への完全自動判定(例外規定の UI 化)
  • CI/CD パイプラインへの統合

Acceptance Criteria

  • AC1: create-issue/SKILL.md にステップ 3.7「Allowed Paths 実在プリフライト(fail-closed)」セクションが存在する
  • AC2: AC1 のセクションに test -e <path> を用いた全件確認コマンド例と、失敗時の出力メッセージ [Allowed Paths Preflight] Not found: <path> が記載されている
  • AC3: AC1 のセクションに、新規作成予定パスの例外規定(new_file: true 明記で通過)が記載されている
  • AC4: issue-refinement-loop/SKILL.md の Step 0 に Allowed Paths 実在チェックの手順が追加されている
  • AC5: AC4 の手順に、不在パスがあれば termination_reason: human_escalation で停止し Issue コメントに一覧を記載する指示が含まれている
  • AC6: pnpm typecheck && pnpm lint && pnpm test && pnpm build が全て成功する

Verification Commands

# AC1: ステップ 3.7 セクションの存在確認
grep -q "3\.7.*Allowed Paths 実在プリフライト" .claude/skills/create-issue/SKILL.md && echo "PASS: AC1" || echo "FAIL: AC1"

# AC2: コマンド例と失敗メッセージの存在確認
grep -q "test -e" .claude/skills/create-issue/SKILL.md && echo "PASS: AC2a" || echo "FAIL: AC2a"
grep -q "\[Allowed Paths Preflight\]" .claude/skills/create-issue/SKILL.md && echo "PASS: AC2b" || echo "FAIL: AC2b"

# AC3: 例外規定(new_file: true)の存在確認
grep -q "new_file.*true\|new_file: true" .claude/skills/create-issue/SKILL.md && echo "PASS: AC3" || echo "FAIL: AC3"

# AC4: issue-refinement-loop Step 0 に Allowed Paths チェックが追加されているか確認
grep -q "Allowed Paths" .claude/skills/issue-refinement-loop/SKILL.md && echo "PASS: AC4" || echo "FAIL: AC4"

# AC5: termination_reason: human_escalation 記述確認(Step 0 文脈)
grep -q "human_escalation" .claude/skills/issue-refinement-loop/SKILL.md && echo "PASS: AC5" || echo "FAIL: AC5"

# AC6: 品質ゲート
pnpm typecheck && pnpm lint && pnpm test && pnpm build && echo "PASS: AC6" || echo "FAIL: AC6"

Allowed Paths

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

Stop Conditions

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

Required Skills

なし

Scope Delta(任意)

N/A

Delivery Rule

  • 1 Issue = 1 PR
  • worktree 使用推奨
  • Draft PR 既定

Activity

  1. added
    enhancement
    phase/implementation
    state/queued
    agent/implementer
    on May 19, 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