From 2a243f747ea8a9579b5ee691c03094ad94292b3f Mon Sep 17 00:00:00 2001 From: "gnoes.ios" Date: Wed, 2 Sep 2026 01:58:10 +0900 Subject: [PATCH 1/8] =?UTF-8?q?docs:=20=EC=A7=84=EC=9E=85=20=EB=AC=B8?= =?UTF-8?q?=EC=84=9C=EB=A5=BC=20=EB=84=A4=20=EA=B5=AC=ED=9A=8D=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20=EC=9E=AC=EC=9E=91=EC=84=B1=ED=95=98=EA=B3=A0=20CLA?= =?UTF-8?q?UDE.md=20=EB=A5=BC=20=EC=8B=AC=EB=A7=81=ED=81=AC=EB=A1=9C=20?= =?UTF-8?q?=EA=B5=90=EC=B2=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AGENTS.md | 102 ++++++++++++++---------------------------------------- CLAUDE.md | 87 +--------------------------------------------- 2 files changed, 27 insertions(+), 162 deletions(-) mode change 100644 => 120000 CLAUDE.md diff --git a/AGENTS.md b/AGENTS.md index 69354eb..28fdda8 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -2,92 +2,42 @@ Mozi 작업 시 에이전트 진입점. -## 1. 프로젝트 한 줄 +--- -```text -Tuist multi-project iOS 앱 -세로 계층은 모듈, 가로 Feature는 폴더 -TCA + Domain Client + App live 조립 -``` - -## 2. 문서 우선순위 - -1. `docs/ARCHITECTURE.md` — 전역 구조 -2. `docs/CONVENTIONS.md` — 작성 규칙(주석/테스트/형식) -3. `docs/AGENT_WORKFLOW.md` — 실행/hard gate -4. `docs/skills.md` — 스킬 인덱스 -5. `AGENTS.md` — 진입 요약 -6. `CLAUDE.md` → `AGENTS.md` -7. `Projects/**/README.md` — 모듈 디테일 - -## 3. 구조 요약 + 금지 의존 - -```text -Projects/ - Shared/{Util,DesignSystem,Logger} - ThirdParty/{ThirdParty,ThirdPartyUI,ThirdPartyCore} - Domain/ - Core/{Network,Storage,SocialAuth} - Data/ - Feature/ - App/ -``` - -금지: - -```text -Feature → Data / Core* / ThirdPartyCore -Domain → Data / Core* / Feature -Data → Feature -``` - -## 4. 현재 앱 흐름 - -```text -MoziApp → CompositionRoot → RootFeature → AppCoordinator - bootstrapping → login / onboarding / main -``` +## 어디를 보나 -## 5. 핵심 규칙 요약 +| 질문 | 문서 | +|---|---| +| 모듈·의존·앱 흐름 | [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) | +| 코딩·Git 규칙 | [docs/CONVENTIONS.md](docs/CONVENTIONS.md) | +| 모듈 내부 규칙·진입점 | `Projects/**/README.md` | +| 포맷·안전성 | [.swiftlint.yml](.swiftlint.yml) | +| 리뷰 기준 | [.coderabbit.yaml](.coderabbit.yaml) | +| PR 본문 | [.github/pull_request_template.md](.github/pull_request_template.md) | -1. Feature 모듈 분리 금지 -2. Scene 직접 참조 금지 -3. live 조립 App only -4. Feature 는 Domain `*Client` 만 -5. scheme: `Mozi-Debug` / `Mozi`, bundle: `com.teamMozi.debug` / `com.teamMozi.app` +--- -## 6. Git / PR Hard Gate 요약 +## 절대 규칙 -- `커밋해` 전 staging/commit/push 금지 -- 커밋 계획 전 로컬 린트 1회 -- 커밋은 계획(제목+의도+파일) 1회 승인 후 진행 -- `기능 분해해` = 분해/문서만, 구현·생성 금지 -- `Cycle ... 워크트리/세션 만들어` 전 worktree/session 생성 금지 -- `PR 초안` / `작성만` = 본문만 -- `PR 생성해` / `PR 올려` / `올려` 전 PR 생성 금지 -- PR용 push 전 `origin/dev` rebase, 충돌 시 중단 +1. Feature 는 단일 모듈이다. 기능은 폴더로 나눈다 +2. Scene 간 직접 참조를 금지한다. `delegate` 로 상위에 올린다 +3. Feature 의 데이터 접근은 Domain `*Client` 만 쓴다 +4. `*Client` live 구현 제공은 Data 가 하고, 등록과 주입은 App 만 한다 +5. 금지 의존: `Feature → Data / Core* / ThirdPartyCore`, `Domain → Data / Core* / Feature`, `Data → Feature`, `Core/* → Domain / Data / Feature / App` +6. `AppShell`, `AppRuntime`, `AppEnvironment`, `AppConstants` 와 UseCase 층을 만들지 않는다 -상세 절차: [docs/AGENT_WORKFLOW.md](docs/AGENT_WORKFLOW.md) -형식 규칙: [docs/CONVENTIONS.md](docs/CONVENTIONS.md) -스킬: [docs/skills.md](docs/skills.md) +--- -### Model / Effort 요약 +## 먼저 물을 것 -- model: 세션 시작 model 상속 (임의 교체 금지) -- 기본: `medium` -- design/review: `high` -- implement: `low`~`medium` -- commit/cleanup: `low` -- PR: `medium` -- `max`/`ultra` 금지 -- 상세: [docs/AGENT_WORKFLOW.md](docs/AGENT_WORKFLOW.md#15-model--effort-policy) +- Feature 모듈 분리 +- Feature → Data / Core 직접 참조 +- scheme / bundle 이름 변경 +- 문서 추가·분리 -- 커밋: `$mozi-commit` -- 기능 분해/분기: `$mozi-feature-split` -- PR: `$mozi-pr` -- cleanup: `$mozi-worktree-cleanup` +--- -## 7. 명령 +## 자주 쓰는 명령 ```bash mise install diff --git a/CLAUDE.md b/CLAUDE.md deleted file mode 100644 index 43b1a77..0000000 --- a/CLAUDE.md +++ /dev/null @@ -1,86 +0,0 @@ -# AGENTS - -Mozi 작업 시 에이전트 진입점. - -## 1. 프로젝트 한 줄 - -```text -Tuist multi-project iOS 앱 -세로 계층은 모듈, 가로 Feature는 폴더 -TCA + Domain Client + App live 조립 -``` - -## 2. 문서 우선순위 - -1. `docs/ARCHITECTURE.md` — 전역 구조 -2. `docs/CONVENTIONS.md` — 작성 규칙(주석/테스트/형식) -3. `docs/AGENT_WORKFLOW.md` — 실행/hard gate -4. `docs/skills.md` — 스킬 인덱스 -5. `AGENTS.md` — 진입 요약 -6. `CLAUDE.md` → `AGENTS.md` -7. `Projects/**/README.md` — 모듈 디테일 - -## 3. 구조 요약 + 금지 의존 - -```text -Projects/ - Shared/{Util,DesignSystem,Logger} - ThirdParty/{ThirdParty,ThirdPartyUI,ThirdPartyCore} - Domain/ - Core/{Network,Storage,SocialAuth} - Data/ - Feature/ - App/ -``` - -금지: - -```text -Feature → Data / Core* / ThirdPartyCore -Domain → Data / Core* / Feature -Data → Feature -``` - -## 4. 현재 앱 흐름 - -```text -MoziApp → CompositionRoot → RootFeature → AppCoordinator - bootstrapping → main(Placeholder) -``` - -## 5. 핵심 규칙 요약 - -1. Feature 모듈 분리 금지 -2. Scene 직접 참조 금지 -3. live 조립 App only -4. Feature 는 Domain `*Client` 만 -5. scheme: `Mozi-Debug` / `Mozi`, bundle: `com.teamMozi.debug` / `com.teamMozi.app` - -## 6. Git / PR Hard Gate 요약 - -- `커밋해` 전 staging/commit/push 금지 -- 커밋 계획 전 로컬 린트 1회 -- 커밋은 계획(제목+의도+파일) 1회 승인 후 진행 -- `기능 분해해` = 분해/문서만, 구현·생성 금지 -- `Cycle ... 워크트리/세션 만들어` 전 worktree/session 생성 금지 -- `PR 초안` / `작성만` = 본문만 -- `PR 생성해` / `PR 올려` / `올려` 전 PR 생성 금지 -- PR용 push 전 `origin/dev` rebase, 충돌 시 중단 - -상세 절차: [docs/AGENT_WORKFLOW.md](docs/AGENT_WORKFLOW.md) -형식 규칙: [docs/CONVENTIONS.md](docs/CONVENTIONS.md) -스킬: [docs/skills.md](docs/skills.md) - -- 커밋: `$mozi-commit` -- 기능 분해/분기: `$mozi-feature-split` -- PR: `$mozi-pr` -- cleanup: `$mozi-worktree-cleanup` - -## 7. 명령 - -```bash -mise install -mise exec -- tuist generate --no-open -open Mozi.xcworkspace -xcodebuild -workspace Mozi.xcworkspace -scheme Mozi-Debug -destination 'generic/platform=iOS Simulator' build -``` diff --git a/CLAUDE.md b/CLAUDE.md new file mode 120000 index 0000000..47dc3e3 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1 @@ +AGENTS.md \ No newline at end of file From 703687c29973835ed31ece550c1beb6a484452f9 Mon Sep 17 00:00:00 2001 From: "gnoes.ios" Date: Wed, 2 Sep 2026 01:58:10 +0900 Subject: [PATCH 2/8] =?UTF-8?q?docs:=20=EC=BD=94=EB=94=A9=20=EA=B7=9C?= =?UTF-8?q?=EC=B9=99=20=EB=AC=B8=EC=84=9C=EB=A5=BC=20=EB=84=A4=20=EA=B5=AC?= =?UTF-8?q?=ED=9A=8D=EC=9C=BC=EB=A1=9C=20=EC=9E=AC=EB=B0=B0=EC=B9=98?= =?UTF-8?q?=ED=95=98=EA=B3=A0=20=EC=A4=91=EB=B3=B5=202=EA=B1=B4=20?= =?UTF-8?q?=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/CONVENTIONS.md | 102 ++++++++++++++++++++++++-------------------- 1 file changed, 55 insertions(+), 47 deletions(-) diff --git a/docs/CONVENTIONS.md b/docs/CONVENTIONS.md index 71bdcff..72e92a1 100644 --- a/docs/CONVENTIONS.md +++ b/docs/CONVENTIONS.md @@ -1,12 +1,18 @@ # Conventions -구조/의존/흐름은 [ARCHITECTURE.md](ARCHITECTURE.md) 를 본다. -에이전트 실행 절차/hard gate 는 [AGENT_WORKFLOW.md](AGENT_WORKFLOW.md) 를 본다. +구조·의존·앱 흐름은 [ARCHITECTURE.md](ARCHITECTURE.md) 를 본다. +모듈 내부 규칙과 진입점은 각 `Projects/**/README.md` 를 본다. + +--- + +## a. 코딩 + +포맷과 안전성은 [.swiftlint.yml](../.swiftlint.yml) 이 유일본이다. 그 파일이 검사하는 규칙은 이 문서에 다시 적지 않는다. + +예외가 하나 있다. 들여쓰기는 4 spaces 를 쓴다. SwiftLint 의 `indentation_width` 규칙은 여는 구문에 맞춘 정렬 들여쓰기를 위반으로 잡기 때문에 켜지 않는다. + +### 1. 모듈과 타입 -## Coding -- 들여쓰기 4 spaces -- line length warning 100 / error 120 -- force unwrap 금지 - Feature 단일 모듈, 기능 분리는 폴더 - Scene 내부 flat (`*Feature`, `*View`) - Domain 포트는 `*Client` @@ -18,7 +24,8 @@ - CoreNetwork 는 SharedLogger (`.network`) 를 쓰고 service-specific domain flow 를 넣지 않는다 - SharedDesignSystem은 Feature에서 `Color.ds` / `Font.ds` / `CGFloat.ds` / `TextStyle.ds` 와 공통 컴포넌트만 사용. Primitive 직접 참조 금지 -## Comments +### 2. 주석 + 기본: 주석 최소화. 무분별한 주석 금지. 허용: @@ -46,7 +53,8 @@ TODO: // TODO: AuthClient 연결 ``` -## Tests +### 3. 테스트 + - 언어: 한국어 - 형식: `test_<상황>_<기대결과>` - 이름만 보고 상황과 기대 결과가 읽혀야 한다 @@ -54,74 +62,74 @@ TODO: - `test_홈_커스텀스킴이면_홈으로_파싱` - `test_인증_401이면_한_번만_refresh_후_재시도` -## Schemes +### 4. Scheme | Scheme | Bundle ID | |---|---| | `Mozi-Debug` | `com.teamMozi.debug` | | `Mozi` | `com.teamMozi.app` | -## Git Format -커밋: +### 5. 언어 + +- 로컬 문서, 스크립트 주석/usage, 코드 주석, 에이전트 문서: 한국어 기본 +- API 이름, 옵션명, 식별자: 영어 유지 + +### 6. 금지 + +- Feature 모듈 쪼개기 +- AppShell / AppRuntime / AppEnvironment / AppConstants +- Feature → Data / Core* / ThirdPartyCore +- Scene 간 직접 통신 +- UseCase 층 + +--- + +## b. 커밋 + +형식: + ```text Type: 요약 ``` + Type: feat, fix, docs, style, refactor, test, chore -추가: - 커밋 본문 금지 (제목만) - 한 의도 = 한 커밋 - 구현/테스트/문서/설정 분리 - 언어: 한국어 -브랜치: +--- + +## c. 브랜치와 PR + +브랜치 이름: + ```text Type/짧은-설명 ``` PR 제목: + ```text 변경 내용 요약 ``` -PR 본문 템플릿/작성 규칙: -- 제목/`변경 요약`/`변경 내용` 명사형 -- 운영 메타 금지 - -## Language -- 로컬 문서, 스크립트 주석/usage, 코드 주석, 에이전트 문서: 한국어 기본 -- API 이름, 옵션명, 식별자: 영어 유지 - -## 금지 -- Feature 모듈 쪼개기 -- AppShell / AppRuntime / AppEnvironment / AppConstants -- Feature → Data / Core* / ThirdPartyCore -- Scene 간 직접 통신 -- UseCase 층 - -## PR 본문 템플릿 - -```markdown -## 📌 변경 요약 -- -- -- - -## 📌 변경 내용 -#### -- - -#### -- +PR 본문은 [.github/pull_request_template.md](../.github/pull_request_template.md) 를 채운다. 작성 규칙은 아래와 같다. -## 📌 기타 참고 사항 -- -``` - -**작성 규칙** - `변경 요약`은 PR 전체를 빠르게 이해하게 3줄 전후로 적는다. - `변경 내용`은 모듈/영역 단위로 나눈다. 예: Tuist, Domain, Feature, App, Docs - 각 bullet은 무엇을 바꿨는지 파일/폴더/역할이 보이게 쓴다. 삭제/이동/분리도 명시한다. - PR 제목/`변경 요약`/`변경 내용` bullet 은 명사형으로 끝낸다. - `기타 참고 사항` 은 선택 섹션이다. 내용이 없으면 섹션 자체를 삭제한다. - base/head/브랜치/커밋 해시 같은 운영 메타는 PR 본문에 넣지 않는다. + +--- + +## d. 관련 + +- [ARCHITECTURE.md](ARCHITECTURE.md) +- [../AGENTS.md](../AGENTS.md) +- [.swiftlint.yml](../.swiftlint.yml) +- [.coderabbit.yaml](../.coderabbit.yaml) +- [.github/pull_request_template.md](../.github/pull_request_template.md) From e4b62f41b088e70f1e0f06bbf9d0bd952a0859c4 Mon Sep 17 00:00:00 2001 From: "gnoes.ios" Date: Wed, 2 Sep 2026 01:58:10 +0900 Subject: [PATCH 3/8] =?UTF-8?q?docs:=20=EC=8B=A4=ED=96=89=20=EC=A0=88?= =?UTF-8?q?=EC=B0=A8=20=EB=AC=B8=EC=84=9C=EC=99=80=20=EC=8A=A4=ED=82=AC=20?= =?UTF-8?q?=EC=9D=B8=EB=8D=B1=EC=8A=A4=20=EB=AC=B8=EC=84=9C=20=EC=82=AD?= =?UTF-8?q?=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/AGENT_WORKFLOW.md | 194 ----------------------------------------- docs/skills.md | 50 ----------- 2 files changed, 244 deletions(-) delete mode 100644 docs/AGENT_WORKFLOW.md delete mode 100644 docs/skills.md diff --git a/docs/AGENT_WORKFLOW.md b/docs/AGENT_WORKFLOW.md deleted file mode 100644 index b7d19fd..0000000 --- a/docs/AGENT_WORKFLOW.md +++ /dev/null @@ -1,194 +0,0 @@ -# Agent Workflow - -Mozi 작업 시 에이전트 hard gate, 행동 원칙, runtime flow의 single source of truth. - -## 기준 문서 - -- [CONVENTIONS.md](CONVENTIONS.md) — 형식/작성규칙 SSOT -- [ARCHITECTURE.md](ARCHITECTURE.md) — 구조/의존/흐름 SSOT -- [skills.md](skills.md) — skill 인덱스 -- project skills: `.codex/skills/mozi-commit`, `.codex/skills/mozi-feature-split`, `.codex/skills/mozi-pr`, `.codex/skills/mozi-worktree-cleanup` -- [../AGENTS.md](../AGENTS.md) - -## 1. Hard Gates - -### 커밋 - -1. `커밋해` 전에는 staging/commit/push 시작 금지. -2. 계획 단계에서는 `git status` / `git diff` 읽기만 허용. -3. 커밋 계획 제안 전 로컬 린트 1회: `mise exec -- swiftlint lint --strict` -4. 린트 실패 시 계획 제안 중단, 위반 사항 보고. -5. 커밋 계획(제목 + 의도 + 파일) 1회 승인 후 진행. -6. 커밋 메시지: `Type: 요약` (한국어, 제목만, body 금지). -7. 한 의도 = 한 커밋 (구현/테스트/문서/설정 분리). - -커밋 요청 시 `$mozi-commit` 스킬을 사용한다. - -### feature split - -1. `기능 분해해` / `사이클 나눠줘` / `PR 단위로 쪼개줘` 는 분해 단계다. -2. 분해 단계에서는 코드 수정, worktree/session 생성, commit/PR 금지. -3. 분해 초안 + 파일명 1회 승인 후 `docs/superpowers/splits/` 에 저장한다. -4. 생성 단계 트리거: `Cycle ... 워크트리/세션 만들어` / `ready한 거 전부 만들어`. -5. 생성은 저장된 split 문서가 있을 때만, 생성 계획 1회 승인 후 진행한다. -6. 기본은 지정 Cycle만 생성. 범위 없으면 되묻고, `ready 전부`만 일괄 생성한다. -7. 기존 같은 branch/worktree가 있으면 중단한다. 덮어쓰지 않는다. - -기능 분해/분기 요청 시 `$mozi-feature-split` 스킬을 사용한다. - -### PR - -1. `PR 초안` / `작성만` = 본문 초안만 제시. -2. 위 단계에서는 commit/push/PR 생성 금지. -3. 실제 생성 트리거: `PR 생성해` / `PR 올려` / `올려`. -4. push 직전: `origin/dev` rebase. 충돌 시 즉시 중단. -5. PR는 open PR만 (draft 해석 금지), label 1개, self assignee. - -PR 요청 시 `$mozi-pr` 스킬을 사용한다. - -### worktree cleanup - -1. `워크트리 정리해` / `머지됐으니 정리해` / `로컬 정리해` 전에는 삭제 금지. -2. 관련 PR이 **merged**인지 먼저 확인. -3. dirty worktree 또는 unpushed commit 있으면 중단. -4. 안전 삭제(`worktree remove`, `branch -d`). - -머지 후 정리 요청 시 `$mozi-worktree-cleanup` 스킬을 사용한다. - -## 1.5 Model / Effort Policy - -Mozi 워크플로우는 **세션 시작 model 을 상속**하고, 단계마다 **reasoning effort 만** 다르게 쓴다. -model slug 를 문서에 하드코딩하지 않는다. - -### 고정 규칙 - -1. model: 현재 세션 시작 model 을 그대로 따른다 (임의 교체 금지) -2. 기본 effort: `medium` -3. `max` / `ultra` 사용 금지 -4. child session / subagent 는 model 을 부모에서 상속하고, effort 만 단계값으로 명시한다 -5. 설계가 끝나면 긴 high 세션을 유지하지 말고 `medium` 으로 복귀한다 - -### 단계 매핑 - -| 단계 | effort | -|------|--------| -| brainstorm / architecture / design | `high` | -| writing plans | `medium` (모호하면 `high`) | -| feature split (`기능 분해해`) | `medium` | -| Cycle spawn / brief 작성 | `low` ~ `medium` | -| implement 기계적 (plan 상세, 1~2 파일) | `low` | -| implement 통합/TCA/다중파일 | `medium` | -| debug 난이도 높음 | `high` | -| code review | `high` | -| small fix re-review | `low` ~ `medium` | -| commit (`mozi-commit`) | `low` | -| PR 초안/생성 (`mozi-pr`) | `medium` | -| worktree cleanup | `low` | - -### 운영 한 줄 - -```text -model = session start model (inherit) -design/review = high -default/implement = medium -mechanical/ops = low -never max/ultra -``` - -### 적용 위치 - -- 메인 코디네이터 기본: 세션 시작 model + `medium` -- Cycle child session 생성 시 model 상속, effort 명시 -- Superpowers implement/review subagent 생성 시 model 상속, effort 명시 -- Mozi skill 실행 시 해당 skill 의 effort 규칙을 따른다 - -## 2. Agent Behavior - -1. 작업 시작 시 문서 우선순위와 관련 source of truth를 확인한다. -2. 규칙이 충돌하면 해당 주제의 source of truth 파일을 우선한다. - - 구조: ARCHITECTURE.md - - 작성 규칙: CONVENTIONS.md - - 실행/hard gate: AGENT_WORKFLOW.md - - 모듈 디테일: Projects/**/README.md -3. 전역 지도와 모듈 디테일을 구분해서 읽는다. -4. 요구가 모호하면 추측 구현하지 않고 질문한다. -5. 코드와 문서가 다르면 현재 코드 기준으로 보고하고, 문서 수정 필요 여부를 제안한다. -6. 문서 변경 시 중복 본문을 늘리지 않고 링크를 유지한다. -7. model/effort 선택이 필요하면 위 Model / Effort Policy 를 따른다. model 은 세션 시작값을 유지하고 effort 만 조절한다. - -## 3. Runtime Flow - -### 커밋 - -``` -커밋해 - → 변경 확인 - → 로컬 린트 (`mise exec -- swiftlint lint --strict`) - → 계획 제안 - → 1회 승인 - → 연속 커밋 - → 결과 보고 -``` - -### feature split - -``` -기능 분해해 - → 작은 작업이면 분해 불필요 판정 - → 얇은 전체 방향 확인 - → Cycle 분해 + brief - → 분해 초안 + 파일명 제안 - → 1회 승인 - → docs/superpowers/splits 저장 - → 다음 메뉴 -``` - -### feature spawn - -``` -Cycle ... 워크트리/세션 만들어 - → 저장된 split 문서 확인 - → 생성 계획 - → 1회 승인 - → worktree/branch 생성 - → session 생성 + brief + brainstorming 시작 - → Spawned 갱신 - → 결과 보고 -``` - -### PR 초안 - -``` -PR 초안 / 작성만 - → 본문 초안 제시 - → 종료 -``` - -### PR 생성 - -``` -PR 생성해 / PR 올려 / 올려 - → 커밋/푸시 상태 확인 - → push 필요 시 origin/dev rebase - → 충돌 시 중단 - → open PR 생성 (label 1 + self assignee) - → 결과 보고 -``` - -### worktree cleanup - -``` -워크트리 정리해 / 머지됐으니 정리해 - → PR merged 확인 - → dirty/unpushed 검사 - → 정리 계획 제시 - → 1회 승인 - → worktree/local branch 안전 삭제 - → 결과 보고 -``` - -## 4. Non-Goals - -- 전역 Superpowers plugin 수정 없음 -- 도구 경로 고정 규칙은 아직 적용하지 않음 -- document rule 전부를 hard gate로 격상하지 않음 diff --git a/docs/skills.md b/docs/skills.md deleted file mode 100644 index 739bad8..0000000 --- a/docs/skills.md +++ /dev/null @@ -1,50 +0,0 @@ -# Mozi Skills - -Mozi workflow를 반복 실행하기 위한 Codex project skills. - -스킬 본문 위치: - -```text -.codex/skills/ -├── mozi-commit/ -├── mozi-feature-split/ -├── mozi-pr/ -└── mozi-worktree-cleanup/ -``` - -## Skills - -| skill | 쓰는 시점 | 하지 않을 것 | -|-------|-----------|--------------| -| `mozi-commit` | 사용자가 `커밋해`라고 했을 때 | `커밋해` 전 staging/commit, 계획 전 린트 생략, body 작성, 여러 의도 혼합 | -| `mozi-feature-split` | `기능 분해해` / `사이클 나눠줘` / `PR 단위로 쪼개줘` / `Cycle ... 워크트리/세션 만들어` | 분해 단계에서 구현/생성, 저장 전 spawn, 범위 없는 일괄 생성, 기존 worktree 덮어쓰기 | -| `mozi-pr` | `PR 초안` / `작성만` / `PR 생성해` / `PR 올려` | 초안 요청에서 PR 생성, draft PR 해석, 충돌 자동 resolve | -| `mozi-worktree-cleanup` | PR 머지 후 로컬 worktree/브랜치 정리 | 미머지 상태 삭제, dirty 변경 자동 폐기, force 기본 사용 | - -## Model / Effort - -model 은 세션 시작 model 을 상속한다. 단계마다 effort 만 다르게 쓴다. - -| skill / stage | effort | -|---------------|--------| -| feature split | `medium` | -| Cycle spawn / brief | `low` ~ `medium` | -| child brainstorm / design | `high` | -| implement 기계적 | `low` | -| implement 통합 | `medium` | -| code review | `high` | -| commit | `low` | -| PR | `medium` | -| worktree cleanup | `low` | - -SSOT: [AGENT_WORKFLOW.md](AGENT_WORKFLOW.md#15-model--effort-policy) - -## 기준 문서 - -- [AGENT_WORKFLOW.md](AGENT_WORKFLOW.md) — hard gate, Agent Behavior, runtime flow -- [CONVENTIONS.md](CONVENTIONS.md) — 형식/작성규칙 SSOT -- [ARCHITECTURE.md](ARCHITECTURE.md) — 구조/의존/흐름 -- [../AGENTS.md](../AGENTS.md) -- [../.github/pull_request_template.md](../.github/pull_request_template.md) - -자세한 hard gate와 Agent Behavior는 [AGENT_WORKFLOW.md](AGENT_WORKFLOW.md)를 참조. From 2727b48d1767b88831e79eb8162a4982d2eb031c Mon Sep 17 00:00:00 2001 From: "gnoes.ios" Date: Wed, 2 Sep 2026 01:58:10 +0900 Subject: [PATCH 4/8] =?UTF-8?q?chore:=20=EC=A0=80=EC=9E=A5=EC=86=8C=20?= =?UTF-8?q?=EC=95=88=20Codex=20=EC=8A=A4=ED=82=AC=204=EA=B0=9C=20=EC=82=AD?= =?UTF-8?q?=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .codex/skills/mozi-commit/SKILL.md | 93 --- .codex/skills/mozi-commit/agents/openai.yaml | 4 - .codex/skills/mozi-feature-split/SKILL.md | 634 ------------------ .../mozi-feature-split/agents/openai.yaml | 4 - .codex/skills/mozi-pr/SKILL.md | 159 ----- .codex/skills/mozi-pr/agents/openai.yaml | 4 - .codex/skills/mozi-worktree-cleanup/SKILL.md | 175 ----- .../mozi-worktree-cleanup/agents/openai.yaml | 4 - 8 files changed, 1077 deletions(-) delete mode 100644 .codex/skills/mozi-commit/SKILL.md delete mode 100644 .codex/skills/mozi-commit/agents/openai.yaml delete mode 100644 .codex/skills/mozi-feature-split/SKILL.md delete mode 100644 .codex/skills/mozi-feature-split/agents/openai.yaml delete mode 100644 .codex/skills/mozi-pr/SKILL.md delete mode 100644 .codex/skills/mozi-pr/agents/openai.yaml delete mode 100644 .codex/skills/mozi-worktree-cleanup/SKILL.md delete mode 100644 .codex/skills/mozi-worktree-cleanup/agents/openai.yaml diff --git a/.codex/skills/mozi-commit/SKILL.md b/.codex/skills/mozi-commit/SKILL.md deleted file mode 100644 index 7235003..0000000 --- a/.codex/skills/mozi-commit/SKILL.md +++ /dev/null @@ -1,93 +0,0 @@ ---- -name: mozi-commit -description: Plan and create Mozi title-only, intent-scoped commits with a one-time approval gate. Use in the Mozi repo when the user says "커밋해", asks for a commit plan, wants commits split by intent, or needs commit messages that read cleanly in the commit graph; also when preventing unsolicited staging/commit/push. ---- - -# Mozi Commit - -Mozi project commit hard gates and style. - -## Read First - -- `docs/AGENT_WORKFLOW.md` -- `docs/CONVENTIONS.md` -- `AGENTS.md` Git / PR section - -## Hard Gates - -1. Do not start commit work until the user says `커밋해` (or an explicit equivalent like `커밋 진행해`). -2. Before approval, only read git state (`status`, `diff`, log as needed). -3. Before proposing a commit plan, run local SwiftLint once with the same command as CI: - `mise exec -- swiftlint lint --strict` -4. If lint fails, stop. Report the violations and do not propose a commit plan until lint is fixed or the user explicitly changes direction. -5. Never stage, commit, amend, or push before the commit plan is approved once. -6. After one plan approval, execute the approved commits continuously. -7. If the plan drifts slightly, make the smallest reasonable adjustment and continue; re-ask only when meaning materially changes. - -## Effort Policy - -- model: inherit the current session start model; do not switch models -- effort: `low` -- do not use `max`/`ultra` -- if the current session effort is higher, prefer continuing at `low` for this skill work - -SSOT: `docs/AGENT_WORKFLOW.md` Model / Effort Policy - -## Flow - -1. Inspect changes read-only. -2. Run `mise exec -- swiftlint lint --strict`. -3. If lint fails, stop and report; do not propose a plan yet. -4. Propose a commit plan. -5. Wait for one approval. -6. Stage and commit per approved plan. -7. Report the resulting commits. - -## Plan Format - -```text -1. Type: 요약 - - 의도: one line - - 파일: path1, path2 -2. Type: 요약 - - 의도: one line - - 파일: path3 -``` - -## Message Rules - -- Format: `Type: 요약` -- Types: `feat`, `fix`, `docs`, `style`, `refactor`, `test`, `chore` -- Language: Korean -- Title only; no commit body -- One intent per commit -- Split implementation / test / docs / config into separate commits -- Goal: commit graph alone should explain the change flow - -## Never Commit Casually - -- Prefer explicit paths over `git add -A` / `git add .` -- Do not commit local secrets or ignored config values -- Do not push -- Do not create a PR from this skill - -## Refusal Snippets - -If asked to inspect without `커밋해`: - -```text -아직 커밋 요청 전입니다. 커밋해 라고 하면 변경 확인 후 커밋 계획부터 제안할게요. -``` - -If user wants body text: - -```text -커밋 본문은 쓰지 않습니다. 제목만으로 의도가 읽히게 나누겠습니다. -``` - -## Output - -- lint result summary (`pass` / failing violations) -- commit plan -- approved plan execution result -- final commit list diff --git a/.codex/skills/mozi-commit/agents/openai.yaml b/.codex/skills/mozi-commit/agents/openai.yaml deleted file mode 100644 index 463ddcb..0000000 --- a/.codex/skills/mozi-commit/agents/openai.yaml +++ /dev/null @@ -1,4 +0,0 @@ -interface: - display_name: "Mozi Commit" - short_description: "Mozi intent-scoped title-only commits" - default_prompt: "Use $mozi-commit to inspect current changes and propose a commit plan." diff --git a/.codex/skills/mozi-feature-split/SKILL.md b/.codex/skills/mozi-feature-split/SKILL.md deleted file mode 100644 index bbf171d..0000000 --- a/.codex/skills/mozi-feature-split/SKILL.md +++ /dev/null @@ -1,634 +0,0 @@ ---- -name: mozi-feature-split -description: Split a large Mozi feature into independent Cycles and PR candidates, write a local split document, prepare child-session briefs, and only after explicit approval create worktrees/sessions. Use in the Mozi repo when the user says "기능 분해해", "사이클 나눠줘", "PR 단위로 쪼개줘", "독립 사이클로 나눠줘", "병렬 가능한 작업 나눠줘", "하위 세션 brief 만들어줘", "split 문서 저장해", "Cycle ... 워크트리/세션 만들어", "ready한 거 전부 만들어", or when a large feature signal appears and the user accepts a split suggestion. ---- - -# Mozi Feature Split - -큰 Mozi 기능을 독립 Cycle / PR 후보로 분해하고, 필요 시 worktree + Codex 세션으로 분기한다. - -## Read First - -- `docs/AGENT_WORKFLOW.md` -- `docs/ARCHITECTURE.md` -- `docs/CONVENTIONS.md` -- `docs/skills.md` -- `AGENTS.md` - -## Phrase Mapping - -### Split stage - -Treat as split-only: - -- `기능 분해해` -- `사이클 나눠줘` -- `PR 단위로 쪼개줘` -- `독립 사이클로 나눠줘` -- `병렬 가능한 작업 나눠줘` -- `하위 세션 brief 만들어줘` -- `split 문서 저장해` -- `분해 문서 저장해` -- similar: `나눠줘`, `쪼개줘`, `분해해` - -Allowed: - -- codebase/docs survey -- thin overall direction capture -- Cycle decomposition -- child-session brief drafting -- split document save after approval - -Forbidden: - -- code edits -- worktree/session creation -- commit / push / PR - -### Spawn stage - -Only these mean real creation: - -- `Cycle 워크트리/세션 만들어` -- `Cycle 생성해` -- `이 Cycle 분기해` -- `ready한 거 전부 만들어` -- `ready Cycle 생성해` -- `분기 가능한 거 다 열어` - -Plan-only phrases: - -- `생성 계획만` -- `분기 계획만` - -### Situational signal - -If the user only signals a large task, do **not** auto-run. - -Examples: - -- `홈화면 기능을 맡았어` -- `이 기능 한번에 하기엔 크다` -- `메인에서 먼저 나눠줘` - -Respond with a short offer: - -```text -이 작업은 mozi-feature-split 으로 먼저 나누는 게 좋아 보여요. -분해 진행할까요? -``` - -Run only after yes. - -## Effort Policy - -Inherit the session start model. Change effort only. - -| stage | effort | -|-------|--------| -| split (`기능 분해해`) | `medium` | -| spawn plan / brief drafting | `low` ~ `medium` | -| child session start (brainstorm/design) | `high` | -| child implement after plan approval | `low` (mechanical) or `medium` (integration) | -| child review | `high` | -| commit/PR later in child | follow `$mozi-commit` / `$mozi-pr` | - -Rules: - -1. Do not switch models mid-workflow. Keep the session start model. -2. Never use `max` / `ultra`. -3. When creating a child session/thread, inherit the parent model and set thinking/effort explicitly. -4. Child starts at `high` for brainstorming only; after plan approval, continue implement at `low`/`medium`. -5. Main session default remains `medium`. - -SSOT: `docs/AGENT_WORKFLOW.md` Model / Effort Policy - -## Hard Gates - -1. Split ≠ spawn. Split stage never creates worktrees/sessions. -2. Split stage never edits product code and never commits/PRs. -3. Save split docs only after one approval of `분해 초안 + 파일명`. -4. Spawn requires an already saved split document. -5. Spawn requires a creation plan and one approval. -6. Default spawn target is only the specified Cycle. -7. If spawn scope is missing, ask. Do not guess multi-create. -8. `ready 전부` is allowed only with explicit wording. -9. Existing same branch/worktree → stop and report. No overwrite, no auto-rename. -10. Multi-create is sequential. On failure, keep completed items, skip the rest, report. -11. Session creation failure after successful worktree is partial success. Do not roll back worktree. -12. Base branch defaults to `origin/dev` unless the user explicitly overrides. -13. Child sessions start with brief + automatic `$superpowers:brainstorming` for that Cycle only. -14. Main session tracks opened Cycle/worktree/session lightly. No active monitoring/orchestration. -15. Create child sessions by inheriting the parent model and setting thinking/effort explicitly: thinking=`high` for Cycle brainstorm start. -16. After child plan approval, drop implement effort to `low`/`medium` per complexity. Keep review at `high`. - -## Small Work Guard - -Before splitting, judge whether split is needed. - -If a single Cycle/PR is enough: - -```text -이 작업은 단일 Cycle/PR로 충분합니다. 분해하지 않는 걸 추천해요. -그래도 분해를 진행할까요? -``` - -Proceed only if the user still wants it. - -## Thin Overall Direction - -Before decomposition, capture or confirm: - -1. 이번 목표 -2. 이번 배치에서 빼는 것 -3. 완료로 볼 기준 -4. 우선 사용자 시나리오 1~2개 -5. 반드시 지킬 제약 - -If blocked, ask 1~2 questions. Otherwise state assumptions and continue. - -Do **not** deep-design the whole feature in the main session. -Detailed design belongs to each Cycle's brainstorming. - -## Survey Depth - -Before splitting, inspect at medium depth: - -- `docs/ARCHITECTURE.md` -- related Feature / Domain / Data locations -- similar existing patterns -- forbidden dependency directions - -Do not implement while surveying. - -## Mozi Split Rules - -Hard rules: - -1. If a Domain contract is needed, separate it first as `Cycle 0`. -2. Feature UI and Data/API live may run in parallel only after the contract exists. -3. App live assembly is usually last. -4. Reject splits that require forbidden deps: - - Feature → Data / Core* / ThirdPartyCore - - Domain → Data / Core* / Feature - - Data → Feature -5. Prefer one Cycle ≈ one PR candidate. -6. Reject review-impossible blobs like “홈화면 전체” without further split. -7. Cycle 0 / foundation placement: - - thin shared contract → prefer main session - - large PR candidate → prefer child session - - skill recommends, user chooses - -## Cycle Model - -### Numbering - -```text -Cycle 0 기반/계약 -Cycle 1, 2 직렬 단계 -Cycle 1a/1b 같은 단계의 병렬 트랙 -``` - -### Required card fields - -Every Cycle card must include: - -- Cycle 이름 -- 목표 1줄 -- in scope -- out of scope -- 의존 Cycle -- 직렬/병렬 -- ready 여부 -- PR 후보 여부 -- 건드릴 모듈 -- 완료 기준 -- 제안 branch / worktree -- 하위 세션 brief -- 얇은 설계 힌트 2~3줄 - -### Ready criteria - -Ready when all are true: - -- goal is clear -- low file conflict with other open Cycles -- in/out of scope clear -- dependency Cycles are none or already done -- required Domain contract already exists - -### PR candidate criteria - -`PR 후보: yes` when: - -- reviewable alone -- merge does not leave the app badly broken -- in/out of scope clear -- completion criteria exist - -Otherwise mark no, or recommend bundling with another Cycle. - -## Naming Rules - -Branch follows `docs/CONVENTIONS.md`: - -```text -Type/짧은-설명 -``` - -Type auto-selection: - -- implementation Cycle → `feat/` -- docs-only → `docs/` -- structure/config → `chore/` - -Worktree path: - -```text -.worktrees/Type-짧은-설명 -``` - -Examples: - -```text -branch: feat/home-ui -worktree: .worktrees/feat-home-ui - -branch: chore/home-domain-contract -worktree: .worktrees/chore-home-domain-contract -``` - -Base: - -```text -default: origin/dev -override: only when user explicitly sets base -``` - -## Split Document - -### Path - -```text -docs/superpowers/splits/YYYY-MM-DD--split.md -``` - -Example: - -```text -docs/superpowers/splits/2026-08-06-home-feature-split.md -``` - -Notes: - -- local-only under ignored `docs/superpowers/` -- do not commit from this skill - -### Re-split behavior - -If a same-feature split already exists, ask: - -```text -기존 split 문서가 있습니다. -1. 기존 문서 업데이트 -2. 새 문서로 저장 -``` - -Do not silently overwrite. - -### Document skeleton - -```markdown -# Split - -## 1. 목표 - -## 2. 전제 / 가정 - -## 3. Cycle 목록 - -## 4. 의존 / 병렬 지도 - -## 5. 지금 할 일 - -## 6. Cycle 상세 - -### Cycle 0: ... -... - -## 7. Spawned - -- 없음 -``` - -### Spawned update - -After successful or partial spawn, update section 7 with: - -```markdown -## 7. Spawned - -- Cycle 1a: opened - - branch: feat/home-ui - - worktree: .worktrees/feat-home-ui - - session: - - note: session failed; worktree ready -``` - -## Chat Output Shape - -Chat is a summary, not the full document dump. - -Include: - -1. thin overall direction / assumptions -2. Cycle list with: - - goal - - deps - - serial/parallel - - ready - - PR candidate - - branch/worktree -3. dependency/parallel map -4. now/next recommendation -5. brief summaries, not full briefs -6. proposed split filename - -Full cards + full briefs go into the split document. - -## Approval Flow - -### Split save - -```text -분해 초안 + 파일명 제안 -→ 1회 승인 -→ docs/superpowers/splits/... 저장 -→ 짧은 다음 메뉴 -``` - -Post-save menu: - -```text -저장했습니다. -다음 중 골라주세요. -1. ready Cycle 생성 계획 -2. 특정 Cycle 생성 계획 -3. 여기까지 -``` - -Do not auto-enter spawn. - -### Spawn plan - -```text -기준 split 문서 확인 -→ 생성 계획 제시 -→ 1회 승인 -→ 순차 실행 -→ split 문서 Spawned 갱신 -→ 결과 보고 -``` - -Spawn plan format: - -```text -1. 기준 문서: docs/superpowers/splits/... -2. 생성 대상 - 1) Cycle 1a - - branch: feat/home-ui - - worktree: .worktrees/feat-home-ui - - base: origin/dev - - session: create + start brainstorming -3. 충돌 검사 - - existing branch/worktree: none -4. 실행 순서 - - worktree/branch - - session + brief + brainstorming start -진행할까요? -``` - -## Spawn Execution - -### Resolve target document - -Priority: - -1. split document created/discussed in the current conversation -2. if unclear, list candidates and ask - -Never invent a document path. - -### Create one Cycle - -1. Verify saved split doc exists. -2. Verify Cycle is spawnable. -3. Check branch/worktree absence. -4. Create branch + worktree from base. -5. Create Codex session with best available means: - 1. Codex native session/thread - 2. else Orca or equivalent available means - 3. else stop at worktree + manual open guidance -6. Set child session model/effort explicitly: - - model: inherit parent/session start model - - thinking/effort: `high` for initial brainstorm/design -7. Send full brief into the new session, including the effort schedule: - - design: high - - implement: low/medium - - review: high - - commit: low - - PR: medium -8. Auto-start: this Cycle only, `$superpowers:brainstorming`. -9. Update split doc Spawned section. -10. Report back to main session with opened locations only. - -Worktree readiness means: - -```text -branch exists -worktree path exists -``` - -Do not run `mise` / `tuist generate` in this skill. -Environment setup belongs to the child session. - -### Multi-create - -Only for explicit `ready 전부` style requests. - -```text -plan approval -→ sequential create -→ on failure: stop -→ keep completed -→ skip remaining -→ report partial result -``` - -### Partial success - -If worktree succeeds and session fails: - -```text -부분 성공 -- worktree/branch: created -- session: failed -- brief: -수동으로 이 worktree에서 세션을 열고 brief로 시작하면 됩니다. -``` - -No rollback. - -## Child Session Brief Template - -Use this structure in the split document. Chat only shows a short summary. - -```text -너는 이 Cycle만 담당한다. - -목표: -- - -범위: -- in: - - ... -- out: - - ... - -기반 계약 / 의존: -- -- - -작업 위치: -- base: origin/dev (or explicit override) -- branch: Type/짧은-설명 -- worktree: .worktrees/Type-짧은-설명 - -얇은 설계 힌트: -- ... -- ... - -effort 스케줄 (model: 세션 시작 model 상속): -- design/brainstorm: high -- implement: low(기계적) / medium(통합) -- review: high -- commit: low -- PR: medium -- max/ultra 금지 - -워크플로: -1. 이 Cycle 범위만 유지 -2. $superpowers:brainstorming 으로 설계 (high) -3. 승인 후 plan -4. 구현 (low/medium) -5. 리뷰 (high) -6. 커밋/PR은 사용자 요청 시에만 (commit low / PR medium) - -Mozi hard gate: -- 커밋: `커밋해` 전에 staging/commit/push 금지 → `$mozi-commit` -- PR: `PR 초안`/`작성만`은 본문만, 생성은 `PR 생성해`/`PR 올려`/`올려` → `$mozi-pr` -- Feature → Data / Core* / ThirdPartyCore 금지 -- live 조립은 App only -- Domain 계약 임의 변경 금지 -- 다른 Cycle 범위 침범 금지 -``` - -## Main Session Role After Spawn - -Keep only a light registry in chat/doc: - -- which Cycles are open -- worktree paths -- session ids/links if available - -Do not monitor child progress or mediate unless the user asks. - -## Flow - -### Split - -```text -기능 분해해 - → small-work guard - → thin overall direction - → medium survey - → Cycle decomposition - → briefs + branch/worktree proposals - → 분해 초안 + 파일명 제안 - → 1회 승인 - → split 문서 저장 - → 다음 메뉴 -``` - -### Spawn - -```text -Cycle 1a 워크트리/세션 만들어 - → saved split doc resolve - → 생성 계획 - → 1회 승인 - → worktree/branch 생성 - → session 생성 (model 상속 + high) + brief + brainstorming start - → Spawned 갱신 - → 결과 보고 -``` - -## Refusal / Stop Snippets - -### Spawn without saved split - -```text -아직 저장된 split 문서가 없습니다. 먼저 분해 저장부터 할까요? -``` - -### Existing branch/worktree - -```text -같은 branch/worktree가 이미 있습니다. 덮어쓰지 않았습니다. -정리하거나 다른 이름을 정해 주세요. -``` - -### Missing spawn scope - -```text -어떤 Cycle을 생성할까요? -예: Cycle 1a / ready 전부 -``` - -### Split stage creation request - -```text -지금은 분해 단계입니다. 생성은 split 문서 저장 후 -`Cycle ... 워크트리/세션 만들어` 로 진행할게요. -``` - -### Forbidden dependency split - -```text -이 분해는 Mozi 금지 의존을 넘습니다. Domain Client 계약 기준으로 다시 나눌게요. -``` - -## Output - -### Split stage - -- cycle map -- ready/PR candidate summary -- brief summaries -- proposed filename -- saved path after approval - -### Spawn stage - -- creation plan -- created branch/worktree -- session result or partial-success guidance -- updated Spawned section - -## Non-Goals - -- whole-feature deep design in main session -- automatic multi-spawn without explicit scope -- commit / PR creation -- worktree environment bootstrap beyond git -- active multi-agent orchestration from main diff --git a/.codex/skills/mozi-feature-split/agents/openai.yaml b/.codex/skills/mozi-feature-split/agents/openai.yaml deleted file mode 100644 index cbfca0a..0000000 --- a/.codex/skills/mozi-feature-split/agents/openai.yaml +++ /dev/null @@ -1,4 +0,0 @@ -interface: - display_name: "Mozi Feature Split" - short_description: "큰 기능을 Cycle/PR 후보로 분해하고 분기 제안" - default_prompt: "Use $mozi-feature-split to split this large feature into independent cycles and propose worktree/session spawn plans." diff --git a/.codex/skills/mozi-pr/SKILL.md b/.codex/skills/mozi-pr/SKILL.md deleted file mode 100644 index d2af19c..0000000 --- a/.codex/skills/mozi-pr/SKILL.md +++ /dev/null @@ -1,159 +0,0 @@ ---- -name: mozi-pr -description: Draft Mozi PR bodies or create open PRs with hard intent gates, noun-form style, single label, self-assignee, and origin/dev rebase before PR push. Use in the Mozi repo when the user says "PR 초안", "초안 작성", "작성만", "PR 생성해", "PR 올려", "올려", or asks to prepare/create a pull request without jumping ahead. ---- - -# Mozi PR - -Mozi project PR hard gates and style. - -## Read First - -- `docs/AGENT_WORKFLOW.md` -- `docs/CONVENTIONS.md` -- `.github/pull_request_template.md` -- `AGENTS.md` Git / PR section - -## Effort Policy - -- model: inherit the current session start model; do not switch models -- effort: `medium` for draft and create -- do not use `max`/`ultra` -- if the current session effort is higher, prefer continuing at `medium` for this skill work - -SSOT: `docs/AGENT_WORKFLOW.md` Model / Effort Policy - -## Phrase Mapping - -### Draft only (no publish) - -Treat as body draft in chat only: - -- `PR 초안` -- `초안 작성해봐` -- `작성만 해봐` -- similar: `초안`, `작성만`, `본문만`, `어떻게 쓸지 먼저` - -Allowed: -- draft title/body in chat -- fill template sections -- style edits - -Forbidden: -- git commit -- git push -- creating a GitHub PR (draft or open) -- yeet/finish publish steps - -### Create PR - -Only these mean real PR creation: - -- `PR 생성해` -- `PR 올려` -- `올려` - -Create **open** PRs only. Never create draft PRs by interpretation. - -## Hard Gates - -### Draft ≠ create -If the request is draft-only, stop after showing the body. - -### Create requires readiness -On create triggers: - -1. Check commit/push state first. -2. If not committed/pushed, stop with: - -```text -아직 커밋/푸시 전입니다. 커밋해 라고 하면 커밋 계획부터 시작할게요. -``` - -3. Do not chain commit/push automatically just to finish the PR. -4. For commits, hand off to `$mozi-commit`. - -### Rebase before PR push -When push is needed as part of PR publish: - -1. `fetch origin/dev` -2. rebase current branch onto latest `origin/dev` -3. push only after clean rebase -4. on conflict: stop immediately, never auto-resolve - -Conflict snippet: - -```text -origin/dev 기준 rebase 중 충돌이 났습니다. -자동 처리는 하지 않았습니다. -충돌 파일/상태를 확인한 뒤 어떻게 할지 알려 주세요. -``` - -## Draft / Body Style - -Use noun-form endings for: - -- PR title -- `변경 요약` bullets -- `변경 내용` bullets - -Template: - -```markdown -## 📌 변경 요약 -- ... - -## 📌 변경 내용 -#### 영역 A -- ... -``` - -Rules: - -- `변경 요약`: about 3 bullets -- `변경 내용`: split by module/area; show file/folder/role -- `기타 참고 사항` is optional; delete the whole section if empty -- no operational meta in body (`base`, `head`, branch names, commit hashes) - -good: `RootFeature 부트스트랩 상태 추가` -bad: `RootFeature 부트스트랩 상태를 추가했습니다` - -## Create-Time Meta - -Only when actually creating a PR: - -1. Map exactly **one** label from repo labels -2. If label mapping is ambiguous, show candidates and ask -3. Assignee = current user always -4. Do not set reviewers/milestone/projects unless asked -5. Create open PR -6. Report title, url, label, assignee - -## Flow Cheatsheets - -### Draft request - -```text -draft phrase - → write body in chat with noun-form style - → stop -``` - -### Create request - -```text -create phrase - → verify commit/push readiness - → if push needed: fetch+rebase origin/dev - → conflict? stop - → push - → choose 1 label + self assignee - → create open PR - → report -``` - -## Non-Goals - -- Do not interpret "초안" as GitHub draft PR. -- Do not force-push to hide rebase problems without explicit approval. -- Do not attach multiple labels. diff --git a/.codex/skills/mozi-pr/agents/openai.yaml b/.codex/skills/mozi-pr/agents/openai.yaml deleted file mode 100644 index b60ac38..0000000 --- a/.codex/skills/mozi-pr/agents/openai.yaml +++ /dev/null @@ -1,4 +0,0 @@ -interface: - display_name: "Mozi PR" - short_description: "Mozi PR draft/create hard gates" - default_prompt: "Use $mozi-pr to draft a PR body or create an open PR safely." diff --git a/.codex/skills/mozi-worktree-cleanup/SKILL.md b/.codex/skills/mozi-worktree-cleanup/SKILL.md deleted file mode 100644 index 74d0987..0000000 --- a/.codex/skills/mozi-worktree-cleanup/SKILL.md +++ /dev/null @@ -1,175 +0,0 @@ ---- -name: mozi-worktree-cleanup -description: Clean up a Mozi feature worktree and local branch after the PR is merged. Use in the Mozi repo when the user says "워크트리 정리해", "머지됐으니 정리해", "로컬 정리해", "worktree 지워", or asks to remove a finished worktree/branch safely after merge. ---- - -# Mozi Worktree Cleanup - -PR 머지 후 로컬 worktree / 브랜치를 안전하게 정리한다. - -## Read First - -- `docs/AGENT_WORKFLOW.md` -- `docs/skills.md` -- `AGENTS.md` Worktree / Git section - -## Effort Policy - -- model: inherit the current session start model; do not switch models -- effort: `low` -- do not use `max`/`ultra` -- if the current session effort is higher, prefer continuing at `low` for this skill work - -SSOT: `docs/AGENT_WORKFLOW.md` Model / Effort Policy - -## Trigger Phrases - -Use this skill when the user says things like: - -- `워크트리 정리해` -- `머지됐으니 정리해` -- `로컬 정리해` -- `worktree 지워` -- `정리해` in a finished-PR context - -## Hard Gates - -1. Do not delete anything before checking merge state. -2. Only clean up when the related PR is actually **merged**. -3. If the PR is open/closed-unmerged, stop and report. -4. If the worktree is dirty, stop and report. Do not auto-stash or discard. -5. If there are unpushed local commits, stop and report. -6. Never remove the main checkout worktree. -7. Prefer safe deletes: - - `git worktree remove ` - - `git branch -d ` - - `git fetch --prune` -8. Use force only when the user explicitly asks: - - `git worktree remove --force` - - `git branch -D` -9. Show a cleanup plan once, get approval, then execute. -10. Do not merge/close PRs from this skill. - -## What To Identify - -Before planning, resolve: - -- current branch -- current worktree path -- main repo path (`git rev-parse --git-common-dir`) -- linked PR number/url if available -- PR state / mergedAt / base branch -- dirty state -- unpushed commits -- whether remote branch still exists - -Helpful commands: - -```bash -git rev-parse --show-toplevel -git branch --show-current -git status --porcelain -git rev-parse --git-common-dir -git worktree list --porcelain -gh pr view --json number,url,state,mergedAt,baseRefName,headRefName -git log --oneline @{u}..HEAD 2>/dev/null || true -git fetch origin --prune -``` - -## Cleanup Plan Format - -```text -1. 대상 확인 - - worktree: - - branch: - - PR: (merged) -2. 안전 검사 - - dirty: none - - unpushed: none -3. 실행 - - git worktree remove - - git branch -d - - git fetch --prune -``` - -## Flow - -```text -정리해 - → 현재 worktree/branch/PR 확인 - → merged 아니면 중단 - → dirty/unpushed 있으면 중단 - → 정리 계획 제시 - → 1회 승인 - → worktree remove - → local branch delete - → fetch --prune - → 결과 보고 -``` - -## Execution Notes - -### Preferred order - -1. Confirm PR merged into expected base (`dev`) -2. Ensure clean tree -3. Ensure no unpushed commits -4. Remove worktree from a different checkout when needed -5. Delete local branch with `-d` -6. Prune remote-tracking branches - -### If currently inside the target worktree - -Do not try to delete the current directory from inside itself blindly. - -Preferred: - -1. move to main repo root -2. `git worktree remove ` -3. `git branch -d ` - -### Main checkout protection - -If the target path is the primary non-linked checkout, do **not** remove it. -Only delete linked worktrees. - -## Refusal / Stop Snippets - -### PR not merged - -```text -아직 머지되지 않았습니다. 머지된 뒤에 로컬 정리를 진행할게요. -``` - -### Dirty worktree - -```text -worktree에 커밋되지 않은 변경이 있습니다. 정리 전에 처리가 필요해요. -``` - -### Unpushed commits - -```text -로컬에 푸시되지 않은 커밋이 있습니다. 삭제 전에 확인이 필요해요. -``` - -### Force requested without explicit wording - -```text -강제 삭제는 명시 요청이 있을 때만 합니다. force로 정리할까요? -``` - -## Output - -- cleanup plan -- execution result -- removed worktree path -- deleted local branch -- remaining related refs if any - -## Non-Goals - -- Do not auto-merge PR -- Do not bulk-clean unrelated worktrees -- Do not discard dirty changes -- Do not force-delete by default diff --git a/.codex/skills/mozi-worktree-cleanup/agents/openai.yaml b/.codex/skills/mozi-worktree-cleanup/agents/openai.yaml deleted file mode 100644 index e961e40..0000000 --- a/.codex/skills/mozi-worktree-cleanup/agents/openai.yaml +++ /dev/null @@ -1,4 +0,0 @@ -interface: - display_name: "Mozi Worktree Cleanup" - short_description: "Safe post-merge worktree cleanup" - default_prompt: "Use $mozi-worktree-cleanup to safely remove a merged Mozi worktree and local branch." From 94683aa0034eca7ebd0ffffb56ed5f02c5c68007 Mon Sep 17 00:00:00 2001 From: "gnoes.ios" Date: Wed, 2 Sep 2026 01:58:10 +0900 Subject: [PATCH 5/8] =?UTF-8?q?chore:=20=EB=AC=B4=EC=8B=9C=20=EA=B2=BD?= =?UTF-8?q?=EB=A1=9C=EB=A5=BC=20docs/superpowers=20=EC=97=90=EC=84=9C=20do?= =?UTF-8?q?cs/agent=20=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 296e2b9..eb910e1 100644 --- a/.gitignore +++ b/.gitignore @@ -35,8 +35,8 @@ Config/*.xcconfig !Config/Example.xcconfig # Agent / SDD working docs -docs/superpowers/ -.superpowers/ +docs/agent +.agent/ # Git worktrees (local isolation) .worktrees/ From 19df90dd62e931a215d51b088d638f82ac63ad05 Mon Sep 17 00:00:00 2001 From: "gnoes.ios" Date: Thu, 3 Sep 2026 01:45:14 +0900 Subject: [PATCH 6/8] =?UTF-8?q?chore:=20CI=20=EC=97=90=20PR=20=EC=A4=91?= =?UTF-8?q?=EB=B3=B5=20=EC=8B=A4=ED=96=89=20=EC=B7=A8=EC=86=8C=EC=99=80=20?= =?UTF-8?q?=EC=8B=9C=EB=AE=AC=EB=A0=88=EC=9D=B4=ED=84=B0=20=EA=B3=A0?= =?UTF-8?q?=EC=A0=95=20=EB=B9=8C=EB=93=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 39 +++++++++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f8691e6..c348ce0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,6 +8,11 @@ on: permissions: contents: read +# 겹치는 PR 실행은 취소하고, main/dev push 실행은 남긴다. +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + jobs: lint: runs-on: macos-15 @@ -52,16 +57,7 @@ jobs: - name: Generate project run: mise exec -- tuist generate --no-open - - name: Build - run: | - xcodebuild \ - -workspace Mozi.xcworkspace \ - -scheme Mozi-Debug \ - -destination 'generic/platform=iOS Simulator' \ - -skipMacroValidation \ - build - - - name: Test Feature Reducers + - name: Select simulator run: | DESTINATION="$( python3 -c ' @@ -82,9 +78,32 @@ jobs: ' )" echo "Using destination: $DESTINATION" + echo "DESTINATION=$DESTINATION" >> "$GITHUB_ENV" + + - name: Cache Swift packages + uses: actions/cache@v4 + with: + path: .derivedData/SourcePackages + key: spm-${{ runner.os }}-${{ hashFiles('.package.resolved', 'Projects/**/Project.swift') }} + restore-keys: | + spm-${{ runner.os }}- + + - name: Build + run: | + xcodebuild \ + -workspace Mozi.xcworkspace \ + -scheme Mozi-Debug \ + -destination "$DESTINATION" \ + -derivedDataPath .derivedData \ + -skipMacroValidation \ + build + + - name: Test Feature Reducers + run: | xcodebuild \ -workspace Mozi.xcworkspace \ -scheme Feature \ -destination "$DESTINATION" \ + -derivedDataPath .derivedData \ -skipMacroValidation \ test From db7bc536f3b0ba4945762862076ad86843c82189 Mon Sep 17 00:00:00 2001 From: "gnoes.ios" Date: Thu, 3 Sep 2026 01:45:14 +0900 Subject: [PATCH 7/8] =?UTF-8?q?chore:=20SwiftLint=20=EC=A0=9C=EC=99=B8=20?= =?UTF-8?q?=EB=AA=A9=EB=A1=9D=EC=97=90=EC=84=9C=20=EC=9E=84=EC=8B=9C=20?= =?UTF-8?q?=EB=B9=8C=EB=93=9C=20=EA=B2=BD=EB=A1=9C=2011=EA=B0=9C=20?= =?UTF-8?q?=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .swiftlint.yml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/.swiftlint.yml b/.swiftlint.yml index 75c9fcd..ab13113 100644 --- a/.swiftlint.yml +++ b/.swiftlint.yml @@ -106,17 +106,6 @@ excluded: - Derived - DerivedData - .derivedData - - .derivedData-app - - .derivedData-app2 - - .derivedData-coresocialauth - - .derivedData-data - - .derivedData-data2 - - .derivedData-feature - - .derivedData-feature2 - - .derivedData-feature3 - - .derivedData-networklog - - .derivedData-rename - - .derivedData-rename-app - .git - Mozi.xcworkspace - "**/*.xcodeproj" From a251f7361f9e78012c991da0f5446fc5320f5f09 Mon Sep 17 00:00:00 2001 From: "gnoes.ios" Date: Thu, 3 Sep 2026 01:45:14 +0900 Subject: [PATCH 8/8] =?UTF-8?q?docs:=20=EC=A7=84=EC=9E=85=20=EB=AC=B8?= =?UTF-8?q?=EC=84=9C=EC=9D=98=20Feature=20=EA=B8=88=EC=A7=80=20=EC=9D=98?= =?UTF-8?q?=EC=A1=B4=20=ED=91=9C=EA=B8=B0=EB=A5=BC=20Core*=20=EB=A1=9C=20?= =?UTF-8?q?=ED=86=B5=EC=9D=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AGENTS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index 28fdda8..db2a171 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -31,7 +31,7 @@ Mozi 작업 시 에이전트 진입점. ## 먼저 물을 것 - Feature 모듈 분리 -- Feature → Data / Core 직접 참조 +- Feature → Data / Core* 직접 참조 - scheme / bundle 이름 변경 - 문서 추가·분리