Skip to main content

Crate research

Crate research 

Source
Expand description

research CLI library crate. All logic lives here; main.rs is a thin entrypoint that dispatches to cli::run.

Module structure:

  • cli — argument parsing + command dispatch
  • session — session directory layout, event log, active pointer
  • commands — subcommand handlers (all stubs in MVP #1)
  • output — ActionResult / envelope helpers for –json vs plain text

Modules§

autoresearch
Autonomous research loop.
catalog
Catalog probe: before add / batch actually fetches a URL, we ask the V2 actionbook MCP search tool whether the host has any curated manuals. If it does, we fetch the top N (N ≤ MAX_SEED_PER_URL) via actionbook manual ... and write each one into the session’s wiki with a kind: actionbook-manual frontmatter block.
cli
CLI argument parsing + dispatch. All 12 subcommands resolve to handlers in commands::* that, in MVP #1, return NOT_IMPLEMENTED.
commands
Subcommand handlers. Each module exposes run() -> Envelope. In MVP #1 every handler returns NOT_IMPLEMENTED via output::not_implemented. Real logic lands in subsequent specs.
fetch
Fetch layer: subprocess wrappers + smell test + result types.
output
Standard response envelope shared by every subcommand.
report
Report assembly. Two flavors:
route
URL routing: load preset (TOML) → classify URL → build command template.
session
Session state: on-disk layout, slug rules, event log schema, active pointer.