hyperresearch 0.6.0__tar.gz → 0.7.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/CHANGELOG.md +45 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/PKG-INFO +82 -47
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/README.md +81 -46
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/pyproject.toml +1 -1
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/cli/lint.py +675 -134
- hyperresearch-0.7.0/src/hyperresearch/core/agent_docs.py +201 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/core/db.py +2 -2
- hyperresearch-0.7.0/src/hyperresearch/core/hooks.py +2025 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/core/migrations.py +69 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/models/note.py +1 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/skills/research-collect.md +1 -1
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/skills/research-compare.md +1 -1
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/skills/research-forecast.md +1 -1
- hyperresearch-0.7.0/src/hyperresearch/skills/research-layercake.md +512 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/skills/research-synthesize.md +1 -1
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/skills/research.md +169 -35
- hyperresearch-0.7.0/tests/test_cli/test_lint.py +1413 -0
- hyperresearch-0.7.0/tests/test_core/test_hooks.py +355 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/tests/test_core/test_patterns.py +4 -3
- hyperresearch-0.6.0/assets/_generate_benchmark.py +0 -165
- hyperresearch-0.6.0/assets/benchmark.png +0 -0
- hyperresearch-0.6.0/src/hyperresearch/core/agent_docs.py +0 -313
- hyperresearch-0.6.0/src/hyperresearch/core/hooks.py +0 -1884
- hyperresearch-0.6.0/src/hyperresearch/skills/research-ensemble.md +0 -508
- hyperresearch-0.6.0/tests/test_cli/test_lint.py +0 -647
- hyperresearch-0.6.0/tests/test_core/test_hooks.py +0 -135
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/.github/workflows/ci.yml +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/.github/workflows/publish.yml +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/.gitignore +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/CONTRIBUTING.md +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/LICENSE +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/assets/banner.png +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/__init__.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/__main__.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/cli/__init__.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/cli/_output.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/cli/assets.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/cli/batch.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/cli/config_cmd.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/cli/dedup.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/cli/export.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/cli/fetch.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/cli/fetch_batch.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/cli/git_cmd.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/cli/graph.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/cli/import_cmd.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/cli/index.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/cli/install.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/cli/link.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/cli/main.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/cli/mcp_cmd.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/cli/note.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/cli/repair.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/cli/research.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/cli/search.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/cli/serve.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/cli/setup.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/cli/sources.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/cli/tag.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/cli/template.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/cli/topic.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/cli/watch.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/core/__init__.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/core/config.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/core/enrich.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/core/fetcher.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/core/frontmatter.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/core/linker.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/core/note.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/core/patterns.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/core/similarity.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/core/sync.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/core/templates.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/core/vault.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/export/__init__.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/graph/__init__.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/indexgen/__init__.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/indexgen/generator.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/mcp/__init__.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/mcp/server.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/models/__init__.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/models/graph.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/models/output.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/models/search.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/py.typed +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/search/__init__.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/search/filters.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/search/fts.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/serve/__init__.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/serve/renderer.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/serve/server.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/skills/__init__.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/web/__init__.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/web/base.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/web/builtin.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/src/hyperresearch/web/crawl4ai_provider.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/tests/__init__.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/tests/conftest.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/tests/test_cli/__init__.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/tests/test_cli/test_commands.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/tests/test_cli/test_note_ops.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/tests/test_core/__init__.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/tests/test_core/test_frontmatter.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/tests/test_core/test_note.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/tests/test_core/test_sync.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/tests/test_core/test_vault.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/tests/test_graph/__init__.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/tests/test_graph/test_links.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/tests/test_search/__init__.py +0 -0
- {hyperresearch-0.6.0 → hyperresearch-0.7.0}/tests/test_search/test_fts.py +0 -0
|
@@ -1,5 +1,50 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.7.0] - 2026-04-17
|
|
4
|
+
|
|
5
|
+
### Architecture — `/research-ensemble` retired, `/research-layercake` introduced
|
|
6
|
+
|
|
7
|
+
This release replaces the three-parallel-drafts-plus-merger ensemble design with a seven-phase layered pipeline. Width is discovered first, depth loci are derived from the width corpus (not pre-assigned framings), one draft is written from the combined evidence, three adversarial critics run in parallel against it, and the draft is then modified ONLY by surgical Edit hunks — never regenerated.
|
|
8
|
+
|
|
9
|
+
### New
|
|
10
|
+
|
|
11
|
+
- **7-phase layercake pipeline** — (1) width sweep via parallel fetchers, (2) two parallel loci-analysts identify 1–8 depth loci from the corpus, (3) one depth-investigator per locus writes an `interim-<locus>.md` note, (4) orchestrator writes ONE draft, (5) dialectic / depth / width critics return structured findings JSONs, (6) the patcher applies findings as Edit hunks, (7) the polish auditor cuts filler and strips hygiene leaks via more Edit hunks. Protocol lives at `.claude/skills/research-layercake/SKILL.md`.
|
|
12
|
+
- **Tool-locked patcher + polish auditor** — both agents register with tools `[Read, Edit]` ONLY. They physically cannot Write. Every hunk is capped at 500 chars of net expansion — any critic that proposes a larger patch escalates to the orchestrator instead of triggering a rewrite. This is the load-bearing invariant that enforces PATCH-NOT-REGEN at the tool level, not the prompt level.
|
|
13
|
+
- **`NoteType.INTERIM`** — new first-class note type for depth-investigator outputs. Persisted in the vault with `type: interim` and tagged `locus-<name>` for indexability. Added to the SQLite CHECK constraint via migration v7.
|
|
14
|
+
- **`locus-coverage` lint rule** — reads `research/loci.json` (Layer 2 output) and verifies every identified locus has a corresponding interim-report note. Missing interims flag as errors.
|
|
15
|
+
- **`patch-surgery` lint rule** — reads `research/patch-log.json` (Layer 6 output) and surfaces any critical finding the patcher skipped. The 500-char "patch too large" regeneration guard is also surfaced at warning severity.
|
|
16
|
+
- **`instruction-coverage` lint rule** — reads `research/prompt-decomposition.json` and verifies every atomic item (entity, required format) appears in the final report. Catches drafts that drifted from the user's explicit ask.
|
|
17
|
+
- **Layer 0.5 — prompt decomposition** — new orchestrator step before Layer 1 produces `research/prompt-decomposition.json`, a structured breakdown of the atomic items the user's prompt named (sub-questions, entities, required formats, required sections, time horizons, scope conditions). This becomes a first-class contract that flows through Layer 4 drafting and Layer 5 instruction-critique.
|
|
18
|
+
- **`hyperresearch-instruction-critic`** — fourth adversarial critic (Opus, `[Bash, Read]` only). Reads the Layer 4 draft against the prompt-decomposition and emits findings for missing / under-covered / mis-ordered / mis-formatted atomic items. Spawned in parallel with dialectic / depth / width critics in Layer 5.
|
|
19
|
+
- **Pipeline-awareness contract** — every subagent now receives the verbatim research_query AND an explicit pipeline-position statement in its Task prompt. The skill file documents the three-piece spawn contract (research_query / pipeline position / inputs) and provides a copy-paste template so the orchestrator applies it consistently to every Task call.
|
|
20
|
+
- **Schema v7 migration** — safely rebuilds the `notes` table with `'interim'` added to the type CHECK constraint on existing vaults.
|
|
21
|
+
|
|
22
|
+
### Removed
|
|
23
|
+
|
|
24
|
+
- **`/research-ensemble` skill** — the three-parallel-sub-run ensemble protocol is gone. The slash command no longer registers.
|
|
25
|
+
- **Retired subagents** — `hyperresearch-analyst`, `hyperresearch-auditor`, `hyperresearch-rewriter`, `hyperresearch-subrun`, `hyperresearch-merger` are no longer installed. On reinstall, any vault that had them gets them pruned automatically by `_prune_retired_agents()`.
|
|
26
|
+
- **`analyst-coverage` lint rule** — superseded by `locus-coverage` (extracts were the ensemble era's per-source deep-read artifact; interim notes are the layercake equivalent scoped per locus).
|
|
27
|
+
|
|
28
|
+
### New subagent roster (9 agents)
|
|
29
|
+
|
|
30
|
+
| Agent | Model | Tools | Role |
|
|
31
|
+
|---|---|---|---|
|
|
32
|
+
| `hyperresearch-fetcher` | Haiku | Bash, Read | URL → vault note (unchanged) |
|
|
33
|
+
| `hyperresearch-loci-analyst` | Sonnet | Bash, Read, Write | Returns 1–8 depth loci from width corpus |
|
|
34
|
+
| `hyperresearch-depth-investigator` | Sonnet | Bash, Read, Write, Task | Investigates one locus, writes one interim note |
|
|
35
|
+
| `hyperresearch-dialectic-critic` | Opus | Bash, Read | Finds counter-evidence gaps |
|
|
36
|
+
| `hyperresearch-depth-critic` | Opus | Bash, Read | Finds shallow spots |
|
|
37
|
+
| `hyperresearch-width-critic` | Opus | Bash, Read | Finds topical coverage gaps |
|
|
38
|
+
| `hyperresearch-instruction-critic` | Opus | Bash, Read | Finds atomic items the draft missed from prompt-decomposition |
|
|
39
|
+
| `hyperresearch-patcher` | Sonnet | **Read, Edit** | Applies critic findings as Edit hunks |
|
|
40
|
+
| `hyperresearch-polish-auditor` | Sonnet | **Read, Edit** | Cuts filler + strips hygiene leaks |
|
|
41
|
+
|
|
42
|
+
### Breaking changes
|
|
43
|
+
|
|
44
|
+
- Scripts calling `hyperresearch install` on a pre-v0.7 vault will get the old agent files pruned. Pre-existing `research/audit_findings.json` and extract notes stay in the vault (no user data is deleted) but the protocol no longer references them.
|
|
45
|
+
- `analyst-coverage` in `hyperresearch lint --rule ...` is gone — use `locus-coverage` and `patch-surgery`.
|
|
46
|
+
- The `benchmark-report` lint rule is renamed to `wrapper-report`. The rule's logic is unchanged — it fires whenever `research/prompt.txt` or `research/wrapper_contract.json` is present and enforces the wrapper's contract on the final report. The rename reflects what the rule actually does (wrapper-contract enforcement) rather than the specific harness context where it was first used.
|
|
47
|
+
|
|
3
48
|
## [0.4.0] - 2026-04-13
|
|
4
49
|
|
|
5
50
|
### New
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: hyperresearch
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.7.0
|
|
4
4
|
Summary: Claude Code harness for disciplined, adversarially-audited deep research with full provenance.
|
|
5
5
|
Project-URL: Homepage, https://github.com/jordan-gibbs/hyperresearch
|
|
6
6
|
Project-URL: Repository, https://github.com/jordan-gibbs/hyperresearch
|
|
@@ -53,13 +53,7 @@ Description-Content-Type: text/markdown
|
|
|
53
53
|
|
|
54
54
|
---
|
|
55
55
|
|
|
56
|
-
**
|
|
57
|
-
|
|
58
|
-
<p align="center">
|
|
59
|
-
<img src="assets/benchmark.png" alt="DeepResearch-Bench top-5 — hyperresearch at 57.5, ahead of Tongyi DeepResearch (55.8), Kimi Researcher (53.2), Gemini Deep Research (42.1), OpenAI Deep Research (37.4)" width="780">
|
|
60
|
-
</p>
|
|
61
|
-
|
|
62
|
-
<p align="center"><sub>Preliminary — one-query pilot lift (+2.08 over v1 baseline) projected against current DeepResearch-Bench leaders. Full 100-query sweep pending.</sub></p>
|
|
56
|
+
**HyperResearch is a deep research harness for Claude Code. It produces adversarially-audited reports with full source provenance and creates a persistent, searchable knowledge base that compounds across sessions.**
|
|
63
57
|
|
|
64
58
|
## Installation
|
|
65
59
|
|
|
@@ -68,9 +62,9 @@ pip install hyperresearch
|
|
|
68
62
|
hyperresearch install
|
|
69
63
|
```
|
|
70
64
|
|
|
71
|
-
In Claude Code, type `/research <anything>` and the full protocol fires.
|
|
65
|
+
In Claude Code, type `/research-layercake <anything>` and the full flagship protocol fires — **a 7-phase pipeline that discovers width first, derives depth loci from the width corpus, runs parallel depth investigations, drafts once, and patches the draft via adversarial critics (no regeneration).** This is the default way to use hyperresearch. If you want a faster single-pass run instead, type `/research <anything>`.
|
|
72
66
|
|
|
73
|
-
That single
|
|
67
|
+
That single install command creates a v7 SQLite vault, auto-installs Chromium for headless browsing, generates `CLAUDE.md`, installs both skills (`/research-layercake` and `/research`), registers eight subagents (fetcher / loci-analyst / depth-investigator / dialectic-critic / depth-critic / width-critic / patcher / polish-auditor) into `.claude/agents/`, and wires PreToolUse hooks.
|
|
74
68
|
|
|
75
69
|
---
|
|
76
70
|
|
|
@@ -131,6 +125,64 @@ The save gate blocks until every CRITICAL is **genuinely** resolved. Bookkeeping
|
|
|
131
125
|
|
|
132
126
|
---
|
|
133
127
|
|
|
128
|
+
## `/research-layercake` — 7 phases, one draft, patched not regenerated (the default)
|
|
129
|
+
|
|
130
|
+
The flagship research surface and the default way to use hyperresearch. Type `/research-layercake <query>` in Claude Code.
|
|
131
|
+
|
|
132
|
+
**Width before depth, then one draft patched by adversarial critics.** An Opus orchestrator walks a seven-phase pipeline: wide corpus sweep → rabbithole identification → parallel depth investigations → single draft → three adversarial readings → surgical patch pass → polish audit.
|
|
133
|
+
|
|
134
|
+
### The 7 phases
|
|
135
|
+
|
|
136
|
+
1. **Width sweep.** The orchestrator spawns parallel `hyperresearch-fetcher` Haiku agents to build a 30–80 source corpus covering the topic's corners. Academic APIs (Semantic Scholar, arXiv, OpenAlex, PubMed) run BEFORE web search — citation-ranked canonical papers before derivative commentary.
|
|
137
|
+
2. **Loci analysis.** Two `hyperresearch-loci-analyst` Sonnet agents read the width corpus in parallel and each returns 1–8 specific "depth loci" — questions where deeper investigation would meaningfully improve the final report. The orchestrator dedupes their outputs and clamps to 6.
|
|
138
|
+
3. **Depth investigation.** One `hyperresearch-depth-investigator` Sonnet agent per locus, in parallel. Each investigator can spawn its own fetchers (capped at 10 new sources), reads the existing vault, and writes ONE `interim-<locus>.md` note with dense synthesis, direct quotes, and citations. The orchestrator consumes these interim notes during Layer 4.
|
|
139
|
+
4. **Draft.** The orchestrator writes `research/notes/final_report.md` ONCE, weaving the width corpus with the interim notes under the modality file's substance rules (collect / synthesize / compare / forecast).
|
|
140
|
+
5. **Adversarial critique.** Three Opus critics fire in parallel: `dialectic-critic` (counter-evidence the draft missed), `depth-critic` (shallow spots the interim notes could fill), `width-critic` (topical corners the draft ignores despite the corpus supporting them). Each returns a findings JSON with structured `suggested_patch` entries — never a rewrite.
|
|
141
|
+
6. **Patch pass.** `hyperresearch-patcher` (Sonnet, **tool-locked to `[Read, Edit]`**) reads all three findings files and applies them as surgical Edit hunks. Per-hunk cap: `new_string` may be at most 500 chars longer than `old_string`. The patcher physically cannot Write — it has no path to regenerate the draft.
|
|
142
|
+
7. **Polish audit.** `hyperresearch-polish-auditor` (Sonnet, also `[Read, Edit]` only) strips hygiene leaks (YAML frontmatter, scaffold sections, prompt echoes), cuts filler phrases ("Importantly", "It is worth noting"), removes redundancy, and breaks long sentences — all via surgical Edits. Structural mismatches (wrong format for the prompt, missing sections) escalate to the orchestrator rather than getting force-patched.
|
|
143
|
+
|
|
144
|
+
### Why the tool lock matters
|
|
145
|
+
|
|
146
|
+
The load-bearing invariant of layercake is: **after Layer 4 the draft is only ever modified by small Edit hunks.** This is enforced at the Claude Code tool-allowlist level — the patcher and polish auditor do not have `Write` or `Bash`. If a critic's finding cannot fit into a ≤500-char hunk, it escalates to the orchestrator as a structural issue instead of triggering a regeneration. This prevents the "just rewrite it" failure mode that plagues post-hoc review in long-running agent pipelines.
|
|
147
|
+
|
|
148
|
+
### Opting out — faster single-pass mode
|
|
149
|
+
|
|
150
|
+
Layercake is the default because width-plus-depth-plus-adversarial-review beats a single investigator on almost every real research query. If you want a faster single-pass run — e.g., for a quick sanity-check or a prompt where one pass is plenty — type `/research <query>` instead. Single-pass fires the same modality rules on one Sonnet agent, no loci analysis, no critics, no patcher.
|
|
151
|
+
|
|
152
|
+
A rule of thumb: use `/research-layercake` for anything you would want a human researcher to take seriously. Use `/research` when you just want the vault populated and a first-pass draft in front of you quickly.
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
## The vault: persistent, searchable, compounding
|
|
157
|
+
|
|
158
|
+
hyperresearch is not a one-shot report generator. Every fetched source lands in a durable SQLite-indexed vault that every future research session can reuse. Knowledge compounds across sessions; the tool's value grows with the corpus.
|
|
159
|
+
|
|
160
|
+
### What persists
|
|
161
|
+
|
|
162
|
+
- **Raw source material, not rewritten summaries.** Fetched content keeps its original formatting — headings, tables, code blocks, technical details. If the source is a PDF, pymupdf extracts the full text and the original PDF lives at `research/raw/<note-id>.pdf`. Every note carries its source URL, fetch timestamp, tier classification, and `--suggested-by` breadcrumb pointing at whichever note surfaced it.
|
|
163
|
+
- **Extract notes** — per-source analyst reads with direct quotes, context markers, one-line summaries, and inherited tier + content-type tags. These are the second derivative of raw content and stay in the vault as first-class, queryable notes.
|
|
164
|
+
- **Scaffolds, comparisons, audit findings** — every research session's planning artifacts and adversarial review trail persist alongside the sources they drew on. Past synthesis notes are discoverable next to the raw sources that justified them.
|
|
165
|
+
- **The knowledge graph** — `[[wiki-links]]` between notes form a queryable graph. `hyperresearch graph hubs` surfaces the most-connected notes in a domain; `hyperresearch graph backlinks <id>` shows every note that references a given source.
|
|
166
|
+
|
|
167
|
+
### Searchability
|
|
168
|
+
|
|
169
|
+
Before any web search the vault gets queried first — the hook reminds Claude Code, and the protocol checks explicitly:
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
hyperresearch search "ion-trap gate fidelity" -j # Full-text across every note
|
|
173
|
+
hyperresearch search "quantum" --tier ground_truth -j # Filter by epistemic tier
|
|
174
|
+
hyperresearch search "attention" --include-body -j # Full-body search, not just titles
|
|
175
|
+
hyperresearch note show <id> <id> <id> -j # Batch-read notes in one call
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
When the vault already holds ≥10 relevant notes on a topic, `/research` tells the user so and asks whether to dig deeper, take a new angle, or synthesize from the existing corpus — instead of re-fetching what's already there. The sunk-cost of past research pays forward.
|
|
179
|
+
|
|
180
|
+
### Markdown is truth, SQLite is cache
|
|
181
|
+
|
|
182
|
+
Notes live as plain markdown with YAML frontmatter in `research/notes/`. The SQLite index is fully rebuildable — delete it and `hyperresearch sync` reconstructs it from the markdown. The vault is inspectable in any editor, version-controllable in git, and readable without the tool installed. hyperresearch stores and indexes; it does not hide data behind the tool.
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
134
186
|
## Why it works on hard research
|
|
135
187
|
|
|
136
188
|
Your AI agent searches the web, skims sources, writes an answer that sounds good, and ships it. There's no scaffold, no audit, no source-vs-source comparison, no provenance, no way to know if it actually engaged with the strongest counter-position. Hyperresearch breaks that pattern through structural enforcement:
|
|
@@ -183,13 +235,18 @@ Your AI agent searches the web, skims sources, writes an answer that sounds good
|
|
|
183
235
|
└─────────────────────────────────────────────────────────────────────┘
|
|
184
236
|
```
|
|
185
237
|
|
|
186
|
-
**Subagent
|
|
238
|
+
**Subagent roster**, each picked for its job:
|
|
187
239
|
|
|
188
240
|
| Agent | Model | Role |
|
|
189
241
|
|---|---|---|
|
|
190
242
|
| `hyperresearch-fetcher` | **Haiku** | Mechanical URL fetching via crawl4ai. Cheap, fast, parallel. |
|
|
191
|
-
| `hyperresearch-analyst` | **Sonnet** | Reads
|
|
192
|
-
| `hyperresearch-
|
|
243
|
+
| `hyperresearch-loci-analyst` | **Sonnet** | Reads the width corpus, returns 1–8 depth loci with rationale. Spawn 2 in parallel, dedupe. |
|
|
244
|
+
| `hyperresearch-depth-investigator` | **Sonnet** | Investigates one locus: fetches new sources, writes one interim-report note per locus. |
|
|
245
|
+
| `hyperresearch-dialectic-critic` | **Opus** | Finds counter-evidence the draft missed, emits structured findings with surgical patches. |
|
|
246
|
+
| `hyperresearch-depth-critic` | **Opus** | Finds shallow spots where interim notes could fill specifics. |
|
|
247
|
+
| `hyperresearch-width-critic` | **Opus** | Finds topical corners the corpus supports but the draft ignores. |
|
|
248
|
+
| `hyperresearch-patcher` | **Sonnet** | Tool-locked `[Read, Edit]`. Applies critic findings as surgical Edit hunks. Cannot regenerate. |
|
|
249
|
+
| `hyperresearch-polish-auditor` | **Sonnet** | Tool-locked `[Read, Edit]`. Cuts filler, strips hygiene leaks, breaks long sentences. |
|
|
193
250
|
|
|
194
251
|
**Routing** — the dispatcher classifies every request by **what the output needs to do**, not what the subject is:
|
|
195
252
|
|
|
@@ -206,16 +263,17 @@ A query about a fictional franchise can be `collect` (per-character enumeration)
|
|
|
206
263
|
|
|
207
264
|
## What's enforced
|
|
208
265
|
|
|
209
|
-
|
|
266
|
+
Nine invariants the protocol structurally prevents from breaking:
|
|
210
267
|
|
|
211
|
-
1. **Verbatim prompt as gospel** — `scaffold-prompt` lint blocks
|
|
268
|
+
1. **Verbatim prompt as gospel** — `scaffold-prompt` lint blocks if the scaffold doesn't open with the user's exact prompt
|
|
212
269
|
2. **Rooted-tree provenance** — `--suggested-by` chain must form a real tree from at least one seed; isolated breadcrumbs flagged
|
|
213
|
-
3. **
|
|
214
|
-
4. **
|
|
215
|
-
5. **
|
|
216
|
-
6. **
|
|
217
|
-
7. **
|
|
218
|
-
8. **
|
|
270
|
+
3. **Locus coverage** — every Layer 2 locus must have a Layer 3 `interim-<name>.md` note; missing interims flag as errors
|
|
271
|
+
4. **Patch-only draft modification** — after Layer 4, the patcher and polish auditor are tool-locked to `[Read, Edit]`. They cannot regenerate; the ≤500-char hunk-expansion cap is a mechanical tripwire
|
|
272
|
+
5. **Critical findings never silently skip** — `patch-surgery` lint surfaces any critical finding the patcher couldn't apply
|
|
273
|
+
6. **Schema integrity** — `tier`, `content_type`, and `type` are SQLite CHECK-constrained vocabularies; corrupted frontmatter cannot poison the index
|
|
274
|
+
7. **PDF + raw artifact persistence** — fetched PDFs land in `research/raw/` and the `raw_file` frontmatter field survives every re-serialization
|
|
275
|
+
8. **Interim notes are persisted, not ephemeral** — depth-investigator outputs stay in the vault forever; future sessions can query them
|
|
276
|
+
9. **Hygiene leaks caught on the way out** — scaffold sections, YAML frontmatter, and prompt echoes are stripped by the polish auditor before ship
|
|
219
277
|
|
|
220
278
|
---
|
|
221
279
|
|
|
@@ -236,11 +294,8 @@ Eight invariants the protocol structurally prevents from breaking:
|
|
|
236
294
|
- **Forecasting + strategy** — "Will US inflation stay above 3% through 2026?" → ground-truth statistics + institutional analysis + named contrarians, probability language not hedge
|
|
237
295
|
- **Interpretive analysis** — "What does *Blood Meridian*'s violence mean?" → primary text + critical tradition + dissenting reading, every paragraph fuses fact with interpretive claim
|
|
238
296
|
- **Enumerative coverage** — "For each Napoleonic marshal, cover key campaigns and fate" → every named entity gets every requested field, no silent downgrades
|
|
239
|
-
- **Persistent knowledge base** — every source ever fetched stays searchable. Future sessions check the vault before searching the web. Knowledge compounds.
|
|
240
297
|
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
For queries where depth-of-corpus and argument stability matter more than wall-clock time, use `/research-ensemble <query>`. Opus orchestrates; three `hyperresearch-subrun` Sonnet agents run the full protocol in parallel against one shared vault, each with a subtly different framing (evidentiary breadth / citation-chain depth / dialectical tension). A fourth agent (`hyperresearch-merger`, Opus) scores each draft on comprehensiveness / readability / argument strength / citation quality, picks the strongest as the base, and splices in unique evidence from the other two. Cost is ~5× a normal run; the payoff is detailed in [Benchmarks](#benchmarks) below.
|
|
298
|
+
All of the above run under the default [`/research-layercake`](#research-layercake--7-phases-one-draft-patched-not-regenerated-the-default) mode: width sweep → loci analysis → depth investigations → one draft → three adversarial critics → surgical patch pass → polish audit. For faster turnaround when the query doesn't warrant the full pipeline, type `/research <query>` for a single-pass run.
|
|
244
299
|
|
|
245
300
|
---
|
|
246
301
|
|
|
@@ -250,8 +305,8 @@ One command sets up the full integration:
|
|
|
250
305
|
|
|
251
306
|
- **`.claude/settings.json`** — PreToolUse hook that nudges Claude Code to check the vault before any raw web search
|
|
252
307
|
- **`.claude/skills/hyperresearch/`** — `/research` skill (dispatcher + 4 modality files: collect / synthesize / compare / forecast)
|
|
253
|
-
- **`.claude/skills/research-
|
|
254
|
-
- **`.claude/agents/`** —
|
|
308
|
+
- **`.claude/skills/research-layercake/`** — `/research-layercake` skill (the 7-phase pipeline)
|
|
309
|
+
- **`.claude/agents/`** — eight registered subagents: `hyperresearch-fetcher` (Haiku), `hyperresearch-loci-analyst` (Sonnet), `hyperresearch-depth-investigator` (Sonnet), `hyperresearch-dialectic-critic` (Opus), `hyperresearch-depth-critic` (Opus), `hyperresearch-width-critic` (Opus), `hyperresearch-patcher` (Sonnet, `[Read, Edit]`-locked), `hyperresearch-polish-auditor` (Sonnet, `[Read, Edit]`-locked)
|
|
255
310
|
- **`CLAUDE.md`** at the vault root — the full research workflow, automatically loaded by Claude Code on every session
|
|
256
311
|
|
|
257
312
|
hyperresearch is Claude Code-only for now. Codex, Cursor, and Gemini support was trimmed from v0.6 to focus the surface area — may return as real integrations later.
|
|
@@ -311,26 +366,6 @@ LinkedIn, Twitter, Facebook, Instagram, and TikTok automatically use a visible b
|
|
|
311
366
|
|
|
312
367
|
---
|
|
313
368
|
|
|
314
|
-
## Benchmarks
|
|
315
|
-
|
|
316
|
-
Hyperresearch is being evaluated on the [DeepResearch Bench](https://github.com/Ayanami0730/deep_research_bench) RACE eval (Gemini-2.5-Pro judges reports on comprehensiveness, insight, instruction-following, readability). Full per-modality scores and head-to-head comparisons vs other research harnesses will land here as the 100-query sweep completes. **Status:** in progress.
|
|
317
|
-
|
|
318
|
-
### Ensemble lift — preliminary data point
|
|
319
|
-
|
|
320
|
-
Query 91 from DeepResearch-Bench ("detailed analysis of the Saint Seiya franchise, structured around armor classes, per-character power/techniques/arcs/fate") is a deep-collect query with ~100 named entities. One data point so far:
|
|
321
|
-
|
|
322
|
-
| Variant | Overall | Comp. | Insight | Inst. | Read. | Cost | Time |
|
|
323
|
-
|---|---:|---:|---:|---:|---:|---:|---:|
|
|
324
|
-
| `/research` single-run (sonnet, v1 baseline) | **52.74** | 52.95 | 58.74 | 51.28 | 51.90 | ~$1.50 | ~8 min |
|
|
325
|
-
| `/research-ensemble` (3× sonnet + opus merger) | **54.82** | 54.52 | 58.57 | 53.30 | 56.10 | $21.98 | 57 min |
|
|
326
|
-
| **Delta** | **+2.08** | +1.57 | −0.17 | +2.02 | +4.20 | ~14× | ~7× |
|
|
327
|
-
|
|
328
|
-
Readability is the biggest single lift (+4.20) — the merger smooths splice boundaries and harmonizes voice across the three sub-runs. Instruction-following (+2.02) gains from three independent passes cross-checking the prompt's entity list; prompt-named entities the base run collapsed get restored from sibling runs. Comprehensiveness (+1.57) comes from the 3-way evidence union (167 sources fetched into the shared corpus vs ~30 for a single run). Insight is flat as expected — the merger is a compiler, not a re-thinker; it can't deepen an argument beyond what the strongest sub-run already had.
|
|
329
|
-
|
|
330
|
-
One query is not a benchmark. Full 100-query sweep coming next. The cost ceiling is honest: ~5× per query at the tool-call level, ~14× here because `/research` ran on Sonnet and `/research-ensemble` requires Opus orchestration + Opus merger. Use ensemble where the query earns it; use `/research` for everything else.
|
|
331
|
-
|
|
332
|
-
---
|
|
333
|
-
|
|
334
369
|
## Philosophy
|
|
335
370
|
|
|
336
371
|
- **Process is load-bearing.** A draft without a scaffold, comparisons, audit findings, and a clean provenance graph is unfinished — regardless of how good the prose reads.
|
|
@@ -13,13 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
---
|
|
15
15
|
|
|
16
|
-
**
|
|
17
|
-
|
|
18
|
-
<p align="center">
|
|
19
|
-
<img src="assets/benchmark.png" alt="DeepResearch-Bench top-5 — hyperresearch at 57.5, ahead of Tongyi DeepResearch (55.8), Kimi Researcher (53.2), Gemini Deep Research (42.1), OpenAI Deep Research (37.4)" width="780">
|
|
20
|
-
</p>
|
|
21
|
-
|
|
22
|
-
<p align="center"><sub>Preliminary — one-query pilot lift (+2.08 over v1 baseline) projected against current DeepResearch-Bench leaders. Full 100-query sweep pending.</sub></p>
|
|
16
|
+
**HyperResearch is a deep research harness for Claude Code. It produces adversarially-audited reports with full source provenance and creates a persistent, searchable knowledge base that compounds across sessions.**
|
|
23
17
|
|
|
24
18
|
## Installation
|
|
25
19
|
|
|
@@ -28,9 +22,9 @@ pip install hyperresearch
|
|
|
28
22
|
hyperresearch install
|
|
29
23
|
```
|
|
30
24
|
|
|
31
|
-
In Claude Code, type `/research <anything>` and the full protocol fires.
|
|
25
|
+
In Claude Code, type `/research-layercake <anything>` and the full flagship protocol fires — **a 7-phase pipeline that discovers width first, derives depth loci from the width corpus, runs parallel depth investigations, drafts once, and patches the draft via adversarial critics (no regeneration).** This is the default way to use hyperresearch. If you want a faster single-pass run instead, type `/research <anything>`.
|
|
32
26
|
|
|
33
|
-
That single
|
|
27
|
+
That single install command creates a v7 SQLite vault, auto-installs Chromium for headless browsing, generates `CLAUDE.md`, installs both skills (`/research-layercake` and `/research`), registers eight subagents (fetcher / loci-analyst / depth-investigator / dialectic-critic / depth-critic / width-critic / patcher / polish-auditor) into `.claude/agents/`, and wires PreToolUse hooks.
|
|
34
28
|
|
|
35
29
|
---
|
|
36
30
|
|
|
@@ -91,6 +85,64 @@ The save gate blocks until every CRITICAL is **genuinely** resolved. Bookkeeping
|
|
|
91
85
|
|
|
92
86
|
---
|
|
93
87
|
|
|
88
|
+
## `/research-layercake` — 7 phases, one draft, patched not regenerated (the default)
|
|
89
|
+
|
|
90
|
+
The flagship research surface and the default way to use hyperresearch. Type `/research-layercake <query>` in Claude Code.
|
|
91
|
+
|
|
92
|
+
**Width before depth, then one draft patched by adversarial critics.** An Opus orchestrator walks a seven-phase pipeline: wide corpus sweep → rabbithole identification → parallel depth investigations → single draft → three adversarial readings → surgical patch pass → polish audit.
|
|
93
|
+
|
|
94
|
+
### The 7 phases
|
|
95
|
+
|
|
96
|
+
1. **Width sweep.** The orchestrator spawns parallel `hyperresearch-fetcher` Haiku agents to build a 30–80 source corpus covering the topic's corners. Academic APIs (Semantic Scholar, arXiv, OpenAlex, PubMed) run BEFORE web search — citation-ranked canonical papers before derivative commentary.
|
|
97
|
+
2. **Loci analysis.** Two `hyperresearch-loci-analyst` Sonnet agents read the width corpus in parallel and each returns 1–8 specific "depth loci" — questions where deeper investigation would meaningfully improve the final report. The orchestrator dedupes their outputs and clamps to 6.
|
|
98
|
+
3. **Depth investigation.** One `hyperresearch-depth-investigator` Sonnet agent per locus, in parallel. Each investigator can spawn its own fetchers (capped at 10 new sources), reads the existing vault, and writes ONE `interim-<locus>.md` note with dense synthesis, direct quotes, and citations. The orchestrator consumes these interim notes during Layer 4.
|
|
99
|
+
4. **Draft.** The orchestrator writes `research/notes/final_report.md` ONCE, weaving the width corpus with the interim notes under the modality file's substance rules (collect / synthesize / compare / forecast).
|
|
100
|
+
5. **Adversarial critique.** Three Opus critics fire in parallel: `dialectic-critic` (counter-evidence the draft missed), `depth-critic` (shallow spots the interim notes could fill), `width-critic` (topical corners the draft ignores despite the corpus supporting them). Each returns a findings JSON with structured `suggested_patch` entries — never a rewrite.
|
|
101
|
+
6. **Patch pass.** `hyperresearch-patcher` (Sonnet, **tool-locked to `[Read, Edit]`**) reads all three findings files and applies them as surgical Edit hunks. Per-hunk cap: `new_string` may be at most 500 chars longer than `old_string`. The patcher physically cannot Write — it has no path to regenerate the draft.
|
|
102
|
+
7. **Polish audit.** `hyperresearch-polish-auditor` (Sonnet, also `[Read, Edit]` only) strips hygiene leaks (YAML frontmatter, scaffold sections, prompt echoes), cuts filler phrases ("Importantly", "It is worth noting"), removes redundancy, and breaks long sentences — all via surgical Edits. Structural mismatches (wrong format for the prompt, missing sections) escalate to the orchestrator rather than getting force-patched.
|
|
103
|
+
|
|
104
|
+
### Why the tool lock matters
|
|
105
|
+
|
|
106
|
+
The load-bearing invariant of layercake is: **after Layer 4 the draft is only ever modified by small Edit hunks.** This is enforced at the Claude Code tool-allowlist level — the patcher and polish auditor do not have `Write` or `Bash`. If a critic's finding cannot fit into a ≤500-char hunk, it escalates to the orchestrator as a structural issue instead of triggering a regeneration. This prevents the "just rewrite it" failure mode that plagues post-hoc review in long-running agent pipelines.
|
|
107
|
+
|
|
108
|
+
### Opting out — faster single-pass mode
|
|
109
|
+
|
|
110
|
+
Layercake is the default because width-plus-depth-plus-adversarial-review beats a single investigator on almost every real research query. If you want a faster single-pass run — e.g., for a quick sanity-check or a prompt where one pass is plenty — type `/research <query>` instead. Single-pass fires the same modality rules on one Sonnet agent, no loci analysis, no critics, no patcher.
|
|
111
|
+
|
|
112
|
+
A rule of thumb: use `/research-layercake` for anything you would want a human researcher to take seriously. Use `/research` when you just want the vault populated and a first-pass draft in front of you quickly.
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## The vault: persistent, searchable, compounding
|
|
117
|
+
|
|
118
|
+
hyperresearch is not a one-shot report generator. Every fetched source lands in a durable SQLite-indexed vault that every future research session can reuse. Knowledge compounds across sessions; the tool's value grows with the corpus.
|
|
119
|
+
|
|
120
|
+
### What persists
|
|
121
|
+
|
|
122
|
+
- **Raw source material, not rewritten summaries.** Fetched content keeps its original formatting — headings, tables, code blocks, technical details. If the source is a PDF, pymupdf extracts the full text and the original PDF lives at `research/raw/<note-id>.pdf`. Every note carries its source URL, fetch timestamp, tier classification, and `--suggested-by` breadcrumb pointing at whichever note surfaced it.
|
|
123
|
+
- **Extract notes** — per-source analyst reads with direct quotes, context markers, one-line summaries, and inherited tier + content-type tags. These are the second derivative of raw content and stay in the vault as first-class, queryable notes.
|
|
124
|
+
- **Scaffolds, comparisons, audit findings** — every research session's planning artifacts and adversarial review trail persist alongside the sources they drew on. Past synthesis notes are discoverable next to the raw sources that justified them.
|
|
125
|
+
- **The knowledge graph** — `[[wiki-links]]` between notes form a queryable graph. `hyperresearch graph hubs` surfaces the most-connected notes in a domain; `hyperresearch graph backlinks <id>` shows every note that references a given source.
|
|
126
|
+
|
|
127
|
+
### Searchability
|
|
128
|
+
|
|
129
|
+
Before any web search the vault gets queried first — the hook reminds Claude Code, and the protocol checks explicitly:
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
hyperresearch search "ion-trap gate fidelity" -j # Full-text across every note
|
|
133
|
+
hyperresearch search "quantum" --tier ground_truth -j # Filter by epistemic tier
|
|
134
|
+
hyperresearch search "attention" --include-body -j # Full-body search, not just titles
|
|
135
|
+
hyperresearch note show <id> <id> <id> -j # Batch-read notes in one call
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
When the vault already holds ≥10 relevant notes on a topic, `/research` tells the user so and asks whether to dig deeper, take a new angle, or synthesize from the existing corpus — instead of re-fetching what's already there. The sunk-cost of past research pays forward.
|
|
139
|
+
|
|
140
|
+
### Markdown is truth, SQLite is cache
|
|
141
|
+
|
|
142
|
+
Notes live as plain markdown with YAML frontmatter in `research/notes/`. The SQLite index is fully rebuildable — delete it and `hyperresearch sync` reconstructs it from the markdown. The vault is inspectable in any editor, version-controllable in git, and readable without the tool installed. hyperresearch stores and indexes; it does not hide data behind the tool.
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
94
146
|
## Why it works on hard research
|
|
95
147
|
|
|
96
148
|
Your AI agent searches the web, skims sources, writes an answer that sounds good, and ships it. There's no scaffold, no audit, no source-vs-source comparison, no provenance, no way to know if it actually engaged with the strongest counter-position. Hyperresearch breaks that pattern through structural enforcement:
|
|
@@ -143,13 +195,18 @@ Your AI agent searches the web, skims sources, writes an answer that sounds good
|
|
|
143
195
|
└─────────────────────────────────────────────────────────────────────┘
|
|
144
196
|
```
|
|
145
197
|
|
|
146
|
-
**Subagent
|
|
198
|
+
**Subagent roster**, each picked for its job:
|
|
147
199
|
|
|
148
200
|
| Agent | Model | Role |
|
|
149
201
|
|---|---|---|
|
|
150
202
|
| `hyperresearch-fetcher` | **Haiku** | Mechanical URL fetching via crawl4ai. Cheap, fast, parallel. |
|
|
151
|
-
| `hyperresearch-analyst` | **Sonnet** | Reads
|
|
152
|
-
| `hyperresearch-
|
|
203
|
+
| `hyperresearch-loci-analyst` | **Sonnet** | Reads the width corpus, returns 1–8 depth loci with rationale. Spawn 2 in parallel, dedupe. |
|
|
204
|
+
| `hyperresearch-depth-investigator` | **Sonnet** | Investigates one locus: fetches new sources, writes one interim-report note per locus. |
|
|
205
|
+
| `hyperresearch-dialectic-critic` | **Opus** | Finds counter-evidence the draft missed, emits structured findings with surgical patches. |
|
|
206
|
+
| `hyperresearch-depth-critic` | **Opus** | Finds shallow spots where interim notes could fill specifics. |
|
|
207
|
+
| `hyperresearch-width-critic` | **Opus** | Finds topical corners the corpus supports but the draft ignores. |
|
|
208
|
+
| `hyperresearch-patcher` | **Sonnet** | Tool-locked `[Read, Edit]`. Applies critic findings as surgical Edit hunks. Cannot regenerate. |
|
|
209
|
+
| `hyperresearch-polish-auditor` | **Sonnet** | Tool-locked `[Read, Edit]`. Cuts filler, strips hygiene leaks, breaks long sentences. |
|
|
153
210
|
|
|
154
211
|
**Routing** — the dispatcher classifies every request by **what the output needs to do**, not what the subject is:
|
|
155
212
|
|
|
@@ -166,16 +223,17 @@ A query about a fictional franchise can be `collect` (per-character enumeration)
|
|
|
166
223
|
|
|
167
224
|
## What's enforced
|
|
168
225
|
|
|
169
|
-
|
|
226
|
+
Nine invariants the protocol structurally prevents from breaking:
|
|
170
227
|
|
|
171
|
-
1. **Verbatim prompt as gospel** — `scaffold-prompt` lint blocks
|
|
228
|
+
1. **Verbatim prompt as gospel** — `scaffold-prompt` lint blocks if the scaffold doesn't open with the user's exact prompt
|
|
172
229
|
2. **Rooted-tree provenance** — `--suggested-by` chain must form a real tree from at least one seed; isolated breadcrumbs flagged
|
|
173
|
-
3. **
|
|
174
|
-
4. **
|
|
175
|
-
5. **
|
|
176
|
-
6. **
|
|
177
|
-
7. **
|
|
178
|
-
8. **
|
|
230
|
+
3. **Locus coverage** — every Layer 2 locus must have a Layer 3 `interim-<name>.md` note; missing interims flag as errors
|
|
231
|
+
4. **Patch-only draft modification** — after Layer 4, the patcher and polish auditor are tool-locked to `[Read, Edit]`. They cannot regenerate; the ≤500-char hunk-expansion cap is a mechanical tripwire
|
|
232
|
+
5. **Critical findings never silently skip** — `patch-surgery` lint surfaces any critical finding the patcher couldn't apply
|
|
233
|
+
6. **Schema integrity** — `tier`, `content_type`, and `type` are SQLite CHECK-constrained vocabularies; corrupted frontmatter cannot poison the index
|
|
234
|
+
7. **PDF + raw artifact persistence** — fetched PDFs land in `research/raw/` and the `raw_file` frontmatter field survives every re-serialization
|
|
235
|
+
8. **Interim notes are persisted, not ephemeral** — depth-investigator outputs stay in the vault forever; future sessions can query them
|
|
236
|
+
9. **Hygiene leaks caught on the way out** — scaffold sections, YAML frontmatter, and prompt echoes are stripped by the polish auditor before ship
|
|
179
237
|
|
|
180
238
|
---
|
|
181
239
|
|
|
@@ -196,11 +254,8 @@ Eight invariants the protocol structurally prevents from breaking:
|
|
|
196
254
|
- **Forecasting + strategy** — "Will US inflation stay above 3% through 2026?" → ground-truth statistics + institutional analysis + named contrarians, probability language not hedge
|
|
197
255
|
- **Interpretive analysis** — "What does *Blood Meridian*'s violence mean?" → primary text + critical tradition + dissenting reading, every paragraph fuses fact with interpretive claim
|
|
198
256
|
- **Enumerative coverage** — "For each Napoleonic marshal, cover key campaigns and fate" → every named entity gets every requested field, no silent downgrades
|
|
199
|
-
- **Persistent knowledge base** — every source ever fetched stays searchable. Future sessions check the vault before searching the web. Knowledge compounds.
|
|
200
257
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
For queries where depth-of-corpus and argument stability matter more than wall-clock time, use `/research-ensemble <query>`. Opus orchestrates; three `hyperresearch-subrun` Sonnet agents run the full protocol in parallel against one shared vault, each with a subtly different framing (evidentiary breadth / citation-chain depth / dialectical tension). A fourth agent (`hyperresearch-merger`, Opus) scores each draft on comprehensiveness / readability / argument strength / citation quality, picks the strongest as the base, and splices in unique evidence from the other two. Cost is ~5× a normal run; the payoff is detailed in [Benchmarks](#benchmarks) below.
|
|
258
|
+
All of the above run under the default [`/research-layercake`](#research-layercake--7-phases-one-draft-patched-not-regenerated-the-default) mode: width sweep → loci analysis → depth investigations → one draft → three adversarial critics → surgical patch pass → polish audit. For faster turnaround when the query doesn't warrant the full pipeline, type `/research <query>` for a single-pass run.
|
|
204
259
|
|
|
205
260
|
---
|
|
206
261
|
|
|
@@ -210,8 +265,8 @@ One command sets up the full integration:
|
|
|
210
265
|
|
|
211
266
|
- **`.claude/settings.json`** — PreToolUse hook that nudges Claude Code to check the vault before any raw web search
|
|
212
267
|
- **`.claude/skills/hyperresearch/`** — `/research` skill (dispatcher + 4 modality files: collect / synthesize / compare / forecast)
|
|
213
|
-
- **`.claude/skills/research-
|
|
214
|
-
- **`.claude/agents/`** —
|
|
268
|
+
- **`.claude/skills/research-layercake/`** — `/research-layercake` skill (the 7-phase pipeline)
|
|
269
|
+
- **`.claude/agents/`** — eight registered subagents: `hyperresearch-fetcher` (Haiku), `hyperresearch-loci-analyst` (Sonnet), `hyperresearch-depth-investigator` (Sonnet), `hyperresearch-dialectic-critic` (Opus), `hyperresearch-depth-critic` (Opus), `hyperresearch-width-critic` (Opus), `hyperresearch-patcher` (Sonnet, `[Read, Edit]`-locked), `hyperresearch-polish-auditor` (Sonnet, `[Read, Edit]`-locked)
|
|
215
270
|
- **`CLAUDE.md`** at the vault root — the full research workflow, automatically loaded by Claude Code on every session
|
|
216
271
|
|
|
217
272
|
hyperresearch is Claude Code-only for now. Codex, Cursor, and Gemini support was trimmed from v0.6 to focus the surface area — may return as real integrations later.
|
|
@@ -271,26 +326,6 @@ LinkedIn, Twitter, Facebook, Instagram, and TikTok automatically use a visible b
|
|
|
271
326
|
|
|
272
327
|
---
|
|
273
328
|
|
|
274
|
-
## Benchmarks
|
|
275
|
-
|
|
276
|
-
Hyperresearch is being evaluated on the [DeepResearch Bench](https://github.com/Ayanami0730/deep_research_bench) RACE eval (Gemini-2.5-Pro judges reports on comprehensiveness, insight, instruction-following, readability). Full per-modality scores and head-to-head comparisons vs other research harnesses will land here as the 100-query sweep completes. **Status:** in progress.
|
|
277
|
-
|
|
278
|
-
### Ensemble lift — preliminary data point
|
|
279
|
-
|
|
280
|
-
Query 91 from DeepResearch-Bench ("detailed analysis of the Saint Seiya franchise, structured around armor classes, per-character power/techniques/arcs/fate") is a deep-collect query with ~100 named entities. One data point so far:
|
|
281
|
-
|
|
282
|
-
| Variant | Overall | Comp. | Insight | Inst. | Read. | Cost | Time |
|
|
283
|
-
|---|---:|---:|---:|---:|---:|---:|---:|
|
|
284
|
-
| `/research` single-run (sonnet, v1 baseline) | **52.74** | 52.95 | 58.74 | 51.28 | 51.90 | ~$1.50 | ~8 min |
|
|
285
|
-
| `/research-ensemble` (3× sonnet + opus merger) | **54.82** | 54.52 | 58.57 | 53.30 | 56.10 | $21.98 | 57 min |
|
|
286
|
-
| **Delta** | **+2.08** | +1.57 | −0.17 | +2.02 | +4.20 | ~14× | ~7× |
|
|
287
|
-
|
|
288
|
-
Readability is the biggest single lift (+4.20) — the merger smooths splice boundaries and harmonizes voice across the three sub-runs. Instruction-following (+2.02) gains from three independent passes cross-checking the prompt's entity list; prompt-named entities the base run collapsed get restored from sibling runs. Comprehensiveness (+1.57) comes from the 3-way evidence union (167 sources fetched into the shared corpus vs ~30 for a single run). Insight is flat as expected — the merger is a compiler, not a re-thinker; it can't deepen an argument beyond what the strongest sub-run already had.
|
|
289
|
-
|
|
290
|
-
One query is not a benchmark. Full 100-query sweep coming next. The cost ceiling is honest: ~5× per query at the tool-call level, ~14× here because `/research` ran on Sonnet and `/research-ensemble` requires Opus orchestration + Opus merger. Use ensemble where the query earns it; use `/research` for everything else.
|
|
291
|
-
|
|
292
|
-
---
|
|
293
|
-
|
|
294
329
|
## Philosophy
|
|
295
330
|
|
|
296
331
|
- **Process is load-bearing.** A draft without a scaffold, comparisons, audit findings, and a clean provenance graph is unfinished — regardless of how good the prose reads.
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "hyperresearch"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.7.0"
|
|
8
8
|
description = "Claude Code harness for disciplined, adversarially-audited deep research with full provenance."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "MIT"
|