Skip to content

実装: pytest 実行 VC の推奨パターンを body-authoring.md に明文化する #59

Closed

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: none
goal_ref: "pytest 実行 VC の表記を repo 全体で統一し、実環境で再現可能な VC 規約を docs に明文化する"
change_kind: docs

Parent Issue

なし(単独改善)

Parent Goal Ref

Current Validated Scope

  • .claude/skills/create-issue/references/body-authoring.md の「VC 作成ガイダンス」に「Python テスト系 VC の推奨実行方法」サブセクションを追加し、uv run --with pytest パターン(pyproject.toml の dev 依存に pytest がある場合は uv run python -m pytest でも可)を明記
  • docs/dev/agent-skill-boundaries.md または docs/dev/github-ops.md(存在する場合)に pytest VC 表記規約を追記する(SSOT 確認後、実在するファイルにのみ追記)

Remaining Parent Gaps

なし

Outcome

.claude/skills/create-issue/references/body-authoring.md の VC 作成ガイダンスに「Python テスト系 VC の推奨実行方法」セクションが追加され、grep "uv run" .claude/skills/create-issue/references/body-authoring.md が PASS している状態のコミットが main にマージされている

Background

PR #50 Observations #2 より: Issue #34 の AC8 VC が cd .claude/skills && python3 -m pytest tests/ -q だったが、実環境では uv run --with pytest python3 -m pytest tests/ -q が必要だった。現在 pyproject.toml には dev 依存に pytest>=8.0 および pyyaml>=6.0 が追加されており(PR #50 対応済み)、uv run python -m pytest でも動作可能な環境は整っている。しかし VC 作成時の表記規約は body-authoring.md に明文化されていないため、新規 Issue 起票時に同様の問題が再発するリスクがある。

In Scope

  • .claude/skills/create-issue/references/body-authoring.md の「VC 作成ガイダンス」セクションに「Python テスト系 VC の推奨実行方法」を追加
    • uv run python -m pytest tests/(pyproject.toml に pytest 依存がある場合の推奨)
    • uv run --with pytest python -m pytest tests/(pyproject.toml に pytest 依存がない場合のポータブル形式)
    • cd <dir> && python3 -m pytest は anti-pattern として明示(環境依存で再現不可のリスク)

Out of Scope

Acceptance Criteria

  • AC1: .claude/skills/create-issue/references/body-authoring.md に「Python テスト系 VC の推奨実行方法」セクションが存在する
  • AC2: そのセクションに uv run python -m pytest または uv run --with pytest python -m pytest の推奨パターンが明記されている
  • AC3: そのセクションに cd <dir> && python3 -m pytest が anti-pattern として明記されている

Verification Commands

# AC1: セクション存在確認
grep -q "Python テスト系" .claude/skills/create-issue/references/body-authoring.md && echo "PASS: AC1" || echo "FAIL: AC1"

# AC2: 推奨パターン存在確認
grep -q "uv run.*pytest" .claude/skills/create-issue/references/body-authoring.md && echo "PASS: AC2" || echo "FAIL: AC2"

# AC3: anti-pattern 明記確認
grep -q "anti.pattern\|非推奨" .claude/skills/create-issue/references/body-authoring.md && echo "PASS: AC3" || echo "FAIL: AC3"

Allowed Paths

  • .claude/skills/create-issue/references/body-authoring.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: .claude/worktrees/issue-<N>-pytest-vc-unified。Draft PR 既定。

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/queued

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions