핵심 시스템Core Systems
Consigliere — 메모리Consigliere — Memory
조직의 기억. 모든 토론·결정·코드 맥락의 단일 진실원. BM25(텍스트) + 임베딩(Ollama) 하이브리드 검색.The org's memory. Single source of truth for debates, decisions, code context. Hybrid BM25 + embedding search.
왜 만들었나Why
에이전트 호출마다 -c 컨텍스트가 누적돼 토큰을 낭비하던 구조를 해체. 시스템 프롬프트에 필요한 맥락만 주입하고, 에이전트는 매번 신선한 -p 세션으로 호출된다 (I63 MVVM 리팩터의 핵심).Removed -c context bloat. System prompt gets only what is needed; agents run fresh -p sessions (core of I63 MVVM refactor).
동작How it works
- 인덱싱 대상: docs/ · server/src/ · 토론 결과 MD · 코드 변경Indexes: docs/ · server/src/ · debate MD · code diffs
- Ollama 임베딩 가능 시: 시맨틱 검색. 부재 시: BM25 폴백With Ollama: semantic search. Without: BM25 fallback
- DebateConsigliere — 토론 단위 append-only ledger (별도 클래스)DebateConsigliere — per-debate append-only ledger (separate class)
- sequence + parent_sequence 로 인과 그래프 + 시간 순서 보장sequence + parent_sequence guarantee causal graph + temporal order
크래시 복구 (G178)Crash Recovery (G178)
DebateConsigliere 는 라운드마다 DB 에 증분 flush. 부팅 시 hydrate() 가 미완료 토론을 재구성 → 끊긴 라운드부터 재개.DebateConsigliere flushes incrementally to DB per round. On boot, hydrate() reconstructs incomplete debates → resumes from the broken round.
핵심 메소드Key Methods
consigliereIndex()
consigliereSearch()
consigliereEmbed()
consigliereSelfContext()
DebateConsigliere.append() / flushToDb() / hydrate()