| name | gbrain-briefing |
| description | Generate entity-aware morning briefing from gbrain — active deals, recent meetings, people in play, and upcoming timelines. Posts a structured Slack thread to briefing", "entity briefing", "who's in play", "active deals", "gbrain morning", "gbrain-briefing", "엔티티 브리핑", "gbrain 아침", "인맥 브리핑", "활성 딜", or wants an entity-centric morning overview. Do NOT use for daily stock analysis (use today). Do NOT use for general web search (use parallel-web-search). Do NOT use for Cognee knowledge graph queries (use cognee). |
gbrain Briefing — Entity-Aware Morning Intelligence (v0.10)
Generate a structured entity briefing from gbrain's people, companies, deals, and meetings data. Includes brain health score (0-100), feature availability, autopilot daemon status, and stale compiled truth detection. Designed to run as Phase 8.5 of daily-am-orchestrator.
Prerequisites
gbrain CLI at ~/.local/bin/gbrain
- PostgreSQL running with gbrain schema initialized
- gbrain MCP server registered in
.cursor/mcp.json
Subagent Model Routing
| Task Type | Model | Rationale |
|---|
| Exploration / search / file reading | haiku | 낮은 비용, read-only 작업 |
| Analysis / implementation / generation | sonnet | 균형 잡힌 품질-비용 비율 |
| Architecture / complex reasoning | opus | 복잡한 추론이 필요한 경우만 |
Agent tool 호출 시 반드시 model 파라미터를 지정한다.
Skip Conditions
Set status to "skipped" and exit gracefully when:
gbrain CLI not found at ~/.local/bin/gbrain
gbrain doctor --json fails (PostgreSQL unreachable)
- gbrain has < 5 total pages (insufficient data for meaningful briefing)
Procedure
Step 1: Health Check & Brain Status
Run the full v0.10 diagnostic suite. All three commands are independent; run in parallel when possible.
1a. Doctor (connectivity + schema)
~/.local/bin/gbrain doctor --json
Parse output to confirm connectivity and page count. If pages < 5, skip with reason.
1b. Health Dashboard (text)
~/.local/bin/gbrain health
health prints a TEXT dashboard (there is NO --json for health in v0.4.1 —
use doctor --json from 1a for structured fields). Parse the text for the brain
health score and per-dimension lines (freshness, link density, embedding
coverage, citation density). Store what is present; do not fabricate dimensions
the dashboard does not emit.
REMOVED: gbrain features and gbrain autopilot status do NOT exist in
v0.4.1. There is no feature-flag command and no autopilot daemon. Skip any
feature-map or autopilot-status collection — derive capability from
doctor/health/stats output only.
1c. Stale Compiled Truths
~/.local/bin/gbrain search "compiled-truth"
For each compiled truth page, compare its updated_at against the updated_at
of its source pages (found via gbrain backlinks <slug>). A compiled truth is
stale if any source page was updated after it. Collect stale items for the
briefing alert.
Step 2: Gather Entity Intelligence
Query gbrain for entity-centric intelligence using the following CLI commands:
2a. Recent Activity (last 7 days)
~/.local/bin/gbrain search "updated recently" --limit 20 --json
2b. People in Play
~/.local/bin/gbrain search "people" --limit 10 --json
Filter results to people/ namespace pages. Extract names, roles, companies, last interaction dates.
2c. Active Deals / Companies
~/.local/bin/gbrain search "companies deals active" --limit 10 --json
Filter results to companies/ and deals/ namespace pages.
2d. Recent Meetings
~/.local/bin/gbrain search "meetings" --limit 5 --json
Filter to meetings/ namespace pages.
2e. Ideas / Decisions
~/.local/bin/gbrain search "ideas decisions" --limit 5 --json
Filter to ideas/ namespace pages.
Step 3: Synthesize Briefing
Compile the gathered data into a structured Korean briefing:
## gbrain 엔티티 브리핑 (YYYY-MM-DD)
### 주요 인물 (People in Play)
| 이름 | 소속 | 최근 컨텍스트 | 마지막 접점 |
|------|------|------------|-----------|
| {name} | {company} | {context} | {date} |
### 활성 회사/딜
| 회사 | 상태 | 최근 변경 |
|------|------|----------|
| {company} | {status} | {date} |
### 최근 미팅
- {meeting title} ({date}) — {key takeaway}
### 주요 아이디어/의사결정
- {idea/decision title} — {summary}
### 🧠 Brain Health
- **종합 점수**: {score}/100 {🟢 ≥80 | 🟡 50-79 | 🔴 <50}
- 신선도: {freshness}/100 | 링크 밀도: {link_density}/100
- 임베딩 커버리지: {embedding_coverage}/100 | 인용 밀도: {citation_density}/100
> `gbrain health`가 텍스트 대시보드로 출력하는 차원만 채운다. 대시보드에 없는
> 차원(파일링 준수 등)은 생략한다 — 없는 값을 만들어내지 않는다.
### ⚠️ Alerts
- 오래된 컴파일 진실: {N}건 (소스 갱신 후 미반영)
- {stale_truth_1}: 소스 {source_page} ({source_updated}) > 컴파일 ({compiled_updated})
### 통계
- 총 엔티티: {N}페이지
- 최근 7일 업데이트: {N}건
- 임베딩 대기: {N}건
Step 4: Distribute
If invoked as part of daily-am-orchestrator:
- Post as a thread reply to the Phase 8 main message in
#효정-할일
- Include the briefing as a formatted Slack mrkdwn message
If invoked standalone:
- Post to
#효정-할일 as a new message with thread replies for each section
Step 5: Persist
Write output to outputs/daily-am/{date}/phase-8.5-gbrain-briefing.json:
{
"status": "success",
"date": "YYYY-MM-DD",
"stats": {
"total_pages": N,
"recently_updated": N,
"people_found": N,
"companies_found": N,
"meetings_found": N,
"ideas_found": N,
"stale_embeddings": N
},
"brain_health": {
"composite_score": 85,
"freshness": 90,
"link_density": 80,
"embedding_coverage": 95,
"citation_density": 70
},
"alerts": {
"stale_compiled_truths": 2
},
"briefing_markdown": "...",
"slack_posted": true,
"slack_ts": "..."
}
Error Handling
| Error | Action |
|---|
| gbrain CLI not found | Skip with reason "gbrain CLI not installed" |
| PostgreSQL unreachable | Skip with reason "database unreachable" |
| gbrain search returns 0 results | Generate minimal briefing noting empty state |
| Slack post fails | Log error, persist briefing to file only |
| Timeout (>60s per query) | Use partial results, note incomplete data |
Non-Blocking Guarantee
This phase is non-blocking. Failures in gbrain briefing:
- Do NOT affect
overall_status of the morning pipeline
- Do NOT prevent Phase 8 consolidated briefing from completing
- Are logged in
phase-8.5-gbrain-briefing.json with status: "failed" and error details