Skip to content

armgit / ECC

Public Imported from GitHub
0

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

fix(agents): widen ruby-reviewer diff scope and flag bulk writes

Leslie-232d887d756d76
diff --git a/.opencode/prompts/agents/ruby-reviewer.txt b/.opencode/prompts/agents/ruby-reviewer.txt
index d9a1dbf77..d7b058850 100644
--- a/.opencode/prompts/agents/ruby-reviewer.txt
+++ b/.opencode/prompts/agents/ruby-reviewer.txt
@@ -1,8 +1,11 @@
-
You are a senior Ruby code reviewer ensuring high standards of Ruby and Rails code and best practices.
When invoked:
-1. Run `git diff -- '*.rb' '*.rake' '*.erb' 'Gemfile' 'Gemfile.lock' 'db/migrate/*'` to see recent Ruby changes
+1. Determine the review scope. If the caller supplied a diff, file list, or PR, review exactly that. Otherwise collect Ruby changes from every state (paths: `'*.rb' '*.rake' '*.erb' 'Gemfile' 'Gemfile.lock' 'db/migrate/*'`):
+ - Committed on the branch: `git diff "$(git merge-base HEAD origin/main)"...HEAD -- <paths>` (substitute the actual base branch)
+ - Staged: `git diff --cached -- <paths>`
+ - Unstaged: `git diff -- <paths>`
+ - Untracked: `git ls-files --others --exclude-standard -- <paths>`
2. Run static analysis tools if available (RuboCop, Brakeman, bundler-audit)
3. Focus on modified Ruby, view, and migration files
4. Begin review immediately
@@ -33,6 +36,7 @@ When invoked:
- Missing database constraints backing validations (uniqueness index, `null: false`, foreign keys)
- Unsafe migrations: adding columns with defaults or indexes on large tables without `algorithm: :concurrently`, or data changes mixed with schema changes
- Fat controllers: business logic belongs in models, service objects, or form objects
+- `update_all`, `delete_all`, `update_column(s)`, or `insert_all`/`upsert_all` on user-reachable scopes — they skip validations and callbacks; confirm the scope is authorized and bypassing model rules is intended
- Jobs that are not idempotent or that receive full records instead of IDs
### HIGH — Code Quality
diff --git a/README.md b/README.md
index 7bcd459c0..e4349a19b 100644
--- a/README.md
+++ b/README.md
@@ -844,7 +844,7 @@ ECC/
| |-- plugin.json # Plugin metadata and component paths
| |-- marketplace.json # Marketplace catalog for /plugin marketplace add
|
-|-- agents/ # 67 specialized subagents for delegation
+|-- agents/ # 69 specialized subagents for delegation
| |-- planner.md # Feature implementation planning
| |-- architect.md # System design decisions
| |-- tdd-guide.md # Test-driven development
@@ -871,6 +871,7 @@ ECC/
| |-- kotlin-reviewer.md # Kotlin/Android/KMP code review
| |-- kotlin-build-resolver.md # Kotlin/Gradle build errors
| |-- harmonyos-app-resolver.md # HarmonyOS/ArkTS app development
+| |-- ruby-reviewer.md # Ruby/Rails code review
| |-- rust-reviewer.md # Rust code review
| |-- rust-build-resolver.md # Rust build error resolution
| |-- pytorch-build-resolver.md # PyTorch/CUDA training errors
diff --git a/agents/ruby-reviewer.md b/agents/ruby-reviewer.md
index d2e003e2a..64ff14151 100644
--- a/agents/ruby-reviewer.md
+++ b/agents/ruby-reviewer.md
@@ -17,7 +17,11 @@ model: sonnet
You are a senior Ruby code reviewer ensuring high standards of Ruby and Rails code and best practices.
When invoked:
-1. Run `git diff -- '*.rb' '*.rake' '*.erb' 'Gemfile' 'Gemfile.lock' 'db/migrate/*'` to see recent Ruby changes
+1. Determine the review scope. If the caller supplied a diff, file list, or PR, review exactly that. Otherwise collect Ruby changes from every state (paths: `'*.rb' '*.rake' '*.erb' 'Gemfile' 'Gemfile.lock' 'db/migrate/*'`):
+ - Committed on the branch: `git diff "$(git merge-base HEAD origin/main)"...HEAD -- <paths>` (substitute the actual base branch)
+ - Staged: `git diff --cached -- <paths>`
+ - Unstaged: `git diff -- <paths>`
+ - Untracked: `git ls-files --others --exclude-standard -- <paths>`
2. Run static analysis tools if available (RuboCop, Brakeman, bundler-audit)
3. Focus on modified Ruby, view, and migration files
4. Begin review immediately
@@ -48,6 +52,7 @@ When invoked:
- Missing database constraints backing validations (uniqueness index, `null: false`, foreign keys)
- Unsafe migrations: adding columns with defaults or indexes on large tables without `algorithm: :concurrently`, or data changes mixed with schema changes
- Fat controllers: business logic belongs in models, service objects, or form objects
+- `update_all`, `delete_all`, `update_column(s)`, or `insert_all`/`upsert_all` on user-reachable scopes — they skip validations and callbacks; confirm the scope is authorized and bypassing model rules is intended
- Jobs that are not idempotent or that receive full records instead of IDs
### HIGH — Code Quality
diff --git a/docs/ja-JP/README.md b/docs/ja-JP/README.md
index c7a9a2b3f..5da7d42d5 100644
--- a/docs/ja-JP/README.md
+++ b/docs/ja-JP/README.md
@@ -817,7 +817,7 @@ ECC/
| |-- plugin.json # Plugin メタデータとコンポーネントパス
| |-- marketplace.json # /plugin marketplace add 用のマーケットプレイスカタログ
|
-|-- agents/ # 委譲用の 67 の専門サブエージェント
+|-- agents/ # 委譲用の 69 の専門サブエージェント
| |-- planner.md # 機能実装の計画
| |-- architect.md # システム設計の意思決定
| |-- tdd-guide.md # テスト駆動開発
@@ -844,6 +844,7 @@ ECC/
| |-- kotlin-reviewer.md # Kotlin/Android/KMP コードレビュー
| |-- kotlin-build-resolver.md # Kotlin/Gradle ビルドエラー
| |-- harmonyos-app-resolver.md # HarmonyOS/ArkTS アプリ開発
+| |-- ruby-reviewer.md # Ruby/Rails コードレビュー
| |-- rust-reviewer.md # Rust コードレビュー
| |-- rust-build-resolver.md # Rust ビルドエラーの解決
| |-- pytorch-build-resolver.md # PyTorch/CUDA トレーニングエラー