@kood/claude-code 0.3.7 → 0.3.9

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 (121) hide show
  1. package/dist/index.js +1 -1
  2. package/package.json +1 -1
  3. package/templates/.claude/agents/code-reviewer.md +138 -123
  4. package/templates/.claude/agents/dependency-manager.md +99 -84
  5. package/templates/.claude/agents/deployment-validator.md +70 -55
  6. package/templates/.claude/agents/git-operator.md +78 -63
  7. package/templates/.claude/agents/implementation-executor.md +109 -94
  8. package/templates/.claude/agents/ko-to-en-translator.md +74 -0
  9. package/templates/.claude/agents/lint-fixer.md +93 -78
  10. package/templates/.claude/agents/refactor-advisor.md +136 -121
  11. package/templates/.claude/commands/agent-creator.md +199 -184
  12. package/templates/.claude/commands/bug-fix.md +207 -192
  13. package/templates/.claude/commands/command-creator.md +69 -53
  14. package/templates/.claude/commands/docs-creator.md +72 -56
  15. package/templates/.claude/commands/docs-refactor.md +41 -25
  16. package/templates/.claude/commands/execute.md +27 -11
  17. package/templates/.claude/commands/git-all.md +46 -31
  18. package/templates/.claude/commands/git-session.md +57 -41
  19. package/templates/.claude/commands/git.md +49 -33
  20. package/templates/.claude/commands/lint-fix.md +153 -137
  21. package/templates/.claude/commands/lint-init.md +76 -60
  22. package/templates/.claude/commands/plan.md +275 -259
  23. package/templates/.claude/commands/prd.md +39 -23
  24. package/templates/.claude/commands/pre-deploy.md +124 -108
  25. package/templates/.claude/commands/refactor.md +162 -146
  26. package/templates/.claude/commands/version-update.md +32 -16
  27. package/templates/hono/CLAUDE.md +28 -27
  28. package/templates/hono/docs/architecture.md +24 -24
  29. package/templates/hono/docs/deployment/cloudflare.md +18 -18
  30. package/templates/hono/docs/deployment/docker.md +13 -13
  31. package/templates/hono/docs/deployment/index.md +19 -19
  32. package/templates/hono/docs/deployment/railway.md +32 -32
  33. package/templates/hono/docs/deployment/vercel.md +29 -29
  34. package/templates/hono/docs/guides/conventions.md +57 -57
  35. package/templates/hono/docs/guides/env-setup.md +47 -47
  36. package/templates/hono/docs/guides/getting-started.md +27 -27
  37. package/templates/hono/docs/library/hono/error-handling.md +11 -11
  38. package/templates/hono/docs/library/hono/index.md +4 -4
  39. package/templates/hono/docs/library/hono/middleware.md +18 -18
  40. package/templates/hono/docs/library/hono/rpc.md +7 -7
  41. package/templates/hono/docs/library/hono/validation.md +6 -6
  42. package/templates/hono/docs/library/prisma/cloudflare-d1.md +29 -29
  43. package/templates/hono/docs/library/prisma/config.md +16 -16
  44. package/templates/hono/docs/library/prisma/index.md +32 -32
  45. package/templates/hono/docs/library/t3-env/index.md +22 -22
  46. package/templates/hono/docs/library/zod/index.md +31 -31
  47. package/templates/nextjs/CLAUDE.md +54 -51
  48. package/templates/nextjs/docs/architecture.md +812 -0
  49. package/templates/nextjs/docs/design.md +183 -183
  50. package/templates/nextjs/docs/guides/conventions.md +86 -86
  51. package/templates/nextjs/docs/guides/getting-started.md +28 -28
  52. package/templates/nextjs/docs/guides/routes.md +32 -32
  53. package/templates/nextjs/docs/library/better-auth/index.md +70 -70
  54. package/templates/nextjs/docs/library/nextjs/app-router.md +43 -43
  55. package/templates/nextjs/docs/library/nextjs/caching.md +73 -73
  56. package/templates/nextjs/docs/library/nextjs/index.md +51 -51
  57. package/templates/nextjs/docs/library/nextjs/middleware.md +41 -41
  58. package/templates/nextjs/docs/library/nextjs/route-handlers.md +31 -31
  59. package/templates/nextjs/docs/library/nextjs/server-actions.md +34 -34
  60. package/templates/nextjs/docs/library/prisma/cloudflare-d1.md +20 -20
  61. package/templates/nextjs/docs/library/prisma/config.md +18 -18
  62. package/templates/nextjs/docs/library/prisma/crud.md +17 -17
  63. package/templates/nextjs/docs/library/prisma/index.md +18 -18
  64. package/templates/nextjs/docs/library/prisma/relations.md +16 -16
  65. package/templates/nextjs/docs/library/prisma/schema.md +23 -23
  66. package/templates/nextjs/docs/library/prisma/setup.md +6 -6
  67. package/templates/nextjs/docs/library/prisma/transactions.md +10 -10
  68. package/templates/nextjs/docs/library/tanstack-query/index.md +6 -6
  69. package/templates/nextjs/docs/library/tanstack-query/invalidation.md +20 -20
  70. package/templates/nextjs/docs/library/tanstack-query/optimistic-updates.md +4 -4
  71. package/templates/nextjs/docs/library/tanstack-query/use-mutation.md +15 -15
  72. package/templates/nextjs/docs/library/tanstack-query/use-query.md +22 -22
  73. package/templates/nextjs/docs/library/zod/complex-types.md +11 -11
  74. package/templates/nextjs/docs/library/zod/index.md +8 -8
  75. package/templates/nextjs/docs/library/zod/transforms.md +11 -11
  76. package/templates/nextjs/docs/library/zod/validation.md +9 -9
  77. package/templates/npx/CLAUDE.md +38 -37
  78. package/templates/npx/docs/library/commander/index.md +12 -12
  79. package/templates/npx/docs/library/fs-extra/index.md +9 -9
  80. package/templates/npx/docs/library/prompts/index.md +3 -3
  81. package/templates/npx/docs/references/patterns.md +12 -12
  82. package/templates/tanstack-start/CLAUDE.md +54 -53
  83. package/templates/tanstack-start/docs/architecture.md +128 -128
  84. package/templates/tanstack-start/docs/design.md +169 -169
  85. package/templates/tanstack-start/docs/guides/conventions.md +43 -43
  86. package/templates/tanstack-start/docs/guides/env-setup.md +35 -35
  87. package/templates/tanstack-start/docs/guides/getting-started.md +19 -19
  88. package/templates/tanstack-start/docs/guides/hooks.md +45 -45
  89. package/templates/tanstack-start/docs/guides/routes.md +54 -54
  90. package/templates/tanstack-start/docs/guides/services.md +45 -45
  91. package/templates/tanstack-start/docs/library/better-auth/index.md +68 -68
  92. package/templates/tanstack-start/docs/library/prisma/cloudflare-d1.md +19 -19
  93. package/templates/tanstack-start/docs/library/prisma/config.md +16 -16
  94. package/templates/tanstack-start/docs/library/prisma/crud.md +17 -17
  95. package/templates/tanstack-start/docs/library/prisma/index.md +17 -17
  96. package/templates/tanstack-start/docs/library/prisma/relations.md +16 -16
  97. package/templates/tanstack-start/docs/library/prisma/schema.md +23 -23
  98. package/templates/tanstack-start/docs/library/prisma/setup.md +6 -6
  99. package/templates/tanstack-start/docs/library/prisma/transactions.md +10 -10
  100. package/templates/tanstack-start/docs/library/t3-env/index.md +21 -160
  101. package/templates/tanstack-start/docs/library/tanstack-query/index.md +6 -6
  102. package/templates/tanstack-start/docs/library/tanstack-query/invalidation.md +19 -19
  103. package/templates/tanstack-start/docs/library/tanstack-query/optimistic-updates.md +4 -4
  104. package/templates/tanstack-start/docs/library/tanstack-query/use-mutation.md +14 -14
  105. package/templates/tanstack-start/docs/library/tanstack-query/use-query.md +21 -21
  106. package/templates/tanstack-start/docs/library/tanstack-router/error-handling.md +9 -9
  107. package/templates/tanstack-start/docs/library/tanstack-router/hooks.md +11 -11
  108. package/templates/tanstack-start/docs/library/tanstack-router/index.md +18 -18
  109. package/templates/tanstack-start/docs/library/tanstack-router/navigation.md +17 -17
  110. package/templates/tanstack-start/docs/library/tanstack-router/route-context.md +5 -5
  111. package/templates/tanstack-start/docs/library/tanstack-router/search-params.md +10 -10
  112. package/templates/tanstack-start/docs/library/tanstack-start/auth-patterns.md +8 -8
  113. package/templates/tanstack-start/docs/library/tanstack-start/index.md +15 -15
  114. package/templates/tanstack-start/docs/library/tanstack-start/middleware.md +9 -9
  115. package/templates/tanstack-start/docs/library/tanstack-start/routing.md +6 -6
  116. package/templates/tanstack-start/docs/library/tanstack-start/server-functions.md +18 -18
  117. package/templates/tanstack-start/docs/library/tanstack-start/setup.md +4 -4
  118. package/templates/tanstack-start/docs/library/zod/complex-types.md +11 -11
  119. package/templates/tanstack-start/docs/library/zod/index.md +8 -8
  120. package/templates/tanstack-start/docs/library/zod/transforms.md +11 -11
  121. package/templates/tanstack-start/docs/library/zod/validation.md +9 -9
@@ -1,4 +1,4 @@
1
- # Zod - 검증
1
+ # Zod - Validation
2
2
 
3
3
  <patterns>
4
4
 
@@ -6,10 +6,10 @@
6
6
  // Refinement (v4: message → error)
7
7
  const PasswordSchema = z.string()
8
8
  .min(8)
9
- .refine((val) => /[A-Z]/.test(val), { error: '대문자 필수' })
10
- .refine((val) => /[0-9]/.test(val), { error: '숫자 필수' })
9
+ .refine((val) => /[A-Z]/.test(val), { error: 'Uppercase letter required' })
10
+ .refine((val) => /[0-9]/.test(val), { error: 'Number required' })
11
11
 
12
- z.string().refine(val => val.includes("@")).min(5) // v4: refinement 체이닝
12
+ z.string().refine(val => val.includes("@")).min(5) // v4: chaining after refinement
13
13
 
14
14
  // Async
15
15
  const schema = z.string().refine(async (val) => val.length <= 8)
@@ -23,20 +23,20 @@ z.object({
23
23
  if (data.password !== data.confirmPassword) {
24
24
  ctx.addIssue({
25
25
  code: z.ZodIssueCode.custom,
26
- message: '비밀번호 불일치',
26
+ message: 'Passwords do not match',
27
27
  path: ['confirmPassword'],
28
28
  })
29
29
  }
30
- }) // v4: ctx.path 사용 불가
30
+ }) // v4: ctx.path is unavailable
31
31
 
32
- // 커스텀
32
+ // Custom
33
33
  const px = z.custom<`${number}px`>((val) =>
34
34
  typeof val === 'string' && /^\d+px$/.test(val)
35
35
  )
36
36
  px.parse('42px') // ✅
37
37
  px.parse('42vw') // throws
38
38
 
39
- // 에러 처리
39
+ // Error handling
40
40
  const result = schema.safeParse(data)
41
41
  if (!result.success) {
42
42
  result.error.errors.forEach((err) => {
@@ -50,7 +50,7 @@ export const createUser = createServerFn({ method: 'POST' })
50
50
  .inputValidator(zodValidator(createUserSchema))
51
51
  .handler(async ({ data }) => prisma.user.create({ data }))
52
52
 
53
- // 환경 변수
53
+ // Environment variables
54
54
  const env = z.object({
55
55
  NODE_ENV: z.enum(['development', 'production', 'test']),
56
56
  DATABASE_URL: z.string().url(),
@@ -1,19 +1,19 @@
1
1
  # CLAUDE.md - NPX CLI
2
2
 
3
- > Node.js CLI 도구 개발
3
+ > Node.js CLI tool development
4
4
 
5
5
  <context>
6
6
 
7
- **Purpose:** Node.js CLI 도구 개발을 위한 작업 지침
7
+ **Purpose:** Work instructions for Node.js CLI tool development
8
8
 
9
- **Scope:** npx 배포 가능한 CLI 패키지 구현
9
+ **Scope:** Implement CLI packages deployable via npx
10
10
 
11
11
  **Key Features:**
12
- - Commander.js 명령어 체계
13
- - 대화형 프롬프트 (prompts)
14
- - 파일 시스템 작업 (fs-extra)
12
+ - Commander.js command system
13
+ - Interactive prompts (prompts)
14
+ - File system operations (fs-extra)
15
15
  - TypeScript + ESM
16
- - 색상 출력 (picocolors)
16
+ - Colored output (picocolors)
17
17
 
18
18
  </context>
19
19
 
@@ -31,13 +31,13 @@
31
31
 
32
32
  <forbidden>
33
33
 
34
- | 분류 | 금지 행동 |
35
- |------|----------|
36
- | **Git 커밋** | AI 표시 (`Generated with Claude Code`, `🤖`, `Co-Authored-By:`), 여러 메시지, 이모지 |
37
- | **콘솔 출력** | `console.log` 직접 사용 (logger 함수 사용) |
38
- | **파일 작업** | 동기 API (`fs.readFileSync` ), 하드코딩된 경로 (path.join 사용) |
39
- | **에러 처리** | `process.exit()` 누락, try-catch 없는 async 작업 |
40
- | **코드 검색** | Bash grep/rg/find 명령어 (ast-grep 또는 전용 도구 사용) |
34
+ | Category | Prohibited Actions |
35
+ |----------|-------------------|
36
+ | **Git Commits** | AI markers (`Generated with Claude Code`, `🤖`, `Co-Authored-By:`), multi-line messages, emojis |
37
+ | **Console Output** | Direct `console.log` usage (use logger functions) |
38
+ | **File Operations** | Synchronous APIs (`fs.readFileSync`, etc.), hardcoded paths (use path.join) |
39
+ | **Error Handling** | Missing `process.exit()`, async operations without try-catch |
40
+ | **Code Search** | Bash grep/rg/find commands (use ast-grep or dedicated tools) |
41
41
 
42
42
  </forbidden>
43
43
 
@@ -45,15 +45,16 @@
45
45
 
46
46
  <required>
47
47
 
48
- | 작업 | 필수 행동 |
49
- |------|----------|
50
- | **작업 시작 전** | 관련 docs 읽기 (Commander → commander, 파일 → fs-extra) |
51
- | **콘솔 출력** | logger 함수 사용 (info/success/error/warn) |
52
- | **파일 작업** | async API (`fs-extra`), `path.join`으로 경로 조합 |
53
- | **에러 처리** | try-catch + `process.exit(1)`, 사용자에게 명확한 에러 메시지 |
54
- | **코드 검색** | ast-grep 사용 (함수/클래스/패턴 검색) |
55
- | **코드 작성** | UTF-8 인코딩, 코드 묶음별 한글 주석, const 함수 선언 |
56
- | **복잡한 작업** | Sequential Thinking MCP (5+ 단계 작업) |
48
+ | Task | Required Actions |
49
+ |------|-----------------|
50
+ | **Before Starting** | Read relevant docs (Commander → commander, Files → fs-extra) |
51
+ | **Document Search** | Use serena mcp (document indexing/search, context length optimization) |
52
+ | **Console Output** | Use logger functions (info/success/error/warn) |
53
+ | **File Operations** | Async API (`fs-extra`), `path.join` for paths |
54
+ | **Error Handling** | try-catch + `process.exit(1)`, clear error messages to users |
55
+ | **Code Search** | Use ast-grep (search functions/classes/patterns) |
56
+ | **Code Writing** | UTF-8 encoding, Korean comments per code block, const function declarations |
57
+ | **Complex Tasks** | Sequential Thinking MCP (5+ step tasks) |
57
58
 
58
59
  </required>
59
60
 
@@ -61,8 +62,8 @@
61
62
 
62
63
  <tech_stack>
63
64
 
64
- | 기술 | 버전 |
65
- |------|------|
65
+ | Technology | Version |
66
+ |-----------|---------|
66
67
  | Node.js | >= 18 (ESM) |
67
68
  | TypeScript | 5.x (strict) |
68
69
  | Commander | 12.x |
@@ -78,13 +79,13 @@
78
79
  <structure>
79
80
  ```
80
81
  src/
81
- ├── index.ts # CLI 진입점
82
- ├── commands/ # 명령어 모듈
82
+ ├── index.ts # CLI entry point
83
+ ├── commands/ # Command modules
83
84
  ├── utils/ # logger, copy
84
- └── types/ # 타입
85
+ └── types/ # Types
85
86
 
86
- templates/ # 빌드 복사
87
- dist/ # 빌드 결과물
87
+ templates/ # Copied during build
88
+ dist/ # Build output
88
89
  ```
89
90
  </structure>
90
91
 
@@ -92,9 +93,9 @@ dist/ # 빌드 결과물
92
93
 
93
94
  <conventions>
94
95
 
95
- **파일명:** kebab-case
96
- **TypeScript:** const 선언, 명시적 return type, interface(객체)/type(유니온), any→unknown
97
- **Import 순서:** 외부내부 → type
96
+ **File naming:** kebab-case
97
+ **TypeScript:** const declarations, explicit return types, interface(objects)/type(unions), any→unknown
98
+ **Import order:** externalinternal → type
98
99
 
99
100
  </conventions>
100
101
 
@@ -103,7 +104,7 @@ dist/ # 빌드 결과물
103
104
  <quick_patterns>
104
105
 
105
106
  ```typescript
106
- // CLI 진입점 (index.ts)
107
+ // CLI entry point (index.ts)
107
108
  #!/usr/bin/env node
108
109
  import { Command } from 'commander'
109
110
  import { logger } from './utils/logger.js'
@@ -142,7 +143,7 @@ export const logger = {
142
143
  ```
143
144
 
144
145
  ```typescript
145
- // 파일 복사 (utils/copy.ts)
146
+ // File copying (utils/copy.ts)
146
147
  import path from 'node:path'
147
148
  import { copy, pathExists } from 'fs-extra'
148
149
 
@@ -162,7 +163,7 @@ export const copyTemplate = async (
162
163
  ```
163
164
 
164
165
  ```typescript
165
- // 대화형 프롬프트
166
+ // Interactive prompts
166
167
  import prompts from 'prompts'
167
168
 
168
169
  const response = await prompts([
@@ -192,6 +193,6 @@ const response = await prompts([
192
193
  ```
193
194
  docs/
194
195
  ├── library/ # commander, fs-extra, prompts
195
- └── references/ # CLI 패턴, 베스트 프랙티스
196
+ └── references/ # CLI patterns, best practices
196
197
  ```
197
198
  </docs_structure>
@@ -1,10 +1,10 @@
1
1
  # Commander.js
2
2
 
3
- > Node.js CLI 프레임워크
3
+ > Node.js CLI framework
4
4
 
5
5
  <patterns>
6
6
 
7
- ## 기본 설정
7
+ ## Basic Setup
8
8
 
9
9
  ```typescript
10
10
  import { Command } from 'commander';
@@ -22,7 +22,7 @@ program.parse();
22
22
  ## Options
23
23
 
24
24
  ```typescript
25
- // 기본
25
+ // Basic
26
26
  program
27
27
  .option('-t, --template <name>', 'template name')
28
28
  .option('-f, --force', 'force overwrite')
@@ -31,19 +31,19 @@ program
31
31
  console.log(options.force); // boolean | undefined
32
32
  });
33
33
 
34
- // 필수
34
+ // Required
35
35
  program
36
36
  .requiredOption('-c, --config <path>', 'config file path')
37
37
  .action((options) => {
38
- // options.config 항상 존재
38
+ // options.config is always present
39
39
  });
40
40
 
41
- // 기본값
41
+ // Default values
42
42
  program
43
43
  .option('-p, --port <number>', 'port number', '3000')
44
44
  .option('-e, --env <name>', 'environment', 'development')
45
45
 
46
- // 여러
46
+ // Multiple values
47
47
  program
48
48
  .option('-i, --include <path...>', 'include paths')
49
49
  .action((options) => {
@@ -58,8 +58,8 @@ program
58
58
  .argument('<source>', 'source file')
59
59
  .argument('[destination]', 'destination file')
60
60
  .action((source, destination, options) => {
61
- console.log(source); // 필수
62
- console.log(destination); // 선택
61
+ console.log(source); // required
62
+ console.log(destination); // optional
63
63
  });
64
64
  ```
65
65
 
@@ -71,14 +71,14 @@ program
71
71
  .description('Initialize project')
72
72
  .option('-t, --template <name>', 'template')
73
73
  .action((options) => {
74
- // init 처리
74
+ // Handle init
75
75
  });
76
76
 
77
77
  program
78
78
  .command('build')
79
79
  .description('Build project')
80
80
  .action(() => {
81
- // build 처리
81
+ // Handle build
82
82
  });
83
83
  ```
84
84
 
@@ -95,7 +95,7 @@ program
95
95
  }
96
96
  });
97
97
 
98
- await program.parseAsync(); // await 필수
98
+ await program.parseAsync(); // await required
99
99
  ```
100
100
 
101
101
  </patterns>
@@ -1,6 +1,6 @@
1
1
  # fs-extra
2
2
 
3
- > Node.js 파일 시스템 유틸리티
3
+ > Node.js file system utilities
4
4
 
5
5
  <patterns>
6
6
 
@@ -8,14 +8,14 @@
8
8
  import fs from 'fs-extra';
9
9
  import path from 'path';
10
10
 
11
- // 존재 확인
11
+ // Check existence
12
12
  const exists = await fs.pathExists('/path/to/file');
13
13
 
14
- // 디렉토리 생성
14
+ // Create directory
15
15
  await fs.ensureDir('/path/to/nested/dir');
16
16
  await fs.mkdir('/path/to/dir');
17
17
 
18
- // 복사
18
+ // Copy
19
19
  await fs.copy('/src/file.txt', '/dest/file.txt');
20
20
  await fs.copy('/src/dir', '/dest/dir');
21
21
  await fs.copy(src, dest, {
@@ -24,18 +24,18 @@ await fs.copy(src, dest, {
24
24
  filter: (src) => !src.includes('node_modules'),
25
25
  });
26
26
 
27
- // 삭제
27
+ // Remove
28
28
  await fs.remove('/path/to/dir');
29
29
 
30
- // 디렉토리 읽기
30
+ // Read directory
31
31
  const items = await fs.readdir('/path/to/dir');
32
32
 
33
- // 파일 타입 확인
33
+ // Check file type
34
34
  const stat = await fs.stat(itemPath);
35
35
  if (stat.isDirectory()) { /* ... */ }
36
36
  if (stat.isFile()) { /* ... */ }
37
37
 
38
- // 파일 읽기/쓰기
38
+ // Read/Write files
39
39
  const content = await fs.readFile('/path/to/file', 'utf-8');
40
40
  await fs.writeFile('/path/to/file', content, 'utf-8');
41
41
 
@@ -43,7 +43,7 @@ await fs.writeFile('/path/to/file', content, 'utf-8');
43
43
  const data = await fs.readJson('/path/to/file.json');
44
44
  await fs.writeJson('/path/to/file.json', data, { spaces: 2 });
45
45
 
46
- // 재귀 복사
46
+ // Recursive copy
47
47
  const copyRecursive = async (src: string, dest: string) => {
48
48
  const counter = { files: 0, directories: 0 };
49
49
 
@@ -66,7 +66,7 @@ const { secret } = await prompts({
66
66
  message: 'Enter password:',
67
67
  });
68
68
 
69
- // 취소 처리
69
+ // Handle cancellation
70
70
  const { template } = await prompts({ /* ... */ });
71
71
 
72
72
  if (!template) {
@@ -74,14 +74,14 @@ if (!template) {
74
74
  process.exit(0);
75
75
  }
76
76
 
77
- // 연속 질문
77
+ // Multiple questions
78
78
  const response = await prompts([
79
79
  { type: 'text', name: 'name', message: 'Project name?' },
80
80
  { type: 'select', name: 'template', message: 'Template?', choices: [...] },
81
81
  { type: 'confirm', name: 'git', message: 'Initialize git?' },
82
82
  ]);
83
83
 
84
- // 조건부 질문
84
+ // Conditional questions
85
85
  const response = await prompts([
86
86
  { type: 'confirm', name: 'useTypescript', message: 'Use TypeScript?' },
87
87
  { type: (prev) => prev ? 'confirm' : null, name: 'strict', message: 'Enable strict mode?' },
@@ -1,10 +1,10 @@
1
1
  # NPX CLI Patterns
2
2
 
3
- > CLI 구현 통합 패턴
3
+ > Integrated CLI implementation patterns
4
4
 
5
5
  <patterns>
6
6
 
7
- ## CLI 진입점
7
+ ## CLI Entry Point
8
8
 
9
9
  ```typescript
10
10
  #!/usr/bin/env node
@@ -35,7 +35,7 @@ program
35
35
  program.parse();
36
36
  ```
37
37
 
38
- ## Logger 유틸
38
+ ## Logger Utility
39
39
 
40
40
  ```typescript
41
41
  import pc from 'picocolors';
@@ -49,7 +49,7 @@ export const logger = {
49
49
  };
50
50
  ```
51
51
 
52
- ## 대화형 템플릿 선택
52
+ ## Interactive Template Selection
53
53
 
54
54
  ```typescript
55
55
  import prompts from 'prompts';
@@ -61,7 +61,7 @@ export const selectAndCopyTemplate = async (
61
61
  templatesDir: string,
62
62
  targetDir: string,
63
63
  ): Promise<void> => {
64
- // 1. 템플릿 선택
64
+ // 1. Select template
65
65
  const { template } = await prompts({
66
66
  type: 'select',
67
67
  name: 'template',
@@ -77,7 +77,7 @@ export const selectAndCopyTemplate = async (
77
77
  process.exit(0);
78
78
  }
79
79
 
80
- // 2. 덮어쓰기 확인
80
+ // 2. Confirm overwrite
81
81
  const targetExists = await fs.pathExists(targetDir);
82
82
  if (targetExists) {
83
83
  const { overwrite } = await prompts({
@@ -93,14 +93,14 @@ export const selectAndCopyTemplate = async (
93
93
  }
94
94
  }
95
95
 
96
- // 3. 복사
96
+ // 3. Copy files
97
97
  const src = path.join(templatesDir, template);
98
98
  await fs.copy(src, targetDir, { overwrite: true });
99
99
  logger.success(`Template copied to ${targetDir}`);
100
100
  };
101
101
  ```
102
102
 
103
- ## ESM __dirname 처리
103
+ ## ESM __dirname Handling
104
104
 
105
105
  ```typescript
106
106
  import { fileURLToPath } from 'url';
@@ -109,11 +109,11 @@ import path from 'path';
109
109
  const __filename = fileURLToPath(import.meta.url);
110
110
  const __dirname = path.dirname(__filename);
111
111
 
112
- // 템플릿 디렉토리 경로
112
+ // Templates directory path
113
113
  const templatesDir = path.resolve(__dirname, '../templates');
114
114
  ```
115
115
 
116
- ## 재귀 복사 with Counter
116
+ ## Recursive Copy with Counter
117
117
 
118
118
  ```typescript
119
119
  import fs from 'fs-extra';
@@ -147,7 +147,7 @@ export const copyRecursive = async (
147
147
  };
148
148
  ```
149
149
 
150
- ## package.json 설정
150
+ ## package.json Configuration
151
151
 
152
152
  ```json
153
153
  {
@@ -167,7 +167,7 @@ export const copyRecursive = async (
167
167
  }
168
168
  ```
169
169
 
170
- ## tsup 설정
170
+ ## tsup Configuration
171
171
 
172
172
  ```typescript
173
173
  import { defineConfig } from 'tsup';
@@ -4,17 +4,17 @@
4
4
 
5
5
  <context>
6
6
 
7
- **Purpose:** TanStack Start 프레임워크 개발을 위한 작업 지침
7
+ **Purpose:** Work guidelines for TanStack Start framework development
8
8
 
9
- **Scope:** Full-stack React 애플리케이션 구현
9
+ **Scope:** Full-stack React application implementation
10
10
 
11
11
  **Key Features:**
12
12
  - File-based routing (TanStack Router)
13
- - Server Functions (타입 안전 API)
13
+ - Server Functions (type-safe API)
14
14
  - SSR + Streaming
15
- - TanStack Query 통합
16
- - Middleware 체계
17
- - Deployment 유연성 (Vercel, Cloudflare, Nitro)
15
+ - TanStack Query integration
16
+ - Middleware system
17
+ - Deployment flexibility (Vercel, Cloudflare, Nitro)
18
18
 
19
19
  </context>
20
20
 
@@ -36,14 +36,14 @@
36
36
 
37
37
  <forbidden>
38
38
 
39
- | 분류 | 금지 행동 |
40
- |------|----------|
41
- | **Git 커밋** | AI 표시 (`Generated with Claude Code`, `🤖`, `Co-Authored-By:`), 여러 메시지, 이모지 |
42
- | **Prisma** | `db push/migrate/generate` 자동 실행, `schema.prisma` 무단 수정 |
43
- | **API 라우터** | `/api` 경로에 라우터 생성 (Server Functions 사용) |
44
- | **Server Fn** | handler 내부에서 수동 검증/인증, `.validator()` 사용 (`.inputValidator()` 사용) |
45
- | **클라이언트** | Server Function 직접 호출 (TanStack Query 사용) |
46
- | **코드 검색** | Bash grep/rg/find 명령어 (ast-grep 또는 전용 도구 사용) |
39
+ | Category | Forbidden Actions |
40
+ |----------|-------------------|
41
+ | **Git Commits** | AI markers (`Generated with Claude Code`, `🤖`, `Co-Authored-By:`), multi-line messages, emojis |
42
+ | **Prisma** | Auto-running `db push/migrate/generate`, unauthorized `schema.prisma` modifications |
43
+ | **API Routes** | Creating routes in `/api` path (use Server Functions instead) |
44
+ | **Server Fn** | Manual validation/auth inside handler, using `.validator()` (use `.inputValidator()` instead) |
45
+ | **Client** | Direct Server Function calls (use TanStack Query) |
46
+ | **Code Search** | Bash grep/rg/find commands (use ast-grep or dedicated tools) |
47
47
 
48
48
  </forbidden>
49
49
 
@@ -51,17 +51,18 @@
51
51
 
52
52
  <required>
53
53
 
54
- | 작업 | 필수 행동 |
55
- |------|----------|
56
- | **작업 시작 전** | 관련 docs 읽기 (UI → design, API → tanstack-start, DB → prisma, 인증 → better-auth) |
57
- | **코드 검색** | ast-grep 사용 (함수/컴포넌트/패턴 검색) |
58
- | **복잡한 작업** | Sequential Thinking MCP (5+ 단계 작업) |
59
- | **대규모 수정** | gemini-review (3+ 파일 변경, 아키텍처 결정) |
60
- | **Server Function** | POST/PUT/PATCH → `.inputValidator()` 필수, 인증 필요 시 → `.middleware()` 필수 |
61
- | **클라이언트 API** | TanStack Query (`useQuery`/`useMutation`)로 Server Function 호출 |
62
- | **Custom Hook 순서** | State Global Hooks (useParams, useNavigate) → React Query Handlers → Memo → Effect |
63
- | **코드 작성** | UTF-8 인코딩, 코드 묶음별 한글 주석, const 함수 선언 |
64
- | **Prisma** | Multi-File 구조 (`prisma/schema/`), 모든 요소 한글 주석 필수 |
54
+ | Task | Required Actions |
55
+ |------|-----------------|
56
+ | **Before Starting** | Read related docs (UI → design, API → tanstack-start, DB → prisma, Auth → better-auth) |
57
+ | **Document Search** | Use serena mcp (document indexing/search, context length optimization) |
58
+ | **Code Search** | Use ast-grep (function/component/pattern search) |
59
+ | **Complex Tasks** | Sequential Thinking MCP (5+ step tasks) |
60
+ | **Large Changes** | gemini-review (3+ file changes, architecture decisions) |
61
+ | **Server Function** | POST/PUT/PATCH `.inputValidator()` required, Auth needed → `.middleware()` required |
62
+ | **Client API** | Call Server Functions via TanStack Query (`useQuery`/`useMutation`) |
63
+ | **Custom Hook Order** | State Global Hooks (useParams, useNavigate) React Query → Handlers → Memo → Effect |
64
+ | **Code Writing** | UTF-8 encoding, Korean comments per code block, const function declarations |
65
+ | **Prisma** | Multi-File structure (`prisma/schema/`), Korean comments on all elements required |
65
66
 
66
67
  </required>
67
68
 
@@ -69,14 +70,14 @@
69
70
 
70
71
  <tech_stack>
71
72
 
72
- | 기술 | 버전 | 주의 |
73
- |------|------|------|
74
- | TanStack Start | 최신 | - |
73
+ | Tech | Version | Notes |
74
+ |------|---------|-------|
75
+ | TanStack Start | Latest | - |
75
76
  | TypeScript | 5.x | strict |
76
77
  | Tailwind CSS | 4.x | @theme |
77
- | Prisma | **7.x** | `prisma-client`, output 필수 |
78
+ | Prisma | **7.x** | `prisma-client`, output required |
78
79
  | Zod | **4.x** | `z.email()`, `z.url()` |
79
- | Better Auth | 최신 | - |
80
+ | Better Auth | Latest | - |
80
81
  | TanStack Query | 5.x | - |
81
82
 
82
83
  </tech_stack>
@@ -88,36 +89,36 @@
88
89
  src/
89
90
  ├── routes/ # __root.tsx, index.tsx, $slug.tsx
90
91
  │ └── [path]/
91
- │ ├── -components/ # 페이지 전용 (필수)
92
- │ ├── -hooks/ # 페이지 전용 Custom Hooks (필수)
93
- │ └── -functions/ # 페이지 전용 Server Functions (필수)
94
- ├── functions/ # 공통 Server Functions
92
+ │ ├── -components/ # Page-specific (required)
93
+ │ ├── -hooks/ # Page-specific Custom Hooks (required)
94
+ │ └── -functions/ # Page-specific Server Functions (required)
95
+ ├── functions/ # Shared Server Functions
95
96
  ├── components/ui/
96
97
  ├── middleware/
97
98
  ├── database/prisma.ts
98
99
  └── lib/
99
100
  ```
100
101
 
101
- **필수 규칙:**
102
- - 페이지당 `-components/`, `-hooks/`, `-functions/` 폴더 필수 ( 무관)
103
- - Custom Hook은 페이지 크기와 무관하게 **반드시** `-hooks/` 폴더에 분리
104
- - 공통 함수 → `@/functions/`, 라우트 전용 → `routes/[경로]/-functions/`
102
+ **Required Rules:**
103
+ - Each page must have `-components/`, `-hooks/`, `-functions/` folders (regardless of line count)
104
+ - Custom Hooks **must always** be separated into `-hooks/` folder regardless of page size
105
+ - Shared functions → `@/functions/`, Route-specific → `routes/[path]/-functions/`
105
106
  </structure>
106
107
 
107
108
  ---
108
109
 
109
110
  <conventions>
110
111
 
111
- 파일명: kebab-case, Routes: `__root.tsx`, `$param.tsx`
112
- TypeScript: const 선언, 명시적 return type, interface(객체)/type(유니온), any→unknown
113
- Import 순서: 외부 → @/ → 상대경로 → type
112
+ Filenames: kebab-case, Routes: `__root.tsx`, `$param.tsx`
113
+ TypeScript: const declarations, explicit return types, interface (objects)/type (unions), any→unknown
114
+ Import order: external → @/ → relative → type
114
115
 
115
116
  Prisma Multi-File:
116
117
  ```
117
118
  prisma/schema/
118
119
  ├── +base.prisma # datasource, generator
119
- ├── +enum.prisma # enum
120
- └── [model].prisma # 모델별 (한글 주석!)
120
+ ├── +enum.prisma # enums
121
+ └── [model].prisma # per model (Korean comments!)
121
122
  ```
122
123
 
123
124
  </conventions>
@@ -127,12 +128,12 @@ prisma/schema/
127
128
  <quick_patterns>
128
129
 
129
130
  ```typescript
130
- // Server Function (GET + 인증)
131
+ // Server Function (GET + Auth)
131
132
  export const getUsers = createServerFn({ method: 'GET' })
132
133
  .middleware([authMiddleware])
133
134
  .handler(async () => prisma.user.findMany())
134
135
 
135
- // Server Function (POST + Validation + 인증)
136
+ // Server Function (POST + Validation + Auth)
136
137
  export const createUser = createServerFn({ method: 'POST' })
137
138
  .middleware([authMiddleware])
138
139
  .inputValidator(createUserSchema)
@@ -165,12 +166,12 @@ const mutation = useMutation({
165
166
 
166
167
  <ui_ux>
167
168
 
168
- | 원칙 | |
169
- |------|------|
170
- | 색상 | 60-30-10 (배경-보조-강조) |
171
- | 간격 | 8px 그리드 |
172
- | 접근성 | WCAG AA (대비 4.5:1+) |
173
- | 폰트 | 2-3 |
169
+ | Principle | Value |
170
+ |-----------|-------|
171
+ | Colors | 60-30-10 (background-secondary-accent) |
172
+ | Spacing | 8px grid |
173
+ | Accessibility | WCAG AA (4.5:1+ contrast) |
174
+ | Fonts | 2-3 fonts |
174
175
  | Safe Area | tailwindcss-safe-area |
175
176
 
176
177
  </ui_ux>
@@ -180,8 +181,8 @@ const mutation = useMutation({
180
181
  <docs_structure>
181
182
  ```
182
183
  docs/
183
- ├── guides/ # 시작하기, 규칙, 패턴
184
+ ├── guides/ # Getting started, conventions, patterns
184
185
  ├── library/ # tanstack-start/router/query, prisma, better-auth, t3-env, zod
185
- └── design.md # UI/UX 가이드
186
+ └── design.md # UI/UX guide
186
187
  ```
187
188
  </docs_structure>