Skip to content

chore: ai-repo-ops を導入 (aro init) - #3

Merged
yamk12nfu merged 1 commit into
mainfrom
chore/aro-init
Jul 21, 2026
Merged

yamk12nfu merged 1 commit into
mainfrom
chore/aro-init

Conversation

@yamk12nfu

@yamk12nfu yamk12nfu commented Jul 21, 2026 •

Copy link
Copy Markdown
Owner

概要

ai-repo-ops v0.3.1 (distribution base 0.1.5) を aro init で導入する。

  • .ai/ 配下: project.yaml / managed policies / prompts / schemas / lock file
  • .github/workflows/ai-review.yml: PR ごとに aro guard + aro knowledge check を決定的に実行する reusable workflow 呼び出し (@v1 = v0.3.1)
  • .gitattributes / .prettierignore / .gitignore patch

備考

  • aro doctor は 12 PASS / 5 WARN / 0 FAIL。WARN はすべて commands.* が空 (init 初期値) によるもの
  • allowed_paths 初期値 (src/** 等) は本 repo の実態 (app/ convex/) と乖離しているため、merge 後に別 PR で project.yaml を調整する (ai-repo-ops#22 の dogfooding データとして記録)

🤖 Generated with Claude Code

https://claude.ai/code/session_01DLYNURXo71mPZJUBePwFgr

Summary by CodeRabbit

  • 新機能

    • AIによるプルリクエストレビューを自動実行する仕組みを追加しました。
    • プロジェクト設定、リスク別ポリシー、品質ゲートを導入しました。
    • Issue修正、改善、知識更新、リリース確認、レビュー向けの運用ガイドを追加しました。
    • プロジェクト設定と知識ベースを検証するスキーマを追加しました。
  • 設定

    • AIの変更範囲や禁止対象を定義し、人手レビューと自動マージ無効を設定しました。
    • AI実行時の一時ファイルやログをGit管理対象外にしました。

@coderabbitai

coderabbitai Bot commented Jul 21, 2026 •

Copy link
Copy Markdown

Review Change Stack

Walkthrough

AIレビュー基盤を追加し、プロジェクト設定、JSON Schema、リスク別ポリシー、運用プロンプト、ロック情報、GitHub Actionsワークフロー、関連するGit設定を定義しました。

Changes

AIリポジトリ運用基盤

Layer / File(s) Summary
プロジェクト設定とスキーマ
.ai/managed/schemas/*, .ai/project.yaml
プロジェクト設定とナレッジ索引のJSON Schema、およびAI実行制限・品質ゲート・レビュー設定を追加しました。
管理ポリシーと運用プロンプト
.ai/managed/policies/*, .ai/managed/prompts/*
リスク別の変更制限、禁止パス、品質ゲート、AIによる改善・修正・レビューなどの手順を定義しました。
AIレビュー実行経路
.ai/ai-repo-ops.lock.yaml, .github/workflows/ai-review.yml
配布元と管理対象をロックファイルに記録し、Pull Requestイベントから再利用ワークフローを呼び出す設定を追加しました。
管理ファイルのリポジトリ設定
.gitattributes, .gitignore, .prettierignore
対象ファイルのLF改行、AI実行用ディレクトリの除外、管理ファイルのPrettier除外を設定しました。

Estimated code review effort: 3 (Moderate) | ~20 minutes

Poem

うさぎが跳ねて、設定を並べ
にんじん印のゲートを越える
YAMLの森にルールが咲いて
PRの道をレビューが照らす
ぴょん、と安全な一歩だね!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed ai-repo-ops の初期導入を示しており、.ai 配下の設定追加やワークフロー導入という変更内容と一致しています。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/aro-init

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
.ai/managed/schemas/project.schema.json (1)

39-105: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

スキーマの堅牢性向上のため、各オブジェクトに required の定義を追加することを推奨します。

現在、runtime、commands、quality_gates、ai、review の各オブジェクトにはプロパティの型定義が存在しますが、それらが必須フィールドとして指定されていません。
このため、該当フィールドが project.yaml から誤って欠落してもスキーマ検証を通過してしまい、後続の aro コマンドで予期せぬエラーが発生する可能性があります。各オブジェクト内で必須とすべきプロパティを明示的に指定することで、設定漏れをスキーマレベルで防ぐことができます。

♻️ 提案する修正
     "runtime": {
       "description": "実行環境設定。",
       "type": "object",
+      "required": ["devcontainer"],
       "properties": {
         "devcontainer": {
     "commands": {
       "description": "repo の標準コマンド。空文字は未設定を表し doctor で WARN(init 直後は言語/FW 不明のため FAIL にしない)。",
       "type": "object",
+      "required": ["setup", "lint", "typecheck", "test", "build"],
       "properties": {
     "quality_gates": {
       "description": "PR / 改善で必須にする品質ゲート。required の各要素は commands のキーを指す。",
       "type": "object",
+      "required": ["required"],
       "properties": {
         "required": {
     "ai": {
       "description": "AI ハーネスの動作制約。",
       "type": "object",
+      "required": ["max_loops", "max_changed_files", "allowed_paths", "forbidden_paths"],
       "properties": {
         "max_loops": {
     "review": {
       "description": "レビュー / マージ方針。",
       "type": "object",
+      "required": ["create_pr", "require_human_review", "auto_merge"],
       "properties": {
         "create_pr": { "type": "boolean" },
🤖 Prompt for 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.

In @.ai/managed/schemas/project.schema.json around lines 39 - 105, Add required
arrays to the runtime, commands, quality_gates, ai, and review object schemas,
listing every property that project.yaml must provide in each object. Include
devcontainer as required while preserving its nullable value, and ensure all
command, quality-gate, AI, and review settings are validated as present.
🤖 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.

Nitpick comments:
In @.ai/managed/schemas/project.schema.json:
- Around line 39-105: Add required arrays to the runtime, commands,
quality_gates, ai, and review object schemas, listing every property that
project.yaml must provide in each object. Include devcontainer as required while
preserving its nullable value, and ensure all command, quality-gate, AI, and
review settings are validated as present.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 94f3cd42-be17-4f58-8cff-fe0ef77ef3c6

📥 Commits

Reviewing files that changed from the base of the PR and between 7afee9b and 308105d.

📒 Files selected for processing (16)
  • .ai/ai-repo-ops.lock.yaml
  • .ai/managed/policies/default.yaml
  • .ai/managed/policies/low-risk.yaml
  • .ai/managed/policies/security.yaml
  • .ai/managed/prompts/improve.md
  • .ai/managed/prompts/issue-fix.md
  • .ai/managed/prompts/knowledge-refresh.md
  • .ai/managed/prompts/release-check.md
  • .ai/managed/prompts/review.md
  • .ai/managed/schemas/knowledge.schema.json
  • .ai/managed/schemas/project.schema.json
  • .ai/project.yaml
  • .gitattributes
  • .github/workflows/ai-review.yml
  • .gitignore
  • .prettierignore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant