chore(ai): 🤖 AIツール設定の最適化とサーチサービス連携の導入 - #101
Conversation
- Qodo Merge (旧 PR-Agent) のバージョンを `@main` にアップデートし、最新機能を有効化 - Pinecone を利用した Vector DB 検索 (RAG) 機能を設定し、過去 Issue や PR を参照可能に設定 - `auto_best_practices` および各種自動化機能を有効化 - `.cursorrules` と `.github/copilot-instructions.md` を追加し、生成AIによるコードアシストにプロジェクト規約(日本語、セキュリティ、アーキテクチャ)を強制 - `.gitignore` に AI エージェントの作業ディレクトリおよび機密ファイル (`.env`, `*.tfstate` 等) を追加して漏洩を防止 Co-authored-by: genzouw <29957+genzouw@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 本プルリクエストは、開発効率とコード品質の向上を目的として、AI ツール設定の最適化と外部サーチサービスとの連携を導入するものです。プロジェクト全体で一貫したコーディング規約を AI に学習させるための設定ファイルを追加し、PR-Agent の機能を拡張することで、より文脈に沿った自動レビューと提案が可能になります。 Highlights
Ignored Files
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
Review Summary by QodoAI開発ツール統合とQodo Mergeの最適化設定
WalkthroughsDescription• AI開発ツール向けのコーディングガイドラインを新規追加 • Qodo Mergeの最新バージョンへアップデートし自動化機能を有効化 • Pinecone Vector DBを統合したRAG検索機能を設定 • プロジェクト規約(日本語、セキュリティ、技術スタック)をAIに強制 Diagramflowchart LR
A["PR-Agent設定"] -->|バージョンアップ| B["Qodo Merge @main"]
B -->|自動化有効化| C["自動レビュー・説明生成"]
D["Pinecone API"] -->|RAG検索| E["過去Issue/PR参照"]
E -->|精度向上| C
F["AIガイドライン"] -->|Cursor/Copilot| G["プロジェクト規約強制"]
G -->|品質保証| C
File Changes1. .cursorrules
|
Code Review by Qodo
1. Unpinned action reference
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughウォークスルーCursor/Copilot 向けのコーディングガイドラインと機密除外ルールを追加し、PR Agent のワークフロー参照と実行条件を更新、PR エージェント設定を日本語応答で有効化します。 変更内容開発環境・CI自動化設定
推定レビュー所要時間🎯 3 (Moderate) | ⏱️ ~20 minutes 関連する可能性のあるPR
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Code Review
このプルリクエストは、AIコーディングガイドラインの導入と関連ツールの設定を目的としています。具体的には、.cursorrules や .github/copilot-instructions.md への規約追加、.gitignore への機密ファイル除外、.pr_agent.toml の設定が行われました。フィードバックでは、ガイドライン内でのツール名の不整合(CodeRabbitとPR-Agent)の修正、AIツール関連PRの命名規則の文脈の明確化、および設定ファイル間での重複内容を外部ファイルへ共通化することによる保守性の向上が提案されています。
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/pr-agent.yml:
- Line 19: Replace the floating action reference "uses: qodo-ai/pr-agent@main"
with a pinned commit SHA to mitigate supply-chain risk: locate the workflow line
containing uses: qodo-ai/pr-agent@main and change it to uses:
qodo-ai/pr-agent@<commit-sha> using a specific commit SHA from the
qodo-ai/pr-agent repository (obtain the SHA from that repo's commits/tags), then
commit the updated workflow so the CI always runs that exact action version.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: eab42db8-f6b8-496f-ba04-99ad657437b2
📒 Files selected for processing (5)
.cursorrules.github/copilot-instructions.md.github/workflows/pr-agent.yml.gitignore.pr_agent.toml
外部 GitHub Action `qodo-ai/pr-agent@main` は可変参照で、ブランチ更新により 告知なしに実行コードが差し替わるサプライチェーンリスクがあります。 特に当該ジョブは write 権限と OPENAI_KEY/PINECONE_API_KEY などの Secrets を 扱うため、影響が大きいため commit SHA で固定します。 レビューコメント: #101 (comment) レビュアー: qodo-code-review, coderabbitai 優先度: high
issue_comment イベントで PR Agent が無条件に起動していたため、第三者の 任意コメントから OPENAI/Pinecone API を呼ぶ処理と PR/Issue への書き込みが 誘発され得る状態でした。author_association が OWNER/MEMBER/COLLABORATOR の 場合に限定し、また Issue 本体(PR でない issue)のコメントは除外します。 レビューコメント: #101 (comment) レビュアー: qodo-code-review 優先度: high
PR で導入するのは PR-Agent (Qodo Merge) だが、リポジトリでは CodeRabbit も 並行して動作しているため、特定ツール名を直書きせず「AIコードレビュー」と 一般化した表現に修正します。.cursorrules と .github/copilot-instructions.md の両方を同期して更新します。 レビューコメント: #101 (comment) レビュアー: gemini-code-assist 優先度: low
`chore(ai): 🤖 AIツール設定の最適化` は AI ツール関連の例であり、 「セキュリティ関連のPR」の例として記載されているのは文脈不整合のため、 「AIツール関連のPR」に修正します。.cursorrules と .github/copilot-instructions.md の両方を同期して更新します。 レビューコメント: #101 (comment) レビュアー: gemini-code-assist 優先度: low
## Summary - `.cursorrules` と `.github/copilot-instructions.md` の内容重複(PR #101 のレビュー指摘)を解消するため、マスタドキュメント `docs/ai-guidelines.md` から両ファイルを自動生成する Bun + TypeScript ベースの同期スクリプトを導入しました - 将来 `CLAUDE.md` 等を追加する際は `scripts/sync-ai-guidelines.ts` の `TARGETS` 配列にエントリを 1 行追加するだけで対応可能な拡張可能設計 - CI 上で同期ずれを検証する `ai-guidelines-sync` ジョブを追加(差分時は復旧手順を出力して非 0 終了) ## 変更ファイル | ファイル | 種別 | 説明 | |---|---|---| | `docs/ai-guidelines.md` | 新規 | AI ツール共通のマスタガイドライン | | `scripts/sync-ai-guidelines.ts` | 新規 | Bun + TypeScript 同期スクリプト(`--check` モード対応) | | `.cursorrules` | 更新 | マスタから再生成(先頭に自動生成警告ヘッダー付与) | | `.github/copilot-instructions.md` | 更新 | 同上 | | `.github/workflows/ci.yml` | 更新 | `ai-guidelines-sync` ジョブを追加 | | `package.json` | 更新 | `sync:ai-guidelines` / `sync:ai-guidelines:check` スクリプト追加 | | `README.md` | 更新 | 編集手順を追記 | ## 設計判断 - **Bun + TypeScript 採用理由**: プロジェクトの主要スタックと整合性が高く、型安全に `TARGETS` 配列の拡張ができるため - **マスタを 1 ファイルに集約**: Issue 想定では `docs/ai-guidelines/` ディレクトリ階層もあり得たが、現時点ではツール固有差分がないためシンプルな単一マスタとした(将来必要になった時点で `overrides/` を追加すれば足りる) - **pre-commit フックには組み込まない**: 既存 `lint-staged` との競合や CI との二重実行を避けるため、CI 検証+手動実行で運用 ## Test plan - [x] `bun run sync:ai-guidelines` を実行し `.cursorrules` / `.github/copilot-instructions.md` が再生成されることを確認 - [x] `bun run sync:ai-guidelines:check` が同期状態で `exit 0` を返すことを確認 - [x] `bun run lint` / `bun run format:check` / `bun run typecheck` がすべて通過 - [x] `actionlint .github/workflows/ci.yml` 通過 - [ ] CI で `AI Guidelines Sync Verification` ジョブが緑になることを確認 Closes #102 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * AIコーディングアシスタント向けのガイドライン文書を追加し、設定・運用手順やベストプラクティスを明記。 * READMEに同期および同期検証コマンドと手順を追記。 * **Chores** * マスター文書から対象ファイルを自動生成/同期する仕組みを導入。 * 自動生成ヘッダーを追加して編集不可を明示。 * 同期状態を検証するCIジョブを追加し自動チェックを実行。 <!-- review_stack_entry_start --> [](https://app.coderabbit.ai/change-stack/genzouw/monopo/pull/103?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack) <!-- review_stack_entry_end --> <!-- end of auto-generated comment: release notes by coderabbit.ai -->
概要
生成AIツールの活用とCI/CDパイプラインでの自動化品質を向上させるため、最新の設定とサーチサービスとの連携を導入しました。
変更内容
@mainにアップデートしました。.pr_agent.tomlで有効化し、過去の Issue や PR を検索してより精度の高いレビューと修正提案ができるようにしました。.cursorrulesおよび.github/copilot-instructions.mdを追加しました。これにより「monopo」の呼称徹底や、セキュリティルール(getSecureRandomIntの利用など)、フロントエンド構成を事前にAIに学習させます。.gitignoreに.cursor/,.claude/などの AI ツール関連の作業ディレクトリや、.env,*.tfstateなどの機密ファイルを追加し、誤ってコミットされるのを防ぎます。マージ前の手動事前作業 (重要)
この PR をマージし、Qodo Merge のサーチサービスを完全に機能させるには、GitHub リポジトリの Secrets に Pinecone の API キー を設定する必要があります。
PINECONE_API_KEYPR created automatically by Jules for task 15915065158647014581 started by @genzouw
Summary by CodeRabbit
リリースノート
Documentation
Chores