diff --git a/docs/requirements-log.md b/docs/requirements-log.md index ccc1738..59a0eae 100644 --- a/docs/requirements-log.md +++ b/docs/requirements-log.md @@ -64,3 +64,25 @@ **참고:** Realtime 모드 전용. Daily 모드는 배치 효율성을 위해 정적 watchlist 사용. **이슈/PR:** #76, #77 + +--- + +## 2026-02-10 + +### 코드 리뷰 시 플랜-구현 일치 검증 규칙 + +**배경:** +- 코드 리뷰 시 플랜(EnterPlanMode에서 승인된 계획)과 실제 구현이 일치하는지 확인하는 절차가 없었음 +- 플랜과 다른 구현이 리뷰 없이 통과될 위험 + +**요구사항:** +1. 모든 PR 리뷰에서 플랜-구현 일치 여부를 필수 체크 +2. 플랜에 없는 변경은 정당한 사유 필요 +3. 플랜 항목이 누락되면 PR 설명에 사유 기록 +4. 스코프가 플랜과 일치하는지 확인 + +**구현 결과:** +- `docs/workflow.md`에 Code Review Checklist 섹션 추가 + - Plan Consistency (필수), Safety & Constraints, Quality, Workflow 4개 카테고리 + +**이슈/PR:** #114 diff --git a/docs/workflow.md b/docs/workflow.md index 7222c2c..0183368 100644 --- a/docs/workflow.md +++ b/docs/workflow.md @@ -74,3 +74,37 @@ task_tool( ``` Use `run_in_background=True` for independent tasks that don't block subsequent work. + +## Code Review Checklist + +**CRITICAL: Every PR review MUST verify plan-implementation consistency.** + +Before approving any PR, the reviewer (human or agent) must check ALL of the following: + +### 1. Plan Consistency (MANDATORY) + +- [ ] **Implementation matches the approved plan** — Compare the actual code changes against the plan created during `EnterPlanMode`. Every item in the plan must be addressed. +- [ ] **No unplanned changes** — If the implementation includes changes not in the plan, they must be explicitly justified. +- [ ] **No plan items omitted** — If any planned item was skipped, the reason must be documented in the PR description. +- [ ] **Scope matches** — The PR does not exceed or fall short of the planned scope. + +### 2. Safety & Constraints + +- [ ] `src/core/risk_manager.py` is unchanged (READ-ONLY) +- [ ] Circuit breaker threshold not weakened (only stricter allowed) +- [ ] Fat-finger protection (30% max order) still enforced +- [ ] Confidence < 80 still forces HOLD +- [ ] No hardcoded API keys or secrets + +### 3. Quality + +- [ ] All new/modified code has corresponding tests +- [ ] Test coverage >= 80% +- [ ] `ruff check src/ tests/` passes (no lint errors) +- [ ] No `assert` statements removed from tests + +### 4. Workflow + +- [ ] PR references the Gitea issue number +- [ ] Feature branch follows naming convention (`feature/issue-N-description`) +- [ ] Commit messages are clear and descriptive