Skip to content

chore: Claude Code 하네스 및 커밋 훅 구성 - #3

Merged
g-hyxn merged 10 commits into
developfrom
chore/claude-code-harness
Jul 6, 2026
Merged

chore: Claude Code 하네스 및 커밋 훅 구성#3
g-hyxn merged 10 commits into
developfrom
chore/claude-code-harness

Conversation

@g-hyxn

@g-hyxn g-hyxn commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

💡 배경 및 개요

ARENA-Android의 하네스 세팅(ARENA-Android#6)을 참고해 MUDDA에도 Claude Code 하네스와 로컬 커밋 훅을 구성했어요. develop에 이미 갖춰진 CI/CD·테스트 세팅과 겹치지 않는 부분만 추가했습니다.

📃 작업내용

  • AGENTS.md / CLAUDE.md — 프로젝트 스택·구조·커밋/브랜치/PR 컨벤션 가이드 문서 (develop의 실제 CI 구성 기준으로 작성)
  • .claude/rules/ — 파일 패턴별 자동 로드 규칙 4종 (typescript / react-native / styling / testing)
  • .claude/skills/commit / issue / pr 스킬 3종
  • husky + lint-staged(pre-commit: ESLint·Prettier) + commitlint(commit-msg) 로컬 훅 구성
  • typecheck 스크립트 추가 (tsc --noEmit)
  • 버그/기능 이슈 템플릿 및 CODEOWNERS 추가
  • .editorconfig 추가 (인코딩·들여쓰기 에디터 통일)

🙋‍♂️ 리뷰노트

  • CODEOWNERS는 ARENA와 동일하게 3인(@g-hyxn @koreahghg @yangeunjun00)으로 넣었어요. MUDDA 팀 구성이 다르면 알려주세요.
  • 커밋 메시지 검사는 기존 PR 제목 검사(pr-title-lint)와 별개로, 로컬 커밋 시점에 commitlint로 한 번 더 걸리는 구조예요. 한글 제목이 걸리지 않도록 subject-case 규칙은 껐습니다.
  • package.json 변경은 typecheck 스크립트 → 의존성 설치 → lint-staged 설정 3커밋으로 분리했고, lockfile은 의존성 커밋에 묶어 어느 커밋에서도 npm ci가 깨지지 않게 했어요.

✅ PR 체크리스트

  • 이 작업으로 인해 변경이 필요한 문서가 변경되었나요? (e.g. .env, 노션, README)
  • 이 작업을 하고나서 공유해야할 팀원들에게 공유되었나요? (e.g. "API 개발 완료됐어요", "환경값 추가되었어요")
  • 작업한 코드가 정상적으로 동작하나요?
  • Merge 대상 브랜치가 올바른가요?
  • PR과 관련 없는 작업이 있지는 않나요?

🤖 Generated with Claude Code

@g-hyxn g-hyxn self-assigned this Jul 6, 2026
@g-hyxn
g-hyxn requested review from koreahghg and yangeunjun00 July 6, 2026 10:56
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

📦 EAS Update 프리뷰가 pr-3 채널로 게시되었습니다.

Expo 대시보드에서 확인하세요: https://expo.dev/accounts/h4zx7/projects/MUDDA-CrossPlatform/updates

@g-hyxn
g-hyxn merged commit 6f9c4d9 into develop Jul 6, 2026
10 checks passed

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request establishes the project's development environment and standards by adding Claude agent rules, custom skills, GitHub templates, and pre-commit hooks using Husky, commitlint, and lint-staged. The review feedback suggests several practical refinements to the newly added rules and configurations: simplifying component prop type definitions in the React Native rules, using a generic code snippet instead of a specific file reference for Zustand store resets in the testing rules, allowing documented exceptions for type assertions in the TypeScript rules, and replacing 'npx --no' with 'npx --no-install' in the Husky commit-msg hook for broader npm compatibility.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.


- Components are function declarations: `export function LoginForm() {}`. Default exports only where expo-router requires them (route files in `src/app/`).
- Component files are kebab-case (`login-form.tsx`); one component per file as a rule.
- Props: define a `Props` type per component (`type LoginFormProps = {...}`); destructure in the signature.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

파일당 하나의 컴포넌트만 두는 규칙(line 9)을 따르고 있으므로, 컴포넌트 내부에서만 사용하는 Props 타입은 굳이 LoginFormProps처럼 컴포넌트 이름을 붙이지 않고 단순히 type Props = { ... }로 정의하는 것이 더 간결하고 일관성 있습니다. 외부로 내보내야 하거나 여러 컴포넌트가 한 파일에 존재할 때만 이름을 명시하도록 가이드를 보완하면 좋겠습니다.

Suggested change
- Props: define a `Props` type per component (`type LoginFormProps = {...}`); destructure in the signature.
- Props: define a local `Props` type per component (`type Props = {...}`); destructure in the signature. Use named props (e.g., `LoginFormProps`) only if exporting them.

Comment thread .claude/rules/testing.md
- Structure: `describe` per component/function, `it` names state the expected behavior in plain English.
- Run with `npm run test` (single run) or `npx jest --watch`; CI runs `npm run test:ci` (with coverage).
- New features and bug fixes ship with tests; a bug fix starts with a failing test that reproduces it.
- Zustand stores are module-level singletons — reset store state in `beforeEach` (see `useCounterStore.test.ts`) so tests stay independent.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Zustand 스토어 상태를 beforeEach에서 초기화하라는 규칙은 훌륭합니다. 다만 예시로 언급된 useCounterStore.test.ts 파일이 현재 프로젝트에 실제로 존재하지 않는다면, 새로운 개발자가 참고하려 할 때 혼란을 줄 수 있습니다. 실제 존재하는 테스트 파일로 예시를 변경하거나, Zustand 스토어 초기화 패턴의 간단한 코드 스니펫을 규칙 문서 내에 직접 포함하는 것을 제안합니다.

Suggested change
- Zustand stores are module-level singletons — reset store state in `beforeEach` (see `useCounterStore.test.ts`) so tests stay independent.
- Zustand stores are module-level singletons — reset store state in `beforeEach` (e.g., `useStore.getState().reset()`) so tests stay independent.


- `strict` mode is on — never weaken it. No `any`; use `unknown` + narrowing when the type is genuinely unknown.
- No non-null assertions (`!`) — handle the null case or restructure so it can't be null.
- No `as` type assertions except `as const`. If a cast seems necessary, fix the types instead.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

No as type assertions except as const 규칙은 다소 엄격할 수 있습니다. React Native 환경에서는 외부 라이브러리 연동, Native Event 객체 처리, 또는 useRef 등에서 불가피하게 타입 단언(as)을 사용해야 하는 경우가 발생합니다. 따라서 '원칙적으로 금지하되, 불가피한 경우(예: 외부 라이브러리 타입 한계, Native API 연동 등)에는 주석으로 이유를 명시하고 허용한다'와 같이 실용적인 예외 조항을 추가하는 것을 제안합니다.

Suggested change
- No `as` type assertions except `as const`. If a cast seems necessary, fix the types instead.
- No `as` type assertions except `as const` or where strictly unavoidable (e.g., third-party library types, native refs). If a cast is necessary, document the reason with a comment.

Comment thread .husky/commit-msg
@@ -0,0 +1 @@
npx --no -- commitlint --edit "$1"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

.husky/commit-msg 파일에서 npx --no를 사용하고 있습니다. 이는 일부 npm 버전에서 작동하지만, 모든 npm 버전에서 명확하고 안전하게 패키지 설치 없이 로컬 패키지를 실행하도록 보장하기 위해 npx --no-install을 사용하는 것이 더 권장됩니다.

npx --no-install -- commitlint --edit "$1"

@koreahghg
koreahghg deleted the chore/claude-code-harness branch July 7, 2026 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants