원칙 4 · Agent RAG
Machine-Readable Docs + Golden Rules
"Golden Rules"를 — agent RAG(Retrieval-Augmented Generation) 시스템에 최적화된 포맷으로 — 직접 저장소에 인코딩
"Encoding 'Golden Rules' directly into the repository in formats optimized for agent RAG (Retrieval-Augmented Generation) systems."
"Golden Rules"를 — agent RAG에 최적화된 포맷으로 — 직접 저장소에 인코딩.
RAG가 잘 끌어오는 문서의 모양 — chunk·키워드·참조·메타데이터
▸
짧은 문단 — RAG의 chunk 단위. 한 문단 = 한 주제로 분절
▸
명시적 키워드 — "결제 환불 정책" 같은 검색어가 본문에 등장
▸
상호 참조 — @docs/payments.md 명시 참조로 graph traversal
▸
Frontmatter 메타 — type: tags: last_reviewed:로 필터링
@GOLDEN_RULES.md — CLAUDE.md에서 참조 → 매 작업마다 RAG retrieve
# Golden Rules — 절대 위반 금지
1. 결제 코드는 src/payment/에만.
billing/, pay-utils/는 DEPRECATED.
2. 외부 API는 항상 lib/clients/ wrapper 경유
3. 통화는 minor unit으로만 저장
4. 결제 액션은 logger.payment 사용
5. 새 dependency는 architect 승인
// → CLAUDE.md에서 @GOLDEN_RULES.md 참조
CLAUDE.md → @GOLDEN_RULES.md로 참조되면 — agent가 매 작업마다 RAG로 retrieve해서 룰 위반 가능성이 급감