@su-record/vibe 2.4.55 โ†’ 2.4.57

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/CLAUDE.md +7 -18
  2. package/agents/compounder.md +1 -1
  3. package/agents/implementer.md +2 -1
  4. package/agents/simplifier.md +2 -1
  5. package/commands/vibe.run.md +26 -27
  6. package/commands/vibe.spec.md +84 -40
  7. package/dist/cli/index.d.ts.map +1 -1
  8. package/dist/cli/index.js +0 -4
  9. package/dist/cli/index.js.map +1 -1
  10. package/dist/cli/postinstall.js +32 -1
  11. package/dist/cli/postinstall.js.map +1 -1
  12. package/dist/cli/setup.d.ts +18 -4
  13. package/dist/cli/setup.d.ts.map +1 -1
  14. package/dist/cli/setup.js +87 -27
  15. package/dist/cli/setup.js.map +1 -1
  16. package/dist/cli/types.d.ts +6 -0
  17. package/dist/cli/types.d.ts.map +1 -1
  18. package/languages/csharp-unity.md +516 -0
  19. package/languages/gdscript-godot.md +470 -0
  20. package/languages/ruby-rails.md +489 -0
  21. package/languages/typescript-angular.md +433 -0
  22. package/languages/typescript-astro.md +416 -0
  23. package/languages/typescript-electron.md +407 -0
  24. package/languages/typescript-nestjs.md +524 -0
  25. package/languages/typescript-svelte.md +407 -0
  26. package/languages/typescript-tauri.md +366 -0
  27. package/package.json +1 -1
  28. package/skills/vibe-capabilities.md +1 -1
  29. package/vibe/constitution.md +130 -97
  30. package/vibe/rules/core/communication-guide.md +50 -56
  31. package/vibe/rules/core/development-philosophy.md +35 -36
  32. package/vibe/rules/core/quick-start.md +66 -85
  33. package/vibe/rules/quality/bdd-contract-testing.md +94 -89
  34. package/vibe/rules/quality/checklist.md +132 -132
  35. package/vibe/rules/quality/testing-strategy.md +132 -129
  36. package/vibe/rules/standards/anti-patterns.md +74 -74
  37. package/vibe/rules/standards/code-structure.md +44 -44
  38. package/vibe/rules/standards/complexity-metrics.md +63 -62
  39. package/vibe/rules/standards/naming-conventions.md +72 -72
  40. package/vibe/templates/constitution-template.md +153 -95
  41. package/vibe/templates/contract-backend-template.md +41 -32
  42. package/vibe/templates/contract-frontend-template.md +35 -30
  43. package/vibe/templates/feature-template.md +33 -33
  44. package/vibe/templates/spec-template.md +118 -96
@@ -1,104 +1,98 @@
1
- # ๐Ÿ’ฌ ์ปค๋ฎค๋‹ˆ์ผ€์ด์…˜ ๊ฐ€์ด๋“œ
1
+ # Communication Guide
2
2
 
3
- ## โš ๏ธ ์ตœ์šฐ์„  ๊ทœ์น™: ํ•œ๊ตญ์–ด๋กœ ์‘๋‹ต
3
+ ## Language Configuration
4
4
 
5
- **๋ชจ๋“  ๋Œ€ํ™”, ์„ค๋ช…, ์ฃผ์„์€ ํ•œ๊ตญ์–ด๋กœ ์ž‘์„ฑํ•ฉ๋‹ˆ๋‹ค.**
5
+ Language can be configured per project in `.sutory/config.json`. Code itself (function names, variable names, etc.) should always be in English.
6
6
 
7
- - โœ… AI ์‘๋‹ต: ํ•œ๊ตญ์–ด
8
- - โœ… ์ฝ”๋“œ ์ฃผ์„: ํ•œ๊ตญ์–ด
9
- - โœ… ๋ฌธ์„œ: ํ•œ๊ตญ์–ด
10
- - โœ… ์—๋Ÿฌ ๋ฉ”์‹œ์ง€: ํ•œ๊ตญ์–ด
11
- - โš ๏ธ ์˜ˆ์™ธ: ์ฝ”๋“œ ์ž์ฒด (ํ•จ์ˆ˜๋ช…, ๋ณ€์ˆ˜๋ช… ๋“ฑ)๋Š” ์˜์–ด
12
-
13
- ## 3.1 ์ฝ”๋“œ ์ œ๊ณต ํ˜•์‹
7
+ ## 3.1 Code Delivery Format
14
8
 
15
9
  ```markdown
16
- ### ์ž‘์—… ๋ฒ”์œ„
10
+ ### Scope of Work
17
11
 
18
- "์š”์ฒญํ•˜์‹  ๋Œ€๋กœ UserProfile ์ปดํฌ๋„ŒํŠธ์˜ ์ƒํƒœ ๊ด€๋ฆฌ ๋กœ์ง๋งŒ ์ˆ˜์ •ํ–ˆ์Šต๋‹ˆ๋‹ค."
12
+ "As requested, I only modified the state management logic in the UserProfile component."
19
13
 
20
- ### ๋ณ€๊ฒฝ ์‚ฌํ•ญ ์š”์•ฝ
14
+ ### Summary of Changes
21
15
 
22
- ์ฃผ๋ฌธ ์ƒํƒœ ์—…๋ฐ์ดํŠธ ๋กœ์ง ๊ฐœ์„  - Optimistic updates ์ ์šฉ
16
+ Improved order status update logic - Applied optimistic updates
23
17
 
24
- ### ์ฝ”๋“œ
18
+ ### Code
25
19
 
26
- [์™„์ „ํ•œ ์ฝ”๋“œ ๋ธ”๋ก]
20
+ [Complete code block]
27
21
 
28
- ### ์ฐธ๊ณ ์‚ฌํ•ญ
22
+ ### Notes
29
23
 
30
- - ์—๋Ÿฌ ๋ฐœ์ƒ ์‹œ ์ž๋™ ๋กค๋ฐฑ
31
- - ๋„คํŠธ์›Œํฌ ์žฌ์‹œ๋„ 3ํšŒ
24
+ - Auto-rollback on error
25
+ - 3 network retries
32
26
  ```
33
27
 
34
- ## 3.2 ๋ฆฌ๋ทฐ ์‘๋‹ต ํ˜•์‹
28
+ ## 3.2 Review Response Format
35
29
 
36
30
  ```markdown
37
- ### ๊ฐœ์„ ์ 
31
+ ### Improvements
38
32
 
39
- 1. memoization ๋ˆ„๋ฝ (์„ฑ๋Šฅ)
40
- 2. error boundary ๋ฏธ์ ์šฉ (์•ˆ์ •์„ฑ)
33
+ 1. Missing memoization (performance)
34
+ 2. Error boundary not applied (stability)
41
35
 
42
- ### ๊ถŒ์žฅ์‚ฌํ•ญ
36
+ ### Recommendations
43
37
 
44
- useMemo ์ ์šฉ ๋ฐ ErrorBoundary๋กœ ๊ฐ์‹ธ๊ธฐ
38
+ Apply useMemo and wrap with ErrorBoundary
45
39
  ```
46
40
 
47
- ## 3.3 ์—๋Ÿฌ ๋ณด๊ณ  ํ˜•์‹
41
+ ## 3.3 Error Report Format
48
42
 
49
43
  ```markdown
50
- ### ๋ฌธ์ œ
44
+ ### Problem
51
45
 
52
- [๋ฐœ์ƒํ•œ ๋ฌธ์ œ ๋ช…ํ™•ํžˆ ์„ค๋ช…]
46
+ [Clearly explain the issue that occurred]
53
47
 
54
- ### ์›์ธ
48
+ ### Cause
55
49
 
56
- [๋ถ„์„๋œ ์›์ธ]
50
+ [Analyzed cause]
57
51
 
58
- ### ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•
52
+ ### Solution
59
53
 
60
- [๊ตฌ์ฒด์ ์ธ ํ•ด๊ฒฐ ๋‹จ๊ณ„]
54
+ [Specific resolution steps]
61
55
 
62
- ### ์˜ˆ๋ฐฉ์ฑ…
56
+ ### Prevention
63
57
 
64
- [ํ–ฅํ›„ ๋ฐฉ์ง€ ๋ฐฉ๋ฒ•]
58
+ [How to prevent in the future]
65
59
  ```
66
60
 
67
- ## 3.4 ๋ณ€๊ฒฝ์‚ฌํ•ญ ์„ค๋ช… ์›์น™
61
+ ## 3.4 Change Explanation Principles
68
62
 
69
- - **๋ช…ํ™•์„ฑ**: ๋ฌด์—‡์„ ์™œ ๋ณ€๊ฒฝํ–ˆ๋Š”์ง€ ๋ช…ํ™•ํžˆ
70
- - **๊ฐ„๊ฒฐ์„ฑ**: ํ•ต์‹ฌ๋งŒ ์ „๋‹ฌ
71
- - **์™„์ „์„ฑ**: ๋ถ€์ž‘์šฉ๊ณผ ์ฃผ์˜์‚ฌํ•ญ ํฌํ•จ
72
- - **์ถ”์ ์„ฑ**: ๊ด€๋ จ ์ด์Šˆ/์š”์ฒญ ์ฐธ์กฐ
63
+ - **Clarity**: Clearly explain what was changed and why
64
+ - **Conciseness**: Communicate only the essentials
65
+ - **Completeness**: Include side effects and caveats
66
+ - **Traceability**: Reference related issues/requests
73
67
 
74
- ## 3.5 ํŠน์ˆ˜ ๋ช…๋ น์–ด ์‹คํ–‰
68
+ ## 3.5 Special Command Execution
75
69
 
76
- - **"optimize"**: ์„ฑ๋Šฅ ๊ฐœ์„  (memoization, ๋ฒˆ๋“ค ํฌ๊ธฐ ๋“ฑ)
77
- - **"enhance accessibility"**: ARIA, ํ‚ค๋ณด๋“œ ์ง€์› ๋“ฑ ์ถ”๊ฐ€
78
- - **"strengthen types"**: any ์ œ๊ฑฐ, ํƒ€์ž… ์•ˆ์ „์„ฑ ํ–ฅ์ƒ
79
- - **"cleanup"**: ๋ถˆํ•„์š”ํ•œ ์ฝ”๋“œ ์ œ๊ฑฐ (์š”์ฒญ ์‹œ์—๋งŒ)
80
- - **"split"**: ์ปดํฌ๋„ŒํŠธ/ํ•จ์ˆ˜ ๋ถ„๋ฆฌ (์š”์ฒญ ์‹œ์—๋งŒ)
70
+ - **"optimize"**: Performance improvements (memoization, bundle size, etc.)
71
+ - **"enhance accessibility"**: Add ARIA, keyboard support, etc.
72
+ - **"strengthen types"**: Remove `any`, improve type safety
73
+ - **"cleanup"**: Remove unnecessary code (only when requested)
74
+ - **"split"**: Separate components/functions (only when requested)
81
75
 
82
- ## 3.6 ์งˆ๋ฌธ ํ˜•์‹
76
+ ## 3.6 Question Format
83
77
 
84
- ### ๋ช…ํ™•์„ฑ์ด ํ•„์š”ํ•  ๋•Œ
78
+ ### When Clarity is Needed
85
79
 
86
80
  ```markdown
87
- ๋‹ค์Œ ์‚ฌํ•ญ์„ ํ™•์ธํ•ด์ฃผ์„ธ์š”:
81
+ Please clarify the following:
88
82
 
89
- 1. [๊ตฌ์ฒด์ ์ธ ์งˆ๋ฌธ 1]
90
- 2. [๊ตฌ์ฒด์ ์ธ ์งˆ๋ฌธ 2]
83
+ 1. [Specific question 1]
84
+ 2. [Specific question 2]
91
85
 
92
- ์ด ์ •๋ณด๊ฐ€ ์žˆ์œผ๋ฉด ๋” ์ •ํ™•ํ•œ ๊ตฌํ˜„์ด ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค.
86
+ With this information, a more accurate implementation is possible.
93
87
  ```
94
88
 
95
- ### ๋Œ€์•ˆ ์ œ์‹œ
89
+ ### Presenting Alternatives
96
90
 
97
91
  ```markdown
98
- ์š”์ฒญํ•˜์‹  ๋ฐฉ๋ฒ• ์™ธ์— ๋‹ค์Œ ๋Œ€์•ˆ๋„ ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค:
92
+ In addition to your requested approach, the following alternatives are possible:
99
93
 
100
- **๋ฐฉ๋ฒ• A**: [์„ค๋ช…] - ์žฅ์ : [์žฅ์ ], ๋‹จ์ : [๋‹จ์ ]
101
- **๋ฐฉ๋ฒ• B**: [์„ค๋ช…] - ์žฅ์ : [์žฅ์ ], ๋‹จ์ : [๋‹จ์ ]
94
+ **Method A**: [Description] - Pros: [Pros], Cons: [Cons]
95
+ **Method B**: [Description] - Pros: [Pros], Cons: [Cons]
102
96
 
103
- ์–ด๋–ค ๋ฐฉ์‹์„ ์„ ํ˜ธํ•˜์‹œ๋‚˜์š”?
97
+ Which approach do you prefer?
104
98
  ```
@@ -1,53 +1,52 @@
1
- # ๐Ÿ›๏ธ ๊ฐœ๋ฐœ ์ฒ ํ•™๊ณผ ์›์น™ - "์™œ"์— ๋Œ€ํ•œ ๋‹ต
1
+ # Development Philosophy and Principles - Answering "Why"
2
2
 
3
- ## 1.1 ๐Ÿฅ‡ ์ตœ์šฐ์„  ์ˆœ์œ„: ์ˆ˜์ˆ ์  ์ •๋ฐ€๋„
3
+ ## 1.1 Top Priority: Surgical Precision
4
4
 
5
- > **โš ๏ธ ์ด๊ฒƒ์€ ๋ชจ๋“  ์ž‘์—…์— ์•ž์„œ๋Š” TORY์˜ ์ฒซ ๋ฒˆ์งธ ์›์น™์ž…๋‹ˆ๋‹ค.**
5
+ > **โš ๏ธ This is the first principle that precedes all work.**
6
6
  >
7
- > **์š”์ฒญ๋ฐ›์ง€ ์•Š์€ ์ฝ”๋“œ๋Š” ์ ˆ๋Œ€ ์ˆ˜์ •/์‚ญ์ œํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.**
7
+ > **Never modify/delete code that wasn't requested.**
8
8
 
9
- ### ์›์น™
9
+ ### Principles
10
10
 
11
- - **์—„๊ฒฉํ•œ ๋ฒ”์œ„ ์ค€์ˆ˜**: ์‚ฌ์šฉ์ž๊ฐ€ ๋ช…์‹œ์ ์œผ๋กœ ์š”์ฒญํ•œ ํŒŒ์ผ๊ณผ ์ฝ”๋“œ ๋ธ”๋ก๋งŒ ์ˆ˜์ •
12
- - **๊ธฐ์กด ์ฝ”๋“œ ๋ณด์กด**: ์ž‘๋™ํ•˜๋Š” ์ฝ”๋“œ๋ฅผ ์ž„์˜๋กœ ๋ฆฌํŒฉํ† ๋งํ•˜๊ฑฐ๋‚˜ ์ œ๊ฑฐํ•˜์ง€ ์•Š์Œ
13
- - **์Šคํƒ€์ผ ์กด์ค‘**: ๊ธฐ์กด ๋„ค์ด๋ฐ, ํฌ๋งทํŒ…, ์ฃผ์„ ์Šคํƒ€์ผ ์œ ์ง€
11
+ - **Strict scope adherence**: Only modify files and code blocks explicitly requested by the user
12
+ - **Preserve existing code**: Do not arbitrarily refactor or remove working code
13
+ - **Respect style**: Maintain existing naming, formatting, and comment styles
14
14
 
15
- ## 1.2 ํ•ต์‹ฌ ์ฒ ํ•™
15
+ ## 1.2 Core Philosophy
16
16
 
17
- ### ๐ŸŽฏ ๊ฐœ๋ฐœ์˜ ํ™ฉ๊ธˆ๋ฅ 
17
+ ### Development Golden Rules
18
18
 
19
- - **ํ•œ๊ตญ์–ด ์šฐ์„ **: ๋ชจ๋“  ์ปค๋ฎค๋‹ˆ์ผ€์ด์…˜์€ ๋ช…ํ™•ํ•œ ํ•œ๊ตญ์–ด๋กœ
20
- - **๋‹จ์ˆœํ•จ์˜ ๋ฏธํ•™**: ์ฝ”๋“œ๊ฐ€ ์ ์„์ˆ˜๋ก ์ข‹์€ ์ฝ”๋“œ
21
- - **DRY ์›์น™**: ๋ฐ˜๋ณตํ•˜์ง€ ๋ง๊ณ  ์žฌ์‚ฌ์šฉ
22
- - **๋‹จ์ผ ์ฑ…์ž„**: ํ•˜๋‚˜์˜ ํ•จ์ˆ˜๋Š” ํ•˜๋‚˜์˜ ๋ชฉ์ ๋งŒ
23
- - **์‹ค์šฉ์ฃผ์˜**: ์™„๋ฒฝ๋ณด๋‹ค ์‹ค์šฉ, YAGNI ์ •์‹ 
19
+ - **Simplicity aesthetics**: Less code is better code
20
+ - **DRY principle**: Don't repeat, reuse
21
+ - **Single responsibility**: One function serves one purpose
22
+ - **Pragmatism**: Practical over perfect, YAGNI spirit
24
23
 
25
- ### ๐ŸŽจ ์ฝ”๋“œ ํ’ˆ์งˆ ๊ธฐ์ค€
24
+ ### Code Quality Standards
26
25
 
27
- - **๊ฐ€๋…์„ฑ**: ์ฝ”๋“œ๋Š” ์‚ฌ๋žŒ์„ ์œ„ํ•œ ๊ฒƒ
28
- - **์˜ˆ์ธก ๊ฐ€๋Šฅ์„ฑ**: ์ฝ”๋“œ์—์„œ ๋†€๋ผ์›€์€ ๊ธˆ๋ฌผ
29
- - **์œ ์ง€๋ณด์ˆ˜์„ฑ**: ๋ฏธ๋ž˜์˜ ๋‚˜๋ฅผ ๋ฐฐ๋ ค
30
- - **ํ…Œ์ŠคํŠธ ๊ฐ€๋Šฅ์„ฑ**: ๊ฒ€์ฆ ๊ฐ€๋Šฅํ•œ ๊ตฌ์กฐ
26
+ - **Readability**: Code is for humans
27
+ - **Predictability**: No surprises in code
28
+ - **Maintainability**: Consider future you
29
+ - **Testability**: Verifiable structure
31
30
 
32
- ## 1.3 ์•„ํ‚คํ…์ฒ˜ ์›์น™
31
+ ## 1.3 Architecture Principles
33
32
 
34
- ### ๐Ÿ—๏ธ ์„ค๊ณ„์˜ ์ง€ํ˜œ
33
+ ### Design Wisdom
35
34
 
36
- - **ํŒจํ„ด์˜ ์ ์ ˆํ•œ ์ ์šฉ**: Composite, Observer, Factory ๋“ฑ ํ•„์š”์— ๋”ฐ๋ผ ์ ์šฉ
37
- - **๊ณผ๋„ํ•œ ์ถ”์ƒํ™” ์ง€์–‘**: 3๋‹จ๊ณ„ ์ด์ƒ์˜ wrapper ๊ธˆ์ง€
38
- - **์ˆœํ™˜ ์˜์กด์„ฑ ๋ฐฉ์ง€**: File A โ†’ File B โ†’ File A โŒ
35
+ - **Appropriate pattern application**: Apply Composite, Observer, Factory, etc. as needed
36
+ - **Avoid over-abstraction**: No more than 3 levels of wrappers
37
+ - **Prevent circular dependencies**: File A โ†’ File B โ†’ File A โŒ
39
38
 
40
- ### โ™ฟ ์ ‘๊ทผ์„ฑ์€ ์„ ํƒ์ด ์•„๋‹Œ ํ•„์ˆ˜
39
+ ### Accessibility is Mandatory, Not Optional
41
40
 
42
- - Semantic HTML์„ ๊ธฐ๋ณธ์œผ๋กœ
43
- - ํ‚ค๋ณด๋“œ ๋‚ด๋น„๊ฒŒ์ด์…˜ ์ง€์›
44
- - ์Šคํฌ๋ฆฐ ๋ฆฌ๋” ์ตœ์ ํ™”
45
- - ARIA ์†์„ฑ ์ ๊ทน ํ™œ์šฉ
41
+ - Use semantic HTML as default
42
+ - Support keyboard navigation
43
+ - Optimize for screen readers
44
+ - Actively use ARIA attributes
46
45
 
47
- ## ํ•ต์‹ฌ ๊ฐ€์น˜
46
+ ## Core Values
48
47
 
49
- 1. **๋ช…ํ™•์„ฑ**: ์ฝ”๋“œ๋Š” ์ž๊ธฐ ์„ค๋ช…์ ์ด์–ด์•ผ ํ•จ
50
- 2. **๊ฐ„๊ฒฐ์„ฑ**: ๋ถˆํ•„์š”ํ•œ ๋ณต์žก๋„ ์ œ๊ฑฐ
51
- 3. **์ผ๊ด€์„ฑ**: ์ผ๊ด€๋œ ํŒจํ„ด๊ณผ ์Šคํƒ€์ผ ์œ ์ง€
52
- 4. **ํ™•์žฅ์„ฑ**: ๋ฏธ๋ž˜์˜ ๋ณ€ํ™”๋ฅผ ๊ณ ๋ คํ•œ ์„ค๊ณ„
53
- 5. **์•ˆ์ „์„ฑ**: ์˜ค๋ฅ˜ ์ฒ˜๋ฆฌ์™€ ์—ฃ์ง€ ์ผ€์ด์Šค ๊ณ ๋ ค
48
+ 1. **Clarity**: Code should be self-explanatory
49
+ 2. **Conciseness**: Remove unnecessary complexity
50
+ 3. **Consistency**: Maintain consistent patterns and styles
51
+ 4. **Scalability**: Design considering future changes
52
+ 5. **Safety**: Consider error handling and edge cases
@@ -1,63 +1,82 @@
1
- # โšก Quick Start - ์ฆ‰์‹œ ์ ์šฉ ๊ฐ€๋Šฅํ•œ ์›์น™
1
+ # Quick Start - Immediately Applicable Principles
2
2
 
3
- ## ๐ŸŽฏ 5๊ฐ€์ง€ ํ•ต์‹ฌ ์›์น™
3
+ ## 5 Core Principles
4
4
 
5
5
  ```
6
- โœ… ๐Ÿ‡ฐ๐Ÿ‡ท ํ•œ๊ตญ์–ด๋กœ ์‘๋‹ต (์ตœ์šฐ์„ )
7
- โœ… ๐Ÿ“‰ ์ฝ”๋“œ๊ฐ€ ์ ์„์ˆ˜๋ก ๋ถ€์ฑ„๋„ ์ ๋‹ค
6
+ โœ… ๐Ÿ“‰ Less code means less technical debt
8
7
  โœ… ๐Ÿšซ DRY - Don't Repeat Yourself
9
- โœ… ๐ŸŽฏ ๋‹จ์ผ ์ฑ…์ž„ ์›์น™ (SRP)
8
+ โœ… ๐ŸŽฏ Single Responsibility Principle (SRP)
10
9
  โœ… ๐Ÿ™ YAGNI - You Aren't Gonna Need It
10
+ โœ… ๐Ÿ”’ Security first
11
11
  ```
12
12
 
13
- ## โš ๏ธ ์–ธ์–ด ๊ทœ์น™ (์ ˆ๋Œ€ ์ค€์ˆ˜)
13
+ ## Language Configuration
14
14
 
15
- **๋ชจ๋“  ๋‹ต๋ณ€์€ ํ•œ๊ตญ์–ด๋กœ ์ž‘์„ฑํ•ฉ๋‹ˆ๋‹ค.**
15
+ Language settings can be configured in `.sutory/config.json`:
16
16
 
17
- ### ํ•œ๊ตญ์–ด ์‚ฌ์šฉ ์›์น™
17
+ ```json
18
+ {
19
+ "language": "en" // Options: "en", "ko"
20
+ }
21
+ ```
18
22
 
19
- 1. **์„ค๋ช…, ์ฃผ์„, ๋Œ€ํ™”**: 100% ํ•œ๊ตญ์–ด
20
- 2. **์ฝ”๋“œ**: ์˜์–ด (ํ”„๋กœ๊ทธ๋ž˜๋ฐ ์–ธ์–ด ํ‘œ์ค€)
21
- 3. **๊ธฐ์ˆ  ์šฉ์–ด**: ํ•œ๊ตญ์–ด ์šฐ์„ , ํ•„์š”์‹œ ์˜์–ด ๋ณ‘๊ธฐ
22
- - โœ… "์˜์กด์„ฑ ์ฃผ์ž… (Dependency Injection)"
23
- - โœ… "์ƒํƒœ ๊ด€๋ฆฌ (State Management)"
24
- - โŒ "Dependency Injection"
25
- 4. **์—๋Ÿฌ ๋ฉ”์‹œ์ง€**: ํ•œ๊ตญ์–ด๋กœ ์„ค๋ช…
26
- 5. **๋ฌธ์„œ ์ œ๋ชฉ/ํ—ค๋”**: ํ•œ๊ตญ์–ด
23
+ ## Checkpoints
27
24
 
28
- ### ์˜ˆ์‹œ
25
+ ### Before Adding New Packages
29
26
 
30
- ```python
31
- # โœ… ์ข‹์€ ์˜ˆ
32
- # ์‚ฌ์šฉ์ž ์ธ์ฆ ๋ฏธ๋“ค์›จ์–ด
33
- async def authenticate_user(token: str) -> User:
34
- """
35
- JWT ํ† ํฐ์„ ๊ฒ€์ฆํ•˜๊ณ  ์‚ฌ์šฉ์ž๋ฅผ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค.
27
+ - [ ] Can it be solved with existing packages?
28
+ - [ ] Is it really necessary?
29
+ - [ ] What is the bundle size impact?
36
30
 
37
- Args:
38
- token: JWT ์ธ์ฆ ํ† ํฐ
31
+ ### When Creating Files
39
32
 
40
- Returns:
41
- ์ธ์ฆ๋œ ์‚ฌ์šฉ์ž ๊ฐ์ฒด
33
+ - [ ] Verify where it will be used
34
+ - [ ] Add imports immediately
35
+ - [ ] Check for circular dependencies
42
36
 
43
- Raises:
44
- HTTPException: ํ† ํฐ์ด ์œ ํšจํ•˜์ง€ ์•Š์€ ๊ฒฝ์šฐ
45
- """
46
- # ํ† ํฐ ๊ฒ€์ฆ
47
- payload = decode_jwt(token)
37
+ ## Top Priority: Surgical Precision
48
38
 
49
- # ์‚ฌ์šฉ์ž ์กฐํšŒ
50
- user = await get_user(payload["sub"])
51
- if not user:
52
- raise HTTPException(401, detail="์ธ์ฆ ์‹คํŒจ")
39
+ > **โš ๏ธ This is the first principle that precedes all work.**
40
+ >
41
+ > **Never modify/delete code that wasn't requested.**
53
42
 
54
- return user
43
+ - **Strict scope adherence**: Only modify files and code blocks explicitly requested by the user
44
+ - **Preserve existing code**: Do not arbitrarily refactor or remove working code
45
+ - **Respect style**: Maintain existing naming, formatting, and comment styles
46
+
47
+ ## Pre-Work Checklist
48
+
49
+ ```
50
+ [x] Follow top priority: Never modify outside request scope
51
+ [ ] Respect existing code: Maintain existing style and structure
52
+ [ ] Follow documentation rules: Adhere to naming, structure guidelines
53
+ ```
54
+
55
+ ## Golden Rules
55
56
 
56
- # โŒ ๋‚˜์œ ์˜ˆ
57
+ - **Simplicity aesthetics**: Less code is better code
58
+ - **DRY principle**: Don't repeat, reuse
59
+ - **Single responsibility**: One function serves one purpose
60
+ - **Pragmatism**: Practical over perfect, YAGNI spirit
61
+
62
+ ## Code Examples
63
+
64
+ ### Good Example
65
+
66
+ ```python
57
67
  # User authentication middleware
58
68
  async def authenticate_user(token: str) -> User:
59
69
  """
60
70
  Verify JWT token and return user.
71
+
72
+ Args:
73
+ token: JWT authentication token
74
+
75
+ Returns:
76
+ Authenticated user object
77
+
78
+ Raises:
79
+ HTTPException: When token is invalid
61
80
  """
62
81
  # Verify token
63
82
  payload = decode_jwt(token)
@@ -70,52 +89,14 @@ async def authenticate_user(token: str) -> User:
70
89
  return user
71
90
  ```
72
91
 
73
- ### AI ์‘๋‹ต ์˜ˆ์‹œ
74
-
75
- ```markdown
76
- # โŒ ์˜์–ด ์‘๋‹ต
77
- I'll help you create a new API endpoint. First, let's define the schema...
78
-
79
- # โœ… ํ•œ๊ตญ์–ด ์‘๋‹ต
80
- ์ƒˆ๋กœ์šด API ์—”๋“œํฌ์ธํŠธ๋ฅผ ๋งŒ๋“ค์–ด๋“œ๋ฆฌ๊ฒ ์Šต๋‹ˆ๋‹ค. ๋จผ์ € ์Šคํ‚ค๋งˆ๋ฅผ ์ •์˜ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค...
81
- ```
82
-
83
- ## ๐Ÿ“ฆ ์ฒดํฌํฌ์ธํŠธ
84
-
85
- ### ์ƒˆ ํŒจํ‚ค์ง€ ์ถ”๊ฐ€ ์ „
86
-
87
- - [ ] ๊ธฐ์กด ํŒจํ‚ค์ง€๋กœ ํ•ด๊ฒฐ ๊ฐ€๋Šฅํ•œ๊ฐ€?
88
- - [ ] ์ •๋ง ํ•„์š”ํ•œ๊ฐ€?
89
- - [ ] ๋ฒˆ๋“ค ํฌ๊ธฐ ์˜ํ–ฅ์€?
92
+ ### Bad Example
90
93
 
91
- ### ํŒŒ์ผ ์ƒ์„ฑ ์‹œ
92
-
93
- - [ ] ์‚ฌ์šฉ ์œ„์น˜ ํ™•์ธ
94
- - [ ] import ์ฆ‰์‹œ ์ถ”๊ฐ€
95
- - [ ] ์ˆœํ™˜ ์˜์กด์„ฑ ์ฒดํฌ
96
-
97
- ## ๐Ÿฅ‡ ์ตœ์šฐ์„  ์›์น™: ์ˆ˜์ˆ ์  ์ •๋ฐ€๋„
98
-
99
- > **โš ๏ธ ์ด๊ฒƒ์€ ๋ชจ๋“  ์ž‘์—…์— ์•ž์„œ๋Š” TORY์˜ ์ฒซ ๋ฒˆ์งธ ์›์น™์ž…๋‹ˆ๋‹ค.**
100
- >
101
- > **์š”์ฒญ๋ฐ›์ง€ ์•Š์€ ์ฝ”๋“œ๋Š” ์ ˆ๋Œ€ ์ˆ˜์ •/์‚ญ์ œํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.**
102
-
103
- - **์—„๊ฒฉํ•œ ๋ฒ”์œ„ ์ค€์ˆ˜**: ์‚ฌ์šฉ์ž๊ฐ€ ๋ช…์‹œ์ ์œผ๋กœ ์š”์ฒญํ•œ ํŒŒ์ผ๊ณผ ์ฝ”๋“œ ๋ธ”๋ก๋งŒ ์ˆ˜์ •
104
- - **๊ธฐ์กด ์ฝ”๋“œ ๋ณด์กด**: ์ž‘๋™ํ•˜๋Š” ์ฝ”๋“œ๋ฅผ ์ž„์˜๋กœ ๋ฆฌํŒฉํ† ๋งํ•˜๊ฑฐ๋‚˜ ์ œ๊ฑฐํ•˜์ง€ ์•Š์Œ
105
- - **์Šคํƒ€์ผ ์กด์ค‘**: ๊ธฐ์กด ๋„ค์ด๋ฐ, ํฌ๋งทํŒ…, ์ฃผ์„ ์Šคํƒ€์ผ ์œ ์ง€
106
-
107
- ## ๐Ÿš€ ์ž‘์—… ์ „ ํ•„์ˆ˜ ์ฒดํฌ๋ฆฌ์ŠคํŠธ
108
-
109
- ```
110
- [x] ์ตœ์šฐ์„  ์›์น™ ์ค€์ˆ˜: ์š”์ฒญ ๋ฒ”์œ„ ์™ธ ์ ˆ๋Œ€ ์ˆ˜์ • ๊ธˆ์ง€
111
- [ ] ๊ธฐ์กด ์ฝ”๋“œ ์กด์ค‘: ๊ธฐ์กด ์Šคํƒ€์ผ๊ณผ ๊ตฌ์กฐ ์œ ์ง€
112
- [ ] ๋ฌธ์„œ ๊ทœ์น™ ์ค€์ˆ˜: ๋„ค์ด๋ฐ, ๊ตฌ์กฐ ๋“ฑ ๋ชจ๋“  ๊ฐ€์ด๋“œ๋ผ์ธ ์ค€์ˆ˜
94
+ ```python
95
+ # No comments, unclear purpose
96
+ async def auth(t):
97
+ p = decode_jwt(t)
98
+ u = await get_user(p["sub"])
99
+ if not u:
100
+ raise HTTPException(401)
101
+ return u
113
102
  ```
114
-
115
- ## ๐ŸŽฏ ํ™ฉ๊ธˆ๋ฅ 
116
-
117
- - **ํ•œ๊ตญ์–ด ์šฐ์„ **: ๋ชจ๋“  ์ปค๋ฎค๋‹ˆ์ผ€์ด์…˜์€ ๋ช…ํ™•ํ•œ ํ•œ๊ตญ์–ด๋กœ
118
- - **๋‹จ์ˆœํ•จ์˜ ๋ฏธํ•™**: ์ฝ”๋“œ๊ฐ€ ์ ์„์ˆ˜๋ก ์ข‹์€ ์ฝ”๋“œ
119
- - **DRY ์›์น™**: ๋ฐ˜๋ณตํ•˜์ง€ ๋ง๊ณ  ์žฌ์‚ฌ์šฉ
120
- - **๋‹จ์ผ ์ฑ…์ž„**: ํ•˜๋‚˜์˜ ํ•จ์ˆ˜๋Š” ํ•˜๋‚˜์˜ ๋ชฉ์ ๋งŒ
121
- - **์‹ค์šฉ์ฃผ์˜**: ์™„๋ฒฝ๋ณด๋‹ค ์‹ค์šฉ, YAGNI ์ •์‹