with one click
design-system
프로젝트에서 Compose 디자인 시스템 컴포넌트를 설계하고 구현합니다. 기존 컴포넌트 패턴(네이밍, 파라미터 설계, 모델 분리)을 준수하며, 디자인 시스템은 Layout과 Action에 대해서만 알아야 하고 Presentation 고유의 비즈니스 로직 사용은 지양합니다.
Menu
프로젝트에서 Compose 디자인 시스템 컴포넌트를 설계하고 구현합니다. 기존 컴포넌트 패턴(네이밍, 파라미터 설계, 모델 분리)을 준수하며, 디자인 시스템은 Layout과 Action에 대해서만 알아야 하고 Presentation 고유의 비즈니스 로직 사용은 지양합니다.
| name | design-system |
| description | 프로젝트에서 Compose 디자인 시스템 컴포넌트를 설계하고 구현합니다. 기존 컴포넌트 패턴(네이밍, 파라미터 설계, 모델 분리)을 준수하며, 디자인 시스템은 Layout과 Action에 대해서만 알아야 하고 Presentation 고유의 비즈니스 로직 사용은 지양합니다. |
디자인 시스템 컴포넌트는 아래 경로에 위치합니다:
presentation/src/main/java/com/smtm/pickle/presentation/designsystem/
├── theme/
│ ├── color/ # Color, ColorScheme, PickleColors, SemanticColors
│ ├── typography/ # Font(Pretendard), Typography
│ └── dimension/ # Dimensions (spacing, sizing 상수)
├── foundation/ # 유틸리티 레이어
└── components/ # 재사용 가능한 UI 컴포넌트
└── <category>/
├── Pickle<Name>.kt
└── model/
Pickle + PascalCase (예: PickleButton, PickleButtonV2)Pickle + PascalCase (예: PickleButtonType, PickleButtonSize)button/)기존 컴포넌트들이 따르는 파라미터 순서와 패턴을 준수합니다:
@Composable
fun Pickle<ComponentName>(
// 1. 필수 파라미터 (콘텐츠, 액션)
title: String,
onClick: () -> Unit,
// 2. modifier는 첫 번째 optional 파라미터
modifier: Modifier = Modifier,
// 3. 설정/상태 파라미터 (기본값 제공)
enabled: Boolean = true,
type: PickleButtonType = PickleButtonType.Primary,
size: PickleButtonSize = PickleButtonSize.Large,
// 4. 테마 기본값 파라미터
color: Color = PickleTheme.colors.base0,
textStyle: TextStyle = PickleTheme.typography.body1Bold,
// 5. 슬롯 파라미터 (마지막에 배치, trailing lambda)
content: @Composable ColumnScope.() -> Unit,
)
설정 옵션은 enum 또는 sealed interface로 분리하고, model/ 하위 디렉토리에 배치합니다:
// enum - 타입 분류
enum class PickleButtonType { Primary, Secondary, Tertiary, Ghost }
// enum - 사이즈 분류
enum class PickleButtonSize { Small, Medium, Large }
// enum + 확장 함수 - 스타일 매핑
@Composable
fun PickleButtonType.toColors(): ButtonColors { ... }
@Composable
fun PickleButtonSize.toSpec(): PickleButtonSizeSpec { ... }
PickleTheme.colors.* 또는 PickleTheme.semantic.* 사용PickleTheme.typography.* 사용Dimensions.* 객체 상수 사용// Good
color = PickleTheme.colors.primary400
textStyle = PickleTheme.typography.body1Bold
height = Dimensions.appbarHeight
// Bad
color = Color(0xFF2BC4C1)
fontSize = 16.sp
height = 56.dp
모든 컴포넌트는 @Preview를 포함하며, PickleTheme으로 감싸야 합니다:
@Preview
@Composable
private fun Pickle<ComponentName>Preview() {
PickleTheme {
Pickle<ComponentName>(
// 대표적인 사용 예시
)
}
}
components/<category>/ 디렉토리에 배치Pickle 접두사로 네이밍model/ 하위에 enum/sealed interface 분리PickleTheme 토큰만 사용 (하드코딩 금지)@Preview 작성Dimensions 객체에 추가This skill should be used when the user asks to "Preview 만들어줘", "Preview 추가해줘", "composable preview 생성", "@Preview 함수 만들어줘", "compose preview 붙여줘", or wants to generate @Preview functions for a Composable file or function. Takes a file path or composable function name as $ARGUMENTS.
현재 브랜치와 develop의 차이를 분석하여 코드 리뷰를 수행한 뒤, 프로젝트 PR 템플릿에 맞는 설명을 작성하고 Pull Request를 생성합니다. "PR 만들어줘", "pull request 생성", "PR 올려줘", "PR 작성" 등의 요청에 응답합니다.
staged git 변경사항을 분석하여 프로젝트 커밋 컨벤션에 맞는 커밋 메시지 2-3개를 추천합니다. "커밋 메시지 추천", "commit 메시지", "어떻게 커밋할까", "커밋 어떻게 써", "git commit 도움" 등의 요청에 응답합니다. 커밋을 직접 실행하지 않습니다.
API 명세를 기반으로 Domain Layer(Model, UseCase, Repository Interface)와 Data Layer(RepositoryImpl, Retrofit API, Hilt 바인딩, Remote Model, Mapper)를 일관된 프로젝트 패턴에 맞춰 생성합니다.