@@ -12,7 +12,7 @@ Before starting work, be sure to read and follow these rule files:
12
12
- @docs/rules /documentation-criteria.md - Documentation creation criteria
13
13
- @docs/rules /technical-spec.md - Project technical specifications
14
14
- @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
16
16
- @docs/rules /project-context.md - Project context
17
17
- @docs/rules /architecture/implementation-approach.md - Metacognitive strategy selection process (used for implementation approach decisions)
18
18
- @docs/rules /architecture/ architecture rule files (if exist)
@@ -50,7 +50,7 @@ Details of documentation creation criteria follow @docs/rules/documentation-crit
50
50
### Existing Code Investigation【Required】
51
51
Must be performed before Design Doc creation:
52
52
53
- 1 . ** Implementation Path Verification**
53
+ 1 . ** Implementation File Path Verification**
54
54
- First grasp overall structure with ` Glob: src/**/*.ts `
55
55
- Then identify target files with ` Grep: "class.*Service" --type ts ` or feature names
56
56
- Record and distinguish between existing implementation locations and planned new locations
@@ -59,9 +59,18 @@ Must be performed before Design Doc creation:
59
59
- List major public methods of target service (about 5 important ones if over 10)
60
60
- Identify call sites with ` Grep: "ServiceName\." --type ts `
61
61
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**
63
71
- 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
65
74
66
75
### Agreement Checklist【Most Important】
67
76
Must be performed at the beginning of Design Doc creation:
0 commit comments