binary-agents 1.0.0 → 1.0.2

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.
package/README.md CHANGED
@@ -77,10 +77,13 @@ npx binary-agents list
77
77
  - `refactor-analyzer.md` - 리팩토링 분석기
78
78
  - `junior-friendly-checker.md` - 주니어 친화성 체커
79
79
 
80
- ### 고급 버전 (Sonnet 모델)
80
+ ### 고급 버전 (Opus 모델)
81
81
  - `advanced-code-reviewer.md` - 고급 코드 리뷰어
82
82
  - `advanced-refactor-analyzer.md` - 고급 리팩토링 분석기
83
83
  - `advanced-junior-checker.md` - 고급 주니어 친화성 체커
84
+ - `react-performance-optimizer.md` - React 성능 최적화
85
+ - `toss-cohesion-analyzer.md` - Toss 응집도 분석기
86
+ - `subagent-builder.md` - 서브에이전트 빌더
84
87
 
85
88
  ## 저장소 구조
86
89
 
@@ -93,6 +96,8 @@ binary-agents/
93
96
  │ ├── advanced-refactor-analyzer.md
94
97
  │ ├── junior-friendly-checker.md
95
98
  │ ├── advanced-junior-checker.md
99
+ │ ├── toss-cohesion-analyzer.md
100
+ │ ├── react-performance-optimizer.md
96
101
  │ └── subagent-builder.md
97
102
  ├── bin/ # CLI 실행 파일
98
103
  ├── src/ # CLI 소스 코드
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  name: advanced-code-reviewer
3
- description: Deep code analysis with architectural insights and web-based best practices research. Uses Sonnet for superior reasoning and WebFetch/WebSearch for up-to-date patterns and recommendations.
3
+ description: Deep code analysis with architectural insights and web-based best practices research. Uses Opus for superior reasoning and WebFetch/WebSearch for up-to-date patterns and recommendations.
4
4
  tools: Read, Glob, Grep, WebFetch, WebSearch
5
- model: sonnet
5
+ model: opus
6
6
  ---
7
7
 
8
8
  # Advanced Code Quality Reviewer
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  name: advanced-junior-checker
3
- description: Evaluates code readability from a junior developer perspective with research-backed recommendations. Uses Sonnet for empathetic analysis and web tools to find learning resources and onboarding best practices.
3
+ description: Evaluates code readability from a junior developer perspective with research-backed recommendations. Uses Opus for empathetic analysis and web tools to find learning resources and onboarding best practices.
4
4
  tools: Read, Glob, Grep, WebFetch, WebSearch
5
- model: sonnet
5
+ model: opus
6
6
  ---
7
7
 
8
8
  # Advanced Junior Developer Readability Checker
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  name: advanced-refactor-analyzer
3
- description: Deep refactoring analysis with industry pattern research and architectural recommendations. Uses Sonnet for sophisticated reasoning and web tools to compare against modern refactoring strategies and design patterns.
3
+ description: Deep refactoring analysis with industry pattern research and architectural recommendations. Uses Opus for sophisticated reasoning and web tools to compare against modern refactoring strategies and design patterns.
4
4
  tools: Read, Glob, Grep, WebFetch, WebSearch
5
- model: sonnet
5
+ model: opus
6
6
  ---
7
7
 
8
8
  # Advanced Refactoring Opportunity Analyzer
@@ -38,11 +38,46 @@ As a subagent, you operate independently with your own context. When invoked, yo
38
38
  - Global state modifications
39
39
  - Functions with multiple responsibilities
40
40
 
41
- ### 2. Separation of Concerns
41
+ ### 2. Separation of Concerns & Cohesion (Enhanced with Toss Principles)
42
42
 
43
43
  **✅ Look for:**
44
44
  - Clear layer boundaries: Data (API) → State (Context/hooks) → View (components) → Utils (pure functions)
45
+ - **Domain-based directory structure** (Toss principle: 함께 수정되는 코드는 같이 위치)
46
+ ```
47
+ src/
48
+ ├── components/ (shared globally)
49
+ └── domains/
50
+ ├── payment/
51
+ │ ├── components/
52
+ │ ├── hooks/
53
+ │ └── utils/
54
+ └── user/
55
+ ├── components/
56
+ ├── hooks/
57
+ └── utils/
58
+ ```
59
+ - **Single responsibility hooks** (Toss principle: 한 번에 하나의 책임만)
60
+ ```typescript
61
+ // GOOD: Separate hooks per concern
62
+ const cardId = useCardIdQueryParam();
63
+ const dateFrom = useDateFromQueryParam();
64
+
65
+ // BAD: God hook managing everything
66
+ const { cardId, dateFrom, dateTo, statusList } = usePageState();
67
+ ```
45
68
  - Custom hooks for logic isolation
69
+ - **No hidden side effects** (Toss principle: 숨은 로직을 드러내기)
70
+ ```typescript
71
+ // GOOD: Side effects visible at call site
72
+ const balance = await fetchBalance();
73
+ logging.log("balance_fetched"); // Explicit!
74
+
75
+ // BAD: Hidden logging inside function
76
+ function fetchBalance() {
77
+ logging.log("balance_fetched"); // Hidden!
78
+ return api.get('/balance');
79
+ }
80
+ ```
46
81
  - Pure computation in separate util files
47
82
  - UI components focused only on rendering
48
83
  - Domain logic separated from presentation
@@ -51,24 +86,64 @@ As a subagent, you operate independently with your own context. When invoked, yo
51
86
  - API calls directly in components
52
87
  - Business logic mixed with JSX
53
88
  - State management in view components
89
+ - **Type-based structure** (components/, hooks/, utils/ with mixed domains) - prefer domain-based
90
+ - **Cross-domain imports** (../../../domains/payment/hooks) - indicates poor cohesion
91
+ - **God hooks/components** managing >5 concerns - violates single responsibility
92
+ - **Hidden side effects** in business logic functions (logging, analytics, mutations)
54
93
  - Utils importing React hooks
55
94
  - Circular dependencies between layers
95
+ - **Props drilling >2 levels** - use composition or context instead
56
96
 
57
- ### 3. Code Readability
97
+ ### 3. Code Readability (Enhanced with Toss Principles)
58
98
 
59
99
  **✅ Look for:**
60
100
  - Self-documenting function/variable names
61
- - Complex conditions extracted to named variables
101
+ - **Complex conditions extracted to named variables** (Toss principle: 복잡한 조건에 이름을 붙이기)
102
+ ```typescript
103
+ // GOOD: Named conditions
104
+ const isSameCategory = products.some(p => p.category === filter.category);
105
+ const isPriceInRange = products.some(p => p.price >= minPrice && p.price <= maxPrice);
106
+ if (isSameCategory && isPriceInRange) { ... }
107
+
108
+ // BAD: Inline complex conditions
109
+ if (products.some(p => p.category === filter.category) &&
110
+ products.some(p => p.price >= minPrice && p.price <= maxPrice)) { ... }
111
+ ```
112
+ - **Named constants for magic numbers** (Toss principle: 매직 넘버 제거)
113
+ ```typescript
114
+ // GOOD: Named constant shows intent
115
+ const ANIMATION_DELAY_MS = 300;
116
+ await delay(ANIMATION_DELAY_MS);
117
+
118
+ // BAD: Magic number
119
+ await delay(300); // Why 300?
120
+ ```
121
+ - **Simplified ternary operators** (Toss principle: 중첩된 삼항 연산자 단순화)
122
+ ```typescript
123
+ // GOOD: IIFE with clear if statements
124
+ const status = (() => {
125
+ if (conditionA && conditionB) return "BOTH";
126
+ if (conditionA) return "A";
127
+ if (conditionB) return "B";
128
+ return "NONE";
129
+ })();
130
+
131
+ // BAD: Nested ternary hell
132
+ const status = conditionA && conditionB ? "BOTH" : conditionA || conditionB ? (conditionA ? "A" : "B") : "NONE";
133
+ ```
62
134
  - JSDoc for non-obvious logic
63
135
  - Consistent naming conventions (list*, get*, create*, update*, remove*)
64
136
  - TypeScript types that clarify intent
65
137
 
66
138
  **❌ Anti-patterns:**
67
139
  - Single-letter variables (except loop indices)
68
- - Magic numbers without constants
140
+ - **Magic numbers without constants** (timing, sizes, limits, thresholds)
69
141
  - Long functions (>50 lines)
142
+ - **Nested ternaries (>2 levels)** - use IIFE or if/else instead
70
143
  - Nested conditionals (>3 levels)
144
+ - **Unnamed complex conditions** - extract to variables with meaningful names
71
145
  - Abbreviated names that obscure meaning
146
+ - **Context switching code** (Toss: 시점 이동) - requiring jumps between multiple files/functions to understand simple logic
72
147
 
73
148
  ### 4. React-Specific Patterns
74
149