extended-research

A multi-pass research command that reviews an item such as a software design, debugging trace, refactor proposal, or function. It repeats research checks until findings stop changing or a limit is reached.

In plain words
What is it for?
Use it to verify implementation plans, architecture proposals, debugging work, refactors, or individual functions, then produce a verdict and selected options.
Why use it?
It helps expose gaps, contradictions, risks, and alternative choices that a single review may miss.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/intellegix/intellegix-code-agent-toolkit/extended-research
Clone the repo
git clone --depth 1 https://github.com/intellegix/intellegix-code-agent-toolkit
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 9,597 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.09597
Opus 5 $0.00000 $0.04798
Sonnet 5 $0.00000 $0.01919
Haiku 4.5 $0.00000 $0.00960

Measured 2d ago against content hash af33b697a58b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

extended-research scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

tail -f ~/.claude/extended-research-logs/{SLUG}/runner.log (live stream from terminal)
commands/extended-research.md · 683 lines

How it starts

The opening of the file, as written. The whole thing — 683 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/extended-research — Exhaustive Multi-Pass Artifact Verification via Perplexity

Runs 5–40 iterative research_query passes against any artifact (architectural blueprint, implementation plan, debugging trace, refactor proposal, single function) and stops when iterations converge — no new findings, no new contradictions, no new options worth exploring. Produces a definitive verdict + exhaustive list of every gotcha, gap, and flaw, with the most-optimal option chosen per finding.

CRITICAL — PLAN SYNTHESIS + VERIFICATION IS MANDATORY ON TERMINAL RUNS. After the runner completes with verdict CONVERGED, CAP-HIT, or STRUCTURAL-UNRESOLVABLE, you MUST chain Steps 7 → 8 → 9 below: enter plan mode, synthesize a two-tier plan from report.md, critique that plan via a second research_query call, revise once if needed, then call ExitPlanMode. NEVER call ExitPlanMode without completing Step 8. NEVER stop after the Step 6 chat summary unless one of the documented guards fires (INTERRUPTED, zero-findings short-circuit). This applies regardless of plan size or apparent completeness of the run. NO EXCEPTIONS.

Risk Register

Known limitations of this skill, surfaced by the E2E run on 2026-05-27 against this file's own plan-synthesis tail (recursive self-verification, 8 passes, CAP-HIT verdict). Each item below was consciously deferred during implementation — the mitigations listed are partial and DO NOT close the underlying gap.

ID Severity Status Notes
F002 HIGH Partial mitigation Step 6.6 second-invocation guard uses filename heuristics. Strict Python regex (added 2026-05-27) eliminates false positives from arbitrary plan-file names. Does NOT solve the underlying gap: no formal approval-state model exists, so "unapproved" still cannot be determined reliably. Full resolution requires plan-file frontmatter with approved: true|false or a sidecar state file — DEFERRED, exceeds skill-file-only scope.
F003 HIGH Partial mitigation Step 7.1 stale-context read is shallow (8 files × 200 lines, regex extraction). [FILE NOT FOUND] tagging (added 2026-05-27) catches paths that definitively don't exist. Does NOT catch silently-fabricated-but-plausible paths. Full resolution requires content-hash verification of the artifact's referenced files or mandatory re-index — DEFERRED, requires a Python helper.
F006 LOW Deferred No regression test scaffolding for the plan-synthesis tail. Future edits to report.md format or runner output could silently break Steps 6.5/7.2 without detection. Tracked separately; requires test infra outside skill-file scope.
Runner-FRESH_OBSERVER-collision MED Mitigated by user-side advice extended_research_runner.py:select_next_pass_type schedules FRESH_OBSERVER (rail 4: passes 8/14/20/...) BEFORE reserving FINAL_VERDICT at pass == max_passes (rail 1). At max_passes=8 these collide, FRESH_OBSERVER wins, no FINAL_VERDICT runs. Mitigations: (a) # TODO(F-runner) comment in extended_research_runner.py at the pass-scheduling logic; (b) recommend --max-passes >= 9 for runs needing FINAL_VERDICT. Full fix requires reordering safety rails in the runner — outside skill-file scope.

Read the full file on GitHub · 683 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 683 lines · 0 tokens per session scan B af33b697a58b

Subscribe to this mod's changes

extended-research is a command published in the GitHub repository intellegix/intellegix-code-agent-toolkit (57 stars, last pushed 9d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 9,597 tokens. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.