보고서 목적
이 보고서는 Graphify가 Sanctum LLM 운영에서 토큰을 줄이는 실제 경로를 운영 모델로 재정리한다. 핵심 목적은 Graphify를 SSOT나 자동 판단 장치로 과대평가하지 않고 wallet-api, kms-api, hd-manager, Rust MPC, contracts, root/e2e agent가 얽힌 저장소에서 읽을 후보를 빠르게 좁히는 context router로 사용하는 방식을 확정하는 것이다.
핵심 결론
Graphify의 토큰 절감은 원문 확인을 없애는 데서 나오지 않는다. 절감은 원문을 읽기 전에 탐색 공간을 줄이는 데서 나온다.
- Graphify graph는 SSOT가 아니다.
- Graphify graph는 RAG DB도 아니며 canonical
contracts/,AGENTS.md, 서비스별llm-context/, 실제 코드, 테스트 결과를 대체하지 않는다. - Graphify는 repo orientation, dependency tracing, service boundary discovery, e2e flow entrypoint 탐색 비용을 낮춘다.
- Graphify query 결과는 결론이 아니라 read set 후보여야 한다.
- Write boundary는 discord-codex-bot runtime의 write allowlist, diff guard, handoff rule, 필요 시 sparse worktree 또는 container/read-only mount가 강제해야 한다.
원본 문서의 주요 내용
Graphify는 graph.json 기반 repo memory index 또는 context router다. Worker는 먼저 Graphify query로 관련 서비스, 파일, dependency edge, contract 후보를 찾고, 결과를 read set으로 변환한다. 그 뒤 canonical source와 실제 파일을 직접 확인하고, 수정은 write boundary 안에서만 수행하며 boundary 밖 변경은 propose-only 또는 root/e2e agent handoff로 넘긴다.
Sanctum 적용 해석
Sanctum에서 토큰이 많이 드는 지점은 파일 수 자체보다 경계 추론이다. wallet-api 작업도 contracts/, kms-api, hd-manager, root/e2e test와 연결될 수 있다. Rust MPC 영역에서는 manager와 party node 사이의 protocol boundary를 찾아야 하고 contracts 변경은 여러 서비스에 fan-out될 수 있다.
Graphify는 orientation cache, dependency tracing, context pack maintenance의 세 단계로 경계 추론 비용을 줄인다. 단, Graphify가 관계를 보여줘도 외부 서비스를 직접 수정할 수 있다는 뜻이 아니며 계약 사실은 contracts/에서 확인해야 한다.
운영 판단
권장 모델은 root graph first다. 초기에는 repo root 기준 graph를 만들고 root/e2e agent와 service worker가 read/navigation hint로 사용한다. Root graph가 noisy해지면 wallet-api, kms-api, hd-manager, rust-mpc/mpc-manager-rs, rust-mpc/party-node-rs, contracts 단위 scan-root graph와 merged graph를 도입한다.
작업 단위 표준 포맷은 Task, Graphify query basis, Must read, Write boundary, Read-only, Propose-only다. 이 포맷은 토큰 절감과 권한 분리를 동시에 만든다.
리스크와 가드레일
- Graph drift: rename/delete/move, branch switch, merge/rebase, ignore 변경, shared file 변경, semantic extraction 실패로 stale해질 수 있다.
- SSOT 오염: graph query 결과나 generated summary가 canonical 문서처럼 복제될 수 있다.
- Scope invasion: worker가 외부 서비스 파일을 수정하려 할 수 있다.
- 과도한 shortcut: LLM이 실제
contracts/, 코드, 테스트를 읽지 않을 수 있다.
필수 가드레일은 artifact metadata, contracts/ SSOT 유지, llm-context/contracts.md의 canonical path mapping 제한, Derived Knowledge 형식, Codex App workspace separation을 hard boundary로 보지 않는 원칙, runtime write allowlist와 diff guard다.
실행 체크리스트
- Graphify 역할을 context router로 문서화한다.
- Root graph pilot을 먼저 실행한다.
wallet-api -> kms-api -> hd-manager -> contracts흐름을 첫 benchmark로 삼는다.- Graphify query 결과를 read set으로만 사용한다.
- 서비스별
AGENTS.md와llm-context/skeleton을 만든다. - Worker별 write/read/propose-only boundary 표를 runtime 정책으로 고정한다.
contracts/변경은 root/e2e agent 또는 contract owner handoff를 요구한다.- Diff guard가 boundary 밖 변경을 차단하는지 검증한다.