diff --git a/.codex/skills/create-pr/SKILL.md b/.codex/skills/create-pr/SKILL.md index 26895f5..0c0df3d 100644 --- a/.codex/skills/create-pr/SKILL.md +++ b/.codex/skills/create-pr/SKILL.md @@ -21,6 +21,13 @@ When the repository uses `code-change-verification`, treat that skill as the ups - The expected input from that skill is: commands run, pass/fail outcomes, skipped checks with reasons, environment blockers, and manual verification evidence. - Do not create a PR based on stale or assumed verification state. +## Repository Defaults + +- Commit messages must be written in English unless the user explicitly asks for another language. +- Pull request titles must be written in Japanese unless the user explicitly asks for another language. +- Pull request bodies must follow `.github/pull_request_template.md` when that file exists. +- When filling a template, replace placeholder guidance with concrete content and remove prompts that are no longer useful. + ## Workflow ### 1. Confirm scope @@ -59,6 +66,8 @@ Choose the commit message using this priority order. 2. Existing repository convention 3. Conventional Commits if there is no explicit convention +Even when following repository convention or Conventional Commits, write the final commit message in English unless the user explicitly asks for another language. + ### 4. Push the branch Check the current working branch name, then push that branch explicitly. @@ -77,10 +86,12 @@ Before creating the PR, confirm the following. - Whether the user specified a base branch - Whether the repository has project-specific workflow rules - Otherwise, what the repository default branch is -- If `.github/pull_request_template.md` exists, read it and reflect it in the body +- If `.github/pull_request_template.md` exists, read it and follow it section by section in the body Do not hardcode the base branch. If the user did not specify one, use the repository default branch. Only ask when the default branch cannot be determined, and explain why. +Unless the user explicitly requests otherwise, write the PR title in Japanese and keep it concise and descriptive. + Do not embed a long PR body directly in CLI arguments; pass it through a temporary file. ```bash @@ -97,6 +108,8 @@ After creation, return the PR URL, and include the title, base branch, and check ## PR body guidance +If `.github/pull_request_template.md` exists, follow that template instead of inventing a new structure. Make sure the body includes the fresh verification summary from `code-change-verification` when applicable. + If there is no template, the body should include at least the following. - What changed diff --git a/.codex/skills/create-pr/agents/openai.yaml b/.codex/skills/create-pr/agents/openai.yaml index f41c8ee..72a7f12 100644 --- a/.codex/skills/create-pr/agents/openai.yaml +++ b/.codex/skills/create-pr/agents/openai.yaml @@ -1,4 +1,4 @@ interface: display_name: "Create PR" short_description: "Commit, push, and open a pull request" - default_prompt: "Use $create-pr to prepare a pull request from the current branch. If code changed, run $code-change-verification first and include its fresh verification summary in the PR." + default_prompt: "Use $create-pr to prepare a pull request from the current branch. If code changed, run $code-change-verification first and include its fresh verification summary in the PR. Unless the user explicitly requests otherwise, commit messages must be in English, the PR title must be in Japanese, and the PR body must follow .github/pull_request_template.md." diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..2b33202 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,48 @@ +## 概要 + +- この PR で何を変えたかを 2〜3 行で記載 +- 対象領域: + - [ ] `src/` / `app/` / `lib/` などのアプリケーションロジック + - [ ] API / IPC / バックエンド / 外部連携 + - [ ] UI / 画面表示 / 状態管理 / UX + - [ ] データ保存 / DB / ファイル操作 / 権限 / バリデーション + - [ ] `tests/` / `docs/` / CI / 開発者向け設定 + +## 背景 + +- 変更が必要になった経緯 +- 解決したい課題 +- 関連する issue / 仕様 / 会話ログ / 障害報告 + +## 変更内容 + +- 実装・設定・ドキュメントの変更点 +- どの機能・画面・API・ジョブ・フローに影響するか +- レビュワーに特に見てほしい観点 + - 責務分離やレイヤー境界 + - 入力値・権限・パス・データ整合性などの安全性 + - 状態遷移、empty state、エラー表示、後方互換性 + +## 影響範囲 + +- ユーザー影響 + - 画面表示、主要操作、API レスポンス、パフォーマンス、権限などへの影響 +- 開発者影響 + - スクリプト、テスト、ビルド、CI、運用手順、設定変更への影響 + +## 検証 + +- 実施した確認内容 +- 実行したコマンドと結果 +- 未実施の確認があれば理由 + +## レビュー観点 + +- レビュー時に特に見てほしい箇所 +- 未解決だが共有しておきたい懸念点 +- 迷った実装方針や、今後リファクタ余地がある箇所 + +## 残課題 + +- 今回の PR で扱わなかった項目 +- 必要なら次の対応内容