M2.1: marchwarden ask CLI command #8

Closed
opened 2026-04-08 20:48:42 +00:00 by claude-code · 0 comments
Collaborator

Phase 2 — CLI Shim, milestone 1.

Goal

Human-usable marchwarden ask "question" command that drives the web researcher end-to-end via the MCP server.

Scope

  • cli/main.py — Click app, ask subcommand
  • Args: positional question; flags --depth [shallow|balanced|deep], --budget INT, --max-iterations INT
  • Connects to the web researcher via the MCP server (spawn python -m researchers.web.server as subprocess, talk via MCP stdio client) — not a direct WebResearcher import
  • Build ResearchConstraints from flags, call the research tool
  • Pretty-print: answer, citations w/ raw_excerpts, gaps grouped by category, discovery events, open questions, confidence + factors, cost metadata, trace_id footer
  • Register marchwarden script entry point in pyproject.toml

Tests

  • CliRunner test with a mocked MCP client returning a fixture ResearchResult
  • Verify all contract fields render

Deliverable

End-to-end question → formatted answer in terminal, going through the real MCP transport.

Branch

feat/cli-ask

Phase 2 — CLI Shim, milestone 1. ## Goal Human-usable `marchwarden ask "question"` command that drives the web researcher end-to-end via the MCP server. ## Scope - `cli/main.py` — Click app, `ask` subcommand - Args: positional `question`; flags `--depth [shallow|balanced|deep]`, `--budget INT`, `--max-iterations INT` - **Connects to the web researcher via the MCP server** (spawn `python -m researchers.web.server` as subprocess, talk via MCP stdio client) — not a direct `WebResearcher` import - Build `ResearchConstraints` from flags, call the `research` tool - Pretty-print: answer, citations w/ raw_excerpts, gaps grouped by category, discovery events, open questions, confidence + factors, cost metadata, trace_id footer - Register `marchwarden` script entry point in `pyproject.toml` ## Tests - CliRunner test with a mocked MCP client returning a fixture `ResearchResult` - Verify all contract fields render ## Deliverable End-to-end question → formatted answer in terminal, going through the real MCP transport. ## Branch `feat/cli-ask`
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: archeious/marchwarden#8
No description provided.