codex-rule-maker 0.2.0__tar.gz → 0.3.0__tar.gz
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.
- codex_rule_maker-0.3.0/LICENSE +21 -0
- {codex_rule_maker-0.2.0 → codex_rule_maker-0.3.0}/PKG-INFO +10 -8
- {codex_rule_maker-0.2.0 → codex_rule_maker-0.3.0}/README.md +7 -7
- {codex_rule_maker-0.2.0 → codex_rule_maker-0.3.0}/codex_builder/profiles.py +132 -55
- {codex_rule_maker-0.2.0 → codex_rule_maker-0.3.0}/codex_builder/template_renderer.py +20 -4
- {codex_rule_maker-0.2.0 → codex_rule_maker-0.3.0}/codex_rule_maker.egg-info/PKG-INFO +10 -8
- {codex_rule_maker-0.2.0 → codex_rule_maker-0.3.0}/codex_rule_maker.egg-info/SOURCES.txt +1 -0
- {codex_rule_maker-0.2.0 → codex_rule_maker-0.3.0}/pyproject.toml +1 -1
- {codex_rule_maker-0.2.0 → codex_rule_maker-0.3.0}/codex_builder/__init__.py +0 -0
- {codex_rule_maker-0.2.0 → codex_rule_maker-0.3.0}/codex_builder/builder.py +0 -0
- {codex_rule_maker-0.2.0 → codex_rule_maker-0.3.0}/codex_builder/cli.py +0 -0
- {codex_rule_maker-0.2.0 → codex_rule_maker-0.3.0}/codex_builder/constants.py +0 -0
- {codex_rule_maker-0.2.0 → codex_rule_maker-0.3.0}/codex_builder/models.py +0 -0
- {codex_rule_maker-0.2.0 → codex_rule_maker-0.3.0}/codex_builder/prompt.py +0 -0
- {codex_rule_maker-0.2.0 → codex_rule_maker-0.3.0}/codex_builder/validator.py +0 -0
- {codex_rule_maker-0.2.0 → codex_rule_maker-0.3.0}/codex_rule_maker.egg-info/dependency_links.txt +0 -0
- {codex_rule_maker-0.2.0 → codex_rule_maker-0.3.0}/codex_rule_maker.egg-info/entry_points.txt +0 -0
- {codex_rule_maker-0.2.0 → codex_rule_maker-0.3.0}/codex_rule_maker.egg-info/requires.txt +0 -0
- {codex_rule_maker-0.2.0 → codex_rule_maker-0.3.0}/codex_rule_maker.egg-info/top_level.txt +0 -0
- {codex_rule_maker-0.2.0 → codex_rule_maker-0.3.0}/setup.cfg +0 -0
- {codex_rule_maker-0.2.0 → codex_rule_maker-0.3.0}/tests/test_builder.py +0 -0
- {codex_rule_maker-0.2.0 → codex_rule_maker-0.3.0}/tests/test_cli.py +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 주민재
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: codex-rule-maker
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: CLI tool that generates a .codex folder with AI developer rules and project reference documents.
|
|
5
5
|
Author: codex-rule-maker
|
|
6
6
|
Project-URL: Homepage, https://github.com/Sharon77770/codex_rule_maker
|
|
@@ -21,10 +21,12 @@ Classifier: Topic :: Software Development :: Code Generators
|
|
|
21
21
|
Classifier: Topic :: Software Development :: Documentation
|
|
22
22
|
Requires-Python: >=3.9
|
|
23
23
|
Description-Content-Type: text/markdown
|
|
24
|
+
License-File: LICENSE
|
|
24
25
|
Provides-Extra: dev
|
|
25
26
|
Requires-Dist: build<2,>=1; extra == "dev"
|
|
26
27
|
Requires-Dist: pytest<9,>=7; extra == "dev"
|
|
27
28
|
Requires-Dist: twine<7,>=5; extra == "dev"
|
|
29
|
+
Dynamic: license-file
|
|
28
30
|
|
|
29
31
|
# codex-rule-maker
|
|
30
32
|
|
|
@@ -222,13 +224,13 @@ docs/
|
|
|
222
224
|
|
|
223
225
|
## 지원 프레임워크 프로필
|
|
224
226
|
|
|
225
|
-
- `fastapi`: controller/service/repository/schema/entity
|
|
226
|
-
- `python`:
|
|
227
|
-
- `springboot`: controller/service/repository/entity/dto
|
|
228
|
-
- `react`: component/
|
|
229
|
-
- `nextjs`: App Router
|
|
230
|
-
- `node-express`: route/controller/service/repository 분리
|
|
231
|
-
- `fullstack-fastapi-react`: FastAPI 백엔드와 React 프론트엔드
|
|
227
|
+
- `fastapi`: 기능 폴더 하위 controller/service/repository/schema/entity 분리
|
|
228
|
+
- `python`: 기능/도메인 폴더 하위 service/adapter/model/CLI 경계 분리
|
|
229
|
+
- `springboot`: 기능 package 하위 controller/service/repository/entity/dto 분리
|
|
230
|
+
- `react`: 기능 폴더 하위 page/component/hook/service/store 분리
|
|
231
|
+
- `nextjs`: App Router 유지, 기능 폴더 하위 component/service/repository/type 분리
|
|
232
|
+
- `node-express`: 기능 폴더 하위 route/controller/service/repository 분리
|
|
233
|
+
- `fullstack-fastapi-react`: FastAPI 백엔드와 React 프론트엔드 모두 기능 폴더 하위 계층 분리 적용
|
|
232
234
|
|
|
233
235
|
여러 프로필은 comma로 조합할 수 있습니다.
|
|
234
236
|
|
|
@@ -194,13 +194,13 @@ docs/
|
|
|
194
194
|
|
|
195
195
|
## 지원 프레임워크 프로필
|
|
196
196
|
|
|
197
|
-
- `fastapi`: controller/service/repository/schema/entity
|
|
198
|
-
- `python`:
|
|
199
|
-
- `springboot`: controller/service/repository/entity/dto
|
|
200
|
-
- `react`: component/
|
|
201
|
-
- `nextjs`: App Router
|
|
202
|
-
- `node-express`: route/controller/service/repository 분리
|
|
203
|
-
- `fullstack-fastapi-react`: FastAPI 백엔드와 React 프론트엔드
|
|
197
|
+
- `fastapi`: 기능 폴더 하위 controller/service/repository/schema/entity 분리
|
|
198
|
+
- `python`: 기능/도메인 폴더 하위 service/adapter/model/CLI 경계 분리
|
|
199
|
+
- `springboot`: 기능 package 하위 controller/service/repository/entity/dto 분리
|
|
200
|
+
- `react`: 기능 폴더 하위 page/component/hook/service/store 분리
|
|
201
|
+
- `nextjs`: App Router 유지, 기능 폴더 하위 component/service/repository/type 분리
|
|
202
|
+
- `node-express`: 기능 폴더 하위 route/controller/service/repository 분리
|
|
203
|
+
- `fullstack-fastapi-react`: FastAPI 백엔드와 React 프론트엔드 모두 기능 폴더 하위 계층 분리 적용
|
|
204
204
|
|
|
205
205
|
여러 프로필은 comma로 조합할 수 있습니다.
|
|
206
206
|
|
|
@@ -46,17 +46,19 @@ class FrameworkProfile:
|
|
|
46
46
|
PYTHON_PROFILE = FrameworkProfile(
|
|
47
47
|
key="python",
|
|
48
48
|
display_name="Python",
|
|
49
|
-
philosophy_ko="일반 Python 프로젝트는 프레임워크 전제 없이
|
|
50
|
-
philosophy_en="General Python projects should
|
|
49
|
+
philosophy_ko="일반 Python 프로젝트는 프레임워크 전제 없이 기능/도메인 폴더를 우선하고, 각 기능 내부에서 service, adapter, CLI 경계를 명확히 분리한다.",
|
|
50
|
+
philosophy_en="General Python projects should prefer feature/domain folders first, then separate service, adapter, and CLI boundaries inside each feature without assuming a framework.",
|
|
51
51
|
architecture_ko=(
|
|
52
|
-
"패키지는 기능 또는 도메인 책임 기준으로 나누고
|
|
52
|
+
"패키지는 기능 또는 도메인 책임 기준으로 나누고 각 기능 폴더 하위에 service, adapter, model 등을 둔다.",
|
|
53
|
+
"공통 package는 여러 기능이 공유하는 정책, 설정, utility에만 사용한다.",
|
|
53
54
|
"CLI 또는 실행 진입점은 입력 파싱과 출력 변환만 담당하고 실제 판단은 service/application 계층에 위임한다.",
|
|
54
55
|
"핵심 도메인 함수와 클래스는 파일 시스템, 네트워크, 환경 변수, process args에 직접 의존하지 않게 한다.",
|
|
55
56
|
"파일, DB, 외부 API, subprocess 연동은 adapter 또는 infrastructure 모듈 뒤에 둔다.",
|
|
56
57
|
"권장 흐름: Entrypoint/CLI -> Application Service -> Domain/Adapter -> External System.",
|
|
57
58
|
),
|
|
58
59
|
architecture_en=(
|
|
59
|
-
"Split packages by feature or domain responsibility
|
|
60
|
+
"Split packages by feature or domain responsibility and place service, adapter, and model modules under each feature folder.",
|
|
61
|
+
"Use shared packages only for policies, settings, and utilities reused by multiple features.",
|
|
60
62
|
"CLI or runtime entrypoints should only parse input and map output, then delegate decisions to service/application layers.",
|
|
61
63
|
"Keep core domain functions and classes independent from filesystem, network, environment variables, and process args.",
|
|
62
64
|
"Put filesystem, database, external API, and subprocess integrations behind adapter or infrastructure modules.",
|
|
@@ -96,28 +98,39 @@ PYTHON_PROFILE = FrameworkProfile(
|
|
|
96
98
|
"Use `tmp_path`, monkeypatching, and test doubles to isolate filesystem and external dependencies.",
|
|
97
99
|
"Lock down CLI arguments, configuration parsing, and error paths with regression tests.",
|
|
98
100
|
),
|
|
99
|
-
directories=(
|
|
101
|
+
directories=(
|
|
102
|
+
"src/<package_name>/<feature>/services",
|
|
103
|
+
"src/<package_name>/<feature>/adapters",
|
|
104
|
+
"src/<package_name>/<feature>/models",
|
|
105
|
+
"src/<package_name>/shared",
|
|
106
|
+
"tests",
|
|
107
|
+
"scripts",
|
|
108
|
+
),
|
|
100
109
|
)
|
|
101
110
|
|
|
102
111
|
|
|
103
112
|
FASTAPI_PROFILE = FrameworkProfile(
|
|
104
113
|
key="fastapi",
|
|
105
114
|
display_name="FastAPI",
|
|
106
|
-
philosophy_ko="FastAPI의 가벼운 실행 모델은 유지하되,
|
|
107
|
-
philosophy_en="Keep FastAPI's lightweight runtime model, but
|
|
115
|
+
philosophy_ko="FastAPI의 가벼운 실행 모델은 유지하되, login/post/talk 같은 기능 폴더를 먼저 나누고 각 기능 안에서 Controller, Service, Repository, Schema, Entity 계층을 분리한다.",
|
|
116
|
+
philosophy_en="Keep FastAPI's lightweight runtime model, but split by feature/domain first, then separate Controller, Service, Repository, Schema, and Entity layers inside each feature.",
|
|
108
117
|
architecture_ko=(
|
|
109
|
-
"
|
|
110
|
-
"
|
|
118
|
+
"기능 경계는 `app/features/<feature>` 아래에 둔다. 예: login, post, talk.",
|
|
119
|
+
"HTTP 엔드포인트는 각 기능의 controller/router 계층에 두고 비즈니스 판단은 같은 기능의 service 계층으로 위임한다.",
|
|
120
|
+
"service 계층은 유스케이스 단위 메서드를 제공하고 같은 기능의 repository 또는 외부 연동 client를 조합한다.",
|
|
111
121
|
"repository 계층은 DB 접근만 담당하며 HTTP 요청/응답 객체를 알지 못해야 한다.",
|
|
112
|
-
"Pydantic schema는 요청/응답 계약이고 ORM entity는 저장 모델이다. 두
|
|
113
|
-
"
|
|
122
|
+
"Pydantic schema는 요청/응답 계약이고 ORM entity는 저장 모델이다. 두 모델은 같은 기능 폴더 안에서도 혼용하지 않는다.",
|
|
123
|
+
"공통 설정, DB session, 인증 dependency처럼 여러 기능이 공유하는 요소만 core/shared에 둔다.",
|
|
124
|
+
"권장 흐름: Controller -> Service -> Repository -> DB, 단 각 계층은 같은 기능 폴더 안에 둔다.",
|
|
114
125
|
),
|
|
115
126
|
architecture_en=(
|
|
116
|
-
"
|
|
117
|
-
"
|
|
127
|
+
"Use `app/features/<feature>` as the feature boundary, for example login, post, or talk.",
|
|
128
|
+
"Place HTTP endpoints in each feature's controller/router layer and delegate business decisions to the same feature's services.",
|
|
129
|
+
"Services expose use-case methods and coordinate repositories or external clients within the same feature.",
|
|
118
130
|
"Repositories only handle database access and must not know HTTP request/response objects.",
|
|
119
|
-
"Pydantic schemas are request/response contracts and ORM entities are persistence models. Do not mix them.",
|
|
120
|
-
"
|
|
131
|
+
"Pydantic schemas are request/response contracts and ORM entities are persistence models. Do not mix them even inside the same feature folder.",
|
|
132
|
+
"Put only cross-feature settings, DB sessions, auth dependencies, and shared policies in core/shared.",
|
|
133
|
+
"Recommended flow: Controller -> Service -> Repository -> DB, with each layer located inside the same feature folder.",
|
|
121
134
|
),
|
|
122
135
|
framework_rules_ko=(
|
|
123
136
|
"APIRouter는 라우팅과 의존성 연결만 담당한다.",
|
|
@@ -153,27 +166,39 @@ FASTAPI_PROFILE = FrameworkProfile(
|
|
|
153
166
|
"Use TestClient or httpx-based API tests to verify request/response contracts.",
|
|
154
167
|
"Verify repository tests against database schema and query behavior separately.",
|
|
155
168
|
),
|
|
156
|
-
directories=(
|
|
169
|
+
directories=(
|
|
170
|
+
"app/features/<feature>/controllers",
|
|
171
|
+
"app/features/<feature>/services",
|
|
172
|
+
"app/features/<feature>/repositories",
|
|
173
|
+
"app/features/<feature>/schemas",
|
|
174
|
+
"app/features/<feature>/entities",
|
|
175
|
+
"app/core",
|
|
176
|
+
"app/shared",
|
|
177
|
+
),
|
|
157
178
|
)
|
|
158
179
|
|
|
159
180
|
SPRINGBOOT_PROFILE = FrameworkProfile(
|
|
160
181
|
key="springboot",
|
|
161
182
|
display_name="Spring Boot",
|
|
162
|
-
philosophy_ko="Spring Boot 프로젝트는 Controller, Service, Repository, Entity, DTO 계층과 명시적 의존성 주입을
|
|
163
|
-
philosophy_en="Spring Boot projects should keep explicit Controller, Service, Repository, Entity, and DTO layers with dependency injection.",
|
|
183
|
+
philosophy_ko="Spring Boot 프로젝트는 기능 package를 먼저 나누고 각 기능 안에서 Controller, Service, Repository, Entity, DTO 계층과 명시적 의존성 주입을 유지한다.",
|
|
184
|
+
philosophy_en="Spring Boot projects should split by feature package first, then keep explicit Controller, Service, Repository, Entity, and DTO layers with dependency injection inside each feature.",
|
|
164
185
|
architecture_ko=(
|
|
165
|
-
"
|
|
166
|
-
"
|
|
186
|
+
"기능 경계는 `.../<feature>` package 아래에 둔다. 예: login, post, talk.",
|
|
187
|
+
"Controller는 각 기능 package 안에서 HTTP 요청/응답과 인증 컨텍스트 연결만 담당한다.",
|
|
188
|
+
"Service는 같은 기능 package 안에서 트랜잭션 경계와 비즈니스 규칙의 중심이다.",
|
|
167
189
|
"Repository는 JPA 또는 데이터 접근 인터페이스로 제한한다.",
|
|
168
190
|
"Entity는 DB 영속성 모델이고 DTO는 API 계약이다. Entity를 외부 응답으로 직접 노출하지 않는다.",
|
|
169
|
-
"
|
|
191
|
+
"공통 config, security, exception handler만 전역 package로 분리한다.",
|
|
192
|
+
"권장 흐름: Controller -> Service -> Repository -> DB, 단 각 계층은 같은 기능 package 안에 둔다.",
|
|
170
193
|
),
|
|
171
194
|
architecture_en=(
|
|
172
|
-
"
|
|
173
|
-
"
|
|
195
|
+
"Use `.../<feature>` packages as feature boundaries, for example login, post, or talk.",
|
|
196
|
+
"Controllers handle HTTP request/response mapping and security context wiring only inside each feature package.",
|
|
197
|
+
"Services own transaction boundaries and business rules inside the same feature package.",
|
|
174
198
|
"Repositories are limited to JPA or data access interfaces.",
|
|
175
199
|
"Entities are persistence models and DTOs are API contracts. Never expose entities directly in external responses.",
|
|
176
|
-
"
|
|
200
|
+
"Keep only shared config, security, and exception handlers in global packages.",
|
|
201
|
+
"Recommended flow: Controller -> Service -> Repository -> DB, with each layer located inside the same feature package.",
|
|
177
202
|
),
|
|
178
203
|
framework_rules_ko=(
|
|
179
204
|
"생성자 주입을 기본으로 사용한다.",
|
|
@@ -207,29 +232,38 @@ SPRINGBOOT_PROFILE = FrameworkProfile(
|
|
|
207
232
|
"Verify API contracts with WebMvcTest or integration tests.",
|
|
208
233
|
"Use DataJpaTest when repository queries and mappings need verification.",
|
|
209
234
|
),
|
|
210
|
-
directories=(
|
|
235
|
+
directories=(
|
|
236
|
+
"src/main/java/.../<feature>/controller",
|
|
237
|
+
"src/main/java/.../<feature>/service",
|
|
238
|
+
"src/main/java/.../<feature>/repository",
|
|
239
|
+
"src/main/java/.../<feature>/entity",
|
|
240
|
+
"src/main/java/.../<feature>/dto",
|
|
241
|
+
"src/main/java/.../global",
|
|
242
|
+
),
|
|
211
243
|
)
|
|
212
244
|
|
|
213
245
|
REACT_PROFILE = FrameworkProfile(
|
|
214
246
|
key="react",
|
|
215
247
|
display_name="React",
|
|
216
|
-
philosophy_ko="React 코드는 화면, 컴포넌트, 훅, 서비스, 상태 저장소를
|
|
217
|
-
philosophy_en="React code should separate pages, components, hooks, services, and stores without mixing UI and data access.",
|
|
248
|
+
philosophy_ko="React 코드는 기능 폴더를 먼저 나누고 각 기능 안에서 화면, 컴포넌트, 훅, 서비스, 상태 저장소를 분리해 UI와 데이터 접근을 섞지 않는다.",
|
|
249
|
+
philosophy_en="React code should split by feature first, then separate pages, components, hooks, services, and stores inside each feature without mixing UI and data access.",
|
|
218
250
|
architecture_ko=(
|
|
219
|
-
"
|
|
220
|
-
"
|
|
251
|
+
"기능 경계는 `src/features/<feature>` 아래에 둔다. 예: login, post, talk.",
|
|
252
|
+
"page는 각 기능의 라우팅 단위 화면 조립을 담당한다.",
|
|
253
|
+
"component는 기능 내부 UI와 표시 책임을 담당하고 여러 기능에서 재사용되는 것만 shared에 둔다.",
|
|
221
254
|
"hook은 화면 상태, 비동기 흐름, UI 유스케이스를 캡슐화한다.",
|
|
222
255
|
"service는 API 호출과 외부 클라이언트 경계만 담당한다.",
|
|
223
256
|
"store는 전역 상태를 담당하고 서버 응답 원본을 무분별하게 복제하지 않는다.",
|
|
224
|
-
"권장 흐름: Page -> Hook/Store -> Service -> API
|
|
257
|
+
"권장 흐름: Page -> Hook/Store -> Service -> API, 단 구현 위치는 같은 기능 폴더 안이다.",
|
|
225
258
|
),
|
|
226
259
|
architecture_en=(
|
|
227
|
-
"
|
|
228
|
-
"
|
|
260
|
+
"Use `src/features/<feature>` as the feature boundary, for example login, post, or talk.",
|
|
261
|
+
"Pages compose route-level screens inside each feature.",
|
|
262
|
+
"Components own feature UI and presentation; move only cross-feature reusable components to shared.",
|
|
229
263
|
"Hooks encapsulate screen state, async flow, and UI use cases.",
|
|
230
264
|
"Services own API calls and external client boundaries only.",
|
|
231
265
|
"Stores own global state and should not blindly duplicate raw server responses.",
|
|
232
|
-
"Recommended flow: Page -> Hook/Store -> Service -> API.",
|
|
266
|
+
"Recommended flow: Page -> Hook/Store -> Service -> API, with implementation located inside the same feature folder.",
|
|
233
267
|
),
|
|
234
268
|
framework_rules_ko=(
|
|
235
269
|
"컴포넌트 안에서 fetch/axios 호출을 직접 수행하지 않는다.",
|
|
@@ -263,27 +297,37 @@ REACT_PROFILE = FrameworkProfile(
|
|
|
263
297
|
"Hook tests verify state transitions and async flow.",
|
|
264
298
|
"Service tests verify API client boundaries and error mapping.",
|
|
265
299
|
),
|
|
266
|
-
directories=(
|
|
300
|
+
directories=(
|
|
301
|
+
"src/features/<feature>/pages",
|
|
302
|
+
"src/features/<feature>/components",
|
|
303
|
+
"src/features/<feature>/hooks",
|
|
304
|
+
"src/features/<feature>/services",
|
|
305
|
+
"src/features/<feature>/stores",
|
|
306
|
+
"src/features/<feature>/types",
|
|
307
|
+
"src/shared",
|
|
308
|
+
),
|
|
267
309
|
)
|
|
268
310
|
|
|
269
311
|
NEXTJS_PROFILE = FrameworkProfile(
|
|
270
312
|
key="nextjs",
|
|
271
313
|
display_name="Next.js",
|
|
272
|
-
philosophy_ko="Next.js는 App Router를 기본으로
|
|
273
|
-
philosophy_en="Next.js should use the App Router by default and clearly separate Server Component and Client Component responsibilities.",
|
|
314
|
+
philosophy_ko="Next.js는 App Router를 기본으로 하되, 기능 구현은 features 하위에 모으고 Server Component와 Client Component의 책임을 명확히 구분한다.",
|
|
315
|
+
philosophy_en="Next.js should use the App Router by default, keep feature implementation under features, and clearly separate Server Component and Client Component responsibilities.",
|
|
274
316
|
architecture_ko=(
|
|
275
317
|
"app 디렉토리는 라우트, 레이아웃, 서버 데이터 로딩의 기준 위치로 사용한다.",
|
|
318
|
+
"기능별 component, service, repository, type은 `features/<feature>` 아래에 둔다.",
|
|
276
319
|
"Server Component는 데이터 조회와 정적/서버 렌더링 책임을 담당한다.",
|
|
277
320
|
"Client Component는 브라우저 상태, 이벤트, 인터랙션이 필요한 경우에만 사용한다.",
|
|
278
321
|
"route handler는 API boundary이며 복잡한 비즈니스 로직은 service 계층으로 분리한다.",
|
|
279
|
-
"권장 흐름: Route/Page ->
|
|
322
|
+
"권장 흐름: Route/Page -> Feature Service -> Repository/External API.",
|
|
280
323
|
),
|
|
281
324
|
architecture_en=(
|
|
282
325
|
"Use the app directory as the place for routes, layouts, and server data loading.",
|
|
326
|
+
"Place feature components, services, repositories, and types under `features/<feature>`.",
|
|
283
327
|
"Server Components own data reads and static/server rendering.",
|
|
284
328
|
"Client Components are only for browser state, events, and interactions.",
|
|
285
329
|
"Route handlers are API boundaries; move complex business logic into services.",
|
|
286
|
-
"Recommended flow: Route/Page ->
|
|
330
|
+
"Recommended flow: Route/Page -> Feature Service -> Repository/External API.",
|
|
287
331
|
),
|
|
288
332
|
framework_rules_ko=(
|
|
289
333
|
"'use client'는 필요한 파일에만 선언한다.",
|
|
@@ -317,27 +361,39 @@ NEXTJS_PROFILE = FrameworkProfile(
|
|
|
317
361
|
"Verify Client Components around user interactions.",
|
|
318
362
|
"Verify routing and auth flow with integration or E2E tests.",
|
|
319
363
|
),
|
|
320
|
-
directories=(
|
|
364
|
+
directories=(
|
|
365
|
+
"app",
|
|
366
|
+
"features/<feature>/components",
|
|
367
|
+
"features/<feature>/services",
|
|
368
|
+
"features/<feature>/repositories",
|
|
369
|
+
"features/<feature>/types",
|
|
370
|
+
"components/shared",
|
|
371
|
+
"lib",
|
|
372
|
+
),
|
|
321
373
|
)
|
|
322
374
|
|
|
323
375
|
NODE_EXPRESS_PROFILE = FrameworkProfile(
|
|
324
376
|
key="node-express",
|
|
325
377
|
display_name="Node Express",
|
|
326
|
-
philosophy_ko="Express는 얇은 HTTP 계층으로 유지하고 route, controller, service, repository를 분리한다.",
|
|
327
|
-
philosophy_en="Keep Express as a thin HTTP layer and separate routes, controllers, services, and repositories.",
|
|
378
|
+
philosophy_ko="Express는 얇은 HTTP 계층으로 유지하고 기능 폴더 안에서 route, controller, service, repository를 분리한다.",
|
|
379
|
+
philosophy_en="Keep Express as a thin HTTP layer and separate routes, controllers, services, and repositories inside feature folders.",
|
|
328
380
|
architecture_ko=(
|
|
329
|
-
"
|
|
381
|
+
"기능 경계는 `src/features/<feature>` 아래에 둔다. 예: login, post, talk.",
|
|
382
|
+
"route는 각 기능 내부에서 URL과 middleware 연결만 담당한다.",
|
|
330
383
|
"controller는 요청 파싱, 응답 변환, service 호출만 담당한다.",
|
|
331
|
-
"service는 비즈니스 유스케이스와 트랜잭션 흐름을 담당한다.",
|
|
384
|
+
"service는 같은 기능 내부에서 비즈니스 유스케이스와 트랜잭션 흐름을 담당한다.",
|
|
332
385
|
"repository는 DB 접근을 담당하고 Express 객체를 알지 못해야 한다.",
|
|
333
|
-
"
|
|
386
|
+
"공통 middleware, config, error handler만 전역 경계로 둔다.",
|
|
387
|
+
"권장 흐름: Route -> Controller -> Service -> Repository -> DB, 단 각 계층은 같은 기능 폴더 안에 둔다.",
|
|
334
388
|
),
|
|
335
389
|
architecture_en=(
|
|
336
|
-
"
|
|
390
|
+
"Use `src/features/<feature>` as the feature boundary, for example login, post, or talk.",
|
|
391
|
+
"Routes only connect URLs and middleware inside each feature.",
|
|
337
392
|
"Controllers parse requests, map responses, and call services only.",
|
|
338
|
-
"Services own business use cases and transaction flow.",
|
|
393
|
+
"Services own business use cases and transaction flow inside the same feature.",
|
|
339
394
|
"Repositories own database access and must not know Express objects.",
|
|
340
|
-
"
|
|
395
|
+
"Keep only shared middleware, config, and error handlers in global boundaries.",
|
|
396
|
+
"Recommended flow: Route -> Controller -> Service -> Repository -> DB, with each layer located inside the same feature folder.",
|
|
341
397
|
),
|
|
342
398
|
framework_rules_ko=(
|
|
343
399
|
"비동기 오류 처리는 공통 error middleware로 모은다.",
|
|
@@ -371,24 +427,32 @@ NODE_EXPRESS_PROFILE = FrameworkProfile(
|
|
|
371
427
|
"Controller/route tests verify HTTP contracts with tools such as supertest.",
|
|
372
428
|
"Repository tests verify real query and transaction behavior.",
|
|
373
429
|
),
|
|
374
|
-
directories=(
|
|
430
|
+
directories=(
|
|
431
|
+
"src/features/<feature>/routes",
|
|
432
|
+
"src/features/<feature>/controllers",
|
|
433
|
+
"src/features/<feature>/services",
|
|
434
|
+
"src/features/<feature>/repositories",
|
|
435
|
+
"src/features/<feature>/types",
|
|
436
|
+
"src/shared",
|
|
437
|
+
"src/middlewares",
|
|
438
|
+
),
|
|
375
439
|
)
|
|
376
440
|
|
|
377
441
|
FULLSTACK_FASTAPI_REACT_PROFILE = FrameworkProfile(
|
|
378
442
|
key="fullstack-fastapi-react",
|
|
379
443
|
display_name="Fullstack FastAPI + React",
|
|
380
|
-
philosophy_ko="FastAPI 백엔드와 React 프론트엔드는 API 계약을 중심으로 분리하고,
|
|
381
|
-
philosophy_en="Separate the FastAPI backend and React frontend around the API contract while keeping
|
|
444
|
+
philosophy_ko="FastAPI 백엔드와 React 프론트엔드는 API 계약을 중심으로 분리하고, 양쪽 모두 기능 폴더 안에서 계층 규칙을 지킨다.",
|
|
445
|
+
philosophy_en="Separate the FastAPI backend and React frontend around the API contract while keeping layer rules inside feature folders on both sides.",
|
|
382
446
|
architecture_ko=(
|
|
383
|
-
"backend는 Controller -> Service -> Repository -> DB 흐름을
|
|
384
|
-
"frontend는 Page -> Hook/Store -> Service -> API 흐름을
|
|
447
|
+
"backend는 Controller -> Service -> Repository -> DB 흐름을 따르되 각 계층은 `backend/app/features/<feature>` 안에 둔다.",
|
|
448
|
+
"frontend는 Page -> Hook/Store -> Service -> API 흐름을 따르되 각 계층은 `frontend/src/features/<feature>` 안에 둔다.",
|
|
385
449
|
"docs/api/specification.md는 백엔드 response schema와 프론트엔드 service 타입의 공통 계약이다.",
|
|
386
450
|
"백엔드 Entity를 프론트엔드 타입으로 직접 취급하지 않는다.",
|
|
387
451
|
"인증, 오류, pagination, enum 값은 양쪽 구현과 문서를 함께 갱신한다.",
|
|
388
452
|
),
|
|
389
453
|
architecture_en=(
|
|
390
|
-
"Backend follows Controller -> Service -> Repository -> DB
|
|
391
|
-
"Frontend follows Page -> Hook/Store -> Service -> API
|
|
454
|
+
"Backend follows Controller -> Service -> Repository -> DB, with each layer under `backend/app/features/<feature>`.",
|
|
455
|
+
"Frontend follows Page -> Hook/Store -> Service -> API, with each layer under `frontend/src/features/<feature>`.",
|
|
392
456
|
"docs/api/specification.md is the shared contract between backend response schemas and frontend service types.",
|
|
393
457
|
"Do not treat backend entities as frontend types directly.",
|
|
394
458
|
"Update auth, errors, pagination, and enum values in both implementations and docs.",
|
|
@@ -427,7 +491,20 @@ FULLSTACK_FASTAPI_REACT_PROFILE = FrameworkProfile(
|
|
|
427
491
|
"Cover major user flows with E2E or integration tests.",
|
|
428
492
|
"Keep API mocks aligned with docs/api/specification.md.",
|
|
429
493
|
),
|
|
430
|
-
directories=(
|
|
494
|
+
directories=(
|
|
495
|
+
"backend/app/features/<feature>/controllers",
|
|
496
|
+
"backend/app/features/<feature>/services",
|
|
497
|
+
"backend/app/features/<feature>/repositories",
|
|
498
|
+
"backend/app/features/<feature>/schemas",
|
|
499
|
+
"backend/app/features/<feature>/entities",
|
|
500
|
+
"frontend/src/features/<feature>/pages",
|
|
501
|
+
"frontend/src/features/<feature>/components",
|
|
502
|
+
"frontend/src/features/<feature>/hooks",
|
|
503
|
+
"frontend/src/features/<feature>/services",
|
|
504
|
+
"frontend/src/features/<feature>/stores",
|
|
505
|
+
"backend/app/core",
|
|
506
|
+
"frontend/src/shared",
|
|
507
|
+
),
|
|
431
508
|
)
|
|
432
509
|
|
|
433
510
|
PROFILES: dict[str, FrameworkProfile] = {
|
|
@@ -174,7 +174,7 @@ class TemplateRenderer:
|
|
|
174
174
|
lines = [
|
|
175
175
|
f"# Architecture Rules - {config.project_name}",
|
|
176
176
|
"",
|
|
177
|
-
"This project follows a layered architecture. Keep responsibilities explicit and directional.",
|
|
177
|
+
"This project follows a feature-first layered architecture. Keep responsibilities explicit and directional.",
|
|
178
178
|
"",
|
|
179
179
|
"[Directory Structure]",
|
|
180
180
|
]
|
|
@@ -183,6 +183,11 @@ class TemplateRenderer:
|
|
|
183
183
|
lines.extend(f"- `{directory}`" for directory in profile.directories)
|
|
184
184
|
lines.extend(
|
|
185
185
|
[
|
|
186
|
+
"",
|
|
187
|
+
"[Feature Module Layout]",
|
|
188
|
+
"- Prefer feature/domain folders as the outer boundary, such as `login`, `post`, or `talk`.",
|
|
189
|
+
"- Place layer folders such as `controllers`, `services`, `repositories`, `schemas`, `entities`, `components`, or `hooks` inside each feature when the active profile uses them.",
|
|
190
|
+
"- Keep cross-cutting code in shared/core/infrastructure folders only when it is reused by multiple features.",
|
|
186
191
|
"",
|
|
187
192
|
"[Layer Responsibilities]",
|
|
188
193
|
"- Presentation/API layers handle request parsing, response mapping, routing, and UI composition only.",
|
|
@@ -203,7 +208,7 @@ class TemplateRenderer:
|
|
|
203
208
|
lines = [
|
|
204
209
|
f"# 아키텍처 규칙 - {config.project_name}",
|
|
205
210
|
"",
|
|
206
|
-
"이 프로젝트는
|
|
211
|
+
"이 프로젝트는 기능 우선 계층형 아키텍처를 따른다. 책임과 의존성 방향을 반드시 분리한다.",
|
|
207
212
|
"",
|
|
208
213
|
"[디렉토리 구조]",
|
|
209
214
|
]
|
|
@@ -212,6 +217,11 @@ class TemplateRenderer:
|
|
|
212
217
|
lines.extend(f"- `{directory}`" for directory in profile.directories)
|
|
213
218
|
lines.extend(
|
|
214
219
|
[
|
|
220
|
+
"",
|
|
221
|
+
"[기능 모듈 배치]",
|
|
222
|
+
"- `login`, `post`, `talk` 같은 기능/도메인 폴더를 바깥 경계로 우선한다.",
|
|
223
|
+
"- 활성 profile에서 사용하는 `controllers`, `services`, `repositories`, `schemas`, `entities`, `components`, `hooks` 같은 계층 폴더는 각 기능 폴더 안에 둔다.",
|
|
224
|
+
"- 여러 기능에서 공유하는 설정, 공통 middleware, 공통 client만 shared/core/infrastructure에 둔다.",
|
|
215
225
|
"",
|
|
216
226
|
"[계층 책임]",
|
|
217
227
|
"- Presentation/API 계층은 요청 파싱, 응답 변환, 라우팅, 화면 조립만 담당한다.",
|
|
@@ -978,9 +988,11 @@ class TemplateRenderer:
|
|
|
978
988
|
"- Directory path",
|
|
979
989
|
"- Major file path",
|
|
980
990
|
"- Responsibility",
|
|
981
|
-
"- Owner
|
|
991
|
+
"- Owner feature and layer",
|
|
982
992
|
"- Notes about important dependencies",
|
|
983
993
|
"",
|
|
994
|
+
"Use feature/domain folders as the outer boundary and document layer folders underneath each feature.",
|
|
995
|
+
"",
|
|
984
996
|
"## Current Structure",
|
|
985
997
|
"| Path | Type | Responsibility | Owner | Notes |",
|
|
986
998
|
"| --- | --- | --- | --- | --- |",
|
|
@@ -999,9 +1011,11 @@ class TemplateRenderer:
|
|
|
999
1011
|
"- 디렉토리 경로",
|
|
1000
1012
|
"- 주요 파일 경로",
|
|
1001
1013
|
"- 책임",
|
|
1002
|
-
"- 담당
|
|
1014
|
+
"- 담당 기능 및 계층",
|
|
1003
1015
|
"- 중요한 의존성 메모",
|
|
1004
1016
|
"",
|
|
1017
|
+
"기능/도메인 폴더를 바깥 경계로 두고, 각 기능 하위의 계층 폴더를 문서화한다.",
|
|
1018
|
+
"",
|
|
1005
1019
|
"## 현재 구조",
|
|
1006
1020
|
"| Path | Type | Responsibility | Owner | Notes |",
|
|
1007
1021
|
"| --- | --- | --- | --- | --- |",
|
|
@@ -1033,6 +1047,7 @@ class TemplateRenderer:
|
|
|
1033
1047
|
"## Layer Direction",
|
|
1034
1048
|
"- Document the real dependency direction used by this project.",
|
|
1035
1049
|
"- Explain what each layer may import and what it must not import.",
|
|
1050
|
+
"- Keep feature/domain folders as ownership boundaries and place each feature's layers underneath them.",
|
|
1036
1051
|
"",
|
|
1037
1052
|
"## Profile Architecture Notes",
|
|
1038
1053
|
]
|
|
@@ -1071,6 +1086,7 @@ class TemplateRenderer:
|
|
|
1071
1086
|
"## 계층 방향",
|
|
1072
1087
|
"- 이 프로젝트가 실제로 사용하는 의존성 방향을 기록한다.",
|
|
1073
1088
|
"- 각 계층이 import할 수 있는 대상과 금지 대상을 설명한다.",
|
|
1089
|
+
"- 기능/도메인 폴더를 소유권 경계로 두고 각 기능 하위에 계층 폴더를 둔다.",
|
|
1074
1090
|
"",
|
|
1075
1091
|
"## 프로필별 아키텍처 메모",
|
|
1076
1092
|
]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: codex-rule-maker
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: CLI tool that generates a .codex folder with AI developer rules and project reference documents.
|
|
5
5
|
Author: codex-rule-maker
|
|
6
6
|
Project-URL: Homepage, https://github.com/Sharon77770/codex_rule_maker
|
|
@@ -21,10 +21,12 @@ Classifier: Topic :: Software Development :: Code Generators
|
|
|
21
21
|
Classifier: Topic :: Software Development :: Documentation
|
|
22
22
|
Requires-Python: >=3.9
|
|
23
23
|
Description-Content-Type: text/markdown
|
|
24
|
+
License-File: LICENSE
|
|
24
25
|
Provides-Extra: dev
|
|
25
26
|
Requires-Dist: build<2,>=1; extra == "dev"
|
|
26
27
|
Requires-Dist: pytest<9,>=7; extra == "dev"
|
|
27
28
|
Requires-Dist: twine<7,>=5; extra == "dev"
|
|
29
|
+
Dynamic: license-file
|
|
28
30
|
|
|
29
31
|
# codex-rule-maker
|
|
30
32
|
|
|
@@ -222,13 +224,13 @@ docs/
|
|
|
222
224
|
|
|
223
225
|
## 지원 프레임워크 프로필
|
|
224
226
|
|
|
225
|
-
- `fastapi`: controller/service/repository/schema/entity
|
|
226
|
-
- `python`:
|
|
227
|
-
- `springboot`: controller/service/repository/entity/dto
|
|
228
|
-
- `react`: component/
|
|
229
|
-
- `nextjs`: App Router
|
|
230
|
-
- `node-express`: route/controller/service/repository 분리
|
|
231
|
-
- `fullstack-fastapi-react`: FastAPI 백엔드와 React 프론트엔드
|
|
227
|
+
- `fastapi`: 기능 폴더 하위 controller/service/repository/schema/entity 분리
|
|
228
|
+
- `python`: 기능/도메인 폴더 하위 service/adapter/model/CLI 경계 분리
|
|
229
|
+
- `springboot`: 기능 package 하위 controller/service/repository/entity/dto 분리
|
|
230
|
+
- `react`: 기능 폴더 하위 page/component/hook/service/store 분리
|
|
231
|
+
- `nextjs`: App Router 유지, 기능 폴더 하위 component/service/repository/type 분리
|
|
232
|
+
- `node-express`: 기능 폴더 하위 route/controller/service/repository 분리
|
|
233
|
+
- `fullstack-fastapi-react`: FastAPI 백엔드와 React 프론트엔드 모두 기능 폴더 하위 계층 분리 적용
|
|
232
234
|
|
|
233
235
|
여러 프로필은 comma로 조합할 수 있습니다.
|
|
234
236
|
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "codex-rule-maker"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.3.0"
|
|
8
8
|
description = "CLI tool that generates a .codex folder with AI developer rules and project reference documents."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.9"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{codex_rule_maker-0.2.0 → codex_rule_maker-0.3.0}/codex_rule_maker.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{codex_rule_maker-0.2.0 → codex_rule_maker-0.3.0}/codex_rule_maker.egg-info/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|