init: llm-wiki-haness 하네스 설계
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
# deep-research driver
|
||||
|
||||
Claude Code 의 deep-research 하네스를 **codex-cli / antigravity-cli** 로 이식한 외부 Python 드라이버.
|
||||
|
||||
## 전제
|
||||
- `codex` 또는 `agy` CLI 설치 + 로그인(구독). 별도 검색 API 키 불필요 — 웹 조사는 각 CLI 네이티브 도구가 수행.
|
||||
|
||||
## 동작 방식 (중요)
|
||||
|
||||
이 드라이버는 codex/antigravity **안에서 도는 게 아니라 그 CLI 들을 워커로 호출**한다.
|
||||
당신이 `deep-research` 를 실행하면 → 결정론 제어(dedup·득표 산식)는 이 Python 이 맡고
|
||||
→ 각 단계의 LLM 작업은 `codex exec` / `agy -p` 를 subprocess 로 ~수십 회 호출해 처리한다.
|
||||
(Claude Code 의 `/deep-research` 스킬처럼 챗 안에서 트리거하는 구조가 아님.)
|
||||
|
||||
## 설치 / 사용
|
||||
|
||||
```bash
|
||||
# 1) 전역 명령으로 설치 (어느 디렉터리에서나 `deep-research`)
|
||||
pipx install /home/donghyeon/dev/llm-wiki-private/scripts/deep-research
|
||||
deep-research --backend codex "2026년 한국 전기차 보조금 정책 변화"
|
||||
deep-research --backend antigravity "..." --json
|
||||
|
||||
# 2) pipx 없이: 프로젝트 venv 의 console-script 사용
|
||||
cd scripts/deep-research && .venv/bin/pip install -e .
|
||||
.venv/bin/deep-research --backend codex "..."
|
||||
|
||||
# 3) 모듈로 직접 실행 (설치 없이)
|
||||
.venv/bin/python -m deep_research --backend codex "..."
|
||||
```
|
||||
|
||||
## 구조
|
||||
- `core.py` — 결정론 제어(dedup·예산·3-vote 정족수·랭킹). 원본 JS 와 1:1, 순수함수.
|
||||
- `backends/` — 플랫폼 어댑터(codex/antigravity/mock).
|
||||
- 충실도 기준 원본: `deep-research-wf_aecef33f-4cc.js` (spec 참조).
|
||||
|
||||
## 테스트
|
||||
|
||||
```bash
|
||||
pip install -e ".[dev]" && pytest
|
||||
```
|
||||
|
||||
MockBackend 로 네트워크 0 상태에서 6페이즈 + 퇴화 경로 3종 검증.
|
||||
Reference in New Issue
Block a user