Skip to content

Commit 613834c

Browse files
authored
Merge pull request #22 from shinpr/remove-citations
refactor: Remove redundant reference sections and improve rule-adviso…
2 parents ab33a51 + 26b075e commit 613834c

15 files changed

+47
-83
lines changed

.claude/agents-en/rule-advisor.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ Before starting work, you must read:
3636
- Prioritize by importance and relevance
3737

3838
4. **Optimized Ruleset Construction**
39-
- Select and include necessary sections from CLAUDE.md
40-
- Comprehensively collect sections from rule files
41-
- After collection, narrow down to task-relevant sections
39+
- Always include basic rule sections (e.g., mandatory execution process) from CLAUDE.md
40+
- Broadly collect sections from rule files
41+
- Comprehensively select sections for high-quality task completion
4242
- Thoroughly follow the flow: proactive information collection → structured provision
4343

4444
## Workflow
@@ -69,6 +69,7 @@ graph TD
6969

7070
### Coordination with rules-index.yaml
7171
- Based on yaml tags while considering aspects not listed
72+
- Utilize key-references source information to judge rule importance
7273
- Pay special attention to implicit relationships:
7374
- Error handling → debugging + testing
7475
- New features → design + implementation + documentation
@@ -154,14 +155,14 @@ Always return structured response in the following JSON format:
154155
4. **Supplementary/reference rules**
155156

156157
### Optimization Criteria
157-
- **Relevance**: Direct relevance to task
158+
- **Comprehensiveness**: Holistic view for high-quality task completion
159+
- **Quality Assurance**: Always include testing/quality checks for code modifications
158160
- **Specificity**: Concrete procedures over abstract principles
159-
- **Practicality**: Frequency of reference in actual work
160161
- **Dependencies**: Prerequisites for other rules
161162

162163
### Section Selection Guidelines
163-
- Only necessary parts for task, not all sections
164-
- "Basic Principles" useful in many cases
164+
- Include sections needed not only for direct task requirements but also for high-quality completion
165+
- Basic rules from CLAUDE.md are mandatory for all tasks
165166
- Prioritize concrete procedures/checklists
166167
- Exclude redundant explanations
167168

@@ -190,4 +191,4 @@ The `mandatoryChecks` section in output supports items 2-4 of "4 Mandatory Check
190191

191192
- Set confidence to "low" when uncertain
192193
- Proactively collect information and broadly include potentially related rules
193-
- Only reference files under `docs/rules/` (referencing `docs/rules-ja/` etc. is prohibited)
194+
- Only reference files under `docs/rules/`

.claude/agents-ja/rule-advisor.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ tools: Read, Grep, LS
3636
- 重要度と関連性で優先順位付け
3737

3838
4. **最適化されたルールセット構築**
39-
- CLAUDE.mdから必要なセクションを選択して含める
40-
- ルールファイルからセクションを包括的に収集
41-
- 収集後、タスクに関連するセクションに絞り込み
39+
- CLAUDE.mdから基本ルールセクション(必須実行プロセス等)を必ず含める
40+
- ルールファイルからセクションを幅広く収集
41+
- タスクを高品質に完遂するためのセクションを包括的に選択
4242
- 積極的情報収集 → 構造化提供の流れを徹底
4343

4444
## 作業フロー
@@ -69,6 +69,7 @@ graph TD
6969

7070
### rules-index.yamlとの連携
7171
- yamlのタグを基本としつつ、記載されていない観点も考慮
72+
- key-referencesの出典情報を活用してルールの重要性を判断
7273
- 特に以下の暗黙的な関連性に注意:
7374
- エラー対応 → debugging + testing
7475
- 新機能 → design + implementation + documentation
@@ -154,14 +155,14 @@ graph TD
154155
4. **補助的・参考的なルール**
155156

156157
### 最適化の基準
157-
- **関連性**: タスクとの直接的な関連度
158+
- **包括性**: タスクを高品質に完遂するための全体的な視点
159+
- **品質保証**: コード修正には必ずテスト・品質チェックを含める
158160
- **具体性**: 抽象的な原則より具体的な手順
159-
- **実用性**: 実際の作業で参照する頻度
160161
- **依存関係**: 他のルールの前提となるもの
161162

162163
### セクション選択の指針
163-
- 全セクションではなく、タスクに必要な部分のみ
164-
- 「基本原則」は多くの場合で有用
164+
- タスクの直接的な要求だけでなく、高品質な完成に必要なセクションも含める
165+
- CLAUDE.mdの基本ルールは全タスクで必須
165166
- 具体的な手順・チェックリストを優先
166167
- 冗長な説明部分は除外
167168

@@ -190,4 +191,4 @@ graph TD
190191

191192
- 不確実な場合はconfidenceを"low"に設定
192193
- 積極的に情報収集し、関連する可能性があるルールは広めに含める
193-
- 必ず`docs/rules/`配下のファイルのみを参照`docs/rules-ja/`等は参照禁止)
194+
- 必ず`docs/rules/`配下のファイルのみを参照

docs/rules-en/ai-development-guide.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -180,11 +180,4 @@ npm run lint:fix # Lint fixes
180180

181181
- **Humility**: Perfect code doesn't exist, welcome feedback
182182
- **Courage**: Execute necessary refactoring boldly
183-
- **Transparency**: Clearly document technical decision reasoning
184-
185-
## Referenced Methodologies and Principles
186-
- **Rule of Three**: Martin Fowler "Refactoring"
187-
- **Single Responsibility Principle (SRP)**: Robert C. Martin "Clean Code"
188-
- **5 Whys**: Toyota Production System
189-
- **YAGNI Principle**: Kent Beck "Extreme Programming Explained"
190-
- **DRY Principle**: Andy Hunt & Dave Thomas "The Pragmatic Programmer"
183+
- **Transparency**: Clearly document technical decision reasoning

docs/rules-en/architecture-decision-process.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,4 @@ This document defines the architecture decision process for this project and pro
4242

4343
- Propose ADR creation for changes to 5+ files
4444
- Always check existing ADRs before implementation
45-
- Post-creation of ADR allowed in emergencies (production failures, security vulnerabilities)
46-
47-
## Referenced Methodologies and Principles
48-
- **ADR Methodology**: Michael Nygard "Documenting Architecture Decisions" (2011)
49-
- **Design Doc Culture**: Google Engineering Practices Documentation
50-
- **Trade-off Analysis**: Software Architecture in Practice (Bass, Clements, Kazman)
45+
- Post-creation of ADR allowed in emergencies (production failures, security vulnerabilities)

docs/rules-en/rules-index.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ rules:
1010
key-references:
1111
- "YAGNI Principle - Kent Beck"
1212
- "Clean Code - Robert C. Martin"
13+
- "DRY Principle - The Pragmatic Programmer"
14+
- "Refactoring - Martin Fowler"
1315
sections:
1416
- "Basic Principles"
1517
- "Comment Writing Rules"
@@ -27,6 +29,8 @@ rules:
2729
key-references:
2830
- "Test-Driven Development - Kent Beck"
2931
- "Rule of Three - Martin Fowler"
32+
- "Red-Green-Refactor - Kent Beck"
33+
- "AAA Pattern - Arrange-Act-Assert"
3034
sections:
3135
- "Test Framework"
3236
- "Basic Testing Policy"
@@ -44,6 +48,8 @@ rules:
4448
- "Rule of Three - Martin Fowler"
4549
- "5 Whys - Toyota Production System"
4650
- "DRY Principle - The Pragmatic Programmer"
51+
- "Single Responsibility Principle (SRP) - Clean Code"
52+
- "YAGNI Principle - Extreme Programming"
4753
sections:
4854
- "Technical Anti-patterns (Red Flag Patterns)"
4955
- "Rule of Three - Criteria for Code Duplication"
@@ -60,6 +66,8 @@ rules:
6066
size: medium
6167
key-references:
6268
- "ADR Format - Michael Nygard"
69+
- "Single Data Source Principle - Single Source of Truth"
70+
- "Dependency Injection (DI) - Martin Fowler"
6371
sections:
6472
- "Basic Technology Stack Policy"
6573
- "Environment Variable Management and Security"
@@ -88,6 +96,8 @@ rules:
8896
key-references:
8997
- "ADR Methodology - Michael Nygard"
9098
- "Documenting Architecture Decisions"
99+
- "Design Doc Culture - Google Engineering Practices"
100+
- "Trade-off Analysis - Software Architecture in Practice"
91101
sections:
92102
- "Purpose"
93103
- "Cases Requiring ADR Creation"

docs/rules-en/technical-spec.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,4 @@ Record important technical decisions to enable future implementers to understand
7575

7676
Define build commands and test execution methods for each project.
7777

78-
## Referenced Methodologies and Principles
79-
- **ADR (Architecture Decision Record)**: Michael Nygard "Documenting Architecture Decisions"
80-
- **Single Data Source Principle**: Single Source of Truth (data management best practice)
81-
- **Dependency Injection (DI)**: Martin Fowler "Inversion of Control Containers and the Dependency Injection pattern"
8278
Quality checks are mandatory upon implementation completion.

docs/rules-en/typescript-testing.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,4 @@ describe('ComponentName', () => {
149149
expect(result).toBe('expected')
150150
})
151151
})
152-
```
153-
154-
## Referenced Methodologies and Principles
155-
- **Test-Driven Development**: Kent Beck "Test-Driven Development: By Example"
156-
- **Red-Green-Refactor**: Basic TDD cycle by Kent Beck
157-
- **Rule of Three**: Martin Fowler "Refactoring" (criteria for test helper consolidation)
158-
- **AAA Pattern**: Arrange-Act-Assert (standard pattern for test structure)
152+
```

docs/rules-en/typescript.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,4 @@ Never include sensitive information (password, token, apiKey, secret, creditCard
100100
## Performance Optimization
101101

102102
- Streaming Processing: Process large datasets with streams
103-
- Memory Leak Prevention: Explicitly release unnecessary objects
104-
105-
## Referenced Methodologies and Principles
106-
- **YAGNI Principle**: Kent Beck "Extreme Programming Explained"
107-
- **DRY Principle**: Andy Hunt & Dave Thomas "The Pragmatic Programmer"
108-
- **Single Responsibility Principle**: Robert C. Martin "Clean Code"
109-
- **Refactoring**: Martin Fowler "Refactoring"
110-
- Simplicity Priority: Prioritize maintainability over excessive optimization
103+
- Memory Leak Prevention: Explicitly release unnecessary objects

docs/rules-ja/ai-development-guide.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -180,11 +180,4 @@ npm run lint:fix # Lint修正
180180

181181
- **謙虚**: 完璧なコードは存在しない、フィードバック歓迎
182182
- **勇気**: 必要なリファクタリングは大胆に実行
183-
- **透明性**: 技術的な判断理由を明確に記録
184-
185-
## 参照した手法・原則
186-
- **Rule of Three**: Martin Fowler「Refactoring」
187-
- **単一責任原則(SRP)**: Robert C. Martin「Clean Code」
188-
- **5 Whys**: トヨタ生産方式
189-
- **YAGNI原則**: Kent Beck「Extreme Programming Explained」
190-
- **DRY原則**: Andy Hunt & Dave Thomas「The Pragmatic Programmer」
183+
- **透明性**: 技術的な判断理由を明確に記録

docs/rules-ja/architecture-decision-process.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,4 @@
4242

4343
- 5ファイル以上の変更時はADR作成を提案
4444
- 既存ADRを必ず確認してから実装
45-
- 緊急時(本番障害、セキュリティ脆弱性)は事後ADR作成可
46-
47-
## 参照した手法・原則
48-
- **ADR手法**: Michael Nygard「Documenting Architecture Decisions」(2011)
49-
- **Design Doc文化**: Google Engineering Practices Documentation
50-
- **トレードオフ分析**: Software Architecture in Practice(Bass, Clements, Kazman)
45+
- 緊急時(本番障害、セキュリティ脆弱性)は事後ADR作成可

0 commit comments

Comments
 (0)