sonamu 0.8.24 → 0.8.26

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 (88) hide show
  1. package/dist/api/__tests__/config.test.js +189 -0
  2. package/dist/api/config.d.ts.map +1 -1
  3. package/dist/api/config.js +7 -2
  4. package/dist/api/sonamu.d.ts.map +1 -1
  5. package/dist/api/sonamu.js +14 -10
  6. package/dist/auth/index.d.ts +1 -0
  7. package/dist/auth/index.d.ts.map +1 -1
  8. package/dist/auth/index.js +2 -1
  9. package/dist/auth/knex-adapter.d.ts +23 -0
  10. package/dist/auth/knex-adapter.d.ts.map +1 -0
  11. package/dist/auth/knex-adapter.js +163 -0
  12. package/dist/auth/plugins/wrappers/admin.d.ts +2 -2
  13. package/dist/bin/__tests__/ts-loader-register.test.js +45 -0
  14. package/dist/bin/cli.js +47 -9
  15. package/dist/bin/ts-loader-register.js +3 -29
  16. package/dist/bin/ts-loader-registration.d.ts +2 -0
  17. package/dist/bin/ts-loader-registration.d.ts.map +1 -0
  18. package/dist/bin/ts-loader-registration.js +42 -0
  19. package/dist/cone/cone-generator.js +3 -3
  20. package/dist/database/puri-subset.test-d.js +9 -1
  21. package/dist/database/puri-subset.types.d.ts +1 -1
  22. package/dist/database/puri-subset.types.d.ts.map +1 -1
  23. package/dist/database/puri-subset.types.js +1 -1
  24. package/dist/testing/fixture-generator.js +5 -5
  25. package/dist/ui/ai-client.js +2 -2
  26. package/dist/ui/api.d.ts.map +1 -1
  27. package/dist/ui/api.js +14 -14
  28. package/dist/ui/cdd-service.d.ts +15 -18
  29. package/dist/ui/cdd-service.d.ts.map +1 -1
  30. package/dist/ui/cdd-service.js +246 -222
  31. package/dist/ui/cdd-types.d.ts +41 -68
  32. package/dist/ui/cdd-types.d.ts.map +1 -1
  33. package/dist/ui/cdd-types.js +2 -2
  34. package/dist/ui-web/assets/index-CKo0Z2Iu.css +1 -0
  35. package/dist/ui-web/assets/{index-CxiydzeC.js → index-DK-2aacv.js} +83 -83
  36. package/dist/ui-web/index.html +2 -2
  37. package/package.json +6 -2
  38. package/src/api/__tests__/config.test.ts +225 -0
  39. package/src/api/config.ts +10 -4
  40. package/src/api/sonamu.ts +16 -13
  41. package/src/auth/index.ts +1 -0
  42. package/src/auth/knex-adapter.ts +208 -0
  43. package/src/bin/__tests__/ts-loader-register.test.ts +62 -0
  44. package/src/bin/cli.ts +52 -9
  45. package/src/bin/ts-loader-register.ts +2 -32
  46. package/src/bin/ts-loader-registration.ts +55 -0
  47. package/src/cone/cone-generator.ts +2 -2
  48. package/src/database/puri-subset.test-d.ts +102 -0
  49. package/src/database/puri-subset.types.ts +1 -1
  50. package/src/skills/commands/sonamu-skills.md +20 -0
  51. package/src/skills/sonamu/SKILL.md +179 -137
  52. package/src/skills/sonamu/ai-agents.md +69 -69
  53. package/src/skills/sonamu/api.md +147 -147
  54. package/src/skills/sonamu/auth-migration.md +220 -220
  55. package/src/skills/sonamu/auth-plugins.md +83 -83
  56. package/src/skills/sonamu/auth.md +106 -106
  57. package/src/skills/sonamu/cdd.md +65 -200
  58. package/src/skills/sonamu/cone.md +138 -138
  59. package/src/skills/sonamu/config.md +191 -191
  60. package/src/skills/sonamu/create-sonamu.md +66 -66
  61. package/src/skills/sonamu/database.md +158 -158
  62. package/src/skills/sonamu/entity-basic.md +292 -293
  63. package/src/skills/sonamu/entity-relations.md +246 -246
  64. package/src/skills/sonamu/entity-validation-checklist.md +124 -124
  65. package/src/skills/sonamu/fixture-cli.md +231 -231
  66. package/src/skills/sonamu/framework-change.md +37 -37
  67. package/src/skills/sonamu/frontend.md +223 -223
  68. package/src/skills/sonamu/i18n.md +82 -82
  69. package/src/skills/sonamu/migration.md +77 -77
  70. package/src/skills/sonamu/model.md +222 -222
  71. package/src/skills/sonamu/naite.md +86 -86
  72. package/src/skills/sonamu/project-init.md +228 -228
  73. package/src/skills/sonamu/puri.md +122 -122
  74. package/src/skills/sonamu/scaffolding.md +154 -154
  75. package/src/skills/sonamu/skill-contribution.md +124 -124
  76. package/src/skills/sonamu/subset.md +46 -46
  77. package/src/skills/sonamu/tasks.md +82 -82
  78. package/src/skills/sonamu/testing-devrunner.md +147 -147
  79. package/src/skills/sonamu/testing.md +673 -673
  80. package/src/skills/sonamu/upsert.md +79 -79
  81. package/src/skills/sonamu/vector.md +67 -67
  82. package/src/testing/fixture-generator.ts +4 -4
  83. package/src/ui/ai-client.ts +1 -1
  84. package/src/ui/api.ts +18 -17
  85. package/src/ui/cdd-service.ts +264 -254
  86. package/src/ui/cdd-types.ts +40 -75
  87. package/dist/ui-web/assets/index-BrQKU3j9.css +0 -1
  88. package/src/skills/sonamu/workflow.md +0 -317
@@ -1,159 +1,159 @@
1
1
  ---
2
2
  name: sonamu-cone
3
- description: Cone 메타데이터 생성 관리 가이드. Entity의 fixture 생성, 문서화, 검색에 활용되는 메타데이터. LLM 또는 템플릿 기반 생성 지원. Use when creating or managing cone metadata for entities.
3
+ description: Guide for creating and managing cone metadata. Used for fixture generation, documentation, and search across Entity fields. Supports LLM-based or template-based generation. Use when creating or managing cone metadata for entities.
4
4
  ---
5
5
 
6
- # Cone 메타데이터 가이드
6
+ # Cone Metadata Guide
7
7
 
8
- Cone Entity의 prop, subset, enum 대한 메타데이터입니다.
9
- Fixture 생성 LLM 맥락에 맞는 현실적인 데이터를 생성하기 위해 `cone.note`를 참조합니다.
8
+ Cone is metadata for each prop, subset, and enum of an Entity.
9
+ During fixture generation, the LLM references `cone.note` to produce realistic, context-appropriate data.
10
10
 
11
11
  ---
12
12
 
13
- ## Cone의 역할
13
+ ## Role of Cone
14
14
 
15
- | 용도 | 설명 |
16
- |------|------|
17
- | **Fixture 생성** | `cone.note` 기반으로 LLM이 맥락에 맞는 테스트 데이터 생성 |
18
- | **Scaffolding** | cone 정보를 활용하여 model, view 템플릿 생성 |
19
- | **문서화** | Entity 구조와 필드 의미를 설명하는 메타데이터 |
15
+ | Purpose | Description |
16
+ |---------|-------------|
17
+ | **Fixture generation** | LLM generates contextually appropriate test data based on `cone.note` |
18
+ | **Scaffolding** | Uses cone information to generate model and view templates |
19
+ | **Documentation** | Metadata describing Entity structure and the meaning of each field |
20
20
 
21
21
  ---
22
22
 
23
- ## Cone 필드 종류
23
+ ## Cone Field Types
24
24
 
25
25
  ### Entity cone
26
26
 
27
- | 필드 | 타입 | 설명 |
28
- |------|------|------|
29
- | `note` | string | Entity 목적, 비즈니스 컨텍스트, fixture 생성 가이드 |
30
- | `tags` | string[] | 분류 태그 |
27
+ | Field | Type | Description |
28
+ |-------|------|-------------|
29
+ | `note` | string | Entity purpose, business context, and fixture generation guide |
30
+ | `tags` | string[] | Classification tags |
31
31
 
32
32
  ### Prop cone
33
33
 
34
- | 필드 | 타입 | 설명 |
35
- |------|------|------|
36
- | `note` | string | **최우선.** 필드의 비즈니스 의미, 구체적 예시, 범위, 형식 제약. LLM 읽고 데이터를 생성하는 입력 |
37
- | `fixtureGenerator` | string | **Fallback.** faker.js 표현식. API key 없을 때의 대체 수단 |
38
- | `fixtureDefault` | any | 고정 기본값 |
39
- | `fixtureStrategy` | string | `"sequence"` — DB 시퀀스로 id 자동 생성 사용 |
40
- | `dataSource` | object | relation prop의 참조 데이터 조회 전략 |
34
+ | Field | Type | Description |
35
+ |-------|------|-------------|
36
+ | `note` | string | **Highest priority.** Business meaning of the field, concrete examples, value ranges, format constraints. Input the LLM reads to generate data |
37
+ | `fixtureGenerator` | string | **Fallback.** faker.js expression. Fallback when no API key is available |
38
+ | `fixtureDefault` | any | Fixed default value |
39
+ | `fixtureStrategy` | string | `"sequence"` — used when id is auto-assigned by a DB sequence |
40
+ | `dataSource` | object | Strategy for fetching reference data for relation props |
41
41
 
42
42
  ### Subset cone
43
43
 
44
- | 필드 | 타입 | 설명 |
45
- |------|------|------|
46
- | `note` | string | 서브셋의 용도, 포함 필드, 사용 시점 |
44
+ | Field | Type | Description |
45
+ |-------|------|-------------|
46
+ | `note` | string | Subset purpose, included fields, and when it is used |
47
47
 
48
48
  ### Enum cone
49
49
 
50
- | 필드 | 타입 | 설명 |
51
- |------|------|------|
52
- | `note` | string | enum의 의미와 사용 맥락 |
53
- | `values` | object | 각 enum 값에 대한 `{ note: string }` |
50
+ | Field | Type | Description |
51
+ |-------|------|-------------|
52
+ | `note` | string | Meaning and usage context of the enum |
53
+ | `values` | object | `{ note: string }` for each enum value |
54
54
 
55
55
  ---
56
56
 
57
- ## Fixture 생성 우선순위
57
+ ## Priority During Fixture Generation
58
58
 
59
- `--use-llm` 플래그 사용 시:
59
+ When the `--use-llm` flag is used:
60
60
 
61
61
  ```
62
- 1. override (generate() 호출 시 전달)
63
- 2. cone.note + LLM ← API key 있을 때 최우선
64
- 3. fixtureGenerator (faker.js 표현식) ← LLM 실패 fallback
65
- 4. fixtureDefault (고정 기본값)
66
- 5. 타입별 기본값 (자동 생성)
62
+ 1. override value (passed at generate() call time)
63
+ 2. cone.note + LLM ← highest priority when API key is present
64
+ 3. fixtureGenerator (faker.js expression) ← fallback when LLM fails
65
+ 4. fixtureDefault (fixed default value)
66
+ 5. type-based default (auto-generated)
67
67
  ```
68
68
 
69
- **CRITICAL: `cone.note`가 비어있으면 LLM 맥락 없이 데이터를 생성하므로 품질이 떨어진다. Fixture 생성 전에 반드시 cone.note 존재 여부를 확인한다.**
69
+ **CRITICAL: If `cone.note` is empty, the LLM generates data without context, resulting in poor quality. Always verify that cone.note exists before running fixture generation.**
70
70
 
71
71
  ---
72
72
 
73
- ## CLI 명령어
73
+ ## CLI Commands
74
74
 
75
- ### 1. cone gen — LLM으로 cone 생성 (권장)
75
+ ### 1. cone gen — Generate cone with LLM (recommended)
76
76
 
77
- 프로젝트의 요구사항(`.claude/skills/project/*.md`) Entity 구조를 LLM에게 전달하여 맥락에 맞는 cone을 생성합니다.
77
+ Passes the project requirements (`.claude/skills/project/*.md`) and Entity structure to the LLM to generate contextually appropriate cone.
78
78
 
79
- **ANTHROPIC_API_KEY 필요** (`.env` 또는 `sonamu.config.ts`의 `secret.anthropic_api_key`)
79
+ **Requires ANTHROPIC_API_KEY** (`.env` or `sonamu.config.ts`'s `secret.anthropic_api_key`)
80
80
 
81
81
  ```bash
82
- # 단일 Entity
82
+ # Single Entity
83
83
  pnpm sonamu cone gen Post
84
84
 
85
- # 전체 Entity
85
+ # All Entities
86
86
  pnpm sonamu cone gen --all
87
87
 
88
- # 기존 cone 전체 재생성 (덮어쓰기)
88
+ # Regenerate all existing cones (overwrite)
89
89
  pnpm sonamu cone gen Post --regenerate
90
90
 
91
- # 전체 Entity 재생성
91
+ # Regenerate all Entities
92
92
  pnpm sonamu cone gen --all --regenerate
93
93
 
94
- # 로케일 지정
94
+ # Specify locale
95
95
  pnpm sonamu cone gen Post --locale en
96
96
  ```
97
97
 
98
- #### 옵션
98
+ #### Options
99
99
 
100
- | 옵션 | 설명 |
101
- |------|------|
102
- | `--all` | 모든 Entity의 cone 생성 |
103
- | `--regenerate` | 기존 cone 덮어씀 (기본: note가 없는 것만 생성) |
104
- | `--locale <ko\|en\|ja>` | 생성 언어 (기본: `sonamu.config.ts`의 `i18n.defaultLocale` 또는 `ko`) |
100
+ | Option | Description |
101
+ |--------|-------------|
102
+ | `--all` | Generate cone for all Entities |
103
+ | `--regenerate` | Overwrite existing cone (default: only generate for fields with no note) |
104
+ | `--locale <ko\|en\|ja>` | Generation language (default: `i18n.defaultLocale` from `sonamu.config.ts`, or `ko`) |
105
105
 
106
- #### 동작 방식
106
+ #### How it works
107
107
 
108
- - **기본 모드**: `onlyEmpty` — cone.note 비어있는 prop만 새로 생성, 기존 note는 보존
109
- - **`--regenerate` 모드**: 전체 재생성, 기존 cone 덮어쓰기
108
+ - **Default mode**: `onlyEmpty` — only generates for props where cone.note is empty; existing notes are preserved
109
+ - **`--regenerate` mode**: full regeneration, overwrites existing cone
110
110
 
111
- #### LLM이 참조하는 정보
111
+ #### Information referenced by the LLM
112
112
 
113
- 1. Entity JSON 구조 (props, subsets, enums, relations)
114
- 2. 도메인 규칙 파일 (`contract/**/*.contract.md`)
115
- 3. 기존 cone 메타데이터 (보존 모드 )
113
+ 1. Entity JSON structure (props, subsets, enums, relations)
114
+ 2. Domain rule files (`contract/**/*.contract.md`)
115
+ 3. Existing cone metadata (in preserve mode)
116
116
 
117
- ### 2. stub entity — Entity 생성 자동 cone 생성
117
+ ### 2. stub entity — Auto-generate cone when creating an Entity
118
118
 
119
119
  ```bash
120
- # 기본: 템플릿 cone 자동 생성 (API key 불필요)
120
+ # Default: auto-generate template cone (no API key required)
121
121
  pnpm sonamu stub entity Post
122
122
 
123
- # LLM으로 cone 생성
123
+ # Generate cone with LLM
124
124
  pnpm sonamu stub entity Post --ai
125
125
 
126
- # cone 생성 스킵
126
+ # Skip cone generation
127
127
  pnpm sonamu stub entity Post --no-cones
128
128
  ```
129
129
 
130
- #### 템플릿 cone vs LLM cone
130
+ #### Template cone vs LLM cone
131
131
 
132
- | 항목 | 템플릿 cone | LLM cone |
133
- |------|------------|----------|
134
- | API key | 불필요 | 필수 |
135
- | 품질 | faker-mappings 기반 기본값 | 프로젝트 맥락 반영 |
136
- | 속도 | 즉시 | 소요 |
137
- | 업그레이드 | `cone gen`으로 LLM 업그레이드 가능 | — |
132
+ | Item | Template cone | LLM cone |
133
+ |------|--------------|----------|
134
+ | API key | Not required | Required |
135
+ | Quality | Defaults based on faker-mappings | Reflects project context |
136
+ | Speed | Immediate | Takes a few seconds |
137
+ | Upgrade | Can be upgraded with `cone gen` | — |
138
138
 
139
139
  ---
140
140
 
141
- ## 주요 cone 패턴
141
+ ## Key Cone Patterns
142
142
 
143
- ### 일반 필드
143
+ ### General field
144
144
 
145
145
  ```json
146
146
  {
147
147
  "name": "title",
148
148
  "type": "string",
149
149
  "cone": {
150
- "note": "게시글 제목. 20~50 내외의 한국어 제목",
150
+ "note": "Post title. A Korean title roughly 2050 characters long",
151
151
  "fixtureGenerator": "faker.lorem.sentence()"
152
152
  }
153
153
  }
154
154
  ```
155
155
 
156
- ### relation 필드 (BelongsToOne)
156
+ ### Relation field (BelongsToOne)
157
157
 
158
158
  ```json
159
159
  {
@@ -162,7 +162,7 @@ pnpm sonamu stub entity Post --no-cones
162
162
  "with": "User",
163
163
  "relationType": "BelongsToOne",
164
164
  "cone": {
165
- "note": " 작성자. 기존 User 데이터를 참조",
165
+ "note": "Post author. References existing User data",
166
166
  "dataSource": {
167
167
  "strategy": "recent",
168
168
  "config": { "limit": 5 }
@@ -171,22 +171,22 @@ pnpm sonamu stub entity Post --no-cones
171
171
  }
172
172
  ```
173
173
 
174
- ### 상관 필드 (name + name_en )
174
+ ### Correlated fields (name + name_en, etc.)
175
175
 
176
- 상관 필드에는 `fixtureGenerator`를 설정하지 않는다. LLM row 단위로 번에 생성하여 일관성을 보장한다.
176
+ Do not set `fixtureGenerator` on correlated fields. The LLM generates them together per row to ensure consistency.
177
177
 
178
178
  ```json
179
179
  {
180
180
  "name": "name",
181
- "cone": { "note": "한국어 이름 (예: 김민수)" }
181
+ "cone": { "note": "Korean name (e.g. 김민수)" }
182
182
  },
183
183
  {
184
184
  "name": "name_en",
185
- "cone": { "note": "name의 로마자 표기 (예: Kim Minsu). name과 동일 인물이어야 " }
185
+ "cone": { "note": "Romanized form of name (e.g. Kim Minsu). Must refer to the same person as name" }
186
186
  }
187
187
  ```
188
188
 
189
- ### DB 시퀀스 PK
189
+ ### DB sequence PK
190
190
 
191
191
  ```json
192
192
  {
@@ -194,53 +194,53 @@ pnpm sonamu stub entity Post --no-cones
194
194
  "type": "string",
195
195
  "cone": {
196
196
  "fixtureStrategy": "sequence",
197
- "note": "DB 시퀀스가 자동 할당하는 순차 번호 (문자열 저장)"
197
+ "note": "Sequential number automatically assigned by the DB sequence (stored as string)"
198
198
  }
199
199
  }
200
200
  ```
201
201
 
202
- ### better-auth 엔티티 PK (Account / Session / Verification)
202
+ ### better-auth entity PK (Account / Session / Verification)
203
203
 
204
- better-auth 관리하는 엔티티의 id는 `crypto.randomUUID()`로 생성되는 UUID다.
205
- `fixtureStrategy: "sequence"`를 사용하면 fixture sync 시 `MAX(id::bigint)` 오류가 발생하므로 반드시 `fixtureGenerator: "faker.string.uuid()"`를 사용한다.
204
+ The id of entities managed by better-auth is a UUID generated via `crypto.randomUUID()`.
205
+ Using `fixtureStrategy: "sequence"` causes a `MAX(id::bigint)` error during fixture sync, so always use `fixtureGenerator: "faker.string.uuid()"`.
206
206
 
207
207
  ```json
208
208
  {
209
209
  "name": "id",
210
210
  "type": "string",
211
211
  "cone": {
212
- "note": "better-auth crypto.randomUUID()로 생성하는 UUID 형식의 식별자",
212
+ "note": "UUID-format identifier generated by better-auth via crypto.randomUUID()",
213
213
  "fixtureGenerator": "faker.string.uuid()"
214
214
  }
215
215
  }
216
216
  ```
217
217
 
218
- ### enum 필드
218
+ ### Enum field
219
219
 
220
220
  ```json
221
221
  {
222
222
  "name": "status",
223
223
  "type": "enum",
224
224
  "cone": {
225
- "note": "게시글 상태. draft/published/archived 중 선택"
225
+ "note": "Post status. One of draft/published/archived"
226
226
  }
227
227
  }
228
228
  ```
229
229
 
230
230
  ---
231
231
 
232
- ## dataSource 전략
232
+ ## dataSource Strategies
233
233
 
234
- relation prop에서 참조 데이터 조회 방식을 지정합니다.
234
+ Specifies how reference data is fetched for relation props.
235
235
 
236
- | 전략 | 설명 |
237
- |------|------|
238
- | `recent` | 최근 데이터 (created_at 기준) |
239
- | `sample` | 균등 샘플링 |
240
- | `random` | 랜덤 샘플링 |
241
- | `ids` | 특정 ID 지정 |
242
- | `query` | 사용자 정의 쿼리 |
243
- | `file` | 파일에서 로드 |
236
+ | Strategy | Description |
237
+ |----------|-------------|
238
+ | `recent` | Most recent data (by created_at) |
239
+ | `sample` | Uniform sampling |
240
+ | `random` | Random sampling |
241
+ | `ids` | Specific IDs |
242
+ | `query` | Custom query |
243
+ | `file` | Load from file |
244
244
 
245
245
  ```json
246
246
  "dataSource": {
@@ -249,22 +249,22 @@ relation prop에서 참조 데이터 조회 방식을 지정합니다.
249
249
  }
250
250
  ```
251
251
 
252
- ### DataExplorer 옵션 상세
252
+ ### DataExplorer Options Detail
253
253
 
254
- **소스코드:** `modules/sonamu/src/testing/data-explorer.ts`
254
+ **Source:** `modules/sonamu/src/testing/data-explorer.ts`
255
255
 
256
- | 옵션 | 타입 | 기본값 | 설명 |
257
- |------|------|--------|------|
258
- | `strategy` | string | — | 조회 전략 ( 참고) |
259
- | `limit` | number | — | 최대 조회 건수 |
260
- | `where` | object \| function | — | WHERE 조건 (객체 또는 Knex QueryBuilder 함수) |
261
- | `orderBy` | string | — | 정렬 기준 |
262
- | `ids` | number[] | — | `ids` 전략 특정 ID 목록 |
263
- | `filePath` | string | — | `file` 전략 시 파일 경로 |
264
- | `useCache` | boolean | `false` | 캐싱 사용 여부 |
265
- | `cacheTtl` | number | `300` | 캐시 TTL ( 단위) |
256
+ | Option | Type | Default | Description |
257
+ |--------|------|---------|-------------|
258
+ | `strategy` | string | — | Fetch strategy (see table above) |
259
+ | `limit` | number | — | Maximum number of records to fetch |
260
+ | `where` | object \| function | — | WHERE condition (object or Knex QueryBuilder function) |
261
+ | `orderBy` | string | — | Sort criteria |
262
+ | `ids` | number[] | — | Specific ID list for `ids` strategy |
263
+ | `filePath` | string | — | File path for `file` strategy |
264
+ | `useCache` | boolean | `false` | Whether to use caching |
265
+ | `cacheTtl` | number | `300` | Cache TTL (in seconds) |
266
266
 
267
- **where 조건 사용 예시:**
267
+ **Example using a where condition:**
268
268
 
269
269
  ```json
270
270
  "dataSource": {
@@ -276,47 +276,47 @@ relation prop에서 참조 데이터 조회 방식을 지정합니다.
276
276
  }
277
277
  ```
278
278
 
279
- ### 관계 탐색 옵션 (ExploreWithRelationsOptions)
279
+ ### Relation Traversal Options (ExploreWithRelationsOptions)
280
280
 
281
- `fixture gen`에서 관련 데이터를 함께 가져올 사용됩니다.
281
+ Used in `fixture gen` to fetch related data alongside the target data.
282
282
 
283
- | 옵션 | 타입 | 기본값 | 설명 |
284
- |------|------|--------|------|
285
- | `includeRelations` | boolean | `true` | 관련 데이터 포함 여부 |
286
- | `maxDepth` | number | `2` | 재귀 탐색 최대 깊이 |
283
+ | Option | Type | Default | Description |
284
+ |--------|------|---------|-------------|
285
+ | `includeRelations` | boolean | `true` | Whether to include related data |
286
+ | `maxDepth` | number | `2` | Maximum depth for recursive traversal |
287
287
 
288
288
  ---
289
289
 
290
- ## 실전
290
+ ## Practical Tips
291
291
 
292
- ### cone.note 작성 요령
292
+ ### Writing effective cone.note
293
293
 
294
- **note fixture 데이터 생성의 최우선 입력이다.** LLM note 읽고 맥락에 맞는 데이터를 생성한다. 따라서 구체적이고 도메인에 특화된 내용을 담아야 한다.
294
+ **note is the primary input for fixture data generation.** The LLM reads note to produce contextually appropriate data, so it must contain specific, domain-specialized content.
295
295
 
296
- - **구체적으로**: "문자열" 보다 "010-XXXX-XXXX 형식의 한국 전화번호"
297
- - **비즈니스 맥락 포함**: "직원의 연봉. 3000만원~1.5억원 범위"
298
- - **구체적 예시 포함**: "예: AI 기반 신약 개발 플랫폼 구축, 친환경 에너지 저장 시스템 개발"
299
- - **값 범위 명시**: "5천만원(50,000)에서 50억원(5,000,000) 사이"
300
- - **상관 필드 명시**: "name_en name의 로마자 표기이어야 "
301
- - **길이/형식 제한**: "20~100 한국어 자기소개"
296
+ - **Be specific**: "Korean phone number in 010-XXXX-XXXX format" rather than "string"
297
+ - **Include business context**: "Employee salary. Range: 30,000,000–150,000,000 KRW"
298
+ - **Include concrete examples**: "e.g. AI-based drug discovery platform development, eco-friendly energy storage system development"
299
+ - **State value ranges explicitly**: "Between 50,000,000 (50,000) and 5,000,000,000 (5,000,000)"
300
+ - **Describe correlated fields**: "name_en must be the romanized form of name"
301
+ - **Specify length/format constraints**: "Korean self-introduction, 20100 characters"
302
302
 
303
- ### LLM cone 생성 품질 높이기
303
+ ### Improving LLM cone generation quality
304
304
 
305
- 1. `contract/{domain}/{domain}.contract.md`에 도메인 규칙과 결정 근거를 상세히 기록
306
- 2. `cone gen` 실행 — LLM `contract/**/*.contract.md`를 컨텍스트로 사용
305
+ 1. Record domain rules and decision rationale in detail in `contract/{domain}/{domain}.contract.md`
306
+ 2. Run `cone gen` — the LLM uses `contract/**/*.contract.md` as context
307
307
 
308
- ### cone 재생성이 필요한 시점
308
+ ### When to regenerate cone
309
309
 
310
- - Entity에 prop 추가
311
- - 비즈니스 요구사항 변경
312
- - fixture 데이터 품질이 떨어질
313
- - `--regenerate` 없이 실행하면 기존 note는 보존되고 것만 채워짐
310
+ - After adding a new prop to an Entity
311
+ - After a business requirement change
312
+ - When fixture data quality is poor
313
+ - Running without `--regenerate` preserves existing notes and only fills in empty ones
314
314
 
315
315
  ---
316
316
 
317
- ## 참고 자료
317
+ ## References
318
318
 
319
- - **Fixture CLI**: `fixture-cli.md` — fixture gen/fetch/explore 명령어
320
- - **Testing**: `testing.md` — 테스트 작성 fixture 활용
321
- - **소스코드**: `modules/sonamu/src/cone/cone-generator.ts`
322
- - **템플릿 cone**: `modules/sonamu/src/entity/entity-template-cone.ts`
319
+ - **Fixture CLI**: `fixture-cli.md` — fixture gen/fetch/explore commands
320
+ - **Testing**: `testing.md` — writing tests and using fixtures
321
+ - **Source code**: `modules/sonamu/src/cone/cone-generator.ts`
322
+ - **Template cone**: `modules/sonamu/src/entity/entity-template-cone.ts`