Dual-Model Verification

Codex QA
Integration

Claude Code QA 파이프라인에 OpenAI Codex(GPT-5.4)를 통합. 단일 모델의 blind spot을 다른 모델로 보완하는 이중 검증 체계.

3
Hard Gates
2
Models
4
Recovery Steps
7
Files Modified
이중 모델 검증
Claude (Opus 4.6)

프로젝트 컨벤션

scaffold NEVER DO 규칙, 프로젝트별 패턴, 코딩 스타일, 타입 안전성 검증. 프로젝트 맥락을 깊이 이해.

+
Codex (GPT-5.4)

Blind Spot 보완

Claude가 놓치는 패턴, 보안 취약점, 엣지케이스를 다른 관점에서 탐지. adversarial-review로 의도적 결함 탐색.

3중 강제 게이트
1
Review Gate
SubagentStop/TaskCompleted 시 codex review --uncommitted 자동 실행. CRITICAL 0건이면 PASS 증거 파일 생성.
codex-review-gate.sh
2
Stop Gate
Claude가 응답을 끝내려 할 때 codex review 실행. decision: "block" 반환하면 멈출 수 없음.
stop-review-gate-hook.mjs
3
Push Gate
.qa-cycle-passed + .codex-review-passed 둘 다 PASS여야 push 허용.
exit 2 — HARD BLOCK
전체 동작 흐름
PostToolUse — 코드 작성 시
code-quality-check.sh
no-localstorage.sh
scaffold-violation-check.sh
SubagentStop / TaskCompleted
codex-review-gate.sh → .codex-review-passed
user-proxy agent hook
PostToolUseFailure — 도구 실패 시
failure-counter.sh (1/3, 2/3, 3/3→RESCUE)
error-fixer agent hook
Stop — Claude 응답 종료 시도
stop-review-gate-hook.mjs → ALLOW or BLOCK
self-improve-trigger.sh
PreToolUse — git push 시도
.qa-cycle-passed 검증 (기존)
.codex-review-passed 검증 (신규)
둘 다 PASS → push 허용
에러 복구 4단계

기존 3단계에서 4단계로 확장. 3차에 Codex rescue를 삽입하여 다른 모델(GPT-5.4)의 완전히 다른 접근을 시도.

1st
직접 수정
타입 정의
import 경로
로직 수정
2nd
구조 변경
타입 가드
optional chaining
대안 라이브러리
3rd
codex:rescue
GPT-5.4에 위임
다른 모델의
다른 접근
4th
리셋
revert 후
다른 구현 방식
재시도

4차 실패 → 사용자 에스컬레이션 (텔레그램 알림)

시나리오별 강제 여부
시나리오 Review Gate Stop Gate Push Gate 강제 수준
직접 처리 (Task 사용) O O O 3중 강제
/team O O O 3중 강제
/manager O O O 3중 강제
직접 처리 (Task 미사용) X O 차단* Stop만
slash command 불확실 O 불확실 Stop만 확실

* Task 미사용 시 .codex-review-passed 미생성 → push 영구 차단. 수동으로 /codex:review 실행 필요.

HARD vs SOFT 최종 정리
Hook 차단 방식 분류
qa-gate-before-push.sh .qa-cycle-passed exit 2 HARD
qa-gate-before-push.sh .codex-review-passed exit 2 HARD
stop-review-gate-hook.mjs decision: "block" HARD
scaffold-violation-check.sh NEVER DO 패턴 감지 HARD
no-env-commit.sh exit 2 HARD
failure-counter.sh 3회 실패 시 codex:rescue 메시지 SOFT
codex-review-gate.sh 증거 파일 생성만 (차단 아님) SOFT
agent hook prompts 자연어 지시 (Claude 판단 의존) SOFT
Codex 명령어
/codex:review
코드 리뷰 (GPT-5.4)
/codex:adversarial-review
의도적 결함 탐색
/codex:rescue
작업 위임 (bug-fixer 대안)
/codex:status
백그라운드 작업 상태