PR Prep Assistant
Overview
Prepare QT-AI pull requests safely. Default output language is Korean. Default behavior is to inspect the local branch, draft the PR title/body, and propose commands; do not push, open, merge, or hotfix unless the user explicitly asks.
Operating Boundary
Do by default:
- Inspect branch, status, staged/unstaged changes, and diff summary.
- Check PR size guidance: 10 files or fewer and 500 changed lines or fewer.
- Draft Korean PR title and Korean PR body.
- Identify missing F-IDs, document references, tests, or risk explanations.
- Propose
git push and gh pr create commands without running them.
- Help respond to CI failures or
REQUEST_CHANGES comments.
Do only after explicit user request:
- Run
git push.
- Run
gh pr create.
- Inspect remote PR comments through GitHub tooling.
Never do:
- Push directly to
dev or master.
- Press or automate merge/squash merge.
- Create a PR to
master except an explicitly requested emergency hotfix.
- Add prohibited temporary code or normalize a known rule violation.
- Modify requirements or owner-scope files without calling out the reason and reviewer need.
Workflow
- Inspect repository state.
git branch --show-current
git status --short
git diff --stat
git diff --cached --stat
git diff --name-only origin/dev...HEAD
If origin/dev is stale or missing, ask before fetching unless the user asked to update. Use dev as the PR base for normal PRs.
- Classify the PR.
feat: new behavior. Requires relevant F-ID from 07_요구사항_정의서.md.
fix: bug fix.
refactor: behavior-preserving restructuring.
test: test additions or changes.
docs: documentation only.
chore: build, dependency, CI, or tooling.
- Check the risk gates.
Flag critical risks immediately:
- Direct changes to another teammate's owner area without explanation.
- Plain API key, password, token, private key, or secret.
- New independent service directories such as
auth-service, bible-service, or ai-service.
- RAG, ChromaDB, vector DB, Elasticsearch.
- Kafka, Kubernetes, Helm v1.
- AI free chatbot, multi-turn chat, SSE, or
/ai/sessions/**.
- Korean Revised Version, ESV, or NIV seed/response/test data.
- Scripture text from Scripture Union or Duranno.
- Praise lyrics, music files, or AI praise recommendation.
- Church verification screen, button, API, or DB field.
Flag fix-required risks:
- Missing
@Transactional on DB write path.
- Empty catch block.
javax.* instead of jakarta.*.
- Direct imports of another domain's Entity, Service, Repository, or infrastructure type.
- External public API outside
/api/v1/** except /oauth2/**.
- Internal Java interface modeled as HTTP/OpenAPI.
- Simulator state returned as null instead of
READY, MISSING, FAILED, or DISABLED.
- Today QT response missing passage, explanation entry, note entry, or simulator status.
- Event handler failure without
eventId, event type, handler name, and error log.
- New feature or core UseCase/Service change without tests.
- Integration test missing without PR body reason.
- Ask for missing information only when needed.
Ask concise questions for:
- Related F-ID or document references.
- Tests actually run and results.
- Integration test omission reason.
- Why owner-scope files changed.
- Whether push or PR creation should actually run.
- Draft the PR.
- PR title should follow the commit convention style:
{type}({scope}): Korean subject.
- PR body must be Korean and use the team template below.
- Fill checkboxes honestly. Do not mark tests as passed unless evidence was provided or commands were run in this session.
- For docs/chore-only PRs, mark the test checklist's docs/chore item.
PR Body Template
## 구현 내용
[이 PR에서 해결하거나 추가하는 변경 사항을 간략히 작성]
## 관련 요구사항 / 문서
[예: F-01-11, F-02-01, 03_아키텍처_정의서.md §5, 04_API_명세서.md §4, 18_코드_품질_게이트.md §3]
## 변경 유형
- [ ] 기능 추가 (feat)
- [ ] 버그 수정 (fix)
- [ ] 리팩토링 (refactor)
- [ ] 테스트 (test)
- [ ] 문서 (docs)
- [ ] 인프라 / CI (chore)
## v3.1 코드·문서 체크리스트
- [ ] `07_요구사항_정의서.md` v3.1과 충돌하지 않음
- [ ] `00_문서_역할_분리표.md`의 문서 책임과 충돌하지 않음
- [ ] 아키텍처 변경은 `03_아키텍처_정의서.md`, API 변경은 `04_API_명세서.md`, 품질 게이트 변경은 `18_코드_품질_게이트.md`, 용어 변경은 `23_도메인_용어사전.md`와 정합함
- [ ] 단일 `qtai-server` Modular Monolith 기준을 지킴
- [ ] `note`, `sharing`, `praise`는 별도 도메인으로 유지하고 독립 서비스로 분리하지 않음
- [ ] 다른 도메인의 Entity/Service/Repository 직접 import 없음
- [ ] 도메인 간 호출은 DTO/Interface로만 처리
- [ ] 외부 공개 API는 `/api/v1/**`, 내부 도메인 인터페이스는 Java Interface로 분리됨
- [ ] RAG, ChromaDB, 벡터 DB, Elasticsearch 코드/의존성 없음
- [ ] Kafka, Kubernetes, Helm v1 도입 없음
- [ ] AI 자유 챗봇, 다중 턴 대화, SSE, `/ai/sessions/**` 엔드포인트 없음
- [ ] 해설·시뮬레이터는 사용자 요청 경로에서 즉시 생성하지 않음
- [ ] F-15 사실 기반 Q&A는 단발·검증 흐름으로만 제공
- [ ] QT 본문은 00:00 KST 공개 / 04:00 KST 수집 배치 기준
- [ ] 오늘 QT 응답은 본문, 해설 진입점, 묵상 진입점, 시뮬레이터 상태값을 반환
- [ ] 성서 유니온·두란노 본문 텍스트 자체 저장 없음
- [ ] 성경 데이터는 Repo URL·라이선스·번역본명·출처 표기·재배포 가능 여부 확인 완료
- [ ] 개역개정, ESV, NIV 시드/응답/테스트 데이터 없음
- [ ] 찬양 가사·음원 저장 없음, AI 찬양 추천 없음
- [ ] 교회 인증 화면/버튼/API 없음
- [ ] 시뮬레이터는 `READY/MISSING/FAILED/DISABLED` 상태를 반환
- [ ] 관리자 API는 기능별 관리자 권한, 배치/AI 내부 작업은 `SYSTEM_BATCH` 권한 기준
- [ ] 인프로세스 이벤트 실패 시 `eventId` + error log 기록 및 재처리 가능
- [ ] `application.yml` 또는 코드에 평문 Secret 없음
## 테스트 체크리스트
- [ ] 단위 테스트(Unit Test) 작성 완료 및 `./gradlew -p qtai-server test` 로컬 통과
- [ ] 통합 테스트(Integration Test) 작성 완료
또는 미작성 사유:
- [ ] docs / chore 타입은 해당 없음
## 테스트 방법
[어떻게 테스트했는지 설명: Unit / Integration / 수동 / 미실행 사유]
Command Suggestions
Normal PR commands:
git checkout dev
git pull origin dev
git checkout -b feature/<scope>-<short-description>
git push -u origin <current-branch>
gh pr create --base dev --head <current-branch> --title "<title>" --body "<body>"
Do not run these automatically unless explicitly asked. If already on a feature branch, do not suggest creating a new branch unless the current branch is dev, master, or incorrectly named.
Emergency hotfix commands are exceptional and require explicit user confirmation:
git checkout master
git checkout -b hotfix/<short-description>
git push -u origin hotfix/<short-description>
gh pr create --base master --head hotfix/<short-description>
After a master hotfix is merged, remind the user that the fix must also be cherry-picked to dev.
REQUEST_CHANGES Mode
When the user asks to handle review feedback:
- Inspect the comments or ask the user to paste them.
- Group comments by file and severity.
- Separate true blockers from suggestions.
- Propose a fix plan before editing unless the requested fix is trivial.
- After changes, draft a Korean reply summary for each review thread.
Do not dismiss a reviewer comment without a technical reason. Do not rewrite unrelated files to satisfy broad feedback.
Output Style
For PR preparation, respond in this order:
사전 점검: branch, base, size, risk findings.
누락 정보: only unresolved inputs needed before PR.
PR 제목: one recommended Korean Conventional Commit style title.
PR 본문: filled template.
제안 명령: push/create commands, clearly not executed unless already requested.
If a critical risk is found, put it before the PR draft and do not present the PR as ready.
1---2name: pr-prep-assistant3description: Use when preparing, reviewing, drafting, or creating QT-AI pull requests, PR titles, PR bodies, PR templates, GitHub PR commands, CI readiness checks, or REQUEST_CHANGES responses4---56# PR Prep Assistant78## Overview910Prepare QT-AI pull requests safely. Default output language is Korean. Default behavior is to inspect the local branch, draft the PR title/body, and propose commands; do not push, open, merge, or hotfix unless the user explicitly asks.1112## Operating Boundary1314Do by default:1516- Inspect branch, status, staged/unstaged changes, and diff summary.17- Check PR size guidance: 10 files or fewer and 500 changed lines or fewer.18- Draft Korean PR title and Korean PR body.19- Identify missing F-IDs, document references, tests, or risk explanations.20- Propose `git push` and `gh pr create` commands without running them.21- Help respond to CI failures or `REQUEST_CHANGES` comments.2223Do only after explicit user request:2425- Run `git push`.26- Run `gh pr create`.27- Inspect remote PR comments through GitHub tooling.2829Never do:3031- Push directly to `dev` or `master`.32- Press or automate merge/squash merge.33- Create a PR to `master` except an explicitly requested emergency hotfix.34- Add prohibited temporary code or normalize a known rule violation.35- Modify requirements or owner-scope files without calling out the reason and reviewer need.3637## Workflow38391. Inspect repository state.4041```powershell42git branch --show-current43git status --short44git diff --stat45git diff --cached --stat46git diff --name-only origin/dev...HEAD47```4849If `origin/dev` is stale or missing, ask before fetching unless the user asked to update. Use `dev` as the PR base for normal PRs.50512. Classify the PR.5253- `feat`: new behavior. Requires relevant F-ID from `07_요구사항_정의서.md`.54- `fix`: bug fix.55- `refactor`: behavior-preserving restructuring.56- `test`: test additions or changes.57- `docs`: documentation only.58- `chore`: build, dependency, CI, or tooling.59603. Check the risk gates.6162Flag critical risks immediately:6364- Direct changes to another teammate's owner area without explanation.65- Plain API key, password, token, private key, or secret.66- New independent service directories such as `auth-service`, `bible-service`, or `ai-service`.67- RAG, ChromaDB, vector DB, Elasticsearch.68- Kafka, Kubernetes, Helm v1.69- AI free chatbot, multi-turn chat, SSE, or `/ai/sessions/**`.70- Korean Revised Version, ESV, or NIV seed/response/test data.71- Scripture text from Scripture Union or Duranno.72- Praise lyrics, music files, or AI praise recommendation.73- Church verification screen, button, API, or DB field.7475Flag fix-required risks:7677- Missing `@Transactional` on DB write path.78- Empty catch block.79- `javax.*` instead of `jakarta.*`.80- Direct imports of another domain's Entity, Service, Repository, or infrastructure type.81- External public API outside `/api/v1/**` except `/oauth2/**`.82- Internal Java interface modeled as HTTP/OpenAPI.83- Simulator state returned as null instead of `READY`, `MISSING`, `FAILED`, or `DISABLED`.84- Today QT response missing passage, explanation entry, note entry, or simulator status.85- Event handler failure without `eventId`, event type, handler name, and error log.86- New feature or core UseCase/Service change without tests.87- Integration test missing without PR body reason.88894. Ask for missing information only when needed.9091Ask concise questions for:9293- Related F-ID or document references.94- Tests actually run and results.95- Integration test omission reason.96- Why owner-scope files changed.97- Whether push or PR creation should actually run.98995. Draft the PR.100101- PR title should follow the commit convention style: `{type}({scope}): Korean subject`.102- PR body must be Korean and use the team template below.103- Fill checkboxes honestly. Do not mark tests as passed unless evidence was provided or commands were run in this session.104- For docs/chore-only PRs, mark the test checklist's docs/chore item.105106## PR Body Template107108```markdown109## 구현 내용110[이 PR에서 해결하거나 추가하는 변경 사항을 간략히 작성]111112## 관련 요구사항 / 문서113[예: F-01-11, F-02-01, 03_아키텍처_정의서.md §5, 04_API_명세서.md §4, 18_코드_품질_게이트.md §3]114115## 변경 유형116- [ ] 기능 추가 (feat)117- [ ] 버그 수정 (fix)118- [ ] 리팩토링 (refactor)119- [ ] 테스트 (test)120- [ ] 문서 (docs)121- [ ] 인프라 / CI (chore)122123## v3.1 코드·문서 체크리스트124- [ ] `07_요구사항_정의서.md` v3.1과 충돌하지 않음125- [ ] `00_문서_역할_분리표.md`의 문서 책임과 충돌하지 않음126- [ ] 아키텍처 변경은 `03_아키텍처_정의서.md`, API 변경은 `04_API_명세서.md`, 품질 게이트 변경은 `18_코드_품질_게이트.md`, 용어 변경은 `23_도메인_용어사전.md`와 정합함127- [ ] 단일 `qtai-server` Modular Monolith 기준을 지킴128- [ ] `note`, `sharing`, `praise`는 별도 도메인으로 유지하고 독립 서비스로 분리하지 않음129- [ ] 다른 도메인의 Entity/Service/Repository 직접 import 없음130- [ ] 도메인 간 호출은 DTO/Interface로만 처리131- [ ] 외부 공개 API는 `/api/v1/**`, 내부 도메인 인터페이스는 Java Interface로 분리됨132- [ ] RAG, ChromaDB, 벡터 DB, Elasticsearch 코드/의존성 없음133- [ ] Kafka, Kubernetes, Helm v1 도입 없음134- [ ] AI 자유 챗봇, 다중 턴 대화, SSE, `/ai/sessions/**` 엔드포인트 없음135- [ ] 해설·시뮬레이터는 사용자 요청 경로에서 즉시 생성하지 않음136- [ ] F-15 사실 기반 Q&A는 단발·검증 흐름으로만 제공137- [ ] QT 본문은 00:00 KST 공개 / 04:00 KST 수집 배치 기준138- [ ] 오늘 QT 응답은 본문, 해설 진입점, 묵상 진입점, 시뮬레이터 상태값을 반환139- [ ] 성서 유니온·두란노 본문 텍스트 자체 저장 없음140- [ ] 성경 데이터는 Repo URL·라이선스·번역본명·출처 표기·재배포 가능 여부 확인 완료141- [ ] 개역개정, ESV, NIV 시드/응답/테스트 데이터 없음142- [ ] 찬양 가사·음원 저장 없음, AI 찬양 추천 없음143- [ ] 교회 인증 화면/버튼/API 없음144- [ ] 시뮬레이터는 `READY/MISSING/FAILED/DISABLED` 상태를 반환145- [ ] 관리자 API는 기능별 관리자 권한, 배치/AI 내부 작업은 `SYSTEM_BATCH` 권한 기준146- [ ] 인프로세스 이벤트 실패 시 `eventId` + error log 기록 및 재처리 가능147- [ ] `application.yml` 또는 코드에 평문 Secret 없음148149## 테스트 체크리스트150- [ ] 단위 테스트(Unit Test) 작성 완료 및 `./gradlew -p qtai-server test` 로컬 통과151- [ ] 통합 테스트(Integration Test) 작성 완료152 또는 미작성 사유:153- [ ] docs / chore 타입은 해당 없음154155## 테스트 방법156[어떻게 테스트했는지 설명: Unit / Integration / 수동 / 미실행 사유]157```158159## Command Suggestions160161Normal PR commands:162163```powershell164git checkout dev165git pull origin dev166git checkout -b feature/<scope>-<short-description>167git push -u origin <current-branch>168gh pr create --base dev --head <current-branch> --title "<title>" --body "<body>"169```170171Do not run these automatically unless explicitly asked. If already on a feature branch, do not suggest creating a new branch unless the current branch is `dev`, `master`, or incorrectly named.172173Emergency hotfix commands are exceptional and require explicit user confirmation:174175```powershell176git checkout master177git checkout -b hotfix/<short-description>178git push -u origin hotfix/<short-description>179gh pr create --base master --head hotfix/<short-description>180```181182After a master hotfix is merged, remind the user that the fix must also be cherry-picked to `dev`.183184## REQUEST_CHANGES Mode185186When the user asks to handle review feedback:1871881. Inspect the comments or ask the user to paste them.1892. Group comments by file and severity.1903. Separate true blockers from suggestions.1914. Propose a fix plan before editing unless the requested fix is trivial.1925. After changes, draft a Korean reply summary for each review thread.193194Do not dismiss a reviewer comment without a technical reason. Do not rewrite unrelated files to satisfy broad feedback.195196## Output Style197198For PR preparation, respond in this order:1992001. `사전 점검`: branch, base, size, risk findings.2012. `누락 정보`: only unresolved inputs needed before PR.2023. `PR 제목`: one recommended Korean Conventional Commit style title.2034. `PR 본문`: filled template.2045. `제안 명령`: push/create commands, clearly not executed unless already requested.205206If a critical risk is found, put it before the PR draft and do not present the PR as ready.