# task-1925+1 완료 보고서

**S**: 전수 감사 결과 12개 자동화 기능 중 실제 작동하는 건 2개뿐이며, 판정C(구조적 결함) 2건은 실행 명령 자체가 프롬프트에 없고, 판정B(무시됨) 7건 중 핵심 4건은 강제 트리거가 없어서 팀장이 선택적으로 무시 중이었다.

**C**: 텍스트 지시("하세요")만으로는 Codex 사전 검증, Sanitize 게이트, L1 스모크테스트 결과 기록, Micro-commit, 3 Step Why 등이 실행되지 않아 품질 게이트가 무력화된 상태였다.

**Q**: 스크립트 실행 명령 + 결과 검증 게이트를 프롬프트에 직접 삽입하여 강제 실행할 수 있는가?

**A**: 6건 모두 수정 완료. `_build_verification_section()`에 Codex/Sanitize 실행 명령을 주입하고, L1 결과 기록 형식을 강제하며, g3_independent_verifier.py에 micro-commit/3StepWhy WARN 검증을 추가했다. pytest 145개 전체 PASS.

## 수정 파일별 검증 상태

| 파일 | 변경 내용 | grep 검증 | 상태 |
|------|-----------|-----------|------|
| prompts/team_prompts.py:990 | _build_verification_section에 task_id 파라미터 추가 | grep "task_id: str" OK | verified |
| prompts/team_prompts.py:1010 | Codex 사전 검증 실행 명령 삽입 (gate_level >= 3) | grep "codex_gate_check" OK | verified |
| prompts/team_prompts.py:1016 | Sanitize 게이트 구체적 실행 방법 삽입 | grep "sanitize_text" OK | verified |
| prompts/team_prompts.py:743 | L1 스모크테스트 결과 기록 형식 추가 | grep "서버 재시작: \[" OK | verified |
| prompts/team_prompts.py:755 | 호출부에 task_id 전달 | grep "level, task_id" OK | verified |
| scripts/g3_independent_verifier.py:445 | check_micro_commits 함수 추가 | grep "check_micro_commits" OK | verified |
| scripts/g3_independent_verifier.py:466 | check_three_step_why 함수 추가 | grep "check_three_step_why" OK | verified |
| scripts/g3_independent_verifier.py:671 | result에 micro_commit/three_step_why 체크 추가 | grep "micro_commit" OK | verified |
| tests/test_team_prompts.py:1018 | TestCodexAndSanitizeGateInPrompt 클래스 추가 (7 tests) | grep "TestCodexAndSanitize" OK | verified |
| tests/test_team_prompts.py:1062 | TestL1SmokeTestRecordFormat 클래스 추가 (2 tests) | grep "TestL1Smoke" OK | verified |

## 발견 이슈 및 해결

1. **테스트 ANU_KEY 누락**: 새 테스트 클래스에 `_patch_anu_key` fixture 미적용 → 9건 FAIL → autouse fixture 추가로 해결
2. **TestL1SmokeTestRecordFormat 파일 격리 미적용**: 원본 build_prompt 호출 시 파일 쓰기 발생 → `_patch_file_write` fixture 추가로 해결
3. **B-1 중복 확인**: DIRECT-WORKFLOW.md 279~286행에 이미 G3 실행 명령이 존재 → 수정 불필요 확인

## 검증 시나리오 결과

1. Lv.3 레벨에서 Codex 실행 명령 포함 확인: **PASS**
2. Lv.3 레벨에서 Sanitize 구체적 방법 포함 확인: **PASS**
3. DIRECT-WORKFLOW G3 실행 명령 존재 확인: **PASS**
4. L1 스모크 결과 기록 형식 포함 확인: **PASS**
5. pytest 145 passed, 0 failed: **PASS**

## ★ L1 스모크테스트 결과 (필수 기록)
- 서버 재시작: 해당없음 (시스템 프롬프트 수정 작업, 서버 코드 미변경)
- API 응답 확인: 해당없음
- 스크린샷: 해당없음
- 대신 python3 -c 스크립트로 build_prompt() 실행하여 실제 프롬프트 출력에 Codex/Sanitize/L1 형식이 포함되는지 확인 (5개 시나리오 전체 PASS)

## 모델 사용 기록
- 카르티케야(백엔드, sonnet): team_prompts.py 수정 (C-1, C-2, B-2), g3_independent_verifier.py 수정 (B-3, B-4)
- 하누만(테스터, sonnet): test_team_prompts.py 테스트 추가
- 비슈누(팀장, opus): 설계/분배/검토/통합, 테스트 fixture 수정

## QC 자동 검증
(아래 별도 실행)
