start-harness.sh를 진입점으로 하는 Codex-native 자가개선 시스템의 전체 프로세스 분석.
그리고 Claude Code의 핵심 명령 /team · /init-project · /qa-cycle · /qa-scenario-gen이
Codex로 이식되면서 무엇이 바뀌었는지 비교한다.
loop-era-supervisor.py의 PHASE_ORDER에 정의된 순서. 메트릭은 l6_blocker_count이며 0이 목표다. 각 phase의 결과는 phase_history에 누적되고, 최종적으로 results.tsv에 keep/discard로 기록된다.
v2에서 qa_scenario_gen phase가 2번 위치에 추가되어 14단계 → 15단계로 증가했다.
app_candidates / service_candidates / database_hints 감지 → 시나리오 required 자동 결정.project-profile.json을 읽어 7종 QA 시나리오 필요 여부 자동 결정. UI/API/DB/console 4개 축으로 required=true인 시나리오만 실행 목록에 포함. evidence contract 출력 필수.blocker_total=0이면 status: "skip" 반환. blockers 있을 때 local-critical-path + verification/adversarial/validation worker 생성.qa-scenarios.json의 시나리오별 command 실행 + evidence contract 검증. failure_labels로 분류.
qa-scenario-gen.py는 phase 02에서 독립 실행되는 Python 런타임이다.
project-profile.json의 app_candidates, service_candidates, database_hints를 읽어서
7종 시나리오의 required 여부를 자동 결정하고, qa-scenarios.json을 출력한다.
이후 qa-cycle-runtime.py의 scenario_checks()가 이 파일을 읽어 각 시나리오 command를 실행하고
evidence contract(JSON 출력)를 검증한다.
app_candidates → UI 시나리오service_candidates → API 시나리오database_hints → DB 시나리오*_scenario_command × 7*_repair_command × 7
.codex/loopy-era/qa-scenarios.json 출력
id, requiredcommand, repair_commandrequired_coverage[]evidence_contract 스펙
scenario_checks() 루프app_candidatesbutton, event_click, state_changeapp_candidatesmodal_popup, open_closeapp_candidatesconfirm_dialog, accept_cancelapp_candidatesalert_dialog, message_visibilityapp_candidatesconsole_errors, console_warningsconsole_errors: 0 필수service_candidatesrequest, response, error_handlingdatabase_hintswrite, read, state_assertionstatus: "pass"/"ok"/"success", executed: true, coverage: [...] (required_coverage와 일치),
browser-console-clean 종류는 추가로 console_errors: 0 필수.
이 중 하나라도 누락/불일치 시 해당 시나리오 FAIL.
// qa-scenarios.json 구조 예시 { "scenarios": [ { "id": "ui-button-event", "required": true, "command": "python3 .codex/scripts/test-button-event.py", "repair_command": "python3 .codex/scripts/repair-button-event.py", "required_coverage": ["button", "event_click", "state_change"], "evidence_contract": { "status": "pass | ok | success", "executed": true, "coverage": ["...required_coverage 항목들..."] } }, { "id": "browser-console-clean", "required": true, "evidence_contract": { "console_errors": 0, // 필수 — 0이어야 PASS "coverage": ["console_errors", "console_warnings"] } } ] }
init-project-runtime.py가 생성하는 project-profile.json에 시나리오별 command/repair 14개 필드가 추가되었다.
이 필드들이 qa-scenario-gen.py → qa-cycle-runtime.py 전체 QA 체인을 제어한다.
self-improve-trigger.sh가 5종의 소스에서 신호를 수집하고 중복 ack 필터링을 거쳐
~/.codex/pending/self-improve-{key}.json에 저장한다.
신호가 있을 때만 worker가 LLM을 호출한다.
git worktree add --detach HEAD (실패 시 clone 폴백) + backup_codex()codex -o output.json < prompt — JSON schema 강제 (result/patch_scope/verification_checks)
Claude Code의 /team · /init-project · /qa-cycle · /qa-scenario-gen 4개 핵심 스킬이
Codex 환경에서 어떻게 재구현되었는지 비교한다.
공통 방향은 LLM 자연어 지시 → Python 런타임 실행으로의 전환이다.
/qa-cycle 자동 연계team-runtime.py --execute --json 단일 진입점ThreadPoolExecutor 기반 실제 병렬 worker 실행blocker_total=0이면 plan 단계에서 status: "skip" 반환| 주요 차이점 | ||
|---|---|---|
| 실행 방식 | LLM이 specialist 에이전트 호출 + TaskAPI 추적 | Python 런타임이 직접 worker 프로세스 관리 (ThreadPoolExecutor) |
| 병렬성 보장 | Promise.all() 패턴, 에이전트 자율 판단 |
JSON 출력의 parallel_execution: true 명시 확인 |
| 패치 안전성 | 코드 직접 수정, 실패 시 bug-fixer 재시도 | HARD project_patch_allowed 게이트, worktree 격리 |
| QA 연계 | Phase 4에서 /qa-cycle 스킬 명시 호출 |
qa_cycle phase (9번)로 supervisor가 자동 실행 |
.claude/CLAUDE.md, .claude/skills/~/.claude/skills/{project}-scaffold/ 생성settings.json MCP 서버 설정 포함auto-issue.md, qa-scenarios.md 생성.codex/rules/project-conventions.rules.codex/skills/ (backend-patterns, frontend-patterns, qa-strategy)~/.codex/skills/{project}-scaffold/ 생성project-profile.json에 시나리오 command 14개 필드 포함| 주요 차이점 | ||
|---|---|---|
| 설정 위치 | .claude/ → Claude Code 전용 |
.codex/ → Codex 전용, .claude/ 미의존 |
| 실행 빈도 | 수동 /init-project 호출 시 1회 |
AUTO 매 loop iteration 시작 시 자동 실행 |
| 시나리오 설정 | qa-scenarios.md 텍스트 문서 생성 |
project-profile.json에 command/repair 14개 필드 포함 |
| MCP 설정 | settings.json에 MCP 서버 포함 |
config.toml으로 분리, init-project 범위 외 |
agent-browser로 실제 UI 인터랙션 검증.qa-cycle-passed 파일 기반qa-cycle-runtime.py Python 런타임, JSON 출력--max-rounds N 파라미터로 반복 제어scenario_checks(): qa-scenarios.json 읽어 7종 시나리오 실행.codex/loopy-era/qa-cycle-report.json 결과 저장| 주요 차이점 | ||
|---|---|---|
| UI 테스트 | agent-browser + web-qa-tester 실제 브라우저 인터랙션 |
scenario_checks()가 qa-scenarios.json command 실행 + evidence 검증 |
| 실패 분류 | CRITICAL/HIGH/MEDIUM/LOW severity 기반 | failure_labels (build/type/lint/test) + repair_strategy.source |
| 자동 수정 | bug-fixer 에이전트 호출 최대 4회 | qa_fix_retry phase에서 team-runtime.py 재실행 + repair_command |
| push gate | HARD .qa-cycle-passed 파일 + 1시간 TTL 해시 검증 | loop-era metric으로 추적, 별도 push gate 미구현 |
docs/qa-test-plan.md 생성 — TC 번호 체계 포함qa-scenario-gen.py 독립 Python 런타임으로 구현project-profile.json 읽어 7종 시나리오 required 자동 결정qa-scenarios.json 출력 → qa-cycle-runtime.py 소비
.codex/ralph-loop/state.json 기준. iteration 11에서 l6_blocker_count = 0 달성,
stopping_condition 만족으로 status: completed. team_plan은 blockers 없어 skip.
self-improve-smoke.sh는 구문 검사를 넘어 실제 임시 git repo를 생성하고 전체 파이프라인을 검증한다. smoke가 통과해야만 verify-l6.sh의 blocker_count에 영향을 주지 않는다.
/qa-scenario-gen도 독립 스킬에서 phase 02 런타임으로 완전 이식되어 evidence contract 기반 자동 검증이 가능해졌다.
브라우저 기반 UI 인터랙션 검증과 push gate는 아직 미이식 상태다.