Commit, Push, and Open Review Request
Commit → normal push → PR/MR 생성 workflow. 세 단계 전체의 mutation plan을 먼저 승인받는다.
1. Preflight
- Git root, HEAD, current branch, status, upstream, remote URL을 확인한다.
- Candidate tracked working-tree diff, index diff, untracked file의 실제 content와 file type을 읽고 task 관련
포함과 제외로 분류한다.
- Candidate별 cryptographic content hash 또는 byte-identical diff snapshot을 만든다.
git status는 content identity가 아니다.
- 기존 staged와 unrelated 변경은 보존한다. Partial staged 상태나 동일 path의 index/working-tree 내용을 승인 범위와 안전하게 분리할 수 없으면 index를 변경하지 않고 중단한다.
- Repository scanner가 있으면 candidate content를 검사한다. 없으면 tracked/index diff와 untracked 실제 content를 read-only로 검사하고, binary/unreadable content 또는 secret·token·credential·private key 의심 항목이 있으면 중단한다.
references/providers.md에 따라 selected provider, remote, hostname, repository, 실제 default branch ref, CLI/인증 상태를 확인한다.
- Detached HEAD, 선택 불가능한 remote, 확인되지 않은 default branch ref에서는 중단한다.
- Current branch가 default branch이면 새 feature branch 이름을 제안한다.
2. Preview and approval
다음을 한 번에 제시한다.
- 포함·제외 파일과 commit message
- Candidate tracked/index/untracked content identity와 security scan 결과·한계
- 생성할 branch와 base branch
- exact staging, commit, normal push 명령
- provider와 authentication 상태 및 hostname, repository, source/base branch, title/body에 고정된 exact PR/MR 명령
- CLI/인증 부재 시 exact manual review URL 또는 URL을 안전하게 구성할 수 없을 때의 project web URL·source/base branch·사용자 실행 UI 절차
사용자의 명시적 승인 전에는 branch 생성, stage, commit, push, PR/MR 생성을 하지 않는다.
3. Execute
- 승인 직후 HEAD, branch, upstream, selected remote URL/default ref와 모든 tracked/index/untracked content identity를 같은 방식으로 다시 확인한다. Hash 또는 byte-identical diff가 다르면 status가 같아도 중단한다.
- 필요한 경우 승인된 이름으로 branch를 생성한다.
- 승인된 path만 명시해 stage하고, 해당 path의 cached diff와 commit 예정 diff가 approved diff와 byte-identical인지 확인한다. 기존 unrelated staged content는 commit 대상에서 제외하고 보존한다. 일치와 분리를 증명할 수 없으면 commit하지 않는다.
- 승인된 content와 message만 commit한다.
- 승인된 remote/current branch로 normal push한다.
- Push 성공 후에만 provider CLI로 PR/MR을 생성한다. Probe와 create 명령은 승인된 hostname, repository, source/base branch, title/body를 explicit argument로 사용한다.
- PR/MR title, summary, test plan은 전체 branch diff와 repository template을 반영한다. 별도 언어 규칙이 없으면 한국어로 작성한다.
4. Failure handling
- Branch 또는 commit 실패: 이후 단계 중단.
- Push 실패: PR/MR 생성 금지.
- PR/MR 실패: commit·push를 rollback하지 않고 재시도 방법 안내.
- Unknown provider 또는 CLI/인증 부재: push까지만 수행하고
references/providers.md에 따른 exact manual review URL 또는 fail-safe manual UI 절차를 안내한다.
Safety
- Force push, rebase, branch overwrite를 하지 않는다.
- Provider API를 직접 호출하지 않는다.
- Credential을 요청하거나 출력하지 않는다.
- 승인 범위를 벗어난 mutation을 하지 않는다.
Attribution
Adapted from Anthropic commit-commands/commands/commit-push-pr.md under Apache License 2.0. Modified for runtime-neutral skills, GitHub/GitLab/Gitea adapters, selective staging, and approval gates.
1---2name: commit-push-pr3description: Use when the user asks to commit, push, and open a GitHub PR, GitLab MR, or Gitea PR.4---56# Commit, Push, and Open Review Request78Commit → normal push → PR/MR 생성 workflow. 세 단계 전체의 mutation plan을 먼저 승인받는다.910## 1. Preflight11121. Git root, HEAD, current branch, status, upstream, remote URL을 확인한다.132. Candidate tracked working-tree diff, index diff, untracked file의 실제 content와 file type을 읽고 task 관련 `포함`과 `제외`로 분류한다.143. Candidate별 cryptographic content hash 또는 byte-identical diff snapshot을 만든다. `git status`는 content identity가 아니다.154. 기존 staged와 unrelated 변경은 보존한다. Partial staged 상태나 동일 path의 index/working-tree 내용을 승인 범위와 안전하게 분리할 수 없으면 index를 변경하지 않고 중단한다.165. Repository scanner가 있으면 candidate content를 검사한다. 없으면 tracked/index diff와 untracked 실제 content를 read-only로 검사하고, binary/unreadable content 또는 secret·token·credential·private key 의심 항목이 있으면 중단한다.176. `references/providers.md`에 따라 selected provider, remote, hostname, repository, 실제 default branch ref, CLI/인증 상태를 확인한다.187. Detached HEAD, 선택 불가능한 remote, 확인되지 않은 default branch ref에서는 중단한다.198. Current branch가 default branch이면 새 feature branch 이름을 제안한다.2021## 2. Preview and approval2223다음을 한 번에 제시한다.2425- 포함·제외 파일과 commit message26- Candidate tracked/index/untracked content identity와 security scan 결과·한계27- 생성할 branch와 base branch28- exact staging, commit, normal push 명령29- provider와 authentication 상태 및 hostname, repository, source/base branch, title/body에 고정된 exact PR/MR 명령30- CLI/인증 부재 시 exact manual review URL 또는 URL을 안전하게 구성할 수 없을 때의 project web URL·source/base branch·사용자 실행 UI 절차3132사용자의 명시적 승인 전에는 branch 생성, stage, commit, push, PR/MR 생성을 하지 않는다.3334## 3. Execute35361. 승인 직후 HEAD, branch, upstream, selected remote URL/default ref와 모든 tracked/index/untracked content identity를 같은 방식으로 다시 확인한다. Hash 또는 byte-identical diff가 다르면 status가 같아도 중단한다.372. 필요한 경우 승인된 이름으로 branch를 생성한다.383. 승인된 path만 명시해 stage하고, 해당 path의 cached diff와 commit 예정 diff가 approved diff와 byte-identical인지 확인한다. 기존 unrelated staged content는 commit 대상에서 제외하고 보존한다. 일치와 분리를 증명할 수 없으면 commit하지 않는다.394. 승인된 content와 message만 commit한다.405. 승인된 remote/current branch로 normal push한다.416. Push 성공 후에만 provider CLI로 PR/MR을 생성한다. Probe와 create 명령은 승인된 hostname, repository, source/base branch, title/body를 explicit argument로 사용한다.427. PR/MR title, summary, test plan은 전체 branch diff와 repository template을 반영한다. 별도 언어 규칙이 없으면 한국어로 작성한다.4344## 4. Failure handling4546- Branch 또는 commit 실패: 이후 단계 중단.47- Push 실패: PR/MR 생성 금지.48- PR/MR 실패: commit·push를 rollback하지 않고 재시도 방법 안내.49- Unknown provider 또는 CLI/인증 부재: push까지만 수행하고 `references/providers.md`에 따른 exact manual review URL 또는 fail-safe manual UI 절차를 안내한다.5051## Safety5253- Force push, rebase, branch overwrite를 하지 않는다.54- Provider API를 직접 호출하지 않는다.55- Credential을 요청하거나 출력하지 않는다.56- 승인 범위를 벗어난 mutation을 하지 않는다.5758## Attribution5960Adapted from Anthropic `commit-commands/commands/commit-push-pr.md` under Apache License 2.0. Modified for runtime-neutral skills, GitHub/GitLab/Gitea adapters, selective staging, and approval gates.