Inquisitor

io.github.iamalisson由 GitHub 帳號 iamalisson 發布v0.2.3更新於 Oct 24, 2026

Hypothesis-driven problem solving for AI agents: probe, falsify, escalate.

概覽

AI 產生的概覽

本機 MCP 伺服器,為程式開發代理提供假設驅動的除錯流程:網頁搜尋、專案分析、程式碼追蹤、專案骨架與可持續保存的調查狀態機。

可以做什麼
  • 透過 DuckDuckGo、Brave 或 SearXNG 後端進行網頁搜尋,並擷取網頁與 PDF 內文
  • 分析專案的語言、框架、測試、相依套件與 git 歷史
  • 追蹤符號的定義、呼叫端與被呼叫端,並附上檔案與行號
  • 在以 SQLite 為基礎的狀態機中記錄多階段調查,跨回合保留進度
  • 檢查深度調查的每個階段是否都已記錄並附上證據
  • 在需求釐清後產生最小化的新專案骨架
適用情境
適合代理面對陌生程式庫,或根因不明、橫跨多個檔案的棘手缺陷時使用,讓排查保留失敗紀錄而非盲目重試。也適合在沒有 API 金鑰的情況下快速查詢錯誤訊息或函式庫的最佳實務。
執行需求
以 stdio 在本機執行,需要 uv 與 Python 3.12 以上,透過 uvx inquisitor-mcp 或本機工作目錄啟動。不需 API 金鑰,DuckDuckGo 開箱即可使用。選用環境變數包括 BRAVE_API_KEY 或 SEARXNG_URL(其他搜尋後端)、INQUISITOR_SESSION_DIR(狀態儲存),以及逾時、排序與 PDF 擷取相關變數。搜尋與抓取網頁需要網路連線。
安裝前請注意
伺服器以你的使用者權限在本機執行,並把調查狀態寫入 INQUISITOR_SESSION_DIR 指定的磁碟位置。搜尋查詢與抓取的網址會送往第三方搜尋後端與網站;BRAVE_API_KEY 為選用,僅該後端需要。專案骨架與階段紀錄會寫入檔案與工作階段資料。README 表示具備 SSRF 與路徑穿越防護,但抓取到的網頁內容對代理而言仍是不可信輸入。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Inquisitor,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

inquisitor

Hypothesis-driven problem solving for AI agents Probe · Falsify · Escalate — never overcomplicate, never blind-retry

[Python] [MCP] [uv] [CI] [License]

Overview

inquisitor makes AI agents solve problems the way a chess engine plays chess: it cannot explore every branch, so it estimates complexity first, prunes paths that add no information, and spends its search budget only where the problem actually is.

It ships as two coordinated layers:

  • MCP server (inquisitor-mcp) — the engine. Web search, project analysis, code tracing, project scaffolding, and a persistent investigation state machine. Works with any MCP-compatible agent: OpenCode, Claude Code, Claude Desktop, Cursor.
  • Agent skill (skills/inquisitor/SKILL.md) — the behavioral layer. Injects the probe-and-gate loop, the pruning rules, and the full methodology into the agent's reasoning.

The method is not invented here — it is assembled from primary sources: Newton's Analysis→Synthesis skeleton, hardened with the scientific method's own defenses against wrong assumptions (falsification, strong inference, competing-hypotheses analysis, anti-fixation reframes, pre-mortems) and constrained by engineering discipline (NASA/JPL's Power of Ten, surgical-change guidelines, the minimalism ladder). Every source is cited in Foundations.

Web search, codebase scans, and code tracing are tools invoked when local evidence is insufficient — never mandatory rituals.


How it decides

Depth is an output, not a label. An LLM's up-front difficulty guess is its least reliable signal — poorly calibrated, and biased to under-rate exactly the hard problems that matter. So inquisitor never classifies a problem before understanding it: it runs a cheap probe (the single cheapest action that could confirm or kill the best current hypothesis), and the probe's result — never the prediction — sets the depth:

mermaid
flowchart TD    P([Problem]) --> F["FRAME<br/>done = ? · must not break = ?"]    F --> D{"delegate?<br/>a specialist skill<br/>owns this"}    D -->|yes| SK["hand off — /tdd,<br/>/code-review, ..."]    D -->|no| PR["PROBE<br/>cheapest action that could confirm<br/>or kill the best hypothesis"]    PR -->|"obvious, local"| SH["<b>Shallow</b><br/>fix → verify<br/><i>no ceremony</i>"]    PR -->|"clear single-<br/>component cause"| ST["<b>Standard</b><br/>frame → minimal evidence<br/>→ fix → verify"]    PR -->|"root cause unknown,<br/>multi-component"| DE["<b>Deep</b> — Newton 7-phase:<br/>DEFINE → AXIOMS → ANALYSIS →<br/>EXPERIMENT → SYNTHESIS →<br/>VALIDATE → QUERY<br/><i>+ session tracking as memory</i>"]
    SH -.->|"gate trigger /<br/>failed fix / low confidence"| ST    ST -.->|"gate only raises depth —<br/>never lowers"| DE

Escalation is enforced, not just allowed. The probe is only a starting point: objective gate triggers (touching infra/deploy/routing/config, auth/security, data migrations, multi-file fixes, prod-only symptoms) force a minimum depth regardless of how "clear" the problem feels, and a 3-question confidence check (read the runtime path? can name the runtime signal? verified the platform assumption?) bumps the depth up per unanswered question. Downgrades need cited evidence, never a feeling. Inflated ceremony is not allowed either — a 7-phase investigation of a typo is as wrong as a blind guess at a race condition.

Retry is never blind. "Loop until it passes" agents (the Ralph-loop pattern) have persistence but no memory: on failure they revert, flush, and re-roll — the same wrong idea, retried with fresh confidence. Inquisitor keeps a failure ledger instead: every dead hypothesis is recorded with the evidence that killed it, every retry must name what is different and why that changes the outcome, and two dead hypotheses from the same family force a reframe — re-audit an assumption, invert the question, widen the system boundary — never a third attempt at the same idea. Persistence with memory, creativity on evidence.


Foundations

Each rule in the method traces to a primary source. The left column is the citation; the right column is the exact mechanism inquisitor takes from it.

The scientific method

SourceMechanism adopted
Isaac Newton, Opticks, Query 31 (1704)The investigation skeleton: Analysis before Synthesis — define, decompose, experiment, only then reconstruct — and closing with open Queries instead of false certainty. Hypotheses non fingo.
T.C. Chamberlin, The Method of Multiple Working Hypotheses, Science (1890)Hold at least two rival explanations at all times; a single hypothesis turns every subsequent observation into confirmation.
Abraham Luchins, Mechanization in Problem Solving (1942) — the Einstellung effectThe failure ledger's trigger: repeating a familiar approach after it stopped working is a measurable fixation, and the cure is a forced reframe, not another attempt.
Karl Popper, The Logic of Scientific Discovery (1959)Falsify first: for the leading hypothesis, name the observation that would disprove it and hunt for that observation before anything else.
John Platt, Strong Inference, Science (1964)Design the experiment that excludes a hypothesis, not the one that corroborates the favorite — discriminating tests over confirming tests.
Richards J. Heuer, Psychology of Intelligence Analysis, CIA (1999)Analysis of Competing Hypotheses: rank hypotheses by the evidence inconsistent with each — confirming evidence is cheap and usually fits several at once.
Gary Klein, Performing a Project Premortem, Harvard Business Review (2007)Before shipping: assume the fix is live and the problem still happens — name the likeliest reason and probe it now.

Engineering discipline

SourceMechanism adopted
Gerard J. Holzmann (NASA/JPL), The Power of Ten: Rules for Developing Safety-Critical Code (2006)The P10 template: a rule set small enough to remember and strict enough to check mechanically.
Andrej Karpathy's LLM coding guidelines (2025)Think before coding · simplicity first · surgical changes · goal-driven execution.
Ponytail decision ladderYAGNI → reuse → stdlib → native platform → installed dependency → one line → minimum code that works.

Installation

Requires uv and Python 3.12+.

Claude Code — plugin install (recommended)

inquisitor ships as a Claude Code plugin that installs both the skill and the MCP server — no cloning, no editing absolute paths, no manual symlink.

From within Claude Code, first add the marketplace:

/plugin marketplace add iamalisson/inquisitor

Then install the plugin:

/plugin install inquisitor@inquisitor

That's it. The plugin bundles the inquisitor-mcp server (registered automatically via ${CLAUDE_PLUGIN_ROOT}) and the inquisitor skill. uv syncs the server's dependencies on first launch. Update later with /plugin marketplace update inquisitor.

Prefer to point at a local checkout instead of GitHub? /plugin marketplace add /path/to/inquisitor works too.

For OpenCode and Claude Desktop (which don't use Claude Code plugins), or for a manual Claude Code setup, use the steps below.

Step 1 — Get the server

Option A — no clone (recommended). Once published to PyPI, uvx fetches and runs it on demand — no clone, no absolute paths:

bash
uvx inquisitor-mcp   # prints a ready message and waits for a client — Ctrl+C to exit

You'll reference uvx inquisitor-mcp directly in the config below.

Option B — from a checkout (for local development, or before the PyPI release):

bash
git clone https://github.com/iamalisson/inquisitor.git ~/tools/inquisitorcd ~/tools/inquisitoruv sync

The clone path is up to you — just use the same absolute path in the config below. ~ does not expand inside JSON config files, so write the full path (e.g. /home/you/tools/inquisitor).

You do not run the server manually. It's a stdio MCP server: your agent spawns and manages it automatically. (If you run it by hand it prints a ready message on stderr and waits silently — that's normal.)

Step 2 — Register the MCP server with your agent

OpenCode — add to ~/.config/opencode/opencode.json (global) or ./opencode.json (per-project):

json
{  "$schema": "https://opencode.ai/config.json",  "mcp": {    "inquisitor": {      "type": "local",      "command": ["uvx", "inquisitor-mcp"],      "enabled": true    }  }}

Claude Code — add to .mcp.json in your project, or ~/.claude.json for all projects:

json
{  "mcpServers": {    "inquisitor": {      "command": "uvx",      "args": ["inquisitor-mcp"]    }  }}

Claude Desktop — same mcpServers block in claude_desktop_config.json (Settings → Developer → Edit Config).

Using a checkout instead of uvx? Swap the command for uv with args ["run", "--directory", "/home/you/tools/inquisitor", "inquisitor-mcp"].

Step 3 — Install the skill (the behavioral layer)

Symlink it so it stays up to date with the repo:

bash
# OpenCodemkdir -p ~/.config/opencode/skillsln -s /home/you/tools/inquisitor/skills/inquisitor ~/.config/opencode/skills/inquisitor
# Claude Codemkdir -p ~/.claude/skillsln -s /home/you/tools/inquisitor/skills/inquisitor ~/.claude/skills/inquisitor

(Copying the folder works too — you'll just need to re-copy after updates.)

Or, no clone — install just the skill across agents with the skills CLI:

bash
npx skills add iamalisson/inquisitor

(This installs the skill only. For the inquisitor_* tools you still need the MCP server from Steps 1-2 — or use the Claude Code plugin above, which bundles both.)

Step 4 — Restart your agent

Config is loaded at startup. Quit and reopen OpenCode / Claude Code, then verify: the inquisitor_* tools appear in the tool list, and the inquisitor skill is available.


Tools

ToolPurposeWhen
inquisitor_searchMulti-backend web search (DuckDuckGo free/keyless, Brave, SearXNG) with content extraction (HTML + PDF)Local evidence insufficient: unknown errors, unfamiliar libraries, current best practices
inquisitor_analyzeProject overview: languages, frameworks, tests, deps, git historyEntering an unfamiliar codebase
inquisitor_traceSymbol tracing: definition, callers, callees with file:line refsBug spans multiple functions/files
inquisitor_phase_get / _setNewton 7-phase state machine, SQLite-backed per project; forward moves advance one phase at a time, backward loops always allowedDeep investigations — persistent memory across turns
inquisitor_verifyCompleteness check: every phase recorded? evidence cited? (semantic validation — contradictions, DEFINE satisfaction — stays with the agent)Before declaring a Deep investigation done
inquisitor_scaffoldMinimal project scaffolding with researched best practicesNew project setup, after requirements are clarified

Example: inquisitor_search

python
inquisitor_search(    query="httpx ConnectTimeout retry pattern",    max_results=8,    time_range="year",              # day | week | month | year    include_domains=["github.com"], # optional site: filter    fetch_content=True,             # full page text, not just snippets)

Example: phase tracking (Deep path)

python
inquisitor_phase_set(    target_phase="experiment",    findings="500 only occurs when session token > 4KB",    evidence="repro script output; nginx.conf:34 large_client_header_buffers",    open_questions="why did token size grow after v2.3 deploy?",)

Project Structure

inquisitor/├── src/inquisitor/│   ├── server.py                # MCP entry point (FastMCP, 6 tools)│   ├── config.py                # env configuration│   ├── tools/                   # thin MCP adapters│   │   └── search / analyze / trace / scaffold / phase / verify│   └── backend/                 # pure Python, zero MCP dependency│       ├── search.py            # DDG / Brave / SearXNG + re-ranking│       ├── extract.py           # trafilatura → readability fallback, SSRF guard│       ├── analyzer.py          # project structure scan│       ├── tracer.py            # callers / callees mapping│       └── phase_tracker.py     # Newton state machine (SQLite)├── skills/inquisitor/SKILL.md   # behavioral layer for the agent├── .claude-plugin/│   ├── plugin.json              # Claude Code plugin manifest│   └── marketplace.json         # self-hosted marketplace (source ".")├── .mcp.json                    # bundled MCP server (${CLAUDE_PLUGIN_ROOT})└── tests/                       # 36 tests

The backend/ package is importable standalone — no MCP required:

python
from inquisitor.backend.search import searchresults = search("python asyncio best practices", max_results=5)

Environment Variables

VariableRequiredDefaultDescription
INQUISITOR_SESSION_DIRno~/.inquisitor/sessions/Investigation state storage
BRAVE_API_KEYno—Brave Search backend (2k free/month)
SEARXNG_URLno—Self-hosted SearXNG instance
INQUISITOR_DEFAULT_ENGINEnoddgddg | brave | searxng
INQUISITOR_SEARCH_TIMEOUTno15HTTP timeout (seconds)
INQUISITOR_MAX_CONTENT_LENGTHno40000Max chars per fetched page
INQUISITOR_PREFERRED_DOMAINSno—Comma-separated domains to boost in ranking
INQUISITOR_PDF_BACKENDnoautoPDF extraction: auto | docling | pypdf

No API key is required — DuckDuckGo works out of the box.

PDF extraction

Search results and fetched URLs that are PDFs (RFCs, specs, papers, datasheets) are extracted, not skipped. The default policy is auto, which uses pypdf (pure-Python, fast, no models, handles text PDFs) unless docling is installed and a GPU is present. For complex tables or scanned/OCR PDFs, install the optional docling backend:

bash
uv pip install "inquisitor-mcp[docling]"   # or: pip install "inquisitor-mcp[docling]"

docling is heavy (pulls in torch + ML models) and slow on CPU, so auto only uses it when it's installed and a GPU is present; otherwise it falls back to pypdf. Force it with INQUISITOR_PDF_BACKEND=docling (works on CPU, just slower), or pin pypdf with INQUISITOR_PDF_BACKEND=pypdf. Any docling failure falls back to pypdf, so a PDF read never hard-fails.


Security

  • SSRF guard: content fetching refuses non-http(s) schemes and loopback / private / link-local / metadata targets (localhost, 127.0.0.1, 10.x, 192.168.x, 169.254.169.254, …).
  • Path traversal guard: session names are sanitized before touching the filesystem.
  • No shell execution: subprocess calls use argument lists, never shell=True.
  • Parameterized SQL throughout the session store.
  • The server runs locally over stdio with your user's privileges — it does not listen on the network.

Companion skills

inquisitor is a router as much as an investigator — it delegates to purpose-built skills (/tdd, /code-review, …) when one fits, but it never installs them for you. See docs/companion-skills.md for the curated set worth installing alongside it (mattpocock/skills, spec-kit, last30days, ponytail, gstack) and design references.


Development

bash
uv sync                  # install depsuv run pytest tests/ -v  # run testsuv run ruff check .      # lint

Tech

  • uv — package manager
  • FastMCP — MCP server framework
  • ddgs / httpx — search + HTTP
  • trafilatura + readability-lxml — content extraction (two-tier fallback)
  • SQLite — investigation state
  • pytest / ruff — tests and lint

Acknowledgments

Research sources are cited in Foundations. The implementation additionally builds on:

Licensed under MIT.

來源:README.md,提交 38bd43b

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.2.3最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分