보강 보고서
주제 통합 결론
Graphify는 Sanctum LLM 운영에 도입할 가치가 있지만 역할은 repo navigation과 context routing으로 제한해야 한다. Graphify는 반복적인 raw file reading을 줄이고 서비스 간 관계와 contract 영향 후보를 빠르게 찾는 데 유용하다. 그러나 Graphify graph는 SSOT도, write authorization system도, approval scope 판단 장치도 아니다.
운영 모델은 다음 문장으로 요약된다. Graphify로 빨리 찾고, contracts/, AGENTS.md, llm-context/, 실제 코드와 테스트로 확인하며, runtime write allowlist와 diff guard로 쓰기를 제한한다.
확정 원칙
1. Graphify는 context router다
Graphify는 wallet-api, kms-api, hd-manager, mpc-manager-rs, party-node-rs, contracts 사이의 후보 관계를 빠르게 찾는 navigation layer다. Query 결과는 read set 후보이며 최종 판단은 canonical source에서 해야 한다.
2. SSOT와 Derived Knowledge를 분리한다
contracts/는 contract SSOT로 유지하고, 서비스 worker 실행 규칙은 service AGENTS.md와 llm-context/에 둔다. Graphify graph, RAG DB, generated summary, evaluation note는 conclusion, reasoning, confidence, validation state, stale conditions, source links, source Git SHA를 가진 Derived Knowledge로 관리한다.
3. Write boundary는 Graphify가 정하지 않는다
Scope invasion의 근본 원인은 Graphify가 아니라 repo-wide write access다. worker별 write allowlist, read-only/propose-only 경로, boundary 밖 handoff, diff guard, server-side approval metadata, 필요 시 sparse worktree 또는 container/read-only mount가 필요하다.
4. Root graph first, service graph later
초기 파일럿은 root graph가 적합하다. root graph가 noisy해지면 wallet-api, kms-api, hd-manager, rust-mpc/mpc-manager-rs, rust-mpc/party-node-rs, contracts 단위의 cwd-specific graph와 merged graph를 도입한다. merged graph도 navigation용 derived artifact이며 write boundary가 아니다.
5. Clean build가 canonical derived artifact 기준이다
Incremental update는 빠르지만 drift에 취약하다. rename/delete/move, branch switch, merge/rebase, ignore rule 변경, contracts/ 변경, shared file 변경, semantic extraction failure 상황에서는 clean full build 또는 source-first verification이 필요하다.
Sanctum 운영 모델 영향
wallet-api worker는 wallet endpoint, handler, KMS 호출, HD manager relation, e2e test 후보를 Graphify로 찾되 write scope는 service-local로 제한한다. kms-api는 signing/key boundary 후보를 얻지만 security semantics는 canonical docs, 코드, 테스트, review gate로 검증한다. hd-manager derivation policy가 contract나 security-sensitive spec에 닿으면 handoff한다. Rust MPC 영역은 macro, trait dispatch, module move에 취약하므로 source inspection과 focused tests가 필요하다. contracts/는 service-to-service contract SSOT이며 root/e2e agent는 Graphify root artifact를 cross-service flow와 handoff route 후보 작성에 사용한다.
로드맵
- Phase 0: Graphify = context router, Graphify/RAG/generated summary != SSOT,
contracts/= contract SSOT 원칙을 고정한다. - Phase 1: Sanctum root graph pilot을 시작하고 wallet-kms-hd-contracts flow와 Rust MPC relation을 benchmark로 삼는다.
- Phase 2: PR non-blocking check, main clean full build artifact, nightly drift audit을 적용한다.
- Phase 3: 서비스별
AGENTS.md와llm-context/skeleton을 만들고 Graphify 후보는 사람이 검증한다. - Phase 4: runtime write allowlist, diff guard, handoff format, root/e2e orchestration을 적용한다.
- Phase 5: noise와 rebuild cost를 측정해 service graph 확장을 판단한다.
- Phase 6: Sanctum에서 검증한 규칙을 zk-pol로 이전한다.
최종 요약
Graphify는 Sanctum에서 반복적인 repo orientation과 dependency tracing 비용을 줄일 수 있다. 하지만 Graphify는 파생 인덱스다. SSOT는 contracts/, canonical docs, service AGENTS.md, service llm-context/, 실제 코드와 테스트에 있어야 한다. 운영 우선순위는 context router 역할 제한, root graph pilot, SHA 기반 freshness, service context pack, runtime write allowlist와 diff guard, service graph 선택적 확장, zk-pol 후속 적용이다.