惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

WordPress大学
WordPress大学
博客园 - 司徒正美
宝玉的分享
宝玉的分享
阮一峰的网络日志
阮一峰的网络日志
The Cloudflare Blog
月光博客
月光博客
博客园 - 【当耐特】
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 三生石上(FineUI控件)
博客园 - 聂微东
小众软件
小众软件
Hugging Face - Blog
Hugging Face - Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Apple Machine Learning Research
Apple Machine Learning Research
V
V2EX
Jina AI
Jina AI
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
罗磊的独立博客
雷峰网
雷峰网
博客园 - 叶小钗
量子位
IT之家
IT之家

Hacker News: Show HN

PurrrrrFocus: Pomodoro Timer App - App Store Workflow Engine — Multi-Step Orchestration for Bun RapidPhoto: Pro Photo Editor App - App Store GitHub - DheerG/swarms: Achieve extraordinary results with claude code across a variety of tasks SPICE simulation → oscilloscope → verification with Claude Code — Lucas Gerads Show HN: VCoding – A 5 MB native Windows IDE with no dynamic dependencies Show HN: LLMs don't hallucinate because they're bad at math, it's the format GitHub - Agent-FM/agentfm-core: AgentFM is a peer-to-peer network that turns everyday computers into a decentralized AI supercomputer. AgentFM lets you run massive AI workloads directly across a global mesh of idle CPUs and GPUs. Show HN: Tracking Top US Science Olympiad Alumni over Last 25 Years GitHub - Potarix/agent-hub: One place to talk to all your agents Show HN: Runtime security for AI agents(injection,tool abuse, data exfiltration) GitHub - dubeyKartikay/lazyspotify: Terminal Spotify client for macOS and Linux GitHub - the-banana-tool/king-louie: Easy to use GUI Personal AI Assistant. Win/Linux/Mac. Show HN I made my vacation rental bookable by AI agents–no Airbnb, 0% commission GitHub - basteez/jsf-autoreload: maven plugin to enable hot reload on jsf projects uvm32/hosts/host-gdbstub at main · ringtailsoftware/uvm32 GitHub - labsai/EDDI: Config-driven engine that turns JSON into production-grade AI agents. Multi-agent orchestration, 12+ LLM providers, MCP/A2A protocols, RAG, persistent memory, and enterprise compliance (EU AI Act, GDPR, HIPAA). Built on Quarkus. GitHub - glitchnsec/fortyone-oss: AI Executive Assistant Platform Quickstart | Alien GitHub - muxshed/shed: One stream in, or many. Every destination, simultaneously. No cloud middleman, no per-channel fees, no limits. GitHub - ocrbase-hq/ocrbase: 📄 PDF/IMG ->.MD/JSON Document OCR API for PaddleOCR and GLMOCR. Self-hostable. GitHub - impactjo/home-memory: MCP server that lets your AI assistant remember everything about your home. GitHub - Sets88/dbcls: DbCls is a powerful terminal database client that supports various databases GitHub - neptun2000/heor-agent-mcp GitHub - SeanFDZ/macmind: Single-layer transformer in HyperTalk for the classic Macintosh RollQuation: Math Puzzles - Apps on Google Play GitHub - dropbox/witchcraft Show HN: Agent-cache – Multi-tier LLM/tool/session caching for Valkey and Redis GitHub - opentalon/opentalon: OpenTalon is an open-source platform built from the ground up in Go as a robust alternative to OpenClaw LinkedIn™ 职位抓取工具 - Chrome 应用商店
GitHub - Dreeseaw/mdlens: Token-efficient Markdown CLI fo...
dreeseaw · 2026-04-27 · via Hacker News: Show HN

CI License: MIT Crates.io docs.rs

mdlens is a Markdown retrieval CLI for AI agents.

The headline command is mdlens scout: give it a directory and a natural-language question, and it returns a bounded evidence pack with likely files, section IDs, highlights, table/context snippets, and enough structure for one precise follow-up read.

mdlens scout docs/ "Which config option controls authentication timeout?" --max-tokens 1400

scout is meant to replace the common agent pattern of find, rg, cat, and large raw file reads when the target corpus is Markdown. It works over arbitrary English Markdown collections: READMEs, runbooks, model cards, generated docs, experiment logs, tables, stale notes, and multi-file policy docs.

Agent Integration

For AGENTS.md, CLAUDE.md, plugin docs, system prompts, or tool routers, add:

When answering questions over Markdown files or documentation directories, consider using `mdlens`.
If `mdlens` is available and you need command guidance, run `mdlens --help` once.
For question answering over a Markdown directory, prefer:
  mdlens scout <dir> "<question>" --max-tokens 1400
Answer from `[highlights]` and `[evidence]` when sufficient.
If exactly one detail is missing, use the section map from `[files]`:
  mdlens read <file> --id <section-id> --max-tokens 1200
Avoid reading whole Markdown files unless scout clearly found the wrong file.
Preserve exact short source terms such as flags, IDs, option names, metrics, table values, and policy phrases.

Detailed guidance lives in mdlens --help and mdlens scout --help, so harness prompts can stay short while future agents can still discover the workflow.

Commands

scout should be the first call for natural-language QA, multi-file comparison, stale/current checks, table lookup, and policy/rationale questions.

The other commands are digging tools:

Command Use when
read scout found the right file and one exact section is missing
search you need a second independent lexical query
tree you only need Markdown structure and section IDs
pack you intentionally want selected sections under a hard token budget
sections you already have rg -nH hits and want section-aware excerpts
stats you need file-level size/token estimates

Examples:

mdlens read docs/guide.md --id 1.2 --max-tokens 1200
mdlens search docs/ "rate limit"
mdlens tree docs/
rg -nH "rate limit" docs/ | mdlens sections --preview 3 --max-sections 8

All commands support --json for machine-readable output. For scout, JSON includes schema_version, query expansions, selected candidates, and the same rendered evidence pack in rendered_text.

Evals

Important caveat: this eval is entirely Markdown QA/search. It is not a claim about broad coding-agent performance, even though Markdown QA is a common part of coding-agent work. It measures whether agents answer from documentation with fewer irrelevant reads, fewer calls, lower cost, and better recall.

Final Markdown QA eval matrix

Public eval notes and locked question sets live in evals/. Corpora and raw model outputs are omitted from the public repo; the questions and methodology are included so readers can inspect the task shapes.

The final combined eval used 30 hard questions over 1,783 Markdown files from three corpora: messy generated/scene Markdown, a SciCat-style scientific README proxy, and codebase docs. Five questions are workflow-like cross-corpus analysis tasks, but none require code edits.

Reproducibility dataset: dreeseaw/mdlens-combined-markdown-v1.

Across the 15 harness/model pairs where both arms completed all rows:

metric baseline shell retrieval mdlens scout workflow
average success 19.7/30 22.7/30
average tool calls 7.5 2.6
average reported cost, priced pairs $2.41 $0.93

Selected full runs:

harness/model baseline mdlens cost
Codex + GPT-5.4 17/30 24/30 n/a
opencode + GPT-5.4 18/30 24/30 $3.08 -> $0.97
Pi + GPT-5.4 21/30 25/30 $3.64 -> $1.51
opencode + Sonnet 4.6 20/30 24/30 $2.54 -> $1.46
Pi + Sonnet 4.6 20/30 24/30 $3.51 -> $2.23
Pi + GLM 5.1 23/30 26/30 $1.98 -> $0.85
opencode + Kimi K2.6 18/30 20/30 $5.19 -> $0.81
opencode + Qwen 3.6 Plus 22/30 24/30 $0.45 -> $0.24

Native Claude rows are documented in the local reports, but the Sonnet run hit provider/credit exit_1 failures late in the run and is treated as partial harness data rather than a clean model comparison.

Other eval families:

  • messy_markdown_v1: 500 carefully curated synthetic Markdown files with malformed formatting, stale/current contradictions, copied distractors, multi-needle tables, and cross-file policy/rationale questions.
  • scicat_markdown_v1: a SciCat-style scientific README proxy, with Hugging Face and GitHub scientific Markdown fallback material.
  • codebase_markdown_v1: repository-doc navigation over real project docs, runbooks, design notes, and experiment reports.

The planned next step, if the project gets traction, is a small mock-workflow eval where each task combines Markdown analysis, a code edit, and JSON/data inspection in a fresh branch.

Installation

Requires Rust 1.70+.

cargo install mdlens

Or from source:

cargo install --git https://github.com/Dreeseaw/mdlens

Claude Code Plugin

mdlens also ships as a Claude Code plugin:

/plugin install mdlens

License

MIT. See LICENSE.

AI Disclosure

One of most intriguing aspects of this project was directly working with my end-user all along: the agents. I tried to take advantage of as many as I could to iterate quickly.

  • Initial Planning & PRD: ChatGPT 5.5 medium
  • Initial Implementation: Locally running Qwen3.6-27B-Q3-K-M
  • Adversarial Reviews & Code Improvements: ChatGPT 5.4 high, Sonnet 4.6 xhigh, Qwen3.6-Plus, Kimi-K2.6, Minimax-M2.7
  • Optimization loops: ChatGPT 5.5 high & Opus 4.7 high

The total cost of both the final evaluations & all the development evals were ~$90 from Opencode Zen + burning out my $20 Claude sub every 5 hours + upgrading to ChatGPT Max (I have a few other projects in mind anyway). Opencode made my iteration & optimization process extremely easy from an infra perspective, and ChatGPT 5.5 was excellent at minimizing spend when optimizing problems that were only pervasive towards a subset of questions/models/harnesses.