diff --git a/.opencode/commands/commit.md b/.opencode/commands/commit.md deleted file mode 100644 index 0528089b..00000000 --- a/.opencode/commands/commit.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -description: commit-policy 스킬을 로드해 커밋 메시지 생성과 전후 검증을 수행한다 -agent: build -subtask: true ---- - -작업 목표: -현재 변경사항을 안전하게 커밋한다. - -필수 시작 단계: -1. `skill` 도구로 `commit-policy` 스킬을 먼저 로드한다. - - `skill({ name: "commit-policy" })` - -실행 단계: -1. 로드한 `commit-policy` 스킬의 Hard Requirements와 Execution Flow를 그대로 수행한다. -2. `AGENTS.md`의 최소 정책(형식/한글 description/검증 스크립트)을 항상 만족한다. -3. `$ARGUMENTS`가 있으면 scope 또는 description 의도에 반영하되, 스킬 규칙과 형식을 깨지 않는다. -4. 마지막에 실행 명령과 pre-check/post-check PASS/FAIL 핵심 결과를 간단히 보고한다. - -추가 사용자 의도: -$ARGUMENTS diff --git a/.opencode/skills/commit-policy/SKILL.md b/.opencode/skills/commit-policy/SKILL.md deleted file mode 100644 index b13180e7..00000000 --- a/.opencode/skills/commit-policy/SKILL.md +++ /dev/null @@ -1,46 +0,0 @@ ---- -name: commit-policy -description: Apply this skill for any git commit task in this repository. It enforces commit message format and validation flow defined in AGENTS.md and work/scripts/check-commit-message-rules.sh, including pre-commit and post-commit verification. ---- - -# Commit Policy Skill - -Use this workflow whenever the task includes creating a commit. - -## Required References - -- `@AGENTS.md` -- `@work/scripts/check-commit-message-rules.sh` - -## Hard Requirements - -1. Use commit subject format: `(scope): `. -2. `type` must be lowercase (for example `feat`, `fix`, `chore`, `docs`, `refactor`, `test`). -3. `description` must include Korean text and stay concise in imperative present tone. -4. Optional footer must use `Refs: #123` or `Refs: #123, #456` format. -5. Never commit secret files (`.env`, key/token/secret credential files). -6. Never bypass hooks with `--no-verify`. - -## Execution Flow - -1. Inspect context with: - - `git status` - - `git diff --cached` - - `git diff` - - `git log -5 --oneline` -2. Stage commit target files only. Exclude suspicious secret-bearing files. -3. Draft commit message from the change intent (focus on why, not only what). -4. Run pre-commit validation with the full draft message: - - `./work/scripts/check-commit-message-rules.sh --message ""` -5. If validation fails, revise message and re-run until PASS. -6. Commit using the validated message. -7. Run post-commit validation: - - `./work/scripts/check-commit-message-rules.sh` -8. Report executed commands and PASS/FAIL summary. - -## Output Checklist - -- Final commit subject. -- Whether pre-check passed. -- Whether post-check passed. -- Any excluded files and reason.