Conversation
…iew for smarter agent navigation
Introduces three new library-wide data structures that transform how agents
navigate knowledge:
- library_index.json: unified cross-book/corpus concept index with aliases,
related concepts, and pattern fingerprints — one read covers the entire library
- pattern_index.json: reverse index from abstract structural patterns to concepts,
enabling cross-domain associative recall ("this reminds me of...")
- chunk_index.json: per-book chunk preview metadata (section, concepts, tokens,
prev/next chains) so agents can assess chunks before reading them
Also adds concept relationship edges (related field) and pattern tags to the
concept extraction prompt, three new MCP tools (search_library, explore_patterns,
preview_chunks), updated agent/skill prompts for the new navigation flow, and
comprehensive tests for all new functionality.
https://claude.ai/code/session_01EwryWxbML8dmiSrDsnU5mq
Update documentation to reflect the new unified library index, pattern fingerprints, and chunk preview system. Updated sections include the navigation flow diagram, metadata layers, library structure, querying description, and ingestion command docs. https://claude.ai/code/session_01EwryWxbML8dmiSrDsnU5mq
Review Summary by QodoAdd unified library index, pattern fingerprints, and chunk preview for smarter agent navigation
WalkthroughsDescription• Introduces three unified library-wide data structures for intelligent cross-library navigation - library_index.json: unified concept index with aliases, related concepts, and pattern fingerprints across all books and corpora - pattern_index.json: reverse index enabling cross-domain discovery via abstract structural patterns - chunk_index.json: per-book chunk preview metadata (section, concepts, tokens, prev/next chains) • Adds pattern fingerprints to concept extraction with seed vocabulary for consistency • Implements three new MCP tools (search_library, explore_patterns, preview_chunks) for smarter navigation • Updates agent and skill prompts to leverage unified indices for faster, more intelligent queries • Adds comprehensive tests and documentation for all new navigation features Diagramflowchart LR
Q["User Query"] --> LI["library_index.json<br/>ALL concepts, ALL sources"]
LI --> M{"Match found?"}
M -->|yes| CI["chunk_index.json<br/>preview metadata"]
M -->|no| PI["pattern_index.json<br/>cross-domain patterns"]
PI --> CI
CI --> CH["chunks<br/>300-500 tokens"]
CH --> A["Answer with citations"]
File Changes2. lib/storage.py
|
Code Review by Qodo
1.
|
…search tools, clean up dead code - Fix ConceptEntry related field, chunk token counts, explore_patterns cap, compact manifest revert - Remove hardcoded pattern seed vocabulary in favour of LLM-generated expansions - Consolidate 6 navigation files into 3 (library_index with patterns, nav.json, manifest.json) - Merge search_library + explore_patterns into a single tool - Clean up dead code and unused helpers Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Make nav.json preview a hard requirement in agent and skill prompts. Reduce chunk budget from 5 to 3 to force selective reading. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Haiku was unreliable at multi-step navigation and produced oversized output that the main agent couldn't use. Switch to sonnet and add 2000-char output limit. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Agent was hitting 15-turn limit mid-research and returning narration instead of answers. Bump to 25 and add instruction to always synthesize an answer rather than return mid-thought. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sub-agent delegation caused doubled work (17-27K tokens discarded when main agent rejected output), turn limit failures, and nav.json size errors. MCP tools (search_library, preview_chunks, read_chunks) handle navigation server-side in 3 calls. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The MCP tools (search_library, preview_chunks, read_chunks, etc.) were defined in server.py but never wired into the plugin config. Claude Code loaded skills/agents but never started the server. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Claude Code may not have uv in its PATH when spawning subprocesses, causing the MCP server to fail to start. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Agents were retrying search_library 6+ times on misses. Now: try once with broad terms, fall back to open_book chapter browsing. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Agent was guessing chunk ID format (ch11_chunk_001) instead of the actual format (ch11-s01-001). Now open_book returns chunk_ids per section so preview_chunks flows directly. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Introduces three new library-wide data structures that transform how agents
navigate knowledge:
related concepts, and pattern fingerprints — one read covers the entire library
enabling cross-domain associative recall ("this reminds me of...")
prev/next chains) so agents can assess chunks before reading them
Also adds concept relationship edges (related field) and pattern tags to the
concept extraction prompt, three new MCP tools (search_library, explore_patterns,
preview_chunks), updated agent/skill prompts for the new navigation flow, and
comprehensive tests for all new functionality.
https://claude.ai/code/session_01EwryWxbML8dmiSrDsnU5mq