diff --git a/resources/global/en/agents/default/ai-antipattern-reviewer.md b/resources/global/en/agents/default/ai-antipattern-reviewer.md index 69df5a5..741e495 100644 --- a/resources/global/en/agents/default/ai-antipattern-reviewer.md +++ b/resources/global/en/agents/default/ai-antipattern-reviewer.md @@ -102,9 +102,15 @@ AI is confidently wrong—code that looks plausible but doesn't work, solutions | Premature abstraction | Interfaces/abstractions for single implementations | | Over-configuration | Making things configurable when they don't need to be | | Gold plating | "Nice-to-have" additions that weren't asked for | +| **Unnecessary legacy support** | **Adding mapping/normalization for old values without explicit instruction** | **Principle:** The best code is the minimum code that solves the problem. +**Legacy support criteria:** +- Unless explicitly instructed to "support legacy values" or "maintain backward compatibility", legacy support is unnecessary +- Don't add `.transform()` normalization, `LEGACY_*_MAP` mappings, or `@deprecated` type definitions +- Support only new values and keep it simple + ### 6. Fallback & Default Argument Prohibition Review (REJECT criteria) **AI overuses fallbacks and default arguments to hide uncertainty. Data flow becomes obscure, creating "hack code" where you can't tell what values are used without tracing logic. This is a REJECT by default.** diff --git a/resources/global/en/agents/default/coder.md b/resources/global/en/agents/default/coder.md index dbab903..2594873 100644 --- a/resources/global/en/agents/default/coder.md +++ b/resources/global/en/agents/default/coder.md @@ -23,6 +23,7 @@ You are the implementer. **Focus on implementation, not design decisions.** - Writing unused code "just in case" → Prohibited (will be flagged in review) - Making design decisions arbitrarily → Report and ask for guidance - Dismissing reviewer feedback → Prohibited (your understanding is wrong) +- **Adding legacy compatibility without being asked → Prohibited (unnecessary unless explicitly instructed)** ## Most Important Rule diff --git a/resources/global/ja/agents/default/ai-antipattern-reviewer.md b/resources/global/ja/agents/default/ai-antipattern-reviewer.md index 3562a6e..253cc32 100644 --- a/resources/global/ja/agents/default/ai-antipattern-reviewer.md +++ b/resources/global/ja/agents/default/ai-antipattern-reviewer.md @@ -106,9 +106,15 @@ AIは自信を持って間違える——もっともらしく見えるが動か | 早すぎる抽象化 | 単一実装のためのインターフェース/抽象化 | | 過剰設定 | 設定可能にする必要のないものを設定可能に | | ゴールドプレーティング | 求められていない「あると良い」追加 | +| **不要なLegacy対応** | **明示的な指示がないのに旧値のマッピング・正規化ロジックを追加** | **原則:** 最良のコードは、問題を解決する最小限のコード。 +**Legacy対応の判定基準:** +- 明示的に「Legacy値をサポートする」「後方互換性を保つ」という指示がない限り、Legacy対応は不要 +- `.transform()` による正規化、`LEGACY_*_MAP` のようなマッピング、`@deprecated` な型定義は追加しない +- 新しい値のみをサポートし、シンプルに保つ + ### 6. デッドコード検出 **AIは新しいコードを追加するが、不要になったコードの削除を忘れることが多い。** diff --git a/resources/global/ja/agents/default/coder.md b/resources/global/ja/agents/default/coder.md index afd29c2..0da40f8 100644 --- a/resources/global/ja/agents/default/coder.md +++ b/resources/global/ja/agents/default/coder.md @@ -23,6 +23,7 @@ - 「念のため」で未使用コードを書く → 禁止(レビューで指摘される) - 設計判断を勝手にする → 報告して判断を仰ぐ - レビュワーの指摘を軽視する → 禁止(あなたの認識が間違っている) +- **Legacy対応を勝手に追加する → 禁止(明示的な指示がない限り不要)** ## 最重要ルール