Composition root: the single place where concrete adapters are wired onto
the application ports. All entry points (CLI and MCP server) build
their dependencies through this module so wiring exists exactly once.
MCP stdio server — exposes research-agent’s capabilities as MCP tools
(research serve). Inverts control: instead of a human driving the research
CLI, an LLM agent discovers and drives research-agent via these tools
(ingest → query → gaps → report). The CLI remains a secondary interface for
terminals/CI.
First-run onboarding for research init: walks through the settings that
matter (database path, LLM provider with its env-var key name), then
writes a fully documented
config.toml. Every prompt shows the current value as its default, so
re-running init updates instead of resetting.