Sanctum LLM Operations Reports · Stage 2 Topic HTML

Context Router Model 향상 보고서

topics / 10-context-management / reports / context-router-model

← 주제 인덱스로 돌아가기

보고서 목적

이 보고서는 Sanctum LLM 운영에서 Graphify, RAG, SSOT, LLM Wiki를 실제 worker 실행 흐름 안에 어떻게 배치할지 정의한다. 목표는 LLM이 관련 파일을 빠르게 찾으면서도 service write boundary를 침범하지 않게 하는 것이다.

핵심 결론

권장 흐름은 다음이다.

User request
  -> worker role / cwd / declared scope 확인
  -> Graphify로 관련 후보 탐색
  -> RAG로 canonical 문서와 원문 근거 검색
  -> SSOT와 service context pack으로 판단 검증
  -> 허용 write boundary 안에서 수정
  -> boundary 밖 변경은 handoff 또는 propose-only
  -> diff guard와 test scope로 검증

Graphify는 “어디를 먼저 볼지”를 알려준다. RAG는 “무엇을 근거로 판단할지”를 찾아준다. SSOT는 “충돌할 때 무엇을 최종 사실로 볼지”를 결정한다. LLM Wiki는 “이미 검증된 운영 결론을 어떻게 재사용할지”를 제공한다. 실제 write permission은 runtime write allowlist, diff guard, approval/handoff record가 결정한다.

원본 문서의 주요 내용

계층기능사용 가능사용 금지
Graphifycontext router / navigation관련 파일 후보, service-to-service flow 후보, RAG query seedwrite authorization, contract fact 확정
RAGevidence retrievalSSOT 위치 검색, runbook/context pack 검색, source snippet 회수chunk만으로 canonical fact 확정
SSOTcanonical factcontract, policy, runbook, service boundary 확정generated summary와 혼합
LLM Wikiverified derived knowledge반복 판단, handoff rule, stale 조건 보존SSOT 대체, stale 상태로 정책 사용

service worker의 기본 context pack은 AGENTS.md, llm-context/service.md, commands.md, test-scope.md, e2e-role.md, contracts.md, dependency-stubs.md로 정의된다.

Sanctum 적용 해석

wallet-api

wallet-api worker는 user-facing request entrypoint와 API flow를 소유한다. Graphify는 wallet creation handler, DTO, downstream call, test file 후보를 좁힌다. RAG는 wallet-api/llm-context/test-scope.md, contract mapping, runbook, 이전 decision note를 찾는다. write는 wallet-api/** 안으로 제한하고, contracts/**, kms-api/**, hd-manager/**, rust-mpc/**는 propose-only로 둔다.

kms-api

kms-api는 key management와 security-sensitive flow를 다룬다. Graphify는 key operation call graph를 좁히지만 보안상 허용되는 변경을 판단하지 않는다. RAG 결과보다 현재 contract, source, runbook 확인이 우선이다.

hd-manager

hd-manager는 derivation, wallet material, lifecycle invariant와 연결된다. 변경이 wallet creation 또는 recovery flow에 영향을 주면 root/e2e handoff가 필요하다.

rust-mpc/mpc-manager-rs 및 party-node-rs

mpc-manager-rs는 orchestration boundary이고 party-node-rs는 party execution boundary다. Graphify가 두 crate의 edge를 보여줘도 한 worker가 다른 crate를 직접 수정할 수 있다는 뜻은 아니다. protocol-level invariant 변경은 root/e2e 또는 rust-mpc owner에게 넘긴다.

contracts와 root/e2e agent

contracts/는 central contract SSOT다. service worker는 보통 읽기와 propose-only만 수행한다. root/e2e agent는 cross-service flow, contract migration, e2e test orchestration, handoff 조정을 담당하지만 root/e2e agent도 명시된 scope, approval, diff guard를 따라야 한다.

운영 판단

Sanctum의 핵심 판단은 탐색 권한과 수정 권한을 분리하는 것이다. Graphify는 worker가 더 넓은 관계를 볼 수 있게 하지만 더 넓은 write 권한을 주지 않는다. RAG는 evidence를 제공하지만 검색된 evidence가 승인된 정책은 아니다.

작업 유형GraphifyRAGSSOT 확인write 결정
단일 서비스 버그 수정local handler/test 후보 탐색service context, test-scope 검색service AGENTS.md, current sourceservice allowlist 내부만 수정
cross-service contract mismatch영향 서비스 후보 생성contract/runbook evidence 검색contracts/, service contextpropose-only, root/e2e handoff
key/security 변경call graph 후보 탐색runbook, policy evidence 검색contract, runbook, source 직접 확인승인/owner 필요 시 handoff
derived knowledge 갱신관련 source 후보 탐색source evidence 수집canonical source link 명시write authorization 아님

리스크와 가드레일

리스크가드레일
Graphify를 SSOT처럼 사용revision, generatedAt, scanRoot, ignoredPaths, stale check
RAG chunk 과신source type, revision, validation state, raw read fallback
LLM Wiki staleconfidence, validation state, stale_when, scheduled review
Codex App hard boundary 오해Codex App은 exploration/review, enforced write는 runtime/sandbox
root/e2e 권한 비대화root/e2e도 allowlist, approval, staged workflow 적용
service worker scope invasionwrite/read/propose-only를 context pack과 diff guard에 명시

실행 체크리스트

  • worker role, cwd, declared scope를 확인한다.
  • service AGENTS.md와 write/read/propose-only boundary를 확인한다.
  • Graphify로 관련 파일 후보를 좁히되 권한 근거로 쓰지 않는다.
  • RAG 결과의 source type과 validation state를 확인한다.
  • 중요한 contract/security/e2e 판단은 canonical source를 직접 읽는다.
  • LLM Wiki의 confidence와 validation_state를 확인한다.
  • write allowlist 내부 파일만 수정한다.
  • contracts/나 다른 서비스 변경은 handoff한다.
  • diff guard로 boundary 밖 변경이 없는지 확인한다.

관련 주제 연결

이 보고서는 계층 비교와 SSOT 저장 규칙을 worker 실행 흐름으로 연결한다. Graphify 평가, service context architecture, worker handoff, Codex App/runtime boundary, adoption roadmap이 모두 이 실행 모델 위에 올라간다.