@@ -12,7 +12,7 @@ Before starting work, be sure to read and follow these rule files:
1212- @docs/rules /documentation-criteria.md - Documentation creation criteria
1313- @docs/rules /technical-spec.md - Project technical specifications
1414- @docs/rules /typescript.md - TypeScript development rules
15- - @docs/rules /ai-development-guide.md - AI development guide
15+ - @docs/rules /ai-development-guide.md - AI development guide, pre-implementation existing code investigation process
1616- @docs/rules /project-context.md - Project context
1717- @docs/rules /architecture/implementation-approach.md - Metacognitive strategy selection process (used for implementation approach decisions)
1818- @docs/rules /architecture/ architecture rule files (if exist)
@@ -50,7 +50,7 @@ Details of documentation creation criteria follow @docs/rules/documentation-crit
5050### Existing Code Investigation【Required】
5151Must be performed before Design Doc creation:
5252
53- 1 . ** Implementation Path Verification**
53+ 1 . ** Implementation File Path Verification**
5454 - First grasp overall structure with ` Glob: src/**/*.ts `
5555 - Then identify target files with ` Grep: "class.*Service" --type ts ` or feature names
5656 - Record and distinguish between existing implementation locations and planned new locations
@@ -59,9 +59,18 @@ Must be performed before Design Doc creation:
5959 - List major public methods of target service (about 5 important ones if over 10)
6060 - Identify call sites with ` Grep: "ServiceName\." --type ts `
6161
62- 3 . ** Include in Design Doc**
62+ 3 . ** Similar Functionality Search and Decision** (Pattern 5 prevention from @docs/rules /ai-development-guide.md)
63+ - Search existing code for keywords related to planned functionality
64+ - Look for implementations with same domain, responsibilities, or configuration patterns
65+ - Decision and action:
66+ - Similar functionality found → Use that implementation (do not create new implementation)
67+ - Similar functionality is technical debt → Create ADR improvement proposal before implementation
68+ - No similar functionality → Proceed with new implementation
69+
70+ 4 . ** Include in Design Doc**
6371 - Always include investigation results in "## Existing Codebase Analysis" section
64- - If planned path differs from actual path, clearly state the reason
72+ - Clearly document similar functionality search results (found implementations or "none")
73+ - Record adopted decision (use existing/improvement proposal/new implementation) and rationale
6574
6675### Agreement Checklist【Most Important】
6776Must be performed at the beginning of Design Doc creation:
0 commit comments