Share
Embed
Gemini でコードレビュー知見を見える化
2025/12/08 に ZOZO.swift #1 で発表した登壇資料です。
https://zozotech-inc.connpass.com/event/374854/
株式会社ZOZO
ZOZOTOWN開発本部
ZOZOTOWN開発2部 iOSブロック
テックリード
lap / らぷ(@laprasdrum)
#zozoswift
ZOZO Developers PRO
December 08, 2025
Transcript
30 slides
-
Gemini でコードレビュー知見を 見える化 2025/12/08 ZOZO.swift #1 株式会社ZOZO ZOZOTOWN開発本部 ZOZOTOWN開発2部 iOSブロック
テックリード 森口友也 Copyright © ZOZO, Inc. 1 -
© ZOZO, Inc. 株式会社ZOZO ZOZOTOWN開発本部 ZOZOTOWN開発2部 iOSブロック テックリード lap/らぷ id:
laprasdrum 2023年 中途入社 ZOZOTOWN iOSチーム内の要件設計・コーディングのフォ ローアップ、社内外への情報発信をメインに活動中 現在テックリードとして iOS に関する全社横断活動を兼務 2 -
© ZOZO, Inc. • ファッションEC • 1,600以上のショップ、9,000以上のブランドの取り扱い • 常時107万点以上の商品アイテム数と毎日平均2,700点以上の新着 商品を掲載(2025年9月末時点)
• ブランド古着のファッションゾーン「ZOZOUSED」や コスメ専門モール「ZOZOCOSME」、シューズ専門ゾーン 「ZOZOSHOES」、ラグジュアリー&デザイナーズゾーン 「ZOZOVILLA」を展開 • 即日配送サービス • ギフトラッピングサービス • ツケ払い など https://zozo.jp/ 3 -
© ZOZO, Inc. 週次サイクルを考える レビューコメントを集計 レビュー観点の傾向を分析 チーム共有・振り返り 開発ルールのアップデート コードレビュー 各レビュアー毎のレビューの質向上だけでなく
コードを書くときのセルフレビューの質向上に繋がるかも 12 -
© ZOZO, Inc. • 直近1週間内に更新された PR 一覧を取得 • 該当 PR
からコメント・レビューコメントを抽出 ◦ PR 作者・Bot のコメントは除外 ◦ LGTM Only コメントも除外 • 分析用データとして Markdown で出力 • 上記の処理を週1で GitHub Actions で実行 レビューコメントを集計する 14 -
© ZOZO, Inc. • 試作したが該当の PR の取得結果が期待通りにならなかった • 実行結果が冪等ではない •
期待する結果が明確に定義できるものは確実に取得できる手法がよい • Shellscript の実装は AI と伴走しました Q. MCP 経由で AI エージェントに取得させていますか? A. 愚直に API を呼び出して集計する Shellscript を実装しました 15 -
© ZOZO, Inc. Answer the following question in Japanese with
Slack mrkdwn format, and output outline is like ':mag: Review trends', ':pencil: Development guideline updates', ':robot_face: Linter updates' : You're an fluent iOS senior engineer and good at following up your members skill. Read @pr-review-comments.md which summarizes the last 7 days pull request reviews and comments from your members. Based on the file, output review comment trends, perspectives that should be extracted as development guidelines, points that @.swiftlint.yml should be modified and suggest the basic rules or create SwiftLint custom rules and provide code if necessary. Assume SwiftLint version is ${{ env.SWIFTLINT_VERSION }}. レビュー観点の傾向を分析 Gemini にプロンプトを渡して Slack に結果を投稿する GitHub Actions を実行 16 -
© ZOZO, Inc. Answer the following question in Japanese with
Slack mrkdwn format, and output outline is like ':mag: Review trends', ':pencil: Development guideline updates', ':robot_face: Linter updates' : You're an fluent iOS senior engineer and good at following up your members skill. Read @pr-review-comments.md which summarizes the last 7 days pull request reviews and comments from your members. Based on the file, output review comment trends, perspectives that should be extracted as development guidelines, points that @.swiftlint.yml should be modified and suggest the basic rules or create SwiftLint custom rules and provide code if necessary. Assume SwiftLint version is ${{ env.SWIFTLINT_VERSION }}. 英語で命令 (日本語だと解釈がズ レることがあった) 日本語での返答を指定 Slack 書式で出力 17 -
© ZOZO, Inc. Answer the following question in Japanese with
Slack mrkdwn format, and output outline is like ':mag: Review trends', ':pencil: Development guideline updates', ':robot_face: Linter updates' : You're an fluent iOS senior engineer and good at following up your members skill. Read @pr-review-comments.md which summarizes the last 7 days pull request reviews and comments from your members. Based on the file, output review comment trends, perspectives that should be extracted as development guidelines, points that @.swiftlint.yml should be modified and suggest the basic rules or create SwiftLint custom rules and provide code if necessary. Assume SwiftLint version is ${{ env.SWIFTLINT_VERSION }}. 投稿の書式を指定 🔎 レビュー傾向 ✏ 開発ルール更新案 🤖 Linter 更新案 18 -
© ZOZO, Inc. Answer the following question in Japanese with
Slack mrkdwn format, and output outline is like ':mag: Review trends', ':pencil: Development guideline updates', ':robot_face: Linter updates' : You're an fluent iOS senior engineer and good at following up your members skill. Read @pr-review-comments.md which summarizes the last 7 days pull request reviews and comments from your members. Based on the file, output review comment trends, perspectives that should be extracted as development guidelines, points that @.swiftlint.yml should be modified and suggest the basic rules or create SwiftLint custom rules and provide code if necessary. Assume SwiftLint version is ${{ env.SWIFTLINT_VERSION }}. AI エージェントのペル ソナを設定 メンバースキルのフォ ローアップに卓越した シニア iOS エンジニア を想定 19 -
© ZOZO, Inc. Answer the following question in Japanese with
Slack mrkdwn format, and output outline is like ':mag: Review trends', ':pencil: Development guideline updates', ':robot_face: Linter updates' : You're an fluent iOS senior engineer and good at following up your members skill. Read @pr-review-comments.md which summarizes the last 7 days pull request reviews and comments from your members. Based on the file, output review comment trends, perspectives that should be extracted as development guidelines, points that @.swiftlint.yml should be modified and suggest the basic rules or create SwiftLint custom rules and provide code if necessary. Assume SwiftLint version is ${{ env.SWIFTLINT_VERSION }}. 先ほど出力したレビュー コメントファイルを読み 込ませる ファイル概要も説明する 20 -
© ZOZO, Inc. Answer the following question in Japanese with
Slack mrkdwn format, and output outline is like ':mag: Review trends', ':pencil: Development guideline updates', ':robot_face: Linter updates' : You're an fluent iOS senior engineer and good at following up your members skill. Read @pr-review-comments.md which summarizes the last 7 days pull request reviews and comments from your members. Based on the file, output review comment trends, perspectives that should be extracted as development guidelines, points that @.swiftlint.yml should be modified and suggest the basic rules or create SwiftLint custom rules and provide code if necessary. Assume SwiftLint version is ${{ env.SWIFTLINT_VERSION }}. コメントファイルを元に 投稿書式の内容を出力さ せる Linter 改善案は SwiftLint の標準ルール 又はカスタムルールの提 案 SwiftLint バージョンは 環境変数で変更可能 21 -
© ZOZO, Inc. チーム共有・振り返り • レビュアーが指摘の意図を語ってくれた • 開発ルールの改定ポイント・理由をメンバー皆が観測できた • 改定されたことで
AI エージェントが賢くなった • 把握してなかった SwiftLint の標準ルールが学べた • .swiftlint.yml を初めて改修できたメンバーが現れた チームの週次定例で Slack 投稿をチェックしはじめて起こったこと 24 -
© ZOZO, Inc. チーム共有・振り返り • レビュー傾向・開発ルール改善案が収束する ◦ 同じことしか言わなくなる • カスタムルールの提案は全く採用されなかった
◦ 恒常的に発生するミスにもとづく指摘ではなかった ◦ カスタムルールを活かすためあえて SwiftFormat 非採用だった チェックし続けてみた結果 26 -
© ZOZO, Inc. チーム共有・振り返り • レビュー傾向・開発ルール改善案が収束する ◦ 同じことしか言わなくなる => AI
学習用ドキュメント更新フローが必要 • カスタムルールの提案は全く採用されなかった ◦ 恒常的に発生するミスにもとづく指摘ではなかった ◦ カスタムルールを活かすためあえて SwiftFormat 非採用だった ◦ => 現行・将来のカスタムルール必要性の議論後 Linter 変更検討もあり チェックし続けてみた結果 27 -
© ZOZO, Inc. Q. Gemini を使ってるのは何故? • Claude Code/Codex が選択肢に入ったのはその後
• とはいえ、コード生成ではない分析系だと Gemini でも問題ないと判断 ◦ 変更するモチベーションが上がらず ◦ Gemini 3.0 Pro が正式に利用できれば分析の質は向上するかも • どのエージェントを使うかより、エージェントを賢くするループの設計が大事 A. 導入当時の選択肢が Gemini しかなかったからです 28 -
© ZOZO, Inc. まとめ • レビューコメントはチーム成長の材料 • エンジニアリングにおける AI の価値はコード生成以外にもある
• 個人が強くなる手法だけでなく、チームが強くなる手法も • AI エージェントを賢くするチーム活動で好循環を目指そう 29