Skip to content

実装: guard-issue-body.py の ac_vc_alignment ガードに issue_kind 別 skip ロジックを追加し parent テンプレートで誤 fail を防ぐ #99

Closed

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: none
goal_ref: "guard-issue-body.py の ac_vc_alignment ガードに issue_kind 別 skip ロジックを追加し、VC セクションを持たない parent テンプレートで誤 fail が起きない状態にする"
change_kind: code

Parent Issue

なし(単独改善 — #68 の follow-up として切り出し)

Parent Goal Ref

  • Goal: なし(単独改善のため parent issue 不在)
  • Desired Destination: N/A

Current Validated Scope

Remaining Parent Gaps

なし

Background

Issue #68 の issue-refinement-loop 実行中、コメント上の敵対的レビューおよび関連追記(Refs #40, #76)にて、#68 の Outcome(Template Guard の必須セクション動的化)を超えるスコープの改善提案が出された。refinement-loop のスコープ拡張防止ガードにより #68 本文には取り込まず、本 Issue として切り出す。

観測ファクト

  • guard_ac_vc_alignment() は現在 AC 件数と VC の # AC<N> 件数の一致を検証する(guard-issue-body.py line 109-118)
  • .github/ISSUE_TEMPLATE/parent.yml は Verification Commands セクションを必須に持たない
  • VC セクションを持たない issue_kind(parent 等)で ac_vc_alignment が fail すると誤検出となる
  • issue_kind 種別判定は 実装: edit-issue Template Guard を ISSUE_TEMPLATE 動的取得に置換し review-issue C1 と整合させる #68 で --issue-kind CLI 引数または Machine-Readable Contract の issue_kind フィールドとして導入される予定

依存関係

本 Issue は #68 完了後に着手する。#68 が導入する種別判定基盤(--issue-kind 引数 / issue_kind フィールド取得ロジック、tests/test_guard_issue_body.py の新規作成)が本 Issue の前提となる。

Outcome

.claude/skills/edit-issue/scripts/guard-issue-body.py の guard_ac_vc_alignment() が issue_kind 別 skip ロジックを持ち、parent テンプレートで skipped: true を返すこと、および .claude/skills/edit-issue/SKILL.md の Template Guard 説明が動的仕様と整合することが、uv run pytest で確認できるコミットが main ブランチに存在する状態

In Scope

Out of Scope

Acceptance Criteria

  • AC1 guard_ac_vc_alignment() に issue_kind 引数が追加されており、parent を渡した場合 skipped: true を返す
  • AC2 main() が --issue-kind 引数から issue_kind を取得して guard_ac_vc_alignment() に渡している
  • AC3 .claude/skills/edit-issue/tests/test_guard_issue_body.py に parent テンプレートで ac_vc_alignment が skipped: true になるテストケースが存在し PASS する
  • AC4 .claude/skills/edit-issue/SKILL.md の Template Guard 説明(Step 3a / Step 4)が issue_kind 別 skip 条件を記載しており、実装と整合している

Verification Commands

# AC1: guard_ac_vc_alignment が issue_kind 引数を受け取り skipped を返すことを確認
grep -n "issue_kind" .claude/skills/edit-issue/scripts/guard-issue-body.py && echo "PASS: issue_kind param exists" || echo "FAIL: issue_kind param missing"
grep -n "skipped" .claude/skills/edit-issue/scripts/guard-issue-body.py && echo "PASS: skipped key exists" || echo "FAIL: skipped key missing"

# AC2: --issue-kind 引数が main() に存在することを確認
grep -n "issue.kind\|issue_kind" .claude/skills/edit-issue/scripts/guard-issue-body.py | grep -i "add_argument\|argparse" && echo "PASS: CLI arg exists" || echo "FAIL: CLI arg missing"

# AC3: テストが存在し PASS する
test -f .claude/skills/edit-issue/tests/test_guard_issue_body.py && echo "PASS: test file exists" || echo "FAIL: test file missing"
uv run pytest .claude/skills/edit-issue/tests/test_guard_issue_body.py -v -k "ac_vc" 2>&1 | tail -20

# AC4: SKILL.md に skip 条件の記述が存在することを確認
grep -n "skip\|issue_kind" .claude/skills/edit-issue/SKILL.md && echo "PASS: skip condition documented" || echo "FAIL: skip condition missing"

Allowed Paths

Stop Conditions

Required Skills

  • Python 3
  • pytest / uv run pytest
  • argparse

Delivery Rule

Refs

Activity

  1. added
    enhancement
    phase/implementation
    state/blocked
    on May 20, 2026
  2. squne121 commented on May 20, 2026

    @squne121
    OwnerAuthor

    implement-issue: 実装完了 (2026-05-20T12:09:00Z)

    AC 結果

    • AC1 guard_ac_vc_alignment() に issue_kind 引数・parent で skipped: true: PASS

    • AC2 main() が issue_kind を guard_ac_vc_alignment() に渡す: PASS

    • AC3 parent テンプレートで ac_vc_alignment が skipped: true テスト PASS: PASS

    • AC4 SKILL.md の Step 3a / Step 4 が動的仕様・skip 条件と整合: PASS

    • 後続: PR レビュー(pr-review-judge)→ マージ → post-merge-cleanup

  3. squne121 commented on May 20, 2026

    @squne121
    OwnerAuthor

    統合実装の通知 (2026-05-20T12:11:12Z)

    本 Issue は依存元 #68 と 同一ファイル guard-issue-body.py を改変する類似スコープのため、ユーザー指示により #68 と統合し 1 PR で実装しました。

    1 Issue = 1 PR の意図的な例外であり、根拠は #68 の contract-snapshot コメントに記載。

  4. added a commit that references this issue on May 20, 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

    enhancementphase/implementationstate/blocked

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions