### 0) If any MCP call fails because Notion MCP is not connected, pause and set it up:
1. Add the Notion MCP:
`codex mcp add notion --url https://mcp.notion.com/mcp`
2. Enable remote MCP client:
Set `[features].rmcp_client = true` in `config.toml` **or** run `codex --enable rmcp_client`
3. Log in with OAuth:
`codex mcp login notion`
After successful login, the user will have to restart codex. You should finish your answer and tell them so when they try again they can continue with Step 1.
### 1) Gather sources
Search first (`Notion:notion-search`); refine queries, and ask the user to confirm if multiple results appear.
Fetch relevant pages (`Notion:notion-fetch`), skim for facts, metrics, claims, constraints, and dates.
Track each source URL/ID for later citation; prefer direct quotes for critical facts.
### 2) Select the format
Quick readout → quick brief.
Single-topic dive → research summary.
Option tradeoffs → comparison.
Deep dive / exec-ready → comprehensive report.
See `reference/format-selection-guide.md` for when to pick each.
### 3) Synthesize
Outline before writing; group findings by themes/questions.
Note evidence with source IDs; flag gaps or contradictions.
Keep user goal in view (decision, summary, plan, recommendation).
### 4) Create the doc
Pick the matching template in `reference/` (brief, summary, comparison, comprehensive) and adapt it.
Create the page with `Notion:notion-create-pages`; include title, summary, key findings, supporting evidence, and recommendations/next steps when relevant.
Add citations inline and a references section; link back to source pages.
### 5) Finalize & handoff
Add highlights, risks, and open questions.
If the user needs follow-ups, create tasks or a checklist in the page; link any task database entries if applicable.
Share a short changelog or status using `Notion:notion-update-page` when updating.